{"version":3,"file":"map.9c190782.mjs","sources":["../../../src/extra.js","../../../src/map/components/search/HamburgerNav.js","../../../src/map/model/mqplace.cjs","../../../src/map/model/route-settings.js","../../../src/map/model/slices.js","../../../src/map/model/selectors.js","../../../src/map/components/ads/update-unit-class.js","../../../src/map/utilities.js","../../../src/map/model/actions.js","../../../src/map/model/MQLocation.js","../../../src/map/model/destination.js","../../../src/map/components/road-warrior-cta/index.js","../../../src/map/components/search/SearchIcons.js","../../../src/map/components/spinner/index.js","../../../src/map/components/search/SearchInput.js","../../../src/map/shared.js","../../../src/map/model/search.js","../../../src/map/components/search/SearchAheadItem.js","../../../src/map/components/search/DisambiguationBubble.js","../../../src/map/components/search/DisambiguationFooter.js","../../../src/map/components/search/RecentSearchesHeader.js","../../../src/map/components/search/SearchAheadCategoryItem.js","../../../src/map/components/search/SearchAheadCategories.js","../../../src/map/components/search/SearchAhead.js","../../../src/map/model/browser-geolocation.js","../../../src/map/components/directions/DestinationInput/index.js","../../../src/map/components/directions/DestinationInputRoundTrip/index.js","../../../src/map/components/directions/TopInstructions/index.js","../../../src/map/components/search/MobileSearchModal/index.js","../../../src/map/components/directions/DirectionsList/index.js","../../../src/map/components/custom-inputs/customInput.js","../../../src/map/components/DestinationParser.js","../../../src/map/model/load-destinations.js","../../../src/map/components/directions/Narrative/NarrativeHeader.js","../../../src/map/components/directions/Narrative/NarrativeManeuvers.js","../../../src/map/components/directions/Narrative/NarrativeSection.js","../../../src/map/components/not-found/index.js","../../../src/map/components/directions/Narrative/index.js","../../../src/map/components/MoreLess/index.js","../../../src/map/components/infosheet/Ratings/index.js","../../../src/map/components/infosheet/vendor/infoSheetHotelCTA.js","../../../src/map/components/search/SearchResult.js","../../../src/map/components/search/SearchResults.js","../../../src/map/components/Image.js","../../../src/map/components/BestOfListItem/index.js","../../../src/map/components/BestOfList/index.js","../../../src/map/graphql/best/index.cjs","../../../src/map/model/mq-search.js","../../../src/map/graphql/topcat/index.cjs","../../../src/map/components/search/SearchBox.js","../../../src/map/components/Icon.jsx","../../../src/map/components/mq-layers/layers.js","../../../src/map/components/mq-layers/LayerTiles.js","../../../src/map/components/yp-beacons/index.js","../../../src/map/components/yext-beacons/index.js","../../../src/map/components/attribution/attribution.js","../../../src/map/model/bounds.js","../../../src/map/model/reducer.js","../../../src/map/model/load-directions.js","../../../src/map/components/infosheet/InfosheetGas.js","../../../src/map/components/infosheet/InfosheetDescription.js","../../../src/map/components/infosheet/AboutBlock.js","../../../src/map/components/infosheet/InfosheetAbout.js","../../../src/map/services/mapbox-tracking.service.js","../../../src/map/components/map-controls/MenuItem.js","../../../src/map/components/map-controls/TrafficControl.js","../../../src/map/model/poi-categories.js","../../../src/map/components/PoiContextMenu.js","../../../src/map/components/PoiMarkers.js","../../../src/map/components/Map.js","../../../src/map/phoenix/map-query.js","../../../src/map/components/directions/Routes/index.js","../../../src/map/phoenix/infosheet-route.js","../../../src/map/components/directions/index.js","../../../src/map/components/infosheet/index.js","../../../src/map/components/Search.js","../../../src/map/phoenix/search-route.js"],"sourcesContent":["import bundled from 'component-bundle';\nimport {mq} from 'config';\n\nexport const {\n  TrafficFlowLayer,\n  Share,\n  ShareContainer,\n  SharePhone,\n  Popup,\n  Print,\n  PrintNotes,\n  PrintRoutePlanner,\n  PrintInfosheet,\n  NavMenu,\n  RouteSettingsMenu,\n  Toggle,\n  BuildInfo\n} = bundled(\n  'TrafficFlowLayer, Share, ShareContainer, SharePhone, Popup, Print, PrintNotes, PrintRoutePlanner, PrintInfosheet, NavMenu, RouteSettingsMenu, Toggle, BuildInfo',\n  () => mq.load('extra')\n);\n","import React from 'react';\n\nimport {\n  srOnly,\n  iconButton,\n  menuIconButton,\n  iconBar,\n  wedges,\n  hamburgerNav\n} from './styles.scss';\n\n\nexport default ({onClick}) => {\n    return (\n      <div className={hamburgerNav}>\n        <button\n          onClick={onClick}\n          className={iconButton + ' ' + menuIconButton}\n          type=\"button\"\n          aria-label=\"Main Menu\"\n        >\n          <span className={srOnly}></span>\n          <span className={iconBar}></span>\n          <span className={iconBar}></span>\n          <span className={iconBar}></span>\n        </button>\n        <div className={wedges}></div>\n      </div>\n    );\n}\n","class MQPlace {\n  constructor(data) {\n    for (let i in data) {\n      const datum = data[i];\n      this[i] = datum.value ?? datum;\n    }\n\n    if (this.hasOwnProperty('name')) {\n      if (this.name === ',' && this.country === 'US' && this['@type'] === 'Country') {\n        this.name = 'US';\n      }\n    }\n    this.slug = this.salt;\n\n    delete this.salt;\n\n    const type = this['@type'];\n    const singleLineAddr = createSingleLineAddr(this); // We want to initalize the single line address.\n    if (type === 'StreetAddress') {\n      this.displayString = singleLineAddr; // And use it if this is a street address.\n    } else if (this.name) {\n      this.displayString = this.name;\n    }\n\n    if (this['@context']) {\n      const context = this['@context'];\n      this.eventsUrl = context && context.links && context.links.events && context.links.events.seatgeek;\n\n      if (Array.isArray(context.attributions)) {\n        if (_containsVendorType(this, 74)) {\n          this.attributions = context.attributions.map(({content, vendor}) => {\n            if (vendor == 74) {\n              return {\n                vendor,\n                content: content.replace(\n                  'Provided by YP.',\n                  `<img src=\"https://content.mqcdn.com/yogi-cdn/yogi/icons/yelp/yelp_logo.svg\" alt=\"YP\" style=\"width: 24px\"/>`\n                )\n              };\n            } else {\n              return {content, vendor};\n            }\n          });\n        } else {\n          this.attributions = context.attributions;\n        }\n      }\n    }\n\n    // Priceline hotels have a @vendor value of 66\n    this.isPricelineHotel = type === 'PricelineHotel' || _containsVendorType(this, 66);\n    this.isBizlocHotel = type === 'BizlocHotel' && _isFromBizlocVendor(this);\n    this.otaHotel = this.isPricelineHotel || this.isBizlocHotel;\n    this.isHotel = (this.categories && this.categories.indexOf('Hotels & Motels') > -1) || this.otaHotel;\n    this.isHotelInBrandedCategory = type == 'branded' && this.otaHotel;\n    // Home Advisor has a @vendor value of 833\n    this.isHomeAdvisorProp = isHomeAdvisor(this);\n\n    this.isHotelWithGasStation =\n      this.isHotel && this.gasPrices && this.gasPrices.values && !!this.gasPrices.values.length;\n    this.isBizloc = _isFromBizlocVendor(this);\n    this.isRestaurant =\n      (this.categories && this.categories.indexOf('Restaurants') > -1) || this['@type'] === 'Restaurant';\n\n    this.isPOILike =\n      type &&\n      ['streetaddress', 'locality', 'postalcode', 'county', 'region', 'country'].indexOf(type.toLowerCase()) === -1;\n    this.isLatLng = this['@type'] === 'GeocodePlace' && !!this.slug && this.slug.split('/').indexOf('latlng') === 1;\n    this.reviewCount = this.reviewCount || 0;\n\n    if (this.isLatLng) {\n      this.name = this.latLng.lat + ', ' + this.latLng.lng;\n      this.secondLine = createSingleLineAddr(this);\n    }\n    if (!this.name && singleLineAddr) {\n      this.name = singleLineAddr;\n    }\n\n    try {\n      if (this.dataAsJsonStr && !this.dataAsJson) {\n        this.dataAsJson = JSON.parse(this.dataAsJsonStr);\n\n        this.dataAsJson.breadcrumbs = this.dataAsJson.breadcrumbs.map(crumb => ({\n          ...crumb,\n          url: crumb.url[0] === '/' ? crumb.url : '/' + crumb.url\n        }));\n      }\n    } catch (err) {}\n  }\n\n  isA(type) {\n    return this['@lineage']?.includes(type) || this['@type'] === type;\n  }\n\n  isOneOf(...types) {\n    return types.some(this.isA.bind(this));\n  }\n}\n\n// helper functions\n\nconst createSingleLineAddr = data => {\n  const addr = data.address;\n  if (!addr) return '';\n\n  if (addr.singleLine) {\n    // If single line address already exists, no need to re-create it.\n    return addr.singleLine;\n  } else {\n    // Otherwise create it from the address parts and store as single line.\n    const parts = [];\n    if (addr.address1 && (addr.locality || addr.region)) {\n      parts.push([addr.address1, addr.locality, addr.region].join(', '));\n    } else if (addr.locality && addr.region) {\n      parts.push([addr.locality, addr.region].join(', '));\n    }\n\n    if (addr.postalCode) {\n      parts.push(addr.postalCode);\n    }\n\n    return parts.join(' ');\n  }\n};\n\nconst _isFromBizlocVendor = data => {\n  let result = false;\n  if (data.sources) {\n    for (let i = 0; i < data.sources.length; i++) {\n      const source = data.sources[i];\n      // Source vendor ids between 34000 and 39000 are\n      // Bizloc vendors.  This approach was vetted with\n      // the Search team.\n      if (source >= 34000 && source <= 39000) {\n        result = true;\n        break;\n      }\n    }\n  }\n  return result;\n};\n\n/**\n * Loops through the sources collection to find a matching vendor id\n * This is more reliable than checking against the `@type` property\n *\n * @param {number} vendor used to match against sources collection\n * @return {boolean} returns true if the `vendor` is found in the `sources` collection\n */\nconst _containsVendorType = (data, vendor) => {\n  if (!vendor) return false;\n  const sources = data.sources;\n\n  if (sources && sources.length) {\n    return sources.some(function (source) {\n      return source == vendor;\n    });\n  } else {\n    return false;\n  }\n};\n\nconst isHomeAdvisor = data => {\n  const url = data.customUrl || data.actionUrl;\n  const includesHomeAdvisor = _containsVendorType(data, 833);\n\n  return includesHomeAdvisor && url && url.toLowerCase().indexOf('homeadvisor') !== -1;\n};\n\n/*\n * This methods were defined and used in yogi, but we haven't used them here yet\n */\nclass MQPlaceBehavior {\n  constructor(data) {\n    for (let i in data) {\n      this[i] = data[i];\n    }\n  }\n\n  /* The following functions were defined on yogi, but we haven't used them in phoenix\n   * we comment them out as we need them\n  fromVendor () {\n    const self = this;\n    if (!this.vendorData) return false;\n\n    return Array.prototype.some.apply(arguments, [function (arg) {\n      return self.vendorData.some(function (vendor) {\n        return vendor['@vendor'] == arg;\n      });\n    }]);\n  }\n\n  attrFromVendor (attr, vendorId) {\n    return (this.hasOwnProperty(attr) && this[attr]['@vendor'] === vendorId);\n  }\n\n  getVendorData (vendorId) {\n    // Returns the first one if vendorId is not passed\n    if (!vendorId && this.vendorData.length) {\n      return this.vendorData[0];\n    }\n\n    return this.vendorData.filter(function (item) {\n      return (item['@vendor'] == vendorId);\n    }).pop();\n  }\n\n  getDirectBookConfig (directBooks) {\n    if (this.directBookConfig) return this.directBookConfig;\n\n    if (this.sources && this.sources.length > 0) {\n      for (let i = 0, l = this.sources.length; i < l; i++) {\n        if (directBooks.hasOwnProperty(this.sources[i])) {\n          this.directBookConfig = directBooks[this.sources[i]];\n          return this.directBookConfig;\n        }\n\n        return {};\n      }\n    } else {\n      return {};\n    }\n  }\n\n  getReservationPrefix (directBooks) {\n    if (this.directBookConfig && this.directBookConfig.reservationPrefix) {\n      return this.directBookConfig.reservationPrefix;\n    }\n\n    const configs = this.getDirectBookConfig(directBooks);\n\n    return configs.reservationPrefix ? configs.reservationPrefix : '';\n  }\n\n  getWebsitePrefix (directBooks) {\n    if (this.directBookConfig && this.directBookConfig.websitePrefix) {\n      return this.directBookConfig.websitePrefix;\n    }\n\n    const configs = this.getDirectBookConfig(directBooks);\n\n    return configs.websitePrefix ? configs.websitePrefix : '';\n  }\n\n  hasInfogroupAttribution () {\n    const attribution = false;\n    if (this['@context'] && Array.isArray(this['@context'].attributions)) {\n      this['@context'].attributions.some(function (element) {\n        if (element.vendor === 1001) {\n          attribution = element.content;\n        }\n      });\n    }\n    return attribution;\n  }\n\n  isA (type) {\n    return this['@type'] === type || (this.hasOwnProperty('@lineage') && this['@lineage'].indexOf(type) !== -1);\n  }\n\n  getTemplateType () {\n    if (!this['@type']) { return 'poi'; }\n\n    const type = this['@type'].toLowerCase();\n    const hotel = 'hotel';\n    let result;\n\n    if (type.indexOf(hotel) >= 0) {\n      result = hotel;\n    } else if ([ 'airport', 'venue', 'locality', 'restaurant' ].indexOf(type) >= 0) {\n      result = type;\n    } else {\n      result = 'poi';\n    }\n\n    return result;\n  }\n\n  typeLabel () {\n    const type = this['@type'];\n    const labelMap = {\n      'StreetAddress':'Location',\n      'Poi': 'Location',\n      'GasStations':'Gas Station',\n      'GenericHotel':'Hotel/Motel',\n      'BizlocHotel':'Hotel/Motel',\n      'PricelineHotel':'Hotel/Motel'\n    };\n    return (labelMap[type]) ? labelMap[type] :type;\n  }\n\n  formatNameForDirections () {\n    const type = this['@type'] ? this['@type'].toLowerCase() : '';\n    const singleLineAddr = this.createSingleLineAddr();\n\n    const name = this.name;\n    if (type === 'streetaddress') {\n      name = singleLineAddr || this.name;\n    } else {\n      if (this.name && this.name != singleLineAddr) {\n        name = this.name + (singleLineAddr ? (', ' + singleLineAddr) : '');\n      }\n    }\n\n    return name;\n  }\n\n  isCategory () {\n    //always false because Places and SearchAheadResults need a similar interface as they are both handled by Search Suggestions\n    return false;\n  }\n\n  isFullyResolved () {\n    return (this) && (this['@type']);\n  }\n\n  isRoutable () {\n    return !!(this.address && this.address.locality);\n  }\n\n  getBoundingSlug () {\n    const boundingSlugRx = /^\\/(\\w\\w\\/[\\w-]+\\/)/;\n    let slug, match;\n\n    match = this.slug && this.slug.match(boundingSlugRx);\n    if (match) {\n      slug = match[1];\n      if (this.address.locality) {\n        slug += this.address.locality.toLowerCase().replace(/\\s/g, '-');\n      }\n    }\n    else {\n      slug = this.address.country.toLowerCase() + '/' +\n        this.address.region.toLowerCase() + '/' +\n        this.address.locality.toLowerCase().replace(/\\s+/g, '-');\n    }\n\n    return slug;\n  }\n\n  getCategorySlug (category) {\n    return category.toLowerCase().replace(/\\s/g, '-').replace(/&/g, 'and').replace(/\\//g, '-');\n  }\n  */\n}\n\nmodule.exports = MQPlace;\n","import {createSelector} from 'reselect';\n\nimport {addTrigger, sharedExtra} from 'morass';\nimport {select} from 'morass/traverse';\n\nimport {routeSettings} from 'config';\nimport {defaultMemoize} from 'reselect';\n\nconst routeSettingsKey = 'map.routeSettings';\nconst defaultToggleRouteSettingsValues = Object.entries(routeSettings.toggles).reduce(\n  (a, [k, v]) => ((a[k] = v.value), a),\n  {}\n);\n\nconst getPersistedRouteSettingsValues = routeSettingsValues =>\n  Object.entries(routeSettingsValues).reduce(\n    (a, [k, v]) => (routeSettings.toggles[k]?.persist ? ((a[k] = v), a) : a),\n    {}\n  );\n\n// Initial route settings can be used (a) in setRouteSettings reducer,\n// or (b) to dispatch setRouteSettings action on start. Exported for unit test.\nexport const loadOrCreateRouteSettings = () => {\n  let persistedRouteSettingsValues;\n  try {\n    const routeSettingsString = localStorage.getItem(routeSettingsKey);\n    if (routeSettingsString) {\n      persistedRouteSettingsValues = JSON.parse(routeSettingsString);\n\n      // Remove toggles that are in local storage which have been removed from the config.\n      persistedRouteSettingsValues = Object.keys(persistedRouteSettingsValues)\n        .filter(key => routeSettings.toggles[key])\n        .map(key => persistedRouteSettingsValues[key]);\n    }\n  } catch (error) {\n    console.warn('Failed to load route settings: ', error.message);\n    window.newrelic?.noticeError(error);\n  }\n\n  return {\n    unit: routeSettings?.unit || 'm',\n    routeType: routeSettings?.routeType || 'fastest',\n    ...(defaultToggleRouteSettingsValues || {}),\n    ...(persistedRouteSettingsValues || {})\n  };\n};\n\n// The function is memoized as it is called multiple times\nexport const initialRouteSettings = defaultMemoize(loadOrCreateRouteSettings);\n\n// Using dynamic import due to circular dependency on another module\nimport('../../map/model/slices')\n  .then(({directions}) => {\n    sharedExtra(\n      // sharedExtra used for unit tests\n      () => {\n        return addTrigger(\n          createSelector(select(directions.routeSettings), routeSettings => routeSettings),\n          data => () => {\n            try {\n              const routeSettingsString = JSON.stringify(getPersistedRouteSettingsValues(data));\n              localStorage.setItem(routeSettingsKey, routeSettingsString);\n            } catch (error) {\n              console.warn('Failed to save route settings:', error.message);\n              window.newrelic?.noticeError(error);\n            }\n          }\n        );\n      }\n    )();\n  })\n  .catch(error => {\n    console.warn(error.message);\n    window.newrelic?.noticeError(error);\n  });\n","import {at} from 'morass/traverse';\nimport {get, routeOptimizationSettings} from 'config';\nimport {initialRouteSettings} from './route-settings';\nimport { PAGE_STATUS } from '../../lib/constants.cjs';\nimport {removeDashes} from '../../utils/filters/index.cjs';\n\nconst map = {\n  center: at(state => state.map.center),\n  zoom: at(state => state.map.zoom),\n  bounds: at(state => state.map.bounds),\n  mapCenter: at(state => (state.map.mapCenter = null)),\n  mapZoom: at(state => (state.map.mapZoom = 0)),\n  mapBounds: at(state => (state.map.mapBounds = null)),\n  style: at(state => state.map.style),\n  confirmedBounds: at(state => (state.map.confirmedBounds = false)),\n  printView: at(state => (state.map.printView = false)),\n  precisePosition: at(\n    state => (state.map.precisePosition = {watchPosResponded: false, error: false, latLng: {lat: null, lng: null}})\n  ),\n  sources: at(state => (state.map.sources = {})),\n  previous: at(state => (state.map.previous = {zoom: null, bounds: null})),\n  attributes: at(state => (state.map.attributes = {provider: 'TT', activeStyle: 'STREETS'})),\n  markerState: at(state => (state.map.markerState = {hovered: {}, selected: {}, markerData: {}})),\n  ribbonState: at(state => (state.map.ribbonState = {hovered: null, selected: null, ribbonData: []})),\n  sharePath: at(state => (state.map.sharePath = '')),\n  narrativeState: at(state => (state.map.narrativeState = false))\n};\n\nconst search = {\n  results: at(state => state.search.results), // Pure search results\n  details: at(state => (state.search.details = {})), // PQRS metadata\n  query: at(state => (state.search.query = '')),\n  isInternalQuery: at(state => (state.search.isInternalQuery = false)),\n  inputFocused: at(state => (state.search.inputFocused = false)),\n  area: at(state => (state.search.area = '')), // alternative way to query: bounds + category\n  category: at(state => (state.search.category = '')), // alternative way to query: bounds + category\n  state: at(state => (state.search.state = {page: 0})),\n  bounds: at(state => (state.search.bounds = {})),\n  recents: at(state => (state.search.recents = [])),\n  predictions: at(state => (state.search.predictions = [])),\n  arePredictionsLoading: at(state => (state.search.arePredictionsLoading = false)),\n  dropdownVisible: at(state => (state.search.dropdownVisible = false)),\n  isSearching: at(state => (state.search.isSearching = true)),\n  isDisambiguatedSearch: at(state => (state.search.isDisambiguatedSearch = false)),\n  isTopCat: at(state => (state.search.isTopCat = false)),\n  topCatMetaInfo: at(state => (state.search.topCatMetaInfo = {name: '', description: ''})),\n  clickedOn: at(state => (state.search.clickedOn = null)),\n  searchFailed: at(state => state.search.searchFailed),\n  status: at(state => (state.search.status = PAGE_STATUS.LOADING)),\n  error: at(state => (state.search.error = ''))\n};\n\nconst directions = {\n  origin: at(state => state.directions.origin),\n  destination: at(state => state.directions.destination),\n  routeSettings: at(state => (state.directions.routeSettings = initialRouteSettings())),\n  destinationList: at(state => (state.directions.destinationList = [])),\n  results: at(state => state.directions.results),\n  directionsLoadingState: at(state => state.directions.directionsLoadingState),\n  wereDestinationsReordered: at(state => (state.directions.wereDestinationsReordered = false)),\n  routeData: at(state => state.directions.routeData),\n  alternateRoutesData: at(state => (state.directions.alternateRoutesData = null)),\n  routeDataResponse: at(state => (state.directions.routeDataResponse = null)),\n  currentRouteIndex: at(state => (state.directions.currentRouteIndex = 0)),\n  copyPasteText: at(state => (state.directions.destination = '')),\n  fuelCost: at(state => state.directions.fuelCost),\n  redirectToInfosheet: at(state => (state.directions.redirectToInfosheet = true)),\n  directionsFailed: at(state => (state.directions.directionsFailed = '')),\n  status: at(state => (state.directions.status = PAGE_STATUS.LOADING)),\n  error: at(state => (state.directions.error = ''))\n};\n\nconst routing = {\n  routeSettings: at(state => (state.routing.routeSettings = {...routeOptimizationSettings?.toggles}))\n};\n\nconst init = {\n  mapCenter: at(state => state.init.mapCenter),\n  mapZoom: at(state => state.init.mapZoom),\n  location: at(state => state.init.location)\n};\n\n// TODO - SlotsConfig - Campaign should be included\nconst categories = at(state => (state.categories = { layers: [], slotConfig: [] }));\n\nconst bizLocs = at(state => (state.bizlocs = []));\n\nconst activeBizLoc = at(state => (state.activeBizLoc = {}));\n\nconst routeSponsorships = at(state => (state.routeSponsorships = {}));\n\nconst searchActive = at(state => (state.searchActive = false));\nconst infoSheetActive = at(state => (state.infoSheetActive = false));\n\nconst activePoiMarker = at(state => (state.activePoiMarker = null));\n\nconst SEARCH_RESULTS_PER_PAGE = get('search.results.perPage', 50);\nconst MAX_SEARCH_RESULTS_PAGES = get('search.results.maxPages', 1);\nconst TOP_CATS_RESULTS_PER_PAGE = get('topCats.results.perPage', 50);\n\nconst infosheet = {\n  data: at(state => state.infosheet.data),\n  mqId: at(state => (state.infosheet.mqId = '')),\n  slug: at(state => (state.infosheet.slug = '')),\n  status: at(state => (state.infosheet.status = PAGE_STATUS.LOADING)),\n  error: at(state => (state.infosheet.error = '')),\n  nameVisible: at(state => (state.infosheet.nameVisible = true)),\n  isClosed: at(state => (state.infosheet.isClosed = false))\n};\n\nconst mobilePanel = {\n  headingValue: at(state => (state.mobilePanel.headingValue = '')),\n  headingVisible: at(state => (state.mobilePanel.headingVisible = true)),\n  expandedState: at(state => (state.mobilePanel.expandedState = 'expanded-partially'))\n};\n\nconst vendors = at(state => (state.vendors = {}));\n\nconst searchMetadata = at(state => (state.searchMetadata = {}));\n\nconst ypBeacons = at(state => (state.ypBeacons = []));\nconst yextBeacons = at(state => (state.yextBeacons = []));\nconst isPrintOpen = at(state => (state.isPrintOpen = false));\n\nconst showRoadWarriorUnit = at(state => (state.showRoadWarriorUnit = true));\n\nconst makeQueryForTopCats = (area, category) => {\n  const parts = area.split('/'),\n    state = removeDashes(parts[2]),\n    city = removeDashes(parts[3]),\n    location = state && city ? city + ', ' + state : state || city || '';\n  return removeDashes(category) + ' in ' + location;\n};\n\nexport {\n  map,\n  search,\n  directions,\n  routing,\n  init,\n  categories,\n  bizLocs,\n  activeBizLoc,\n  routeSponsorships,\n  searchActive,\n  infoSheetActive,\n  activePoiMarker,\n  SEARCH_RESULTS_PER_PAGE,\n  MAX_SEARCH_RESULTS_PAGES,\n  TOP_CATS_RESULTS_PER_PAGE,\n  infosheet,\n  vendors,\n  searchMetadata,\n  ypBeacons,\n  yextBeacons,\n  isPrintOpen,\n  showRoadWarriorUnit,\n  removeDashes,\n  makeQueryForTopCats,\n  mobilePanel\n};\n","import {select} from 'morass/traverse';\nimport {map as mapConfig} from 'config';\nimport MQPlace from './mqplace.cjs';\n\nimport {\n  map,\n  search,\n  directions,\n  routing,\n  init,\n  categories,\n  infosheet,\n  vendors,\n  bizLocs,\n  activeBizLoc,\n  SEARCH_RESULTS_PER_PAGE,\n  searchActive,\n  infoSheetActive,\n  activePoiMarker,\n  routeSponsorships,\n  searchMetadata,\n  ypBeacons,\n  yextBeacons,\n  showRoadWarriorUnit,\n  isPrintOpen,\n  mobilePanel\n} from './slices';\n\nimport {createSelector, createStructuredSelector} from 'reselect';\nimport {createArraySelectorPreservingElements} from 'memoize';\n\nconst {poiDefault, poiDot} = mapConfig;\n\nconst sanitizePage = page => (isNaN(page) || page < 0 ? 0 : +page);\n\nconst mapProps = createStructuredSelector({\n  center: select(map.center),\n  zoom: select(map.zoom),\n  bounds: select(map.bounds),\n  mapCenter: select(map.mapCenter),\n  mapZoom: select(map.mapZoom),\n  mapBounds: select(map.mapBounds),\n  style: select(map.style),\n  confirmedBounds: select(map.confirmedBounds),\n  printView: select(map.printView),\n  precisePosition: select(map.precisePosition),\n  sources: select(map.sources),\n  previous: select(map.previous),\n  attributes: select(map.attributes),\n  markerState: select(map.markerState),\n  ribbonState: select(map.ribbonState),\n  sharePath: select(map.sharePath)\n});\n\nconst narrativeState = createSelector(select(map.narrativeState), narrativeState => narrativeState);\n\nconst validMapBounds = createSelector(\n  select(map.bounds),\n  ({north, east, south, west} = {}) => !isNaN(north) && !isNaN(east) && !isNaN(south) && !isNaN(west)\n);\n\nconst recentSearches = createSelector(select(search.recents), recents => recents);\n\nconst rawSearchResults = select(search.results);\nconst searchState = createSelector(select(search.state), state => state);\nconst rawSearchDetails = select(search.details);\nconst rawRecents = select(search.recents);\n\nconst searchProps = createStructuredSelector({\n  results: rawSearchResults,\n  query: select(search.query),\n  isInternalQuery: select(search.isInternalQuery),\n  inputFocused: select(search.inputFocused),\n  area: select(search.area),\n  category: select(search.category),\n  recents: select(search.recents),\n  predictions: select(search.predictions),\n  arePredictionsLoading: select(search.arePredictionsLoading),\n  dropdownVisible: select(search.dropdownVisible),\n  isSearching: select(search.isSearching),\n  isDisambiguatedSearch: select(search.isDisambiguatedSearch),\n  isTopCat: select(search.isTopCat),\n  topCatMetaInfo: select(search.topCatMetaInfo),\n  clickedOn: select(search.clickedOn),\n  inProgress(state) {\n    return searchState(state).inprogress;\n  },\n  page(state) {\n    return searchState(state).page;\n  },\n  searchFailed: select(search.searchFailed),\n  status: select(search.status), // loading|data|error\n  error: select(search.error)\n});\n\nconst infosheetProps = createStructuredSelector({\n  data: createSelector(select(infosheet.data), data => {\n    return data && new MQPlace(data);\n  }),\n  mqId: select(infosheet.mqId),\n  slug: select(infosheet.slug),\n  status: select(infosheet.status), // loading|data|error\n  error: select(infosheet.error),\n  isClosed: select(infosheet.isClosed)\n});\n\nconst mobilePanelProps = createStructuredSelector({\n  headingValue: select(mobilePanel.headingValue),\n  headingVisible: select(mobilePanel.headingVisible),\n  expandedState: select(mobilePanel.expandedState)\n});\n\nconst initProps = createStructuredSelector({\n  mapCenter: select(init.mapCenter),\n  mapZoom: select(init.mapZoom),\n  location: select(init.location)\n});\n\nconst rawCategories = select(categories);\n\nconst rawBizLocs = select(bizLocs);\n\nconst activeBizLocSelector = createSelector(select(activeBizLoc), activeBizLoc => activeBizLoc);\n\nconst rawRouteSponsorships = createSelector(select(routeSponsorships), routeSponsorships => routeSponsorships);\n\nconst searchActiveSelector = select(searchActive);\n\nconst infoSheetActiveSelector = select(infoSheetActive);\n\nconst activePoiMarkerSelector = select(activePoiMarker);\n\nconst poiMarkers = createArraySelectorPreservingElements(\n  searchState,\n  rawSearchResults,\n  rawSearchDetails,\n  rawCategories,\n  activeBizLocSelector,\n  select(infosheet.data),\n  ({page}, results, details, {layers}, activeBizLoc, activeInfosheet) => {\n    if (results && results.length) {\n      let markersFromResults =\n        results &&\n        layers &&\n        results.map(({name, index, location, mqId, slug}) => {\n          const {categories} =\n            (Math.floor(index / SEARCH_RESULTS_PER_PAGE) == sanitizePage(page) && details[mqId]) || {};\n          if (activeBizLoc.mapToolsPin) {\n            return {name, mqId, slug, location, icon: activeBizLoc.mapToolsPin, large: categories != null, index};\n          } else {\n            return {\n              name,\n              mqId,\n              slug,\n              location,\n              icon: categories ? getIcon(categories, layers) : poiDot,\n              large: categories != null,\n              index\n            };\n          }\n        });\n      if (\n        markersFromResults.length &&\n        activeInfosheet?.['@id'] &&\n        results.findIndex(res => res.mqId === activeInfosheet.mqId) === -1\n      ) {\n        const {\n          name: {value: name},\n          mqId,\n          slug,\n          latLng: location,\n          categories\n        } = activeInfosheet;\n        markersFromResults.push({\n          name,\n          mqId,\n          slug,\n          location,\n          icon: categories ? getIcon(categories, layers) : poiDot,\n          large: categories !== null,\n          index: results.length,\n          active: true\n        });\n      }\n      return markersFromResults;\n    }\n    if (!activeInfosheet?.['@id']) return null;\n    return [\n      {\n        name: activeInfosheet.name.value,\n        location: activeInfosheet.latLng,\n        icon: getIcon(activeInfosheet.categories, layers),\n        large: true,\n        index: 0,\n        active: true\n      }\n    ];\n  }\n);\n\nconst getIcon = (categories, layers) => {\n  const catWithIcon = layers && categories && layers.find(layer => categories.includes(layer.name));\n  return (catWithIcon && catWithIcon.icon) || poiDefault;\n};\n\nconst searchDetailsForCurrentPage = createSelector(\n  searchState,\n  rawSearchResults,\n  rawSearchDetails,\n  select(vendors),\n  ({page}, results, details, vendors) => {\n    page = sanitizePage(page);\n    return (\n      (results &&\n        results\n          .slice(page * SEARCH_RESULTS_PER_PAGE, (page + 1) * SEARCH_RESULTS_PER_PAGE)\n          .map(result => {\n            const detail = details[result.mqId];\n            if (!detail) return null;\n            const {vendors: resultVendors, type, actionUrl, ...otherDetail} = detail;\n            return {\n              vendors: mergeVendorRecords(resultVendors, vendors),\n              ...otherDetail,\n              ...result,\n              // FIXME: should probably be configurable\n              ...(type == 'BizlocHotel' && actionUrl && {action: actionUrl})\n            };\n          })\n          .filter(Boolean)) ||\n      []\n    );\n  }\n);\n\nconst mergeVendorRecords = (to, from) => {\n  return Object.entries(to).reduce((to, [vendor, {id, ...records}]) => {\n    const vendorData = from[vendor],\n      vendorRecord = vendorData && id in vendorData ? vendorData[id] : {id};\n    // Null vendor records mean lookup was attempted.\n    // Lookup trigger relies on presence or absence of the `id' field\n    to[vendor] = {...vendorRecord, ...records};\n    return to;\n  }, {});\n};\n\nconst allSearchDetailsAvailable = createSelector(\n  searchState,\n  rawSearchResults,\n  rawSearchDetails,\n  ({page}, results, details) => {\n    page = sanitizePage(page);\n    return (\n      !(results && results.length) ||\n      results\n        .slice(page * SEARCH_RESULTS_PER_PAGE, (page + 1) * SEARCH_RESULTS_PER_PAGE)\n        .every(({mqId}) => mqId in details)\n    );\n  }\n);\n\nconst mapMovedAwayFromLastSearch = createSelector(\n  rawSearchResults,\n  select(search.bounds),\n  select(map.bounds),\n  (resultsExist, {north, east, south, west}, {north: mapNorth, east: mapEast, south: mapSouth, west: mapWest}) => {\n    if (north == null || !resultsExist)\n      // Test for ==null to check for uninitialized search bounds\n      return null;\n\n    // Beware the dateline!\n    if (west > 0 && east < 0) east += 360;\n    if (mapWest > 0 && mapEast < 0) mapEast += 360;\n\n    if (east >= 180 && mapWest < 0) {\n      mapWest += 360;\n      mapEast += 360;\n    } else if (mapEast >= 180 && west < 0) {\n      west += 360;\n      east += 360;\n    }\n    // At this point we can treat the lat/lng space as a plane\n\n    // Did the map move halfway off or more in any direction?\n    const midLat = (north + south) / 2,\n      midLng = (east + west) / 2;\n    if (mapNorth <= midLat || mapSouth >= midLat || mapWest >= midLng || mapEast <= midLng) return true;\n\n    // Did the area change 2x or more?\n    const area = (north - south) * (east - west),\n      mapArea = (mapNorth - mapSouth) * (mapEast - mapWest);\n    return Math.max(area, mapArea) / Math.min(area, mapArea) >= 2;\n  }\n);\n\nconst directionsProps = createStructuredSelector({\n  results: select(directions.results),\n  origin: select(directions.origin),\n  destination: select(directions.destination),\n  destinationList: select(directions.destinationList),\n  copyPasteText: select(directions.copyPasteText),\n  routeSettings: select(directions.routeSettings),\n  directionsLoadingState: select(directions.directionsLoadingState),\n  wereDestinationsReordered: select(directions.wereDestinationsReordered),\n  fuelCost: select(directions.fuelCost),\n  redirectToInfosheet: select(directions.redirectToInfosheet),\n  routeData: select(directions.routeData),\n  alternateRoutesData: select(directions.alternateRoutesData),\n  currentRouteIndex: select(directions.currentRouteIndex),\n  routeDataResponse: select(directions.routeDataResponse),\n  directionsFailed: select(directions.directionsFailed),\n  status: select(directions.status), // loading|data|error\n  error: select(directions.error)\n});\n\nconst routeOptimizationProps = createStructuredSelector({\n  routeSettings: select(routing.routeSettings)\n});\n\nconst invalidDirectionsEndpoint = createSelector(\n  select(directions.origin),\n  select(directions.destination),\n  (origin, destination) =>\n    !origin.location && !origin.name ? 'origin' : !destination.location && !destination.name ? 'destination' : null\n);\n\nconst validDirectionsEndpoints = state => !invalidDirectionsEndpoint(state);\n\nconst searchMetadataSelector = createSelector(select(searchMetadata), searchMetadata => searchMetadata);\n\n// const ypBeaconsSelector = select(ypBeacons);\nconst ypBeaconsSelector = createSelector(select(ypBeacons), ypBeacons => ypBeacons);\nconst yextBeaconsSelector = createSelector(select(yextBeacons), yextBeacons => yextBeacons);\nconst isPrintOpenSelector = select(isPrintOpen);\n\nconst showRoadWarriorUnitSelector = select(showRoadWarriorUnit);\n\nexport {\n  mapProps,\n  narrativeState,\n  validMapBounds,\n  recentSearches,\n  rawSearchResults,\n  searchState,\n  rawSearchDetails,\n  rawRecents,\n  searchProps,\n  infosheetProps,\n  initProps,\n  rawCategories,\n  rawBizLocs,\n  activeBizLocSelector,\n  rawRouteSponsorships,\n  searchActiveSelector,\n  infoSheetActiveSelector,\n  activePoiMarkerSelector,\n  poiMarkers,\n  searchDetailsForCurrentPage,\n  allSearchDetailsAvailable,\n  mapMovedAwayFromLastSearch,\n  directionsProps,\n  routeOptimizationProps,\n  invalidDirectionsEndpoint,\n  validDirectionsEndpoints,\n  searchMetadataSelector,\n  ypBeaconsSelector,\n  yextBeaconsSelector,\n  isPrintOpenSelector,\n  showRoadWarriorUnitSelector,\n  mobilePanelProps\n};\n","import React from 'react';\nimport {connect, useSelector} from 'react-redux';\nimport {activeBizLocSelector} from '../../../map/model/selectors';\n\nimport {adUnitConfiguration} from 'ads/shared';\nimport AdUnit from 'ads/unit';\n\nimport {adWrapper as adWrapperStyle, adWrapperMobile as adWrapperMobileStyle} from './styles.scss';\nimport {useMobileCheck} from 'event-hooks';\n\nexport const Ad = connect(adUnitConfiguration)(props => {\n  const activeBizLoc = useSelector(activeBizLocSelector);\n\n  if (activeBizLoc && Object.keys(activeBizLoc).length !== 0) {\n    if (!props.sizes) return;\n    const width = props.sizes[0][0];\n    const height = props.sizes[0][1];\n    const imageSize = `${width}x${height}`;\n    const imageUrl = activeBizLoc.images[imageSize]?.url;\n    const linkUrl = activeBizLoc.images[imageSize]?.clickLarge;\n\n    return props.name !== 'bannertop' ? (\n      <div style={{width, height, opacity: 1, cursor: linkUrl ? 'pointer' : ''}} className={props.className}>\n        <img\n          loading=\"lazy\"\n          src={imageUrl}\n          onClick={() => {\n            if (linkUrl) window.open(linkUrl, '_blank').focus();\n          }}\n        />\n      </div>\n    ) : null;\n  }\n\n  return <AdUnit {...props}></AdUnit>;\n});\n\nexport default function ({name, className, mobileAd}) {\n  const isMobile = useMobileCheck();\n  if (mobileAd && !isMobile) return null;\n  return <AdUnit name={name} className={className} />;\n}\n\nexport const AdWrapper = ({children, isVideoAd = false, showAdTitle = false, isMobile = false, className = ''}) => {\n  return (\n    <div data-ad-wrapper className={`${isMobile ? adWrapperMobileStyle : adWrapperStyle} ${isVideoAd ? 'video' : ''} ${className}`}>\n      {showAdTitle && <p>Advertisement</p>}\n      {children}\n    </div>\n  );\n};\n","// GENERAL MAP UTILITY FUNCTIONS\n\nexport const makeRouteRegExp = routeTypes => {\n  const pattern = Array.isArray(routeTypes) ? '(?:' + routeTypes.join('|') + ')' : routeTypes;\n  return new RegExp('^\\\\/' + pattern + '(?:/|$)', 'i');\n};\n\nexport const isOneOfRouteTypes = (route, routeTypes = ['directions', 'search', 'top', 'routeplanner', 'print']) => {\n  // by default routeTypes includes all non-root patterns\n  // TODO: the infosheet route here assumes a two-letter country code, which will be changed\n  if (!route || route === '/') return false; // Verifies that route exists - which it won't if used outside of the context of Phoenix.\n  return makeRouteRegExp(routeTypes).test(route);\n};\n\nconst isNonInfosheetRegExp = makeRouteRegExp(['directions', 'search', 'top', 'routeplanner', 'print']);\n\n// Returns true if you are on a route that should return an infosheet.\n// Returns false if you are on a route that should NOT return an infosheet.\nexport const isInfosheetRoute = route => {\n  if (!route || route === '/') return false; // Verifies that route exists - which it won't if used outside of the context of Phoenix.\n  if (isNonInfosheetRegExp.test(route)) return false;\n  return true;\n};\n\nconst isRoutePlannerRegExp = makeRouteRegExp('routeplanner');\n\nexport const isRoutePlanner = route => isRoutePlannerRegExp.test(route);\n\nconst pages = {\n  home: route => !route || route === '/',\n  search: makeRouteRegExp('search'),\n  directions: makeRouteRegExp('directions'),\n  routeplanner: route => isRoutePlanner(route),\n  print: makeRouteRegExp('print'),\n  top: makeRouteRegExp('top'),\n  infosheet: route => isInfosheetRoute(route)\n};\n\nexport const getPage = route => {\n  for (const name in pages) {\n    const value = pages[name];\n    if (typeof value == 'function') {\n      if (value(route)) return name;\n      continue;\n    }\n    if (value instanceof RegExp) {\n      if (value.test(route)) return name;\n      // continue; // not actually needed here\n    }\n  }\n  return 'home';\n};\n","import {createActions, createThunk} from 'morass';\nimport {api, searchahead} from 'config';\nimport {mapProps, initProps, searchProps, directionsProps, activePoiMarkerSelector} from './selectors';\nimport {active, bounce as bounceCss} from '../styles/map.scss';\nimport {generateSourceData as generateMarkerSourceData} from 'markerUtils';\nimport {generateSourceData as generateRibbonSourceData} from 'routeRibbonUtils';\nimport {isOneOfRouteTypes} from '../utilities';\n\nconst simplePayload = arg => arg,\n  boundsPayload = (north, east, south, west) => (isNaN(east) ? toBounds(north) : {north, east, south, west}),\n  pointPayload = (lat, lng) => (isNaN(lng) ? toLatLng(lat) : {lat, lng}),\n  destinationPayload = (index, destination) => ({index, destination});\nconst {collection: COLLECTION, limit: LIMIT, destCollection: DEST_COLLECTION} = searchahead;\n\n// The function below is left here, because it is frequently needed to debug actions.\n\n// const TRACE_ACTION = (action, name = 'ACTION') => {\n//   const fn = (...args) => {\n//     console.log(name + ':', ...args, new Error('trace'));\n//     return action(...args);\n//   };\n//   Object.keys(action).forEach(key => (fn[key] = action[key]));\n//   return fn;\n// };\n\n// Examples of use:\n// setCenter: TRACE_ACTION(pointPayload, 'ACTION setCenter'),\n// initCenter: createThunk(initCenterWith, TRACE_ACTION(pointPayload, 'ACTION initCenter')),\n\nexport const {\n  setCenter,\n  initCenter,\n  setZoom,\n  initZoom,\n  setBounds,\n  setConfirmedBounds,\n  setMapCenter,\n  setMapZoom,\n  setMapCenterZoom,\n  initCenterZoom,\n  setMapBounds,\n  setStyle,\n  markLocation,\n  setSearchQuery,\n  setSearchQueryEx,\n  setSearchResults,\n  setSearchDetails,\n  setSearchState,\n  setSearchBounds,\n  searchFailed,\n  setOrigin,\n  setDestination,\n  setDestinationList,\n  setDestinationListItem,\n  addDestination,\n  removeDestination,\n  setDirectionsLoadingState,\n  setWereDestinationsReordered,\n  setCopyPasteText,\n  setDirections,\n  directionsFailed,\n  setCategories,\n  categoriesFailed,\n  setInfosheetMqId,\n  setInfosheetSlug,\n  setInfosheetData,\n  setInfosheetNameVisible,\n  setInputFocused,\n  infosheetFailed,\n  setBizLocs,\n  bizLocsFailed,\n  setActiveBizLoc,\n  addRecentSearch,\n  removeRecentSearch,\n  setRecentSearches,\n  setPreviousMapProperties,\n  fetchRecentSearches,\n  setPredictionResults,\n  setArePredictionsLoading,\n  predictionResultsFailed,\n  setPrintView,\n  setPrecisePosition,\n  setDropdownVisible,\n  setSearchActive,\n  setInfoSheetActive,\n  setActivePoiMarker,\n  setRouteSettings,\n  setRouteOptimizationSettings,\n  setIsSearching,\n  setIsDisambiguatedSearch,\n  setIsTopCat,\n  setTopCatMetaInfo,\n  setSearchPath,\n  setClickedOn,\n  setRouteData,\n  setAlternateRoutesData,\n  setRouteDataResponse,\n  setCurrentRoute,\n  setCurrentRouteIndex,\n  setFuelCost,\n  setRedirectToInfosheet,\n  setMapSource,\n  setMarkerState,\n  setRibbonState,\n  setMapAttributes,\n  setSharePath,\n  setNarrativeState,\n  setRouteSponsorships,\n  setSearchMetadata,\n  setYpBeacons,\n  setYextBeacons,\n  setShowRoadWarriorUnit,\n  setIsPrintOpen,\n  setMobileHeadingValue,\n  setMobileHeadingVisible,\n  setMobilePanelExpandedState\n} = createActions('map.', {\n  setCenter: pointPayload,\n  initCenter: createThunk(initCenterWith, pointPayload),\n  setZoom: simplePayload,\n  initZoom: createThunk(initZoomWith, simplePayload),\n  setBounds: boundsPayload,\n  setConfirmedBounds: boundsPayload,\n  setMapCenter: pointPayload,\n  setMapZoom: simplePayload,\n  setMapCenterZoom: simplePayload,\n  initCenterZoom: createThunk(initCenterZoomWith, simplePayload),\n  setMapBounds: boundsPayload,\n\n  // initCenter: createThunk(initCenterWith, TRACE_ACTION(pointPayload, 'ACT initCenter')),\n  // initZoom: createThunk(initZoomWith, TRACE_ACTION(simplePayload, 'ACT initZoom')),\n  // initCenterZoom: createThunk(initCenterZoomWith, TRACE_ACTION(simplePayload, 'ACT initCenterZoom')),\n\n  // setConfirmedBounds: TRACE_ACTION(boundsPayload, 'ACT setConfirmedBounds'),\n  // setMapCenter: TRACE_ACTION(pointPayload, 'ACT setMapCenter'),\n  // setMapZoom: TRACE_ACTION(simplePayload, 'ACT setMapZoom'),\n  // setMapCenterZoom: TRACE_ACTION(simplePayload, 'ACT setMapCenterZoom'),\n  // setMapBounds: TRACE_ACTION(boundsPayload, 'ACT setMapBounds'),\n\n  setStyle: simplePayload,\n  markLocation: pointPayload,\n  setSearchQuery: simplePayload,\n  setSearchQueryEx: simplePayload,\n  setSearchResults: simplePayload,\n  setSearchDetails: simplePayload,\n  setSearchState: simplePayload,\n  setSearchBounds: boundsPayload,\n  searchFailed: simplePayload,\n  setOrigin: simplePayload,\n  setDestination: simplePayload,\n  setDestinationList: simplePayload,\n  setDestinationListItem: destinationPayload,\n  addDestination: simplePayload,\n  removeDestination: destinationPayload,\n  setDirectionsLoadingState: simplePayload,\n  setWereDestinationsReordered: simplePayload,\n  setCopyPasteText: simplePayload,\n  setDirections: simplePayload,\n  directionsFailed: simplePayload,\n  setCategories: simplePayload,\n  categoriesFailed: simplePayload,\n  setInfosheetMqId: simplePayload,\n  setInfosheetSlug: simplePayload,\n  setInfosheetData: simplePayload,\n  setInputFocused: simplePayload,\n  infosheetFailed: simplePayload,\n  setBizLocs: simplePayload,\n  bizLocsFailed: simplePayload,\n  setActiveBizLoc: simplePayload,\n  addRecentSearch: simplePayload,\n  removeRecentSearch: simplePayload,\n  setRecentSearches: simplePayload,\n  setPreviousMapProperties: simplePayload,\n  fetchRecentSearches: createThunk(initRecentSearchesWith, simplePayload),\n  setPredictionResults: createThunk(getPredictions, simplePayload),\n  setArePredictionsLoading: simplePayload,\n  predictionResultsFailed: simplePayload,\n  setPrintView: simplePayload,\n  setPrecisePosition: simplePayload,\n  setDropdownVisible: simplePayload,\n  setSearchActive: simplePayload,\n  setInfoSheetActive: simplePayload,\n  setActivePoiMarker: createThunk(toggleActivePoiMarker, simplePayload),\n  setRouteSettings: simplePayload,\n  setRouteOptimizationSettings: simplePayload,\n  setIsSearching: simplePayload,\n  setIsDisambiguatedSearch: simplePayload,\n  setIsTopCat: simplePayload,\n  setSearchPath: simplePayload,\n  setClickedOn: simplePayload,\n  setRouteData: simplePayload,\n  setAlternateRoutesData: simplePayload,\n  setRouteDataResponse: simplePayload,\n  setCurrentRoute: createThunk(updateCurrentRoute, simplePayload),\n  setCurrentRouteIndex: simplePayload,\n  setFuelCost: simplePayload,\n  setRedirectToInfosheet: simplePayload,\n  setMapSource: createThunk(setSource, simplePayload),\n  setMarkerState: createThunk(updateMarkerState, simplePayload),\n  setRibbonState: createThunk(updateRibbonState, simplePayload),\n  setMapAttributes: simplePayload,\n  setSharePath: simplePayload,\n  setNarrativeState: simplePayload,\n  setRouteSponsorships: simplePayload,\n  setSearchMetadata: simplePayload,\n  setYpBeacons: simplePayload,\n  setYextBeacons: simplePayload,\n  setShowRoadWarriorUnit: simplePayload,\n  setIsPrintOpen: simplePayload,\n  setMobileHeadingValue: simplePayload,\n  setMobileHeadingVisible: simplePayload,\n  setMobilePanelExpandedState: simplePayload,\n  setTopCatMetaInfo: simplePayload\n});\n\nexport const setSearchResultsPage = page => setSearchState({page});\n\nfunction toLatLng({lat, lng}) {\n  return {\n    lat: typeof lat === 'function' ? lat() : lat,\n    lng: typeof lng === 'function' ? lng() : lng\n  };\n}\n\nfunction toBounds(bounds) {\n  if (typeof bounds.east === 'number') return bounds;\n  if (typeof bounds.getNorthEast === 'function') return getLatLngBounds(bounds);\n  throw Error(`Unrecognized representation for bounds: ${bounds.toString()}`);\n}\n\nfunction getLatLngBounds(bnds) {\n  const {lat: north, lng: east} = bnds.getNorthEast(),\n    {lat: south, lng: west} = bnds.getSouthWest();\n\n  return {\n    north: typeof north === 'function' ? north() : north,\n    east: typeof east === 'function' ? east() : east,\n    south: typeof south === 'function' ? south() : south,\n    west: typeof west === 'function' ? west() : west\n  };\n}\n\nfunction initRecentSearchesWith(creator) {\n  return () => (dispatch, getState) => {\n    const {recents} = searchProps(getState());\n\n    return dispatch(creator(recents));\n  };\n}\n\nfunction initCenterWith(creator) {\n  return (lat, lng, force) => (dispatch, getState) => {\n    const state = getState(),\n      {mapCenter} = initProps(state);\n    if (force || !mapCenter) return dispatch(!lat && isNaN(lat) ? creator(mapProps(state).center) : creator(lat, lng));\n  };\n}\n\nfunction initZoomWith(creator) {\n  return (zoom, force) => (dispatch, getState) => {\n    const state = getState(),\n      {mapZoom} = initProps(state);\n    if (force || !mapZoom) return dispatch(creator(zoom || mapProps(state).zoom));\n  };\n}\n\nfunction initCenterZoomWith(creator) {\n  return (arg = {}, force) =>\n    (dispatch, getState) => {\n      const state = getState(),\n        {mapCenter, mapZoom} = initProps(state),\n        {center, zoom} = mapProps(state);\n      if (force || !mapCenter || !mapZoom) {\n        return dispatch(\n          creator({\n            center: arg.center || center,\n            zoom: arg.zoom || zoom\n          })\n        );\n      }\n    };\n}\n\nasync function predictionSearch(getState, dispatch, query) {\n  dispatch(setArePredictionsLoading(true));\n  const url = searchUrl(getState, query);\n  if (!url) {\n    dispatch(setArePredictionsLoading(false));\n    return []; //empty results\n  }\n  const response = await fetch(url);\n  dispatch(setArePredictionsLoading(false));\n  if (!response.ok) throw new Error(response.statusText);\n\n  const {results} = await response.json();\n  return results;\n}\n\nfunction getPredictions(creator) {\n  return () => async (dispatch, getState) => {\n    const {query, predictions: currentPredictions} = searchProps(getState());\n    if (query.length >= 3) {\n      const filteredPredictions = filterPredictions(currentPredictions, query);\n      dispatch(creator(filteredPredictions.length ? filteredPredictions : currentPredictions));\n\n      const results = await predictionSearch(getState, dispatch, query);\n      dispatch(\n        results.length ? creator(results) : creator(filterPredictions(searchProps(getState()).predictions, query))\n      );\n    } else {\n      dispatch(creator(searchProps(getState()).recents.filter(item => item.name.includes(query))));\n    }\n  };\n}\n\nfunction filterPredictions(predictions, query) {\n  query = query.toLowerCase();\n  return [...predictions.filter(result => result.name.toLowerCase().includes(query))];\n}\n\nfunction searchUrl(getState, query) {\n  const {lat, lng} = mapProps(getState()).center || {};\n  if (!lat && !lng) return '';\n\n  const collection = isOneOfRouteTypes(window.location.pathname, ['directions', 'routeplanner'])\n    ? DEST_COLLECTION\n    : COLLECTION;\n\n  return (\n    api.searchahead +\n    `?collection=${collection.join(',')}&feedback=true&limit=${LIMIT}&location=${\n      lng + ',' + lat\n    }&q=${encodeURIComponent(query)}`\n  );\n}\n\nfunction toggleActivePoiMarker(creator) {\n  return (newPoiIdx, bounce) => (dispatch, getState) => {\n    const oldPoiIdx = activePoiMarkerSelector(getState());\n    if (oldPoiIdx !== null && oldPoiIdx > -1) {\n      document.querySelector(`#marker-${oldPoiIdx} img`)?.classList?.remove(active);\n      document.querySelector(`#marker-${oldPoiIdx}`)?.classList?.remove(bounceCss);\n    }\n    if (newPoiIdx > -1) {\n      document.querySelector(`#marker-${newPoiIdx} img`)?.classList?.add(active);\n      if (bounce) document.querySelector(`#marker-${newPoiIdx}`)?.classList?.add(bounceCss);\n    }\n    dispatch(creator(newPoiIdx));\n  };\n}\n\nfunction setSource(creator) {\n  return ({sourceType, data}) =>\n    dispatch => {\n      dispatch(creator({[sourceType]: data}));\n    };\n}\n\nfunction updateMarkerState(creator) {\n  return ({hovered, selected, markerData}) =>\n    dispatch => {\n      const sourceTypeToData = generateMarkerSourceData({hovered, selected, markerData});\n      Object.entries(sourceTypeToData).forEach(([sourceType, data]) => {\n        dispatch(setMapSource({sourceType, data}));\n      });\n      dispatch(creator({hovered, selected, markerData}));\n    };\n}\n\nfunction updateRibbonState(creator) {\n  return ({hovered, selected, ribbonData}) =>\n    dispatch => {\n      const sourceTypeToData = generateRibbonSourceData({hovered, selected, ribbonData});\n      Object.entries(sourceTypeToData).forEach(([sourceType, data]) => {\n        dispatch(setMapSource({sourceType, data}));\n      });\n      dispatch(creator({hovered, selected, ribbonData}));\n    };\n}\n\nfunction updateCurrentRoute() {\n  return index => (dispatch, getState) => {\n    const routeDataResponse = directionsProps(getState()).routeDataResponse;\n\n    // is it even valid route?\n    if (!routeDataResponse || !routeDataResponse.route) return;\n\n    const selectedRouteData = index === 0 ? routeDataResponse : routeDataResponse.route.alternateRoutes[index - 1],\n      routes = routeDataResponse.route.alternateRoutes\n        ? [routeDataResponse.route, ...routeDataResponse.route.alternateRoutes.map(r => r.route)]\n        : [routeDataResponse.route],\n      alternateRoutes = [...routes];\n    alternateRoutes.splice(index, 1);\n\n    dispatch(setCurrentRouteIndex(index));\n    dispatch(setRouteData(selectedRouteData));\n    dispatch(setAlternateRoutesData(alternateRoutes));\n  };\n}\n","export default class MQLocation {\n  static getDisplayName({street, adminArea5, adminArea3, postalCode, adminArea1}) {\n    return [street, adminArea5, adminArea3, postalCode, adminArea1]\n      .filter(part => {\n        return part && part != 'US';\n      })\n      .join(', ');\n  }\n\n  static createFromSearchAheadResult(source) {\n    if (!source) return {};\n\n    const {place: {geometry: {coordinates = null} = {}, properties = {}} = {}} = source;\n\n    return {\n      latLng: coordinates ? {lat: coordinates[1], lng: coordinates[0]} : null,\n      adminArea5: source.adminArea5 || properties.city,\n      adminArea4: source.adminArea4 || properties.county,\n      adminArea3: source.adminArea3 || properties.stateCode,\n      adminArea1: source.adminArea1 || properties.countryCode,\n      street: source.street || properties.street,\n      postalCode: source.postalCode || properties.postalCode,\n      state: source.state || properties.state || null,\n      country: source.country || properties.country || null,\n      slug: source.slug\n    };\n  }\n\n  static createFromMQPlaceResult(source) {\n    if (!source) return {};\n\n    return {\n      latLng: source.latLng,\n      adminArea5: source.address?.locality,\n      adminArea3: source.address?.region,\n      adminArea1: source.address?.country,\n      street: source.address?.address1,\n      postalCode: source.address?.postalCode,\n      slug: source.slug\n    };\n  }\n\n  static createFromDisambiguationResult(source) {\n    if (!source) return {};\n\n    return {\n      latLng: {lat: source.location?.lat, lng: source.location?.lng},\n      adminArea5: source.address?.locality,\n      adminArea3: source.address?.region,\n      adminArea1: source.address?.country,\n      street: source.address?.address1,\n      postalCode: source.address?.postalCode,\n      slug: source.slug\n    };\n  }\n\n  static createFromLocationsResult(source) {\n    if (!source) return {};\n\n    return {\n      adminArea1: source.adminArea1 ?? null,\n      adminArea3: source.adminArea3 ?? null,\n      adminArea4: source.adminArea4 ?? null,\n      adminArea5: source.adminArea5 ?? null,\n      postalCode: source.postalCode ?? null,\n      street: source.street ?? null,\n      latLng: source.latLng ?? null,\n      slug: source.slug\n    };\n  }\n\n  static createFromReverseGeocodingResult(source) {\n    if (!source) return {};\n    const {\n      result: {slug, latLng, address}\n    } = source;\n\n    return {\n      latLng: {lat: latLng.lat, lng: latLng.lng},\n      adminArea5: address.adminArea5,\n      adminArea3: address.adminArea3,\n      adminArea1: address.adminArea1,\n      postalCode: address.postalCode,\n      street: address.street,\n      state: address.adminArea3,\n      country: address.adminArea1,\n      slug\n    };\n  }\n\n  static createFromImportResult(result) {\n    return {\n      adminArea1: result.adminArea1 ?? null,\n      adminArea3: result.adminArea3 ?? null,\n      adminArea4: result.adminArea4 ?? null,\n      adminArea5: result.adminArea5 ?? null,\n      postalCode: result.postalCode ?? null,\n      street: result.street ?? null,\n      latLng: result.latLng ?? null,\n      slug: result.slug\n    };\n  }\n}\n","import MQLocation from './MQLocation';\n\nconst getIdFromSearchAheadResult = ({id}) => /^mqId:(?<mqid>.*)$/.exec(id)?.groups?.mqid;\nconst getIdFromLocationsResult = ({id}) => id;\nconst getIdFromDisambiguationResult = ({mqId}) => mqId;\nconst isAdminArea = ({collection = []}) => collection.includes('adminArea');\n\nexport default class Destination {\n  static createFromSearchAheadResult(source) {\n    if (!source) return {};\n\n    return {\n      name: source.name,\n      collection: source.collection,\n      recordType: source.recordType,\n      id: getIdFromSearchAheadResult(source),\n      location: MQLocation.createFromSearchAheadResult(source)\n    };\n  }\n\n  static createFromMQPlaceResult(source) {\n    if (!source) return {};\n\n    return {\n      name: source.name,\n      id: getIdFromDisambiguationResult(source),\n      location: MQLocation.createFromMQPlaceResult(source),\n      '@adparameters': source?.['@adparameters'] ? source['@adparameters'] : []\n    };\n  }\n\n  static createFromDisambiguationResult(source) {\n    if (!source) return {};\n\n    return {\n      name: source.name,\n      id: getIdFromDisambiguationResult(source),\n      location: MQLocation.createFromDisambiguationResult(source)\n    };\n  }\n\n  static createFromReverseGeocodingResult(source) {\n    return {\n      name: source?.result?.address?.street,\n      location: MQLocation.createFromReverseGeocodingResult(source)\n    };\n  }\n\n  static createFromLocationsResult(source) {\n    const {notes, query, street, error} = source;\n\n    if (error) {\n      return {query, error, note: notes};\n    }\n    return {\n      name: MQLocation.getDisplayName(source),\n      street,\n      id: getIdFromLocationsResult(source),\n      location: MQLocation.createFromLocationsResult(source),\n      query,\n      note: notes\n    };\n  }\n\n  static createFromImportResult(result) {\n    const {notes, query, street} = result;\n    if (query) {\n      return {query, note: notes};\n    } else {\n      return {\n        name: MQLocation.getDisplayName(result),\n        street,\n        location: MQLocation.createFromImportResult(result),\n        note: notes\n      };\n    }\n  }\n\n  static createFromQuery(query) {\n    return {\n      query\n    };\n  }\n\n  static isDisplayValueFromQuery(destination) {\n    const {id, name, query, collection, recordType} = destination;\n    if ((id && !isAdminArea(destination)) || (!collection && !recordType && name)) return false;\n    if (query) return true;\n    return false;\n  }\n\n  static getDisplayValue(destination) {\n    const {id, name, query, location, recordType, collection} = destination;\n\n    if ((id && !isAdminArea(destination)) || (!collection && !recordType && name)) return name;\n    if ((recordType === 'category' || recordType === 'franchise') && name) return name;\n    if (query) return query;\n    if (!location) return '';\n\n    if (isAdminArea(destination)) {\n      return this.getAdminAreaDisplayName({...location, recordType: recordType});\n    }\n\n    // if(!destination.collection && !destination.recordType && name) return name;\n    const {street, adminArea5, adminArea3, postalCode, adminArea1} = location;\n    return [street, adminArea5, adminArea3, this.excludeUSCountryCode(adminArea1)]\n      .filter(part => part)\n      .join(', ')\n      .concat(postalCode ? ' ' + postalCode : '');\n  }\n\n  static getAdminAreaDisplayName({street, adminArea5, adminArea3, postalCode, adminArea1, recordType, state, country}) {\n    let order = '';\n    switch (recordType) {\n      case 'postalCode':\n        order = [postalCode, adminArea5, adminArea3, this.excludeUSCountryCode(adminArea1)];\n        break;\n      case 'city':\n        order = [adminArea5, adminArea3, this.excludeUSCountryCode(adminArea1)];\n        break;\n      case 'state':\n        order = [state, adminArea1];\n        break;\n      case 'country':\n        order = [country];\n        break;\n      default:\n        order = [street, adminArea5, adminArea3, postalCode, this.excludeUSCountryCode(adminArea1)];\n        break;\n    }\n\n    return order.filter(part => part).join(', ');\n  }\n\n  static excludeUSCountryCode(countryCode) {\n    return countryCode != 'US' && countryCode;\n  }\n}\n","import React, {useEffect, useState, forwardRef} from 'react';\nimport {useSelector, useDispatch} from 'react-redux';\nimport {showRoadWarriorUnitSelector} from '../../model/selectors';\nimport {setShowRoadWarriorUnit} from '../../model/actions';\nimport {trackAction} from 'gtm.service';\nimport {rwPopUp, rwCtaTxt, rwCtaOpacity, mobileHeader} from './road-warrior-cta.scss';\nimport {Popup} from '../../../extra';\n\nconst RW_CTA_HIDE_TIME = 24 * 1000 * 3600; // Time to hide cta since last time closed (24 hours)\n\nexport default forwardRef(({isRoutePlanner = false, isMobile}, ref) => {\n  const placement =\n    isRoutePlanner && isMobile\n      ? 'routeplanner_lightbox_mobile'\n      : !isRoutePlanner && isMobile\n      ? 'directions_lightbox_mobile'\n      : !isRoutePlanner && !isMobile\n      ? 'directions_lightbox_desktop'\n      : 'routeplanner_lightbox_desktop',\n    deepLink = `https://try.roadwarrior.app/mapquestoffer?utm_medium=native&utm_source=mapquest&utm_campaign=${placement}`,\n    showRoadWarriorUnit = useSelector(showRoadWarriorUnitSelector),\n    dispatch = useDispatch();\n\n  const trackRoadWarriorAction = (isClick = true) => {\n    const action = isClick ? 'click' : 'impression';\n    trackAction(action, 'roadwarrior', {'target-properties': placement});\n  };\n\n  const hideRoadWarriorUnit = () => {\n    dispatch(setShowRoadWarriorUnit(false));\n\n    const now = new Date().getTime();\n    let closedRoadWarriorCTA = localStorage.getItem('closedRoadWarriorCTA');\n    if (!closedRoadWarriorCTA) closedRoadWarriorCTA = {directions: null, routePlanner: null};\n    else closedRoadWarriorCTA = JSON.parse(closedRoadWarriorCTA);\n\n    if (isRoutePlanner) closedRoadWarriorCTA.routePlanner = now;\n    else closedRoadWarriorCTA.directions = now;\n\n    localStorage.setItem('closedRoadWarriorCTA', JSON.stringify(closedRoadWarriorCTA));\n  };\n\n  const [showFullOpacity, setShowFullOpacity] = useState(false);\n\n  const content = () => {\n    return (\n      <div className={\n        rwPopUp +\n        (showFullOpacity ? ' ' +  rwCtaOpacity : '')\n      }\n        data-testid=\"road-warrior-cta\"\n      >\n        {isMobile &&\n          <div className={mobileHeader}>\n            <p>Save up to 13 driving hours each week!</p>\n            <img src=\"https://static.mqcdn.com/yogi-cdn/phoenix/roadwarrior/rw-mobile-cta.webp\" />\n          </div>\n        }\n        {!isMobile && <img src=\"https://static.mqcdn.com/yogi-cdn/phoenix/roadwarrior/rw-desktop-cta.webp\" /> }\n        <div className={rwCtaTxt}>\n          <p>Try <b>RoadWarrior</b> <i>by MapQuest</i> - the pro driver's secret weapon.</p>\n          <a role=\"button\" target=\"_blank\" href={deepLink} onClick={(() => trackRoadWarriorAction())}>\n            Try RoadWarrior for FREE\n          </a>\n        </div>\n        <span onClick={() => hideRoadWarriorUnit()}><i className=\"icon-x\" ></i></span>\n      </div>\n    );\n  };\n\n  useEffect(() => {\n    trackRoadWarriorAction(false);\n    setShowFullOpacity(true);\n\n    let closedRoadWarriorCTA = localStorage.getItem('closedRoadWarriorCTA');\n    if (!!closedRoadWarriorCTA) {\n      closedRoadWarriorCTA = JSON.parse(closedRoadWarriorCTA);\n      const currentTime = new Date().getTime(),\n        pageCloseAt = isRoutePlanner ? closedRoadWarriorCTA.routePlanner : closedRoadWarriorCTA.directions;\n      let timeToShowAgain = currentTime;\n\n      if (pageCloseAt) {\n        timeToShowAgain = Number(pageCloseAt) + RW_CTA_HIDE_TIME;\n      }\n\n      const showAgain = currentTime >= timeToShowAgain ? true : false;\n      if (showAgain) {\n        if (isRoutePlanner) closedRoadWarriorCTA.routePlanner = null;\n        else closedRoadWarriorCTA.directions = null;\n        localStorage.setItem('closedRoadWarriorCTA', JSON.stringify(closedRoadWarriorCTA));\n        dispatch(setShowRoadWarriorUnit(true));\n      } else {\n        dispatch(setShowRoadWarriorUnit(false));\n      }\n    }\n  }, []);\n\n  return showRoadWarriorUnit && (isMobile ? content() : <Popup overlay>{content()}</Popup>);\n});\n","import React from 'react';\n\nimport {mqSearchActions, iconButton} from './styles.scss';\n\nexport default ({query, connection, showClearButton, onClear, onSubmit}) => {\n  const hasContent = () => {\n    return !!query;\n  };\n\n  const onClearClick = e => {\n    e.stopPropagation();\n    onClear && onClear();\n  };\n\n  return (\n    <div className={mqSearchActions} data-show-clear={hasContent()} data-connection={connection}>\n      {showClearButton && hasContent() ? (\n        <button className={iconButton} type=\"reset\" key=\"clear\" aria-label=\"Clear\" onClick={onClearClick}>\n          <i className=\"icon-close\"></i>\n        </button>\n      ) : (\n        <button\n          className={iconButton}\n          type=\"submit\"\n          key=\"search\"\n          aria-label=\"Search MapQuest\"\n          onClick={e => onSubmit(e)}\n        >\n          <i className=\"icon-search\"></i>\n        </button>\n      )}\n    </div>\n  );\n};\n","import React from 'react';\nimport {spinner, loadingDimmed} from './spinner.scss';\n\nconst Spinner = ({className = ''}) => {\n  return (\n    <svg\n      className={`${spinner} ${className}`} /* width={size} height={size} stroke={color} */\n      viewBox=\"0 0 38 38\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n    >\n      <g fill=\"none\" fillRule=\"evenodd\">\n        <g transform=\"translate(1 1)\" strokeWidth=\"2\">\n          <circle strokeOpacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\" />\n          <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n            <animateTransform\n              attributeName=\"transform\"\n              type=\"rotate\"\n              from=\"0 18 18\"\n              to=\"360 18 18\"\n              dur=\"1s\"\n              repeatCount=\"indefinite\"\n            />\n          </path>\n        </g>\n      </g>\n    </svg>\n  );\n};\n\nexport const ButtonWithSpinner = ({dataCy = '', spinnerActive, children, ...props}) => {\n  return (\n    <button data-testid={dataCy} data-cy={dataCy} data-spinner-active={spinnerActive} disabled={spinnerActive} {...props}>\n      {!spinnerActive && children}\n      {spinnerActive && <Spinner />}\n    </button>\n  );\n};\n\nexport default Spinner;\nexport {loadingDimmed as loadingDimmedClass};\n","import React, {useEffect, useRef, Fragment} from 'react';\nimport {connect, useDispatch, useSelector} from 'react-redux';\nimport {normalizeQuery, navigate} from 'url-utils';\nimport {debounce} from 'timer-utils';\nimport {searchahead} from 'config';\n\nimport {searchProps} from '../../model/selectors';\nimport {setSearchQuery, setIsSearching, setIsTopCat, setInputFocused} from '../../model/actions';\n\nimport SearchIcons from './SearchIcons';\n\nimport {searchInputForm, searchInput, searchInputSpinner, searchInputSpinnerContainer} from './styles.scss';\nimport Spinner from '../spinner';\n\n// Usage Notes\" set data-attr to 'true' to include in input\n// Options:\n// hamburger, searchIcons,\n// ex. <SearchInput hamburger={\"true\"} ></SearchInput>\n\nconst SearchInput = connect(searchProps)(\n  ({\n    dropdownVisible,\n    errorMessage,\n    handleClick,\n    handleOnKeyDown,\n    isInvalid,\n    isSearch = true,\n    onBlur,\n    onInputClick,\n    onInputClear,\n    onQueryChange,\n    onSubmit,\n    placeholderText,\n    name,\n    searchIcons,\n    setDropdownVisible,\n    shouldValidate = false,\n    showClearButton = false,\n    spinnerActive = false,\n    setCurrentDestinationBox,\n    index,\n    validateInput,\n    value\n  }) => {\n    const\n      inputBox = useRef(null),\n      dispatch = useDispatch();\n    const {query, arePredictionsLoading, isSearching, predictions, inputFocused} = useSelector(searchProps);\n\n    useEffect(() => {\n      if (query && !isSearching && !arePredictionsLoading && validateInput) validateInput();\n    }, [predictions, inputFocused]);\n\n    const setWindowScrollTop = () => {\n      // On iOS the keyboard pushes the window up when it's opened.\n      // This function checks the top scroll position and sets it back to 0 given the case.\n      const doc = document.documentElement;\n      const top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n      const retryMillisecs = 100;\n      const maxTime = 1500; // Maximum amount of time to check if the keyboard moved the window\n      let time = 0;\n      if (top > 0) {\n        window.scrollTo(0, 0);\n      } else {\n        if (time < maxTime) {\n          setTimeout(setWindowScrollTop, retryMillisecs);\n          time += retryMillisecs;\n        }\n      }\n    };\n\n    const onClick = e => {\n      if (e.detail === 2) e.target.select();\n      onInputClick && onInputClick();\n\n      setWindowScrollTop();\n    };\n\n    const onFocus = e => {\n      setTimeout(() => e.target.select(), 10);\n\n      handleClick && handleClick(e);\n      dispatch(setSearchQuery(value));\n\n      dispatch(setInputFocused(true)); // opens mobile search input modal\n      if (setCurrentDestinationBox) setCurrentDestinationBox(index);\n\n      if (!dropdownVisible) {\n        setDropdownVisible(true);\n      }\n    };\n\n    const onKeyDown = e => {\n      const {key, keyCode} = e;\n      if (!e.target.value) return\n\n      // prevent scroll down\n      if (key === 'ArrowDown') e.preventDefault();\n      // close mobile keyboard on submit\n      if (key === 'Enter' || keyCode === 13) {\n        if (predictions.isTopCat) {\n          dispatch(setIsTopCat(false));\n        }\n\n        e.target.blur();\n        dispatch(setIsSearching(isSearch));\n        onQueryChange && onQueryChange(e.target.value);\n        navigate('/search/' + encodeURIComponent(normalizeQuery(e.target.value)));\n        onSubmit && onSubmit(e);\n      }\n      handleOnKeyDown && handleOnKeyDown(key);\n    };\n\n    const onChange = debounce(e => {\n      if (!dropdownVisible) {\n        setDropdownVisible(true);\n      }\n      onQueryChange(e.target.value);\n    }, searchahead?.debounce || 100);\n\n    const onClear = () => {\n      onQueryChange('');\n      onInputClear && onInputClear();\n    };\n\n    useEffect(() => {\n      if (inputBox.current && value !== inputBox.current.value) {\n        inputBox.current.value = value;\n      }\n    }, [value, inputBox.current]);\n\n    useEffect(() => {\n      if (\n        inputFocused &&\n        dropdownVisible &&\n        document.activeElement.name != 'mobile-search-input' &&\n        document.activeElement.name != 'main-search-input'\n      ) {\n        // The following line - inputBox.current.focus(); - causes a bug on\n        // Safari/Webkit where the map is not rendered correctly and the\n        // scroll present issues. There's a workaround for it below.\n        inputBox.current.focus();\n        window.scrollTo(0, 0);\n        document.body.scrollTop = 0;\n\n        // Force a repaint of the map container because of a Safari/Webkit\n        // rendering bug. Run the code inside a timeout to execute the repaint\n        // after the above lines.\n        // Ref: https://stackoverflow.com/a/3485654\n        setTimeout(() => {\n          const mapEl = document.getElementsByClassName('map-box')[0];\n          if (mapEl) {\n            mapEl.style.display = 'none';\n            mapEl.offsetHeight; // no need to store this anywhere, the reference is enough\n            mapEl.style.display = '';\n          }\n        });\n      }\n    }, [inputFocused, dropdownVisible]);\n\n    return (\n      <Fragment>\n        <form className={searchInputForm} data-cy=\"search-input-form\" onSubmit={onSubmit}>\n          {shouldValidate && isInvalid && <span>{errorMessage() || 'Please enter a valid address'}</span>}\n          <label htmlFor={name ? name : 'main-search-input'} className=\"sr-only\">\n            {name ? name : 'Search MapQuest'}\n          </label>\n          <input\n            type=\"text\"\n            name={name ? name : 'main-search-input'}\n            id={name ? name : 'main-search-input'}\n            data-testid={name ? name : 'main-search-input'}\n            className={searchInput}\n            defaultValue={value}\n            onBlur={onBlur}\n            onChange={onChange}\n            onKeyDown={onKeyDown}\n            onClick={onClick}\n            onMouseDown={e => e.stopPropagation()}\n            placeholder={placeholderText || 'Search MapQuest'}\n            onFocus={onFocus}\n            ref={inputBox}\n            autoComplete=\"off\"\n            spellCheck=\"false\"\n          />\n          {spinnerActive && (\n            <div className={searchInputSpinnerContainer}>\n              <Spinner className={searchInputSpinner} />\n            </div>\n          )}\n\n          {searchIcons && <SearchIcons showClearButton={showClearButton} onClear={onClear} onSubmit={onSubmit} query={value} />}\n        </form>\n      </Fragment>\n    );\n  }\n);\n\nexport default SearchInput;\n","import {select, at} from 'morass/traverse';\nimport {addReducer, createActions, inSlice, sharedExtra, selectorFactory} from 'morass';\nimport {createSelector} from 'reselect';\nimport {provider} from 'config';\n\nconst {search: apiProvider = 'MQ'} = provider;\n\n// FIXME: may eventually wrap it in a React context object to support multiple maps\nconst sharedState = sharedExtra(() => {\n  addReducer(\n    inSlice(mapSlice).on(setSharedMap)(prev => prev + 1),\n    inSlice(mapSlice).on(removeSharedMap)(prev => prev - 1),\n    inSlice(searchProviderSlice).on(addSearchProvider)((list, add) => (list.indexOf(add) < 0 ? [...list, add] : list))\n  );\n  return {searchProviders: {}, maps: {}};\n});\n\nconst mapSlice = at((state, {mapId}) => (state.sharedState.maps[mapId] = 0)),\n  searchProviderSlice = at(state => (state.search.providers = []));\n\nexport const sharedMap = selectorFactory(\n  select(mapSlice),\n  (_, {mapId}) => sharedState().maps[mapId],\n  (_, map) => map\n);\n\nexport const searchProvider = createSelector(\n  select(searchProviderSlice),\n  () => sharedState().searchProviders,\n  (registered, providers) => providers[apiProvider] || providers[registered[0]]\n);\n\nexport const {setSharedMap, removeSharedMap, addSearchProvider} = createActions('map.', {\n  setSharedMap(map, mapId = 'primary') {\n    sharedState().maps[mapId] = map;\n    return {mapId};\n  },\n  removeSharedMap(mapId) {\n    delete sharedState().maps[mapId];\n    return {mapId};\n  },\n  addSearchProvider(name, action) {\n    // NOTE: cannot modify in-place because searchProvider() selector has to be invalidated\n    sharedState().searchProviders = {...sharedState().searchProviders, [name]: action};\n    return name;\n  }\n});\n","import {addTrigger, sharedExtra} from 'morass';\nimport {createSelector} from 'reselect';\n\nimport {searchProvider} from '../shared';\nimport {searchState, mapProps} from './selectors';\nimport {setSearchState, setSearchBounds, setPreviousMapProperties} from './actions';\nimport {debounce} from 'timer-utils';\n\nconst search = autoOrPage => {\n  return (dispatch, getState) => {\n    const {automatic, inprogress, pending} = searchState(getState()),\n      auto = (typeof autoOrPage == 'boolean' && autoOrPage) || false,\n      page = (typeof autoOrPage == 'number' && !isNaN(autoOrPage) && +autoOrPage) || 0;\n\n    const performSearch = debounce(() => {\n      dispatch(setSearchState({inprogress: true, automatic: auto, pending: false, page}));\n      dispatch(searchProvider(getState())(page)).catch(error => {\n        console.error(error);\n        window.newrelic?.noticeError(error);\n      });\n    }, 300)\n\n    if (!inprogress) {\n      performSearch()\n    } else if (!pending || (!auto && automatic)) {\n      dispatch(setSearchState({pending: true, automatic: automatic && auto}));\n    }\n  };\n};\n\nsharedExtra(() => {\n  addTrigger(searchState, ({pending, inprogress}, {inprogress: wasInProgress} = {}) => (dispatch, getState) => {\n    if (!inprogress && wasInProgress && pending) {\n      dispatch(setSearchState({pending: false, page: 0, inprogress: true}));\n      dispatch(searchProvider(getState())());\n    }\n  });\n\n  addTrigger(\n    createSelector(mapProps, searchState, ({bounds, confirmedBounds}, {inprogress}) => [\n      confirmedBounds && !inprogress,\n      bounds\n    ]),\n    ([searchComplete, bounds], [searchWasComplete] = []) =>\n      (dispatch, getState) => {\n        if (searchComplete && !searchWasComplete) {\n          const {zoom, center} = mapProps(getState());\n          dispatch(setSearchBounds(bounds));\n          dispatch(setPreviousMapProperties({bounds, zoom}));\n\n          if (bounds && zoom && center) {\n            window.history.replaceState({bounds, zoom, center}, null, window.location);\n          }\n        }\n      }\n  );\n})();\n\nexport default search;\n","import React from 'react';\nimport {searchAheadItem, searchAheadMeta, searchAheadData} from './styles.scss';\nimport {centerFlexColumn} from '../../../styles/utilities.scss';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {useMobileCheck} from 'event-hooks';\nimport {\n  addRecentSearch,\n  removeRecentSearch,\n  setSearchQueryEx,\n  setSearchQuery,\n  setSearchResults,\n  setClickedOn,\n  setIsTopCat,\n  setInputFocused,\n  setIsSearching\n} from '../../model/actions';\nimport search from '../../model/search';\nimport {searchProps} from '../../model/selectors';\nimport {normalizeQuery, navigate} from 'url-utils';\n\nconst SearchAheadItem = ({\n  result = {},\n  editMode = false,\n  index,\n  isDestinationInput,\n  onSearchSelected,\n  setDropdownVisible,\n  className,\n  showIcon = true\n}) => {\n  const hideTitlesForRecordTypes = ['address'],\n    dispatch = useDispatch(),\n    {name = '', place = {}, address = {}, recent, recordType = ''} = result,\n    order = ['address1', 'street', 'address2', 'locality', 'city', 'region', 'stateCode', 'postalCode'], // We can put all of them in the same order array since the two formats should never exist together\n    parsedAddress = getAddress(),\n    {isSearching, query, isTopCat} = useSelector(searchProps),\n    isMobile = useMobileCheck();\n\n  function getAddress() {\n    let addressProps = place?.properties || address;\n    let addressStr = [];\n\n    order.map(key => {\n      if (addressProps.hasOwnProperty(key)) addressStr.push(addressProps[key]);\n    });\n\n    return addressStr.join(', ');\n  }\n\n  const handleClick = () => {\n    if (editMode) {\n      dispatch(removeRecentSearch(index));\n    } else {\n      if (isSearching && !isDestinationInput) {\n        if (result.slug || result.mqId) {\n          if (isTopCat) dispatch(setIsTopCat(false));\n          window.location.assign(result.slug);\n          dispatch(setSearchResults([]));\n        } else {\n          if (isTopCat) {\n            dispatch(setIsTopCat(false));\n            navigate('/search/' + encodeURIComponent(normalizeQuery(result.name)));\n          } else doSearch();\n        }\n      }\n\n      if (result?.recordType && result?.recordType !== 'category') {\n        onSearchSelected(result);\n        dispatch(setClickedOn('searchAhead'));\n        dispatch(setSearchQuery(result.name));\n        dispatch(addRecentSearch(result));\n      }\n      // get suggestions\n      else dispatch(setSearchQueryEx({ query: result.name, isInternal: true }));\n      if (!isDestinationInput && setDropdownVisible) setDropdownVisible(false);\n\n      if (isMobile) {\n        dispatch(setInputFocused(false));\n      }\n    }\n  };\n\n  const doSearch = () => {\n    dispatch(setIsSearching(true));\n    dispatch(setSearchQuery(result.name));\n    navigate('/search/' + encodeURIComponent(normalizeQuery(result.name)));\n    dispatch(search());\n  };\n\n  const dimNameUnmatchedText = (text, match) => {\n    const matchedIndex = text.toLowerCase().indexOf(match.toLowerCase());\n    if (matchedIndex === -1) return <span>{text}</span>;\n    const words = [];\n    words.push(text.substr(0, matchedIndex));\n    words.push(text.substr(matchedIndex, match.length));\n    words.push(text.substr(matchedIndex + match.length));\n    return words.map((word, idx) => (\n      <span key={`${word}_${idx}`} className={word.toLowerCase() === match.toLowerCase() ? 'highlight' : 'dim'}>\n        {word}\n      </span>\n    ));\n  };\n\n  return (\n    <li\n      tabIndex={-1}\n      data-cy={`search-ahead-item-${index}`}\n      className={className || searchAheadItem}\n      onClick={handleClick}\n    >\n      <div className={searchAheadMeta}>\n        {showIcon && editMode ? (\n          <i aria-label=\"Delete Search Result\" className=\"icon-minus-inverse\"></i>\n        ) : recent ? (\n          <i aria-label=\"Select Search Result\" className=\"icon-recents\"></i>\n        ) : (\n          <svg className=\"nav-pin\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 21 24\">\n            <path\n              fillRule=\"evenodd\"\n              clipRule=\"evenodd\"\n              d=\"M0.666748 9.82049C0.666748 4.72248 5.10659 0.333313 10.5834 0.333313C16.0602 0.333313 20.5001 4.72248 20.5001 9.82049C20.5001 11.5314 20.056 13.1406 18.5718 15.2051C17.2833 16.9975 10.5834 23.6666 10.5834 23.6666C10.5834 23.6666 3.88354 16.9975 2.59499 15.2051C1.11084 13.1406 0.666748 11.5314 0.666748 9.82049ZM10.5001 16.8919C14.1 16.8919 17.0001 13.9621 17.0001 10.3705C17.0001 6.77897 14.1 3.8491 10.5001 3.8491C6.90012 3.8491 4.00008 6.77897 4.00008 10.3705C4.00008 13.9621 6.90012 16.8919 10.5001 16.8919ZM14.8263 10.3705C14.8263 12.7716 12.8894 14.7181 10.5001 14.7181C8.11079 14.7181 6.17389 12.7716 6.17389 10.3705C6.17389 7.9694 8.11079 6.02291 10.5001 6.02291C12.8894 6.02291 14.8263 7.9694 14.8263 10.3705Z\"\n              fill=\"var(--color-neutrals-600)\"\n              shapeRendering=\"optimizeQuality\"\n            />\n          </svg>\n        )}\n        <div className={`${centerFlexColumn} ${searchAheadData}`}>\n          {!hideTitlesForRecordTypes.includes(recordType) && (\n            <span className={'name' + (recent ? ' recent' : '')}>\n              {recent ? name : dimNameUnmatchedText(name, query)}\n            </span>\n          )}\n          <span className=\"address\">{parsedAddress}</span>\n        </div>\n      </div>\n    </li>\n  );\n};\n\nexport default SearchAheadItem;\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {searchProps} from '../../model/selectors';\nimport {disambiguationContainer, disambiguationMessage, iconMsg} from './styles.scss';\n\nconst DisambiguationBubble = ({query, results}) => {\n  const {inProgress} = useSelector(searchProps);\n\n  if (inProgress) return null;\n\n  return (\n    <li className={disambiguationContainer}>\n      <div className={disambiguationMessage}>\n        {results ? (\n          <p>\n            Here are some results for: <b>{query}</b>\n          </p>\n        ) : query ? (\n          <p className={iconMsg}>\n            <i></i>\n            We can't find any place that matches <b>{query}</b>\n          </p>\n        ) : null}\n      </div>\n    </li>\n  );\n};\n\nexport default DisambiguationBubble;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {useSelector, useDispatch} from 'react-redux';\nimport {searchProps} from '../../model/selectors';\nimport {setIsDisambiguatedSearch} from '../../model/actions';\nimport {disambiguationFooter} from './styles.scss';\nimport {navigate, normalizeQuery} from 'url-utils';\n\nconst DisambiguationFooter = ({query, results}) => {\n  const dispatch = useDispatch();\n  const {inProgress} = useSelector(searchProps);\n\n  const handleOnClick = () => {\n    dispatch(setIsDisambiguatedSearch(false));\n    navigate('/search/' + encodeURIComponent(normalizeQuery(query)));\n  };\n\n  if (inProgress) return null;\n  return (\n    <div className={disambiguationFooter}>\n      <div>\n        {results ? (\n          <span>Not finding what you're looking for?</span>\n        ) : (\n          query && <span className=\"spelling\">Please check the spelling</span>\n        )}\n      </div>\n      {results ? (\n        <div>\n          <a onClick={handleOnClick}>\n            See all results for \"{query}\"\n          </a>\n        </div>\n      ) : null}\n    </div>\n  );\n};\n\nDisambiguationFooter.propTypes = {\n  query: PropTypes.string,\n  results: PropTypes.number\n};\n\nexport default DisambiguationFooter;\n","import React from 'react';\nimport {noBorder} from '../../../styles/utilities.scss';\nimport {saIconButton, error} from './styles.scss';\n\nexport default function RecentSearchesHeader({\n  className,\n  chooseLocationEnabled,\n  isLocationError = false,\n  // isEditMode,\n  // onDeleteAll,\n  // onDone,\n  // onEdit,\n  onCurrentLocation\n}) {\n\n  return (\n    <div className={className}>\n      {chooseLocationEnabled && (\n        <button\n          data-cy=\"my-location-btn\"\n          className={`${noBorder} ${saIconButton} ${isLocationError ? error : ''}`}\n          onClick={onCurrentLocation}\n        >\n          <i aria-hidden=\"true\" className={`${!isLocationError ? 'icon-crosshairs' : 'icon-crosshairs-disabled'}`}></i>\n          <span>{!isLocationError ? 'My location' : \"Couldn't find you. Try again.\"}</span>\n        </button>\n      )}\n      {/* <div className={searchAheadHeaders}>\n        <h3>{t('Recent')}</h3>\n        {isEditMode ? (\n          <div>\n            <button\n              className={`${noPadding} ${noBorder} ${recentsButton}`}\n              aria-label={t('Delete All')}\n              onClick={onDeleteAll}\n            >\n              {t('Delete All')}\n            </button>\n            <button className={`${noPadding} ${noBorder} ${recentsButton}`} aria-label={t('Done')} onClick={onDone}>\n              {t('Done')}\n            </button>\n          </div>\n        ) : (\n          <button className={`${noPadding} ${noBorder} ${recentsButton}`} onClick={onEdit}>\n            {t('Edit')}\n          </button>\n        )}\n      </div> */}\n    </div>\n  );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport './styles.scss';\n\nconst SearchAheadCategoryItem = ({className, onClick, icon, displayValue, hasBorder = false, extraStyles}) => {\n  const iconStyle = {\n    color: `${icon.color}`,\n    ...extraStyles?.i\n  };\n  return (\n    <li\n      tabIndex={0}\n      onClick={onClick}\n      className={`${className ? className : ''} search-ahead-category ${hasBorder ? 'search-ahead-border-top' : ''}`}\n    >\n      <div>\n        <i className={icon.name} style={iconStyle} />\n        <span>{displayValue}</span>\n      </div>\n    </li>\n  );\n};\n\nSearchAheadCategoryItem.propTypes = {\n  icon: PropTypes.shape({\n    name: PropTypes.string,\n    color: PropTypes.string\n  }),\n  displayValue: PropTypes.string,\n  hasBorder: PropTypes.bool\n};\n\nexport default SearchAheadCategoryItem;\n","import React from 'react';\nimport {useDispatch} from 'react-redux';\nimport {trackAction} from '../../../lib/gtm.service';\nimport {navigate, normalizeQuery} from '../../../lib/url-utils';\nimport search from '../../model/search';\nimport {\n  setInfoSheetActive,\n  setInfosheetData,\n  setInfosheetMqId,\n  setInfosheetSlug,\n  setIsDisambiguatedSearch,\n  setIsSearching,\n  setSearchQuery,\n  setInputFocused\n} from '../../model/actions';\nimport {getPage} from '../../utilities';\nimport SearchAheadCategoryItem from './SearchAheadCategoryItem';\n\nconst SearchAheadCategories = ({className, setDropdownVisible}) => {\n  if (['directions', 'routeplanner'].includes(getPage(location.pathname))) return;\n\n  const dispatch = useDispatch();\n\n  const categoryItems = [\n    {\n      onClick: () => {\n        setDropdownVisible(false);\n        trackAction('search-ahead-directions-clicked', 'search_suggestions');\n        navigate('/directions');\n        dispatch(setInputFocused(false));\n      },\n      className: `${className} search-ahead-category-directions`,\n      icon: {\n        name: 'icon-logo-directions',\n        color: 'var(--color-primary-600)'\n      },\n      displayValue: 'Get directions',\n      hasBorder: true\n    },\n    {\n      onClick: () => handleCategoryClick('Restaurants'),\n      className,\n      icon: {\n        name: 'icon-food-fork',\n        color: '#EE8500'\n      },\n      displayValue: 'Restaurants',\n      hasBorder: true\n    },\n    {\n      onClick: () => handleCategoryClick('Shopping'),\n      className,\n      icon: {\n        name: 'icon-shopping-tag',\n        color: '#754293'\n      },\n      displayValue: 'Shopping'\n    },\n    {\n      onClick: () => handleCategoryClick('Hospitals'),\n      className,\n      icon: {\n        name: 'icon-medical',\n        color: '#1F84AE'\n      },\n      displayValue: 'Medical',\n      extraStyles: {\n        i: {\n          marginTop: '-2px'\n        }\n      }\n    },\n    {\n      onClick: () => handleCategoryClick('Hotels'),\n      className,\n      icon: {\n        name: 'icon-hotel-bell',\n        color: 'var(--color-neutrals-700)'\n      },\n      displayValue: 'Hotels',\n      extraStyles: {\n        i: {\n          marginTop: '-6px'\n        }\n      }\n    },\n    {\n      onClick: () => handleCategoryClick('Parks'),\n      className,\n      icon: {\n        name: 'icon-tree',\n        color: '#D53B3C'\n      },\n      displayValue: 'Parks'\n    }\n  ];\n\n  const handleCategoryClick = query => {\n    trackAction('search-ahead-category-clicked', 'search_suggestions', {'target-properties': query});\n    dispatch(setInfoSheetActive(false));\n    dispatch(setInfosheetMqId(null));\n    dispatch(setInfosheetSlug(null));\n    dispatch(setInfosheetData(null));\n    dispatch(setIsSearching(true));\n    dispatch(setSearchQuery(query));\n    dispatch(setIsDisambiguatedSearch(false));\n    setDropdownVisible(false);\n    dispatch(setInputFocused(false));\n    // navigate('/search/' + encodeURIComponent(normalizeQuery(query)));\n    window.location.href = '/search/' + encodeURIComponent(normalizeQuery(query))\n    dispatch(search());\n  };\n\n  return categoryItems.map((categoryItem, index) => (\n    <SearchAheadCategoryItem key={`search-ahead-cat-${index}`} {...categoryItem} />\n  ));\n};\n\nexport default SearchAheadCategories;\n","import React, {useEffect, useState} from 'react';\nimport {connect, useDispatch} from 'react-redux';\nimport {addTrigger, sharedStore} from 'morass';\nimport {setRecentSearches, setPredictionResults, setIsDisambiguatedSearch} from '../../model/actions';\nimport {searchProps, mapProps} from '../../model/selectors';\nimport SearchAheadItem from './SearchAheadItem';\nimport DisambiguationBubble from './DisambiguationBubble';\nimport DisambiguationFooter from './DisambiguationFooter';\nimport RecentSearchesHeader from './RecentSearchesHeader';\nimport {noPadding, noMargin, noBorder, centerFlexColumn} from '../../../styles/utilities.scss';\nimport {searchAheadContainer, saButton, searchAheadItem} from './styles.scss';\nimport {createSelector} from 'reselect';\nimport {useEventListener} from 'event-hooks';\nimport {trackAction} from '../../../lib/gtm.service';\nimport {normalizeQuery, navigate} from 'url-utils';\n\nimport {map as mapConfig} from 'config';\nimport {distance} from 'mapUtils';\nimport SearchAheadCategories from './SearchAheadCategories';\n\nconst {mapbox: {locationPrecision = 5} = {}} = mapConfig || {};\n\nconst SearchAhead = connect(\n  createSelector(searchProps, ({query, predictions, recents, results, isDisambiguatedSearch, inProgress}) => ({\n    query,\n    predictions,\n    recents,\n    results,\n    isDisambiguatedSearch,\n    inProgress\n  })),\n  {setRecentSearches},\n  null,\n  {forwardRef: true}\n)(\n  ({\n    fwdRef,\n    onBlur,\n    query,\n    predictions,\n    recents,\n    isDisambiguatedSearch,\n    results,\n    isDestinationInput = false,\n    onSearchSelected,\n    onChooseLocation,\n    isLocationError,\n    chooseLocationEnabled = true,\n    setRecentSearches,\n    setDropdownVisible,\n    showRecentSearches = true,\n    className,\n    itemClassName = searchAheadItem,\n    openOnClick = true,\n    showIcon = true,\n    hideIfEmpty = false,\n    setDropdownIsEmpty\n  }) => {\n    const\n      dispatch = useDispatch(),\n      [numItems, setNumItems] = useState(5),\n      [isEditMode, setIsEditMode] = useState(false),\n      [dropdownItems, setDropdownItems] = useState(null),\n      [showMoreButton, setShowMoreButton] = useState(false),\n      [activeSearchItem, setActiveSearchItem] = useState(-1),\n      [noResults, setNoResults] = useState(true),\n      keyActions = {\n        ArrowDown() {\n          setActiveSearchItem(activeIndex =>\n            Math.min(activeIndex + 1, document.querySelectorAll(`.${itemClassName}`).length - 1)\n          );\n        },\n        ArrowUp() {\n          setActiveSearchItem(activeIndex => Math.max(activeIndex - 1, 0));\n        },\n        Enter() {\n          if (document.activeElement.classList.contains(itemClassName)) document.activeElement.click();\n        },\n        Escape() {\n          setDropdownVisible && setDropdownVisible(false);\n        }\n      };\n    useEventListener('keyup', ({key}) => keyActions[key]?.());\n\n    useEffect(() => {\n      if (isDisambiguatedSearch && results) {\n        setDropdownItems(results.slice(0, 10));\n      }\n    }, [isDisambiguatedSearch, results]);\n\n    useEffect(() => {\n      if (activeSearchItem > -1) return document.querySelectorAll(`.${itemClassName}`)[activeSearchItem]?.focus();\n    }, [activeSearchItem]);\n\n    // This effect simply updates the dropdown items depending on if a query is present or not\n    useEffect(() => {\n      setDropdownItems(query ? predictions : showRecentSearches ? recents.slice(0, numItems) : []);\n    }, [query, predictions, recents, isDisambiguatedSearch]);\n\n    // This effect determines whether or not to show the \"More Recents\" button - dependent on query and amount of items currently shown\n    useEffect(() => {\n      setShowMoreButton(numItems < recents.length && !(numItems >= 10) && !query);\n      const noResults = !dropdownItems?.length;\n      setNoResults(noResults);\n      setDropdownIsEmpty && setDropdownIsEmpty(noResults);\n    }, [dropdownItems?.length, numItems, query]);\n\n    const onShowMoreClick = e => {\n      e.preventDefault();\n      setNumItems(numItems => {\n        setDropdownItems([...recents].slice(0, (numItems += 5)));\n        return numItems;\n      });\n    };\n\n    const handleSearchSelected = result => {\n      const {recordType} = result;\n      onSearchSelected(result);\n\n      if (query) {\n        if (isDisambiguatedSearch) {\n          trackAction('disambig-result-clicked', 'search_suggestions');\n        }\n        /*\n        Commented out since the remaining CSR pages (directions, routeplanner) do not need this\n\n        else {\n          trackAction('search-ahead-result-clicked', 'search_suggestions', {\n            'target-properties': recordType\n          });\n        }\n        */\n      } else {\n        trackAction('recents-clicked', 'search_suggestions', {\n          'target-properties': recordType\n        });\n      }\n\n      if (!isDestinationInput && (recordType === 'category' || recordType === 'franchise')) {\n        dispatch(setIsDisambiguatedSearch(true));\n        setDropdownVisible(false);\n        window.location.href = '/search/' + encodeURIComponent(normalizeQuery(result.name))\n        //navigate('/search/' + encodeURIComponent(normalizeQuery(result.name)));\n      } else {\n        setDropdownVisible && setDropdownVisible(false);\n      }\n    };\n\n    if ((!openOnClick && query.length < 3) || (hideIfEmpty && noResults)) {\n      return null;\n    }\n\n    return (\n      <div\n        className={className ? className : `${centerFlexColumn} ${searchAheadContainer}`}\n        tabIndex={1}\n        onBlur={onBlur}\n        id=\"mq-search-ahead\"\n        ref={fwdRef}\n      >\n        <div>\n          {!query && (\n            <RecentSearchesHeader\n              isEditMode={isEditMode}\n              isLocationError={isLocationError}\n              chooseLocationEnabled={chooseLocationEnabled}\n              onDone={() => {\n                setIsEditMode(false);\n                trackAction('done-link-clicked', 'search_suggestions');\n              }}\n              onDeleteAll={() => {\n                setRecentSearches([]);\n                trackAction('deleteall-link-clicked', 'search_suggestions');\n              }}\n              onEdit={() => {\n                setIsEditMode(true);\n                trackAction('edit-link-clicked', 'search_suggestions');\n              }}\n              onCurrentLocation={() => {\n                onChooseLocation();\n                trackAction('current-location-clicked', 'search_suggestions');\n              }}\n            />\n          )}\n          <ul tabIndex={0} className={`${noPadding} ${noMargin}`}>\n            {isDisambiguatedSearch && query && <DisambiguationBubble query={query} results={dropdownItems?.length} />}\n            {dropdownItems &&\n              dropdownItems.map((result, index) => {\n                return (\n                  <SearchAheadItem\n                    showIcon={showIcon}\n                    result={result}\n                    editMode={isEditMode}\n                    index={index}\n                    key={`${index}_${result.id}`}\n                    isDestinationInput={isDestinationInput}\n                    setDropdownVisible={setDropdownVisible}\n                    onSearchSelected={handleSearchSelected}\n                    className={itemClassName}\n                  />\n                );\n              })}\n            {showMoreButton && showRecentSearches && (\n              <li>\n                <button tabIndex={0} className={`${noBorder} ${saButton}`} onClick={onShowMoreClick}>\n                  <i aria-hidden=\"true\" className=\"icon-angle-down\"></i>\n                  More recent searches\n                </button>\n              </li>\n            )}\n            {isDisambiguatedSearch && query && (\n              <li>\n                <DisambiguationFooter query={query} results={dropdownItems?.length} />\n              </li>\n            )}\n            {query.length < 3 && (\n              <SearchAheadCategories className={itemClassName} setDropdownVisible={setDropdownVisible} />\n            )}\n          </ul>\n        </div>\n      </div>\n    );\n  }\n);\n\n// Sets the recent searches from local storage\ntry {\n  let storedRecents = localStorage.getItem('map.recentSearches');\n  if (storedRecents != null) {\n    sharedStore().dispatch(setRecentSearches(JSON.parse(storedRecents)));\n  } else {\n    sharedStore().dispatch(setRecentSearches([]));\n  }\n} catch (error) {\n  window.newrelic?.noticeError(error);\n  sharedStore().dispatch(setRecentSearches([]));\n}\n\n// Sets the local storage when recent searches are updated\naddTrigger(\n  createSelector(searchProps, ({recents}) => recents),\n  recents => () => {\n    try {\n      localStorage.setItem('map.recentSearches', JSON.stringify(recents));\n    } catch (error) {\n      window.newrelic?.noticeError(error);\n    }\n  }\n);\n\naddTrigger(searchProps, (searchProps, oldSearchProps) => dispatch => {\n  if (searchProps.inProgress) return;\n  const {query, dropdownVisible} = searchProps;\n\n  if (query && (query !== oldSearchProps.query || (dropdownVisible && !oldSearchProps.dropdownVisible))) {\n    dispatch(setPredictionResults(query));\n  }\n});\n\naddTrigger(mapProps, (mapProps, oldMapProps) => (dispatch, getState) => {\n  if (!mapProps.confirmedBounds) return;\n  const {center} = mapProps,\n    {query, dropdownVisible} = searchProps(getState());\n\n  if (\n    dropdownVisible &&\n    query &&\n    center &&\n    (!oldMapProps || !oldMapProps.center || Math.abs(distance(center, oldMapProps.center)) > locationPrecision)\n  ) {\n    dispatch(setPredictionResults(query));\n  }\n});\n\nexport default SearchAhead;\n","import {batch} from 'react-redux';\nimport {map, provider} from 'config';\nimport {initZoom, initCenter, markLocation, setPrecisePosition} from './actions';\nimport {initialLocationByIP} from 'geoip';\nconst {newrelic} = window;\n\n// Configuration default is for provider.map=='mapbox'\nconst {\n  // Configuration defaults are for provider.map=='mapbox'\n  [provider.map]: {fallbackZoom = 4.5, locateZoom = 15} = {},\n  fallbackCenter = {lat: 38.5, lng: -98},\n  geolocate = true\n} = map || {};\n\nexport const CAN_USE_GEOLOCATION = 'canUseGeolocation';\n\nconst geoLocAvailable = geolocate && typeof navigator.geolocation?.watchPosition == 'function';\n\nlet watchPosStarted = false,\n  watchPosError = false,\n  lastPosition = null;\n\nexport function initGeolocation(force) {\n  const canUseGeolocation = window.localStorage.getItem(CAN_USE_GEOLOCATION),\n    useGeoLoc = geoLocAvailable && (force || canUseGeolocation) && !watchPosError;\n\n  if (!useGeoLoc) {\n    return async dispatch => {\n      let pos;\n      try {\n        pos = await initialLocationByIP;\n      } catch (e) {\n        newrelic?.noticeError(e);\n        console.error(e);\n      } finally {\n        if (!pos) {\n          // we failed to get position by IP => fallback\n          pos = {...fallbackCenter, zoom: fallbackZoom};\n        }\n        pos.zoom = pos.zoom || locateZoom;\n        batch(() => {\n          dispatch(initCenter(pos.lat, pos.lng));\n          dispatch(initZoom(pos.zoom || locateZoom));\n          // dispatch(markLocation(pos.lat, pos.lng)); // DON'T MARK THE LOCATION\n          lastPosition = pos;\n        });\n      }\n    };\n  }\n\n  if (watchPosStarted) return () => {};\n\n  return async dispatch => {\n    watchPosStarted = true;\n    navigator.geolocation.watchPosition(\n      (\n        {coords: {latitude, longitude}} // success callback\n      ) => {\n        watchPosStarted = false;\n        localStorage.setItem(CAN_USE_GEOLOCATION, 'yes');\n        const pos = {lat: latitude, lng: longitude, zoom: locateZoom};\n        batch(() => {\n          dispatch(initCenter(pos.lat, pos.lng, true));\n          dispatch(initZoom(pos.zoom || locateZoom, true));\n          dispatch(markLocation(pos.lat, pos.lng));\n          dispatch(setPrecisePosition({watchPosResponded: true, error: false, latLng: {lat: pos.lat, lng: pos.lng}}));\n          lastPosition = pos;\n        });\n      },\n      error => {\n        watchPosStarted = false;\n        watchPosError = true;\n        if (error.code === 1) {\n          // PERMISSION_DENIED\n          localStorage.removeItem(CAN_USE_GEOLOCATION);\n        }\n        dispatch(setPrecisePosition({watchPosResponded: true, error: true, latLng: {lat: null, lng: null}}));\n        initGeolocation(false)(dispatch);\n      }\n      // TODO: sort out high accuracy option (Yogi doesn't use it)\n      // {enableHighAccuracy: true} // options\n    );\n  };\n}\n\n// proxy for watchPosition() and clearWatch()\n\nif (geoLocAvailable) {\n  const oldWatchPosition = navigator.geolocation.watchPosition,\n    // oldClearWatch = navigator.geolocation.clearWatch,\n    posListeners = {},\n    errorListeners = {};\n\n  let nextId = 0,\n    watchStarted = false,\n    lastPosition = null,\n    lastError = null;\n\n  const getWatchId = () => {\n    ++nextId;\n    if (nextId > 1000000000) {\n      nextId = 1;\n    }\n    return nextId;\n  };\n\n  const onSuccess = position => {\n    Object.values(posListeners).forEach(successCallback => {\n      successCallback(position);\n    });\n    lastPosition = position;\n  };\n\n  const onError = error => {\n    Object.values(errorListeners).forEach(errorCallback => {\n      errorCallback(error);\n    });\n    lastError = error;\n  };\n\n  navigator.geolocation.watchPosition = (successCallback, errorCallback, options) => {\n    if (!successCallback && !errorCallback) return 0;\n\n    if (!watchStarted) {\n      watchStarted = true;\n      oldWatchPosition.call(navigator.geolocation, onSuccess, onError, options);\n    }\n\n    const watchId = getWatchId();\n\n    if (successCallback) {\n      posListeners[watchId] = successCallback;\n      if (lastPosition) {\n        successCallback(lastPosition);\n      }\n    }\n\n    if (errorCallback) {\n      errorListeners[watchId] = errorCallback;\n      if (lastError) {\n        errorCallback(lastError);\n      }\n    }\n  };\n\n  navigator.geolocation.clearWatch = watchId => {\n    delete posListeners[watchId];\n    delete errorListeners[watchId];\n  };\n}\n","import React, {useState, useEffect} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport SearchInput from '../../search/SearchInput';\nimport SearchAhead from '../../search/SearchAhead';\nimport {useOutsideClick} from 'event-hooks';\nimport Destination from '../../../model/destination';\nimport {trackAction} from 'gtm.service';\nimport {api} from 'config';\nimport {buildUrl} from 'url-utils';\nimport {isRoutePlanner} from '../../../utilities';\nimport {initGeolocation} from '../../../model/browser-geolocation';\nimport {sharedStore} from 'morass';\nimport {replaceWaypoints} from 'markerUtils';\nimport {summarizeKvcat, summarizeKvcity} from '../../../../utils/trackAction.cjs';\n\nimport {searchProps, mapProps} from '../../../model/selectors';\nimport {\n  removeDestination,\n  setDestinationListItem,\n  setIsDisambiguatedSearch,\n  setSearchResults,\n  setRedirectToInfosheet,\n  setMarkerState,\n  setMapCenter,\n  setInputFocused\n} from '../../../model/actions';\nimport search from '../../../model/search';\n\nimport './DestinationInput.scss';\n\nconst hydrateMetadata = async slug => {\n  const {searchV1} = api;\n  const response = await fetch(buildUrl(searchV1 + '/' + slug + '?client=yogi'));\n  if (response.ok) {\n    const data = await response.json();\n    if (data?.results?.length == 1) {\n      const result = data.results[0];\n      return result;\n    }\n  }\n};\n\nexport default function DestinationInput({\n  destination,\n  destinationList,\n  destinationLength,\n  dropdownVisible,\n  index,\n  inputClass,\n  isRoundTrip,\n  locationMarkerClass,\n  onQueryChange,\n  placeholderText,\n  setDropdownVisible,\n  shouldShowNote = false,\n  setCurrentDestinationBox\n}) {\n  const dispatch = useDispatch(),\n    {geocoder} = api,\n    alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\n    isRoutePlannerInput = isRoutePlanner(window.location.pathname),\n    outsideClick = useOutsideClick(() => {}),\n    [showNote, setShowNote] = useState(false),\n    [isInvalid, setIsInvalid] = useState(false),\n    [isLocationSearching, setIsLocationSearching] = useState(false),\n    {isDisambiguatedSearch, predictions, isSearching, arePredictionsLoading, isInternalQuery} =\n      useSelector(searchProps),\n    {precisePosition} = useSelector(mapProps),\n    {inputFocused} = useSelector(searchProps),\n    [displayValue, setDisplayValue] = useState('');\n\n  useEffect(() => {\n    // if there are only two input fields and only one is set, move map to destination POI marker\n    const orderedCoordinates = [];\n\n    if ('location' in destination && destinationLength === 2) {\n      destinationList.forEach(destination => {\n        if (Object.keys(destination).includes('location'))\n          orderedCoordinates.push([destination.location.latLng.lng, destination.location.latLng.lat]);\n        else orderedCoordinates.push([null, null]);\n      });\n\n      dispatch(setMapCenter(destination.location.latLng.lat, destination.location.latLng.lng)); // center destination\n      dispatch(setMarkerState(replaceWaypoints(sharedStore().getState(), orderedCoordinates)));\n    }\n  }, [destination]);\n\n  useEffect(() => {\n    if (!destination) {\n      setDisplayValue('');\n      return;\n    }\n    if (!Destination.isDisplayValueFromQuery(destination) || !isInternalQuery) {\n      setDisplayValue(Destination.getDisplayValue(destination));\n    }\n  }, [isInternalQuery, destination]);\n\n  useEffect(() => {\n    if (!dropdownVisible && destination.query) {\n      if (!arePredictionsLoading && predictions.length && !isDisambiguatedSearch && !isSearching) {\n        onSearchSelected(index, predictions[0]);\n      } else if (!destination.location) {\n        if (!isInvalid) trackAction('no-search-on-directions', 'error');\n        setIsInvalid(true);\n      }\n    }\n  }, [\n    dropdownVisible,\n    destination?.query,\n    destination?.location,\n    arePredictionsLoading,\n    predictions?.length,\n    isDisambiguatedSearch,\n    isSearching,\n    index\n  ]);\n\n  useEffect(() => {\n    if (isInvalid) {\n      trackAction('input-error-highlight', 'route-planner');\n    }\n  }, [isInvalid]);\n\n  useEffect(() => {\n    async function doReverseGeocode() {\n      const {\n        watchPosResponded,\n        error: watchPosError,\n        latLng: {lat, lng}\n      } = precisePosition;\n      if (watchPosResponded && !watchPosError && lat && lng) {\n        try {\n          const destinationItem = await reverseGeocodeListItem(lat, lng);\n          if (isLocationSearching) {\n            destinationItem && dispatch(setDestinationListItem(index, destinationItem));\n            setIsLocationSearching(false);\n          } else if (\n            destinationList.length === 2 &&\n            Object.keys(destinationList[0]).length === 0 &&\n            Object.keys(destinationList[1]).length === 0 &&\n            !isRoutePlannerInput\n          ) {\n            destinationItem && dispatch(setDestinationListItem(0, destinationItem));\n          }\n        } catch (error) {\n          console.log(error);\n          window.newrelic?.noticeError(error);\n          setIsLocationSearching(false);\n        }\n      } else {\n        if (isLocationSearching) {\n          setLocationFailed(true);\n          setIsInvalid(true);\n          setIsLocationSearching(false);\n        }\n      }\n    }\n\n    if (!window.location.pathname.includes('/from')) doReverseGeocode()\n  }, [!!precisePosition, precisePosition?.watchPosResponded, precisePosition?.watchPosError]);\n\n  const doShowNote = showNote || destination.note;\n  const destinationIsEmpty = !(destination.query || destination.location);\n\n  const onSearchSelected = async (index, searchResult) => {\n    setLocationFailed(false);\n\n    const destination =\n      isDisambiguatedSearch || searchResult.location\n        ? Destination.createFromDisambiguationResult(searchResult)\n        : Destination.createFromSearchAheadResult(searchResult);\n\n    dispatch(setRedirectToInfosheet(false));\n    dispatch(setIsDisambiguatedSearch(false));\n    dispatch(setDestinationListItem(index, destination));\n    dispatch(setSearchResults([]));\n\n    const trackingData = searchResult['@adparameters'] ? searchResult : await hydrateMetadata(searchResult.slug);\n    if (trackingData?.['@adparameters']) {\n      trackAction(\n        'search-performed-directions',\n        'directions',\n        {\n          'target-properties': searchResult.slug,\n          kvcat: summarizeKvcat(trackingData['@adparameters']),\n          kvdcity: [summarizeKvcity(trackingData['@adparameters'])]\n        }\n      );\n    }\n  };\n\n  const onChooseLocation = async index => {\n    const {\n      watchPosResponded,\n      error: watchPosError,\n      latLng: {lat, lng}\n    } = precisePosition;\n\n    setIsLocationSearching(true);\n    if (watchPosResponded && !watchPosError && lat && lng) {\n      try {\n        const destinationItem = await reverseGeocodeListItem(lat, lng);\n        destinationItem && dispatch(setDestinationListItem(index, destinationItem));\n        setIsLocationSearching(false);\n      } catch (error) {\n        console.log(error);\n        window.newrelic?.noticeError(error);\n        setIsLocationSearching(false);\n        setLocationFailed(true);\n        setIsInvalid(true);\n      }\n    } else {\n      initGeolocation(true, () => false)(dispatch);\n\n      if (watchPosError) {\n        setIsLocationSearching(false);\n        setLocationFailed(true);\n        setIsInvalid(true);\n      }\n    }\n  };\n\n  const reverseGeocodeListItem = async (lat, lng) => {\n    const response = await fetch(`${geocoder}?location=${lat},${lng}`);\n    if (response.ok) {\n      const responseJSON = await response.json();\n      const destinationItem = Destination.createFromReverseGeocodingResult(responseJSON);\n      return destinationItem;\n    }\n  };\n\n  const onAddNote = note => {\n    dispatch(setDestinationListItem(index, {...destination, note}));\n  };\n\n  const handleAddNoteIconClick = () => {\n    if (!destinationIsEmpty) {\n      setShowNote(true);\n      trackAction('note-clicked', 'route-planner');\n    }\n  };\n\n  const handleOnSubmit = e => {\n    e.preventDefault();\n    setLocationFailed(false);\n    dispatch(setIsDisambiguatedSearch(true));\n    dispatch(search());\n    setDropdownVisible(true);\n  };\n\n  const handleOnBlur = e => {\n    const {relatedTarget} = e,\n      {current: searchAheadWrapper = null} = outsideClick;\n\n    if (searchAheadWrapper && !searchAheadWrapper.contains(relatedTarget)) {\n      setDropdownVisible(false);\n    }\n\n    dispatch(setInputFocused(false));\n  };\n\n  const validateInput = () => {\n    // if the input field is still focused, skip validation\n    if (inputFocused) return;\n\n    if (destination.error || (destination.query && !predictions.length) || locationFailed) {\n      setIsInvalid(true);\n    } else {\n      setIsInvalid(false);\n    }\n  };\n\n  const handleRemoveDestination = e => {\n    if (!e.target.closest('.destination-input-remove-button')) return;\n    trackAction('remove-stop-button-clicked', 'directions');\n    dispatch(removeDestination(index));\n  };\n\n  useEffect(() => {\n    return () => dispatch(setIsDisambiguatedSearch(false));\n  }, []);\n\n  useEffect(() => {\n    if (!destination.note) setShowNote(false);\n  }, [destination.note]);\n\n  useEffect(() => {\n    if (destinationIsEmpty) {\n      setIsInvalid(false);\n    }\n  }, [destinationIsEmpty]);\n\n  const [dropdownIsEmpty, setDropdownIsEmpty] = useState(true);\n\n  const [locationFailed, setLocationFailed] = useState(false);\n\n  const errorMessage = () => {\n    return precisePosition.error ? (\n      <>\n        Couldn't find you.\n        <a href=\"https://help.mapquest.com/hc/en-us/articles/204911904\" target={'_blank'}>\n          Learn more.\n        </a>\n      </>\n    ) : null;\n  };\n\n  const displaySearchAhead = () => {\n    return (\n      <SearchAhead\n        fwdRef={outsideClick}\n        onBlur={handleOnBlur}\n        showIcon={!isRoutePlannerInput}\n        isDestinationInput={true}\n        openOnClick={!isRoutePlannerInput}\n        showRecentSearches={!isRoutePlannerInput}\n        setDropdownVisible={setDropdownVisible}\n        isLocationError={precisePosition.error}\n        onChooseLocation={() => {\n          setDropdownVisible(false);\n          onChooseLocation(index);\n          setIsInvalid(false);\n        }}\n        onSearchSelected={searchAheadResult => {\n          setDropdownVisible(false);\n          onSearchSelected(index, searchAheadResult);\n          setIsInvalid(false);\n        }}\n        setDropdownIsEmpty={setDropdownIsEmpty}\n      />\n    );\n  };\n\n  return (\n    <>\n      <div\n        className=\"destination-list-input\"\n        data-cy={`destination-input-${index}`}\n      >\n        <div className={`${locationMarkerClass} ${destinationLength > 2 ? 'dnd-handle' : ''}`}>\n          <div className=\"marker-container\">\n            <i className={`icon-letter-marker-${alphabet[index]}`}></i>\n            <i className=\"icon-overlay icon-letter-marker-blank\" aria-hidden=\"true\"></i>\n          </div>\n          {(index !== destinationLength - 1 || isRoundTrip) && (\n            <div className={`ellipsis ${doShowNote ? 'note-active' : ''}`} />\n          )}\n        </div>\n        <div\n          className={\n            `${inputClass} ${isInvalid || destination?.invalid ? 'invalid' : ''}` +\n            `${dropdownVisible && !dropdownIsEmpty ? ' dropdown-visible' : ''}`\n          }\n        >\n          <SearchInput\n            dropdownVisible={dropdownVisible}\n            errorMessage={errorMessage}\n            handleClick={e => e.target.select()}\n            isInvalid={destination?.invalid ? destination?.invalid : isInvalid}\n            isSearch={false}\n            isDestinationInput={true}\n            onBlur={handleOnBlur}\n            onQueryChange={onQueryChange}\n            onSubmit={handleOnSubmit}\n            placeholderText={placeholderText}\n            name={`location-${alphabet[index]}`}\n            setDropdownVisible={setDropdownVisible}\n            shouldValidate\n            spinnerActive={isLocationSearching}\n            validateInput={validateInput}\n            value={displayValue}\n            setCurrentDestinationBox={setCurrentDestinationBox}\n            index={index}\n          />\n          {shouldShowNote && (\n            <i\n              onClick={handleAddNoteIconClick}\n              disabled={destinationIsEmpty}\n              data-cy=\"destination-comment-button\"\n              className={`destination-input-comment-button icon-comment ${destinationIsEmpty ? 'icon-disabled' : ''}`}\n            />\n          )}\n          {destinationLength > 2 && (\n            <div className=\"dnd-handle destination-input-dnd-right\">\n              <i className=\"icon-drag-handle\" />\n            </div>\n          )}\n\n          {dropdownVisible &&\n            (isRoutePlannerInput ? predictions.length > 0 && displaySearchAhead() : displaySearchAhead())}\n        </div>\n        {destinationLength > 2 && (\n          <div\n            className=\"destination-input-remove-button\"\n            data-cy={`destination-remove-${index}`}\n            onClick={e => handleRemoveDestination(e)}\n          >\n            <i className=\"icon-close\" />\n          </div>\n        )}\n      </div>\n      {doShowNote && (\n        <div data-cy={`destination-note-${index}`} className=\"destination-input-note\">\n          <span>Note:</span>\n          <input onChange={e => onAddNote(e.target.value)} type=\"text\" value={destination.note || ''} />\n        </div>\n      )}\n    </>\n  );\n}\n","import React, {useState} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport Destination from '../../../model/destination';\n\nimport {routeOptimizationProps} from '../../../model/selectors';\nimport {setRouteOptimizationSettings} from '../../../model/actions';\n\nimport './DestinationInputRoundTrip.scss';\n\nexport default function DestinationInputRoundTrip({firstDestination, markerLetter, placeholderText}) {\n  const dispatch = useDispatch(),\n    {routeSettings} = useSelector(routeOptimizationProps),\n    [roundTripButtonText, setRoundTripButtonText] = useState('Round trip');\n\n  return (\n    <div className=\"round-trip-container\">\n      <div className=\"round-trip-location-marker\">\n        <div className=\"marker-container\">\n          <i className={`icon-letter-marker-${markerLetter}`}></i>\n          <i className={`icon-overlay icon-letter-marker-blank`} aria-hidden=\"true\"></i>\n        </div>\n      </div>\n\n      <div className=\"round-trip-content\" data-cy={'round-trip-content'}>\n        <input\n          className=\"round-trip-input\"\n          value={Object.keys(firstDestination).length ? Destination.getDisplayValue(firstDestination) : placeholderText}\n          disabled\n        />\n\n        <button\n          onMouseOver={() => setRoundTripButtonText('Turn off')}\n          onMouseLeave={() => setRoundTripButtonText('Round trip')}\n          onClick={() =>\n            dispatch(\n              setRouteOptimizationSettings({...routeSettings, generalize: {...routeSettings.generalize, value: 0}})\n            )\n          }\n        >\n          {roundTripButtonText}\n        </button>\n      </div>\n    </div>\n  );\n}\n","import React from 'react';\nimport {routeSettings} from 'config';\n\nimport './TopInstructions.scss';\n\nconst {maxStops} = routeSettings;\n\nexport default function TopInstructions({isRoutePlanner, isDropFile, onClick, props}) {\n  return (\n    <div className=\"top-instructions\">\n      <span>\n        <span className=\"instructions\">\n          {isDropFile ? 'Import multiple addresses from a file' : 'One address per line'}\n        </span>\n        <span className=\"instructions-em\">({maxStops} max)</span>\n      </span>\n\n      {isRoutePlanner && (\n        <button data-cy=\"close-all-button\" className=\"text-button\" onClick={onClick} {...props}>\n          <i className=\"icon-close\"></i>\n          Clear all\n        </button>\n      )}\n    </div>\n  );\n}\n","import React, {useEffect} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {useMainContainer} from 'mainContainer';\nimport {mapProps} from '../../../model/selectors';\nimport {setDestinationListItem, setInputFocused} from '../../../model/actions';\nimport {initGeolocation} from '../../../model/browser-geolocation';\nimport Destination from '../../../model/destination';\nimport {api} from 'config';\n\nimport SearchInput from '../SearchInput';\nimport SearchAhead from '../SearchAhead';\n\nimport './MobileSearchModal.scss';\n\nconst mobileSearchInput = 'mobile-search-input';\nconst showVirtualKeyboard = () =>\n  setTimeout(() => {\n    const searchInput = document.getElementsByName(mobileSearchInput)[0];\n    searchInput?.click();\n    searchInput?.focus();\n    window.scrollTo(0, 0);\n    document.body.scrollTop = 0;\n  }, 10);\n\nexport default function MobileSearchModal({\n  chooseLocationEnabled,\n  currentDestinationBox = 0,\n  dropdownVisible,\n  handleOnInputClick = () => {},\n  handleOnInputClear = () => {},\n  handleOnSubmit = () => {},\n  handleOnQueryChange = () => {},\n  isDestinationInput = false,\n  value,\n  onSearchSelected,\n  setDropdownVisible,\n  setDropdownIsEmpty\n}) {\n  const {geocoder} = api;\n  const dispatch = useDispatch();\n  const mainContainer = useMainContainer();\n  const {precisePosition} = useSelector(mapProps);\n\n  useEffect(() => {\n    mainContainer?.classList.add('modal-open');\n    showVirtualKeyboard();\n\n    return () => mainContainer?.classList.remove('modal-open');\n  }, []);\n\n  const onChooseLocation = async index => {\n    const {\n      watchPosResponded,\n      error: watchPosError,\n      latLng: {lat, lng}\n    } = precisePosition;\n\n    if (watchPosResponded && !watchPosError && lat && lng) {\n      try {\n        const destinationItem = await reverseGeocodeListItem(lat, lng);\n        destinationItem && dispatch(setDestinationListItem(index, destinationItem));\n      } catch (error) {\n        console.log(error);\n        window.newrelic?.noticeError(error);\n      }\n    } else {\n      initGeolocation(true, () => false)(dispatch);\n\n      if (watchPosError || !watchPosResponded) {\n        dispatch(setDestinationListItem(index, {invalid: true, locationFailed: true}));\n      }\n    }\n\n    dispatch(setInputFocused(false));\n  };\n\n  const reverseGeocodeListItem = async (lat, lng) => {\n    const response = await fetch(`${geocoder}?location=${lat},${lng}`);\n    if (response.ok) {\n      const responseJSON = await response.json();\n      return Destination.createFromReverseGeocodingResult(responseJSON);\n    }\n  };\n\n  return (\n    <div className=\"mobile-search-modal\">\n      <div className=\"mq-search-box\">\n        <button className=\"back-button search-input-back\" onClick={() => dispatch(setInputFocused(false))}>\n          <i className={`icon-back-arrow`}></i>\n        </button>\n\n        <SearchInput\n          dropdownVisible={dropdownVisible}\n          isSearching={true}\n          name={mobileSearchInput}\n          onInputClick={handleOnInputClick}\n          onInputClear={handleOnInputClear}\n          onSubmit={handleOnSubmit}\n          onQueryChange={handleOnQueryChange}\n          setDropdownVisible={() => setDropdownVisible(true)}\n          value={value}\n        />\n\n        {value && (\n          <i\n            className=\"close-button icon-close\"\n            onClick={() => {\n              showVirtualKeyboard();\n              handleOnQueryChange('');\n              if (handleOnInputClear) handleOnInputClear();\n            }}\n          />\n        )}\n      </div>\n\n      <SearchAhead\n        chooseLocationEnabled={chooseLocationEnabled}\n        isDestinationInput={isDestinationInput}\n        isLocationError={precisePosition.error}\n        onChooseLocation={() => onChooseLocation(currentDestinationBox)}\n        onSearchSelected={onSearchSelected}\n        setDropdownIsEmpty={setDropdownIsEmpty}\n        setDropdownVisible={setDropdownVisible}\n      />\n    </div>\n  );\n}\n","import React, {useState, useEffect, Fragment, useRef} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport DndMove from 'dnd';\nimport {routeSettings} from 'config';\nimport {useMobileCheck} from 'event-hooks';\nimport Destination from '../../../model/destination';\nimport RoadWarriorCTA from '../../road-warrior-cta';\nimport DestinationInput from '../DestinationInput';\nimport DestinationInputRoundTrip from '../DestinationInputRoundTrip';\nimport TopInstructions from '../TopInstructions';\nimport MobileSearchModal from '../../search/MobileSearchModal';\n\nimport {\n  setDestinationList,\n  setDestinationListItem,\n  setSearchQueryEx,\n  setIsSearching,\n  setRouteOptimizationSettings,\n  setWereDestinationsReordered,\n  addDestination,\n  setIsDisambiguatedSearch,\n  setInputFocused\n} from '../../../model/actions';\n\nimport {directionsProps, routeOptimizationProps, searchProps} from '../../../model/selectors';\n\nimport {trackAction} from 'gtm.service';\n\nimport './DirectionsList.scss';\n\nimport {Toggle} from '../../../../extra';\nimport {setMeta} from 'meta-utils';\n// import search from '../../model/search';\nimport {debounce} from 'timer-utils';\nimport {useLocation} from 'route-utils';\nimport {isRoutePlanner} from '../../../utilities';\nimport {readableAddress} from '../../../../utils/filters/index.cjs';\n\nconst SHIFT = 1000000; // an artificial index shift to force elements to be redrawn\nconst {maxStops} = routeSettings;\n\nconst isDestinationListDefaultBlank = destinationList => {\n  return destinationList.reduce((totalLength, dest) => totalLength + Object.keys(dest).length, 0) === 0;\n};\n\nconst areLocationsInOrder = locationSequence => {\n  for (let i = 0; i < locationSequence.length - 1; i++) {\n    if (locationSequence[i] > locationSequence[i + 1]) return false;\n  }\n  return true;\n};\n\nexport default function DirectionsList({\n  placeholderText,\n  shouldShowNote,\n  addStopButton,\n  showHeaderInstructions,\n  showReorderRecommendation,\n  routeSettingsButton = null,\n  hideRoadWarriorCTA = false\n}) {\n  const\n    location = useLocation(),\n    alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\n    isMobile = useMobileCheck(),\n    {destinationList, routeData} = useSelector(directionsProps),\n    {routeSettings} = useSelector(routeOptimizationProps),\n    {inputFocused} = useSelector(searchProps),\n    dispatch = useDispatch(),\n    [indexShift, setIndexShift] = useState(0),\n    [destinationDropdownVisible, setDestinationDropdownVisible] = useState(destinationList.map(() => false)),\n    roadWarriorCtaRef = useRef(null),\n    destinationLength = destinationList.length,\n    isRoundTrip = !!routeSettings?.generalize?.value,\n    canReorder = !!routeSettings?.canReorder?.value,\n    [localQuery, setLocalQuery] = useState(''),\n    [currentDestinationBox, setCurrentDestinationBox] = useState(0);\n\n  const onChange = debounce((index, value) => {\n    dispatch(setIsDisambiguatedSearch(false));\n    dispatch(setSearchQueryEx({query: value, isInternal: true}));\n    dispatch(setDestinationListItem(index, Destination.createFromQuery(value)));\n    // dispatch(search());\n  }, 500);\n\n  useEffect(() => {\n    if (!isRoutePlanner(location.pathname)) {\n      const start = destinationList[0];\n      const finish = destinationList[destinationList.length - 1];\n      const startAddress = start?.id ? start.name : readableAddress(start.location);\n      const finishAddress = finish?.id ? finish.name : readableAddress(finish.location);\n\n      if (!destinationList.length || isDestinationListDefaultBlank(destinationList)) {\n        //Directions page is blank, so add some static title + desc\n        setMeta({\n          type: 'directions',\n          pageTitle: 'Get Driving Directions, Live Traffic & Road Conditions',\n          pageDesc:\n            'Step by step directions for your drive or walk. Easily add multiple stops, see live traffic and road conditions. Find nearby businesses, restaurants and hotels. Explore!'\n        });\n        dispatch(setDestinationList([{}, {}]));\n      } else {\n        //Craft special title/desc when directions has an origin AND destination only\n        if (destinationList.length == 2 && Object.keys(destinationList[0]).length) {\n          setMeta({\n            type: 'directions',\n            pageTitle: `${startAddress} to ${finishAddress}`,\n            pageDesc: `Driving Directions from ${startAddress} to ${finishAddress} including road conditions, live traffic updates, and reviews of local businesses along the way.`\n          });\n        }\n        //When we have just the destination OR 3+ destinations\n        else {\n          setMeta({\n            type: 'directions',\n            pageTitle: `Directions to ${finishAddress}`,\n            pageDesc: `Driving Directions to ${finishAddress} including road conditions, live traffic updates, and reviews of local businesses along the way.`\n          });\n        }\n      }\n    }\n\n    return () => dispatch(setIsSearching(true));\n  }, []);\n\n  const locationSequence = routeData?.route?.locationSequence;\n  useEffect(() => {\n    if (locationSequence?.length > 2 && !areLocationsInOrder(locationSequence)) {\n      const newDest = locationSequence.map(sequence => destinationList[sequence]).filter(dest => dest);\n      dispatch(setWereDestinationsReordered(true));\n      dispatch(setDestinationList(newDest));\n    }\n  }, [locationSequence]);\n\n  const setDropdownVisible = (index, value) => {\n    setDestinationDropdownVisible(currDropdowns => {\n      let newDropdowns = currDropdowns.map(() => false);\n      newDropdowns[index] = value;\n      return newDropdowns;\n    });\n  };\n\n  let dndHandle = null;\n  const setDndContainer = element => {\n    if (destinationLength <= 2) return; // no DnD\n    if (dndHandle) {\n      dndHandle.remove();\n      dndHandle = null;\n    }\n    if (!element) return; // nothing to move\n    dndHandle = DndMove.start(element, {\n      init: mover => {\n        Array.from(mover.container.querySelectorAll('.dnd-item')).forEach(\n          (node, index) => (node.dataset.index = index)\n        );\n        DndMove.init(mover);\n      },\n      over: DndMove.over,\n      moving: DndMove.movingY,\n      newOver: mover => {\n        if (!mover.previousOverItem || mover.previousOverItem === mover.node) return;\n        // move the dragged node\n        let beforeNode = mover.previousOverItem;\n        for (let current = mover.container.firstElementChild; current; current = current.nextElementSibling) {\n          if (current === mover.node) {\n            beforeNode = beforeNode.nextElementSibling;\n            break;\n          }\n          if (current === mover.previousOverItem) break;\n        }\n        mover.container.insertBefore(mover.node, beforeNode);\n        // recalculate bounding boxes\n        mover.calculateBoundingBoxes();\n      },\n      drop: mover => {\n        // uncheck reorder stops when user drags & drops\n        if (canReorder) {\n          dispatch(\n            setRouteOptimizationSettings({...routeSettings, canReorder: {...routeSettings.canReorder, value: 0}})\n          );\n          dispatch(setWereDestinationsReordered(false));\n        }\n        const newDestinationList = Array.from(mover.container.querySelectorAll('.dnd-item')).map(\n          node => destinationList[node.dataset.index]\n        );\n        dispatch(setDestinationList(newDestinationList));\n        setIndexShift(indexShift ? 0 : SHIFT); // force to redraw all elements as \"unique\"\n      }\n    });\n  };\n\n  const handleSwapDestination = () => {\n    trackAction('inputs-reverse-clicked', 'directions');\n    const val1 = destinationList[0];\n    const val2 = destinationList[1];\n    dispatch(setDestinationList([val2, val1]));\n  };\n\n  const handleAddDestination = () => {\n    trackAction('add-stop-clicked', 'directions', {'target-properties': destinationList.length});\n    dispatch(addDestination());\n  };\n\n  const handleOptimizeToggle = event => {\n    trackAction('route-optimized-clicked', 'directions', {\n      'target-properties': event.target.checked,\n      value: destinationList.length - 1\n    });\n\n    dispatch(\n      setRouteOptimizationSettings({\n        ...routeSettings,\n        canReorder: {...routeSettings.canReorder, value: event.target.checked ? 1 : 0}\n      })\n    );\n  };\n\n  const [previousLength, setPreviousLength] = useState(0);\n\n  useEffect(() => {\n    if (previousLength === 4 && destinationList.length === 5 && roadWarriorCtaRef.current) {\n      roadWarriorCtaRef?.current?.scrollIntoView({block: 'end', inline: 'nearest', behavior: 'smooth'});\n    }\n    setPreviousLength(destinationList.length);\n  }, [destinationList.length]);\n\n  const validDestinations = () => {\n    let counter = 0;\n\n    destinationList.forEach(destination => {\n      if (Object.keys(destination).includes('location')) counter++;\n    });\n\n    return counter;\n  };\n\n  const handleOnInputClear = () => {\n    trackAction('clear-clicked', 'search_suggestions');\n  };\n\n  const handleOnQueryChange = val => {\n    const sanitizedValue = val.trim().replace(/\\s{2,}/g, ' ');\n    setLocalQuery(val);\n    dispatch(setSearchQueryEx({query: sanitizedValue, isInternal: true}));\n  };\n\n  return (\n    <div className=\"directions-list\">\n      {showHeaderInstructions && <TopInstructions />}\n\n      <div ref={setDndContainer} className=\"direction-inputs relative\">\n        {destinationList.map((destination, index) => (\n          <div className={`destination-input-wrapper` + ' dnd-item'} key={index + indexShift}>\n            <DestinationInput\n              dropdownVisible={destinationDropdownVisible[index]}\n              setDropdownVisible={value => setDropdownVisible(index, value)}\n              inputClass=\"destination-input-container\"\n              locationMarkerClass=\"location-marker\"\n              destination={destination}\n              destinationList={destinationList}\n              destinationLength={destinationLength}\n              index={index}\n              isRoundTrip={isRoundTrip}\n              onQueryChange={value => onChange(index, value)}\n              placeholderText={\n                placeholderText\n                  ? placeholderText\n                  : index == 0\n                  ? 'Where are you starting?'\n                  : 'Where are you going?'\n              }\n              shouldShowNote={shouldShowNote}\n              setCurrentDestinationBox={setCurrentDestinationBox}\n            />\n          </div>\n        ))}\n        {isRoundTrip && (\n          <DestinationInputRoundTrip\n            firstDestination={destinationList[0]}\n            markerLetter={alphabet[destinationLength]}\n            placeholderText={placeholderText}\n          />\n        )}\n        {destinationLength === 2 && (\n          <button\n            className=\"swap-destinations-button\"\n            aria-label=\"Swap Directions\"\n            onClick={handleSwapDestination}\n          >\n            <i className=\"icon-directions-swap\" />\n          </button>\n        )}\n      </div>\n      {showReorderRecommendation && destinationLength > 3 && (\n        <div className=\"optimize-route-container\">\n          <p>Re-order stops for the most optimized route</p>\n\n          <Toggle onChange={handleOptimizeToggle} label={'optimize routes'} value={canReorder} />\n        </div>\n      )}\n\n      {destinationLength < maxStops && (\n        <Fragment>\n          <div className={(validDestinations() < 2 && 'hidden ') + 'buttons inline-block relative'}>\n            <div onClick={handleAddDestination}>{addStopButton}</div>\n          </div>\n          {destinationLength > 2 && !hideRoadWarriorCTA && isRoutePlanner(location.pathname) && (\n              <RoadWarriorCTA isRoutePlanner={true} isMobile={isMobile} ref={roadWarriorCtaRef}></RoadWarriorCTA>\n          )}\n        </Fragment>\n      )}\n\n      {validDestinations() >= 2 && routeSettingsButton}\n\n      {inputFocused && isMobile && (\n        <MobileSearchModal\n          handleOnQueryChange={handleOnQueryChange}\n          currentDestinationBox={currentDestinationBox}\n          isDestinationInput={true}\n          isSearching={true}\n          onInputClear={handleOnInputClear}\n          onSearchSelected={result => {\n            dispatch(setInputFocused(false));\n            dispatch(setDestinationListItem(currentDestinationBox, Destination.createFromSearchAheadResult(result)));\n            setLocalQuery('');\n          }}\n          setDropdownVisible={() => setDropdownVisible(true)}\n          value={localQuery}\n        />\n      )}\n    </div>\n  );\n}\n","import React from 'react';\nimport './customInput.scss';\n\nexport default ({label, checked, name, value, type, onChange, extraClasses = '', dataCy = '', disabled = false}) => {\n  return (\n    <label className={`${type}-container ${extraClasses && extraClasses}`} data-disabled={disabled}>\n      {label}\n      <input\n        disabled={disabled}\n        type={type}\n        name={name}\n        value={value}\n        checked={checked}\n        {...(dataCy && {'data-cy': dataCy})}\n        {...(onChange && {onChange})}\n        readOnly={true}\n      />\n      <span data-disabled={disabled}></span>\n    </label>\n  );\n};\n","import {useEffect} from 'react';\nimport {useSelector, useDispatch} from 'react-redux';\nimport {api} from 'config';\nimport {directionsFailed, setDestinationList} from '../model/actions';\nimport {directionsProps} from '../model/selectors';\nimport {buildUrl} from 'url-utils';\nimport {setMeta} from 'meta-utils';\nimport {useLocation} from 'route-utils';\nimport {isRoutePlanner} from '../utilities';\nimport {readableAddress} from '../../utils/filters/index.cjs';\nimport {getDirectionsHeader} from '../../lib/directions-utils';\n\nimport templatize from 'templatize';\n\nconst {searchV1} = api;\n\nconst adaptSlugData = result => ({\n  id: result.id || result.mqId,\n  mqId: result.mqId,\n  name: typeof result.name == 'object' ? result.name.value : result.name,\n  location: {\n    slug: result.GeoAddress?.Slug || result.slug || null,\n    salt: result.salt || null,\n    adminArea1: result.GeoAddress?.AdminArea1 || result.address?.country || null,\n    adminArea3: result.GeoAddress?.AdminArea3 || result.address?.region || null,\n    adminArea4: result.GeoAddress?.AdminArea4 || result.address?.county || null,\n    adminArea5: result.GeoAddress?.AdminArea5 || result.address?.locality || null,\n    postalCode: result.GeoAddress?.PostalCode || result.address?.postalCode || null,\n    street: result.GeoAddress?.Street || result.address?.street || result.address?.address1 || null,\n    street2: result.address?.address2,\n    latLng: {\n      lat: result.GeoAddress?.LatLng.Lat || result.routingLatLng?.lat,\n      lng: result.GeoAddress?.LatLng.Lng || result.routingLatLng?.lng\n    }\n  },\n  '@adparameters': result?.['@adparameters'] ? result['@adparameters'] : []\n});\n\nconst setDirectionsMeta = directions => {\n  if (directions && directions.length >= 2) {\n    const start = directions[0],\n      filteredDirections = directions.slice(1).filter(stop => stop && stop),\n      finish = filteredDirections.length && filteredDirections[filteredDirections.length - 1],\n      startAddress = start.mqId ? start.name : readableAddress(start.location),\n      finishAddress = finish.mqId ? finish.name : readableAddress(finish.location),\n      directionsTitle = getDirectionsHeader(start, finish);\n\n    if (directions.length == 2 && 'location' in start && 'location' in finish) {\n      // TODO: do we need a restriction on length?\n      // Craft special title/desc when directions has an origin AND destination only\n      setMeta({\n        type: 'directions',\n        pageTitle: directionsTitle,\n        pageDesc:\n          'Driving Directions from ' +\n          startAddress +\n          ' to ' +\n          finishAddress +\n          ' including road conditions, live traffic updates, and reviews of local businesses along the way.'\n      });\n      return;\n    }\n    // When we have just the destination OR 3+ destinations\n    if (finish) {\n      setMeta({\n        type: 'directions',\n        pageTitle: directionsTitle,\n        pageDesc:\n          'Driving Directions to ' +\n          finishAddress +\n          ' including road conditions, live traffic updates, and reviews of local businesses along the way.'\n      });\n      return;\n    }\n    // When we have just the start\n    if (start) {\n      setMeta({\n        type: 'directions',\n        pageTitle: directionsTitle,\n        pageDesc:\n          'Driving Directions from ' +\n          startAddress +\n          ' including road conditions, live traffic updates, and reviews of local businesses along the way.'\n      });\n      return;\n    }\n  }\n\n  // Directions page is blank, so add some static title + desc\n  setMeta({\n    type: 'directions',\n    pageTitle: 'Get Driving Directions, Live Traffic & Road Conditions',\n    pageDesc:\n      'Step by step directions for your drive or walk. Easily add multiple stops, see live traffic and road conditions. Find nearby businesses, restaurants and hotels. Explore!'\n  });\n};\n\nconst setDestinationsConditionally = (list, stops, dispatch, location) => {\n  if (Object.keys(list).length != stops.length) return;\n  let directions = Object.values(list);\n  if (document.location.search && new URL(document.location).searchParams.get('xyz') === 'zyx') {\n    // transform the result for a template\n    let newDirections = templatize(directions, 'directions');\n    directions.forEach((directionItem, index) => {\n      const newItem = newDirections[index];\n      if (newItem.location?.latLng && directionItem.location?.latLng) {\n        newItem.location.latLng = directionItem.location.latLng;\n      }\n    });\n    directions = newDirections;\n  }\n  if (!isRoutePlanner(location.pathname)) {\n    setDirectionsMeta(directions);\n  }\n  dispatch(setDestinationList(directions));\n};\n\nconst V1Call = async stop => await fetch(buildUrl(searchV1 + stop + '?client=yogi'));\n\nexport default function DestinationParser() {\n  const dispatch = useDispatch(),\n    location = useLocation(),\n    orderedDestList = {},\n    {destinationList, routeData} = useSelector(directionsProps);\n\n  useEffect(() => {\n    if (routeData || destinationList.filter(d => Object.keys(d).length).length) {\n      return;\n    }\n\n    // extract stops\n    const parts = window.location.pathname.split('/'),\n      stops = [''];\n    let fromFlag = false,\n      toIndex = 0;\n    for (let i = 0; i < parts.length; ++i) {\n      const part = parts[i];\n      if (part === 'from') {\n        fromFlag = true;\n        continue;\n      }\n      if (part === 'to') {\n        fromFlag = false;\n        stops[++toIndex] = '';\n        continue;\n      }\n      if (fromFlag) {\n        stops[0] += '/' + part;\n        continue;\n      }\n      if (toIndex) {\n        stops[toIndex] += '/' + part;\n      }\n    }\n\n    while (stops.length < 2) stops.push('');\n    dispatch(setDestinationList(stops.map(() => ({}))));\n\n    stops.forEach(async (stop, index) => {\n      for (;;) {\n        if (!stop) break; // do the default\n\n        const response = await V1Call(stop);\n\n        if (!response.ok) {\n          const error =\n            response.statusText || (response.status === 404 ? 'Could not get directions' : 'Something went wrong...');\n          dispatch(directionsFailed(error));\n          break;\n        }\n\n        const data = await response.json();\n\n        // We only want to set the destination if there was only one found\n        // otherwise, we would have no way to know which one to use (Yogi does the same)\n        if (data?.results?.length != 1) break; // do the default\n\n        const result = adaptSlugData(data?.results?.[0]);\n\n        orderedDestList[index] = {...result};\n        setDestinationsConditionally(orderedDestList, stops, dispatch, location);\n        return;\n      }\n      // the default:\n      orderedDestList[index] = {};\n      setDestinationsConditionally(orderedDestList, stops, dispatch, location);\n    });\n  }, []);\n\n  return null;\n}\n","import {api} from 'config';\nimport Destination from './destination';\n\nconst {locations} = api;\n\nexport default /* loadDestinations */ async stops => {\n  const bodyObject = {locations: stops};\n  const bodyJson = JSON.stringify(bodyObject);\n\n  const url = new URL(locations);\n\n  let res = await fetch(url.toString(), {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json'\n    },\n    body: bodyJson\n  });\n\n  if (res.status != 200) {\n    // Invalid request\n    return handleServerError(`Error calling '/locations': ${res.status}`);\n  }\n\n  const json = await res.json();\n  return json.map(Destination.createFromLocationsResult);\n};\n\nconst handleServerError = message => {\n  throw new Error(message);\n};\n","import React from 'react';\n\nconst getFormattedTime = formattedTime => {\n  const [h, m] = formattedTime?.split(':'),\n    hour = parseInt(h);\n  return (hour ? hour + ' hr ' : '') + parseInt(m) + ' min';\n};\n\nexport default function NarrativeHeader({\n  index,\n  leg = {},\n  note,\n  startData,\n  endData,\n  startName,\n  endName,\n  unit,\n  isRoundTrip\n}) {\n  const\n    {distance, formattedTime} = leg,\n    alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n  return (\n    <header className=\"narrative-header\" data-cy={`narrative-header-${index}`}>\n      {leg && !isRoundTrip && (\n        <>\n          <span className=\"formatted-time-distance\">\n            <p>{getFormattedTime(formattedTime)}</p>\n            <p>\n              ({distance.toFixed(2)} {unit})\n            </p>\n          </span>\n          <p className=\"to-from-container\">\n            {startData.street == startName && <span>{startData.street}</span>}\n            {startData.street !== startName && <span>{startName}</span>}&nbsp;\n            <span>to</span>&nbsp;\n            {endData.street == endName && <span>{endData.street}</span>}\n            {endData.street !== endName && <span>{endName}</span>}\n          </p>\n        </>\n      )}\n      <span className=\"address-pin-container\">\n        <div className=\"marker-container\">\n          <i className={`icon-letter-marker-${alphabet[index]}`}></i>\n          <i className={`icon-overlay icon-letter-marker-blank`} aria-hidden=\"true\"></i>\n        </div>\n        <div className=\"header-info\">\n          <div className=\"header-title\">\n            <p>{startName}</p>\n          </div>\n          {note && <div className=\"header-note\">{note}</div>}\n        </div>\n      </span>\n    </header>\n  );\n}\n","import React from 'react';\n\nconst TURN_TYPES = {\n  0: 'icon-nav-straight',\n  1: 'icon-nav-slight-right',\n  2: 'icon-nav-right',\n  3: 'icon-nav-sharp-right',\n  4: 'icon-nav-reverse',\n  5: 'icon-nav-sharp-left',\n  6: 'icon-nav-left',\n  7: 'icon-nav-slight-left',\n  8: 'icon-nav-right-u-turn',\n  9: 'icon-nav-left-u-turn',\n  10: 'icon-nav-right-merge',\n  11: 'icon-nav-left-merge',\n  12: 'icon-nav-right-on-ramp',\n  13: 'icon-nav-ramp-left', // HACK - the icon is named incorrectly, should be icon-nav-left-on-ramp\n  14: 'icon-nav-right-off-ramp',\n  15: 'icon-nav-left-on-ramp', // HACK - the icon is named incorrectly, should be icon-nav-left-off-ramp\n  16: 'icon-nav-right-fork',\n  17: 'icon-nav-left-fork',\n  18: 'icon-nav-straight-fork',\n  19: 'icon-nav-take-transit',\n  20: 'icon-nav-transfer-transit',\n  21: 'icon-nav-port-transit',\n  22: 'icon-nav-enter-transit',\n  23: 'icon-nav-exit-transit'\n};\n\nconst getIcon = (index, maneuver, isLastManeuver) => {\n  if (index == 0) {\n    return <i className={'icon-nav-straight'} />;\n  } else if (isLastManeuver) {\n    return <img src=\"https://static.mqcdn.com/yogi-cdn/phoenix/icons/pin.svg\" loading=\"lazy\" alt=\"\" />;\n  } else {\n    return <i className={TURN_TYPES[maneuver.turnType]} />;\n  }\n};\n\nconst getEndLocationStr = ({\n  name: endName,\n  location: {street = '', street2 = '', adminArea5, adminArea3, postalCode = ''}\n}) => {\n  if ((!street && !postalCode) || !adminArea5) {\n    return '';\n  }\n  return (\n    <p className=\"maneuver-end-location\">\n      {endName != street && street + ', '}\n      {street2 && street2 + ', '}\n      {adminArea5}, {adminArea3} {postalCode}\n    </p>\n  );\n};\n\nexport default function NarrativeManeuvers({maneuvers, endData, unit, hideHelpfulHints}) {\n  return (\n    <>\n      {maneuvers &&\n        maneuvers.map((maneuver, index) => {\n          const {distance, narrative, maneuverNotes} = maneuver,\n            willShowNotes = !!(maneuverNotes.length && !hideHelpfulHints),\n            isLastManeuver = index == maneuvers.length - 1,\n            displayDistance = distance.toFixed(distance > 0.1 ? 1 : 2);\n\n          return (\n            <div key={index} className=\"narrative-maneuver\">\n              <div className={`maneuver-text ${willShowNotes ? 'maneuver-text-with-notes' : ''}`}>\n                {getIcon(index, maneuver, isLastManeuver)}\n                <div>\n                  {isLastManeuver && endData?.name ? (\n                    <>\n                      <p className=\"maneuver-end-name\">{endData.name}</p>\n                      {endData.location && getEndLocationStr(endData)}\n                    </>\n                  ) : (\n                    <p>{narrative}</p>\n                  )}\n                </div>\n              </div>\n              {willShowNotes && (\n                <ul className=\"maneuver-notes\" data-cy=\"helpful-hints\">\n                  {isLastManeuver && endData.name && <li>{narrative}</li>}\n                  {maneuverNotes.map((note, index) => (\n                    <li key={`note_${index}`}>{note.manNote}</li>\n                  ))}\n                </ul>\n              )}\n              {!isLastManeuver && (\n                <div className=\"maneuver-distance\">\n                  <p>{`Then ${displayDistance} ${unit}`}</p>\n                </div>\n              )}\n            </div>\n          );\n        })}\n    </>\n  );\n}\n","import React from 'react';\nimport {useSelector} from 'react-redux';\n\nimport NarrativeHeader from './NarrativeHeader';\nimport NarrativeManeuvers from './NarrativeManeuvers';\n\nimport {directionsProps} from '../../../model/selectors';\n\nexport default function NarrativeSection({destination, index, unit, isRoundTrip, hideHelpfulHints}) {\n  const {destinationList, routeData} = useSelector(directionsProps);\n\n  const {\n    route: {legs}\n  } = routeData;\n\n  const endDestination = index + 1 == destinationList.length ? destinationList[0] : destinationList[index + 1];\n\n  return (\n    <>\n      {index + 1 < destinationList.length && destinationList.length > 2 && (\n        <NarrativeHeader\n          index={index}\n          leg={legs[index] != undefined && legs[index]}\n          note={destination.note}\n          startData={destinationList[index].location}\n          startName={destinationList[index].name}\n          endData={endDestination?.location}\n          endName={endDestination?.name}\n          unit={unit}\n          isRoundTrip={isRoundTrip}\n        />\n      )}\n      {!isRoundTrip && (\n        <NarrativeManeuvers\n          index={index}\n          endData={endDestination}\n          maneuvers={legs[index]?.maneuvers}\n          hideHelpfulHints={hideHelpfulHints}\n          unit={unit}\n        />\n      )}\n      {index + 2 < destinationList.length && <div className={`dashed-bottom-border directioins-section-bleed`}></div>}\n    </>\n  );\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport {trackAction} from 'gtm.service';\nimport {navigate} from 'url-utils';\nimport {useDispatch} from 'react-redux';\nimport {setInputFocused, setDropdownVisible} from '../../model/actions';\n\nimport './not-found.scss';\n\nconst NotFound = ({className = '', heading, msgLine1, msgLine2, type = 'results', showRetryButton = false}) => {\n  const classes = className ? `${className} not-found` : 'not-found';\n  const dispatch = useDispatch();\n\n  return (\n    <div className={classes} data-type={type}>\n      <h2>{heading}</h2>\n      <div className=\"bg-wrapper\">\n        {msgLine1 && <p>{msgLine1}</p>}\n        {msgLine2 && <p>{msgLine2}</p>}\n      </div>\n      {showRetryButton &&\n        <button\n          className='not-found-button'\n          onClick={() => {\n            trackAction('notfound-search-clicked', '404');\n            dispatch(setInputFocused(true));\n            dispatch(setDropdownVisible(true));\n            navigate('/');\n          }}\n        >\n          Try another search\n        </button>\n      }\n    </div>\n  );\n};\n\nNotFound.propTypes = {\n  className: PropTypes.string,\n  heading: PropTypes.string.isRequired,\n  msgLine1: PropTypes.string,\n  msgLine2: PropTypes.string,\n  type: PropTypes.oneOf(['directions', 'results'])\n};\n\nexport default NotFound;\n","import React, {useEffect} from 'react';\nimport {useSelector} from 'react-redux';\n\nimport NarrativeSection from './NarrativeSection';\nimport NotFound from '../../../components/not-found';\nimport { PAGE_STATUS } from '../../../../lib/constants.cjs';\nimport { irsReimbursement, getIsRouteLegInUSA } from '../../../../utils/directions/index.cjs';\nimport {trackAction} from 'gtm.service';\nimport {getQueryFiltered} from 'url-utils';\nimport {mergeClassNames} from 'css-utils';\n\nimport {directionsProps, routeOptimizationProps, mapProps} from '../../../model/selectors';\n\nimport './Narrative.scss';\n\nconst getFormattedTime = formattedTime => {\n  const [h, m] = formattedTime?.split(':'),\n    hour = parseInt(h);\n  return (hour ? hour + ' hr ' : '') + parseInt(m) + ' min';\n};\n\nexport default function DirectionsNarrative({className, hideHelpfulHints}) {\n  const\n    {destinationList /*, fuelCost */, routeData, status, error: errorMsg} = useSelector(directionsProps),\n    {printView} = useSelector(mapProps),\n    {routeSettings} = useSelector(routeOptimizationProps);\n\n  useEffect(() => {\n    if (status === PAGE_STATUS.ERROR && errorMsg) trackAction('no-directions-found', 'error');\n  }, [status, errorMsg]);\n\n  if (status === PAGE_STATUS.ERROR && errorMsg) {\n    return (\n      <NotFound\n        className=\"directions-error\"\n        heading=\"There's something tricky about this route.\"\n        msgLine1=\"Maybe you can't drive there\"\n        msgLine2=\"Try changing your route stops.\"\n        type=\"directions\"\n      />\n    );\n  }\n\n  if (!destinationList.length || !routeData || !routeData.info || !routeData.route) return null;\n\n  const narrativeStart = destinationList[0].street ?? destinationList[0].name,\n    narrativeEnd =\n      destinationList[destinationList.length - 1].street ?? destinationList[destinationList.length - 1].name,\n    isRouteInUSA = getIsRouteLegInUSA(routeData?.route?.locations);\n\n  const {distance, formattedTime, options} = routeData.route;\n\n  const isRoundTrip = routeSettings?.generalize?.value === 1;\n\n  const displayTime = getFormattedTime(formattedTime),\n    unit = options.unit === 'K' ? 'kilometers' : 'miles';\n\n  const isMultiStop = destinationList.length > 2;\n\n  const isPedestrian = getQueryFiltered('routeType').routeType === 'pedestrian';\n\n  return (\n    <div className={`narrative ${className}`}>\n      <div data-cy=\"route-label\" className={printView ? 'route-label' : `route-label directions-section-bleed`}>\n        {isRoundTrip ? (\n          <div className={`route-label-round-trip  ${!isMultiStop ? 'full-width' : ''}`}>Round trip from {narrativeStart}</div>\n        ) : (\n          <div className={`route-label-summary ${!isMultiStop ? 'full-width' : ''}`}>\n            <div>{narrativeStart}</div>\n            <div>\n              <span className=\"route-summary-to\">to</span> {narrativeEnd}\n            </div>\n          </div>\n        )}\n        {isMultiStop && (\n          <div className=\"route-label-stops\">\n            {isRoundTrip ? destinationList.length : destinationList.length - 1} {'stops'}\n          </div>\n        )}\n      </div>\n      <div\n        className={mergeClassNames(\n          'route-plan',\n          !printView && 'directions-section-bleed',\n          (!isRouteInUSA || isPedestrian) && 'slim'\n        )}\n      >\n        <div>\n          <span data-cy=\"time-distance-container\" className=\"time-distance-container\">\n            <p>{displayTime}</p>\n            <p>\n              {distance.toFixed(1)} {unit}\n            </p>\n          </span>\n          {!isPedestrian && isRouteInUSA && (\n            <span data-cy=\"irs-fuel-container\" className=\"fuel-IRS-container\">\n              {/* <span>\n                <p>{t('Est fuel cost:')}</p>\n                <p className={value}>{fuelCost ? `$${fuelCost}` : '...'}</p>\n                <a\n                  href=\"https://help.mapquest.com/hc/en-us/articles/218115483\"\n                  target=\"_blank\"\n                  title={t(\n                    'Based on EPA average of 35mpg hwy/25mpg city and average cost per gallon along your route. Learn more.'\n                  )}\n                >\n                  <i className=\"icon-question-mark\" />\n                </a>\n              </span> */}\n              <span>\n                <p>IRS reimbursement:</p>\n                <p className=\"value\">${irsReimbursement.calculateAmount(distance, options?.unit)}</p>\n              </span>\n            </span>\n          )}\n        </div>\n      </div>\n      {destinationList\n        .filter(destination => Object.keys(destination).length)\n        .map((destination, index) => (\n          <NarrativeSection\n            destination={destination}\n            index={index}\n            key={index}\n            hideHelpfulHints={hideHelpfulHints}\n            unit={unit}\n          />\n        ))}\n      {isRoundTrip && (\n        <NarrativeSection\n          destination={destinationList[0]}\n          index={0}\n          isRoundTrip\n          key={destinationList.length}\n          hideHelpfulHints={hideHelpfulHints}\n          unit={unit}\n        />\n      )}\n    </div>\n  );\n}\n","import PropTypes from 'prop-types';\nimport React, {useState, useEffect, useRef} from 'react';\n\nimport './MoreLess.scss'\n\n// TODO: add unique ids here for multiples of this component using built in feature from React 18\nconst MoreLess = ({ children, lines = 3 }) => {\n  const ref = useRef();\n  const [isExpanded, setIsExpanded] = useState(false);\n  const [isClamped, setIsClamped] = useState(false);\n  const [clampedHeight, setClampedHeight] = useState('auto');\n  const [lineHeight, setLineHeight] = useState(1);\n\n  const getStyle = (element, styleProp) => {\n    if (element.currentStyle) return element.currentStyle[styleProp];\n    else if (window.getComputedStyle) return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\n  }\n\n  useEffect(() => {\n    // calculate # of lines\n    const divHeight = ref.current.offsetHeight;\n    const calculatedlineHeight = parseInt(getStyle(ref.current, 'line-height'));\n    const numberOfLines = parseInt(divHeight / calculatedlineHeight);\n    setLineHeight(calculatedlineHeight);\n\n    if (numberOfLines > lines) {\n      setIsClamped(true);\n      setClampedHeight(lines * calculatedlineHeight);\n    }\n  }, [!!ref])\n\n  const toggleExpand = () => {\n    setIsExpanded(!isExpanded);\n\n    if (!isExpanded) setClampedHeight('auto');\n    else setClampedHeight(lines * lineHeight);\n  }\n\n  return (\n    <div\n      className='more-less'\n      data-collapse-toggle={isClamped}\n      data-collapsed={!isExpanded}\n    >\n      <div dangerouslySetInnerHTML={{__html: children}} className=\"more-less-text\" id='more-less-text' ref={ref} style={{ height: clampedHeight }} />\n      {isClamped && (\n        <button\n          onClick={e => (e.preventDefault(), toggleExpand())}\n          className='clamp-toggle'\n          aria-controls=\"more-less-text\"\n          aria-expanded={isExpanded}\n        >\n          <i className={`icon-angle-${isExpanded ? \"up\" : \"down\"}`} />\n          {isExpanded ? 'Less' : 'More'}\n        </button>\n      )}\n    </div>\n  );\n};\n\nMoreLess.propTypes = {\n  lines: PropTypes.number,\n  children: PropTypes.node\n};\n\nexport default MoreLess;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport './Ratings.scss';\nimport {vendors} from 'config';\n\nconst {\n  yelp: {id: YELP},\n  tripAdvisor: {id: TRIP_ADVISOR}\n} = vendors;\n\nconst Ratings = ({rating, vendor}) => {\n  if ([TRIP_ADVISOR, \"TRIPADVISOR\"].includes(vendor))\n    return (\n      <div role=\"img\" className=\"rating-block tripadvisor\" aria-label={`${rating / 2} out of 5 stars`}>\n        <div className={'rating stars-' + Math.round(rating)}>\n          <i className=\"star-1\"></i>\n          <i className=\"star-2\"></i>\n          <i className=\"star-3\"></i>\n          <i className=\"star-4\"></i>\n          <i className=\"star-5\"></i>\n        </div>\n      </div>\n    );\n  if ([YELP, \"YELP\"].includes(vendor))\n    return (\n      <div role=\"img\" className=\"rating-block yelp\" aria-label={`${rating / 2} out of 5 stars`}>\n        <div className={'rating stars-' + Math.round(rating)}>\n          <i><img src=\"https://static.mqcdn.com/yogi-cdn/yogi/icons/yelp/star.svg\" alt=\"\" /></i>\n          <i><img src=\"https://static.mqcdn.com/yogi-cdn/yogi/icons/yelp/star.svg\" alt=\"\" /></i>\n          <i><img src=\"https://static.mqcdn.com/yogi-cdn/yogi/icons/yelp/star.svg\" alt=\"\" /></i>\n          <i><img src=\"https://static.mqcdn.com/yogi-cdn/yogi/icons/yelp/star.svg\" alt=\"\" /></i>\n          <i><img src=\"https://static.mqcdn.com/yogi-cdn/yogi/icons/yelp/star.svg\" alt=\"\" /></i>\n        </div>\n      </div>\n    );\n};\n\nRatings.propTypes = {\n  rating: PropTypes.number,\n  vendor: PropTypes.oneOf([74, 106, `833`, `TRIPADVISOR`, `YELP`])\n};\n\nexport default Ratings;\n","import React from 'react';\n\nimport {isHotelMergedCtaButton} from '../styles.scss';\n\nexport default ({checkAvailabilityUrl, onClick = () => {}}) => {\n  return (\n    <>\n      <div\n        className={isHotelMergedCtaButton}\n        role=\"button\"\n        onClick={evt => {\n          window.open(checkAvailabilityUrl, '_blank').focus();\n          onClick(evt);\n        }}\n      >\n        <i className=\"icon-calendar\" aria-hidden=\"true\"></i>\n        Check availability\n      </div>\n    </>\n  );\n};\n","import React from 'react';\nimport {useSelector, useDispatch} from 'react-redux';\nimport {activeBizLocSelector} from '../../model/selectors';\nimport {setActivePoiMarker} from '../../model/actions';\nimport {removeTags} from '../../../utils/filters/index.cjs';\nimport {vendors, infoSheet} from 'config';\nimport {navigate} from 'url-utils';\n\nimport Ratings from '../infosheet/Ratings';\nimport InfoSheetHotelCTA from '../infosheet/vendor/infoSheetHotelCTA';\n\nimport {\n  result as resultItem,\n  infoContainer,\n  numerals,\n  address,\n  resultImage,\n  resultPhoneLink,\n  advertisedPrice,\n  actionButton,\n  resultDetails,\n  lowPrice\n} from './styles.scss';\n\nconst {tripAdvisor, yelp} = vendors;\nconst TRIP_ADVISOR = tripAdvisor.id;\n\nconst RatingYelp = ({rating, count}) => {\n  return (\n    <>\n      {count ? (\n        <div className=\"yelp-reviews\">\n          <Ratings rating={rating} vendor={yelp.id} />\n          <span className=\"reviews-count\">{count} reviews</span>\n          <img className=\"logo\" src={yelp.logoUrl} alt={yelp.label} />\n        </div>\n      ) : null}\n    </>\n  );\n};\n\nconst RatingTripadvisor = ({rating, count}) => {\n  return (\n    <>\n      {count && (\n        <div className=\"infosheet-rating-summary ta-summary\">\n          <img className=\"logo\" src={tripAdvisor.logoUrl} alt={tripAdvisor.label} />\n          <Ratings rating={rating} vendor={TRIP_ADVISOR} />\n          <span className=\"count\">{count} reviews</span>\n        </div>\n      )}\n    </>\n  );\n};\n\nconst LowRate = ({vendors}) => {\n  const lowRate = Object.values(vendors)\n      .map(({lowRate}) => lowRate)\n      .filter(Boolean)\n      .sort()[0];\n\n  if (lowRate)\n    return (\n      <span className={`${advertisedPrice} ${lowPrice}`}>\n        <span>from</span>\n        <span>${lowRate}</span>\n      </span>\n    );\n  else return null;\n};\n\nconst GasPrice = ({prices}) => {\n  const {price, timestamp} = (prices && Object.values(prices).sort(({price: a}, {price: b}) => a - b)[0]) || {};\n\n  if (price) {\n    const {weeks, days, hours} = dateDiff(new Date(), timestamp);\n    return (\n      // Note that gas price display is highly US-specific!\n      <span className={advertisedPrice}>\n        <span>${(Math.floor(price * 100) / 100).toFixed(2)}</span>\n        <br />\n        {weeks\n          ? `${weeks} week ago`\n          : days\n          ? `${days} day ago`\n          : hours\n          ? `${hours} hours ago`\n          : 'just now'}\n      </span>\n    );\n  } else {\n    return null;\n  }\n};\n\nconst ActionButton = ({url}) => {\n  return (\n    <div className={actionButton}>\n      <InfoSheetHotelCTA\n        checkAvailabilityUrl={url}\n        onClick={evt => {\n          evt.stopPropagation();\n        }}\n      />\n    </div>\n  );\n};\n\nexport function dateDiff(to, from) {\n  const ms = Math.max(0, +to - +from),\n    hours = Math.floor(ms / 3600000),\n    days = Math.floor(hours / 24),\n    weeks = Math.floor(days / 7);\n  return {hours, days, weeks};\n}\n\nconst createImageTag = (images, bizLoc, dataAsJson) => {\n  let src = infoSheet.placeholderImg;\n  if (bizLoc?.icon) src = bizLoc.icon;\n  else if (dataAsJson?.imageURL) src = dataAsJson.imageURL;\n  else if (images && images.length) src = images[0].url;\n\n  return <img alt=\"\" loading=\"lazy\" src={src} onError={e => (e.currentTarget.src = infoSheet.placeholderImg)} />;\n};\n\nconst createPhoneTag = phone => {\n  const FULL_PHONE_NUM_LENGTH = 10;\n\n  if (phone && phone.value) {\n    // click to call phone numbers need to be in international fmt: +1-123-456-7890\n    // @see https://developers.google.com/web/fundamentals/native-hardware/click-to-call\n\n    let phoneAttrVal = phone.value.replace(/[^0-9]/g, '');\n    if (phoneAttrVal.length === FULL_PHONE_NUM_LENGTH) {\n      phoneAttrVal = phoneAttrVal.replace(/^([0-9]{3})([0-9]{3})([0-9]{4})$/, '$1-$2-$3');\n    } else {\n      //perhaps foreign or malformed number, keep the original\n      phoneAttrVal = phone.value;\n    }\n\n    return <div className={`${resultPhoneLink}`}>{phone.value}</div>;\n  }\n\n  return null;\n};\n\nexport default ({\n  index,\n  isTopCat,\n  isFollowedByAd = false,\n  result: {\n    mqId,\n    phone,\n    slug,\n    name,\n    action,\n    address: {address1, locality, region, postalCode},\n    images,\n    vendors,\n    gasPrices,\n    dataAsJson,\n    reviews\n  },\n  onClick,\n  print\n}) => {\n  const bizLoc = useSelector(activeBizLocSelector);\n  const dispatch = useDispatch();\n\n  const isTripadvisor = Object.keys(vendors).some(vendor => vendor == TRIP_ADVISOR);\n  const averageRating = dataAsJson?.reviews?.displayAverageRatingDouble;\n  const reviewCount = dataAsJson?.reviews?.displayReviewCountInt;\n  const displayAddress = [locality, locality && (region || postalCode) && ', ', region, region && ' ', postalCode]\n    .filter(Boolean)\n    .join('');\n\n  return (\n    // react todo error nested links\n    <a\n      className={resultItem}\n      role=\"listitem\"\n      data-testid={`search-result-${index}`}\n      onClick={() => {\n        isTopCat ? navigate(slug) : onClick()\n      }}\n      onMouseEnter={() => dispatch(setActivePoiMarker(index, true))}\n      onMouseLeave={() => dispatch(setActivePoiMarker(-1))}\n      itemScope\n      itemProp=\"itemListElement\"\n      itemType=\"https://schema.org/Place\"\n      data-no-border={isFollowedByAd}\n      data-mqid={mqId}\n    >\n      {!print ? (\n        <span className={resultImage}>{createImageTag(images, bizLoc, dataAsJson)}</span>\n      ) : (\n        <i className=\"icon-nav-pin\" aria-hidden></i>\n      )}\n\n      <div className={infoContainer}>\n        <h3 className={numerals}>{name}</h3>\n\n        {isTripadvisor ? (\n          <RatingTripadvisor rating={averageRating} count={reviewCount} />\n        ) : (\n          <RatingYelp rating={averageRating} count={reviewCount} />\n        )}\n\n        {isTopCat && reviews?.values[0] ? (\n          <div className=\"top-cat\">\n            <div className=\"body\">\"{reviews?.values[0].reviewBody}</div>\n          </div>\n        ) : (\n          <div className={resultDetails}>\n            <div>\n              <div className={`${numerals} ${address}`} aria-label={`${address1 ? address1 : null} ${displayAddress}`}>\n                {address1 ? <span aria-hidden=\"true\">{address1}</span> : null}\n                <span aria-hidden=\"true\">{displayAddress}</span>\n              </div>\n\n              <div className={numerals}>{createPhoneTag(phone)}</div>\n            </div>\n\n            {print ? null : (\n              <>\n                <LowRate vendors={vendors} />\n                <GasPrice prices={gasPrices} />\n              </>\n            )}\n          </div>\n        )}\n\n        {action && !print ? <ActionButton url={action.value || action} /> : null}\n      </div>\n\n      {isTopCat && dataAsJson?.description && (\n        <div className=\"top-cat bottom\">\n          <div className=\"body\">\n            <span className=\"about\">About</span>\n            <span className=\"separator\">|</span>\n            {removeTags(dataAsJson?.description)}\n          </div>\n        </div>\n      )}\n    </a>\n  );\n};\n","import React, {Fragment, useState, useEffect} from 'react';\nimport {useSelector, useDispatch} from 'react-redux';\nimport {useLocation} from 'route-utils';\nimport {navigate, stateMap, convertStateUrl} from 'url-utils';\nimport inViewport from '../../../utils/inViewport.cjs'\n\nimport AdUnit, {AdWrapper, Ad} from '../ads/update-unit-class';\nimport {setMeta} from 'meta-utils';\nimport {setActivePoiMarker, setYpBeacons, setYextBeacons, setMobilePanelExpandedState} from '../../model/actions';\nimport {\n  searchDetailsForCurrentPage,\n  rawSearchResults,\n  searchProps,\n  mapProps,\n  searchMetadataSelector,\n  ypBeaconsSelector,\n  yextBeaconsSelector\n} from '../../model/selectors';\nimport MoreLess from '../MoreLess';\nimport SearchResult from './SearchResult';\nimport NotFound from '../../components/not-found';\nimport {PrintNotes} from '../../../extra';\nimport {SEARCH_RESULTS_PER_PAGE} from '../../model/slices';\nimport {isOneOfRouteTypes} from '../../utilities';\nimport {capitalizeDashedWord} from '../../../utils/filters/index.cjs';\nimport templatize from 'templatize';\nimport {useMobileCheck, useScrollTopContainer} from 'event-hooks';\nimport {getPageRID, convertToYpSearchTerms, getSearchBeacon, getClickBeacon} from 'yp-tracking.service';\nimport {getSearchBeacon as getYextSearchBeacon, getClickBeacon as getYextClickBeacon} from 'yext-tracking.service';\nimport {trackAction, getPageData, setPubAdsTargeting} from 'gtm.service';\n\nimport {\n  sidebarAdPlaceholder,\n  mobileSidebarAdPlaceholder,\n  searchbarAd,\n  mobileSearchbarAd,\n  searchResultsPrintContainer,\n  searchResultsPrint,\n  localResults\n} from './styles.scss';\n\nconst NoAdUnit = () => null;\n\nconst formatCategoryName = name => name.charAt(0).toUpperCase() + name.slice(1).toLowerCase();\n\nconst desktopSearchBarUnitConfig = {\n  topName: 'searchbartop',\n  bottomName: 'searchbarbottom',\n  className: searchbarAd,\n  placeholderClass: sidebarAdPlaceholder\n};\nconst mobileSearchBarUnitConfig = {\n  topName: 'mobsearchbartop',\n  bottomName: 'mobsearchbarbottom',\n  className: mobileSearchbarAd,\n  placeholderClass: mobileSidebarAdPlaceholder\n};\n\nfunction SearchResults({results, MaybeAdUnit}) {\n  if (!results) return null;\n\n  const {query, page, isTopCat, results: totalResults, topCatMetaInfo} = useSelector(searchProps),\n    isMobile = useMobileCheck(),\n    {printView} = useSelector(mapProps),\n    dispatch = useDispatch(),\n    location = useLocation(),\n    pageCount = totalResults && totalResults.length ? Math.ceil(totalResults.length / SEARCH_RESULTS_PER_PAGE) : 0,\n    LocalResultsHeader = props => (\n      <h2 className={localResults}>\n        Local Results\n        {props.children}\n      </h2>\n    ),\n    resultsInDataLayer = {},\n    [searchBarUnit, setSearchBarUnit] = useState(isMobile ? mobileSearchBarUnitConfig : desktopSearchBarUnitConfig),\n    searchMetadata = useSelector(searchMetadataSelector),\n    ypBeacons = useSelector(ypBeaconsSelector),\n    yextBeacons = useSelector(yextBeaconsSelector);\n\n  useScrollTopContainer([results]);\n  const [pageYpSearchRid] = useState(getPageRID()),\n    [pageYpClickRid] = useState(getPageRID());\n\n  const showInfosheet = (result, index) => {\n    window.location.href = result?.salt ?? result.slug;\n    dispatch(setActivePoiMarker(index));\n    dispatch(setMobilePanelExpandedState('expanded-partially'));\n\n    // Add YP Click Beacon\n    // LinkType=1600: harcoded value from Yogi\n    const ypUrl = getClickBeacon(result, 1600, pageYpClickRid, 'organic', isMobile, '', 'Search');\n    if (ypUrl && !ypBeacons[ypUrl]) {\n      const newBeacons = [...ypBeacons, ypUrl];\n      dispatch(setYpBeacons(newBeacons));\n      trackAction('click', 'yp-tracking', {label: ypUrl});\n    }\n\n    // Add Yext Beacon\n    const yextUrl = getYextClickBeacon(result, 'serp', 'moreinfo');\n    if (yextUrl && !yextBeacons[yextUrl]) {\n      const newBeacons = [...yextBeacons, yextUrl];\n      dispatch(setYextBeacons(newBeacons));\n    }\n  };\n\n  const [previousResults, setPreviousResults] = useState(null);\n\n  useEffect(() => {\n    // Add YP Beacons\n    const searchTerms = convertToYpSearchTerms(searchMetadata),\n      ypUrl = getSearchBeacon(results, searchTerms, pageYpSearchRid, 'organic', isMobile);\n    if (ypUrl && !ypBeacons[ypUrl]) {\n      const newBeacons = [...ypBeacons, ypUrl];\n      dispatch(setYpBeacons(newBeacons));\n      trackAction('search', 'yp-tracking', {label: ypUrl});\n    }\n\n    // Add Yext Beacons\n    const yextUrl = getYextSearchBeacon(results, page, SEARCH_RESULTS_PER_PAGE, searchMetadata);\n    if (yextUrl && !yextBeacons[yextUrl]) {\n      const newBeacons = [...yextBeacons, yextUrl];\n      dispatch(setYextBeacons(newBeacons));\n    }\n\n    if ((!previousResults || previousResults.length) && !results.length) {\n      trackAction('no-search-results', 'error');\n    }\n    setPreviousResults(results);\n\n    // set the first result as a targeting taxonomy\n    if (results?.[0]?.dataAsJson?.sicCodes?.length) {\n      const data = results[0];\n      getPageData(data.dataAsJson.sicCodes)\n        .then(sicData => {\n          setPubAdsTargeting(sicData.taxonomy);\n        })\n        .catch(error => {\n          console.error(error);\n          window.newrelic?.noticeError(error);\n        });\n    }\n  }, [results]);\n\n  useEffect(() => {\n    // set ad units\n    setSearchBarUnit(isMobile ? mobileSearchBarUnitConfig : desktopSearchBarUnitConfig);\n  }, [isMobile]);\n\n  const [topCatData, setTopCatData] = useState(null);\n\n  useEffect(() => {\n    //TopCat search\n    if (isOneOfRouteTypes(location.pathname, 'top')) {\n      // parse URL\n      const parts = location.pathname.split('/');\n      let category = '',\n        formattedState = '',\n        formattedCity = '';\n      if (parts.length == 6) {\n        let [_0, _1, country, state, city, cat] = parts;\n        if (state.toUpperCase() in stateMap) {\n          const newPath = convertStateUrl(location.pathname, state);\n          navigate(newPath);\n        }\n        category = cat;\n        if (document.location.search && new URL(document.location).searchParams.get('xyz') === 'zyx') {\n          [country, state, city] = templatize([0, 1, 2], 'urlParts');\n        }\n        formattedState = capitalizeDashedWord(state);\n        formattedCity = capitalizeDashedWord(city);\n        setTopCatData({country, state: formattedState, city: formattedCity, category});\n      } else {\n        //Set TopCat meta data with no location or category data yet\n        setMeta({\n          type: 'website',\n          pageTitle: 'Best Points of Interest',\n          pageDesc:\n            'Find the best points of interest around and get detailed driving directions with road conditions, live traffic updates, and reviews.'\n        });\n      }\n\n      // fetch data\n      if (category && topCatMetaInfo.name) {\n        setMeta({\n          type: 'website',\n          pageTitle: `Best ${topCatMetaInfo.name} in ${formattedCity}, ${formattedState}`,\n          pageDesc: `Find the best ${topCatMetaInfo.name.toLowerCase()} around ${formattedCity}, ${formattedState} and get detailed driving directions with road conditions, live traffic updates, and reviews.`\n        });\n      } else if (formattedCity && formattedState) {\n        //Set TopCat meta data with just location data\n        setMeta({\n          type: 'website',\n          pageTitle: `Best Points of Interest in ${formattedCity}, ${formattedState}`,\n          pageDesc: `Find the best points of interest around ${formattedCity}, ${formattedState} and get detailed driving directions with road conditions, live traffic updates, and reviews.`\n        });\n      }\n    } else {\n      //Generic search meta-setting\n      setMeta({\n        type: 'search',\n        pageTitle: query,\n        pageDesc: `Find the best ${query} around and get detailed driving directions with road conditions, live traffic updates, and reviews.`\n      });\n    }\n  }, [query, topCatMetaInfo]);\n\n  const handleDataLayer = () => {\n    results?.map(result => {\n      const mqId = result.mqId\n\n      if (!resultsInDataLayer[mqId] && Object.keys(result?.vendors).length) {\n        const element = document.querySelector(`[data-mqid=\"${mqId}\"]`)\n\n        if (inViewport(element)){\n          const formattedVendorData = {}\n          Object.keys(result.vendors).forEach(key => formattedVendorData[key] = result.vendors[key].id)\n\n          trackAction('serp-view', 'search', { 'target-properties': mqId, vendor: formattedVendorData })\n          resultsInDataLayer[mqId] = true\n        }\n      }\n    })\n  }\n\n  useEffect(() => {\n    const scrollListener = 'onscrollend' in window ? 'scrollend' : 'scroll'\n    const contentContainer = document?.querySelector('#contentContainer')\n    contentContainer?.addEventListener(scrollListener, handleDataLayer, { passive: true })\n    handleDataLayer()\n\n    return () => {\n      dispatch(setMobilePanelExpandedState('expanded-partially'))\n      contentContainer?.removeEventListener(scrollListener, handleDataLayer)\n    }\n  }, [])\n\n  if (results.length && !printView) {\n    let bottomAdCounter = 1;\n\n    return (\n      <div>\n        <AdWrapper showAdTitle isMobile={isMobile}>\n          <MaybeAdUnit\n            name={searchBarUnit.topName}\n            className={searchBarUnit.className}\n            placeholderClass={searchBarUnit.placeholderClass}\n          />\n        </AdWrapper>\n\n        {isOneOfRouteTypes(location.pathname, 'top') && topCatMetaInfo.name && (\n          <div className=\"top-cat-content-container\">\n            <h1>\n              {formatCategoryName(topCatMetaInfo.name)} in {topCatData?.city}, {topCatData?.state}\n            </h1>\n          </div>\n        )}\n\n        {isTopCat && topCatMetaInfo.description && (\n          <div className=\"top-cat-description-block\">\n            <MoreLess lines={4}>{topCatMetaInfo.description}</MoreLess>\n          </div>\n        )}\n\n        <div itemScope itemType=\"https://schema.org/ItemList\" aria-label=\"search results\" role=\"list\">\n          {results.map((result, index) => {\n            return (\n              <Fragment key={`${result.slug}_${index}`}>\n                <SearchResult\n                  index={index}\n                  result={result}\n                  onClick={() => showInfosheet(result, index)}\n                  isTopCat={isTopCat}\n                  isFollowedByAd={(index + 1) % 5 === 0}\n                />\n\n                {/* For every 5 iterations, display an ad */}\n                {(index + 1) % 5 === 0 && (\n                  <AdWrapper showAdTitle={true} isMobile={isMobile}>\n                    <MaybeAdUnit\n                      name={searchBarUnit.bottomName}\n                      adCounter={bottomAdCounter++}\n                      className={searchBarUnit.className}\n                      placeholderClass={searchBarUnit.placeholderClass}\n                    />\n                  </AdWrapper>\n                )}\n              </Fragment>\n            );\n          })}\n        </div>\n      </div>\n    );\n  }\n\n  if (results.length && printView) {\n    return (\n      <div className={searchResultsPrintContainer}>\n        <div>\n          <img\n            className='mq-logo'\n            loading=\"lazy\"\n            alt=\"MapQuest\"\n            src=\"https://static.mqcdn.com/yogi-cdn/yogi/graphics/mq-full-logo-black.svg\"\n          />\n        </div>\n        <h1>Search Results for {query}</h1>\n        <PrintNotes />\n        <LocalResultsHeader>\n          <span>page {page + 1} of {pageCount}</span>\n        </LocalResultsHeader>\n        <div className={searchResultsPrint}>\n          {results.map((result, index) => (\n            <SearchResult\n              key={`${result.slug}_${index}`}\n              result={result}\n              onClick={() => showInfosheet(result, index)}\n              print\n            />\n          ))}\n        </div>\n      </div>\n    );\n  }\n\n  return (\n    <>\n      <NotFound\n        heading=\"No results found\"\n        msgLine1=\"Maybe there's a typo in your search?\"\n        showRetryButton={true}\n      />\n      <>\n        {!isMobile && (\n          <AdWrapper showAdTitle={true}>\n            <AdUnit name=\"searchbarhome\" className={searchbarAd} placeholder={sidebarAdPlaceholder} />\n          </AdWrapper>\n        )}\n      </>\n    </>\n  );\n}\n\nexport default ({secondary}) => {\n  const rawResults = useSelector(rawSearchResults),\n    resultsWithDetails = useSelector(searchDetailsForCurrentPage),\n    [results, setResults] = useState(null);\n\n  useEffect(() => {\n    if (rawResults) {\n      if (results !== resultsWithDetails && resultsWithDetails?.length > 0 == rawResults.length > 0)\n        setResults(resultsWithDetails);\n    } else if (results) {\n      setResults(null);\n    }\n  }, [rawResults, resultsWithDetails, results]);\n\n  if (results) return <SearchResults results={results} MaybeAdUnit={secondary ? NoAdUnit : Ad} />;\n};\n","import React, { useEffect, useState } from 'react'\nimport PropTypes from 'prop-types'\n\n/**\n * Predefined image sizes for proxy; this should match what is configured in Next.js\n * @see https://nextjs.org/docs/pages/api-reference/components/image#imagesizes\n * @type {number[]}\n */\nconst IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384]\n\nconst ImagePropTypes = {\n  alt: PropTypes.string,\n  fallbackSrc: PropTypes.string,\n  height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n  loading: PropTypes.oneOf(['eager', 'lazy']),\n  /**\n   * The image proxy host, in local development this can be set to the Next.js app\n   * running locally or the deployed Production URL to test image optimization.\n   * @default '/'\n   */\n  proxyHost: PropTypes.string,\n  src: PropTypes.string,\n  /**\n   * @default 75\n   */\n  quality: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n}\n\n/**\n * Image component polyfill for CSR that proxies through the Next.js image optimization endpoint.\n * @see https://nextjs.org/docs/pages/api-reference/components/image\n * @type {React.FC<PropTypes.InferProps<ImagePropTypes>>}\n * @returns {React.ReactElement}\n */\nconst Image = ({\n  alt = '',\n  fallbackSrc = 'https://s1-mqcdn-public.s3.amazonaws.com/phoenix/icons/NoPOIPhotoProvidedLandscape.svg',\n  height,\n  loading = 'lazy',\n  proxyHost = process.env.IMAGE_PROXY_HOST || '/',\n  quality = 75,\n  src,\n  width,\n  ...props\n}) => {\n  const [useFallbackSrc, setUseFallbackSrc] = useState(false)\n  const [effectiveSrc, setEffectiveSrc] = useState()\n  const [effectiveWidth, setEffectiveWidth] = useState()\n\n  useEffect(() => {\n    setUseFallbackSrc(false)\n    setEffectiveWidth(IMAGE_SIZES.find(s => s >= parseInt(width)) || IMAGE_SIZES[IMAGE_SIZES.length - 1])\n    setEffectiveSrc(`${proxyHost}_next/image?url=${encodeURIComponent(src)}`)\n  }, [width, src])\n\n  const onError = () => setUseFallbackSrc(true)\n\n  if (!src || !effectiveSrc) return\n\n  const srcSet = useFallbackSrc\n    ? [fallbackSrc]\n    : [\n      `${effectiveSrc}&w=${effectiveWidth}&q=${quality}`,\n      `${effectiveSrc}&w=${IMAGE_SIZES[IMAGE_SIZES.findIndex(s => s === effectiveWidth) + 1] || IMAGE_SIZES[IMAGE_SIZES.length - 1]}&q=${quality}`\n    ]\n\n  return (\n    <img\n      alt={alt}\n      decoding=\"async\"\n      loading={loading}\n      height={height}\n      srcSet={srcSet.map((src, index) => `${src} ${index + 1}x`).join(', ')}\n      src={srcSet[0]}\n      width={width}\n      onError={onError}\n      {...props}\n    />\n  )\n}\n\nImage.propTypes = ImagePropTypes\n\nexport default Image\n","import React from 'react';\nimport { useDispatch } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport Image from '../Image';\nimport './BestOfListItem.scss';\nimport Ratings from '../infosheet/Ratings';\nimport { setMobilePanelExpandedState } from '../../model/actions';\nimport { formatOpeningTime } from '../../../lib/meta-utils/index.cjs';\nimport { getPriceRange } from '../../../lib/meta-utils/index.cjs';\nimport { PRICE_RANGE } from '../../../lib/constants.cjs';\nimport {navigate} from 'url-utils';\n\nconst BestOfListItem = ({name, url, img, rating, reviewCount, hours, price}) => {\n  const dispatch = useDispatch();\n  const openingTime = hours ? formatOpeningTime(hours) : null;\n  const urlPath = (new URL(url))?.pathname;\n\n  return (\n    <article className=\"best-of-list-item\">\n      <Image src={img?.url} width=\"367\" height=\"124\" alt={img?.caption ?? ''} />\n      <div className=\"details-container\">\n        {/* {(categoryName || location) && (\n          <p className=\"category-container dot-divide\">{categoryName && <span>{categoryName}</span>}</p>\n        )} */}\n        <a\n          href={urlPath}\n        >\n          <p className=\"h4\">{name}</p>\n        </a>\n        {(rating || openingTime) && (\n          <div className=\"rating-hours dot-divide\">\n            {!!rating?.value && !!rating?.provider && (\n              <div className=\"rating\">\n                <div>\n                  <Ratings rating={rating.value * 2} vendor={rating.provider} />\n                </div>\n                {reviewCount > 0 && <div className=\"review-count\">{reviewCount.toLocaleString('en-US')}</div>}\n              </div>\n            )}\n            {getPriceRange(price) && <p className=\"price\">{'$'.repeat(getPriceRange(price))}</p>}\n            {openingTime && <div className=\"hours\" dangerouslySetInnerHTML={{__html: openingTime}} />}\n          </div>\n        )}\n      </div>\n    </article>\n  );\n};\n\nexport default BestOfListItem;\n\nBestOfListItem.propTypes = {\n  name: PropTypes.string.isRequired,\n  url: PropTypes.string.isRequired,\n  img: PropTypes.shape({\n    url: PropTypes.string.isRequired,\n    caption: PropTypes.string\n  }),\n  rating: PropTypes.shape({\n    provider: PropTypes.oneOf([74, 106]),\n    value: PropTypes.number\n  }),\n  categoryName: PropTypes.string,\n  location: PropTypes.string,\n  reviewCount: PropTypes.number,\n  hours: PropTypes.shape({\n    isOpenNow: PropTypes.bool,\n    open: PropTypes.arrayOf(\n      PropTypes.shape({\n        dayOfWeek: PropTypes.number,\n        start: PropTypes.string,\n        end: PropTypes.string\n      })\n    )\n  }),\n  price: PropTypes.oneOf(Object.keys(PRICE_RANGE).map(price => price.toUpperCase()))\n};\n","import React, {useId} from 'react';\nimport PropTypes from 'prop-types';\nimport './BestOfList.scss';\nimport BestOfListItem from '../BestOfListItem';\nimport {normalizeSlug, convertStateUrl, navigate} from 'url-utils'\nimport {vendors} from 'config';\nimport {useDispatch} from 'react-redux';\nimport {setIsSearching, setMobilePanelExpandedState} from '../../model/actions';\n\nconst getPlaceProps = ({node}) => {\n  let ratingProvider;\n  const placeRatingProviderLabel = node?.rating?.provider?.toLowerCase();\n  if (placeRatingProviderLabel === vendors.tripAdvisor.label.toLowerCase()) {\n    ratingProvider = vendors.tripAdvisor.id;\n  } else if (placeRatingProviderLabel === vendors.yelp.label.toLowerCase()) {\n    ratingProvider = vendors.yelp.id;\n  }\n  return {\n    name: node.name,\n    url: node.url,\n    img: node.photos.primary,\n    rating: {value: node?.rating?.value, provider: ratingProvider},\n    categoryName: node.categories?.edges?.length ? node.categories?.edges[0].node.name : undefined,\n    location: node.location.locality,\n    reviewCount: node.reviews.totalCount,\n    hours: node.hours,\n    price: node.price\n  };\n};\n\nconst BestOfList = ({\n  data,\n  title,\n  buttonText,\n  description,\n  slug,\n  locality,\n  region,\n}) => {\n  if (!data?.edges?.length) return null;\n\n  const dispatch = useDispatch();\n  const divId = useId();\n  const nearbyPlaces = data?.edges?.slice(0, 4);\n\n  let topCatLink = region && locality ? `/top/us/${normalizeSlug(region)}/${normalizeSlug(locality)}/${slug}` : null;\n  if (topCatLink) topCatLink = convertStateUrl(topCatLink, region);\n\n  return (\n    <section className=\"best-of-list\" aria-labelledby={divId}>\n      <div className=\"title-container\">\n        <h3 id={divId}>{title}</h3>\n      </div>\n      {description && <p className=\"description\">{description}</p>}\n      <div className=\"list-container\">\n        {nearbyPlaces.map(place => {\n          return <BestOfListItem key={place.node.id} {...getPlaceProps(place)} />;\n        })}\n      </div>\n      {topCatLink && (\n        <a\n          href={topCatLink}\n          onClick={(e) => {\n            e.preventDefault();\n            dispatch(setIsSearching(true));\n            dispatch(setMobilePanelExpandedState('expanded-partially'));\n            window.location.href = topCatLink;\n          }}\n          className=\"show-more\"\n          rel=\"nofollow\"\n        >\n          <i role=\"img\" aria-label=\"Show\" className=\"icon-plus-alt\"></i>\n          <span>{buttonText}</span>\n        </a>\n      )}\n    </section>\n  );\n};\n\nexport default BestOfList;\n\nBestOfList.propTypes = {\n  slug: PropTypes.string.isRequired,\n  description: PropTypes.string,\n  title: PropTypes.string,\n  rows: PropTypes.number\n};\n","exports.GET_BEST_OF_LIST = `\n  query GetBestOfList($at: GeoPointInput!, $first: Int, $minPhotos: Int) {\n    locality(at: $at) {\n      location { region locality }\n      restaurants: nearby(category: [\n        \"100-1000\",\n        \"200-2000-0011\",\n        \"200-2000-0019\",\n        \"200-2000-0368\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n      attractions: nearby(category: [\n        \"200-2100-0019\",\n        \"200-2100-0000\",\n        \"200-2200-0020\",\n        \"300-3000\",\n        \"300-3100\",\n        \"550-5510-0202\",\n        \"550-5510-0205\",\n        \"550-5510-0242\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n      hotels: nearby(category: [\n        \"500-5000\",\n        \"500-5100\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n      parks: nearby(category: [\n        \"550-5510-0202\",\n        \"550-5510-0205\",\n        \"550-5510-0242\",\n        \"550-5510-0204\",\n        \"350-3500\",\n        \"350-3510\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n    }\n  }\n\n  fragment BestOfResults on SearchResultItemConnection {\n    edges {\n      node {\n        ... on LocalBusiness {\n          id\n          name\n          url\n          categories(withUrlOnly: true) {\n            edges { node { name } }\n          }\n          location { locality }\n          photos {\n            primary {\n              caption\n              url\n            }\n          }\n          rating { provider value }\n          reviews { totalCount }\n          hours {\n            isOpenNow\n            open { end start dayOfWeek }\n            timeZone\n          }\n          price\n        }\n      }\n    }\n  }\n`\n\nexports.INFOSHEET_GET_BEST_OF = `\n  query InfosheetGetBestOf($id: ID!, $first: Int, $minPhotos: Int) {\n    place(id: $id) {\n      name\n      ...GetBestOfList\n    }\n  }\n\n  fragment GetBestOfList on Locality {\n      location { region locality }\n      restaurants: nearby(category: [\n        \"100-1000\",\n        \"200-2000-0011\",\n        \"200-2000-0019\",\n        \"200-2000-0368\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n      attractions: nearby(category: [\n        \"200-2100-0019\",\n        \"200-2100-0000\",\n        \"200-2200-0020\",\n        \"300-3000\",\n        \"300-3100\",\n        \"550-5510-0202\",\n        \"550-5510-0205\",\n        \"550-5510-0242\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n      hotels: nearby(category: [\n        \"500-5000\",\n        \"500-5100\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n      parks: nearby(category: [\n        \"550-5510-0202\",\n        \"550-5510-0205\",\n        \"550-5510-0242\",\n        \"550-5510-0204\",\n        \"350-3500\",\n        \"350-3510\"\n      ], first: $first, minPhotos: $minPhotos) { ...BestOfResults }\n  }\n\n  fragment BestOfResults on SearchResultItemConnection {\n    edges {\n      node {\n        ... on LocalBusiness {\n          id\n          name\n          url\n          categories(withUrlOnly: true) {\n            edges { node { name } }\n          }\n          location { locality }\n          photos {\n            primary {\n              caption\n              url\n            }\n          }\n          rating { provider value }\n          reviews { totalCount }\n          hours {\n            isOpenNow\n            open { end start dayOfWeek }\n            timeZone\n          }\n          price\n        }\n      }\n    }\n  }\n`\n\n","import React from 'react';\nimport {sharedStore, addTrigger, createThunk} from 'morass';\nimport {createSelector} from 'reselect';\nimport {api} from 'config';\nimport {TOP_CATEGORIES_QUERY} from '../graphql/topcat/index.cjs';\n\nimport {addSearchProvider} from '../shared';\nimport {\n  SEARCH_RESULTS_PER_PAGE,\n  MAX_SEARCH_RESULTS_PAGES,\n  TOP_CATS_RESULTS_PER_PAGE,\n  removeDashes,\n  makeQueryForTopCats\n} from './slices';\nimport {setSearchResults, setSearchDetails, searchFailed, setSearchMetadata, setTopCatMetaInfo} from './actions';\nimport {searchProps, mapProps, searchState, allSearchDetailsAvailable, rawSearchDetails} from './selectors';\n\nimport templatize from 'templatize';\n\nconst {mqcons, searchV1, graphQL} = api;\n\nconst collected = [];\nexport const SearchContext = React.createContext(collected);\n\nlet lastSearchUrl = null;\n\nsharedStore().dispatch(\n  addSearchProvider(\n    'MQ',\n    createThunk(\n      creator =>\n        (page = 0) =>\n        async (dispatch, getState) => {\n          const state = getState();\n\n          try {\n            const {query, bounds, count, metaInfo} = await calculateSearchParameters(state),\n              url = searchUrl(query, bounds, page, count);\n\n            lastSearchUrl = url;\n            const response = await fetch(url);\n            if (lastSearchUrl !== url) return; // only the last search URL is honored\n            lastSearchUrl = null;\n\n            if (!response.ok) throw Error(response.statusText);\n            dispatch(setTopCatMetaInfo(metaInfo));\n\n            const details = {},\n              {saveAdParameters} = collectAdParameters();\n\n            let {metadata, results} = await response.json();\n            dispatch(setSearchMetadata(metadata));\n\n            if (document?.location?.search && new URL(document?.location).searchParams.get('xyz') === 'zyx') {\n              // transform the result for a template\n              results.forEach(item => {\n                if (item.dataAsJsonStr && !item.dataAsJson) {\n                  item.dataAsJson = JSON.parse(item.dataAsJsonStr);\n                }\n              });\n              const newResults = templatize(results, 'searchResults');\n              newResults.forEach((item, index) => {\n                Object.keys(item)\n                  .filter(name => name === 'latLng' || /LatLng$/.test(name))\n                  .forEach(name => (item[name] = results[index][name]));\n              });\n              results = newResults;\n            }\n\n            results = results.map(\n              // FIXME: using side effects in .map() to implement a tee in the pipeline\n              item => splitSearchItem(item, extraProps => (details[item.mqId] = extraProps), saveAdParameters)\n            );\n\n            dispatch(creator(results));\n\n            if (!emptyObject(details))\n              // FIXME: this assumes we got ALL of the details from search query if we got ANY at all\n              dispatch(setSearchDetails(details));\n            else if (!searchState(getState()).pending)\n              // Note that the store state at this point may be different from `state' above.\n              // This is an optimization: we want to avoid lookup if another search is already in the pipeline.\n              dispatch(lookupDetails(results, page));\n          } catch (error) {\n            dispatch(searchFailed(error.message));\n            window.newrelic?.noticeError(error);\n            throw error;\n          }\n        },\n      setSearchResults\n    )\n  )\n);\n\naddTrigger(\n  createSelector(searchState, ({page}) => page),\n  page => (dispatch, getState) => {\n    const state = getState(),\n      {inprogress} = searchState(state);\n\n    if (!inprogress && !allSearchDetailsAvailable(state))\n      // allSearchDetailsAvailable==false implies results!=null\n      dispatch(lookupDetails(searchProps(state).results, page));\n  }\n);\n\n// An internal thunk\nfunction lookupDetails(results, page) {\n  return async (dispatch, getState) => {\n    const details = rawSearchDetails(getState()),\n      {saveAdParameters} = collectAdParameters();\n\n    try {\n      const newDetails = await Promise.all(\n          results\n            .slice(page * SEARCH_RESULTS_PER_PAGE, (page + 1) * SEARCH_RESULTS_PER_PAGE)\n            .map(({mqId, slug}) => (mqId in details ? null : lookupDetailsItem(slug, saveAdParameters)))\n        ),\n        state = getState(); // The Redux state may have changed at this point\n\n      if (!searchState(state).inprogress && results === searchProps(state).results) {\n        // FIXME: assumptions - (1) `results' is what was in Redux store and (2) only new searches update it\n        dispatch(setSearchDetails(Object.assign({}, ...newDetails)));\n      }\n    } catch (error) {\n      dispatch(searchFailed(error.message));\n      console.error(error);\n      window.newrelic?.noticeError(error);\n    }\n  };\n}\n\nasync function lookupDetailsItem(slug, saveAdParameters) {\n  const response = await fetch(itemUrl(slug));\n  if (!response.ok) throw Error(response.statusText);\n\n  let details;\n  const {mqId} = splitSearchItem(await response.json(), d => (details = d), saveAdParameters);\n\n  return {[mqId]: details};\n}\n\nasync function calculateSearchParameters(state) {\n  const props = searchProps(state),\n    {area, category, isDisambiguatedSearch, isTopCat} = props;\n\n  let {bounds} = mapProps(state),\n    {query} = props,\n    metaInfo = {name: '', description: ''};\n\n  const isFakeQuery = !query || (area && category && query === makeQueryForTopCats(area, category));\n\n  if (area && category && isFakeQuery) {\n    const [_, _1, state, city] = area.split('/');\n\n    // Query GraphQL for top category and bounding box\n    const gqlResponse = await fetch(graphQL, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/json'\n      },\n      body: JSON.stringify({\n        query: TOP_CATEGORIES_QUERY,\n        variables: {\n          id: `/top${area}/${category}`\n        }\n      })\n    }).then(res => res.json()).catch(error => {\n      console.error(error)\n      window.newrelic?.noticeError(error)\n      return null\n    })\n\n    const topCategory = gqlResponse?.data?.category;\n    metaInfo.name = topCategory?.node?.name;\n    metaInfo.description = topCategory?.description;\n    const topCategoryName = topCategory?.node?.name;\n    const resultBounds = topCategory?.locality?.map?.bounds;\n\n    if (resultBounds) {\n      bounds = {\n        north: resultBounds.ne.latitude,\n        west: resultBounds.sw.longitude,\n        south: resultBounds.sw.latitude,\n        east: resultBounds.ne.longitude\n      }\n      if (category === 'places-to-eat') query = 'restaurants';\n      else if (topCategory && topCategoryName) query = topCategoryName.toLowerCase();\n      else query = '';\n    } else {\n      query = topCategoryName ? `${topCategoryName} in ${removeDashes(city)}, ${removeDashes(state)}` : '';\n    }\n  } else if (query && state.activeBizLoc && state.bizlocs) {\n    const bizloc = state.bizlocs.find(bizloc => bizloc.name.toLowerCase() === query.toLowerCase());\n    if (bizloc) {\n      query = bizloc.query;\n    }\n  }\n\n  let count = isDisambiguatedSearch ? SEARCH_RESULTS_PER_PAGE : MAX_SEARCH_RESULTS_PAGES * SEARCH_RESULTS_PER_PAGE;\n  if (isTopCat) count = TOP_CATS_RESULTS_PER_PAGE;\n\n  return {query, bounds, count, metaInfo};\n}\n\nfunction searchUrl(query, bounds, page, count) {\n  const url = new URL(searchV1),\n    searchParams = url.searchParams;\n\n  if (bounds) {\n    searchParams.append('boundingBox', `${bounds.north},${bounds.west},${bounds.south},${bounds.east}`);\n  }\n  searchParams.append('query', query);\n  searchParams.append('count', count);\n  searchParams.append('prefetch', SEARCH_RESULTS_PER_PAGE);\n  searchParams.append('client', 'yogi');\n  searchParams.append('clip', 'none');\n\n  return url.href;\n}\n\nfunction itemUrl(slug) {\n  return mqcons + `place/salt${slug}?client=yogi`;\n}\n\nfunction splitSearchItem(\n  {mqId, name, address, latLng, slug, salt, sources: _2, index, ...details},\n  saveDetails,\n  saveAdParameters\n) {\n  if (!emptyObject(details)) {\n    const {\n      ['@type']: type,\n      ['@adparameters']: adParameters,\n      categories,\n      phone,\n      aggregateRating,\n      images,\n      url,\n      reviews,\n      amenities,\n      vendorData,\n      actionUrl,\n      gasPrices: {values} = {}\n    } = details;\n\n    saveDetails({\n      type,\n      categories,\n      phone,\n      images,\n      url,\n      reviews,\n      amenities,\n      actionUrl,\n      rating: aggregateRating && aggregateRating.value,\n      ypBidToken: details['@context']?.ypBidToken,\n      vendors: (vendorData || []).reduce((all, {['@vendor']: vendor, ...props}) => ({...all, [vendor]: props}), {}),\n      ...(values && {\n        gasPrices: Object.values(values).reduce(\n          (all, {product, timestamp, ...props}) => ({...all, [product]: {...props, timestamp: new Date(timestamp)}}),\n          {}\n        )\n      })\n    });\n\n    if (adParameters) saveAdParameters(adParameters);\n  }\n\n  return {\n    mqId,\n    index,\n    slug,\n    salt,\n    address,\n    location: latLng,\n    name: (name && name.value) || name,\n    dataAsJson: !details.dataAsJson && details.dataAsJsonStr ? JSON.parse(details.dataAsJsonStr) : {},\n    ypBidToken: details['@context']?.ypBidToken\n  };\n}\n\nfunction collectAdParameters() {\n  return {\n    saveAdParameters(record) {\n      collected.push(record);\n    }\n  };\n}\n\nfunction emptyObject(obj) {\n  return Object.keys(obj).length == 0;\n}\n","exports.TOP_CATEGORIES_QUERY = `\n  query GetTopCategories($id: ID!) {\n    category(id: $id) {\n      description\n      node { name }\n      locality {\n        map {\n          bounds {\n            ne { latitude longitude }\n            sw { latitude longitude }\n          }\n        }\n      }\n    }\n  }\n`\n","import React, {useContext, useEffect, useState} from 'react';\nimport {connect, useDispatch, useSelector} from 'react-redux';\nimport {useLocation} from 'route-utils';\nimport {normalizeQuery, navigate} from 'url-utils';\nimport {useMobileCheck, useOutsideClick} from 'event-hooks';\nimport search from '../../model/search';\nimport {searchProps} from '../../model/selectors';\nimport {\n  setDropdownVisible as setDropdownVisibleAction,\n  setSearchQueryEx,\n  addRecentSearch,\n  setInfoSheetActive,\n  setInfosheetMqId,\n  setInfosheetSlug,\n  setInfosheetData,\n  setMapCenter,\n  setInputFocused\n} from '../../model/actions';\nimport MQLocation from '../../model/MQLocation';\n\nimport SearchAhead from './SearchAhead';\nimport SearchInput from './SearchInput';\nimport MobileSearchModal from './MobileSearchModal';\n\n// TODO - Add icons once we have custom fonts\nimport {mqSearchBox} from './styles.scss';\n\nimport {trackAction} from 'gtm.service';\nimport {SearchContext} from '../../model/mq-search';\nimport {getPage} from '../../utilities';\nimport {summarizeKvcat, summarizeKvcity} from '../../../utils/trackAction.cjs';\n\nconst SearchBox = connect(searchProps, {search, addRecentSearch})(\n  ({\n    addRecentSearch,\n    containerClass = mqSearchBox,\n    query,\n    isInternalQuery,\n    dropdownVisible,\n    showClearButton = false\n  }) => {\n    const location = useLocation(),\n      isDirections = getPage(location.pathname) === 'directions',\n      isMobile = useMobileCheck(),\n      dispatch = useDispatch(),\n      {inputFocused} = useSelector(searchProps),\n      outsideClick = useOutsideClick(() => setDropdownVisible(false)),\n      searchContext = useContext(SearchContext),\n      [localQuery, setLocalQuery] = useState(query),\n      [trackSearchPerformedHome, setTrackSearchPerformedHome] = useState(false),\n      setDropdownVisible = visible => void dispatch(setDropdownVisibleAction(visible)),\n      [arrowsUsed, setArrowsUsed] = useState(false),\n      [tabUsed, setTabUsed] = useState(false);\n\n    useEffect(() => {\n      // listens for ArrowDown keypress\n      window.addEventListener('keydown', keyDownHandler, { passive: true });\n      return () => window.removeEventListener('keydown', keyDownHandler);\n    }, []);\n\n    // closes search ahead dropdown if user keeps tabbing through content\n    // keeps search ahead open when user presses ArrowDown or ArrowUp key to traverse list of search ahead items\n    useEffect(() => {\n      if (!arrowsUsed && tabUsed) {\n        setDropdownVisible(false);\n        setTabUsed(false);\n      }\n    }, [arrowsUsed, tabUsed]);\n\n    useEffect(() => {\n      if (!isInternalQuery) {\n        setLocalQuery(query);\n      }\n    }, [query, isInternalQuery]);\n\n    useEffect(() => {\n      if (searchContext.length && trackSearchPerformedHome) {\n        setTrackSearchPerformedHome(false);\n        trackAction(\n          'search-performed-home',\n          'home',\n          {\n            'target-properties': query,\n            kvcat: summarizeKvcat(searchContext),\n            kvdcity: [summarizeKvcity(searchContext)]\n          }\n        );\n      }\n    }, [searchContext.length, trackSearchPerformedHome]);\n\n    const keyDownHandler = e => {\n      if (e.key === 'ArrowDown' || e.key === 'ArrowUp') setArrowsUsed(true);\n      else if (e.key === 'Tab') setTabUsed(true);\n      else {\n        setArrowsUsed(false);\n        setTabUsed(false);\n      }\n    };\n\n    const handleOnSubmit = e => {\n      e.preventDefault();\n\n      const submittedQuery = e.currentTarget?.value || query,\n      trimmedQuery = (submittedQuery && submittedQuery.trim().replace(/\\s{2,}/g, ' ')) || '';\n      if (!submittedQuery) return\n\n      // remove POI\n      dispatch(setInfoSheetActive(false));\n      dispatch(setInfosheetMqId(null));\n      dispatch(setInfosheetSlug(null));\n      dispatch(setInfosheetData(null));\n\n      setDropdownVisible(false);\n      dispatch(setInputFocused(false));\n\n      if (trimmedQuery.toLowerCase() == 'directions' || trimmedQuery.toLowerCase() == 'driving directions') {\n        // intent: directions\n        navigate('/directions');\n      } else {\n        // intent: search\n        if (query) {\n          setLocalQuery(trimmedQuery);\n          addRecentSearch({\n            id: 'custom:' + query.toLowerCase().replace(/\\s+/g, ''),\n            name: query,\n            displayString: query\n          });\n        }\n        // navigate('/search/' + encodeURIComponent(normalizeQuery(submittedQuery)));\n        setTrackSearchPerformedHome(true);\n        window.location.href = '/search/' + encodeURIComponent(normalizeQuery(submittedQuery));\n      }\n    };\n\n    const handleOnInputClick = () => {\n      trackAction('search-box-clicked', 'search_suggestions');\n    };\n\n    const handleOnInputClear = () => {\n      trackAction('clear-clicked', 'search_suggestions');\n\n      if (!inputFocused && isMobile) {\n        navigate('/');\n      }\n    };\n\n    const handleOnQueryChange = val => {\n      const sanitizedValue = val.trim().replace(/\\s{2,}/g, ' ');\n      setLocalQuery(val);\n      dispatch(setSearchQueryEx({query: sanitizedValue, isInternal: true}));\n    };\n\n    return (\n      <div>\n        <div className={containerClass + `${dropdownVisible ? ' dropdown-visible' : ''}`} ref={outsideClick}>\n          {!isDirections && (\n            <>\n              <SearchInput\n                searchIcons\n                showClearButton={showClearButton}\n                dropdownVisible={dropdownVisible}\n                setDropdownVisible={() => setDropdownVisible(true)}\n                isSearching={true}\n                onInputClick={handleOnInputClick}\n                onInputClear={handleOnInputClear}\n                onSubmit={handleOnSubmit}\n                onQueryChange={handleOnQueryChange}\n                value={localQuery}\n              />\n            </>\n          )}\n\n          {dropdownVisible && !isMobile && (\n            <SearchAhead\n              setDropdownVisible={setDropdownVisible}\n              onSearchSelected={result => {\n                const place = MQLocation.createFromSearchAheadResult(result);\n                if (place?.latLng) {\n                  dispatch(setMapCenter(place.latLng.lat, place.latLng.lng));\n                }\n              }}\n              chooseLocationEnabled={false}\n              hideIfEmpty={false}\n            />\n          )}\n        </div>\n\n        {inputFocused && isMobile && !isDirections && (\n          <MobileSearchModal\n            chooseLocationEnabled={false}\n            isSearching={true}\n            handleOnInputClick={handleOnInputClick}\n            handleOnInputClear={handleOnInputClear}\n            handleOnSubmit={handleOnSubmit}\n            handleOnQueryChange={handleOnQueryChange}\n            onSearchSelected={result => {\n              const place = MQLocation.createFromSearchAheadResult(result);\n              if (place?.latLng) dispatch(setMapCenter(place.latLng.lat, place.latLng.lng));\n              dispatch(setInputFocused(false));\n            }}\n            setDropdownVisible={() => setDropdownVisible(false)}\n            value={localQuery}\n          />\n        )}\n      </div>\n    );\n  }\n);\n\nexport default SearchBox;\n","import PropTypes from 'prop-types'\nimport React from 'react'\n\nconst Icon = ({ glyph, size = 24, viewBoxSize = 24, className = '', pathAttributes, ...props }) => {\n  const svgAttrs = {}\n  if (isNaN(parseInt(size, 10))) {\n    svgAttrs.className = size\n  } else {\n    svgAttrs.height = size\n    svgAttrs.width = size\n  }\n  return (\n    <i className={`inline-block ${className}`} {...props}>\n      <svg viewBox={`0 0 ${viewBoxSize} ${viewBoxSize}`} {...svgAttrs}>\n        {Array.isArray(glyph)\n          ? glyph.map((d, index) => <path key={index} d={d} fill={pathAttributes?.[index]?.fill ?? 'currentColor'} data-testid={pathAttributes?.[index]?.dataTestid ?? ''} />)\n          : <path d={glyph} fill=\"currentColor\" />}\n      </svg>\n    </i>\n  )\n}\n\nIcon.propTypes = {\n  glyph: PropTypes.oneOfType([\n    PropTypes.string,\n    PropTypes.arrayOf(PropTypes.string)\n  ]).isRequired,\n  size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n  viewBoxSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n  className: PropTypes.string,\n  pathAttributes: PropTypes.arrayOf(\n    PropTypes.shape({\n      dataTestid: PropTypes.string,\n      fill: PropTypes.string\n    })\n  )\n}\n\nexport default Icon\n","const coffee = 'M18.262 8.75H5.325c-.622 0-1.125.503-1.125 1.125v6.75A3.376 3.376 0 0 0 7.575 20h6.75a3.376 3.376 0 0 0 3.375-3.375h.563a3.94 3.94 0 0 0 3.937-3.938 3.94 3.94 0 0 0-3.938-3.937Zm-2.25 7.875c0 .932-.755 1.688-1.687 1.688h-6.75a1.688 1.688 0 0 1-1.688-1.688v-6.188h10.126v6.188Zm2.25-1.688H17.7v-4.5h.563a2.252 2.252 0 0 1 2.25 2.25 2.252 2.252 0 0 1-2.25 2.25ZM12.607 7.15a.57.57 0 0 0 .562.475h.58c.345 0 .62-.299.574-.633a4.596 4.596 0 0 0-1.287-2.626 3.334 3.334 0 0 1-.928-1.88A.566.566 0 0 0 11.54 2h-.577a.571.571 0 0 0-.573.633A5.11 5.11 0 0 0 11.818 5.6c.422.429.693.967.788 1.55Zm-3.938 0a.57.57 0 0 0 .563.475h.58a.57.57 0 0 0 .573-.633 4.596 4.596 0 0 0-1.287-2.626 3.334 3.334 0 0 1-.928-1.88A.566.566 0 0 0 7.603 2h-.576a.573.573 0 0 0-.573.633A5.11 5.11 0 0 0 7.88 5.6c.422.429.692.967.787 1.55Z'\nconst food = 'M19.48 6.773c-.221-.871-1.016-1.641-1.853-1.856-.358-1.399-2.109-2.489-3.43-1.589-.461.31-2.683 1.814-3.52 2.654-1.452 1.452-1.8 3.39-1.217 5.115l-5.42 4.848a1.933 1.933 0 0 0-.068 2.81l1.674 1.673a1.933 1.933 0 0 0 2.809-.067l4.848-5.425c1.81.612 3.723.176 5.116-1.216.836-.837 2.337-3.055 2.647-3.519.928-1.35-.232-3.083-1.586-3.428Zm.194 2.482s-1.68 2.507-2.45 3.273c-1.207 1.206-2.905 1.301-4.332.334L7.196 19.24c-.088.102-.253.102-.358-.003l-1.674-1.674c-.102-.102-.105-.267-.003-.358l6.377-5.695c-.956-1.41-.886-3.111.334-4.331.77-.77 3.273-2.45 3.273-2.45.3-.212 1.041.537.816.829l-3.168 3.168c-.27.323.486 1.09.816.83l3.39-2.978c.294-.208 1.03.527.822.822l-2.978 3.39c-.26.33.506 1.089.83.815l3.167-3.168c.296-.221 1.048.517.834.82Z'\nconst gas = 'm20.416 7.353-2.707-2.706a.25.25 0 0 0-.353 0l-.706.706a.25.25 0 0 0 0 .353L18 7.06V9c0 .878.653 1.603 1.5 1.725v5.025c0 .413-.337.75-.75.75a.752.752 0 0 1-.75-.75v-1A2.75 2.75 0 0 0 15.25 12H15V5.5A1.5 1.5 0 0 0 13.5 4h-6A1.5 1.5 0 0 0 6 5.5v13h-.75a.25.25 0 0 0-.25.25v1c0 .137.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-1a.25.25 0 0 0-.25-.25H15v-5h.25c.69 0 1.25.56 1.25 1.25v.869c0 1.178.844 2.25 2.016 2.372A2.256 2.256 0 0 0 21 15.75V8.769a2 2 0 0 0-.584-1.416ZM13.5 18.5h-6v-7h6v7Zm0-8.5h-6V5.5h6V10Z'\nconst grocery = 'M19.85 7H7.109l-.273-1.394A.75.75 0 0 0 6.1 5H2.975a.375.375 0 0 0-.375.375v.75c0 .207.168.375.375.375h2.507l2.175 11.116a2 2 0 1 0 3.174.384h4.537a2 2 0 1 0 3.117-.442l.032-.149a.75.75 0 0 0-.732-.909H8.967L8.674 15h9.763a.75.75 0 0 0 .733-.59l1.413-6.5A.75.75 0 0 0 19.85 7ZM9.1 19.75a.75.75 0 1 1 .002-1.502.75.75 0 0 1-.002 1.502Zm8 0a.75.75 0 1 1 .002-1.502.75.75 0 0 1-.002 1.502Zm.732-6.25H8.381l-.979-5H18.92l-1.087 5Z'\nconst hotels = 'M20.438 16.813h-.563v-1.688c0-3.966-2.935-7.238-6.75-7.786v-.652h1.688c.31 0 .562-.251.562-.562v-.563A.562.562 0 0 0 14.812 5H9.189a.562.562 0 0 0-.563.563v.562c0 .31.252.563.563.563h1.687v.651c-3.815.548-6.75 3.82-6.75 7.786v1.688h-.563a.562.562 0 0 0-.562.562v.563c0 .31.252.562.563.562h16.875c.31 0 .562-.252.562-.563v-.562a.562.562 0 0 0-.563-.563Zm-2.25 0H5.813v-1.688A6.194 6.194 0 0 1 12 8.937a6.194 6.194 0 0 1 6.188 6.188v1.688Z'\nconst shopping = 'm21.36 12.06-6.62-6.62A1.5 1.5 0 0 0 13.678 5H7.3a1.5 1.5 0 0 0-1.5 1.5v6.379a1.5 1.5 0 0 0 .44 1.06l6.62 6.622a1.5 1.5 0 0 0 2.122 0l6.379-6.379a1.5 1.5 0 0 0 0-2.121Zm-7.439 7.44L7.3 12.879V6.5h6.379l6.621 6.621-6.379 6.379ZM11.8 9.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z'\n\nexport const DEFAULT_CATEGORIES = [\n  { name: 'Hotels', glyph: hotels },\n  { name: 'Food', query: 'Restaurants', glyph: food },\n  { name: 'Shopping', glyph: shopping },\n  { name: 'Coffee', query: 'Coffee', glyph: coffee },\n  { name: 'Grocery', query: 'Groceries', glyph: grocery },\n  { name: 'Gas', glyph: gas }\n]\n\n","import React, { useContext, useCallback, useEffect, useState } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport {SearchContext} from '../../model/mq-search';\nimport {normalizeQuery, navigate} from 'url-utils';\nimport search from '../../model/search';\nimport {\n  setSearchQuery,\n  setIsSearching,\n  setInfoSheetActive,\n  setInfosheetMqId,\n  setInfosheetSlug,\n  setInfosheetData,\n  setIsDisambiguatedSearch,\n  setIsTopCat\n} from '../../model/actions';\nimport {mqLayer, iconWrapper} from './layers.scss';\nimport {searchProps, searchActiveSelector} from '../../model/selectors';\nimport {mqLayersContainer, hide} from './layers.scss';\nimport {useMobileCheck} from 'event-hooks';\n\nimport { trackAction } from 'gtm.service'\n\nimport Icon from '../Icon.jsx'\nimport { DEFAULT_CATEGORIES } from './layers.js'\n\nexport default () => {\n  const dispatch = useDispatch()\n  const { isTopCat, query } = useSelector(searchProps)\n\n  const onTileClick = useCallback(query => {\n    // remove POI\n    dispatch(setInfoSheetActive(false))\n    dispatch(setInfosheetMqId(null))\n    dispatch(setInfosheetSlug(null))\n    dispatch(setInfosheetData(null))\n\n    if (isTopCat) dispatch(setIsTopCat(false))\n\n    // start searching\n    dispatch(setIsSearching(true))\n    dispatch(setSearchQuery(query))\n    setExecuteTrackAction(true)\n    dispatch(setIsDisambiguatedSearch(false))\n    // navigate('/search/' + encodeURIComponent(normalizeQuery(query)))\n    window.location.href = '/search/' + encodeURIComponent(normalizeQuery(query))\n    dispatch(search())\n  })\n\n  const onKeyUp = useCallback(({ key, target }) => {\n    if (key === 'Enter') target.click()\n  })\n\n  const searchActiveVal = useSelector(searchActiveSelector)\n  const isMobile = useMobileCheck()\n  const searchContext = useContext(SearchContext)\n  const [executeTrackAction, setExecuteTrackAction] = useState(false)\n\n  useEffect(() => {\n    if (!searchContext.length || !executeTrackAction) return\n    trackAction('category-clicked', 'home', {\n      'target-properties': query,\n      kvdcity: searchContext[0].kvdcity,\n      kvcat: Array.from(searchContext.reduce((acc, { kvcat }) => {\n        if (kvcat) kvcat.forEach(kvcat => acc.add(kvcat))\n        return acc\n      }, new Set()))\n    })\n    setExecuteTrackAction(false)\n  }, [searchContext.length, executeTrackAction])\n\n  return (\n    <div className={searchActiveVal && isMobile ? hide : mqLayersContainer}>\n      {DEFAULT_CATEGORIES.map(({ name, query, glyph }, index) => (\n        <div\n          tabIndex={0}\n          onClick={onTileClick.bind(null, query || name)}\n          onKeyUp={onKeyUp}\n          key={index}\n        >\n          <div className={mqLayer}>\n            <div className={iconWrapper}>\n              <Icon glyph={glyph} size=\"25\" data-testid={`icon-layer-button-${(query || name).replace(' ', '-').toLowerCase()}`} />\n            </div>\n            <span>{name}</span>\n          </div>\n        </div>\n      ))}\n    </div>\n  )\n}\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {ypBeaconsSelector} from './../../model/selectors';\n\nexport default () => {\n  const ypBeacons = useSelector(ypBeaconsSelector);\n  return ypBeacons.map((b, index) => (\n    <img className=\"tracking-pixel\" key={`ypBeacon-${index}`} src={b.replace(/^https?:\\/\\//i, '//')} />\n  ));\n};\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {yextBeaconsSelector} from './../../model/selectors';\n\nexport default () => {\n  const yextBeacons = useSelector(yextBeaconsSelector);\n  return yextBeacons.map((b, index) => (\n    <img className=\"tracking-pixel\" key={`yextBeacon-${index}`} src={b.replace(/^https?:\\/\\//i, '//')} alt=\"\" />\n  ));\n};\n","import React, {useState} from 'react';\nimport {useMobileCheck, useOutsideClick} from 'event-hooks';\n\nimport './attribution.scss';\n\nexport const Attribution = ({year = new Date().getFullYear(), oneTrust}) => {\n  const outsideClick = useOutsideClick(() => setAttributionToggle(false));\n  const [attributionToggle, setAttributionToggle] = useState(false),\n    isMobile = useMobileCheck();\n\n  return (\n    <footer id=\"attributionControl\" ref={outsideClick}>\n      <div className=\"attribution-button\" onClick={() => setAttributionToggle(!attributionToggle)}>\n        <i className=\"icon icon-info-btn\"></i>\n      </div>\n\n      <div className={'attribution-box' + (attributionToggle ? ' active' : '')}>\n        <span className=\"top\">\n          <span>© {year} Mapquest Holdings LLC</span>\n          <a href=\"https://legal.here.com/terms\" target=\"_blank\">\n            © HERE\n          </a>\n        </span>\n        <span className=\"bottom\">\n          <a href=\"https://hello.mapquest.com/privacy\" target=\"_blank\">\n            Privacy\n          </a>\n          <a href=\"https://hello.mapquest.com/legal\" target=\"_blank\">\n            Legal\n          </a>\n          <a href=\"https://hello.mapquest.com/about-our-ads\" target=\"_blank\">\n            About Our Ads\n          </a>\n          {isMobile ? <br></br> : null}\n          <a\n            href=\"#\"\n            className=\"one-trust\"\n            onClick={event => {\n              event.preventDefault();\n              event.stopPropagation();\n              if (oneTrust) oneTrust();\n              if (window.OneTrust && typeof window.OneTrust.ToggleInfoDisplay == 'function') {\n                window.OneTrust.ToggleInfoDisplay();\n              } else {\n                window.newrelic?.noticeError?.(new Error('OneTrust is not loaded due to network problems.'));\n              }\n            }}\n          >\n            Do Not Sell or Share my Personal Data\n          </a>\n        </span>\n      </div>\n    </footer>\n  );\n};\n\nexport default Attribution;\n","export function addToBounds({north, east, south, west}, {lat, lng}) {\n  if (north == null) return {north: lat, east: lng, south: lat, west: lng};\n\n  north = Math.max(north, lat);\n  south = Math.min(south, lat);\n\n  // Beware of the dateline!\n\n  if (west < 0 && lng > 0 && 180 - lng < lng) west = lng;\n  else if (west > 0 && lng < 0 && lng + 180 < -lng);\n  else west = Math.min(west, lng);\n\n  if (east > 0 && lng < 0 && lng + 180 < -lng) east = lng;\n  else if (east < 0 && lng > 0 && 180 - lng < lng);\n  else east = Math.max(east, lng);\n\n  return {north, east, south, west};\n}\n\nexport function scaleBounds({north, east, south, west}, coeff) {\n  const scale = (value, mid) => mid + coeff * (value - mid),\n    lat = (north + south) / 2,\n    lng = (west + east) / 2;\n\n  north = scale(north, lat);\n  south = scale(south, lat);\n\n  if (west > 0 && east < 0) {\n    // Bounds cross timeline\n    west = scale(west, lng > 0 ? lng + 180 : lng);\n    east = scale(east, lng < 0 ? lng : lng - 180);\n  } else {\n    west = scale(west, lng);\n    east = scale(east, lng);\n  }\n\n  return {north, east, south, west};\n}\n","import {select} from 'morass/traverse';\nimport {addReducer, inSlice} from 'morass';\nimport {get, map as mapConfig, provider} from 'config';\nimport { PAGE_STATUS } from '../../lib/constants.cjs';\n\nimport {\n  map,\n  search,\n  directions,\n  routing,\n  init,\n  categories,\n  infosheet,\n  vendors,\n  bizLocs,\n  activeBizLoc,\n  SEARCH_RESULTS_PER_PAGE,\n  searchActive,\n  infoSheetActive,\n  activePoiMarker,\n  routeSponsorships,\n  searchMetadata,\n  ypBeacons,\n  yextBeacons,\n  showRoadWarriorUnit,\n  makeQueryForTopCats,\n  isPrintOpen,\n  mobilePanel\n} from './slices';\n\nimport {searchState, rawSearchResults} from './selectors';\nimport {addToBounds, scaleBounds} from './bounds';\n\nconst PAD_BOUNDS_AFTER_SEARCH = get('search.map.padBounds', 1.1); // 110% of the size\nconst MAX_RECENTS_SIZE = 10;\n\nimport {\n  setCenter,\n  initCenter,\n  setZoom,\n  initZoom,\n  setBounds,\n  setConfirmedBounds,\n  setMapCenter,\n  setMapZoom,\n  setMapCenterZoom,\n  initCenterZoom,\n  setMapBounds,\n  setStyle,\n  markLocation,\n  setSearchQuery,\n  setSearchQueryEx,\n  setSearchResults,\n  setSearchDetails,\n  setSearchState,\n  setSearchBounds,\n  searchFailed,\n  setOrigin,\n  setDestination,\n  setDestinationList,\n  setDestinationListItem,\n  addDestination,\n  removeDestination,\n  setCopyPasteText,\n  setDirections,\n  directionsFailed,\n  setCategories,\n  categoriesFailed,\n  setInfosheetMqId,\n  setInfosheetSlug,\n  setInfosheetData,\n  setInputFocused,\n  infosheetFailed,\n  setBizLocs,\n  bizLocsFailed,\n  setActiveBizLoc,\n  setRouteSponsorships,\n  addRecentSearch,\n  removeRecentSearch,\n  setRecentSearches,\n  fetchRecentSearches,\n  setPredictionResults,\n  setArePredictionsLoading,\n  predictionResultsFailed,\n  setPrintView,\n  setPrecisePosition,\n  setDropdownVisible,\n  setSearchActive,\n  setInfoSheetActive,\n  setActivePoiMarker,\n  setRouteSettings,\n  setRouteOptimizationSettings,\n  setIsSearching,\n  setIsDisambiguatedSearch,\n  setIsTopCat,\n  setTopCatMetaInfo,\n  setSearchPath,\n  setClickedOn,\n  setRouteData,\n  setAlternateRoutesData,\n  setRouteDataResponse,\n  setCurrentRouteIndex,\n  setFuelCost,\n  setRedirectToInfosheet,\n  setMapSource,\n  setMarkerState,\n  setRibbonState,\n  setPreviousMapProperties,\n  setMapAttributes,\n  setSharePath,\n  setNarrativeState,\n  setDirectionsLoadingState,\n  setWereDestinationsReordered,\n  setSearchMetadata,\n  setYpBeacons,\n  setYextBeacons,\n  setShowRoadWarriorUnit,\n  setIsPrintOpen,\n  setMobileHeadingValue,\n  setMobileHeadingVisible,\n  setMobilePanelExpandedState\n} from './actions';\n\nimport {appState} from '../../lib/ads/slices';\n\nconst usePayloadValue = (_, payload) => payload,\n  usePayloadValueEx = (_, {payload}) => payload,\n  mergeWithPayloadValue = (oldState, newState) => ({...oldState, ...newState}),\n  resetTo = value => () => value,\n  getAppState = select(appState);\n\nconst {\n  // Configuration defaults are for provider.map=='mapbox'\n  [provider.map]: {locateZoom = 15, poiTypeZoom = null} = {}\n} = mapConfig || {};\n\nconst getPathType = /^\\/(\\w+)(?:\\/|$)/,\n  splitSearchPath = /^\\/search\\/([^\\/]+)$/,\n  splitTopPath = /^\\/top(\\/.+)\\/([^\\/]+)$/;\n\nconst sanitizePage = page => (isNaN(page) || page < 0 ? 0 : +page);\n\naddReducer(\n  inSlice(state => state.map).on(setSearchResults)((map, results, root) => {\n    const {automatic, page} = searchState(root);\n    if (automatic && results?.length) {\n      setMapBoundsFromSearchResults(map, results, page);\n    }\n  }),\n  inSlice(state => state.map).on(setSearchState)((map, {page}, root) => {\n    const results = rawSearchResults(root),\n      previousPage = sanitizePage(searchState(root).page),\n      newPage = sanitizePage(page);\n    if (results?.length && newPage != previousPage) {\n      setMapBoundsFromSearchResults(map, results, page);\n    }\n  }),\n\n  inSlice(map.center).on(setCenter, initCenter)(usePayloadValueEx),\n  inSlice(map.zoom).on(setZoom, initZoom)(usePayloadValueEx),\n  inSlice(map.bounds).on(setBounds, setConfirmedBounds)(usePayloadValueEx),\n\n  inSlice(map.mapCenter).on(setMapCenter, initCenter)(usePayloadValueEx),\n  inSlice(map.mapCenter).on(setMapCenterZoom, initCenterZoom)((_, {payload: {center}}) => center),\n  inSlice(map.mapCenter).on(setMapBounds)(resetTo(null)),\n  inSlice(map.mapCenter).on(setInfosheetData)((center, poi, root) => {\n    if ((getAppState(root).loaded || !center) && poi?.latLng) return poi.latLng;\n  }),\n  inSlice(map.mapZoom).on(setMapZoom, initZoom)(usePayloadValueEx),\n  inSlice(map.mapZoom).on(setMapCenterZoom, initCenterZoom)((_, {payload: {zoom}}) => zoom),\n  inSlice(map.mapZoom).on(setMapBounds)(resetTo(0)),\n  inSlice(map.mapZoom).on(setInfosheetData)((zoom, poi, root) => {\n    if (getAppState(root).loaded || !zoom) {\n      if (!poi || !poiTypeZoom) return locateZoom;\n      let type = poi['@type'];\n      if (!type) return locateZoom;\n      if (type === 'Place' || type === 'Locality') {\n        type = poi['@adparameters'] && poi['@adparameters'].kvdcity ? 'City' : 'State';\n      }\n      return poiTypeZoom[type] || locateZoom;\n    }\n  }),\n  inSlice(map.mapBounds).on(setMapBounds)(usePayloadValueEx),\n  inSlice(map.mapBounds).on(setMapCenter)(resetTo(null)),\n  inSlice(map.mapBounds).on(setMapZoom)(resetTo(null)),\n  inSlice(map.mapBounds).on(setMapCenterZoom)(resetTo(null)),\n\n  inSlice(map.style).on(setStyle)(usePayloadValue),\n  inSlice(map.previous).on(setPreviousMapProperties)(usePayloadValue),\n  inSlice(map.confirmedBounds).on(\n    setBounds,\n    setConfirmedBounds,\n    initCenter,\n    initZoom\n  )((_, {type}) => type == setConfirmedBounds),\n  inSlice(map.printView).on(setPrintView)(usePayloadValue),\n  inSlice(map.precisePosition).on(setPrecisePosition)(usePayloadValue),\n  inSlice(map.sources).on(setMapSource)((sources, newSource) => ({...sources, ...newSource})),\n  inSlice(map.attributes).on(setMapAttributes)(usePayloadValue),\n  inSlice(map.markerState).on(setMarkerState)(usePayloadValue),\n  inSlice(map.ribbonState).on(setRibbonState)(usePayloadValue),\n  inSlice(map.sharePath).on(setSharePath)(usePayloadValue),\n  inSlice(map.narrativeState).on(setNarrativeState)(usePayloadValue),\n\n  inSlice(search.query).on(setSearchQuery)(usePayloadValue),\n  inSlice(search.query).on(setSearchQueryEx)((_, {query} = {}) => query || ''),\n  inSlice(search.query).on(setSearchPath)((_, path) => {\n    const type = getPathType.exec(path);\n    switch (type && type[1]) {\n      case 'search': {\n        const result = splitSearchPath.exec(path);\n        return result ? decodeURIComponent(result[1]) : '';\n      }\n      case 'top': {\n        const result = splitTopPath.exec(path);\n        return result ? makeQueryForTopCats(result[1], result[2]) : '';\n      }\n    }\n    return '';\n  }),\n\n  inSlice(search.isInternalQuery).on(setSearchQuery)(resetTo(false)),\n  inSlice(search.isInternalQuery).on(setSearchQueryEx)((_, {isInternal} = {}) => !!isInternal),\n  inSlice(search.isInternalQuery).on(setSearchPath)(resetTo(false)),\n\n  inSlice(search.inputFocused).on(setInputFocused)(usePayloadValue),\n\n  inSlice(search.area).on(setSearchQuery)(resetTo(null)),\n  inSlice(search.area).on(setSearchQueryEx)((_, {bounds} = {}) => bounds || ''),\n  inSlice(search.area).on(setSearchPath)((_, path) => {\n    const result = splitTopPath.exec(path);\n    return result ? result[1] : '';\n  }),\n\n  inSlice(search.category).on(setSearchQuery)(resetTo('')),\n  inSlice(search.category).on(setSearchQueryEx)((_, {category} = {}) => category || ''),\n  inSlice(search.category).on(setSearchPath)((_, path) => {\n    const result = splitTopPath.exec(path);\n    return result ? result[2] : '';\n  }),\n\n  inSlice(search.searchFailed).on(searchFailed)(usePayloadValue),\n  inSlice(search.status).on(setSearchResults)(resetTo(PAGE_STATUS.DATA)),\n  inSlice(search.status).on(setIsSearching)(resetTo(PAGE_STATUS.LOADING)),\n  inSlice(search.status).on(searchFailed)(resetTo(PAGE_STATUS.ERROR)),\n  inSlice(search.error).on(searchFailed)(usePayloadValue),\n\n  inSlice(search.results).on(setSearchResults)(usePayloadValue),\n  inSlice(search.results).on(searchFailed)(resetTo(null)),\n\n  inSlice(search.isSearching).on(setIsSearching)(usePayloadValue),\n\n  inSlice(search.details).on(setSearchDetails)((oldState, newState) => ({...oldState, ...newState})),\n  inSlice(search.details).on(searchFailed, setSearchResults)(resetTo({})),\n\n  inSlice(search.state).on(setSearchState)(mergeWithPayloadValue),\n  inSlice(search.state).on(setSearchResults)(oldState => ({...oldState, inprogress: false})),\n  inSlice(search.state).on(searchFailed)(resetTo({page: 0})),\n\n  inSlice(search.recents).on(addRecentSearch)((list = [], newItem) =>\n    [{...newItem, recent: true}, ...list.filter(item => !identical(item, newItem))].slice(0, MAX_RECENTS_SIZE)\n  ),\n  inSlice(search.recents).on(removeRecentSearch)((list, index) => {\n    list.splice(index, 1);\n  }),\n  inSlice(search.recents).on(setRecentSearches)(usePayloadValue),\n  inSlice(search.recents).on(fetchRecentSearches)(usePayloadValue),\n\n  inSlice(search.predictions).on(setPredictionResults)(usePayloadValue),\n  inSlice(search.predictions).on(predictionResultsFailed)(resetTo([])),\n  inSlice(search.arePredictionsLoading).on(setArePredictionsLoading)(usePayloadValue),\n\n  inSlice(search.bounds).on(setSearchBounds)(usePayloadValue),\n  inSlice(search.bounds).on(setSearchQuery)(resetTo({})),\n  inSlice(search.bounds).on(searchFailed)(resetTo({})),\n\n  inSlice(search.isDisambiguatedSearch).on(setIsDisambiguatedSearch)(usePayloadValue),\n  inSlice(search.isTopCat).on(setIsTopCat)(usePayloadValue),\n  inSlice(search.topCatMetaInfo).on(setTopCatMetaInfo)(usePayloadValue),\n  inSlice(search.clickedOn).on(setClickedOn)(usePayloadValue),\n\n  inSlice(search.dropdownVisible).on(setDropdownVisible)(usePayloadValue),\n  inSlice(searchActive).on(setSearchActive)(usePayloadValue),\n\n  inSlice(directions.origin).on(setOrigin)(usePayloadValue),\n  inSlice(directions.destination).on(setDestination)(usePayloadValue),\n  inSlice(directions.destinationList).on(setDestinationList)(usePayloadValue),\n  inSlice(directions.destinationList).on(setDestinationListItem)((destinationList, {index, destination}) => {\n    const note = destinationList[index]?.note;\n    destinationList[index] = {note, ...destination};\n    return destinationList;\n  }),\n  inSlice(directions.routeSettings).on(setRouteSettings)(usePayloadValue),\n  inSlice(directions.destinationList).on(addDestination)(destinationList => [...destinationList, {}]),\n  inSlice(directions.destinationList).on(removeDestination)((destinationList, {index}) => {\n    destinationList.splice(index, 1);\n  }),\n  inSlice(directions.results).on(setDirections)(usePayloadValue),\n  inSlice(directions.results).on(directionsFailed)(resetTo(null)),\n  inSlice(directions.copyPasteText).on(setCopyPasteText)(usePayloadValue),\n  inSlice(directions.routeData).on(setRouteData)(usePayloadValue),\n  inSlice(directions.alternateRoutesData).on(setAlternateRoutesData)(usePayloadValue),\n  inSlice(directions.routeDataResponse).on(setRouteDataResponse)(usePayloadValue),\n  inSlice(directions.currentRouteIndex).on(setCurrentRouteIndex)(usePayloadValue),\n  inSlice(directions.directionsLoadingState).on(setDirectionsLoadingState)(usePayloadValue),\n  inSlice(directions.wereDestinationsReordered).on(setWereDestinationsReordered)(usePayloadValue),\n  inSlice(directions.fuelCost).on(setFuelCost)(usePayloadValue),\n  inSlice(directions.redirectToInfosheet).on(setRedirectToInfosheet)(usePayloadValue),\n  inSlice(directions.directionsFailed).on(directionsFailed)(usePayloadValue),\n  inSlice(directions.directionsFailed).on(setDestinationListItem)(resetTo('')),\n  inSlice(directions.status).on(setDestinationList)(resetTo(PAGE_STATUS.DATA)),\n  inSlice(directions.status).on(setDestinationListItem)(resetTo(PAGE_STATUS.DATA)),\n  inSlice(directions.status).on(removeDestination)(resetTo(PAGE_STATUS.DATA)),\n  inSlice(directions.status).on(directionsFailed)(resetTo(PAGE_STATUS.ERROR)),\n  inSlice(directions.error).on(setDestinationList)(resetTo('')),\n  inSlice(directions.error).on(setDestinationListItem)(resetTo('')),\n  inSlice(directions.error).on(removeDestination)(resetTo('')),\n  inSlice(directions.error).on(directionsFailed)(usePayloadValue),\n\n  inSlice(routing.routeSettings).on(setRouteOptimizationSettings)(usePayloadValue),\n\n  inSlice(init.mapCenter).on(initCenter)(usePayloadValue),\n  inSlice(init.mapZoom).on(initZoom)(usePayloadValue),\n  inSlice(init.location).on(markLocation)(usePayloadValue),\n\n  inSlice(categories).on(setCategories)(usePayloadValue),\n  inSlice(categories).on(categoriesFailed)(resetTo(null)),\n\n  inSlice(bizLocs).on(setBizLocs)(usePayloadValue),\n  inSlice(bizLocs).on(bizLocsFailed)(resetTo(null)),\n\n  inSlice(activeBizLoc).on(setActiveBizLoc)(usePayloadValue),\n\n  inSlice(routeSponsorships).on(setRouteSponsorships)(usePayloadValue),\n\n  inSlice(searchMetadata).on(setSearchMetadata)(usePayloadValue),\n  inSlice(ypBeacons).on(setYpBeacons)(usePayloadValue),\n  inSlice(yextBeacons).on(setYextBeacons)(usePayloadValue),\n  inSlice(isPrintOpen).on(setIsPrintOpen)(usePayloadValue),\n\n  inSlice(infosheet.mqId).on(setInfosheetMqId)(usePayloadValue),\n  inSlice(infosheet.slug).on(setInfosheetSlug)(usePayloadValue),\n  inSlice(infosheet.slug).on(setInfosheetData)((_, poi) => {\n    if (poi) return poi.salt || poi.slug;\n  }),\n  inSlice(infosheet.data).on(setInfosheetData)(usePayloadValue),\n  inSlice(infosheet.status).on(setInfosheetData)(resetTo(PAGE_STATUS.DATA)),\n  inSlice(infosheet.data).on(infosheetFailed)(resetTo({})),\n  inSlice(infosheet.status).on(infosheetFailed)(resetTo(PAGE_STATUS.ERROR)),\n  inSlice(infosheet.error).on(infosheetFailed)(usePayloadValue),\n\n  inSlice(infoSheetActive).on(setInfoSheetActive)(usePayloadValue),\n  inSlice(showRoadWarriorUnit).on(setShowRoadWarriorUnit)(usePayloadValue),\n\n  inSlice(vendors).on(setSearchResults, searchFailed)(resetTo({})),\n\n  inSlice(activePoiMarker).on(setActivePoiMarker)(usePayloadValue),\n  inSlice(mobilePanel.headingValue).on(setMobileHeadingValue)(usePayloadValue),\n  inSlice(mobilePanel.headingVisible).on(setMobileHeadingVisible)(usePayloadValue),\n  inSlice(mobilePanel.expandedState).on(setMobilePanelExpandedState)(usePayloadValue)\n);\n\nfunction setMapBoundsFromSearchResults(map, results, page) {\n  if (!map) return;\n  map.confirmedBounds = false;\n  let newBounds = results\n    .slice(page * SEARCH_RESULTS_PER_PAGE, (page + 1) * SEARCH_RESULTS_PER_PAGE)\n    .reduce((bounds, {location}) => addToBounds(bounds, location), {});\n  if (newBounds.north == newBounds.south) {\n    // There was only 1 search result. Include current map center in the bounding box.\n    newBounds = addToBounds(newBounds, map.mapCenter || map.center);\n  }\n  // set bounds removing center and zoom\n  map.mapBounds = scaleBounds(newBounds, PAD_BOUNDS_AFTER_SEARCH);\n  map.mapCenter = null;\n  map.mapZoom = 0;\n}\n\nfunction identical(a, b) {\n  return a.id === b.id;\n}\n","import {createThunk, addTrigger} from 'morass';\nimport {api, routeOptions, routeSettings, map as mapConfig} from 'config';\nimport {directionsProps, routeOptimizationProps, narrativeState} from './selectors';\nimport {\n  setRouteData,\n  setRouteDataResponse,\n  setSharePath,\n  setWereDestinationsReordered,\n  setDirectionsLoadingState,\n  directionsFailed\n} from './actions';\nimport {select} from 'morass/traverse';\nimport {directions as directionsSlice, routing} from './slices';\nimport {createSelector} from 'reselect';\nimport {getPage} from '../utilities';\n\nconst {directions, singleStop, multiStop, optimizedStop} = api;\nconst {errors} = mapConfig;\nconst {toggles} = routeSettings;\nconst DEFAULT_ERR_MSG = 'Error fetching route data';\n\nconst loadDirections = createThunk(\n  creator => () => async (dispatch, getState) => {\n    try {\n      // Bail out if we have query objects or invalid Destinations\n      if (directionsProps(getState()).destinationList.filter(item => item && !item.location).length != 0) {\n        return;\n      }\n\n      // Prevent API calls for destination list updates from /optimizedroute\n      const {wereDestinationsReordered} = directionsProps(getState());\n      if (wereDestinationsReordered) {\n        dispatch(setWereDestinationsReordered(false));\n        return;\n      }\n\n      let {routeSettings} = routeOptimizationProps(getState());\n\n      const filteredDirections = parsedDirections(getState);\n      if (!filteredDirections.length) return;\n\n      if (routeSettings?.generalize?.value == 1) {\n        filteredDirections.push(filteredDirections[0]);\n      }\n\n      const isTwoStops = filteredDirections.length === 2;\n\n      const url =\n        directions +\n        `${isTwoStops ? singleStop : routeSettings?.canReorder?.value ? optimizedStop : multiStop}` +\n        `?timeType=1`;\n\n      const body = JSON.stringify({\n        locations: filteredDirections,\n        options: buildRouteOptions(getState),\n        maxRoutes: isTwoStops ? 3 : 1\n      });\n\n      const loadingState = {};\n      dispatch(setDirectionsLoadingState(loadingState));\n      let res = await fetch(url, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application/json'\n        },\n        body\n      });\n      if (directionsProps(getState()).directionsLoadingState != loadingState) {\n        // Ignore results from older load directions\n        return;\n      }\n      dispatch(setDirectionsLoadingState(null));\n\n      // ignore responses for when user unchecks reorder stops\n      const {routeSettings: updatedSettings} = routeOptimizationProps(getState());\n      if (res.url.includes(optimizedStop) && updatedSettings?.canReorder?.value == 0) {\n        return;\n      }\n\n      if (!res.ok) throw Error(res.statusText);\n\n      const json = await res.json(),\n        {\n          info: {messages = [], statuscode}\n        } = json;\n\n      if (errors?.route?.includes(statuscode)) {\n        dispatch(directionsFailed(messages.length ? messages[0] : DEFAULT_ERR_MSG));\n        console.error(`${DEFAULT_ERR_MSG}:`, messages);\n      }\n\n      dispatch(setRouteDataResponse(json));\n      dispatch(creator(json));\n    } catch (error) {\n      dispatch(directionsFailed(DEFAULT_ERR_MSG));\n      console.error(error);\n      window.newrelic?.noticeError(error);\n      throw error;\n    }\n  },\n  setRouteData\n);\n\nexport default loadDirections;\n\nfunction buildRouteOptions(getState) {\n  let {routeSettings} = directionsProps(getState());\n  let {routeSettings: routeOptimizationSettings} = routeOptimizationProps(getState());\n  if (getPage(window.location.pathname) === 'routeplanner') {\n    const {\n      units,\n      generalize,\n      avoidsCountryBorders,\n      avoidsFerries,\n      avoidsHighways,\n      avoidsSeasonalRoads,\n      avoidsTimedRestrictions,\n      avoidsTollRoads\n    } = routeOptimizationSettings;\n    const avoids = [avoidsCountryBorders, avoidsFerries, avoidsHighways, avoidsSeasonalRoads, avoidsTollRoads]\n      .filter(avoid => avoid.value)\n      .map(avoid => avoid.flag);\n    return {\n      ...routeOptions.defaults,\n      avoids,\n      avoidTimedRestrictions: !!avoidsTimedRestrictions.value,\n      unit: units.value ? 'k' : 'm',\n      generalize: generalize.value,\n      routeType: routeOptimizationSettings.routeType.value ? 'shortest' : 'fastest',\n      enhancedNarrative: true\n    };\n  } else {\n    const {restrictions, unit, routeType, ...avoidOptions} = routeSettings;\n\n    // Build list of avoids from flags in config to send as array\n    const avoids = Object.keys(avoidOptions)\n      .filter(key => avoidOptions[key] && toggles[key])\n      .map(key => toggles[key].flag);\n\n    return {\n      ...routeOptions.defaults,\n      routeType: routeType ?? 'fastest',\n      avoidTimedConditions: !!restrictions,\n      unit,\n      avoids: avoids\n    };\n  }\n}\n\nfunction parsedDirections(getState) {\n  let {destinationList} = directionsProps(getState());\n  return (\n    destinationList\n      .filter(destination => destination)\n      // only return the destinations resolved to locations\n      .map(({location}) => {\n        // Remove fields with null/undefined values\n        if (location === undefined) return {};\n        return Object.entries(location).reduce((a, [k, v]) => (v == null ? a : ((a[k] = v), a)), {});\n      })\n  );\n}\n\nfunction getDirectionsUrl(destinations) {\n  return destinations.reduce((url, {salt, slug}) => {\n    if (url.length == 0) return (url += `/from${salt || slug}`);\n    return (url += `/to${salt || slug}`);\n  }, '');\n}\n\naddTrigger(\n  createSelector(select(directionsSlice.destinationList), list => list),\n  () => dispatch => dispatch(loadDirections())\n);\n\naddTrigger(\n  createSelector(select(routing.routeSettings), settings => settings),\n  (settings, previousSettings) => dispatch => {\n    if (JSON.stringify(settings) !== JSON.stringify(previousSettings)) {\n      if (previousSettings?.canReorder?.value && !settings?.canReorder?.value) {\n        dispatch(setWereDestinationsReordered(false));\n      }\n      dispatch(loadDirections());\n    }\n  }\n);\n\naddTrigger(\n  createSelector(select(directionsSlice.routeSettings), settings => settings),\n  () => dispatch => dispatch(loadDirections())\n);\n\naddTrigger(\n  createSelector(select(directionsSlice.routeData), routeData => routeData),\n  routeData => async (dispatch, getState) => {\n    let parsed = parsedDirections(getState);\n    if (parsed.length >= 2 && routeData?.route?.legs) {\n      // TODO: Change fuel cost calculation to using HERE translation layer (or remove it)\n      // const {\n      //   route: {distance, options, sessionId}\n      // } = routeData;\n      // const distanceInMiles = getDistanceInMiles(distance, options?.unit);\n      // const fuelCost = await getFuelCost(distanceInMiles, sessionId);\n      // dispatch(setFuelCost(fuelCost));\n\n      const isNarrative = narrativeState(getState());\n\n      if (!isNarrative) {\n        const newPath =\n          window.location.pathname.match(/(^\\/[\\w]+)/g) +\n          getDirectionsUrl(parsed) +\n          window.location.search +\n          window.location.hash;\n        dispatch(setSharePath(newPath));\n        // In-line replacement of history so that we don't trigger a refresh\n        window.history.replaceState({}, '', newPath);\n      }\n    }\n  }\n);\n","import React from 'react';\n\nimport {dateDiff} from '../search/SearchResult';\n\nimport {infosheetSectionGas, gasPricesContainer, infosheetSection} from './styles.scss';\n\nexport default ({data}) => {\n  const gasPrices = data?.gasPrices;\n  if (!gasPrices) return null;\n\n  const\n    {timestamp} =\n      Object.values(gasPrices)[0]\n        .slice()\n        .sort(({price: a}, {price: b}) => a - b)[0] || {};\n\n  const {weeks, days, hours} = dateDiff(new Date(), new Date(timestamp));\n\n  return (\n    <div className={`${infosheetSectionGas} ${infosheetSection}`}>\n      <div className={gasPricesContainer}>\n        {gasPrices.values.map((gasPrice, i) => (\n          <span key={i}>\n            <strong>${gasPrice.price.toFixed(2)}</strong> {gasPrice.product}\n          </span>\n        ))}\n      </div>\n      <div>\n        {`Gas prices updated\n        ${weeks\n          ? `${weeks} week ago`\n          : days\n          ? `${days} day ago`\n          : hours\n          ? `${hours} hours ago`\n          : 'just now'}`}\n      </div>\n    </div>\n  );\n};\n","import React from 'react';\nimport MoreLess from '../MoreLess';\nimport {infosheetSection, infosheetSectionDescription} from './styles.scss';\n\nexport default ({ description }) => {\n  const startsWithHeader = /^<h[1-6]>/.test(description);\n  return (\n    <section\n      className={`${infosheetSection} ${infosheetSectionDescription}`}\n      data-separator=\"true\"\n      data-testid=\"description\"\n    >\n      <MoreLess lines={startsWithHeader ? 5 : 3}>{description}</MoreLess>\n    </section>\n  );\n};\n","import React from 'react';\nimport {\n  aboutBlock,\n  aboutBlockCompact,\n  aboutBlockWithIconOrButton,\n  aboutBlockButton,\n  relatedCategories,\n  relatedCategoryCard,\n} from './styles.scss';\nimport {trackAction} from 'gtm.service';\nimport {api} from 'config';\nimport Image from '../Image';\n\nconst onRelatedLinkClick = (evt, href) => {\n  trackAction('related-categories-click', 'infosheet');\n  evt.preventDefault();\n  window.location.href = href;\n};\n\nexport default ({data, type, title}) => {\n  if (type == 'payment-accepted') {\n    return (\n      <div className={aboutBlock} data-separator=\"true\">\n        <h2>Payment</h2>\n        <div className=\"payments\">{data.map((cardName, index) => <p key={index}>{cardName}</p>)}</div>\n      </div>\n    );\n  } else if (type == 'related-places') {\n    const transformCategory = category =>\n      category.toLowerCase().replace('&', 'and').replace(/[ /]/g, '-').replace(/'/g, '');\n\n    return (\n      <div className={aboutBlock} data-separator=\"true\">\n        <h2>Find related places</h2>\n        <div className={relatedCategories}>\n          {data.slice(0, 6).map((category, index) => {\n            const categoryHref = category.url?.replace('https://www.mapquest.com', '');\n            return (\n              <a\n                key={index}\n                href={categoryHref}\n                onClick={evt => onRelatedLinkClick(evt, categoryHref)}\n                className={relatedCategoryCard}\n                rel=\"nofollow\"\n              >\n                <Image src={`${api.relatedCategoriesImageUrl}/${transformCategory(category.node.name)}.jpg`} width=\"185\" height=\"92\" />\n                <div className=\"title-container\">\n                  <p>{category.node.name}</p>\n                </div>\n              </a>\n            );\n          })}\n        </div>\n      </div>\n    );\n  } else if (type == 'restaurant-services') {\n    if (data?.values?.[0] != 'true') return null;\n    return (\n      <div className={aboutBlock}>\n        <span>{title}</span>\n      </div>\n    );\n  } else if (type == 'good-to-know') {\n    return (\n      <div className={aboutBlock} data-separator=\"true\">\n        <h2>Good to know</h2>\n        {data?.servesCuisine && <span>Serves {data.servesCuisine} cuisine</span>}\n        {data?.delivery?.values?.[0] == 'true' && <span>Delivery</span>}\n        {data?.curbsidePickup?.values?.[0] == 'true' && <span>Curbside pickup</span>}\n      </div>\n    )\n  } else if (type === 'verification') {\n    return (\n      <div className={aboutBlockWithIconOrButton} data-separator=\"true\">\n        <span>\n          <i className=\"icon-checkmark-cloud\" />\n          {data}\n        </span>\n      </div>\n    );\n  } else if (type === 'claim-business') {\n    return (\n      <div className={aboutBlockWithIconOrButton} data-separator=\"true\">\n        <span>\n          <i className=\"icon-business\" />\n          Own this business?\n        </span>\n        <a\n          href=\"https://listings.mapquest.com/pl/mapquest-claims\"\n          className={aboutBlockButton}\n          onClick={e => data.onClaimClick(e)}\n        >\n          Claim it\n        </a>\n      </div>\n    );\n  } else {\n    if (type === 'separate-section') {\n      return (\n        <div className={aboutBlockCompact} data-separator=\"true\">\n          <h2>{title}</h2>\n          <span>{data}</span>\n        </div>\n      );\n    }\n    return (\n      <div className={type === 'compact' ? aboutBlockCompact : aboutBlock}>\n        <h2>{title}</h2>\n        <span>{data}</span>\n      </div>\n    );\n  }\n};\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {mapProps} from '../../model/selectors';\n\nimport AboutBlock from './AboutBlock';\n\nimport {infosheetSection} from './styles.scss';\n\nconst relatedPlaces = placeData => {\n  if (!!placeData?.place?.categories?.edges?.length) {\n    return <AboutBlock data={placeData.place.categories.edges} type=\"related-places\" />;\n  }\n};\n\nexport default ({data, placeDetails}) => {\n  if (!data?.['@id']) return null;\n\n  const {printView} = useSelector(mapProps),\n    {\n      checkInTime,\n      checkOutTime,\n      delivery,\n      curbsidePickup,\n      hotelQualityRating,\n      roomCount,\n      servesCuisine,\n      reviewCount,\n    } = data;\n  const isAdminArea = !data?.mqId || data?.['@lineage']?.includes('AdministrativeArea');\n\n  return (\n    <section className={infosheetSection}>\n      {hotelQualityRating && reviewCount > 0 && (\n        <AboutBlock data={`${hotelQualityRating}-star`} title=\"Quality:\" type=\"separate-section\" />\n      )}\n      {checkInTime && <AboutBlock data={checkInTime} title=\"Check-in:\" type=\"compact\" />}\n      {checkOutTime && <AboutBlock data={checkOutTime} title=\"Check-out:\" type=\"separate-section\" />}\n      {roomCount && <AboutBlock data={roomCount} title=\"Room count:\" type=\"separate-section\" />}\n      {(servesCuisine || delivery || curbsidePickup) && <AboutBlock data={{servesCuisine, delivery, curbsidePickup}} type=\"good-to-know\" />}\n      {!printView && !isAdminArea && relatedPlaces(placeDetails)}\n    </section>\n  );\n};\n","import {trackAction} from 'gtm.service';\n\nexport function MapboxClickEvent(action) {\n  trackAction(action, 'map');\n}\n\nexport function MapboxEventListeners(map) {\n  document\n    .querySelector('.mapboxgl-ctrl-zoom-in')\n    .addEventListener('click', () => MapboxClickEvent('zoom-in-button-clicked'));\n  document\n    .querySelector('.mapboxgl-ctrl-zoom-out')\n    .addEventListener('click', () => MapboxClickEvent('zoom-out-button-clicked'));\n  document.querySelector('.mapboxgl-ctrl-attrib-inner').addEventListener('click', evt => {\n    if (evt.target.className == 'mapbox-improve-map') MapboxClickEvent('feedback-link-clicked');\n  });\n\n  if (map) {\n    map.on('dragend', () => {\n      MapboxClickEvent('map-panned');\n    });\n\n    map.on('load', () => {\n      const locationControl = document.querySelector('.mapboxgl-ctrl-geolocate');\n      if (locationControl) {\n        locationControl.addEventListener('click', () => MapboxClickEvent('current-location-clicked'));\n      }\n    });\n  }\n}\n","import React from 'react';\n\nconst MenuItem = ({checked, onChange, onClick, label, disabled}) => {\n  const style = {\n    pointerEvents: disabled ? 'none' : 'initial',\n    color: disabled ? '#ccc' : 'initial'\n  };\n\n  return (\n    <label aria-label={label} onClick={onClick} style={style}>\n      <input type=\"checkbox\" onChange={onChange} checked={checked}/>\n      {label}\n    </label>\n  );\n};\n\nexport default MenuItem;\n","import React, {useEffect, useState} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {createPortal} from 'react-dom';\nimport {useOutsideClick, useEventListener} from 'event-hooks';\nimport {get, api} from 'config';\nimport {buildUrl} from 'url-utils';\nimport {sharedStore, useSelectorFactory} from 'morass';\nimport {sharedMap} from '../../shared';\nimport {setMarkerState} from '../../model/actions';\nimport {mapProps} from '../../model/selectors';\nimport {replaceTraffic, removeTraffic} from '../../../lib/markerUtils';\nimport {TrafficFlowLayer} from '../../../extra';\nimport {MapboxClickEvent} from '../../services/mapbox-tracking.service';\nimport MenuItem from './MenuItem';\n\nconst {slowdowns: enableSlowdowns = true, incidents: enableIncidents = true} = get('map.controls.traffic') || {};\nconst {traffic} = api;\n\nconst TrafficControl = () => {\n  const title = 'Traffic';\n  const dispatch = useDispatch();\n  const clickOut = useOutsideClick(() => setMenu(null));\n  const {map} = useSelectorFactory(sharedMap, {mapId: 'primary'});\n  const {bounds, center, zoom} = useSelector(mapProps);\n  const nearestZoom = Math.round(zoom);\n  const [menu, setMenu] = useState(null);\n  const [hasIncidents, setHasIncidents] = useState(false);\n  const [trafficIncidents, setTrafficIncidents] = useState([]);\n  const [flow, setFlow] = useState('');\n  const [layers, setLayer] = useState({slowdowns: false, incidents: false});\n  const [shouldUpdateFlow, setShouldUpdateFlow] = useState(false);\n\n  const menuItems = [\n    {\n      enable: enableSlowdowns,\n      checked: layers.slowdowns && flow,\n      layer: 'slowdowns',\n      action: 'traffic-slow-downs-button-clicked',\n      label: 'Traffic slowdowns',\n      disabled: !flow\n    },\n    {\n      enable: enableIncidents,\n      checked: layers.incidents && hasIncidents,\n      layer: 'incidents',\n      action: 'traffic-incidents-button-clicked',\n      label: 'Traffic incidents',\n      disabled: !hasIncidents\n    }\n  ];\n\n  const resetToNearestZoom = () => {\n    map.easeTo({\n      zoom: nearestZoom\n    });\n  };\n\n  const getIncidents = async () => {\n    const boundingBox = `${bounds.north},${bounds.west},${bounds.south},${bounds.east}`;\n    const filters = ['construction', 'incidents', 'events', 'congestion'];\n    const incidentsParams = {boundingBox, filters};\n    const response = await fetch(buildUrl(traffic.incidents, incidentsParams));\n    let incidentsResponse;\n    let data;\n\n    if (response.ok) {\n      data = await response.json();\n      incidentsResponse = data?.incidents.length > 0;\n      setTrafficIncidents(data.incidents);\n    } else {\n      incidentsResponse = false;\n    }\n    setHasIncidents(incidentsResponse);\n    return data;\n  };\n\n  const getFlow = async () => {\n    const scaleValues = {\n      10: 433343,\n      11: 216671,\n      12: 108335,\n      13: 54167,\n      14: 27083,\n      15: 13541,\n      16: 6770,\n      17: 3385,\n      18: 1692\n    };\n    const {lat, lng} = center;\n    const mapScale = scaleValues[nearestZoom + 1];\n    const mapContainer = document.getElementsByClassName('mapboxgl-canvas')[0];\n    const mapWidth = mapContainer.offsetWidth;\n    const mapHeight = mapContainer.offsetHeight;\n    const flowParams = {\n      mapWidth,\n      mapHeight,\n      mapLat: lat,\n      mapLng: lng,\n      mapScale,\n      imageType: 'png'\n    };\n    let flowResponse;\n\n    if (nearestZoom >= 10 && nearestZoom <= 18) {\n      const flowImgPath = buildUrl(traffic.flow, flowParams);\n      const response = await fetch(flowImgPath);\n      if (response.ok) {\n        flowResponse = mapScale >= 1692 ? flowImgPath.href : '';\n      }\n    }\n\n    return setFlow(flowResponse);\n  };\n\n  const toggleLayer = (layer, action) => {\n    setLayer({...layers, [layer]: !layers[layer]});\n    resetToNearestZoom();\n    MapboxClickEvent(action);\n  };\n\n  const onMenuClick = () => {\n    setMenu(!menu);\n    getIncidents();\n    getFlow();\n  };\n\n  const clearFlowLayer = () => {\n    setLayer({...layers, slowdowns: false});\n  };\n  useEventListener('resize', clearFlowLayer);\n\n  useEffect(() => {\n    const userMapMovements = ['boxzoomstart', 'pitchstart', 'rotatestart', 'wheel'];\n    userMapMovements.map(movement => {\n      return map.on(movement, () => {\n        setMenu(false);\n        clearFlowLayer();\n      });\n    });\n\n    map.on('dragstart', () => {\n      if (layers.slowdowns) {\n        setShouldUpdateFlow(true);\n        setMenu(false);\n        clearFlowLayer();\n      } else {\n        setShouldUpdateFlow(false);\n      }\n    });\n\n    const store = sharedStore().getState();\n    const shouldUpdateMarkers = layers.incidents ? replaceTraffic(store, trafficIncidents) : removeTraffic(store);\n    dispatch(setMarkerState(shouldUpdateMarkers));\n  }, [layers, menu, flow]);\n\n  useEffect(() => {\n    if (shouldUpdateFlow) {\n      getFlow();\n    }\n  }, [center])\n\n  useEffect(() => {\n    if (shouldUpdateFlow) {\n      setLayer({...layers, slowdowns: true});\n    }\n  }, [flow])\n\n  return (\n    <button type=\"button\" title={title} aria-label={title} ref={clickOut} onClick={onMenuClick}>\n      {menu && (\n        <nav>\n          {menuItems.map(menuItem => {\n            const {enable, checked, layer, action, label, disabled} = menuItem;\n            return enable ? (\n              <MenuItem key={label} checked={checked} onChange={() => toggleLayer(layer, action)} onClick={e => e.stopPropagation()} label={label} disabled={disabled} />\n            ) : null;\n          })}\n        </nav>\n      )}\n      <i className=\"icon-traffic\" />\n      {layers.slowdowns\n        ? createPortal(<TrafficFlowLayer src={flow} />, document.getElementsByClassName('mapboxgl-canvas-container')[0])\n        : null}\n    </button>\n  );\n};\n\nexport default TrafficControl;\n","import {sharedStore} from 'morass';\nimport {api} from 'config';\nimport {setCategories, categoriesFailed} from './actions';\n\nconst {categories} = api;\n\nsharedStore().dispatch(\n  async (dispatch) => {\n    try {\n      const response = await fetch(categories);\n\n      if (response.status!==200)\n        throw Error(response.statusText);\n\n      const jsonResponse = await response.json();\n      dispatch(setCategories(jsonResponse));\n\n    } catch(error) {\n      dispatch(categoriesFailed(error.message));\n      console.error(error);\n      window.newrelic?.noticeError(error);\n    }\n  }\n);\n","import React from 'react';\nimport {connect} from 'react-redux';\n\nimport {searchProps} from '../model/selectors';\nimport {setOrigin, setDestination} from '../model/actions';\n\nimport {menuContainer} from './PoiContextMenu.scss';\n\nexport default connect(\n  (state, {index}) => {\n    const {location, name} = searchProps(state).results[index];\n    return {point: {location, name}}\n  },\n  {setOrigin, setDestination}\n)(\n  ({x, y, point, close, setOrigin, setDestination}) => {\n\n    return (\n      <div\n          className={menuContainer}\n      style={{\n        top: y,\n        left: x,\n      }}>\n        <button onClick={() => { close(); setOrigin(point)}}>Set as Origin</button>\n        <button onClick={() => { close(); setDestination(point)}}>Set as Destination</button>\n      </div>\n    );\n  }\n);\n\n","import React, {useState} from 'react';\nimport {connect} from 'react-redux';\nimport {selectorFactory} from 'morass';\nimport {sharedMap} from '../shared';\nimport {poiMarkers} from '../model/selectors';\n\n// Ensure categories are loaded\nimport '../model/poi-categories';\n\nimport PoiContextMenu from './PoiContextMenu';\n\nexport default connect(selectorFactory({poiMarkers, sharedMap}))(\n  ({makeMarker, clearMarker, poiMarkers: poi, sharedMap}) => {\n    if (!sharedMap) return null; // Don't try to paint POIs on a map that doesn't exist\n    const [{poi: oldPoi, markers}, setState] = useState({markers: []});\n    const [contextMenu, setContextMenu] = useState();\n\n    if (poi !== oldPoi) {\n      if (oldPoi) {\n        setContextMenu();\n        oldPoi.forEach((item, index) => {\n          if (!poi || poi.indexOf(item) < 0) {\n            clearMarker(markers[index]);\n            markers[index] = null;\n          }\n        });\n      }\n\n      if (poi) {\n        const factory = makeMarker(sharedMap, setContextMenu);\n        poi.forEach((item, index) => {\n          if (!markers[index]) markers[index] = factory(item);\n        });\n      }\n\n      setState({poi, markers});\n    }\n\n    return (contextMenu && <PoiContextMenu {...contextMenu} close={setContextMenu} />) || null;\n  }\n);\n","import React, {useEffect, useState} from 'react';\nimport {connect} from 'react-redux';\nimport {map, provider} from 'config';\nimport {selectorFactory} from 'morass';\nimport {mapProps, initProps} from '../model/selectors';\nimport {\n  setMapCenter,\n  setMapZoom,\n  setCenter,\n  setZoom,\n  setStyle,\n  setConfirmedBounds,\n  setMapAttributes,\n  setMarkerState,\n  setRibbonState\n} from '../model/actions';\nimport {initGeolocation} from '../model/browser-geolocation';\nimport {sharedMap, setSharedMap} from '../shared';\nimport {getPage, isInfosheetRoute} from '../utilities';\nimport {useLocation} from 'route-utils';\n\nconst {\n  // Configuration defaults are for provider.map=='mapbox'\n  [provider.map]: {fallbackZoom = 4.5} = {},\n  fallbackCenter = {lat: 38.5, lng: -98}\n} = map || {};\n\nlet isGeoInitialized = false;\n\nexport default connect(selectorFactory({mapProps, initProps, sharedMap}), {\n  setMapCenter,\n  setMapZoom,\n  setCenter,\n  setZoom,\n  setStyle,\n  initGeolocation,\n  setConfirmedBounds,\n  setMapAttributes,\n  setMarkerState,\n  setRibbonState,\n  setSharedMap\n})(\n  ({\n    className,\n    children,\n    initMap,\n    mapId,\n    mapProps,\n    sharedMap,\n    setMapCenter,\n    setMapZoom,\n    setCenter,\n    setZoom,\n    setStyle,\n    initGeolocation,\n    setConfirmedBounds,\n    setMapAttributes,\n    setMarkerState,\n    setRibbonState,\n    setSharedMap,\n    language,\n    'skip-geo': skipGeo\n  }) => {\n    const {mapCenter, mapZoom, mapBounds, style: theme} = mapProps,\n      location = useLocation();\n    const [hasLocation, setHasLocation] = useState(false);\n\n    useEffect(() => {\n      if (sharedMap && mapBounds) sharedMap.fitBounds(mapBounds);\n    }, [sharedMap, mapBounds]);\n\n    useEffect(() => {\n      if (sharedMap && mapCenter) sharedMap.setCenter(mapCenter);\n    }, [sharedMap, mapCenter]);\n\n    useEffect(() => {\n      if (sharedMap && mapZoom) sharedMap.setZoom(mapZoom);\n    }, [sharedMap, mapZoom]);\n\n    useEffect(() => {\n      if (sharedMap && theme) sharedMap.setStyle(theme);\n    }, [sharedMap, theme]);\n\n    useEffect(() => {\n      if (!isGeoInitialized && !skipGeo && !hasLocation && !isInfosheetRoute(location.pathname)) {\n        initGeolocation(false)\n        setHasLocation(true)\n      }\n    }, [isGeoInitialized, skipGeo, hasLocation, setHasLocation]);\n\n    useEffect(() => {\n      if (mapBounds) return;\n      const path = location.pathname,\n        pageType = getPage(path);\n      if (pageType == 'home' || pageType == 'search' || pageType == 'routeplanner') return;\n      const isCompleteDirections = pageType == 'directions' && path.includes('/from/') && path.includes('/to/');\n      if (isCompleteDirections) return;\n      if (!mapCenter) setMapCenter(fallbackCenter);\n      if (!mapZoom) setMapZoom(fallbackZoom);\n    }, [location.pathname, !!mapCenter, !!mapZoom, !!mapBounds]);\n\n    return (\n      <div ref={sharedMap || !(mapBounds || mapCenter || mapZoom) ? null : maybeCreate} className={className}>\n        {children}\n      </div>\n    );\n\n    function maybeCreate(container) {\n      if (!container) return;\n      const options = {theme};\n      if (mapBounds) {\n        options.bounds = mapBounds;\n      } else {\n        options.center = mapCenter || fallbackCenter;\n        options.zoom = mapZoom || fallbackZoom;\n      }\n      setSharedMap(\n        initMap(container, options, {\n          setCenter,\n          setZoom,\n          setStyle,\n          setConfirmedBounds,\n          setMapAttributes,\n          setMarkerState,\n          setRibbonState,\n          language\n        }),\n        mapId\n      );\n    }\n  }\n);\n","import React, {useRef} from 'react';\nimport {useStore, useDispatch} from 'react-redux';\n\nimport {setMapCenter, setMapZoom} from '../model/actions';\nimport {mapProps} from '../model/selectors';\n\nexport default Component =>\n  ({pos, ...props}) => {\n    const // Intentionally not using useSelector() to avoid updating this wrapper on store changes!\n      state = useStore().getState(),\n      {mapCenter, mapZoom} = mapProps(state),\n      dispatch = useDispatch(),\n      force = useRef(0);\n\n    if (pos && !(mapCenter && mapZoom && serializePosition(mapCenter, mapZoom) == pos)) {\n      const [c, z] = parsePosition(pos) || [];\n      if (!c) {\n        force.current++;\n      } else {\n        dispatch(setMapCenter(c));\n        if (z) dispatch(setMapZoom(z));\n      }\n    }\n\n    return <Component {...props} />;\n  };\n\nconst trailingZeroes = /^(.*?)0+$/,\n  twoPartNumber = /^([^\\.]+)\\.(.+)$/;\n\nfunction roundUp(number, precision = 6) {\n  const n = number.toFixed(precision),\n    s = twoPartNumber.exec(n);\n  if (!s) return n;\n  const hasTrailingZeroes = trailingZeroes.exec(s[2]);\n  if (!hasTrailingZeroes) return n;\n  if (!hasTrailingZeroes[1]) return s[1];\n  return s[1] + '.' + hasTrailingZeroes[1];\n}\n\nfunction serializePosition({lat, lng}, zoom) {\n  return encodeURI(`${roundUp(lat)},${roundUp(lng)},${roundUp(zoom, 1)}z`);\n}\n\nfunction parsePosition(pos) {\n  const [, lat, lng, zoom] =\n    /^([+\\-]?\\d+(?:\\.\\d*)?),([+\\-]?\\d+(?:\\.\\d*)?)(?:,(\\d+(?:\\.\\d*)?)z)?$/.exec(decodeURI(pos)) || [];\n  return [lat && lng && {lat: +lat, lng: +lng}, zoom && +zoom];\n}\n","import React, {useState, useEffect} from 'react';\nimport {useSelector, useDispatch} from 'react-redux';\nimport {directionsProps} from '../../../model/selectors';\nimport {setAlternateRoutesData, setCurrentRoute} from '../../../model/actions';\nimport {irsReimbursement, getDistanceInMiles, getIsRouteLegInUSA} from '../../../../utils/directions/index.cjs';\nimport {routesContainer} from './routes.scss';\n\nexport default function Routes({getDirectionsButton, isPedestrian = false}) {\n  const {routeData, routeDataResponse, currentRouteIndex} = useSelector(directionsProps),\n    dispatch = useDispatch(),\n    route = routeDataResponse.route,\n    routes = route.alternateRoutes ? [route, ...route.alternateRoutes.map(r => r.route)] : [route],\n    [hours, setHours] = useState(0),\n    [mins, setMins] = useState(0);\n\n  useEffect(() => {\n    if (route.alternateRoutes) {\n      const alternateRoutes = [...routes];\n      alternateRoutes.splice(0, 1);\n      dispatch(setAlternateRoutesData(alternateRoutes));\n    }\n  }, [routeDataResponse]);\n\n  const buttonWidth = 100 / routes.length;\n\n  const updateRouteTime = () => {\n    const h = Math.floor(routeData?.route?.time / 3600);\n    const m = Math.floor((routeData?.route?.time - h * 3600) / 60);\n    setHours(h);\n    setMins(m);\n  };\n\n  useEffect(() => {\n    updateRouteTime();\n  }, [routeData]);\n\n  return (\n    <div className={`${routesContainer} alternateRoutes`}>\n      <p className=\"title\">\n        {routes.length > 1 ? 'Choose ' : ''}\n        Your Route\n      </p>\n      {routes.length > 1 && (\n        <div className=\"buttons-wrapper\">\n          <div className=\"triangle\" style={{left: `${buttonWidth / 2 + currentRouteIndex * buttonWidth}%`}}></div>\n          <div className=\"tab-buttons\">\n            {routes.map((route, index) => (\n              <button\n                className={`${currentRouteIndex === index ? 'selected' : ''}`}\n                onClick={() => dispatch(setCurrentRoute(index))}\n                key={`route-${index}`}\n              >\n                Route #{index + 1}\n              </button>\n            ))}\n          </div>\n        </div>\n      )}\n      <p className=\"bb-dashed\">\n        via <b>{routeData.route.name}</b>\n      </p>\n      <p className=\"bb-dashed\">\n        <b>\n          <span className=\"tall\">{hours}</span>hr <span className=\"tall\">{mins}</span>min\n          <span className=\"tall span-margin-left\">{Math.round(routeData.route.distance)}</span>\n          {routeData?.route?.options?.unit === 'M' ? 'mi' : 'km'}\n          <span className=\"span-margin-left tall\">\n            <i className={isPedestrian ? 'icon-walk' : 'icon-car'} />\n          </span>\n        </b>\n      </p>\n      {!isPedestrian && getIsRouteLegInUSA(routeData?.route?.locations) && (\n        <p className=\"bb-dashed\">\n          <b>\n            IRS Reimbursement:\n            <span className=\"highlight\">\n              ${irsReimbursement.calculateAmount(getDistanceInMiles(routeData.route.distance, routeData.route.options?.unit))}\n            </span>\n          </b>\n        </p>\n      )}\n      <div className=\"view-directions-button-container\">{getDirectionsButton}</div>\n    </div>\n  );\n}\n","import React, {useEffect} from 'react';\nimport {useStore, useDispatch} from 'react-redux';\nimport {setInfosheetMqId, setInfosheetSlug} from '../model/actions';\nimport {infosheetProps} from '../model/selectors';\n\nconst normalizeSlug = slug => {\n  if (slug && slug[0] !== '/') return '/' + slug;\n  return slug;\n};\n\nexport default Component =>\n  ({slug, ...props}) => {\n    const // Intentionally not using useSelector() to avoid updating this wrapper on store changes!\n      state = useStore().getState(),\n      {slug: oldSlug} = infosheetProps(state),\n      dispatch = useDispatch(),\n      mqId = slug.match(/-(\\d+)$/)?.[1] || null;\n\n    useEffect(() => {\n      if (slug !== oldSlug) {\n        dispatch(setInfosheetMqId(mqId || null));\n        dispatch(setInfosheetSlug(normalizeSlug(slug) || ''));\n      }\n    }, [slug]);\n\n    return <Component {...props} />;\n  };\n","import React, {useState, useEffect, forwardRef, useRef} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {AdWrapper, Ad} from '../ads/update-unit-class';\nimport {RouteSettingsMenu, Popup} from '../../../extra';\nimport DirectionsList from './DirectionsList';\nimport {ButtonWithSpinner} from '../spinner';\nimport RoadWarriorCTA from '../road-warrior-cta';\nimport DestinationParser from '../DestinationParser';\nimport NotFound from '../not-found';\nimport Spinner from '../../components/spinner';\nimport { PAGE_STATUS } from '../../../lib/constants.cjs';\nimport { sharedMap } from '../../shared';\nimport {\n  adImageWrapper,\n  addStopButtonContainer,\n  directions,\n  directionsError,\n  directionsLoading,\n  directionsSectionBleed,\n  directionsIntroText,\n  directionsIconButton,\n  directionsButton,\n  routeSponsorshipAd\n} from './directions.scss';\nimport {searchbarAd, mobileSearchbarAd, sidebarAdPlaceholder, mobileSidebarAdPlaceholder} from '../search/styles.scss';\nimport DirectionsNarrative from './Narrative';\nimport {narrativeState as narrativeSelector, directionsProps, rawRouteSponsorships} from '../../model/selectors';\nimport {\n  setNarrativeState,\n  setRouteData,\n  setMarkerState,\n  setRibbonState,\n  setDestinationList,\n  setRouteSettings,\n  setRouteDataResponse\n} from '../../model/actions';\nimport {navigate} from '../../../lib/url-utils';\nimport {getDirectionsText} from 'directions-utils';\nimport {trackAction, trackPageView, setPubAdsTargeting} from 'gtm.service';\nimport {useMobileCheck} from 'event-hooks';\n\nimport {removeWaypoints} from 'markerUtils';\nimport {removeAllRibbons} from 'routeRibbonUtils';\n\nimport {sharedStore, useSelectorFactory} from 'morass';\nimport Routes from './Routes';\n\nimport {getQueryFiltered, setQueryParams, removeQueryParams} from 'url-utils';\n\nconst mobileDirectionsUnitConfig = {\n  topName: 'mobsearchbardirectionstop',\n  bottomName: 'searchbardirections',\n  className: mobileSearchbarAd,\n  placeholderClass: mobileSidebarAdPlaceholder\n};\nconst desktopDirectionsUnitConfig = {\n  topName: 'searchbardirectionstop',\n  bottomName: 'searchbardirections',\n  className: searchbarAd,\n  placeholderClass: sidebarAdPlaceholder\n};\n\nconst getRandomInt = max => Math.floor(Math.random() * max);\n\nconst Directions = forwardRef(({children, ...props}, ref) => {\n  const dispatch = useDispatch(),\n    {map} = useSelectorFactory(sharedMap, {mapId: 'primary'}) || {},\n    narrativeState = useSelector(narrativeSelector),\n    {\n      directionsLoadingState,\n      routeDataResponse,\n      routeData,\n      routeSettings: {routeType, ...routeSettings} = {},\n      destinationList,\n      status,\n      error: errorMsg\n    } = useSelector(directionsProps),\n    firstDestination = destinationList[0] || {},\n    finalDestination = destinationList[destinationList.length - 1] || {},\n    directionsText = getDirectionsText(firstDestination, finalDestination),\n    [showRouteSettings, setShowRouteSettings] = useState(false),\n    getDirectionsButtonProps =\n      directionsLoadingState != null || routeData == null || (status === PAGE_STATUS.ERROR && errorMsg)\n        ? {disabled: true}\n        : {},\n    isMobile = useMobileCheck(),\n    [directionsUnit, setDirectionsUnit] = useState(isMobile ? mobileDirectionsUnitConfig : desktopDirectionsUnitConfig),\n    roadWarriorCtaRef = useRef(null),\n    activeStatus = {start: false, end: false};\n\n  if (window.location.pathname.includes('/from')) activeStatus.start = true;\n  if (window.location.pathname.includes('/to')) activeStatus.end = true;\n\n  const cleanString = string => string.replace(/[`~!@#$%^&*()_|+\\-=?;:'\",.<>\\{\\}\\[\\]\\\\\\/]/gi, '').replace(/  +/g, ' ');\n\n  const handleGetDirections = () => {\n    dispatch(setNarrativeState(true));\n    trackAction('directions-button-clicked', 'directions', {value: routeData?.route?.locations.length});\n    const {pathname} = window.location;\n    const narrativePath = pathname.replace(/^\\/directions/, '/directions/list/1');\n    navigate(narrativePath);\n  };\n\n  const addStopButtonEl = (\n    <button className={`${directionsIconButton} ${addStopButtonContainer}`} data-testid=\"add-stop-btn\">\n      <i className=\"icon-plus-circle-outlined\" data-cy=\"icon-plus-circle\"></i>\n      Add stop\n    </button>\n  );\n\n  useEffect(() => {\n    // only do redirect if there is one origin/destination\n    if (destinationList.filter(dest => dest?.location).length !== 1) return;\n\n    // if the origin or destination is not the canonical, navigate to the canonical\n    const matches = window.location.pathname.match(/^\\/directions\\/(to|from)\\/(.*)/);\n    if (!matches || matches.length < 3) return;\n\n    const slug = (matches[1] === 'from') ? destinationList[0].location?.slug : destinationList[1].location?.slug;\n\n    if (slug && slug !== ('/' + matches[2])) {\n      const newUrl = '/directions/' + matches[1] + slug;\n      navigate(newUrl, {replaceUrl: true, query: location.search});\n    }\n  }, [destinationList]);\n\n  useEffect(() => {\n    const markers = document.querySelectorAll('.poi-marker');\n    markers.forEach(marker => marker.hidden = true)\n    map?.setLayoutProperty('phoenix-poi-labels', 'visibility', 'none');\n\n    setPubAdsTargeting({l1: 'Travel'});\n\n    if (\n      Object.keys(getQueryFiltered('routeType')).length > 0 &&\n      getQueryFiltered('routeType').routeType === 'pedestrian'\n    ) {\n      dispatch(setRouteSettings({routeType: 'pedestrian', ...routeSettings}));\n    }\n\n    // clear the directions when the component is umounted.\n    return () => {\n      dispatch(setMarkerState(removeWaypoints(sharedStore().getState())));\n      dispatch(setRibbonState(removeAllRibbons(sharedStore().getState())));\n      dispatch(setDestinationList([{}, {}]));\n      dispatch(setRouteData(null));\n      dispatch(setRouteDataResponse(null));\n\n      removeQueryParams('routeType');\n\n      markers.forEach(marker => marker.hidden = false)\n      map?.setLayoutProperty('phoenix-poi-labels', 'visibility', 'visible');\n    };\n  }, []);\n\n  // destinationList is empty\n  useEffect(() => {\n    if (!destinationList?.length) return;\n\n    if (!activeStatus.start && !activeStatus.end) {\n      if (!destinationList[0]?.name && !finalDestination?.name)\n        trackPageView('directions', 'directions', {kvcat: ['Travel']});\n      setPubAdsTargeting({l1: 'Travel'});\n    }\n  }, [!!destinationList.filter(poi => !poi?.name && !poi?.location)?.length]);\n\n  // destinationList has POIs\n  useEffect(() => {\n    if (!destinationList?.length) return;\n    let pageViewData = {};\n    let areaData = {};\n\n    if (activeStatus.start || activeStatus.end) {\n      areaData = destinationList[0]?.name && !finalDestination.name ? destinationList[0] : finalDestination;\n\n      if (areaData?.location) {\n        pageViewData = {\n          kvcat: areaData['@adparameters']?.kvcat || ['Travel'],\n          kvdcity: areaData?.location?.adminArea5,\n          ...(areaData?.location?.adminArea1 && {kvcountry: areaData?.location?.adminArea1}),\n          ...(areaData?.location?.adminArea3 && {kvregion: areaData?.location?.adminArea3}),\n        };\n      }\n      else {\n        pageViewData = {\n          kvcat: areaData['@adparameters']?.kvcat || ['Travel'],\n          kvdcity: areaData?.['@adparameters']?.kvdcity || areaData?.location?.adminArea5,\n          ...(areaData['@adparameters']?.kvdco && {kvcountry: areaData['@adparameters'].kvdco}),\n          ...(areaData['@adparameters']?.kvdst && {kvregion: areaData['@adparameters'].kvdst}),\n        };\n      }\n\n      trackPageView('directions', 'directions', pageViewData);\n\n      // format kvcat data into { l1: category, l2: category, etc... }\n      const formattedPageViewData = {};\n      pageViewData?.kvcat?.forEach((category, index) => {\n        formattedPageViewData[`l${index + 1}`] = cleanString(category);\n      });\n\n      setPubAdsTargeting(formattedPageViewData);\n    }\n  }, [!!destinationList.filter(poi => poi?.name && poi?.location)?.length]);\n\n  useEffect(() => {\n    // set ad units\n    setDirectionsUnit(isMobile ? mobileDirectionsUnitConfig : desktopDirectionsUnitConfig);\n  }, [isMobile]);\n\n  useEffect(() => {\n    const isNarrative = props['0'] && props['0'].startsWith('list');\n\n    dispatch(setNarrativeState(isNarrative));\n    return () => {\n      dispatch(setNarrativeState(false));\n    };\n  }, [props['0']]);\n\n  const [visibleRouteSponsorShip, setVisibleRouteSponsorShip] = useState(null);\n  const routeSponsorships = useSelector(rawRouteSponsorships);\n\n  // Get a random route sponsorship based on show probabilities from config file.\n  useEffect(() => {\n    if (routeSponsorships.length && !visibleRouteSponsorShip) {\n      // Get the sum of all the probabilites.\n      const sumOfProbabilities = routeSponsorships.reduce(\n        (previousValue, currentValue) => previousValue + parseInt(currentValue.show_probability),\n        0\n      );\n\n      // Generate a random integer between 0 and the sum.\n      let randomNumber = getRandomInt(sumOfProbabilities);\n\n      let visibleIndex = -1;\n\n      // Iterate through the array and subtract the probability of each sponsorship.\n      routeSponsorships.forEach((sponsorShip, index) => {\n        randomNumber -= sponsorShip.show_probability;\n\n        // If the number is <= 0 then select that index.\n        if (visibleIndex === -1 && randomNumber <= 0) {\n          visibleIndex = index;\n        }\n      });\n\n      if (visibleIndex !== -1) {\n        setVisibleRouteSponsorShip(routeSponsorships[visibleIndex]);\n      }\n    }\n  }, [routeSponsorships, visibleRouteSponsorShip]);\n\n  const [isPedestrian, setIsPedestrian] = useState(false);\n\n  useEffect(() => {\n    if (routeType === 'pedestrian') {\n      setQueryParams('routeType=pedestrian', true);\n      setIsPedestrian(true);\n    } else {\n      removeQueryParams('routeType');\n      setIsPedestrian(false);\n    }\n  }, [routeType]);\n\n  useEffect(() => {\n    if (status === PAGE_STATUS.ERROR && errorMsg) trackAction('no-directions-found', 'error');\n  }, [errorMsg, status]);\n\n  const routeSettingsButton = (\n    <button\n      className={directionsIconButton}\n      onClick={() => {\n        trackAction('advanced-settings', 'directions', {'target-properties': 'open'});\n        setShowRouteSettings(true);\n      }}\n    >\n      <i className=\"icon-panel-outlined\"></i>\n      Route settings\n    </button>\n  );\n\n  const GetDirectionsButton = ({title}) => (\n    <ButtonWithSpinner\n      dataCy=\"view-directions-button\"\n      spinnerActive={directionsLoadingState}\n      className={directionsButton}\n      onClick={handleGetDirections}\n      {...getDirectionsButtonProps}\n    >\n      {title}\n    </ButtonWithSpinner>\n  );\n\n  const [previousLength, setPreviousLength] = useState(0);\n\n  useEffect(() => {\n    if (previousLength === 4 && destinationList.length === 5 && roadWarriorCtaRef.current) {\n      roadWarriorCtaRef.current.scrollIntoView({block: 'end', inline: 'nearest', behavior: 'smooth'});\n    }\n    setPreviousLength(destinationList.length);\n  }, [destinationList.length]);\n\n  const displayComponents = () => {\n    if (status == PAGE_STATUS.LOADING && !errorMsg)\n      return (\n        <div className={`${directionsLoading}`}>\n          <Spinner />\n        </div>\n      );\n    return directionsComponents();\n  };\n\n  const directionsComponents = () => {\n    return (\n      <>\n        {!narrativeState && (\n          <>\n            <div className=\"directions-section\">\n              <DirectionsList\n                addStopButton={addStopButtonEl}\n                showReorderRecommendation={true}\n                routeSettingsButton={routeSettingsButton}\n                hideRoadWarriorCTA={false}\n              />\n\n              {!routeDataResponse?.route?.alternateRoutes?.length && (\n                <div className=\"relative cta\">\n                  <GetDirectionsButton title=\"Get Directions\" />\n                  {destinationList.length > 2 && <RoadWarriorCTA isMobile={isMobile} ref={roadWarriorCtaRef} />}\n                </div>\n              )}\n            </div>\n\n            {status === PAGE_STATUS.ERROR && errorMsg && (\n              <NotFound\n                className={directionsError}\n                heading=\"There's something tricky about this route.\"\n                msgLine1=\"Maybe you can't drive there\"\n                msgLine2=\"Try changing your route stops.\"\n                type=\"directions\"\n              />\n            )}\n            {routeData && routeDataResponse.route?.alternateRoutes?.length && (\n              <div className=\"directions-section\">\n                <Routes\n                  getDirectionsButton={<GetDirectionsButton title=\"View route directions\" />}\n                  isPedestrian={isPedestrian}\n                />\n              </div>\n            )}\n            {visibleRouteSponsorShip && (\n              <div className={routeSponsorshipAd} id=\"route-sponsored-by\">\n                <div>\n                  <p>\n                    Route sponsored by <strong>{visibleRouteSponsorShip.name}</strong>\n                  </p>\n                </div>\n                <div className={adImageWrapper}>\n                  <a\n                    href={visibleRouteSponsorShip.directionsFormLinkLarge}\n                    target=\"_blank\"\n                    aria-labelledby=\"route-sponsored-by\"\n                  >\n                    <img src={visibleRouteSponsorShip.directionsFormImage} alt=\"\" />\n                  </a>\n                </div>\n              </div>\n            )}\n          </>\n        )}\n        {narrativeState && <DirectionsNarrative className={`directions-section directions-section-bleed`} />}\n        <AdWrapper showAdTitle className={directionsSectionBleed}>\n          <Ad\n            name={directionsUnit.bottomName}\n            className={directionsUnit.className}\n            placeholderClass={directionsUnit.placeholderClass}\n          />\n        </AdWrapper>\n        {!narrativeState && showRouteSettings && (\n          <Popup>\n            <RouteSettingsMenu\n              isActive={showRouteSettings}\n              onClose={() => {\n                trackAction('advanced-settings', 'directions', {'target-properties': 'close'});\n                setShowRouteSettings(false);\n              }}\n            />\n          </Popup>\n        )}\n      </>\n    );\n  };\n\n  return (\n    <div className={directions} ref={ref}>\n      <AdWrapper showAdTitle isMobile={isMobile} className={directionsSectionBleed}>\n        <Ad\n          name={directionsUnit.topName}\n          className={directionsUnit.className}\n          placeholderClass={directionsUnit.placeholderClass}\n        />\n      </AdWrapper>\n\n      <div className=\"directions-section\">\n        <div className={directionsSectionBleed}>{children}</div>\n        <p className={directionsIntroText}>\n          Get step-by-step walking or driving directions{directionsText}.\n          Avoid traffic with optimized routes.\n        </p>\n        <DestinationParser />\n      </div>\n\n      {displayComponents()}\n    </div>\n  );\n});\n\nexport default Directions;\n","import React, { useState, useEffect } from 'react';\n\nimport withInfosheetRoute from '../../phoenix/infosheet-route';\nimport { useMobileCheck } from 'event-hooks';\nimport { AdWrapper, Ad } from \"../ads/update-unit-class\";\n\nimport {setNotFoundMeta} from 'meta-utils';\n\nimport NotFound from '../not-found';\n\nimport {\n  infosheet,\n  infosheetSection,\n  infosheetSectionBleed,\n  infosheetSectionLast\n} from './styles.scss';\nimport {\n  searchbarAd,\n  mobileSearchbarAd,\n  sidebarAdPlaceholder,\n  mobileSidebarAdPlaceholder,\n} from \"../search/styles.scss\";\n\nconst mobileInfosheetUnitConfig = {\n  topName: \"mobsearchbarinfosheettop\",\n  bottomName: \"mobsearchbarinfosheetbottom\",\n  className: mobileSearchbarAd,\n  placeholderClass: mobileSidebarAdPlaceholder,\n};\nconst desktopInfosheetConfig = {\n  topName: \"searchbarinfosheettop\",\n  bottomName: \"searchbarinfosheet\",\n  className: searchbarAd,\n  placeholderClass: sidebarAdPlaceholder,\n};\n\nconst Infosheet = () => {\n  const isMobile = useMobileCheck();\n  const [infosheetUnit, setInfosheetUnit] = useState(\n    isMobile ? mobileInfosheetUnitConfig : desktopInfosheetConfig\n  );\n  useEffect(() => {\n    setNotFoundMeta();\n  }, []);\n  useEffect(() => {\n    // set ad units\n    setInfosheetUnit(isMobile ? mobileInfosheetUnitConfig : desktopInfosheetConfig);\n  }, [isMobile]);\n\n  return (\n    <div className={infosheet}>\n      <NotFound\n        className={infosheetSection}\n        heading=\"Place not found\"\n        msgLine1=\"Maybe there's a typo in your search?\"\n        showRetryButton={true}\n      />\n      <AdWrapper\n        showAdTitle\n        isMobile={isMobile}\n        className={`${infosheetSection} ${infosheetSectionBleed}`}\n      >\n        <Ad\n          name={infosheetUnit.topName}\n          className={infosheetUnit.className}\n          placeholderClass={infosheetUnit.placeholderClass}\n        />\n      </AdWrapper>\n      <AdWrapper\n        showAdTitle\n        isMobile={isMobile}\n        className={`${infosheetSection} ${infosheetSectionBleed} ${infosheetSectionLast}`}\n      >\n        <Ad\n          name={infosheetUnit.bottomName}\n          className={infosheetUnit.className}\n          placeholderClass={infosheetUnit.placeholderClass}\n        />\n      </AdWrapper>\n    </div>\n  );\n};\n\nexport default withInfosheetRoute(Infosheet);\n","import React, {useEffect, useRef} from 'react';\nimport {useSelector, useStore, useDispatch} from 'react-redux';\nimport {trackPageView} from 'gtm.service';\nimport {searchState, searchProps, mapProps, mapMovedAwayFromLastSearch} from '../model/selectors';\nimport {setSearchActive, setMapBounds, setMapCenter} from '../model/actions';\nimport search from '../model/search';\nimport SearchResults from './search/SearchResults';\nimport NotFound from '../components/not-found';\nimport Spinner from './spinner';\nimport { PAGE_STATUS } from '../../lib/constants.cjs';\nimport {useLocation} from 'route-utils';\nimport {isOneOfRouteTypes} from '../utilities';\nimport {map as mapConfig} from 'config';\n\nimport {useSelectorFactory} from 'morass';\nimport {useMobileCheck} from 'event-hooks';\nimport {sharedMap} from '../shared';\nimport {LngLat, LngLatBounds} from 'maplibregl';\n\nimport withSearchRoute from '../phoenix/search-route';\n\nimport './search/styles.scss';\n\nconst SearchAgainIfBoundsChange = () => {\n  const {confirmedBounds} = useSelector(mapProps),\n    {inprogress} = useSelector(searchState),\n    state = useStore().getState(),\n    dispatch = useDispatch(),\n    location = useLocation(),\n    isFirstRender = useRef(true);\n\n  // Only do the search again on first render if there is no existing map state in history.\n  useEffect(() => {\n    if (!isFirstRender.current || !window.history.state?.bounds) {\n      if (\n        !isOneOfRouteTypes(location.pathname, 'top') &&\n        confirmedBounds &&\n        !inprogress &&\n        mapMovedAwayFromLastSearch(state)\n      ) {\n        dispatch(search(false));\n      }\n    }\n    isFirstRender.current = false;\n  });\n\n  return null;\n};\n\nexport const getResultType = ({address}) => {\n  const length = Object.keys(address).length;\n\n  if ('address1' in address) return 'StreetAddress';\n  if ('postalCode' in address && !('address1' in address)) return 'PostalCode';\n  if (!('address' in address) && 'locality' in address) return 'City';\n  if ('country' in address && 'region' in address && length === 2) return 'State';\n  if ('country' in address && length === 1) return 'Country';\n  if (!('locality' in address)) return 'County';\n};\n\nconst Search = ({children}) => {\n  const dispatch = useDispatch(),\n    location = useLocation(),\n    {mapCenter} = useSelector(mapProps),\n    {query, area, category, results, status} = useSelector(searchProps),\n    {map = {}} = useSelectorFactory(sharedMap, {mapId: 'primary'}) || {},\n    isMobile = useMobileCheck();\n\n  useEffect(() => {\n    if (isOneOfRouteTypes(location.pathname, 'top')) {\n      trackPageView('top cats');\n    } else {\n      trackPageView('search');\n    }\n    if (window.history.state?.bounds) {\n      dispatch(setMapBounds(window.history.state.bounds));\n    }\n    if (!mapCenter && window.history.state?.center) {\n      dispatch(setMapCenter(window.history.state.center));\n    }\n  }, [location.pathname]);\n\n  useEffect(() => {\n    if ((query || area || category) && !results?.length) {\n      dispatch(search(true));\n    } else {\n      dispatch(setSearchActive(true));\n    }\n\n    // below acts like componentDidUnmount in a React class component\n    return () => {\n      dispatch(setSearchActive(false));\n    };\n  }, []);\n\n  useEffect(() => {\n    if (status == PAGE_STATUS.DATA && results.length > 0) {\n      const boundingBox = new LngLatBounds();\n      const boundSettings = {padding: isMobile ? mapConfig.padding.mobile : mapConfig.padding.desktop};\n\n      // set zoom by result type\n      if (results.length === 1) {\n        const {poiTypeZoom} = mapConfig.mapbox;\n        const resultType = getResultType(results[0]);\n        boundSettings.zoom = poiTypeZoom[resultType];\n      }\n\n      results.forEach(result => {\n        if (result.location && LngLat?.convert) {\n          const coordinates = LngLat.convert(result.location);\n          boundingBox.extend(coordinates);\n        }\n      });\n\n      map.fitBounds(boundingBox, boundSettings);\n    }\n  }, [status]);\n\n  return (\n    <>\n      {status == PAGE_STATUS.LOADING && (\n        <div className=\"result search-in-progress\">\n          <Spinner />\n        </div>\n      )}\n\n      {status == PAGE_STATUS.DATA && results.length > 0 && <SearchResults />}\n      {status == PAGE_STATUS.DATA && !results.length && (\n        <NotFound\n          heading=\"No results found\"\n          msgLine1=\"Maybe there's a typo in your search?\"\n          showRetryButton={true}\n        />\n      )}\n\n      <SearchAgainIfBoundsChange />\n      {children}\n    </>\n  );\n};\n\nexport default withSearchRoute(Search);\n","import React, {useEffect} from 'react';\nimport {useDispatch} from 'react-redux';\nimport {useGuardedDispatch} from 'morass';\n\nimport {useLocation} from 'route-utils';\nimport {isOneOfRouteTypes} from '../utilities';\n\nimport search from '../model/search';\nimport {setSearchPath, setSearchState} from '../model/actions';\nimport {validMapBounds} from '../model/selectors';\n\nexport default Component =>\n  ({page, updateRoute, updateQuery, ...props}) => {\n    const guardedDispatch = useGuardedDispatch(validMapBounds);\n\n    // Intentionally not using useSelector() to avoid updating this wrapper on store changes!\n    // const state = useStore().getState(),\n    //   {query: oldQuery} = searchProps(state);\n\n    const location = useLocation(),\n      dispatch = useDispatch();\n\n    // disabled page for now\n    if (!isNaN(page)) {\n      page = Number(page);\n      page = page > 0 ? page - 1 : 0;\n    }\n    // disable updateRoute and updateQuery for now\n    if (updateRoute) updateRoute = null;\n    if (updateQuery) updateQuery = null;\n\n    useEffect(() => {\n      dispatch(setSearchPath(location.pathname));\n      if (isOneOfRouteTypes(location.pathname, 'top')) {\n        dispatch(search(true));\n      } else {\n        guardedDispatch(search(true));\n      }\n\n      return () => dispatch(setSearchState({automatic: false}));\n    }, [location.pathname]);\n\n    return <Component {...props} />;\n  };\n"],"names":["TrafficFlowLayer","BuildInfo","bundled","mq","load","HamburgerNav","_ref","onClick","React","createElement","className","iconButton","type","iconBar","createSingleLineAddr","data","addr","address","singleLine","parts","address1","locality","region","push","join","postalCode","_isFromBizlocVendor","result","sources","i","length","source","_containsVendorType","vendor","some","isHomeAdvisor","url","customUrl","actionUrl","toLowerCase","indexOf","mqplace","constructor","_datum$value","datum","this","value","hasOwnProperty","name","country","slug","salt","singleLineAddr","displayString","context","eventsUrl","links","events","seatgeek","Array","isArray","attributions","map","content","replace","isPricelineHotel","isBizlocHotel","otaHotel","isHotel","categories","isHotelInBrandedCategory","isHomeAdvisorProp","isHotelWithGasStation","gasPrices","values","isBizloc","isRestaurant","isPOILike","isLatLng","split","reviewCount","latLng","lat","lng","secondLine","dataAsJsonStr","dataAsJson","JSON","parse","breadcrumbs","crumb","err","isA","_this$Lineage","includes","isOneOf","_len","arguments","types","_key","bind","routeSettingsKey","defaultToggleRouteSettingsValues","Object","entries","routeSettings","toggles","reduce","a","k","v","initialRouteSettings","defaultMemoize","persistedRouteSettingsValues","routeSettingsString","localStorage","getItem","key","_window$newrelic","_objectSpread","unit","routeType","Promise","resolve","then","slices","_ref3","directions","addTrigger","createSelector","select","routeSettingsValues","_ref2","_routeSettings$toggle","persist","_window$newrelic2","catch","error","_window$newrelic3","console","mapCenter","mapZoom","mapBounds","confirmedBounds","printView","watchPosResponded","zoom","bounds","provider","activeStyle","markerData","hovered","selected","ribbonData","sharePath","search","details","query","isInternalQuery","inputFocused","area","category","page","recents","predictions","arePredictionsLoading","dropdownVisible","isSearching","isDisambiguatedSearch","isTopCat","description","clickedOn","status","destinationList","wereDestinationsReordered","alternateRoutesData","routeDataResponse","currentRouteIndex","copyPasteText","redirectToInfosheet","directionsFailed","routing","routeOptimizationSettings","init","at","state","layers","slotConfig","bizLocs","bizlocs","activeBizLoc","routeSponsorships","searchActive","infoSheetActive","activePoiMarker","SEARCH_RESULTS_PER_PAGE","get","MAX_SEARCH_RESULTS_PAGES","TOP_CATS_RESULTS_PER_PAGE","infosheet","mqId","nameVisible","mobilePanel","headingValue","headingVisible","vendors","searchMetadata","ypBeacons","yextBeacons","isPrintOpen","showRoadWarriorUnit","makeQueryForTopCats","city","location","removeDashes","poiDefault","poiDot","mapConfig","sanitizePage","isNaN","mapProps","createStructuredSelector","center","style","precisePosition","previous","attributes","markerState","ribbonState","narrativeState","validMapBounds","west","rawSearchResults","results","searchState","rawSearchDetails","searchProps","topCatMetaInfo","inprogress","searchFailed","infosheetProps","MQPlace","isClosed","mobilePanelProps","expandedState","initProps","rawCategories","activeBizLocSelector","rawRouteSponsorships","searchActiveSelector","infoSheetActiveSelector","activePoiMarkerSelector","poiMarkers","createArraySelectorPreservingElements","activeInfosheet","index","markersFromResults","findIndex","res","active","large","getIcon","catWithIcon","icon","searchDetailsForCurrentPage","_ref4","detail","otherDetail","action","filter","Boolean","mergeVendorRecords","to","from","id","vendorData","allSearchDetailsAvailable","_ref7","mapMovedAwayFromLastSearch","resultsExist","_ref9","_ref10","north","east","south","mapWest","mapEast","midLat","midLng","mapNorth","mapSouth","Math","max","mapArea","min","directionsProps","origin","destination","directionsLoadingState","fuelCost","routeData","routeOptimizationProps","searchMetadataSelector","ypBeaconsSelector","yextBeaconsSelector","isPrintOpenSelector","showRoadWarriorUnitSelector","Ad","connect","adUnitConfiguration","props","useSelector","keys","_activeBizLoc$images$","_activeBizLoc$images$2","sizes","width","height","imageSize","concat","imageUrl","images","linkUrl","clickLarge","opacity","cursor","loading","src","window","open","focus","AdUnit","mobileAd","isMobile","useMobileCheck","AdWrapper","children","isVideoAd","showAdTitle","makeRouteRegExp","routeTypes","pattern","RegExp","isOneOfRouteTypes","route","undefined","test","isNonInfosheetRegExp","isInfosheetRoute","isRoutePlannerRegExp","isRoutePlanner","pages","home","routeplanner","print","top","getPage","simplePayload","arg","boundsPayload","bnds","getNorthEast","getSouthWest","Error","toString","pointPayload","destinationPayload","collection","limit","destCollection","searchahead","setCenter","setMobilePanelExpandedState","createActions","initCenter","creator","force","dispatch","setZoom","initZoom","setBounds","setConfirmedBounds","setMapCenter","setMapZoom","setMapCenterZoom","initCenterZoom","getState","setMapBounds","setStyle","markLocation","setSearchQuery","setSearchQueryEx","setSearchResults","setSearchDetails","setSearchState","setSearchBounds","setOrigin","setDestination","setDestinationList","setDestinationListItem","addDestination","removeDestination","setDirectionsLoadingState","setWereDestinationsReordered","setCopyPasteText","setDirections","setCategories","categoriesFailed","setInfosheetMqId","setInfosheetSlug","setInfosheetData","setInputFocused","infosheetFailed","setBizLocs","bizLocsFailed","setActiveBizLoc","addRecentSearch","removeRecentSearch","setRecentSearches","setPreviousMapProperties","fetchRecentSearches","setPredictionResults","_asyncToGenerator","filteredPredictions","filterPredictions","currentPredictions","_x","_x2","_x3","_predictionSearch","apply","_x4","_x5","setArePredictionsLoading","predictionResultsFailed","setPrintView","setPrecisePosition","setDropdownVisible","setSearchActive","setInfoSheetActive","setActivePoiMarker","_document$querySelect","_document$querySelect2","_document$querySelect3","_document$querySelect4","oldPoiIdx","document","querySelector","classList","remove","bounceCss","newPoiIdx","add","bounce","setRouteSettings","setRouteOptimizationSettings","setIsSearching","setIsDisambiguatedSearch","setIsTopCat","setSearchPath","setClickedOn","setRouteData","setAlternateRoutesData","setRouteDataResponse","setCurrentRoute","selectedRouteData","alternateRoutes","routes","setCurrentRouteIndex","setFuelCost","setRedirectToInfosheet","setMapSource","sourceType","setMarkerState","_ref5","setRibbonState","setMapAttributes","setSharePath","setNarrativeState","setRouteSponsorships","setSearchMetadata","setYpBeacons","setYextBeacons","setShowRoadWarriorUnit","setIsPrintOpen","setMobileHeadingValue","setMobileHeadingVisible","setTopCatMetaInfo","pathname","DEST_COLLECTION","COLLECTION","api","LIMIT","encodeURIComponent","searchUrl","response","fetch","ok","statusText","json","MQLocation","getDisplayName","street","adminArea5","adminArea3","adminArea1","part","createFromSearchAheadResult","place","geometry","coordinates","properties","adminArea4","county","stateCode","countryCode","createFromMQPlaceResult","_source$address","_source$address2","_source$address3","_source$address4","_source$address5","createFromDisambiguationResult","_source$location","_source$location2","_source$address6","_source$address7","_source$address8","_source$address9","_source$address10","createFromLocationsResult","_source$adminArea","_source$adminArea2","_source$adminArea3","_source$adminArea4","_source$postalCode","_source$street","_source$latLng","createFromReverseGeocodingResult","createFromImportResult","_result$adminArea","_result$adminArea2","_result$adminArea3","_result$adminArea4","_result$postalCode","_result$street","_result$latLng","getIdFromSearchAheadResult","_exec","_wrapRegExp","mqid","exec","groups","getIdFromLocationsResult","getIdFromDisambiguationResult","isAdminArea","Destination","recordType","_source$result","notes","note","createFromQuery","isDisplayValueFromQuery","getDisplayValue","getAdminAreaDisplayName","excludeUSCountryCode","order","RoadWarriorCTA","forwardRef","ref","placement","deepLink","useDispatch","trackRoadWarriorAction","trackAction","showFullOpacity","setShowFullOpacity","useState","role","target","href","hideRoadWarriorUnit","now","Date","getTime","closedRoadWarriorCTA","routePlanner","setItem","stringify","useEffect","currentTime","pageCloseAt","timeToShowAgain","Number","Popup","overlay","SearchIcons","connection","showClearButton","onClear","onSubmit","hasContent","onClearClick","e","stopPropagation","Spinner","spinner","viewBox","xmlns","fill","fillRule","transform","strokeWidth","strokeOpacity","cx","cy","r","d","attributeName","dur","repeatCount","ButtonWithSpinner","dataCy","spinnerActive","_objectWithoutProperties","_excluded","_extends","disabled","SearchInput","isSearch","shouldValidate","inputBox","useRef","doc","documentElement","pageYOffset","scrollTop","clientTop","setTimeout","time","onChange","debounce","onQueryChange","activeElement","mapEl","htmlFor","defaultValue","onBlur","onKeyDown","keyCode","preventDefault","navigate","handleOnKeyDown","setWindowScrollTop","onFocus","handleClick","setCurrentDestinationBox","autoComplete","spellCheck","searchIcons","sharedState","sharedExtra","addReducer","maps","mapSlice","mapId","searchProviderSlice","sharedMap","selectorFactory","_","searchProvider","searchProviders","registered","providers","apiProvider","setSharedMap","addSearchProvider","autoOrPage","automatic","pending","auto","performSearch","newrelic","noticeError","wasInProgress","searchComplete","searchWasComplete","history","replaceState","SearchAheadItem","addressProps","addressStr","editMode","isDestinationInput","onSearchSelected","showIcon","recent","parsedAddress","doSearch","normalizeQuery","tabIndex","searchAheadItem","assign","isInternal","clipRule","shapeRendering","centerFlexColumn","text","match","matchedIndex","words","substr","word","idx","dimNameUnmatchedText","DisambiguationBubble","inProgress","DisambiguationFooter","handleOnClick","RecentSearchesHeader","chooseLocationEnabled","isLocationError","onCurrentLocation","noBorder","SearchAheadCategoryItem","displayValue","hasBorder","extraStyles","iconStyle","color","SearchAheadCategories","categoryItems","handleCategoryClick","marginTop","categoryItem","mapbox","locationPrecision","SearchAhead","showRecentSearches","itemClassName","openOnClick","hideIfEmpty","setDropdownIsEmpty","keyActions","ArrowDown","ArrowUp","setActiveSearchItem","Enter","contains","click","Escape","_keyActions$key","call","activeSearchItem","querySelectorAll","setDropdownItems","setShowMoreButton","dropdownItems","numItems","noResults","fwdRef","isEditMode","onChooseLocation","handleSearchSelected","showMoreButton","onShowMoreClick","storedRecents","sharedStore","oldSearchProps","oldMapProps","abs","distance","fallbackZoom","locateZoom","fallbackCenter","geolocate","CAN_USE_GEOLOCATION","geoLocAvailable","_navigator$geolocatio","navigator","geolocation","watchPosition","watchPosStarted","watchPosError","initGeolocation","coords","longitude","pos","batch","code","oldWatchPosition","watchStarted","lastPosition","lastError","successCallback","errorCallback","nextId","posListeners","_lastPosition","errorListeners","hydrateMetadata","searchV1","buildUrl","_data$results","DestinationInput","shouldShowNote","geocoder","alphabet","outsideClick","destinationLength","setDisplayValue","isInvalid","_doReverseGeocode","destinationItem","reverseGeocodeListItem","isLocationSearching","isRoutePlannerInput","doReverseGeocode","doShowNote","showNote","_onSearchSelected","searchResult","trackingData","kvcat","_onChooseLocation","responseJSON","_x6","relatedTarget","destinationIsEmpty","handleOnBlur","Fragment","errorMessage","invalid","handleOnSubmit","placeholderText","validateInput","locationFailed","handleAddNoteIconClick","handleRemoveDestination","DestinationInputRoundTrip","firstDestination","markerLetter","roundTripButtonText","setRoundTripButtonText","generalize","maxStops","TopInstructions","isDropFile","mobileSearchInput","showVirtualKeyboard","searchInput","MobileSearchModal","currentDestinationBox","mainContainer","onInputClick","handleOnInputClick","onInputClear","handleOnInputClear","handleOnQueryChange","_setDropdownVisible","DirectionsList","_routeSettings$genera","_routeSettings$canReo","_routeData$route","routeSettingsButton","hideRoadWarriorCTA","destinationDropdownVisible","setDestinationDropdownVisible","roadWarriorCtaRef","isRoundTrip","canReorder","start","startAddress","readableAddress","finishAddress","finish","setMeta","pageTitle","pageDesc","locationSequence","areLocationsInOrder","newDest","sequence","dest","newDropdowns","_roadWarriorCtaRef$cu","previousLength","current","block","inline","behavior","setPreviousLength","counter","showHeaderInstructions","setDndContainer","dndHandle","element","DndMove","mover","previousOverItem","node","beforeNode","container","firstElementChild","nextElementSibling","newDestinationList","dataset","inputClass","locationMarkerClass","handleSwapDestination","val1","val2","handleOptimizeToggle","event","checked","label","handleAddDestination","addStopButton","validDestinations","sanitizedValue","val","trim","localQuery","CustomInput","extraClasses","readOnly","adaptSlugData","_result$GeoAddress","_result$GeoAddress2","_result$address","_result$GeoAddress3","_result$address2","_result$GeoAddress4","_result$address3","_result$GeoAddress5","_result$address4","_result$GeoAddress6","_result$address5","_result$GeoAddress7","_result$address6","_result$address7","_result$address8","_result$GeoAddress8","_result$routingLatLng","_result$GeoAddress9","_result$routingLatLng2","street2","setDestinationsConditionally","list","stops","newDirections","templatize","_newItem$location","_directionItem$locati","newItem","directionItem","filteredDirections","directionsTitle","V1Call","stop","DestinationParser","toIndex","fromFlag","_data$results2","orderedDestList","locations","loadDestinations","bodyObject","bodyJson","URL","method","headers","body","handleServerError","message","NarrativeHeader","leg","startData","endData","startName","endName","formattedTime","h","m","hour","parseInt","getFormattedTime","toFixed","TURN_TYPES","NarrativeManeuvers","maneuvers","hideHelpfulHints","maneuver","narrative","maneuverNotes","willShowNotes","isLastManeuver","displayDistance","alt","turnType","getEndLocationStr","manNote","NarrativeSection","_legs$index","legs","endDestination","NotFound","heading","msgLine1","msgLine2","showRetryButton","classes","DirectionsNarrative","_destinationList$0$st","_destinationList$stre","errorMsg","PAGE_STATUS","ERROR","info","narrativeStart","narrativeEnd","isRouteInUSA","getIsRouteLegInUSA","options","displayTime","isMultiStop","isPedestrian","getQueryFiltered","mergeClassNames","irsReimbursement","calculateAmount","MoreLess","lines","isExpanded","setIsExpanded","isClamped","setIsClamped","clampedHeight","setClampedHeight","lineHeight","setLineHeight","styleProp","divHeight","offsetHeight","calculatedlineHeight","currentStyle","getComputedStyle","defaultView","getPropertyValue","numberOfLines","dangerouslySetInnerHTML","__html","yelp","tripAdvisor","Ratings","round","rating","InfoSheetHotelCTA","checkAvailabilityUrl","evt","TRIP_ADVISOR","RatingYelp","count","RatingTripadvisor","LowRate","lowRate","GasPrice","prices","timestamp","price","hours","advertisedPrice","floor","weeks","days","ActionButton","_ref8","dateDiff","ms","SearchResult","_dataAsJson$reviews","_dataAsJson$reviews2","isFollowedByAd","reviews","bizLoc","isTripadvisor","displayAddress","itemProp","itemType","infoSheet","placeholderImg","numerals","averageRating","reviewBody","phone","phoneAttrVal","createPhoneTag","removeTags","NoAdUnit","desktopSearchBarUnitConfig","topName","bottomName","searchbarAd","placeholderClass","sidebarAdPlaceholder","mobileSearchBarUnitConfig","mobileSearchbarAd","mobileSidebarAdPlaceholder","SearchResults","MaybeAdUnit","totalResults","useLocation","pageCount","ceil","LocalResultsHeader","resultsInDataLayer","searchBarUnit","setSearchBarUnit","useScrollTopContainer","pageYpSearchRid","getPageRID","pageYpClickRid","showInfosheet","_result$salt","ypUrl","getClickBeacon","newBeacons","yextUrl","getYextClickBeacon","previousResults","setPreviousResults","_results$","searchTerms","convertToYpSearchTerms","getSearchBeacon","getYextSearchBeacon","sicCodes","getPageData","sicData","setPubAdsTargeting","taxonomy","topCatData","setTopCatData","formattedState","formattedCity","_0","_1","cat","toUpperCase","stateMap","newPath","convertStateUrl","searchParams","capitalizeDashedWord","handleDataLayer","inViewport","formattedVendorData","forEach","_document","scrollListener","contentContainer","addEventListener","passive","removeEventListener","bottomAdCounter","formatCategoryName","charAt","slice","itemScope","adCounter","PrintNotes","placeholder","SearchResults$1","secondary","rawResults","resultsWithDetails","setResults","IMAGE_SIZES","Image","fallbackSrc","proxyHost","quality","useFallbackSrc","setUseFallbackSrc","effectiveSrc","setEffectiveSrc","effectiveWidth","setEffectiveWidth","find","s","srcSet","decoding","onError","BestOfListItem","_URL","_img$caption","img","openingTime","formatOpeningTime","urlPath","caption","toLocaleString","getPriceRange","repeat","BestOfList","_data$edges","_data$edges2","edges","nearbyPlaces","topCatLink","normalizeSlug","divId","title","_node$rating","_node$rating2","_node$categories","_node$categories2","ratingProvider","placeRatingProviderLabel","getPlaceProps","rel","buttonText","GET_BEST_OF_LIST","mqcons","graphQL","collected","SearchContext","createContext","lastSearchUrl","lookupDetails","saveAdParameters","_lookupDetailsItem","splitSearchItem","_calculateSearchParameters","metaInfo","isFakeQuery","_gqlResponse$data","_topCategory$node","_topCategory$node2","_topCategory$locality","_state","gqlResponse","variables","resultBounds","topCategory","bizloc","saveDetails","_details$Context2","emptyObject","_details$Context","ypBidToken","all","adParameters","collectAdParameters","obj","_document2","_x7","calculateSearchParameters","newResults","item","SearchBox","containerClass","mqSearchBox","isDirections","useOutsideClick","searchContext","useContext","setLocalQuery","trackSearchPerformedHome","setTrackSearchPerformedHome","visible","setDropdownVisibleAction","arrowsUsed","setArrowsUsed","tabUsed","setTabUsed","keyDownHandler","summarizeKvcat","kvdcity","summarizeKvcity","_e$currentTarget","submittedQuery","currentTarget","trimmedQuery","Icon","glyph","size","viewBoxSize","pathAttributes","svgAttrs","_pathAttributes$index","_pathAttributes$index2","_pathAttributes$index3","_pathAttributes$index4","dataTestid","DEFAULT_CATEGORIES","LayerTiles","onTileClick","useCallback","setExecuteTrackAction","onKeyUp","searchActiveVal","executeTrackAction","acc","Set","YPBeacons","b","YextBeacons","Attribution","year","getFullYear","oneTrust","setAttributionToggle","attributionToggle","_window$newrelic$noti","OneTrust","ToggleInfoDisplay","addToBounds","PAD_BOUNDS_AFTER_SEARCH","usePayloadValue","payload","resetTo","getAppState","poiTypeZoom","getPathType","splitSearchPath","splitTopPath","setMapBoundsFromSearchResults","newBounds","coeff","scale","mid","root","inSlice","on","newPage","usePayloadValueEx","poi","newSource","path","_result","DATA","LOADING","oldState","newState","_ref6","_destinationList$inde","optimizedStop","errors","DEFAULT_ERR_MSG","loadDirections","createThunk","_updatedSettings$canR","_errors$route","parsedDirections","_routeSettings","isTwoStops","maxRoutes","messages","statuscode","buildRouteOptions","avoidsTollRoads","avoids","avoidsCountryBorders","avoidsFerries","avoidsHighways","avoidsSeasonalRoads","avoid","flag","routeOptions","defaults","avoidTimedRestrictions","enhancedNarrative","avoidOptions","_avoids","_previousSettings$can","_settings$canReorder","settings","previousSettings","parsed","hash","InfosheetGas","sort","infosheetSection","gasPrice","product","InfosheetDescription","startsWithHeader","infosheetSectionDescription","AboutBlock","_data$values","_data$delivery","_data$curbsidePickup","aboutBlock","cardName","transformCategory","_category$url","categoryHref","relatedCategoriesImageUrl","aboutBlockWithIconOrButton","onClaimClick","aboutBlockCompact","InfosheetAbout","_data$Lineage","placeDetails","checkInTime","checkOutTime","delivery","curbsidePickup","hotelQualityRating","roomCount","servesCuisine","placeData","_placeData$place","relatedPlaces","MapboxClickEvent","MapboxEventListeners","locationControl","MenuItem","pointerEvents","traffic","TrafficControl","useSelectorFactory","nearestZoom","setLayer","slowdowns","incidents","enable","layer","getIncidents","incidentsResponse","_data","incidentsParams","filters","setTrafficIncidents","getFlow","flowResponse","mapScale","flowParams","mapContainer","offsetWidth","mapLat","mapLng","imageType","flowImgPath","toggleLayer","useEventListener","userMapMovements","movement","clearFlowLayer","store","shouldUpdateMarkers","replaceTraffic","trafficIncidents","removeTraffic","shouldUpdateFlow","flow","clickOut","onMenuClick","menuItem","getElementsByClassName","jsonResponse","PoiContextMenu","point","x","y","close","left","makeMarker","clearMarker","oldPoi","markers","setState","contextMenu","setContextMenu","factory","BasicMap","skipGeo","theme","hasLocation","pageType","language","withMapQuery","Component","useStore","encodeURI","roundUp","serializePosition","c","z","decodeURI","parsePosition","trailingZeroes","twoPartNumber","number","precision","n","hasTrailingZeroes","Routes","_routeData$route3","_routeData$route4","_routeData$route$opti","getDirectionsButton","setHours","mins","setMins","splice","buttonWidth","_routeData$route2","getDistanceInMiles","mobileDirectionsUnitConfig","desktopDirectionsUnitConfig","Directions","_destinationList$filt","_destinationList$filt2","narrativeSelector","_useSelector","_excluded2","finalDestination","directionsText","getDirectionsText","showRouteSettings","setShowRouteSettings","getDirectionsButtonProps","directionsUnit","setDirectionsUnit","activeStatus","end","handleGetDirections","narrativePath","addStopButtonEl","directionsIconButton","addStopButtonContainer","_destinationList$0$lo","_destinationList$1$lo","matches","newUrl","replaceUrl","marker","hidden","setLayoutProperty","l1","removeWaypoints","removeAllRibbons","removeQueryParams","_destinationList$","trackPageView","pageViewData","areaData","_destinationList$2","_areaData","_pageViewData","_areaData$Adparamete","_areaData2","_areaData3","_areaData4","_areaData5","_areaData6","_areaData$Adparamete2","_areaData7","_areaData8","_areaData$Adparamete3","_areaData$Adparamete4","kvcountry","kvregion","kvdco","kvdst","formattedPageViewData","isNarrative","startsWith","visibleRouteSponsorShip","setVisibleRouteSponsorShip","sumOfProbabilities","previousValue","currentValue","show_probability","randomNumber","random","visibleIndex","sponsorShip","setIsPedestrian","setQueryParams","GetDirectionsButton","scrollIntoView","directionsComponents","_routeDataResponse$ro","_routeDataResponse$ro2","showReorderRecommendation","directionsFormLinkLarge","directionsFormImage","directionsSectionBleed","RouteSettingsMenu","isActive","mobileInfosheetUnitConfig","desktopInfosheetConfig","withInfosheetRoute","infosheetUnit","setInfosheetUnit","setNotFoundMeta","infosheetSectionBleed","_slug$match","oldSlug","SearchAgainIfBoundsChange","isFirstRender","_window$history$state","Search$1","guardedDispatch","useGuardedDispatch","withSearchRoute","_window$history$state2","_window$history$state3","boundingBox","LngLatBounds","boundSettings","padding","desktop","LngLat","convert"],"mappings":"2xBAGA,IAAAA,wLAaEC,IACFC,EAAA,kKAAA,IAEQC,SAAEA,GAAAC,KAAA,+r5DCPV,IAAAC,GAAeC,IAAe,IAAdC,QAACA,GAAQD,EACrB,OACEE,EAAAC,cAAA,MAAA,CAAKC,2BACHF,EAAAC,cAAA,SAAA,CACEF,QAASA,EACTG,UAAWC,uBACXC,KAAK,SACL,aAAW,aAEXJ,EAAAC,cAAA,OAAA,CAAMC,sBACNF,EAAAC,cAAA,OAAA,CAAMC,UAAWG,KACjBL,EAAAC,cAAA,OAAA,CAAMC,UAAWG,KACjBL,EAAAC,cAAA,OAAA,CAAMC,UAAWG,MAEnBL,EAAAC,cAAA,MAAA,CAAKC,qBAGZ,ECwED,IAAMI,GAAuBC,IAC3B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