{"version":3,"sources":["locales/index.js","locales/en/resources.js","locales/fr/resources.js","i18n.js","components/Common/Message.jsx","utils/index.js","fitTrackeeApi/index.js","actions/index.js","actions/application.js","components/Admin/AdminApplication.jsx","components/Admin/AdminStats.jsx","components/Admin/AdminDashboard.jsx","components/Admin/AdminSports.jsx","components/Common/Pagination.jsx","components/Admin/AdminUsers.jsx","components/Others/NotFound.jsx","components/Admin/index.jsx","utils/workouts.js","fitTrackeeApi/auth.js","actions/user.js","actions/workouts.js","components/Workout/WorkoutForms/FormWithGpx.jsx","components/Workout/WorkoutForms/FormWithoutGpx.jsx","components/Workout/WorkoutAddOrEdit.jsx","components/Workout/WorkoutAdd.jsx","components/Common/CustomModal.jsx","components/Workout/WorkoutDisplay/WorkoutCardHeader.jsx","components/Workout/WorkoutDisplay/WorkoutCharts.jsx","components/Workout/WorkoutDisplay/WorkoutWeather.jsx","components/Workout/WorkoutDisplay/WorkoutDetails.jsx","components/Workout/WorkoutDisplay/Map.jsx","components/Workout/WorkoutDisplay/WorkoutMap.jsx","components/Workout/WorkoutDisplay/WorkoutNoMap.jsx","components/Workout/WorkoutDisplay/WorkoutNotes.jsx","components/Workout/WorkoutDisplay/WorkoutSegments.jsx","components/Workout/WorkoutDisplay/index.jsx","components/Workout/WorkoutEdit.jsx","components/Workout/index.jsx","components/Common/NoWorkouts.jsx","components/Workouts/WorkoutsFilter.jsx","components/Common/StaticMap.jsx","components/Workouts/WorkoutsList.jsx","components/Workouts/index.jsx","components/User/ProfileDetail.jsx","components/User/CurrentUserProfile.jsx","components/Dashboard/CalendarWorkout.jsx","components/Dashboard/CalendarWorkouts.jsx","components/Dashboard/Calendar.jsx","components/Dashboard/Records.jsx","actions/stats.js","utils/stats.js","components/Common/Stats/CustomTooltip.jsx","components/Common/Stats/CustomLabel.jsx","components/Common/Stats/StatsChart.jsx","components/Common/Stats/index.jsx","components/Dashboard/Statistics.jsx","components/Dashboard/UserStatistics.jsx","components/Dashboard/WorkoutCard.jsx","components/Dashboard/index.jsx","components/Footer/index.jsx","images/flags/en.svg","components/User/Logout.jsx","images/flags/fr.svg","images/password.svg","components/NavBar/LanguageDropdown.jsx","components/NavBar/index.jsx","images/mail-send.svg","components/User/PasswordReset.jsx","components/User/ProfileEdit.jsx","components/Statistics/index.jsx","components/User/Form.jsx","components/User/UserForm.jsx","components/User/UserProfile.jsx","components/App.jsx","components/Root.jsx","registerServiceWorker.js","reducers/initial.js","utils/history.js","reducers/index.js","index.js"],"names":["resources","en","workouts","administration","common","dashboard","messages","sports","statistics","user","fr","i18n","use","XHR","LanguageDetector","init","debug","process","lng","fallbackLng","keySeparator","interpolation","escapeValue","ns","defaultNS","Message","this","props","message","t","singleMessage","split","length","className","value","map","msg","id","React","PureComponent","suffixes","getFileSize","fileSize","asText","i","Math","floor","log","size","suffix","pow","toFixed","apiUrl","userFilters","key","label","sortOrders","isLoggedIn","window","localStorage","authToken","generateIds","arr","val","obj","createApiRequest","params","headers","noAuthorization","Authorization","getItem","type","requestParams","method","body","JSON","stringify","request","Request","url","fetch","then","response","status","json","catch","error","console","Error","getDateWithTZ","date","tz","dt","DateTime","fromISO","format","Date","setZone","parse","toFormat","sortValues","a","b","valueALabel","toLowerCase","valueBLabel","translateValues","values","sort","formatUrl","pathname","query","username","Object","keys","filter","index","FitTrackeeApi","target","data","setData","setPaginatedData","pagination","setError","setLoading","loading","updateSportsData","updateUsersData","getOrUpdateData","action","canDispatch","dispatch","isNaN","ret","users","updateLanguage","language","i18next","changeLanguage","setLanguage","setAppConfig","getAppData","FitTrackeeGenericApi","getData","AdminApplication","context","state","formData","initForm","prevProps","appConfig","k","includes","setState","e","name","isInEdition","loadAppConfig","onHandleConfigFormSubmit","onSubmit","preventDefault","htmlFor","aria-hidden","title","min","max_users","onChange","handleFormChange","step","max_single_file_size","max_zip_file_size","gpx_limit_import","onClick","history","push","Component","connect","assign","updateData","Array","isArray","updateAppConfig","AdminStats","loadAppStats","appStats","uploadDirSize","uploads_dir_size","withTranslation","application","AdminDashboard","to","is_registration_enabled","AdminSports","loadSports","updateSport","sport","src","img","alt","is_active","data-toggle","has_workouts","sportId","isActive","Pagination","newQuery","page","pages","aria-label","has_prev","getUrl","aria-disabled","from","_","has_next","AdminUsers","per_page","order_by","order","loadUsers","initState","location","authUser","updateUser","translatedFilters","translatedSortOrders","updatePage","picture","now","email","created_at","nb_workouts","admin","disabled","router","userName","isAdmin","NotFound","useTranslation","Helmet","config","exact","path","render","component","workoutColors","recordsLabels","record_type","formatWorkoutDate","dateTime","dateFormat","timeFormat","workout_date","workout_time","formatWorkoutDuration","seconds","newDate","subHours","setSeconds","getTime","formatChartData","chartData","time","duration","sortSports","sportALabel","sportBLabel","translateSports","onlyActive","PictureError","ProfileUpdateError","loadProfile","getProfile","isAuthenticated","profil","handleUserFormSubmit","formType","errMsg","password","password_conf","RegisterFormControl","loginOrRegisterOrPasswordReset","setItem","auth_token","deleteUser","deleteData","r","setGpx","gpxContent","setChartData","editWorkout","form","getMoreWorkouts","onAddWorkout","FormData","append","gpxFile","files","notes","addDataWithFile","addWorkout","onEditWorkout","workout","sport_id","translatedSports","zipTooltip","fileSizeLimit","encType","event","defaultValue","required","Trans","i18nKey","data-placement","accept","maxLength","onAddOrEdit","d","distance","addData","workoutDate","workoutTime","workoutDateTime","timezone","pattern","placeholder","WorkoutAddEdit","withGpx","changeEvent","with_gpx","checked","handleRadioChange","WorkoutAddOrEdit","CustomModal","close","text","confirm","WorkoutCardHeader","dataType","displayModal","segmentId","previousUrl","previous_workout","nextUrl","segments","next_workout","WorkoutCharts","displayDistance","dataToHide","loadWorkoutData","loadSegmentData","find","splice","indexOf","xDataKey","xScale","updateCoordinates","xInterval","parseInt","displayData","handleLegendChange","height","margin","top","right","left","bottom","onMouseMove","activePayload","onMouseLeave","allowDecimals","dataKey","offset","position","scale","interval","tickFormatter","angle","yAxisId","orientation","fill","stroke","dot","unit","strokeWidth","labelFormatter","workoutId","chart_data","getWorkoutChartData","getSegmentChartData","WorkoutWeather","weather_start","weather_end","icon","summary","Number","temperature","humidity","wind","WorkoutDetails","withPauses","pauses","moving","records","record","ave_speed","max_speed","min_alt","max_alt","ascent","descent","Map","bounds","coordinates","jsonData","mapAttribution","useMap","fitBounds","TileLayer","attribution","GeoJSON","hash","latitude","Marker","longitude","WorkoutMap","zoom","loadWorkoutGpx","loadSegmentGpx","gpx","DOMParser","parseFromString","togeojson","getGeoJson","MapContainer","boundsOptions","padding","map_attribution","getWorkoutGpx","getSegmentGpx","WorkoutNoMap","WorkoutNotes","WorkoutSegments","segment","workout_id","WorkoutDisplay","loadWorkout","match","prevState","payload","onDeleteWorkout","s","Promise","resolve","WorkoutEdit","WorkoutAdd","NoWorkouts","WorkoutsFilter","loadWorkouts","updateParams","StaticMap","display","href","rel","WorkoutsList","scope","idx","Workouts","loadMoreWorkouts","paginationEnd","setParams","onDeletePicture","deletePicture","onUploadPicture","reset","uploadPicture","editable","isDeletable","createdAt","birthDate","birth_date","first_name","last_name","bio","weekm","go","CalendarWorkout","isDisabled","isMore","sportImg","rec","CalendarWorkouts","isHidden","dayWorkouts","act","handleDisplayMore","getStartAndEndMonth","weekStartOnMonday","monthStart","startOfMonth","monthEnd","endOfMonth","weekStartsOn","start","startOfWeek","end","endOfWeek","Calendar","calendarDate","currentMonth","startDate","endDate","loadMonthWorkouts","localeOptions","handlePrevMonth","handleNextMonth","days","addDays","day","isSameDay","reverse","rows","formattedDate","filterWorkouts","isSameMonth","isWeekEnd","isToday","addMonths","updateStateDate","subMonths","locale","enGB","renderHeader","renderDays","renderCells","calendarWorkouts","RecordsCard","recordsBySport","reduce","sportList","recordType","formatRecord","sportLabel","colSpan","xAxisFormats","xAxis","formatDuration","totalSeconds","formatWithDay","String","hours","padStart","minutes","formatValue","displayedData","dateIncrement","addYears","formatStats","stats","displayedSports","nbWorkoutsStats","distanceStats","durationStats","x","xAxisFormat","dataNbWorkouts","dataDistance","dataDuration","total_distance","total_duration","startOfYear","CustomTooltip","active","total","p","style","color","CustomLabel","y","width","formattedValue","fontSize","textAnchor","dominantBaseline","StatsCharts","content","isAnimationActive","stackId","Statistics","statsParams","displayEmpty","getStats","Stats","UserStatistics","nb_sports","WorkoutCard","DashBoard","Footer","_path","_path2","_path3","_path4","_path5","_path6","_path7","_path8","_g","_path9","_path10","_path11","_path12","Logout","UserLogout","_extends","arguments","source","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgEn","_ref","svgRef","titleId","enableBackground","viewBox","xmlns","ref","ForwardRef","SvgFr","_g2","_g3","_g4","_g5","_g6","_g7","languages","selected","flag","Dropdown","isOpen","onUpdateLanguage","toggleDropdown","lang","NavBar","data-target","aria-controls","aria-expanded","LanguageDropdown","SvgPassword","xmlnsXlink","xmlSpace","SvgMailSend","PasswordReset","ProfileEdit","onDeleteUser","onHandleProfileFormSubmit","readOnly","postData","handleProfileFormSubmit","durations","updateDisplayedSports","subYears","endOfYear","concat","forward","newStart","newEnd","subWeeks","addWeeks","sports_list","handleOnClickArrows","handleOnChangeDuration","handleOnChangeSports","Form","pageTitle","charAt","toUpperCase","slice","isRegistrationAllowed","userForm","onHandleFormChange","UserForm","emptyForm","onHandleUserFormSubmit","token","UserProfile","loadUser","currentUser","App","Dashboard","CurrentUserProfile","Workout","Admin","Root","store","children","isLocalhost","Boolean","hostname","registerValidSW","swUrl","navigator","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","controller","originalHistory","emptyData","handleDataAndError","initial","removeItem","routesWithoutAuthentication","updatePath","toPath","newPath","pathInterceptor","createBrowserHistory","args","replace","listen","scrollTo","rootNode","document","getElementById","createStore","combineReducers","connectRouter","__STATE__","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","applyMiddleware","routerMiddleware","thunk","ReactDOM","I18nextProvider","URL","origin","addEventListener","get","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"iqnBAGaA,EAAY,CACvB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8iB,QAAO,WACbjqB,OAAOkqB,SAAS,EAAG,MAGd,ID4KQ/iB,GC5KFgjB,GAAWC,SAASC,eAAe,QAEnCjC,GAAQkC,aD0KNnjB,GCzKKA,GD0KlBojB,YAAgB,CACd/tB,YACA0L,eACA2V,oBACAlR,aACAwK,OACArS,YACAX,WACAjG,WACAtB,YACA6Y,WACAzK,OAAQwf,aAAcrjB,IACtBtK,UACAC,cACAC,QACA6H,YCxLF5E,OAAOyqB,WACNzqB,OAAO0qB,sCAAwCC,KAC9CC,YAAgBC,YAAiB1jB,IAAU2jB,OAIT,OAAlC9qB,OAAOC,aAAaC,WACtBkoB,GAAM3jB,SAAS4I,MAGjB0d,IAAStf,OACP,cAAC0c,GAAD,CAAMC,MAAOA,GAAOjhB,QAASA,GAA7B,SACE,cAAC6jB,EAAA,EAAD,CAAiB/tB,KAAMA,EAAvB,SACE,cAAC,GAAD,QAGJktB,IJvBa,WACb,GAA6C,kBAAmBxB,UAAW,CAGzE,GADkB,IAAIsC,IAAI1tB,GAAwByC,OAAOmK,UAC3C+gB,SAAWlrB,OAAOmK,SAAS+gB,OAKvC,OAGFlrB,OAAOmrB,iBAAiB,QAAQ,WAC9B,IAAMzC,EAAK,UAAMnrB,GAAN,sBAEP+qB,GA2CV,SAAiCI,GAE/BpnB,MAAMonB,GACHnnB,MAAK,SAAAC,GAGkB,MAApBA,EAASC,SACuD,IAAhED,EAASf,QAAQ2qB,IAAI,gBAAgB7Y,QAAQ,cAG7CoW,UAAUC,cAAcyC,MAAM9pB,MAAK,SAAAunB,GACjCA,EAAawC,aAAa/pB,MAAK,WAC7BvB,OAAOmK,SAASohB,eAKpB9C,GAAgBC,MAGnB/mB,OAAM,WAELE,QAAQxC,IACN,oEA/DAmsB,CAAwB9C,GAGxBD,GAAgBC,OIIxB+C,K","file":"static/js/main.e5a4bcc7.chunk.js","sourcesContent":["import { enResources } from './en/resources'\nimport { frResources } from './fr/resources'\n\nexport const resources = {\n en: enResources,\n fr: frResources,\n}\n","import EnWorkoutsTranslations from './workouts.json'\nimport EnAdministrationTranslations from './administration.json'\nimport EnCommonTranslations from './common.json'\nimport EnDashboardTranslations from './dashboard.json'\nimport EnMessagesTranslations from './messages.json'\nimport EnSportsTranslations from './sports.json'\nimport EnStatisticsTranslations from './statistics.json'\nimport EnUserTranslations from './user.json'\n\nexport const enResources = {\n workouts: EnWorkoutsTranslations,\n administration: EnAdministrationTranslations,\n common: EnCommonTranslations,\n dashboard: EnDashboardTranslations,\n messages: EnMessagesTranslations,\n sports: EnSportsTranslations,\n statistics: EnStatisticsTranslations,\n user: EnUserTranslations,\n}\n","import FrWorkoutsTranslations from './workouts.json'\nimport FrAdministrationTranslations from './administration.json'\nimport FrCommonTranslations from './common.json'\nimport FrDashboardTranslations from './dashboard.json'\nimport FrMessagesTranslations from './messages.json'\nimport FrSportsTranslations from './sports.json'\nimport FrStatisticsTranslations from './statistics.json'\nimport FrUserTranslations from './user.json'\n\nexport const frResources = {\n workouts: FrWorkoutsTranslations,\n administration: FrAdministrationTranslations,\n common: FrCommonTranslations,\n dashboard: FrDashboardTranslations,\n messages: FrMessagesTranslations,\n sports: FrSportsTranslations,\n statistics: FrStatisticsTranslations,\n user: FrUserTranslations,\n}\n","import i18n from 'i18next'\nimport LanguageDetector from 'i18next-browser-languagedetector'\nimport XHR from 'i18next-xhr-backend'\n\nimport { resources } from './locales'\n\ni18n\n .use(XHR)\n .use(LanguageDetector)\n .init({\n debug: process.env.NODE_ENV === 'development',\n lng: 'en',\n fallbackLng: 'en',\n keySeparator: false,\n interpolation: {\n escapeValue: false,\n },\n resources,\n ns: ['common'],\n defaultNS: 'common',\n })\n\nexport default i18n\n","import React from 'react'\n\nexport default class Message extends React.PureComponent {\n render() {\n const { message, messages, t } = this.props\n const singleMessage =\n message === '' || !message\n ? ''\n : message.split('|').length > 1\n ? `${t(`messages:${message.split('|')[0]}`)}: ${t(\n `messages:${message.split('|')[1]}`\n )}`\n : t(`messages:${message}`)\n return (\n
\n {singleMessage !== '' && {singleMessage}}\n {messages &&\n messages.length > 0 &&\n (messages.length === 1 ? (\n {messages[0].value}\n ) : (\n \n \n \n ))}\n
\n )\n }\n}\n","import { format, parse } from 'date-fns'\nimport { DateTime } from 'luxon'\n\nconst suffixes = ['bytes', 'KB', 'MB', 'GB', 'TB']\nexport const getFileSize = (fileSize, asText = true) => {\n const i = Math.floor(Math.log(fileSize) / Math.log(1024))\n if (!fileSize) {\n return asText ? '0 bytes' : { size: 0, suffix: 'bytes' }\n }\n const size = (fileSize / Math.pow(1024, i)).toFixed(1)\n const suffix = suffixes[i]\n return asText ? `${size}${suffix}` : { size, suffix }\n}\n\nexport const getFileSizeInMB = fileSize => {\n const value = fileSize / 1048576\n return (!fileSize && 0) || +value.toFixed(2)\n}\n\nexport const version = '0.4.6' // version stored in 'utils' for now\nexport const apiUrl =\n process.env.NODE_ENV === 'production'\n ? '/api/'\n : `${process.env.REACT_APP_API_URL}/api/`\n\nexport const userFilters = [\n { key: 'workouts_count', label: 'workouts count' },\n { key: 'admin', label: 'admin rights' },\n { key: 'created_at', label: 'registration date' },\n { key: 'username', label: 'user name' },\n]\n\nexport const sortOrders = [\n { key: 'asc', label: 'ascending' },\n { key: 'desc', label: 'descending' },\n]\n\nexport const isLoggedIn = () => !!window.localStorage.authToken\n\nexport const generateIds = arr => {\n let i = 0\n return arr.map(val => {\n const obj = { id: i, value: val }\n i++\n return obj\n })\n}\n\nexport const createApiRequest = params => {\n const headers = {}\n if (!params.noAuthorization) {\n headers.Authorization = `Bearer ${window.localStorage.getItem('authToken')}`\n }\n if (params.type) {\n headers['Content-Type'] = params.type\n }\n const requestParams = {\n method: params.method,\n headers: headers,\n }\n if (params.type === 'application/json' && params.body) {\n requestParams.body = JSON.stringify(params.body)\n } else if (params.body) {\n requestParams.body = params.body\n }\n const request = new Request(`${apiUrl}${params.url}`, requestParams)\n return fetch(request)\n .then(response =>\n params.method === 'DELETE' || response.status === 413\n ? response\n : response.json()\n )\n .catch(error => {\n console.error(error)\n return new Error('An error occurred. Please contact the administrator.')\n })\n}\n\nexport const getDateWithTZ = (date, tz) => {\n if (!date) {\n return ''\n }\n const dt = DateTime.fromISO(\n format(new Date(date), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n ).setZone(tz)\n return parse(\n dt.toFormat('yyyy-MM-dd HH:mm:ss'),\n 'yyyy-MM-dd HH:mm:ss',\n new Date()\n )\n}\n\nexport const capitalize = target =>\n target.charAt(0).toUpperCase() + target.slice(1)\n\nexport const rangePagination = pages =>\n Array.from({ length: pages }, (_, i) => i + 1)\n\nconst sortValues = (a, b) => {\n const valueALabel = a.label.toLowerCase()\n const valueBLabel = b.label.toLowerCase()\n return valueALabel > valueBLabel ? 1 : valueALabel < valueBLabel ? -1 : 0\n}\n\nexport const translateValues = (t, values, key = 'common') =>\n values\n .map(value => ({\n ...value,\n label: t(`${key}:${value.label}`),\n }))\n .sort(sortValues)\n\nexport const formatUrl = (pathname, query) => {\n let url = pathname\n if (query.id || (pathname === 'users' && query.username)) {\n url = `${url}/${query.username ? query.username : query.id}`\n } else if (Object.keys(query).length > 0) {\n url += '?'\n Object.keys(query)\n .filter(key => query[key])\n .map(\n (key, index) => (url += `${index === 0 ? '' : '&'}${key}=${query[key]}`)\n )\n }\n return url\n}\n","import { createApiRequest, formatUrl } from '../utils'\n\nexport default class FitTrackeeApi {\n static getData(target, data = {}) {\n const url = formatUrl(target, data)\n const params = {\n url: url,\n method: 'GET',\n type: 'application/json',\n }\n return createApiRequest(params)\n }\n\n static addData(target, data) {\n const params = {\n url: target,\n method: 'POST',\n body: data,\n type: 'application/json',\n }\n return createApiRequest(params)\n }\n\n static addDataWithFile(target, data) {\n const params = {\n url: target,\n method: 'POST',\n body: data,\n }\n return createApiRequest(params)\n }\n\n static postData(target, data) {\n const params = {\n url: `${target}${data.id ? `/${data.id}` : ''}`,\n method: 'POST',\n body: data,\n type: 'application/json',\n }\n return createApiRequest(params)\n }\n\n static updateData(target, data) {\n const params = {\n url: `${target}${\n data.id ? `/${data.id}` : data.username ? `/${data.username}` : ''\n }`,\n method: 'PATCH',\n body: data,\n type: 'application/json',\n }\n return createApiRequest(params)\n }\n\n static deleteData(target, id) {\n const params = {\n url: `${target}/${id}`,\n method: 'DELETE',\n type: 'application/json',\n }\n return createApiRequest(params)\n }\n}\n","import i18next from 'i18next'\n\nimport FitTrackeeApi from '../fitTrackeeApi/index'\nimport { history } from '../index'\n\nexport const emptyMessages = () => ({\n type: 'CLEAN_ALL_MESSAGES',\n})\n\nexport const setData = (target, data) => ({\n type: 'SET_DATA',\n data,\n target,\n})\n\nexport const setPaginatedData = (target, data, pagination) => ({\n type: 'SET_PAGINATED_DATA',\n data,\n pagination,\n target,\n})\n\nexport const setError = message => ({\n type: 'SET_ERROR',\n message,\n})\n\nexport const setLanguage = language => ({\n type: 'SET_LANGUAGE',\n language,\n})\n\nexport const setLoading = loading => ({\n type: 'SET_LOADING',\n loading,\n})\n\nexport const updateSportsData = data => ({\n type: 'UPDATE_SPORT_DATA',\n data,\n})\n\nexport const updateUsersData = data => ({\n type: 'UPDATE_USER_DATA',\n data,\n})\n\nexport const getOrUpdateData = (\n action,\n target,\n data,\n canDispatch = true\n) => dispatch => {\n dispatch(setLoading(true))\n if (data && data.id && target !== 'workouts' && isNaN(data.id)) {\n dispatch(setLoading(false))\n return dispatch(setError(`${target}|Incorrect id`))\n }\n dispatch(emptyMessages())\n return FitTrackeeApi[action](target, data)\n .then(ret => {\n if (ret.status === 'success') {\n if (canDispatch) {\n if (target === 'users' && action === 'getData') {\n return dispatch(setPaginatedData(target, ret.data, ret.pagination))\n }\n dispatch(setData(target, ret.data))\n } else if (action === 'updateData' && target === 'sports') {\n dispatch(updateSportsData(ret.data.sports[0]))\n } else if (action === 'updateData' && target === 'users') {\n dispatch(updateUsersData(ret.data.users[0]))\n }\n } else {\n dispatch(setError(`${target}|${ret.message || ret.status}`))\n }\n dispatch(setLoading(false))\n })\n .catch(error => {\n dispatch(setLoading(false))\n dispatch(setError(`${target}|${error}`))\n })\n}\n\nexport const addData = (target, data) => dispatch =>\n FitTrackeeApi.addData(target, data)\n .then(ret => {\n if (ret.status === 'created') {\n history.push(`/admin/${target}`)\n } else {\n dispatch(setError(`${target}|${ret.status}`))\n }\n })\n .catch(error => dispatch(setError(`${target}|${error}`)))\n\nexport const deleteData = (target, id) => dispatch => {\n if (isNaN(id)) {\n return dispatch(setError(target, `${target}|Incorrect id`))\n }\n return FitTrackeeApi.deleteData(target, id)\n .then(ret => {\n if (ret.status === 204) {\n history.push(`/admin/${target}`)\n } else {\n dispatch(setError(`${target}|${ret.message || ret.status}`))\n }\n })\n .catch(error => dispatch(setError(`${target}|${error}`)))\n}\n\nexport const updateLanguage = language => dispatch => {\n i18next.changeLanguage(language).then(dispatch(setLanguage(language)))\n}\n","import FitTrackeeGenericApi from '../fitTrackeeApi'\nimport { history } from '../index'\nimport { generateIds } from '../utils'\nimport { emptyMessages, setError } from './index'\n\nexport const setAppConfig = data => ({\n type: 'SET_APP_CONFIG',\n data,\n})\n\nexport const setAppStats = data => ({\n type: 'SET_APP_STATS',\n data,\n})\n\nconst SetAppErrors = messages => ({ type: 'APP_ERRORS', messages })\n\nexport const getAppData = target => dispatch =>\n FitTrackeeGenericApi.getData(target)\n .then(ret => {\n if (ret.status === 'success') {\n if (target === 'config') {\n dispatch(setAppConfig(ret.data))\n } else if (target === 'stats/all') {\n dispatch(setAppStats(ret.data))\n }\n } else {\n dispatch(setError(`application|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`application|${error}`)))\n\nexport const updateAppConfig = formData => dispatch => {\n dispatch(emptyMessages())\n FitTrackeeGenericApi.updateData('config', formData)\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(setAppConfig(ret.data))\n history.push('/admin/application')\n } else if (Array.isArray(ret.message)) {\n dispatch(SetAppErrors(generateIds(ret.message)))\n } else {\n dispatch(setError(ret.message))\n }\n })\n .catch(error => dispatch(setError(`application|${error}`)))\n}\n","import React from 'react'\nimport { connect } from 'react-redux'\n\nimport Message from '../Common/Message'\nimport { getAppData, updateAppConfig } from '../../actions/application'\nimport { history } from '../../index'\nimport { getFileSizeInMB } from '../../utils'\n\nclass AdminApplication extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n formData: {},\n }\n }\n\n componentDidMount() {\n this.initForm()\n }\n\n componentDidUpdate(prevProps) {\n if (this.props.appConfig !== prevProps.appConfig) {\n this.initForm()\n }\n }\n\n initForm() {\n const { appConfig } = this.props\n const formData = {}\n Object.keys(appConfig).map(k =>\n appConfig[k] === null\n ? (formData[k] = '')\n : ['max_single_file_size', 'max_zip_file_size'].includes(k)\n ? (formData[k] = getFileSizeInMB(appConfig[k]))\n : (formData[k] = appConfig[k])\n )\n this.setState({ formData })\n }\n\n handleFormChange(e) {\n const { formData } = this.state\n formData[e.target.name] = +e.target.value\n this.setState(formData)\n }\n\n render() {\n const {\n isInEdition,\n loadAppConfig,\n message,\n messages,\n onHandleConfigFormSubmit,\n t,\n } = this.props\n const { formData } = this.state\n return (\n
\n {(message || messages) && (\n \n )}\n {Object.keys(formData).length > 0 && (\n
\n
\n
\n
\n \n {t('administration:Application configuration')}\n \n
\n
\n {\n e.preventDefault()\n onHandleConfigFormSubmit(formData)\n }}\n >\n
\n \n {t(\n // eslint-disable-next-line max-len\n 'administration:Max. number of active users'\n )}\n \n \n \n :\n \n this.handleFormChange(e)}\n />\n
\n
\n \n {t(\n 'administration:Max. size of uploaded files (in Mb)'\n )}\n :\n \n this.handleFormChange(e)}\n />\n
\n
\n \n {t('administration:Max. size of zip archive (in Mb)')}:\n \n this.handleFormChange(e)}\n />\n
\n
\n \n {t('administration:Max. files of zip archive')}\n \n this.handleFormChange(e)}\n />\n
\n {isInEdition ? (\n <>\n \n {\n e.preventDefault()\n loadAppConfig()\n history.push('/admin/application')\n }}\n value={t('common:Cancel')}\n />\n \n ) : (\n <>\n {\n e.preventDefault()\n history.push('/admin/application/edit')\n }}\n value={t('common:Edit')}\n />\n history.push('/admin')}\n value={t('common:Back')}\n />\n \n )}\n \n
\n
\n
\n
\n )}\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n message: state.message,\n messages: state.messages,\n }),\n dispatch => ({\n loadAppConfig: () => {\n dispatch(getAppData('config'))\n },\n onHandleConfigFormSubmit: formData => {\n const data = Object.assign({}, formData)\n data.max_single_file_size *= 1048576\n data.max_zip_file_size *= 1048576\n dispatch(updateAppConfig(data))\n },\n })\n)(AdminApplication)\n","import React from 'react'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport { getAppData } from '../../actions/application'\nimport { getFileSize } from '../../utils'\n\nclass AdminStats extends React.Component {\n componentDidMount() {\n this.props.loadAppStats()\n }\n\n render() {\n const { appStats, t } = this.props\n const uploadDirSize = getFileSize(appStats.uploads_dir_size, false)\n return (\n
\n
\n
\n
\n
\n \n
\n
\n
\n {appStats.users ? appStats.users : 0}\n
\n
{`${\n appStats.users === 1\n ? t('administration:user')\n : t('administration:users')\n }`}
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n {appStats.sports ? appStats.sports : 0}\n
\n
{`${\n appStats.sports === 1 ? t('common:sport') : t('common:sports')\n }`}
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n {appStats.workouts ? appStats.workouts : 0}\n
\n
{`${\n appStats.workouts === 1\n ? t('common:workout')\n : t('common:workouts')\n }`}
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
{uploadDirSize.size}
\n
\n {uploadDirSize.suffix} ({t('administration:uploads')})\n
\n
\n
\n
\n
\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n appStats: state.application.statistics,\n }),\n dispatch => ({\n loadAppStats: () => {\n dispatch(getAppData('stats/all'))\n },\n })\n )(AdminStats)\n)\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport AdminStats from './AdminStats'\n\nexport default function AdminDashboard(props) {\n const { appConfig, t } = props\n return (\n
\n
\n {t('administration:Administration')}\n
\n
\n \n
\n
\n
\n \n {t('administration:Application')}\n \n
\n
\n {t(\n 'administration:Update application configuration ' +\n '(maximum number of registered users, maximum files size).'\n )}\n
\n \n {t(\n `administration:Registration is currently ${\n appConfig.is_registration_enabled ? 'enabled' : 'disabled'\n }.`\n )}\n \n
\n
\n
\n \n {t('administration:Sports')}\n \n
\n
{t('administration:Enable/disable sports.')}
\n
\n
\n \n {t('administration:Users')}\n \n
\n
\n {t(\n 'administration:Add/remove admin rights, ' +\n 'delete user account.'\n )}\n
\n
\n
\n
\n )\n}\n","import React from 'react'\nimport { connect } from 'react-redux'\n\nimport Message from '../Common/Message'\nimport { getOrUpdateData } from '../../actions'\nimport { history } from '../../index'\n\nclass AdminSports extends React.Component {\n componentDidMount() {\n this.props.loadSports()\n }\n\n render() {\n const { message, sports, t, updateSport } = this.props\n return (\n
\n {message && }\n
\n
\n
\n
\n {t('administration:Sports')}\n
\n
\n {sports.length > 0 && (\n \n \n \n \n \n \n \n \n \n \n \n {sports.map(sport => (\n \n \n \n \n \n \n \n ))}\n \n
{t('administration:id')}{t('administration:Image')}{t('administration:Label')}{t('administration:Active')}{t('administration:Actions')}
\n \n {t('administration:id')}\n \n {sport.id}\n \n \n {t('administration:Image')}\n \n \n \n \n {t('administration:Label')}\n \n {t(`sports:${sport.label}`)}\n \n \n {t('administration:Active')}\n \n {sport.is_active ? (\n \n ) : (\n \n )}\n \n \n {t('administration:Actions')}\n \n \n updateSport(sport.id, !sport.is_active)\n }\n />\n {sport.has_workouts && (\n \n \n {t('administration:workouts exist')}\n \n )}\n
\n )}\n history.push('/admin/')}\n value={t('common:Back')}\n />\n
\n
\n
\n
\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n message: state.message,\n sports: state.sports.data,\n user: state.user,\n }),\n dispatch => ({\n loadSports: () => {\n dispatch(getOrUpdateData('getData', 'sports'))\n },\n updateSport: (sportId, isActive) => {\n const data = { id: sportId, is_active: isActive }\n dispatch(getOrUpdateData('updateData', 'sports', data, false))\n },\n })\n)(AdminSports)\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport { formatUrl, rangePagination } from '../../utils'\n\nexport default class Pagination extends React.PureComponent {\n getUrl(value) {\n const { query, pathname } = this.props\n const newQuery = Object.assign({}, query)\n let page = query.page ? +query.page : 1\n switch (value) {\n case 'prev':\n page -= 1\n break\n case 'next':\n page += 1\n break\n default:\n page = +value\n }\n newQuery.page = page\n return formatUrl(pathname, newQuery)\n }\n\n render() {\n const { pagination, t } = this.props\n return (\n <>\n {pagination && Object.keys(pagination).length > 0 && (\n \n )}\n \n )\n }\n}\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { connect } from 'react-redux'\nimport { Link } from 'react-router-dom'\n\nimport Message from '../Common/Message'\nimport Pagination from '../Common/Pagination'\nimport { history } from '../../index'\nimport { getOrUpdateData } from '../../actions'\nimport {\n apiUrl,\n formatUrl,\n sortOrders,\n translateValues,\n userFilters,\n} from '../../utils'\n\nclass AdminUsers extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n page: null,\n per_page: null,\n order_by: 'created_at',\n order: 'asc',\n }\n }\n\n componentDidMount() {\n this.props.loadUsers(this.initState())\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.location.query !== this.props.location.query) {\n this.props.loadUsers(this.props.location.query)\n }\n }\n\n initState() {\n const { query } = this.props.location\n const newQuery = {\n page: query.page,\n per_page: query.per_page,\n order_by: query.order_by ? query.order_by : 'created_at',\n order: query.order ? query.order : 'asc',\n }\n this.setState(newQuery)\n return newQuery\n }\n\n updatePage(key, value) {\n const query = Object.assign({}, this.state)\n query[key] = value\n this.setState(query)\n const url = formatUrl(this.props.location.pathname, query)\n history.push(url)\n }\n\n render() {\n const {\n authUser,\n location,\n message,\n t,\n pagination,\n updateUser,\n users,\n } = this.props\n const translatedFilters = translateValues(t, userFilters)\n const translatedSortOrders = translateValues(t, sortOrders)\n return (\n
\n {message && }\n
\n
\n
\n
\n
\n {t('administration:Users')}\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n {users.map(user => (\n \n \n \n \n \n \n \n \n \n ))}\n \n
#{t('user:Username')}{t('user:Email')}{t('user:Registration Date')}{t('workouts:Workouts')}{t('user:Admin')}{t('administration:Actions')}
\n #\n {user.picture === true ? (\n \n ) : (\n \n )}\n \n \n {t('user:Username')}\n \n \n {user.username}\n \n \n \n {t('user:Email')}\n \n {user.email}\n \n \n {t('user:Registration Date')}\n \n {format(\n new Date(user.created_at),\n 'dd/MM/yyyy HH:mm'\n )}\n \n \n {t('workouts:Workouts')}\n \n {user.nb_workouts}\n \n \n {t('user:Admin')}\n \n {user.admin ? (\n \n ) : (\n \n )}\n \n \n {t('administration:Actions')}\n \n \n updateUser(user.username, !user.admin)\n }\n />\n
\n \n history.push('/admin/')}\n value={t('common:Back')}\n />\n
\n
\n
\n
\n
\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n authUser: state.user,\n location: state.router.location,\n message: state.message,\n pagination: state.users.pagination,\n users: state.users.data,\n }),\n dispatch => ({\n loadUsers: query => {\n dispatch(getOrUpdateData('getData', 'users', query))\n },\n updateUser: (userName, isAdmin) => {\n const data = { username: userName, admin: isAdmin }\n dispatch(getOrUpdateData('updateData', 'users', data, false))\n },\n })\n)(AdminUsers)\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useTranslation } from 'react-i18next'\n\nexport default function NotFound() {\n const { t } = useTranslation()\n return (\n
\n \n fittrackee - 404\n \n

{t('Page not found')}

\n
\n )\n}\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\nimport { Route, Switch } from 'react-router-dom'\n\nimport AdminApplication from './AdminApplication'\nimport AdminDashboard from './AdminDashboard'\nimport AdminSports from './AdminSports'\nimport AdminUsers from './AdminUsers'\nimport NotFound from './../Others/NotFound'\n\nfunction Admin(props) {\n const { appConfig, t, user } = props\n return (\n <>\n \n FitTrackee - {t('administration:Administration')}\n \n
\n {user.admin ? (\n \n }\n />\n (\n \n )}\n />\n (\n \n )}\n />\n }\n />\n }\n />\n \n \n ) : (\n \n )}\n
\n \n )\n}\n\nexport default withTranslation()(\n connect(state => ({\n appConfig: state.application.config,\n user: state.user,\n }))(Admin)\n)\n","import { format, subHours } from 'date-fns'\nimport togeojson from '@mapbox/togeojson'\n\nimport { getDateWithTZ } from './index'\n\nexport const workoutColors = [\n '#55a8a3',\n '#98C3A9',\n '#D0838A',\n '#ECC77E',\n '#926692',\n '#929292',\n '#428bca',\n]\n\nexport const recordsLabels = [\n { record_type: 'AS', label: 'Ave. speed' },\n { record_type: 'FD', label: 'Farest distance' },\n { record_type: 'LD', label: 'Longest duration' },\n { record_type: 'MS', label: 'Max. speed' },\n]\n\nexport const getGeoJson = gpxContent => {\n let jsonData\n if (gpxContent) {\n const gpx = new DOMParser().parseFromString(gpxContent, 'text/xml')\n jsonData = togeojson.gpx(gpx)\n }\n return { jsonData }\n}\n\nexport const formatWorkoutDate = (\n dateTime,\n dateFormat = null,\n timeFormat = null\n) => {\n if (!dateFormat) {\n dateFormat = 'yyyy/MM/dd'\n }\n if (!timeFormat) {\n timeFormat = 'HH:mm'\n }\n return {\n workout_date: dateTime ? format(dateTime, dateFormat) : null,\n workout_time: dateTime ? format(dateTime, timeFormat) : null,\n }\n}\n\nexport const formatWorkoutDuration = seconds => {\n let newDate = new Date(0)\n newDate = subHours(newDate.setSeconds(seconds), 1)\n return newDate.getTime()\n}\n\nexport const formatChartData = chartData => {\n for (let i = 0; i < chartData.length; i++) {\n chartData[i].time = new Date(chartData[i].time).getTime()\n chartData[i].duration = formatWorkoutDuration(chartData[i].duration)\n }\n return chartData\n}\n\nexport const formatRecord = (record, tz) => {\n let value\n switch (record.record_type) {\n case 'AS':\n case 'MS':\n value = `${record.value} km/h`\n break\n case 'FD':\n value = `${record.value} km`\n break\n default:\n // 'LD'\n value = record.value // eslint-disable-line prefer-destructuring\n }\n const [recordType] = recordsLabels.filter(\n r => r.record_type === record.record_type\n )\n return {\n workout_date: formatWorkoutDate(getDateWithTZ(record.workout_date, tz))\n .workout_date,\n workout_id: record.workout_id,\n id: record.id,\n record_type: recordType.label,\n value: value,\n }\n}\n\nconst sortSports = (a, b) => {\n const sportALabel = a.label.toLowerCase()\n const sportBLabel = b.label.toLowerCase()\n return sportALabel > sportBLabel ? 1 : sportALabel < sportBLabel ? -1 : 0\n}\n\nexport const translateSports = (sports, t, onlyActive = false) =>\n sports\n .filter(sport => (onlyActive ? sport.is_active : true))\n .map(sport => ({\n ...sport,\n label: t(`sports:${sport.label}`),\n }))\n .sort(sortSports)\n","import { createApiRequest } from '../utils'\n\nexport default class FitTrackeeApi {\n static loginOrRegisterOrPasswordReset(target, data) {\n const params = {\n url: `auth/${target}`,\n method: 'POST',\n noAuthorization: true,\n body: data,\n type: 'application/json',\n }\n return createApiRequest(params)\n }\n\n static deletePicture() {\n const params = {\n url: 'auth/picture',\n method: 'DELETE',\n }\n return createApiRequest(params)\n }\n}\n","import FitTrackeeGenericApi from '../fitTrackeeApi'\nimport FitTrackeeApi from '../fitTrackeeApi/auth'\nimport { history } from '../index'\nimport { generateIds } from '../utils'\nimport { getOrUpdateData, setError, updateLanguage } from './index'\nimport { getAppData } from './application'\n\nconst AuthError = message => ({ type: 'AUTH_ERROR', message })\n\nconst AuthErrors = messages => ({ type: 'AUTH_ERRORS', messages })\n\nconst PictureError = message => ({ type: 'PICTURE_ERROR', message })\n\nconst ProfileSuccess = profil => ({ type: 'PROFILE_SUCCESS', profil })\n\nconst ProfileError = message => ({ type: 'PROFILE_ERROR', message })\n\nconst ProfileUpdateError = message => ({\n type: 'PROFILE_UPDATE_ERROR',\n message,\n})\n\nexport const logout = () => ({ type: 'LOGOUT' })\n\nexport const loadProfile = () => dispatch => {\n if (window.localStorage.getItem('authToken')) {\n return dispatch(getProfile())\n }\n return { type: 'LOGOUT' }\n}\n\nexport const getProfile = () => dispatch =>\n FitTrackeeGenericApi.getData('auth/profile')\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(getOrUpdateData('getData', 'sports'))\n ret.data.isAuthenticated = true\n if (ret.data.language) {\n dispatch(updateLanguage(ret.data.language))\n }\n return dispatch(ProfileSuccess(ret.data))\n }\n return dispatch(ProfileError(ret.message))\n })\n .catch(error => {\n throw error\n })\n\nexport const loginOrRegisterOrPasswordReset = (target, formData) => dispatch =>\n FitTrackeeApi.loginOrRegisterOrPasswordReset(target, formData)\n .then(ret => {\n if (ret.status === 'success') {\n if (target === 'password/reset-request') {\n return history.push({\n pathname: '/password-reset/sent',\n })\n }\n if (target === 'password/update') {\n return history.push({\n pathname: '/updated-password',\n })\n }\n if (target === 'login' || target === 'register') {\n window.localStorage.setItem('authToken', ret.auth_token)\n if (target === 'register') {\n dispatch(getAppData('config'))\n }\n return dispatch(getProfile())\n }\n }\n return dispatch(AuthError(ret.message))\n })\n .catch(error => {\n throw error\n })\n\nconst RegisterFormControl = (formData, onlyPasswords = false) => {\n const errMsg = []\n if (\n !onlyPasswords &&\n (formData.username.length < 3 || formData.username.length > 12)\n ) {\n errMsg.push('3 to 12 characters required for username.')\n }\n if (formData.password !== formData.password_conf) {\n errMsg.push(\"Password and password confirmation don't match.\")\n }\n if (formData.password.length < 8) {\n errMsg.push('8 characters required for password.')\n }\n return errMsg\n}\n\nexport const handleUserFormSubmit = (formData, formType) => dispatch => {\n if (formType === 'register' || formType === 'password/update') {\n const ret = RegisterFormControl(formData, formType === 'password/update')\n if (ret.length > 0) {\n return dispatch(AuthErrors(generateIds(ret)))\n }\n }\n return dispatch(loginOrRegisterOrPasswordReset(formType, formData))\n}\n\nexport const handleProfileFormSubmit = formData => dispatch => {\n if (!formData.password === formData.password_conf) {\n return dispatch(\n ProfileUpdateError(\"Password and password confirmation don't match.\")\n )\n }\n delete formData.id\n return FitTrackeeGenericApi.postData('auth/profile/edit', formData)\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(getProfile())\n return history.push('/profile')\n }\n dispatch(ProfileUpdateError(ret.message))\n })\n .catch(error => {\n throw error\n })\n}\n\nexport const uploadPicture = event => dispatch => {\n event.preventDefault()\n const form = new FormData()\n form.append('file', event.target.picture.files[0])\n event.target.reset()\n return FitTrackeeGenericApi.addDataWithFile('auth/picture', form)\n .then(ret => {\n if (ret.status === 'success') {\n return dispatch(getProfile())\n }\n const msg =\n ret.status === 413\n ? 'Error during picture update, file size exceeds max size.'\n : ret.message\n return dispatch(PictureError(msg))\n })\n .catch(error => {\n throw error\n })\n}\n\nexport const deletePicture = () => dispatch =>\n FitTrackeeApi.deletePicture()\n .then(ret => {\n if (ret.status === 204) {\n return dispatch(getProfile())\n }\n return dispatch(PictureError(ret.message))\n })\n .catch(error => {\n throw error\n })\n\nexport const deleteUser = (username, isAdmin = false) => dispatch =>\n FitTrackeeGenericApi.deleteData('users', username)\n .then(ret => {\n if (ret.status === 204) {\n dispatch(getAppData('config'))\n if (isAdmin) {\n history.push('/admin/users')\n } else {\n dispatch(logout())\n history.push('/')\n }\n } else {\n ret.json().then(r => dispatch(setError(`${r.message}`)))\n }\n })\n .catch(error => dispatch(setError(`user|${error}`)))\n","import FitTrackeeGenericApi from '../fitTrackeeApi'\nimport { history } from '../index'\nimport { formatChartData } from '../utils/workouts'\nimport { setError, setLoading } from './index'\nimport { loadProfile } from './user'\n\nexport const pushWorkouts = workouts => ({\n type: 'PUSH_WORKOUTS',\n workouts,\n})\n\nexport const removeWorkout = workoutId => ({\n type: 'REMOVE_WORKOUT',\n workoutId,\n})\n\nexport const updateCalendar = workouts => ({\n type: 'UPDATE_CALENDAR',\n workouts,\n})\n\nexport const setGpx = gpxContent => ({\n type: 'SET_GPX',\n gpxContent,\n})\n\nexport const setChartData = chartData => ({\n type: 'SET_CHART_DATA',\n chartData,\n})\n\nexport const addWorkout = form => dispatch =>\n FitTrackeeGenericApi.addDataWithFile('workouts', form)\n .then(ret => {\n if (ret.status === 'created') {\n if (ret.data.workouts.length === 0) {\n dispatch(setError('workouts|no correct file.'))\n } else if (ret.data.workouts.length === 1) {\n dispatch(loadProfile())\n history.push(`/workouts/${ret.data.workouts[0].id}`)\n } else {\n // ret.data.workouts.length > 1\n dispatch(loadProfile())\n history.push('/')\n }\n } else if (ret.status === 413) {\n dispatch(\n setError('workouts|File size is greater than the allowed size')\n )\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n dispatch(setLoading(false))\n })\n .catch(error => {\n dispatch(setLoading(false))\n dispatch(setError(`workouts|${error}`))\n })\n\nexport const addWorkoutWithoutGpx = form => dispatch =>\n FitTrackeeGenericApi.addData('workouts/no_gpx', form)\n .then(ret => {\n if (ret.status === 'created') {\n dispatch(loadProfile())\n history.push(`/workouts/${ret.data.workouts[0].id}`)\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n\nexport const getWorkoutGpx = workoutId => dispatch => {\n if (workoutId) {\n return FitTrackeeGenericApi.getData(`workouts/${workoutId}/gpx`)\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(setGpx(ret.data.gpx))\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n }\n dispatch(setGpx(null))\n}\n\nexport const getSegmentGpx = (workoutId, segmentId) => dispatch => {\n if (workoutId) {\n return FitTrackeeGenericApi.getData(\n `workouts/${workoutId}/gpx/segment/${segmentId}`\n )\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(setGpx(ret.data.gpx))\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n }\n dispatch(setGpx(null))\n}\n\nexport const getWorkoutChartData = workoutId => dispatch => {\n if (workoutId) {\n return FitTrackeeGenericApi.getData(`workouts/${workoutId}/chart_data`)\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(setChartData(formatChartData(ret.data.chart_data)))\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n }\n dispatch(setChartData(null))\n}\n\nexport const getSegmentChartData = (workoutId, segmentId) => dispatch => {\n if (workoutId) {\n return FitTrackeeGenericApi.getData(\n `workouts/${workoutId}/chart_data/segment/${segmentId}`\n )\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(setChartData(formatChartData(ret.data.chart_data)))\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n }\n dispatch(setChartData(null))\n}\n\nexport const deleteWorkout = id => dispatch =>\n FitTrackeeGenericApi.deleteData('workouts', id)\n .then(ret => {\n if (ret.status === 204) {\n Promise.resolve(dispatch(removeWorkout(id)))\n .then(() => dispatch(loadProfile()))\n .then(() => history.push('/'))\n } else {\n dispatch(setError(`workouts|${ret.status}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n\nexport const editWorkout = form => dispatch =>\n FitTrackeeGenericApi.updateData('workouts', form)\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(loadProfile())\n history.push(`/workouts/${ret.data.workouts[0].id}`)\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n dispatch(setLoading(false))\n })\n .catch(error => {\n dispatch(setLoading(false))\n dispatch(setError(`workouts|${error}`))\n })\n\nexport const getMoreWorkouts = params => dispatch =>\n FitTrackeeGenericApi.getData('workouts', params)\n .then(ret => {\n if (ret.status === 'success') {\n if (ret.data.workouts.length > 0) {\n dispatch(pushWorkouts(ret.data.workouts))\n }\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n\nexport const getMonthWorkouts = (from, to) => dispatch =>\n FitTrackeeGenericApi.getData('workouts', {\n from,\n to,\n order: 'desc',\n per_page: 100,\n })\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(updateCalendar(ret.data.workouts))\n } else {\n dispatch(setError(`workouts|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`workouts|${error}`)))\n","import React from 'react'\nimport { Trans } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport { setLoading } from '../../../actions/index'\nimport { addWorkout, editWorkout } from '../../../actions/workouts'\nimport { history } from '../../../index'\nimport { getFileSize } from '../../../utils'\nimport { translateSports } from '../../../utils/workouts'\n\nfunction FormWithGpx(props) {\n const {\n appConfig,\n loading,\n onAddWorkout,\n onEditWorkout,\n sports,\n t,\n workout,\n } = props\n const sportId = workout ? workout.sport_id : ''\n const translatedSports = translateSports(sports, t, true)\n const zipTooltip = `${t('workouts:no folder inside')}, ${\n appConfig.gpx_limit_import\n } ${t('workouts:files max')}, ${t('workouts:max size')}: ${getFileSize(\n appConfig.max_zip_file_size\n )}`\n const fileSizeLimit = getFileSize(appConfig.max_single_file_size)\n return (\n event.preventDefault()}\n >\n
\n \n
\n {workout ? (\n
\n \n
\n ) : (\n
\n \n
\n )}\n
\n \n
\n {loading ? (\n
\n ) : (\n
\n \n workout ? onEditWorkout(event, workout) : onAddWorkout(event)\n }\n value={t('common:Submit')}\n />\n history.push('/')}\n value={t('common:Cancel')}\n />\n
\n )}\n \n )\n}\n\nexport default connect(\n state => ({\n appConfig: state.application.config,\n loading: state.loading,\n }),\n dispatch => ({\n onAddWorkout: e => {\n dispatch(setLoading(true))\n const form = new FormData()\n form.append('file', e.target.form.gpxFile.files[0])\n /* prettier-ignore */\n form.append(\n 'data',\n `{\"sport_id\": ${e.target.form.sport.value\n }, \"notes\": \"${e.target.form.notes.value}\"}`\n )\n dispatch(addWorkout(form))\n },\n onEditWorkout: (e, workout) => {\n dispatch(\n editWorkout({\n id: workout.id,\n notes: e.target.form.notes.value,\n sport_id: +e.target.form.sport.value,\n title: e.target.form.title.value,\n })\n )\n },\n })\n)(FormWithGpx)\n","import React from 'react'\nimport { connect } from 'react-redux'\n\nimport { addWorkoutWithoutGpx, editWorkout } from '../../../actions/workouts'\nimport { history } from '../../../index'\nimport { getDateWithTZ } from '../../../utils'\nimport { formatWorkoutDate, translateSports } from '../../../utils/workouts'\n\nfunction FormWithoutGpx(props) {\n const { onAddOrEdit, sports, t, user, workout } = props\n const translatedSports = translateSports(sports, t, true)\n let workoutDate,\n workoutTime,\n sportId = ''\n if (workout) {\n const workoutDateTime = formatWorkoutDate(\n getDateWithTZ(workout.workout_date, user.timezone),\n 'yyyy-MM-dd'\n )\n workoutDate = workoutDateTime.workout_date\n workoutTime = workoutDateTime.workout_time\n sportId = workout.sport_id\n }\n\n return (\n
event.preventDefault()}>\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n onAddOrEdit(event, workout)}\n value={t('common:Submit')}\n />\n history.push('/')}\n value={t('common:Cancel')}\n />\n \n )\n}\n\nexport default connect(\n state => ({\n user: state.user,\n }),\n dispatch => ({\n onAddOrEdit: (e, workout) => {\n const d = e.target.form.duration.value.split(':')\n const duration = +d[0] * 60 * 60 + +d[1] * 60 + +d[2]\n\n /* prettier-ignore */\n const workoutDate = `${e.target.form.workout_date.value\n } ${ e.target.form.workout_time.value}`\n\n const data = {\n workout_date: workoutDate,\n distance: +e.target.form.distance.value,\n duration,\n notes: e.target.form.notes.value,\n sport_id: +e.target.form.sport_id.value,\n title: e.target.form.title.value,\n }\n if (workout) {\n data.id = workout.id\n dispatch(editWorkout(data))\n } else {\n dispatch(addWorkoutWithoutGpx(data))\n }\n },\n })\n)(FormWithoutGpx)\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport FormWithGpx from './WorkoutForms/FormWithGpx'\nimport FormWithoutGpx from './WorkoutForms/FormWithoutGpx'\nimport Message from '../Common/Message'\n\nclass WorkoutAddEdit extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n withGpx: true,\n }\n }\n\n handleRadioChange(changeEvent) {\n this.setState({\n withGpx:\n changeEvent.target.name === 'withGpx'\n ? changeEvent.target.value\n : !changeEvent.target.value,\n })\n }\n\n render() {\n const { loading, message, sports, t, workout } = this.props\n const { withGpx } = this.state\n return (\n
\n \n \n FitTrackee -{' '}\n {workout\n ? t('workouts:Edit a workout')\n : t('workouts:Add a workout')}\n \n \n
\n
\n \n
\n
\n
\n
\n
\n

\n {workout\n ? t('workouts:Edit a workout')\n : t('workouts:Add a workout')}\n

\n
\n {workout ? (\n workout.with_gpx ? (\n \n ) : (\n \n )\n ) : (\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n {withGpx ? (\n \n ) : (\n \n )}\n
\n )}\n
\n
\n
\n
\n
\n
\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(state => ({\n loading: state.loading,\n }))(WorkoutAddEdit)\n)\n","import React from 'react'\nimport { connect } from 'react-redux'\n\nimport WorkoutAddOrEdit from './WorkoutAddOrEdit'\n\nfunction WorkoutAdd(props) {\n const { message, sports } = props\n return (\n
\n \n
\n )\n}\n\nexport default connect(state => ({\n message: state.message,\n sports: state.sports.data,\n user: state.user,\n}))(WorkoutAdd)\n","import React from 'react'\nimport { useTranslation } from 'react-i18next'\n\nexport default function CustomModal(props) {\n const { t } = useTranslation()\n return (\n
\n
\n
\n
\n
{props.title}
\n props.close()}\n >\n ×\n \n
\n
\n

{props.text}

\n
\n
\n props.confirm()}\n >\n {t('common:Yes')}\n \n props.close()}\n >\n {t('common:No')}\n \n
\n
\n
\n
\n )\n}\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport { getDateWithTZ } from '../../../utils'\nimport { formatWorkoutDate } from '../../../utils/workouts'\n\nexport default function WorkoutCardHeader(props) {\n const {\n dataType,\n displayModal,\n segmentId,\n sport,\n t,\n title,\n user,\n workout,\n } = props\n const workoutDate = workout\n ? formatWorkoutDate(getDateWithTZ(workout.workout_date, user.timezone))\n : null\n\n const previousUrl =\n dataType === 'segment' && segmentId !== 1\n ? `/workouts/${workout.id}/segment/${segmentId - 1}`\n : dataType === 'workout' && workout.previous_workout\n ? `/workouts/${workout.previous_workout}`\n : null\n const nextUrl =\n dataType === 'segment' && segmentId < workout.segments.length\n ? `/workouts/${workout.id}/segment/${segmentId + 1}`\n : dataType === 'workout' && workout.next_workout\n ? `/workouts/${workout.next_workout}`\n : null\n\n return (\n
\n
\n
\n {previousUrl ? (\n \n \n \n ) : (\n \n )}\n
\n
\n \"sport\n
\n
\n {dataType === 'workout' ? (\n <>\n {title}{' '}\n \n \n \n displayModal(true)}\n title={t('workouts:Delete workout')}\n />\n \n ) : (\n <>\n {/* prettier-ignore */}\n \n {title}\n {' '}\n - {t('workouts:segment')} {segmentId}\n \n )}\n
\n {workoutDate && (\n \n {`${workoutDate.workout_date} - ${workoutDate.workout_time}`}\n \n )}\n
\n
\n {nextUrl ? (\n \n \n \n ) : (\n \n )}\n
\n
\n
\n )\n}\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { connect } from 'react-redux'\nimport {\n Area,\n ComposedChart,\n Line,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts'\n\nimport {\n getSegmentChartData,\n getWorkoutChartData,\n} from '../../../actions/workouts'\n\nclass WorkoutCharts extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n displayDistance: true,\n dataToHide: [],\n }\n }\n\n componentDidMount() {\n if (this.props.dataType === 'workout') {\n this.props.loadWorkoutData(this.props.workout.id)\n } else {\n this.props.loadSegmentData(this.props.workout.id, this.props.segmentId)\n }\n }\n\n componentDidUpdate(prevProps) {\n if (\n (this.props.dataType === 'workout' &&\n prevProps.workout.id !== this.props.workout.id) ||\n (this.props.dataType === 'workout' && prevProps.dataType === 'segment')\n ) {\n this.props.loadWorkoutData(this.props.workout.id)\n }\n if (\n this.props.dataType === 'segment' &&\n prevProps.segmentId !== this.props.segmentId\n ) {\n this.props.loadSegmentData(this.props.workout.id, this.props.segmentId)\n }\n }\n\n componentWillUnmount() {\n this.props.loadWorkoutData(null)\n }\n\n handleRadioChange(changeEvent) {\n this.setState({\n displayDistance:\n changeEvent.target.name === 'distance'\n ? changeEvent.target.value\n : !changeEvent.target.value,\n })\n }\n\n handleLegendChange(e) {\n const { dataToHide } = this.state\n const name = e.target.name // eslint-disable-line prefer-destructuring\n if (dataToHide.find(d => d === name)) {\n dataToHide.splice(dataToHide.indexOf(name), 1)\n } else {\n dataToHide.push(name)\n }\n this.setState({ dataToHide })\n }\n\n displayData(name) {\n const { dataToHide } = this.state\n return !dataToHide.find(d => d === name)\n }\n\n render() {\n const { chartData, t, updateCoordinates } = this.props\n const { displayDistance } = this.state\n const xInterval = chartData ? parseInt(chartData.length / 10, 10) : 0\n let xDataKey, xScale\n if (displayDistance) {\n xDataKey = 'distance'\n xScale = 'linear'\n } else {\n xDataKey = 'duration'\n xScale = 'time'\n }\n return (\n
\n {chartData && chartData.length > 0 ? (\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n updateCoordinates(e.activePayload)}\n onMouseLeave={() => updateCoordinates(null)}\n >\n \n displayDistance ? value : format(value, 'HH:mm:ss')\n }\n type=\"number\"\n />\n \n \n {this.displayData('elevation') && (\n \n )}\n {this.displayData('speed') && (\n \n )}\n \n displayDistance\n ? `${t('workouts:distance')}: ${value} km`\n : `${t('workouts:duration')}: ${format(\n value,\n 'HH:mm:ss'\n )}`\n }\n />\n \n \n
\n
\n {t('workouts:data from gpx, without any cleaning')}\n
\n
\n ) : (\n t('workouts:No data to display')\n )}\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n chartData: state.chartData,\n }),\n dispatch => ({\n loadWorkoutData: workoutId => {\n dispatch(getWorkoutChartData(workoutId))\n },\n loadSegmentData: (workoutId, segmentId) => {\n dispatch(getSegmentChartData(workoutId, segmentId))\n },\n })\n)(WorkoutCharts)\n","import React from 'react'\n\nexport default function WorkoutWeather(props) {\n const { t, workout } = props\n return (\n
\n {workout.weather_start && workout.weather_end && (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n {t('workouts:Start')}\n
\n \n
\n {t('workouts:End')}\n
\n \n
\n \n {Number(workout.weather_start.temperature).toFixed(1)}°C{Number(workout.weather_end.temperature).toFixed(1)}°C
\n \n \n {Number(workout.weather_start.humidity * 100).toFixed(1)}%\n {Number(workout.weather_end.humidity * 100).toFixed(1)}%
\n \n {Number(workout.weather_start.wind).toFixed(1)}m/s{Number(workout.weather_end.wind).toFixed(1)}m/s
\n )}\n
\n )\n}\n","import React from 'react'\n\nimport WorkoutWeather from './WorkoutWeather'\n\nexport default function WorkoutDetails(props) {\n const { t, workout } = props\n const withPauses = workout.pauses !== '0:00:00' && workout.pauses !== null\n return (\n
\n

\n \n {t('workouts:Duration')}: {workout.moving}\n {workout.records &&\n workout.records.find(record => record.record_type === 'LD') && (\n \n \n \n )}\n {withPauses && (\n \n
({t('workouts:pauses')}: {workout.pauses},{' '}\n {t('workouts:total duration')}: {workout.duration})\n
\n )}\n

\n

\n \n {t('workouts:Distance')}: {workout.distance} km\n {workout.records &&\n workout.records.find(record => record.record_type === 'FD') && (\n \n \n \n )}\n

\n

\n \n {t('workouts:Average speed')}: {workout.ave_speed} km/h\n {workout.records &&\n workout.records.find(record => record.record_type === 'AS') && (\n \n \n \n )}\n
\n {t('workouts:Max. speed')}: {workout.max_speed} km/h\n {workout.records &&\n workout.records.find(record => record.record_type === 'MS') && (\n \n \n \n )}\n

\n {workout.min_alt && workout.max_alt && (\n

\n \n {t('workouts:Min. altitude')}: {workout.min_alt}m\n
\n {t('workouts:Max. altitude')}: {workout.max_alt}m\n

\n )}\n {workout.ascent && workout.descent && (\n

\n \n {t('workouts:Ascent')}: {workout.ascent}m\n
\n {t('workouts:Descent')}: {workout.descent}m\n

\n )}\n \n
\n )\n}\n","import React from 'react'\nimport { GeoJSON, Marker, TileLayer, useMap } from 'react-leaflet'\nimport hash from 'object-hash'\n\nimport { apiUrl } from '../../../utils'\n\nexport default function Map({ bounds, coordinates, jsonData, mapAttribution }) {\n const map = useMap()\n map.fitBounds(bounds)\n return (\n <>\n \n \n {coordinates.latitude && (\n \n )}\n \n )\n}\n","import React from 'react'\nimport { MapContainer } from 'react-leaflet'\nimport { connect } from 'react-redux'\n\nimport Map from './Map'\nimport { getSegmentGpx, getWorkoutGpx } from '../../../actions/workouts'\nimport { getGeoJson } from '../../../utils/workouts'\n\nclass WorkoutMap extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n zoom: 13,\n }\n }\n\n componentDidMount() {\n if (this.props.dataType === 'workout') {\n this.props.loadWorkoutGpx(this.props.workout.id)\n } else {\n this.props.loadSegmentGpx(this.props.workout.id, this.props.segmentId)\n }\n }\n\n componentDidUpdate(prevProps) {\n if (\n (this.props.dataType === 'workout' &&\n prevProps.workout.id !== this.props.workout.id) ||\n (this.props.dataType === 'workout' && prevProps.dataType === 'segment')\n ) {\n this.props.loadWorkoutGpx(this.props.workout.id)\n }\n if (\n this.props.dataType === 'segment' &&\n prevProps.segmentId !== this.props.segmentId\n ) {\n this.props.loadSegmentGpx(this.props.workout.id, this.props.segmentId)\n }\n }\n\n componentWillUnmount() {\n this.props.loadWorkoutGpx(null)\n }\n\n render() {\n const { coordinates, gpxContent, mapAttribution, workout } = this.props\n const { jsonData } = getGeoJson(gpxContent)\n const bounds = [\n [workout.bounds[0], workout.bounds[1]],\n [workout.bounds[2], workout.bounds[3]],\n ]\n\n return (\n
\n {jsonData && (\n \n \n \n )}\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n gpxContent: state.gpx,\n mapAttribution: state.application.config.map_attribution,\n }),\n dispatch => ({\n loadWorkoutGpx: workoutId => {\n dispatch(getWorkoutGpx(workoutId))\n },\n loadSegmentGpx: (workoutId, segmentId) => {\n dispatch(getSegmentGpx(workoutId, segmentId))\n },\n })\n)(WorkoutMap)\n","import React from 'react'\n\nexport default function WorkoutNoMap(props) {\n const { t } = props\n return (\n
{t('workouts:No Map')}
\n )\n}\n","import React from 'react'\n\nexport default function WorkoutNotes(props) {\n const { notes, t } = props\n return (\n
\n
\n
\n
\n Notes\n
\n {notes ? notes : t('workouts:No notes')}\n
\n
\n
\n
\n
\n )\n}\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nexport default function WorkoutSegments(props) {\n const { segments, t } = props\n return (\n
\n
\n
\n
\n {t('workouts:Segments')}\n
\n
    \n {segments.map((segment, index) => (\n \n \n {t('workouts:segment')} {index + 1}\n {' '}\n ({t('workouts:distance')}: {segment.distance} km,{' '}\n {t('workouts:duration')}: {segment.duration})\n \n ))}\n
\n
\n
\n
\n
\n
\n )\n}\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport CustomModal from '../../Common/CustomModal'\nimport Message from '../../Common/Message'\nimport WorkoutCardHeader from './WorkoutCardHeader'\nimport WorkoutCharts from './WorkoutCharts'\nimport WorkoutDetails from './WorkoutDetails'\nimport WorkoutMap from './WorkoutMap'\nimport WorkoutNoMap from './WorkoutNoMap'\nimport WorkoutNotes from './WorkoutNotes'\nimport WorkoutSegments from './WorkoutSegments'\nimport { getOrUpdateData } from '../../../actions'\nimport { deleteWorkout } from '../../../actions/workouts'\n\nclass WorkoutDisplay extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n displayModal: false,\n coordinates: {\n latitude: null,\n longitude: null,\n },\n }\n }\n\n componentDidMount() {\n this.props.loadWorkout(this.props.match.params.workoutId)\n }\n\n componentDidUpdate(prevProps) {\n if (\n prevProps.match.params.workoutId !== this.props.match.params.workoutId\n ) {\n this.props.loadWorkout(this.props.match.params.workoutId)\n }\n }\n\n displayModal(value) {\n this.setState(prevState => ({\n ...prevState,\n displayModal: value,\n }))\n }\n\n updateCoordinates(activePayload) {\n const coordinates =\n activePayload && activePayload.length > 0\n ? {\n latitude: activePayload[0].payload.latitude,\n longitude: activePayload[0].payload.longitude,\n }\n : {\n latitude: null,\n longitude: null,\n }\n this.setState(prevState => ({\n ...prevState,\n coordinates,\n }))\n }\n\n render() {\n const { message, onDeleteWorkout, sports, t, user, workouts } = this.props\n const { coordinates, displayModal } = this.state\n const [workout] = workouts\n const title = workout ? workout.title : t('workouts:Workout')\n const [sport] = workout ? sports.filter(s => s.id === workout.sport_id) : []\n const segmentId = parseInt(this.props.match.params.segmentId)\n const dataType = segmentId >= 0 ? 'segment' : 'workout'\n return (\n
\n \n FitTrackee - {title}\n \n {message ? (\n \n ) : (\n
\n {displayModal && (\n {\n onDeleteWorkout(workout.id)\n this.displayModal(false)\n }}\n close={() => this.displayModal(false)}\n />\n )}\n {workout && sport && workouts.length === 1 && (\n
\n
\n
\n
\n
\n this.displayModal(true)}\n />\n
\n
\n
\n
\n {workout.with_gpx ? (\n \n ) : (\n \n )}\n
\n
\n \n
\n
\n
\n
\n
\n
\n {workout.with_gpx && (\n
\n
\n
\n
\n
\n
\n
\n {t('workouts:Chart')}\n
\n \n this.updateCoordinates(e)\n }\n />\n
\n
\n
\n
\n
\n
\n )}\n {dataType === 'workout' && (\n <>\n \n {workout.segments.length > 1 && (\n \n )}\n \n )}\n
\n )}\n
\n )}\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n workouts: state.workouts.data,\n message: state.message,\n sports: state.sports.data,\n user: state.user,\n }),\n dispatch => ({\n loadWorkout: workoutId => {\n dispatch(getOrUpdateData('getData', 'workouts', { id: workoutId }))\n },\n onDeleteWorkout: workoutId => {\n dispatch(deleteWorkout(workoutId))\n },\n })\n )(WorkoutDisplay)\n)\n","import React from 'react'\nimport { connect } from 'react-redux'\n\nimport WorkoutAddOrEdit from './WorkoutAddOrEdit'\nimport { getOrUpdateData } from '../../actions'\n\nclass WorkoutEdit extends React.Component {\n componentDidMount() {\n this.props.loadWorkout(this.props.match.params.workoutId)\n }\n\n render() {\n const { message, sports, workouts } = this.props\n const [workout] = workouts\n return (\n
\n {sports.length > 0 && (\n \n )}\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n workouts: state.workouts.data,\n message: state.message,\n sports: state.sports.data,\n user: state.user,\n }),\n dispatch => ({\n loadWorkout: workoutId => {\n dispatch(getOrUpdateData('getData', 'workouts', { id: workoutId }))\n },\n })\n)(WorkoutEdit)\n","import React from 'react'\nimport { connect } from 'react-redux'\nimport { Redirect, Route, Switch } from 'react-router-dom'\n\nimport NotFound from './../Others/NotFound'\nimport WorkoutAdd from './WorkoutAdd'\nimport WorkoutDisplay from './WorkoutDisplay'\nimport WorkoutEdit from './WorkoutEdit'\nimport { isLoggedIn } from '../../utils'\n\nfunction Workout() {\n return (\n
\n {isLoggedIn() ? (\n \n \n \n \n \n \n \n ) : (\n \n )}\n
\n )\n}\n\nexport default connect(state => ({\n user: state.user,\n}))(Workout)\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nexport default class NoWorkouts extends React.PureComponent {\n render() {\n const { t } = this.props\n return (\n
\n
\n {t('common:No workouts.')}{' '}\n \n {t('dashboard:Upload one !')}\n \n
\n
\n )\n }\n}\n","import React from 'react'\n\nimport { translateSports } from '../../utils/workouts'\n\nexport default class WorkoutsFilter extends React.PureComponent {\n render() {\n const { loadWorkouts, sports, t, updateParams } = this.props\n const translatedSports = translateSports(sports, t)\n return (\n
\n
\n
event.preventDefault()}>\n
\n \n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n loadWorkouts()}\n type=\"submit\"\n value={t('workouts:Filter')}\n />\n \n
\n
\n )\n }\n}\n","import React from 'react'\n\nimport { apiUrl } from '../../utils'\n\nexport default class StaticMap extends React.PureComponent {\n render() {\n const { display, workout } = this.props\n\n return (\n
\n \n
\n ©\n \n OpenStreetMap\n \n
\n
\n )\n }\n}\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport StaticMap from '../Common/StaticMap'\nimport { getDateWithTZ } from '../../utils'\n\nexport default class WorkoutsList extends React.PureComponent {\n render() {\n const { loading, sports, t, user, workouts } = this.props\n return (\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n {!loading &&\n sports &&\n workouts.map((workout, idx) => (\n // eslint-disable-next-line react/no-array-index-key\n \n \n \n \n \n \n \n \n \n ))}\n \n
\n {t('common:Workout')}{t('workouts:Date')}{t('workouts:Distance')}{t('workouts:Duration')}{t('workouts:Ave. speed')}{t('workouts:Max. speed')}
\n \n {t('common:Sport')}\n \n s.id === workout.sport_id)\n .map(s => s.img)}\n alt=\"workout sport logo\"\n />\n \n \n {t('common:Workout')}\n \n \n {workout.title}\n \n {workout.map && (\n \n )}\n \n \n {t('workouts:Date')}\n \n {format(\n getDateWithTZ(workout.workout_date, user.timezone),\n 'dd/MM/yyyy HH:mm'\n )}\n \n \n {t('workouts:Distance')}\n \n {Number(workout.distance).toFixed(2)} km\n \n \n {t('workouts:Duration')}\n \n {workout.moving}\n \n \n {t('workouts:Ave. speed')}\n \n {workout.ave_speed} km/h\n \n \n {t('workouts:Max. speed')}\n \n {workout.max_speed} km/h\n
\n {loading &&
}\n
\n
\n )\n }\n}\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport Message from '../Common/Message'\nimport NoWorkouts from '../Common/NoWorkouts'\nimport WorkoutsFilter from './WorkoutsFilter'\nimport WorkoutsList from './WorkoutsList'\nimport { getOrUpdateData } from '../../actions'\nimport { getMoreWorkouts } from '../../actions/workouts'\n\nclass Workouts extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n params: {\n page: 1,\n per_page: 10,\n },\n }\n }\n\n componentDidMount() {\n this.props.loadWorkouts(this.state.params)\n }\n\n setParams(e) {\n const { params } = this.state\n if (e.target.value === '') {\n delete params[e.target.name]\n } else {\n params[e.target.name] = e.target.value\n }\n params.page = 1\n this.setState(params)\n }\n render() {\n const {\n loading,\n loadWorkouts,\n loadMoreWorkouts,\n message,\n sports,\n t,\n user,\n workouts,\n } = this.props\n const { params } = this.state\n const paginationEnd =\n workouts.length > 0\n ? workouts[workouts.length - 1].previous_workout === null\n : true\n return (\n
\n \n FitTrackee - {t('common:Workouts')}\n \n {message ? (\n \n ) : (\n
\n
\n
\n loadWorkouts(params)}\n t={t}\n updateParams={e => this.setParams(e)}\n />\n
\n
\n \n {!paginationEnd && (\n {\n params.page += 1\n loadMoreWorkouts(params)\n this.setState(params)\n }}\n />\n )}\n {workouts.length === 0 && }\n
\n
\n
\n )}\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n workouts: state.workouts.data,\n loading: state.loading,\n message: state.message,\n sports: state.sports.data,\n user: state.user,\n }),\n dispatch => ({\n loadWorkouts: params => {\n dispatch(getOrUpdateData('getData', 'workouts', params))\n },\n loadMoreWorkouts: params => {\n dispatch(getMoreWorkouts(params))\n },\n })\n )(Workouts)\n)\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport Message from '../Common/Message'\nimport { deletePicture, uploadPicture } from '../../actions/user'\nimport { apiUrl, getFileSize } from '../../utils'\nimport { history } from '../../index'\n\nfunction ProfileDetail({\n appConfig,\n displayModal,\n editable,\n isDeletable,\n message,\n onDeletePicture,\n onUploadPicture,\n pathname,\n t,\n user,\n}) {\n const createdAt = user.created_at\n ? format(new Date(user.created_at), 'dd/MM/yyyy HH:mm')\n : ''\n const birthDate = user.birth_date\n ? format(new Date(user.birth_date), 'dd/MM/yyyy')\n : ''\n const fileSizeLimit = getFileSize(appConfig.max_single_file_size)\n return (\n
\n \n FitTrackee - {t('user:Profile')}\n \n \n
\n

{t('user:Profile')}

\n
\n
\n
\n
\n {user.username}\n
\n
\n
\n
\n

\n {/* eslint-disable-next-line max-len */}\n \n {t('user:Email')}\n : {user.email}\n

\n

\n \n {t('user:Registration Date')}\n \n : {createdAt}\n

\n

\n {t('user:First Name')}\n : {user.first_name}\n

\n

\n {/* eslint-disable-next-line max-len */}\n \n {t('user:Last Name')}\n : {user.last_name}\n

\n

\n {t('user:Birth Date')}\n : {birthDate}\n

\n

\n {/* eslint-disable-next-line max-len */}\n \n {t('user:Location')}\n : {user.location}\n

\n

\n {t('user:Bio')}:{' '}\n {user.bio}\n

\n

\n {/* eslint-disable-next-line max-len */}\n \n {t('user:Language')}\n : {user.language}\n

\n

\n {/* eslint-disable-next-line max-len */}\n \n {t('user:Timezone')}\n : {user.timezone}\n

\n

\n \n {t('user:First day of week')}\n \n : {user.weekm ? t('user:Monday') : t('user:Sunday')}\n

\n
\n
\n {user.picture === true && (\n
\n \n {editable && (\n <>\n
\n onDeletePicture()}\n >\n {t('user:Delete picture')}\n \n
\n
\n \n )}\n
\n )}\n {editable && (\n onUploadPicture(event)}\n >\n \n
\n \n {` (max. size: ${fileSizeLimit})`}\n \n )}{' '}\n
\n
\n {editable && (\n history.push('/profile/edit')}\n >\n {t('common:Edit')}\n \n )}\n {isDeletable && (\n displayModal(true)}\n >\n {t('user:Delete user account')}\n \n )}\n \n pathname === '/profile' ? history.push('/') : history.go(-1)\n }\n >\n {t(\n pathname === '/profile'\n ? 'common:Back to home'\n : 'common:Back'\n )}\n \n
\n
\n
\n
\n
\n
\n )\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n appConfig: state.application.config,\n pathname: state.router.location.pathname,\n message: state.message,\n }),\n dispatch => ({\n onDeletePicture: () => {\n dispatch(deletePicture())\n },\n onUploadPicture: event => {\n dispatch(uploadPicture(event))\n },\n })\n )(ProfileDetail)\n)\n","import React from 'react'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport ProfileDetail from './ProfileDetail'\n\nfunction CurrentUserProfile({ t, user }) {\n return (\n
\n \n
\n )\n}\n\nexport default withTranslation()(\n connect(state => ({\n user: state.user,\n }))(CurrentUserProfile)\n)\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport { recordsLabels } from '../../utils/workouts'\n\nexport default function CalendarWorkout(props) {\n const { isDisabled, isMore, sportImg, workout } = props\n return (\n \n <>\n \n {workout.records.length > 0 && (\n \n \n ` ${\n recordsLabels.filter(\n r => r.record_type === rec.record_type\n )[0].label\n }`\n )}\n />\n \n )}\n \n \n )\n}\n","import React from 'react'\n\nimport CalendarWorkout from './CalendarWorkout'\n\nexport default class CalendarWorkouts extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n isHidden: true,\n }\n }\n\n handleDisplayMore() {\n this.setState({\n isHidden: !this.state.isHidden,\n })\n }\n\n render() {\n const { dayWorkouts, isDisabled, sports } = this.props\n const { isHidden } = this.state\n return (\n
\n {dayWorkouts.map(act => (\n s.id === act.sport_id).map(s => s.img)}\n />\n ))}\n {dayWorkouts.length > 2 && (\n this.handleDisplayMore()}\n title=\"show more workouts\"\n />\n )}\n {!isHidden && (\n
\n {dayWorkouts.map(act => (\n s.id === act.sport_id)\n .map(s => s.img)}\n />\n ))}\n
\n )}\n
\n )\n }\n}\n","// eslint-disable-next-line max-len\n// source: https://blog.flowandform.agency/create-a-custom-calendar-in-react-3df1bfd0b728\nimport {\n addDays,\n addMonths,\n endOfMonth,\n endOfWeek,\n format,\n isSameDay,\n isSameMonth,\n isToday,\n startOfMonth,\n startOfWeek,\n subMonths,\n} from 'date-fns'\nimport { enGB, fr } from 'date-fns/locale'\nimport React from 'react'\nimport { connect } from 'react-redux'\n\nimport CalendarWorkouts from './CalendarWorkouts'\nimport { getMonthWorkouts } from '../../actions/workouts'\nimport { getDateWithTZ } from '../../utils'\n\nconst getStartAndEndMonth = (date, weekStartOnMonday) => {\n const monthStart = startOfMonth(date)\n const monthEnd = endOfMonth(date)\n const weekStartsOn = weekStartOnMonday ? 1 : 0\n return {\n start: startOfWeek(monthStart, { weekStartsOn }),\n end: endOfWeek(monthEnd),\n }\n}\n\nclass Calendar extends React.Component {\n constructor(props, context) {\n super(props, context)\n const calendarDate = new Date()\n this.state = {\n currentMonth: calendarDate,\n startDate: getStartAndEndMonth(calendarDate, props.weekm).start,\n endDate: getStartAndEndMonth(calendarDate, props.weekm).end,\n weekStartOnMonday: props.weekm,\n }\n }\n\n componentDidMount() {\n this.props.loadMonthWorkouts(this.state.startDate, this.state.endDate)\n }\n\n renderHeader(localeOptions) {\n const dateFormat = 'MMM yyyy'\n return (\n
\n
this.handlePrevMonth()}>\n \n
\n
\n \n {format(this.state.currentMonth, dateFormat, localeOptions)}\n \n
\n
this.handleNextMonth()}>\n \n
\n
\n )\n }\n\n renderDays(localeOptions) {\n const dateFormat = 'EEE'\n const days = []\n const { startDate } = this.state\n\n for (let i = 0; i < 7; i++) {\n days.push(\n
\n {format(addDays(startDate, i), dateFormat, localeOptions)}\n
\n )\n }\n return
{days}
\n }\n\n filterWorkouts(day) {\n const { workouts, user } = this.props\n if (workouts) {\n return workouts\n .filter(act =>\n isSameDay(getDateWithTZ(act.workout_date, user.timezone), day)\n )\n .reverse()\n }\n return []\n }\n\n renderCells() {\n const { currentMonth, startDate, endDate, weekStartOnMonday } = this.state\n const { sports } = this.props\n\n const dateFormat = 'd'\n const rows = []\n\n let days = []\n let day = startDate\n let formattedDate = ''\n\n while (day <= endDate) {\n for (let i = 0; i < 7; i++) {\n formattedDate = format(day, dateFormat)\n const dayWorkouts = this.filterWorkouts(day)\n const isDisabled = isSameMonth(day, currentMonth) ? '' : '-disabled'\n const isWeekEnd = weekStartOnMonday\n ? [5, 6].includes(i)\n : [0, 6].includes(i)\n days.push(\n \n
\n {formattedDate}\n \n
\n
\n )\n day = addDays(day, 1)\n }\n rows.push(\n
\n {days}\n
\n )\n days = []\n }\n return
{rows}
\n }\n\n updateStateDate(calendarDate) {\n const { start, end } = getStartAndEndMonth(\n calendarDate,\n this.state.weekStartOnMonday\n )\n this.setState({\n currentMonth: calendarDate,\n startDate: start,\n endDate: end,\n })\n this.props.loadMonthWorkouts(start, end)\n }\n\n handleNextMonth() {\n const calendarDate = addMonths(this.state.currentMonth, 1)\n this.updateStateDate(calendarDate)\n }\n\n handlePrevMonth() {\n const calendarDate = subMonths(this.state.currentMonth, 1)\n this.updateStateDate(calendarDate)\n }\n\n render() {\n const localeOptions = {\n locale: this.props.language === 'fr' ? fr : enGB,\n }\n return (\n
\n
\n {this.renderHeader(localeOptions)}\n {this.renderDays(localeOptions)}\n {this.renderCells()}\n
\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n workouts: state.calendarWorkouts.data,\n language: state.language,\n sports: state.sports.data,\n user: state.user,\n }),\n dispatch => ({\n loadMonthWorkouts: (start, end) => {\n const dateFormat = 'yyyy-MM-dd'\n dispatch(\n getMonthWorkouts(format(start, dateFormat), format(end, dateFormat))\n )\n },\n })\n)(Calendar)\n","import React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport { formatRecord, translateSports } from '../../utils/workouts'\n\nexport default function RecordsCard(props) {\n const { records, sports, t, user } = props\n const translatedSports = translateSports(sports, t)\n const recordsBySport = records.reduce((sportList, record) => {\n const sport = translatedSports.find(s => s.id === record.sport_id)\n if (sportList[sport.label] === void 0) {\n sportList[sport.label] = {\n img: sport.img,\n records: [],\n }\n }\n sportList[sport.label].records.push(formatRecord(record, user.timezone))\n return sportList\n }, {})\n\n return (\n
\n
{t('workouts:Personal records')}
\n
\n {Object.keys(recordsBySport).length === 0\n ? t('common:No records.')\n : Object.keys(recordsBySport)\n .sort()\n .map(sportLabel => (\n
\n \n \n {sportLabel}\n \n {/* eslint-disable-next-line max-len */}\n \n \n \n \n \n \n \n {recordsBySport[sportLabel].records.map(rec => (\n \n \n \n \n \n ))}\n \n
\n \n {sportLabel}\n
\n {t(`workouts:${rec.record_type}`)}\n {rec.value}\n \n {rec.workout_date}\n \n
\n
\n ))}\n
\n
\n )\n}\n","import FitTrackeeGenericApi from '../fitTrackeeApi'\nimport { setData, setError } from './index'\n\nexport const getStats = (userName, type, data) => dispatch =>\n FitTrackeeGenericApi.getData(`stats/${userName}/${type}`, data)\n .then(ret => {\n if (ret.status === 'success') {\n dispatch(setData('statistics', ret.data))\n } else {\n dispatch(setError(`statistics|${ret.message}`))\n }\n })\n .catch(error => dispatch(setError(`statistics|${error}`)))\n","import {\n addDays,\n addMonths,\n addYears,\n format,\n startOfMonth,\n startOfWeek,\n startOfYear,\n} from 'date-fns'\n\nconst xAxisFormats = [\n { duration: 'week', dateFormat: 'yyyy-MM-dd', xAxis: 'dd/MM' },\n { duration: 'month', dateFormat: 'yyyy-MM', xAxis: 'MM/yyyy' },\n { duration: 'year', dateFormat: 'yyyy', xAxis: 'yyyy' },\n]\n\nexport const formatDuration = (totalSeconds, formatWithDay = false) => {\n let days = '0'\n if (formatWithDay) {\n days = String(Math.floor(totalSeconds / 86400))\n totalSeconds %= 86400\n }\n const hours = String(Math.floor(totalSeconds / 3600)).padStart(2, '0')\n totalSeconds %= 3600\n const minutes = String(Math.floor(totalSeconds / 60)).padStart(2, '0')\n const seconds = String(totalSeconds % 60).padStart(2, '0')\n if (formatWithDay) {\n return `${days === '0' ? '' : `${days}d:`}${\n hours === '00' ? '' : `${hours}h:`\n }${minutes}m:${seconds}s`\n }\n return `${hours === '00' ? '' : `${hours}:`}${minutes}:${seconds}`\n}\n\nexport const formatValue = (displayedData, value) =>\n value === 0\n ? ''\n : displayedData === 'distance'\n ? `${value.toFixed(2)} km`\n : displayedData === 'duration'\n ? formatDuration(value)\n : value\n\nconst dateIncrement = (duration, day) => {\n switch (duration) {\n case 'week':\n return addDays(day, 7)\n case 'year':\n return addYears(day, 1)\n case 'month':\n default:\n return addMonths(day, 1)\n }\n}\n\nconst startDate = (duration, day, weekm) => {\n switch (duration) {\n case 'week':\n return startOfWeek(day, { weekStartsOn: weekm ? 1 : 0 })\n case 'year':\n return startOfYear(day)\n case 'month':\n default:\n return startOfMonth(day)\n }\n}\n\nexport const formatStats = (stats, sports, params, displayedSports, weekm) => {\n const nbWorkoutsStats = []\n const distanceStats = []\n const durationStats = []\n\n for (\n let day = startDate(params.duration, params.start, weekm);\n day <= params.end;\n day = dateIncrement(params.duration, day)\n ) {\n const [xAxisFormat] = xAxisFormats.filter(\n x => x.duration === params.duration\n )\n const date = format(day, xAxisFormat.dateFormat)\n const xAxis = format(day, xAxisFormat.xAxis)\n const dataNbWorkouts = { date: xAxis }\n const dataDistance = { date: xAxis }\n const dataDuration = { date: xAxis }\n\n if (stats[date]) {\n Object.keys(stats[date])\n .filter(sportId =>\n displayedSports ? displayedSports.includes(+sportId) : true\n )\n .map(sportId => {\n const sportLabel = sports.filter(s => s.id === +sportId)[0].label\n dataNbWorkouts[sportLabel] = stats[date][sportId].nb_workouts\n dataDistance[sportLabel] = stats[date][sportId].total_distance\n dataDuration[sportLabel] = stats[date][sportId].total_duration\n return null\n })\n }\n nbWorkoutsStats.push(dataNbWorkouts)\n distanceStats.push(dataDistance)\n durationStats.push(dataDuration)\n }\n\n return {\n workouts: nbWorkoutsStats,\n distance: distanceStats,\n duration: durationStats,\n }\n}\n","import React from 'react'\n\nimport { formatDuration } from '../../../utils/stats'\n\nconst formatValue = (displayedData, value) =>\n displayedData === 'duration'\n ? formatDuration(value, true)\n : displayedData === 'distance'\n ? value.toFixed(2)\n : value\n\n/**\n * @return {null}\n */\nexport default function CustomTooltip(props) {\n const { active } = props\n if (active) {\n const { displayedData, payload, label } = props\n let total = 0\n payload.map(p => (total += p.value))\n return (\n
\n

{label}

\n {payload.map(p => (\n

\n {p.name}: {formatValue(displayedData, p.value)} {p.unit}\n

\n ))}\n {payload.length > 0 && (\n

Total: {formatValue(displayedData, total)}

\n )}\n
\n )\n }\n return null\n}\n","import React from 'react'\n\nimport { formatValue } from '../../../utils/stats'\n\n/**\n * @return {null}\n */\nexport default function CustomLabel(props) {\n const { displayedData, x, y, width, value } = props\n if (!value) {\n return null\n }\n const radius = 10\n const formattedValue = formatValue(displayedData, value)\n\n return (\n \n \n {formattedValue}\n \n \n )\n}\n","import React from 'react'\nimport {\n Bar,\n BarChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts'\n\nimport { formatValue } from '../../../utils/stats'\nimport { workoutColors } from '../../../utils/workouts'\nimport CustomTooltip from './CustomTooltip'\nimport CustomLabel from './CustomLabel'\n\nexport default class StatsCharts extends React.PureComponent {\n constructor(props, context) {\n super(props, context)\n this.state = {\n displayedData: 'distance',\n }\n }\n handleRadioChange(changeEvent) {\n this.setState({\n displayedData: changeEvent.target.name,\n })\n }\n\n render() {\n const { displayedData } = this.state\n const { sports, stats, t } = this.props\n if (Object.keys(stats).length === 0) {\n return t('common:No workouts.')\n }\n return (\n
\n
\n \n \n \n
\n \n \n \n formatValue(displayedData, value)} />\n }\n />\n {sports.map((s, i) => (\n \n ) : (\n ''\n )\n }\n name={t(`sports:${s.label}`)}\n />\n ))}\n \n \n
\n )\n }\n}\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { connect } from 'react-redux'\n\nimport { getStats } from '../../../actions/stats'\nimport { formatStats } from '../../../utils/stats'\nimport StatsChart from './StatsChart'\n\nclass Statistics extends React.PureComponent {\n componentDidMount() {\n this.updateData()\n }\n\n componentDidUpdate(prevProps) {\n if (\n (this.props.user.username &&\n this.props.user.username !== prevProps.user.username) ||\n this.props.statsParams !== prevProps.statsParams\n ) {\n this.updateData()\n }\n }\n\n updateData() {\n if (this.props.user.username) {\n this.props.loadWorkouts(\n this.props.user.username,\n this.props.user.weekm,\n this.props.statsParams\n )\n }\n }\n\n render() {\n const {\n displayedSports,\n sports,\n statistics,\n statsParams,\n displayEmpty,\n t,\n user,\n } = this.props\n if (!displayEmpty && Object.keys(statistics).length === 0) {\n return {t('common:No workouts.')}\n }\n const stats = formatStats(\n statistics,\n sports,\n statsParams,\n displayedSports,\n user.weekm\n )\n return \n }\n}\n\nexport default connect(\n state => ({\n sports: state.sports.data,\n statistics: state.statistics.data,\n user: state.user,\n }),\n dispatch => ({\n loadWorkouts: (userName, weekm, data) => {\n const dateFormat = 'yyyy-MM-dd'\n // depends on user config (first day of week)\n const time =\n data.duration === 'week'\n ? `${data.duration}${weekm ? 'm' : ''}`\n : data.duration\n const params = {\n from: format(data.start, dateFormat),\n to: format(data.end, dateFormat),\n time: time,\n }\n dispatch(getStats(userName, data.type, params))\n },\n })\n)(Statistics)\n","import { endOfMonth, startOfMonth } from 'date-fns'\nimport React from 'react'\n\nimport Stats from '../Common/Stats'\n\nexport default class Statistics extends React.Component {\n constructor(props, context) {\n super(props, context)\n const date = new Date()\n this.state = {\n start: startOfMonth(date),\n end: endOfMonth(date),\n duration: 'week',\n type: 'by_time',\n }\n }\n\n render() {\n const { t } = this.props\n return (\n
\n
{t('dashboard:This month')}
\n
\n \n
\n
\n )\n }\n}\n","import React from 'react'\n\nexport default function UserStatistics(props) {\n const { t, user } = props\n const days = user.total_duration.match(/day/g)\n ? `${user.total_duration.split(' ')[0]} ${\n user.total_duration.match(/days/g) ? t('common:days') : t('common:day')\n }`\n : `0 ${t('common:days')},`\n let duration = user.total_duration.match(/day/g)\n ? user.total_duration.split(', ')[1]\n : user.total_duration\n duration = `${duration.split(':')[0]}h ${duration.split(':')[1]}min`\n return (\n
\n
\n
\n
\n
\n \n
\n
\n
{user.nb_workouts}
\n
{`${\n user.nb_workouts === 1\n ? t('common:workout')\n : t('common:workouts')\n }`}
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n {Number(user.total_distance).toFixed(2)}\n
\n
km
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
{days}
\n
{duration}
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
{user.nb_sports}
\n
{`${\n user.nb_sports === 1 ? t('common:sport') : t('common:sports')\n }`}
\n
\n
\n
\n
\n
\n )\n}\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { Link } from 'react-router-dom'\n\nimport StaticMap from '../Common/StaticMap'\nimport { getDateWithTZ } from '../../utils'\n\nexport default function WorkoutCard(props) {\n const { sports, t, user, workout } = props\n\n return (\n
\n
\n \n {sports\n .filter(sport => sport.id === workout.sport_id)\n .map(sport => t(`sports:${sport.label}`))}{' '}\n -{' '}\n {format(\n getDateWithTZ(workout.workout_date, user.timezone),\n 'dd/MM/yyyy HH:mm'\n )}\n \n
\n
\n
\n {workout.map && (\n
\n \n
\n )}\n
\n

\n {' '}\n {t('workouts:Duration')}: {workout.moving}\n {workout.map ? (\n \n
\n
\n
\n ) : (\n ' - '\n )}\n {' '}\n {t('workouts:Distance')}: {workout.distance} km\n

\n
\n
\n
\n
\n )\n}\n","import React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport Calendar from './Calendar'\nimport Message from '../Common/Message'\nimport NoWorkouts from '../Common/NoWorkouts'\nimport Records from './Records'\nimport Statistics from './Statistics'\nimport UserStatistics from './UserStatistics'\nimport WorkoutCard from './WorkoutCard'\nimport { getOrUpdateData } from '../../actions'\nimport { getMoreWorkouts } from '../../actions/workouts'\n\nclass DashBoard extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n page: 1,\n }\n }\n\n componentDidMount() {\n this.props.loadWorkouts()\n }\n\n render() {\n const {\n loadMoreWorkouts,\n message,\n records,\n sports,\n t,\n user,\n workouts,\n } = this.props\n const paginationEnd =\n workouts.length > 0\n ? workouts[workouts.length - 1].previous_workout === null\n : true\n const { page } = this.state\n return (\n
\n \n FitTrackee - {t('common:Dashboard')}\n \n {message ? (\n \n ) : (\n workouts &&\n user.total_duration &&\n sports.length > 0 && (\n
\n \n
\n
\n \n \n
\n
\n \n {workouts.length > 0 ? (\n workouts.map(workout => (\n \n ))\n ) : (\n \n )}\n {!paginationEnd && (\n {\n loadMoreWorkouts(page + 1)\n this.setState({ page: page + 1 })\n }}\n />\n )}\n
\n
\n
\n )\n )}\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n workouts: state.workouts.data,\n message: state.message,\n records: state.records.data,\n sports: state.sports.data,\n user: state.user,\n }),\n dispatch => ({\n loadWorkouts: () => {\n dispatch(getOrUpdateData('getData', 'workouts', { page: 1 }))\n dispatch(getOrUpdateData('getData', 'records'))\n },\n loadMoreWorkouts: page => {\n dispatch(getMoreWorkouts({ page }))\n },\n })\n )(DashBoard)\n)\n","import React from 'react'\n\nimport { version } from './../../utils'\n\nexport default function Footer() {\n return (\n
\n
\n FitTrackee v{version} -{' '}\n \n source code\n {' '}\n under{' '}\n \n GPLv3\n {' '}\n license -{' '}\n \n documentation\n \n
\n
\n )\n}\n","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _g, _path9, _path10, _path11, _path12;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgEn(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n enableBackground: \"new 0 0 512 512\",\n height: 512,\n viewBox: \"0 0 512 512\",\n width: 512,\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m466.916 27.803h-421.832c-24.859 0-45.084 20.225-45.084 45.084v366.226c0 24.859 20.225 45.084 45.084 45.084h421.832c24.859 0 45.084-20.225 45.084-45.084v-366.226c0-24.859-20.225-45.084-45.084-45.084z\",\n fill: \"#f0f9ff\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m198.58 188.334-181.344-150.862c-7.75 6.107-13.456 14.691-15.905 24.554l164.142 136.551h33.102z\",\n fill: \"#f40055\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m313.425 198.576h33.93l163.447-135.973c-2.325-9.923-7.93-18.592-15.613-24.796l-181.764 151.211z\",\n fill: \"#c20044\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m165.472 313.425-164.141 136.549c2.449 9.863 8.155 18.447 15.905 24.553l181.344-150.861-.005-10.241z\",\n fill: \"#f40055\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m313.425 313.425v9.557l181.765 151.211c7.683-6.204 13.288-14.874 15.613-24.796l-163.446-135.971z\",\n fill: \"#c20044\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m53.273 27.803 145.302 120.879v-120.879z\",\n fill: \"#406bd4\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m313.425 150.571v-122.768h148.082z\",\n fill: \"#3257b0\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m394.732 198.575 117.268-97.556v97.556z\",\n fill: \"#3257b0\"\n })), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n fill: \"#406bd4\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"m0 99.317v99.258h119.313z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m0 313.425v97.699l117.44-97.699z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"m50.49 484.197 148.085-122.676v122.676z\"\n }))), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m313.425 484.197v-124.139l149.221 124.139z\",\n fill: \"#3257b0\"\n })), _path10 || (_path10 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m512 409.423-115.395-95.998h115.395z\",\n fill: \"#3257b0\"\n })), _path11 || (_path11 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m512 222.142h-222.142v-194.339h-67.716v194.339h-222.142v67.716h222.142v194.339h67.716v-194.339h222.142z\",\n fill: \"#f40055\"\n })), _path12 || (_path12 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m289.858 222.142v-194.339h-33.858v456.394h33.858v-194.339h222.142v-67.716z\",\n fill: \"#c20044\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgEn);\nexport default __webpack_public_path__ + \"static/media/en.9e6dbfb0.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react'\nimport { Trans } from 'react-i18next'\nimport { connect } from 'react-redux'\nimport { Link } from 'react-router-dom'\n\nimport { logout } from '../../actions/user'\n\nclass Logout extends React.Component {\n componentDidMount() {\n this.props.UserLogout()\n }\n render() {\n return (\n
\n
\n
\n
\n
\n
\n \n You are now logged out. Click here to\n log back in.\n \n
\n
\n
\n
\n
\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n user: state.user,\n }),\n dispatch => ({\n UserLogout: () => {\n dispatch(logout())\n },\n })\n)(Logout)\n","var _path, _path2, _path3, _path4;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgFr(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n enableBackground: \"new 0 0 512 512\",\n height: 512,\n viewBox: \"0 0 512 512\",\n width: 512,\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m173.899 31.804h-8.707l-4.397-4h-115.711c-24.859-.001-45.084 20.224-45.084 45.083v366.226c0 24.859 20.225 45.084 45.084 45.084h115.711l6.348-4h6.755v-448.393z\",\n fill: \"#406bd4\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m466.916 27.803h-115.711l-4.523 4h-5.141v448.393h4.141l5.523 4h115.711c24.859 0 45.084-20.225 45.084-45.084v-366.225c0-24.859-20.225-45.084-45.084-45.084z\",\n fill: \"#c20044\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m160.795 27.803h190.409v456.394h-190.409z\",\n fill: \"#f0f9ff\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m256 27.803h95.205v456.394h-95.205z\",\n fill: \"#cee5f5\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgFr);\nexport default __webpack_public_path__ + \"static/media/fr.d0f9280c.svg\";\nexport { ForwardRef as ReactComponent };","var _g, _g2, _g3, _g4, _g5, _g6, _g7;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgPassword(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Layer_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 512.001 512.001\",\n style: {\n enableBackground: \"new 0 0 512.001 512.001\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M468.683,287.265h-69.07c-4.147,0-7.508,3.361-7.508,7.508c0,4.147,3.361,7.508,7.508,7.508h69.07 c4.147,0,7.508-3.361,7.508-7.508C476.191,290.626,472.83,287.265,468.683,287.265z\"\n })))), _g2 || (_g2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M105.012,268.377L85.781,256l19.231-12.376c3.487-2.243,4.495-6.888,2.251-10.376c-2.244-3.486-6.888-4.497-10.376-2.25 l-17.471,11.243v-20.776c0-4.147-3.361-7.508-7.508-7.508c-4.147,0-7.508,3.361-7.508,7.508v20.775l-17.47-11.243 c-3.486-2.245-8.132-1.238-10.376,2.25c-2.245,3.487-1.237,8.133,2.25,10.376L58.034,256l-19.231,12.376 c-3.487,2.244-4.495,6.889-2.25,10.376c1.435,2.23,3.852,3.446,6.32,3.446c1.391,0,2.799-0.386,4.056-1.196l17.47-11.243v20.775 c0,4.147,3.361,7.508,7.508,7.508c4.147,0,7.508-3.361,7.508-7.508V269.76l17.471,11.243c1.257,0.809,2.664,1.196,4.056,1.196 c2.467,0,4.885-1.216,6.32-3.446C109.507,275.266,108.499,270.62,105.012,268.377z\"\n })))), _g3 || (_g3 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M194.441,268.377L175.21,256l19.231-12.376c3.487-2.244,4.495-6.889,2.25-10.376c-2.245-3.486-6.888-4.497-10.376-2.25 l-17.47,11.243v-20.775c0-4.147-3.361-7.508-7.508-7.508c-4.147,0-7.508,3.361-7.508,7.508v20.776l-17.471-11.243 c-3.487-2.245-8.133-1.238-10.376,2.25c-2.245,3.487-1.237,8.133,2.25,10.376L147.463,256l-19.231,12.376 c-3.487,2.244-4.495,6.889-2.25,10.376c1.435,2.23,3.852,3.446,6.32,3.446c1.391,0,2.799-0.386,4.056-1.196l17.471-11.243v20.776 c0,4.147,3.361,7.508,7.508,7.508c4.147,0,7.508-3.361,7.508-7.508V269.76l17.47,11.243c1.257,0.809,2.664,1.196,4.056,1.196 c2.467,0,4.885-1.216,6.32-3.446C198.936,275.266,197.928,270.62,194.441,268.377z\"\n })))), _g4 || (_g4 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M283.871,268.377L264.64,256l19.231-12.376c3.487-2.243,4.495-6.888,2.251-10.376c-2.245-3.486-6.888-4.497-10.376-2.25 l-17.471,11.243v-20.775c0-4.147-3.361-7.508-7.508-7.508c-4.147,0-7.508,3.361-7.508,7.508v20.775l-17.471-11.243 c-3.486-2.245-8.134-1.238-10.376,2.25c-2.245,3.487-1.237,8.133,2.25,10.376L236.892,256l-19.231,12.376 c-3.487,2.244-4.495,6.889-2.25,10.376c1.435,2.23,3.852,3.446,6.32,3.446c1.391,0,2.799-0.386,4.056-1.196l17.471-11.243v20.775 c0,4.147,3.361,7.508,7.508,7.508c4.147,0,7.508-3.361,7.508-7.508V269.76l17.471,11.243c1.257,0.809,2.664,1.196,4.056,1.196 c2.467,0,4.886-1.216,6.32-3.446C288.366,275.266,287.358,270.62,283.871,268.377z\"\n })))), _g5 || (_g5 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M373.3,268.377L354.069,256l19.231-12.376c3.487-2.244,4.495-6.889,2.25-10.376c-2.244-3.486-6.888-4.497-10.376-2.25 l-17.471,11.243v-20.776c0-4.147-3.361-7.508-7.508-7.508c-4.147,0-7.508,3.361-7.508,7.508v20.775l-17.47-11.243 c-3.486-2.245-8.132-1.238-10.376,2.25c-2.245,3.487-1.237,8.133,2.25,10.376L326.322,256l-19.231,12.376 c-3.487,2.244-4.495,6.889-2.25,10.376c1.435,2.23,3.852,3.446,6.32,3.446c1.391,0,2.799-0.386,4.056-1.196l17.47-11.243v20.776 c0,4.147,3.361,7.508,7.508,7.508c4.147,0,7.508-3.361,7.508-7.508V269.76l17.471,11.243c1.257,0.809,2.664,1.196,4.056,1.196 c2.467,0,4.885-1.216,6.32-3.446C377.795,275.266,376.787,270.62,373.3,268.377z\"\n })))), _g6 || (_g6 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M271.792,330.359H15.016V181.642h93.1c4.147,0,7.508-3.361,7.508-7.508c0-4.147-3.361-7.508-7.508-7.508H12.513 C5.613,166.626,0,172.24,0,179.14v153.722c0,6.9,5.613,12.513,12.513,12.513h259.278c4.147,0,7.508-3.361,7.508-7.508 C279.299,333.72,275.939,330.359,271.792,330.359z\"\n })))), _g7 || (_g7 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M499.487,166.626H162.174c-4.147,0-7.508,3.361-7.508,7.508c0,4.147,3.361,7.508,7.508,7.508h334.811v148.716H323.848 c-4.147,0-7.508,3.361-7.508,7.508c0,4.147,3.361,7.508,7.508,7.508h175.64c6.9,0,12.513-5.613,12.513-12.513V179.14 C512.001,172.24,506.387,166.626,499.487,166.626z\"\n })))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgPassword);\nexport default __webpack_public_path__ + \"static/media/password.afe6a2a5.svg\";\nexport { ForwardRef as ReactComponent };","import React, { Component } from 'react'\nimport { connect } from 'react-redux'\n\nimport { ReactComponent as EnFlag } from '../../images/flags/en.svg'\nimport { ReactComponent as FrFlag } from '../../images/flags/fr.svg'\nimport { updateLanguage } from '../../actions/index'\n\nexport const languages = [\n {\n name: 'en',\n selected: true,\n flag: ,\n },\n {\n name: 'fr',\n selected: false,\n flag: ,\n },\n]\n\nclass Dropdown extends Component {\n constructor(props) {\n super(props)\n this.state = {\n isOpen: false,\n }\n }\n\n toggleDropdown() {\n this.setState(prevState => ({\n isOpen: !prevState.isOpen,\n }))\n }\n\n render() {\n const { isOpen } = this.state\n const { language: selected, onUpdateLanguage } = this.props\n return (\n
this.toggleDropdown()}>\n
    \n {languages\n .filter(language =>\n isOpen ? language : language.name === selected\n )\n .map(language => (\n onUpdateLanguage(language.name, selected)}\n >\n {language.flag} {language.name}\n \n ))}\n
\n
\n )\n }\n}\n\nexport default connect(\n state => ({\n language: state.language,\n }),\n dispatch => ({\n onUpdateLanguage: (lang, selected) => {\n if (lang !== selected) {\n dispatch(updateLanguage(lang))\n }\n },\n })\n)(Dropdown)\n","import React from 'react'\nimport { connect } from 'react-redux'\nimport { withTranslation } from 'react-i18next'\nimport { Link } from 'react-router-dom'\n\nimport LanguageDropdown from './LanguageDropdown'\nimport { apiUrl } from '../../utils'\n\nclass NavBar extends React.PureComponent {\n render() {\n const { admin, isAuthenticated, picture, t, username } = this.props\n return (\n
\n
\n \n \n )\n }\n}\n\nexport default withTranslation()(\n connect(({ user }) => ({\n admin: user.admin,\n isAuthenticated: user.isAuthenticated,\n picture: user.picture,\n username: user.username,\n }))(NavBar)\n)\n","var _g;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgMailSend(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, [\"title\", \"titleId\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 345.834 345.834\",\n style: {\n enableBackground: \"new 0 0 345.834 345.834\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084 c0.125-0.038,0.247-0.085,0.369-0.129c0.108-0.039,0.217-0.074,0.324-0.119c0.115-0.048,0.226-0.104,0.338-0.157 c0.109-0.052,0.22-0.1,0.327-0.158c0.107-0.057,0.208-0.122,0.312-0.184c0.107-0.064,0.215-0.124,0.319-0.194 c0.111-0.074,0.214-0.156,0.321-0.236c0.09-0.067,0.182-0.13,0.27-0.202c0.162-0.133,0.316-0.275,0.466-0.421 c0.027-0.026,0.056-0.048,0.083-0.075c0.028-0.028,0.052-0.059,0.079-0.088c0.144-0.148,0.284-0.3,0.416-0.46 c0.077-0.094,0.144-0.192,0.216-0.289c0.074-0.1,0.152-0.197,0.221-0.301c0.074-0.111,0.139-0.226,0.207-0.34 c0.057-0.096,0.118-0.19,0.171-0.289c0.062-0.115,0.114-0.234,0.169-0.351c0.049-0.104,0.101-0.207,0.146-0.314 c0.048-0.115,0.086-0.232,0.128-0.349c0.041-0.114,0.085-0.227,0.12-0.343c0.036-0.118,0.062-0.238,0.092-0.358 c0.029-0.118,0.063-0.234,0.086-0.353c0.028-0.141,0.045-0.283,0.065-0.425c0.014-0.1,0.033-0.199,0.043-0.3 c0.025-0.249,0.038-0.498,0.038-0.748V92.76c0-4.143-3.357-7.5-7.5-7.5h-236.25c-0.066,0-0.13,0.008-0.196,0.01 c-0.143,0.004-0.285,0.01-0.427,0.022c-0.113,0.009-0.225,0.022-0.337,0.037c-0.128,0.016-0.255,0.035-0.382,0.058 c-0.119,0.021-0.237,0.046-0.354,0.073c-0.119,0.028-0.238,0.058-0.356,0.092c-0.117,0.033-0.232,0.069-0.346,0.107 c-0.117,0.04-0.234,0.082-0.349,0.128c-0.109,0.043-0.216,0.087-0.322,0.135c-0.118,0.053-0.235,0.11-0.351,0.169 c-0.099,0.051-0.196,0.103-0.292,0.158c-0.116,0.066-0.23,0.136-0.343,0.208c-0.093,0.06-0.184,0.122-0.274,0.185 c-0.106,0.075-0.211,0.153-0.314,0.235c-0.094,0.075-0.186,0.152-0.277,0.231c-0.09,0.079-0.179,0.158-0.266,0.242 c-0.099,0.095-0.194,0.194-0.288,0.294c-0.047,0.05-0.097,0.094-0.142,0.145c-0.027,0.03-0.048,0.063-0.074,0.093 c-0.094,0.109-0.182,0.223-0.27,0.338c-0.064,0.084-0.13,0.168-0.19,0.254c-0.078,0.112-0.15,0.227-0.222,0.343 c-0.059,0.095-0.12,0.189-0.174,0.286c-0.063,0.112-0.118,0.227-0.175,0.342c-0.052,0.105-0.106,0.21-0.153,0.317 c-0.049,0.113-0.092,0.23-0.135,0.345c-0.043,0.113-0.087,0.225-0.124,0.339c-0.037,0.115-0.067,0.232-0.099,0.349 c-0.032,0.12-0.066,0.239-0.093,0.36c-0.025,0.113-0.042,0.228-0.062,0.342c-0.022,0.13-0.044,0.26-0.06,0.39 c-0.013,0.108-0.019,0.218-0.027,0.328c-0.01,0.14-0.019,0.28-0.021,0.421c-0.001,0.041-0.006,0.081-0.006,0.122v46.252 c0,4.143,3.357,7.5,7.5,7.5s7.5-3.357,7.5-7.5v-29.595l66.681,59.037c-0.348,0.245-0.683,0.516-0.995,0.827l-65.687,65.687v-49.288 c0-4.143-3.357-7.5-7.5-7.5s-7.5,3.357-7.5,7.5v9.164h-38.75c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5,7.5,7.5h38.75v43.231 c0,4.143,3.357,7.5,7.5,7.5h236.25c0.247,0,0.494-0.013,0.74-0.037c0.115-0.011,0.226-0.033,0.339-0.049 C339.542,260.469,339.67,260.454,339.798,260.429z M330.834,234.967l-65.688-65.687c-0.042-0.042-0.087-0.077-0.13-0.117 l49.383-41.897c3.158-2.68,3.546-7.412,0.866-10.571c-2.678-3.157-7.41-3.547-10.571-0.866l-84.381,71.59l-98.444-87.158h208.965 V234.967z M185.878,179.888c0.535-0.535,0.969-1.131,1.308-1.765l28.051,24.835c1.418,1.255,3.194,1.885,4.972,1.885 c1.726,0,3.451-0.593,4.853-1.781l28.587-24.254c0.26,0.38,0.553,0.743,0.89,1.08l65.687,65.687H120.191L185.878,179.888z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.5,170.676h126.667c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H7.5c-4.143,0-7.5,3.357-7.5,7.5 S3.357,170.676,7.5,170.676z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.625,129.345H77.5c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H20.625c-4.143,0-7.5,3.357-7.5,7.5 S16.482,129.345,20.625,129.345z\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M62.5,226.51h-55c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5,7.5,7.5h55c4.143,0,7.5-3.357,7.5-7.5S66.643,226.51,62.5,226.51z\"\n }))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgMailSend);\nexport default __webpack_public_path__ + \"static/media/mail-send.619079f0.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { Link } from 'react-router-dom'\n\nimport { ReactComponent as Password } from '../../images/password.svg'\nimport { ReactComponent as MailSend } from '../../images/mail-send.svg'\n\nexport default function PasswordReset(props) {\n const { t } = useTranslation()\n const { action } = props\n return (\n
\n
\n
\n
\n
\n
\n {action === 'sent' && (\n <>\n
\n \n
\n {t(\n // eslint-disable-next-line max-len\n \"user:Check your email. If your address is in our database, you'll received an email with a link to reset your password.\"\n )}\n \n )}\n {action === 'updated' && (\n <>\n
\n \n
\n \n {/* prettier-ignore */}\n Your password have been updated. Click\n here to log in.\n \n \n )}\n
\n
\n
\n
\n
\n
\n )\n}\n","import { format } from 'date-fns'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\nimport TimezonePicker from 'react-timezone'\n\nimport Message from '../Common/Message'\nimport { deleteUser, handleProfileFormSubmit } from '../../actions/user'\nimport { history } from '../../index'\nimport { languages } from '../NavBar/LanguageDropdown'\nimport CustomModal from '../Common/CustomModal'\n\nclass ProfileEdit extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n formData: {},\n displayModal: false,\n }\n }\n\n componentDidMount() {\n this.initForm()\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.user !== this.props.user) {\n this.initForm()\n }\n }\n\n initForm() {\n const { user } = this.props\n const formData = {}\n Object.keys(user).map(k =>\n user[k] === null\n ? (formData[k] = '')\n : k === 'birth_date'\n ? (formData[k] = format(new Date(user[k]), 'yyyy-MM-DD'))\n : (formData[k] = user[k])\n )\n this.setState({ formData })\n }\n\n handleFormChange(e) {\n const { formData } = this.state\n if (e.target.name === 'weekm') {\n formData.weekm = e.target.value === 'Monday'\n } else {\n formData[e.target.name] = e.target.value\n }\n this.setState(formData)\n }\n\n displayModal(value) {\n this.setState(prevState => ({\n ...prevState,\n displayModal: value,\n }))\n }\n\n render() {\n const {\n message,\n onDeleteUser,\n onHandleProfileFormSubmit,\n t,\n user,\n } = this.props\n const { displayModal, formData } = this.state\n return (\n
\n \n FitTrackee - {t('user:Profile Edition')}\n \n {formData.isAuthenticated && (\n
\n {displayModal && (\n {\n onDeleteUser(user.username)\n this.displayModal(false)\n }}\n close={() => this.displayModal(false)}\n />\n )}\n

{t('user:Profile Edition')}

\n
\n
\n
\n
\n
{user.username}
\n
\n
\n
\n {\n event.preventDefault()\n onHandleProfileFormSubmit(formData)\n }}\n >\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n \n {\n event.preventDefault()\n this.displayModal(true)\n }}\n >\n {t('user:Delete my account')}\n \n history.push('/profile')}\n >\n {t('common:Cancel')}\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n )}\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n location: state.router.location,\n message: state.message,\n user: state.user,\n }),\n dispatch => ({\n onDeleteUser: username => {\n dispatch(deleteUser(username))\n },\n onHandleProfileFormSubmit: formData => {\n dispatch(handleProfileFormSubmit(formData))\n },\n })\n )(ProfileEdit)\n)\n","import {\n endOfMonth,\n endOfWeek,\n endOfYear,\n startOfMonth,\n startOfYear,\n startOfWeek,\n addMonths,\n addWeeks,\n addYears,\n subMonths,\n subWeeks,\n subYears,\n} from 'date-fns'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport NoWorkouts from '../Common/NoWorkouts'\nimport Stats from '../Common/Stats'\nimport { workoutColors, translateSports } from '../../utils/workouts'\n\nconst durations = ['week', 'month', 'year']\n\nclass Statistics extends React.Component {\n constructor(props, context) {\n super(props, context)\n const date = new Date()\n this.state = {\n displayedSports: props.sports.map(sport => sport.id),\n statsParams: {\n start: startOfMonth(subMonths(date, 11)),\n end: endOfMonth(date),\n duration: 'month',\n type: 'by_time',\n },\n }\n }\n\n componentDidUpdate(prevProps) {\n if (this.props.sports !== prevProps.sports) {\n this.updateDisplayedSports()\n }\n }\n\n updateDisplayedSports() {\n const { sports } = this.props\n this.setState({ displayedSports: sports.map(sport => sport.id) })\n }\n\n handleOnChangeDuration(e) {\n const duration = e.target.name\n\n const date = new Date()\n const start =\n duration === 'year'\n ? startOfYear(subYears(date, 9))\n : duration === 'week'\n ? startOfMonth(subMonths(date, 2))\n : startOfMonth(subMonths(date, 11))\n const end =\n duration === 'year'\n ? endOfYear(date)\n : duration === 'week'\n ? endOfWeek(date)\n : endOfMonth(date)\n this.setState({ statsParams: { duration, end, start, type: 'by_time' } })\n }\n\n handleOnChangeSports(sportId) {\n const { displayedSports } = this.state\n if (displayedSports.includes(sportId)) {\n this.setState({\n displayedSports: displayedSports.filter(s => s !== sportId),\n })\n } else {\n this.setState({ displayedSports: displayedSports.concat([sportId]) })\n }\n }\n\n handleOnClickArrows(forward) {\n const { start, end, duration } = this.state.statsParams\n let newStart, newEnd\n if (forward) {\n newStart =\n duration === 'year'\n ? startOfYear(subYears(start, 1))\n : duration === 'week'\n ? startOfWeek(subWeeks(start, 1))\n : startOfMonth(subMonths(start, 1))\n newEnd =\n duration === 'year'\n ? endOfYear(subYears(end, 1))\n : duration === 'week'\n ? endOfWeek(subWeeks(end, 1))\n : endOfMonth(subMonths(end, 1))\n } else {\n newStart =\n duration === 'year'\n ? startOfYear(addYears(start, 1))\n : duration === 'week'\n ? startOfWeek(addWeeks(start, 1))\n : startOfMonth(addMonths(start, 1))\n newEnd =\n duration === 'year'\n ? endOfYear(addYears(end, 1))\n : duration === 'week'\n ? endOfWeek(addWeeks(end, 1))\n : endOfMonth(addMonths(end, 1))\n }\n this.setState({\n statsParams: { duration, end: newEnd, start: newStart, type: 'by_time' },\n })\n }\n\n render() {\n const { displayedSports, statsParams } = this.state\n const { sports, t, user } = this.props\n const translatedSports = translateSports(\n sports.filter(sport => user.sports_list.includes(sport.id)),\n t\n )\n return (\n <>\n \n FitTrackee - {t('statistics:Statistics')}\n \n
\n
\n
{t('statistics:Statistics')}
\n \n
\n
\n

\n this.handleOnClickArrows(true)}\n />\n

\n
\n
\n {durations.map(d => (\n
\n \n
\n ))}\n
\n
\n

\n this.handleOnClickArrows(false)}\n />\n

\n
\n
\n \n
\n {translatedSports.map(sport => (\n \n ))}\n
\n
\n
\n {user.nb_workouts === 0 && }\n
\n \n )\n }\n}\n\nexport default withTranslation()(\n connect(state => ({\n sports: state.sports.data,\n user: state.user,\n }))(Statistics)\n)\n","import React from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { Helmet } from 'react-helmet'\nimport { Link } from 'react-router-dom'\n\nimport { history } from '../../index'\n\nexport default function Form(props) {\n const { t } = useTranslation()\n const pageTitle = `user:${props.formType\n .charAt(0)\n .toUpperCase()}${props.formType.slice(1)}`\n return (\n
\n \n FitTrackee - {t(`user:${props.formType}`)}\n \n

{t(pageTitle)}

\n
\n
\n
\n
\n
\n {props.formType === 'register' && !props.isRegistrationAllowed ? (\n
\n
Registration is disabled.
\n
\n history.go(-1)}\n >\n Back\n \n
\n
\n ) : (\n <>\n \n props.handleUserFormSubmit(event, props.formType)\n }\n >\n {props.formType === 'register' && (\n
\n \n
\n )}\n {props.formType !== 'password reset' && (\n
\n \n
\n )}\n {props.formType !== 'reset your password' && (\n <>\n
\n \n
\n {props.formType !== 'login' && (\n
\n \n
\n )}\n \n )}\n \n \n

\n {props.formType === 'login' && (\n \n {t('user:Forgot password?')}\n \n )}\n

\n \n )}\n
\n
\n
\n
\n
\n )\n}\n","import React from 'react'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\nimport { Redirect } from 'react-router-dom'\n\nimport Form from './Form'\nimport Message from '../Common/Message'\nimport { handleUserFormSubmit } from '../../actions/user'\nimport { isLoggedIn } from '../../utils'\n\nclass UserForm extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n formData: {\n username: '',\n email: '',\n password: '',\n password_conf: '',\n },\n }\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.location.pathname !== this.props.location.pathname) {\n this.emptyForm()\n }\n }\n\n emptyForm() {\n const { formData } = this.state\n Object.keys(formData).map(k => (formData[k] = ''))\n this.setState(formData)\n }\n\n onHandleFormChange(e) {\n const { formData } = this.state\n formData[e.target.name] = e.target.value\n this.setState(formData)\n }\n\n render() {\n const {\n formType,\n isRegistrationAllowed,\n message,\n messages,\n onHandleUserFormSubmit,\n t,\n } = this.props\n const { formData } = this.state\n const { token } = this.props.location.query\n return (\n
\n {isLoggedIn() || (formType === 'password reset' && !token) ? (\n \n ) : (\n
\n \n this.onHandleFormChange(event)}\n handleUserFormSubmit={event => {\n event.preventDefault()\n if (formType === 'password reset') {\n formData.token = token\n }\n onHandleUserFormSubmit(formData, formType)\n }}\n />\n
\n )}\n
\n )\n }\n}\nexport default withTranslation()(\n connect(\n state => ({\n isRegistrationAllowed: state.application.config.is_registration_enabled,\n location: state.router.location,\n message: state.message,\n messages: state.messages,\n }),\n dispatch => ({\n onHandleUserFormSubmit: (formData, formType) => {\n formType =\n formType === 'password reset'\n ? 'password/update'\n : formType === 'reset your password'\n ? 'password/reset-request'\n : formType\n dispatch(handleUserFormSubmit(formData, formType))\n },\n })\n )(UserForm)\n)\n","import React from 'react'\nimport { withTranslation } from 'react-i18next'\nimport { connect } from 'react-redux'\n\nimport CustomModal from '../Common/CustomModal'\nimport ProfileDetail from './ProfileDetail'\nimport { getOrUpdateData } from '../../actions'\nimport { deleteUser } from '../../actions/user'\n\nclass UserProfile extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.state = {\n displayModal: false,\n }\n }\n\n componentDidMount() {\n this.props.loadUser(this.props.match.params.userName)\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.match.params.userName !== this.props.match.params.userName) {\n this.props.loadUser(this.props.match.params.userName)\n }\n }\n\n displayModal(value) {\n this.setState(prevState => ({\n ...prevState,\n displayModal: value,\n }))\n }\n\n render() {\n const { t, currentUser, onDeleteUser, users } = this.props\n const { displayModal } = this.state\n const [user] = users\n const editable = user ? currentUser.username === user.username : false\n return (\n
\n {displayModal && (\n {\n onDeleteUser(user.username)\n this.displayModal(false)\n }}\n close={() => this.displayModal(false)}\n />\n )}\n {user && (\n this.displayModal(e)}\n t={t}\n user={user}\n />\n )}\n
\n )\n }\n}\n\nexport default withTranslation()(\n connect(\n state => ({\n currentUser: state.user,\n users: state.users.data,\n }),\n dispatch => ({\n onDeleteUser: username => {\n dispatch(deleteUser(username, true))\n },\n loadUser: userName => {\n dispatch(getOrUpdateData('getData', 'users', { username: userName }))\n },\n })\n )(UserProfile)\n)\n","import React from 'react'\nimport { connect } from 'react-redux'\nimport { Route, Switch } from 'react-router-dom'\n\nimport './App.css'\nimport Admin from './Admin'\nimport Workout from './Workout'\nimport Workouts from './Workouts'\nimport CurrentUserProfile from './User/CurrentUserProfile'\nimport Dashboard from './Dashboard'\nimport Footer from './Footer'\nimport Logout from './User/Logout'\nimport NavBar from './NavBar'\nimport NotFound from './Others/NotFound'\nimport PasswordReset from './User/PasswordReset'\nimport ProfileEdit from './User/ProfileEdit'\nimport Statistics from './Statistics'\nimport UserForm from './User/UserForm'\nimport UserProfile from './User/UserProfile'\nimport { getAppData } from '../actions/application'\n\nclass App extends React.Component {\n constructor(props) {\n super(props)\n this.props = props\n }\n componentDidMount() {\n this.props.loadAppConfig()\n }\n\n render() {\n return (\n
\n \n \n \n }\n />\n }\n />\n }\n />\n }\n />\n }\n />\n }\n />\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n )\n }\n}\nexport default connect(\n () => ({}),\n dispatch => ({\n loadAppConfig: () => {\n dispatch(getAppData('config'))\n },\n })\n)(App)\n","import React from 'react'\nimport { Provider } from 'react-redux'\nimport { ConnectedRouter } from 'connected-react-router'\n\nexport default function Root({ store, history, children }) {\n return (\n \n {children}\n \n )\n}\n","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n)\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location)\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets;\n // see https://github.com/facebookincubator/create-react-app/issues/2374\n return\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`\n\n if (isLocalhost) {\n // This is running on localhost.\n // Lets check if a service worker still exists or not.\n checkValidServiceWorker(swUrl)\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl)\n }\n })\n }\n}\n\nfunction registerValidSW(swUrl) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n // eslint-disable-next-line no-console\n console.log('New content is available; please refresh.')\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n // eslint-disable-next-line no-console\n console.log('Content is cached for offline use.')\n }\n }\n }\n }\n })\n .catch(error => {\n console.error('Error during service worker registration:', error)\n })\n}\n\nfunction checkValidServiceWorker(swUrl) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').indexOf('javascript') === -1\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload()\n })\n })\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl)\n }\n })\n .catch(() => {\n // eslint-disable-next-line no-console\n console.log(\n 'No internet connection found. App is running in offline mode.'\n )\n })\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister()\n })\n }\n}\n","const emptyData = {\n data: [],\n}\n\nexport default {\n language: 'en',\n message: '',\n messages: [],\n user: {\n isAuthenticated: false,\n },\n workouts: {\n ...emptyData,\n },\n application: {\n statistics: {},\n config: {\n gpx_limit_import: null,\n is_registration_enabled: null,\n max_single_file_size: null,\n max_users: null,\n max_zip_file_size: null,\n registration: null,\n },\n },\n calendarWorkouts: {\n ...emptyData,\n },\n chartData: [],\n // check if storing gpx content is OK\n gpx: null,\n loading: false,\n records: {\n ...emptyData,\n },\n sports: {\n ...emptyData,\n },\n statistics: {\n data: {},\n },\n users: {\n ...emptyData,\n },\n}\n","const routesWithoutAuthentication = [\n '/login',\n '/register',\n '/password-reset',\n '/password-reset/request',\n '/password-reset/sent',\n '/updated-password',\n]\n\nconst updatePath = (toPath, newPath) => {\n if (typeof toPath === 'string' || toPath instanceof String) {\n toPath = newPath\n } else {\n toPath.pathname = newPath\n }\n return toPath\n}\n\nconst pathInterceptor = toPath => {\n if (\n !window.localStorage.authToken &&\n !routesWithoutAuthentication.includes(toPath.pathname)\n ) {\n toPath = updatePath(toPath, '/login')\n }\n if (\n window.localStorage.authToken &&\n routesWithoutAuthentication.includes(toPath.pathname)\n ) {\n toPath = updatePath(toPath, '/')\n }\n return toPath\n}\n\nexport const historyEnhancer = originalHistory => {\n originalHistory.location = pathInterceptor(originalHistory.location)\n return {\n ...originalHistory,\n push: (path, ...args) =>\n originalHistory.push(pathInterceptor(path), ...args),\n replace: (path, ...args) =>\n originalHistory.replace(pathInterceptor(path), ...args),\n }\n}\n","import { connectRouter } from 'connected-react-router'\nimport { combineReducers } from 'redux'\n\nimport initial from './initial'\n\nconst handleDataAndError = (state, type, action) => {\n if (action.target !== type) {\n return state\n }\n if (action.type === 'SET_DATA') {\n return {\n ...state,\n data: action.data[action.target],\n }\n }\n if (action.type === 'SET_PAGINATED_DATA') {\n return {\n ...state,\n data: action.data[action.target],\n pagination: action.pagination,\n }\n }\n return state\n}\n\nconst workouts = (state = initial.workouts, action) => {\n switch (action.type) {\n case 'LOGOUT':\n return initial.workouts\n case 'PUSH_WORKOUTS':\n return {\n ...state,\n data: state.data.concat(action.workouts),\n }\n case 'REMOVE_WORKOUT':\n return {\n ...state,\n data: state.data.filter(workout => workout.id !== action.workoutId),\n }\n default:\n return handleDataAndError(state, 'workouts', action)\n }\n}\n\nconst application = (state = initial.application, action) => {\n if (action.type === 'SET_APP_CONFIG') {\n return {\n ...state,\n config: action.data,\n }\n }\n if (action.type === 'SET_APP_STATS') {\n return {\n ...state,\n statistics: action.data,\n }\n }\n return state\n}\n\nconst calendarWorkouts = (state = initial.calendarWorkouts, action) => {\n switch (action.type) {\n case 'LOGOUT':\n return initial.calendarWorkouts\n case 'UPDATE_CALENDAR':\n return {\n ...state,\n data: action.workouts,\n }\n default:\n return handleDataAndError(state, 'calendarWorkouts', action)\n }\n}\n\nconst chartData = (state = initial.chartData, action) => {\n if (action.type === 'SET_CHART_DATA') {\n return action.chartData\n }\n return state\n}\n\nconst gpx = (state = initial.gpx, action) => {\n if (action.type === 'SET_GPX') {\n return action.gpxContent\n }\n return state\n}\n\nconst language = (state = initial.language, action) => {\n if (action.type === 'SET_LANGUAGE') {\n return action.language\n }\n return state\n}\n\nconst loading = (state = initial.loading, action) => {\n if (action.type === 'SET_LOADING') {\n return action.loading\n }\n return state\n}\n\nconst message = (state = initial.message, action) => {\n switch (action.type) {\n case 'AUTH_ERROR':\n case 'PROFILE_ERROR':\n case 'PROFILE_UPDATE_ERROR':\n case 'PICTURE_ERROR':\n case 'SET_ERROR':\n return action.message\n case 'CLEAN_ALL_MESSAGES':\n case 'LOGOUT':\n case 'PROFILE_SUCCESS':\n case 'SET_APP_CONFIG':\n case 'SET_RESULTS':\n case '@@router/LOCATION_CHANGE':\n return ''\n default:\n return state\n }\n}\n\nconst messages = (state = initial.messages, action) => {\n switch (action.type) {\n case 'AUTH_ERRORS':\n case 'APP_ERRORS':\n return action.messages\n case 'CLEAN_ALL_MESSAGES':\n case 'LOGOUT':\n case 'PROFILE_SUCCESS':\n case '@@router/LOCATION_CHANGE':\n return []\n default:\n return state\n }\n}\n\nconst records = (state = initial.records, action) => {\n if (action.type === 'LOGOUT') {\n return initial.records\n }\n return handleDataAndError(state, 'records', action)\n}\n\nconst sports = (state = initial.sports, action) => {\n if (action.type === 'UPDATE_SPORT_DATA') {\n return {\n ...state,\n data: state.data.map(sport => {\n if (sport.id === action.data.id) {\n sport.is_active = action.data.is_active\n }\n return sport\n }),\n }\n }\n return handleDataAndError(state, 'sports', action)\n}\n\nconst users = (state = initial.users, action) => {\n if (action.type === 'UPDATE_USER_DATA') {\n return {\n ...state,\n data: state.data.map(user => {\n if (user.username === action.data.username) {\n user.admin = action.data.admin\n }\n return user\n }),\n }\n }\n return handleDataAndError(state, 'users', action)\n}\n\nconst user = (state = initial.user, action) => {\n switch (action.type) {\n case 'AUTH_ERROR':\n case 'PROFILE_ERROR':\n case 'LOGOUT':\n window.localStorage.removeItem('authToken')\n return initial.user\n case 'PROFILE_SUCCESS':\n return action.profil\n default:\n return state\n }\n}\n\nconst statistics = (state = initial.statistics, action) => {\n if (action.type === 'LOGOUT') {\n return initial.statistics\n }\n return handleDataAndError(state, 'statistics', action)\n}\n\nexport default history =>\n combineReducers({\n workouts,\n application,\n calendarWorkouts,\n chartData,\n gpx,\n language,\n loading,\n message,\n messages,\n records,\n router: connectRouter(history),\n sports,\n statistics,\n user,\n users,\n })\n","/* eslint-disable react/jsx-filename-extension */\nimport { createBrowserHistory } from 'history'\nimport React from 'react'\nimport { I18nextProvider } from 'react-i18next'\nimport ReactDOM from 'react-dom'\nimport { routerMiddleware } from 'connected-react-router'\nimport { applyMiddleware, compose, createStore } from 'redux'\nimport thunk from 'redux-thunk'\n\nimport i18n from './i18n'\nimport App from './components/App'\nimport Root from './components/Root'\nimport registerServiceWorker from './registerServiceWorker'\nimport createRootReducer from './reducers'\nimport { loadProfile } from './actions/user'\nimport { historyEnhancer } from './utils/history'\n\nexport const history = historyEnhancer(createBrowserHistory())\n\nhistory.listen(() => {\n window.scrollTo(0, 0)\n})\n\nexport const rootNode = document.getElementById('root')\n\nexport const store = createStore(\n createRootReducer(history),\n window.__STATE__, // Server state\n (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose)(\n applyMiddleware(routerMiddleware(history), thunk)\n )\n)\n\nif (window.localStorage.authToken !== null) {\n store.dispatch(loadProfile())\n}\n\nReactDOM.render(\n \n \n \n \n ,\n rootNode\n)\nregisterServiceWorker()\n"],"sourceRoot":""}