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K,uPCG9D,MAAMH,EAAapC,IAAsB,IAArB,aAAEyC,GAAczC,EACzC,MAAM,UAAE0C,EAAS,YAAEC,GAAgBC,EAAAA,GAC7B,aAAEC,IAAiBC,EAAAA,EAAAA,IAAWL,EAAavC,MAAME,YAEvD,OACE2C,EAAAA,cAACC,EAAAA,EAAI,CAACC,WAAY,CAACP,EAAWC,GAAcO,IAAI,QAC9CH,EAAAA,cAACI,EAAAA,EAAoB,CAACC,MAAO3B,EAAAA,GAAUC,UACvCqB,EAAAA,cAACM,EAAAA,EAAG,CAACH,IAAI,MAAMI,UAAWT,EAAeE,EAAAA,cAACQ,EAAAA,EAAkB,MAAMR,EAAAA,cAACS,EAAAA,EAAc,QACjFT,EAAAA,cAACU,EAAAA,EAAM,CAACP,IAAI,SAASQ,aAAW,GAC9BX,EAAAA,cAACY,EAAAA,EAAiB,CAACT,IAAI,oBAAoBQ,aAAW,KAExDX,EAAAA,cAACa,EAAAA,EAAY,CAACV,IAAI,eAAeW,eAAgBd,EAAAA,cAACe,EAAAA,EAAqB,OACrEf,EAAAA,cAACgB,EAAAA,EAA0B,OAE7BhB,EAAAA,cAACiB,EAAAA,EAAqB,MACtBjB,EAAAA,cAACkB,EAAAA,EAAI,CAACf,IAAI,OAAOgB,kBAAgB,GAC/BnB,EAAAA,cAACoB,EAAAA,EAAoB,CAACf,MAAO3B,EAAAA,GAAUC,WAEpC,C","sources":["webpack://web-pwa/./src/routes/zones/bicycleDepartment.route.js","webpack://web-pwa/./src/store/seo/seo-faq.actions.js","webpack://web-pwa/./src/domain/seo/zones/bicycle-zone.page.jsx"],"sourcesContent":["import { mapUpdated, setMapMode } from '../../store/map/mapSlice'\nimport PageNotFoundError from '../../domain/error/PageNotFoundError'\nimport PermanentRedirectError from '../../domain/error/PermanentRedirectError'\nimport { bboxArrayToBboxArrays } from '../../domain/map/conversion'\nimport { generateFullRoute } from '../../domain/router/routeUtils'\nimport { renderPage } from '../../domain/seo/zones/bicycle-zone.page'\nimport { searchArea } from '../../store/address/address.actions'\nimport { selectFirstAddress } from '../../store/address/address.selectors'\nimport { MAP_MODES } from '../../store/map/map.constants'\nimport { selectIsFrenchSite } from '../../store/navigation/navigation.selectors'\nimport { setSearchTerms } from '../../store/search/searchSlice'\nimport { geocodeForwardCtx } from '../../store/search/search.service.constants'\nimport { loadSeoLayerFaq } from '../../store/seo/seo-faq.actions'\nimport {\n redirectLayerDepartmentRouteIfTownUpperCased,\n searchLayerZoneDescription\n} from '../../store/seo/seo-zone.actions'\nimport { slugify } from '../../utils/string'\nimport { ROUTE_BICYCLE_DEPARTMENT } from '../index'\nimport { technicalErrorCatcher } from '../routeErrors.utils'\nimport { handleRouteLoading } from '../routeService'\n\nexport const onRouteEnter = ({ params, store: { dispatch, getState } }) => {\n if (!selectIsFrenchSite(getState())) throw new PageNotFoundError('bicycle department accessed from foreign site')\n\n const { departmentCode, department } = params\n const location = `${departmentCode}-${department}`\n\n if (__SERVER__) {\n redirectLayerDepartmentRouteIfTownUpperCased(departmentCode, department, ROUTE_BICYCLE_DEPARTMENT)\n }\n\n return searchArea(location, geocodeForwardCtx.filter.county)(dispatch, getState)\n .then(() => {\n const firstAddress = selectFirstAddress(getState())\n\n if (firstAddress.departmentCode !== departmentCode || slugify(firstAddress.departmentLabel) !== department)\n throw new PermanentRedirectError(\n generateFullRoute(ROUTE_BICYCLE_DEPARTMENT, {\n departmentCode: firstAddress.departmentCode,\n department: slugify(firstAddress.departmentLabel)\n })\n )\n\n return Promise.all([\n dispatch(setMapMode(MAP_MODES.bicycle)),\n dispatch(setSearchTerms(location)),\n searchLayerZoneDescription(MAP_MODES.bicycle)(dispatch, getState),\n loadSeoLayerFaq('bicycle-department')(dispatch, getState),\n dispatch(mapUpdated({ bbox: bboxArrayToBboxArrays(firstAddress.bbox) }))\n ])\n })\n .catch(technicalErrorCatcher)\n}\n\nexport default handleRouteLoading({ onRouteEnter, renderPage })\n","import {\n fetchCityActivityFaq,\n fetchItineraryHPFaq,\n fetchItineraryLandingPageFaq,\n fetchLayerFaq\n} from '../../dataSource/seo/seo.request'\nimport { setSeoFaqData } from './seoSlice'\n\nexport const loadSeoItineraryHPFaq = mode => dispatch =>\n fetchItineraryHPFaq({ mode }).then(response => dispatch(setSeoFaqData(response)))\n\nexport const loadSeoCityActivityFaq = rubricId => dispatch =>\n fetchCityActivityFaq({ rubricId }).then(response => dispatch(setSeoFaqData(response)))\n\nexport const loadSeoLayerFaq = pageKey => dispatch =>\n fetchLayerFaq({ pageKey }).then(response => dispatch(setSeoFaqData(response)))\n\nexport const loadSeoItineraryLandingPageFaq = mode => dispatch =>\n fetchItineraryLandingPageFaq({ mode }).then(response => dispatch(setSeoFaqData(response)))\n","import React from 'react'\nimport AddressSearchDialogContent from '../../../routes/address/AddressSearchDialogContent'\nimport { PAGE_CLASSES } from '../../../routes/pageClasses.constants'\nimport { selectZone } from '../../../store/address/address.selectors'\nimport { MAP_MODES } from '../../../store/map/map.constants'\nimport AddressHeaderForm from '../../address/AddressHeaderForm'\nimport Page from '../../genericComponents/Page'\nimport Header from '../../header/Header'\nimport Main from '../../main/Main'\nimport Map from '../../map/Map'\nimport PushNotificationPopup from '../../PushNotification/PushNotificationPopup'\nimport SearchDialog from '../../search/SearchDialog'\nimport AddressSuggestContent from '../../suggest/AddressSuggestContent'\nimport DepartmentMapImage from './DepartmentMapImage'\nimport LayerZoneMainContent from './LayerZoneMainContent'\nimport LayerZoneMetaManager from './LayerZoneMetaManager'\nimport RegionMapImage from './RegionMapImage'\n\nexport const renderPage = ({ routeContext }) => {\n const { LayerPage, withToaster } = PAGE_CLASSES\n const { isDepartment } = selectZone(routeContext.store.getState())\n\n return (\n \n \n : } />\n
\n \n
\n }>\n \n \n \n
\n \n
\n
\n )\n}\n"],"names":["onRouteEnter","_ref","params","store","dispatch","getState","selectIsFrenchSite","PageNotFoundError","departmentCode","department","location","searchArea","geocodeForwardCtx","filter","county","then","firstAddress","selectFirstAddress","slugify","departmentLabel","PermanentRedirectError","generateFullRoute","ROUTE_BICYCLE_DEPARTMENT","Promise","all","setMapMode","MAP_MODES","bicycle","setSearchTerms","searchLayerZoneDescription","loadSeoLayerFaq","mapUpdated","bbox","bboxArrayToBboxArrays","catch","technicalErrorCatcher","handleRouteLoading","renderPage","pageKey","fetchLayerFaq","response","setSeoFaqData","routeContext","LayerPage","withToaster","PAGE_CLASSES","isDepartment","selectZone","React","Page","cssClasses","key","LayerZoneMetaManager","layer","Map","staticMap","DepartmentMapImage","RegionMapImage","Header","transparent","AddressHeaderForm","SearchDialog","suggestContent","AddressSuggestContent","AddressSearchDialogContent","PushNotificationPopup","Main","withoutSubHeader","LayerZoneMainContent"],"sourceRoot":""}