FitTrackee/fittrackee/dist/static/js/main.2b9e3dee.js.map

1 line
229 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/components/User/UserAuthForm.vue","webpack:///./src/components/User/UserAuthForm.vue?719c","webpack:///./src/components/User/UserAuthForm.vue?a581","webpack:///./src/components/Common/StatsChart/index.vue?1a65","webpack:///./node_modules/core-js/internals/string-pad.js","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue?312e","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue?a956","webpack:///./src/components/Dashboard/UserMonthStats.vue?4cf2","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue?de83","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue?adca","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue?4cd6","webpack:///./node_modules/core-js/modules/es.string.pad-start.js","webpack:///./node_modules/core-js/modules/es.object.entries.js","webpack:///./src/components/Dashboard/UserCalendar/index.vue?22a0","webpack:///./src/views/Dashboard.vue?7df1","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue?301b","webpack:///./src/components/BikePic.vue?bad3","webpack:///./node_modules/core-js/internals/object-to-array.js","webpack:///./src/components/Workout/WorkoutCard.vue?a73d","webpack:///./src/views/Dashboard.vue","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./src/components/Dashboard/Timeline.vue","webpack:///./src/components/Workout/WorkoutCard.vue","webpack:///./node_modules/date-fns/esm/compareAsc/index.js","webpack:///./node_modules/date-fns/esm/differenceInCalendarMonths/index.js","webpack:///./node_modules/date-fns/esm/endOfDay/index.js","webpack:///./node_modules/date-fns/esm/isLastDayOfMonth/index.js","webpack:///./node_modules/date-fns/esm/differenceInMonths/index.js","webpack:///./node_modules/date-fns/esm/differenceInMilliseconds/index.js","webpack:///./node_modules/date-fns/esm/differenceInSeconds/index.js","webpack:///./node_modules/date-fns/esm/_lib/assign/index.js","webpack:///./node_modules/date-fns/esm/_lib/cloneObject/index.js","webpack:///./node_modules/date-fns/esm/formatDistance/index.js","webpack:///./src/components/Workout/WorkoutCard.vue?b099","webpack:///./src/components/Workout/WorkoutCard.vue?313a","webpack:///./src/components/Dashboard/Timeline.vue?427a","webpack:///./src/components/Dashboard/Timeline.vue?4efd","webpack:///./src/components/Dashboard/UserCalendar/index.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue","webpack:///./node_modules/date-fns/esm/startOfDay/index.js","webpack:///./node_modules/date-fns/esm/isSameDay/index.js","webpack:///./node_modules/date-fns/esm/isSameMonth/index.js","webpack:///./node_modules/date-fns/esm/isToday/index.js","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue?dbdf","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkout.vue?d46b","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue","webpack:///./src/components/Dashboard/UserCalendar/DonutChart.vue","webpack:///./src/components/Dashboard/UserCalendar/DonutChart.vue?4d49","webpack:///./src/components/Dashboard/UserCalendar/DonutChart.vue?7394","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue?4c41","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue?2788","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue?cd5f","webpack:///./src/components/Dashboard/UserCalendar/CalendarWorkouts.vue?fbae","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue?6eda","webpack:///./src/components/Dashboard/UserCalendar/CalendarCells.vue?88a4","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue?a950","webpack:///./src/components/Dashboard/UserCalendar/CalendarDays.vue?50af","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue?dc81","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue?1bf2","webpack:///./src/components/Dashboard/UserCalendar/index.vue?3519","webpack:///./src/components/Dashboard/UserCalendar/index.vue?b135","webpack:///./src/components/Dashboard/UserMonthStats.vue","webpack:///./src/components/Dashboard/UserMonthStats.vue?deb8","webpack:///./src/components/Dashboard/UserMonthStats.vue?2111","webpack:///./src/components/Dashboard/UserRecords/index.vue","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue?67f3","webpack:///./src/components/Dashboard/UserRecords/RecordsCard.vue?ca60","webpack:///./src/utils/records.ts","webpack:///./src/components/Dashboard/UserRecords/index.vue?995a","webpack:///./src/components/Dashboard/UserRecords/index.vue?5ce7","webpack:///./src/components/Dashboard/UserStatsCards/index.vue","webpack:///./src/components/Dashboard/UserStatsCards/index.vue?5f4d","webpack:///./src/components/Dashboard/UserStatsCards/index.vue?24f5","webpack:///./src/views/Dashboard.vue?6662","webpack:///./src/views/Dashboard.vue?8dc4","webpack:///./node_modules/date-fns/esm/subYears/index.js","webpack:///./node_modules/date-fns/esm/endOfYear/index.js","webpack:///./node_modules/date-fns/esm/addWeeks/index.js","webpack:///./node_modules/date-fns/esm/subWeeks/index.js","webpack:///./src/utils/statistics.ts","webpack:///./src/components/Statistics/index.vue?27b1","webpack:///./src/views/user/LoginOrRegister.vue?4f89","webpack:///./node_modules/core-js/internals/string-pad-webkit-bug.js","webpack:///./node_modules/date-fns/esm/subMonths/index.js","webpack:///./src/components/Statistics/StatsMenu.vue?a690","webpack:///./src/components/Statistics/StatsSportsMenu.vue?5805","webpack:///./src/components/Dashboard/UserRecords/index.vue?5fd1","webpack:///./src/views/StatisticsView.vue","webpack:///./src/components/Statistics/index.vue","webpack:///./src/components/Statistics/StatsMenu.vue","webpack:///./src/components/Statistics/StatsMenu.vue?3e92","webpack:///./src/components/Statistics/StatsMenu.vue?e2ad","webpack:///./src/components/Statistics/StatsSportsMenu.vue","webpack:///./src/components/Statistics/StatsSportsMenu.vue?793d","webpack:///./src/components/Statistics/StatsSportsMenu.vue?bb1a","webpack:///./src/components/Statistics/index.vue?3134","webpack:///./src/components/Statistics/index.vue?fcc1","webpack:///./src/views/StatisticsView.vue?db9f","webpack:///./src/views/StatisticsView.vue?7475","webpack:///./src/components/Dashboard/UserStatsCards/index.vue?a172","webpack:///./src/views/user/LoginOrRegister.vue","webpack:///./src/components/BikePic.vue","webpack:///./src/components/BikePic.vue?f93b","webpack:///./src/views/user/LoginOrRegister.vue?491b","webpack:///./src/views/user/LoginOrRegister.vue?c664","webpack:///./node_modules/core-js/modules/es.symbol.iterator.js","webpack:///./src/views/StatisticsView.vue?0e0c","webpack:///./node_modules/core-js/modules/es.symbol.description.js","webpack:///./src/components/Dashboard/Timeline.vue?5bd7","webpack:///./src/views/NotFoundView.vue","webpack:///./src/views/NotFoundView.vue?efa2","webpack:///./src/views/NotFoundView.vue?d15d","webpack:///./src/components/Dashboard/UserCalendar/CalendarHeader.vue?7fc5","webpack:///./src/components/Common/StatsChart/index.vue","webpack:///./src/components/Common/StatsChart/Chart.vue","webpack:///./src/utils/duration.ts","webpack:///./src/utils/tooltip.ts","webpack:///./src/components/Common/StatsChart/Chart.vue?bf85","webpack:///./src/components/Common/StatsChart/Chart.vue?979a","webpack:///./src/components/Common/StatsChart/index.vue?d5f7","webpack:///./src/components/Common/StatsChart/index.vue?e269","webpack:///./src/components/User/UserAuthForm.vue?ea84","webpack:///./node_modules/core-js/modules/es.array.slice.js"],"names":["id","class","registration_disabled","message","onSubmit","action","disabled","required","formData","username","placeholder","$t","type","email","password","includes","password_conf","buttonText","to","errorMessages","name","props","String","token","default","setup","route","store","useStore","getButtonText","getters","GETTERS","ERROR_MESSAGES","appConfig","APP_CONFIG","value","is_registration_enabled","toUpperCase","actionType","dispatch","ACTIONS","RESET_USER_PASSWORD","commit","MUTATIONS","SET_ERROR_MESSAGES","SEND_PASSWORD_RESET_REQUEST","LOGIN_OR_REGISTER","redirectUrl","query","from","resetFormData","path","EMPTY_ERROR_MESSAGES","render","__scopeId","toLength","repeat","requireObjectCoercible","ceil","Math","createMethod","IS_END","$this","maxLength","fillString","fillLen","stringFiller","S","stringLength","length","fillStr","undefined","intMaxLength","call","slice","module","exports","start","end","$","$padStart","WEBKIT_BUG","target","proto","forced","padStart","this","arguments","$entries","entries","stat","O","DESCRIPTORS","objectKeys","toIndexedObject","propertyIsEnumerable","f","TO_ENTRIES","it","key","keys","i","result","push","values","aria-hidden","authUser","sports","isSelected","updateDisplayColumn","user","_arrayLikeToArray","arr","len","arr2","Array","_arrayWithoutHoles","isArray","arrayLikeToArray","_iterableToArray","iter","Symbol","iterator","_unsupportedIterableToArray","o","minLen","n","Object","prototype","toString","constructor","test","_nonIterableSpread","TypeError","_toConsumableArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","nb_workouts","workouts","initWorkoutsCount","index","workout","sport","moreWorkoutsExist","loadMoreWorkouts","title","formatDistance","Date","workout_date","with_gpx","sport-label","label","moving","distance","src","alt","min_alt","max_alt","ascent","descent","compareAsc","dirtyDateLeft","dirtyDateRight","requiredArgs","dateLeft","toDate","dateRight","diff","getTime","differenceInCalendarMonths","yearDiff","getFullYear","monthDiff","getMonth","endOfDay","dirtyDate","date","setHours","isLastDayOfMonth","endOfMonth","differenceInMonths","sign","difference","abs","getDate","setDate","setMonth","isLastMonthNotFull","Number","differenceInMilliseconds","differenceInSeconds","floor","dirtyObject","property","hasOwnProperty","cloneObject","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","dirtyBaseDate","options","locale","RangeError","comparison","isNaN","localizeOptions","addSuffix","Boolean","months","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","round","includeSeconds","hours","days","nearestMonth","monthsSinceStartOfYear","years","components","StaticMap","UserPicture","LOCALE","format","getDateWithTZ","NoWorkouts","WorkoutCard","page","per_page","loadWorkouts","TIMELINE_WORKOUTS","previous_workout","GET_TIMELINE_WORKOUTS","GET_MORE_TIMELINE_WORKOUTS","day","locale-options","displayNextMonth","displayPreviousMonth","start-date","calendarDates","currentDay","end-date","timezone","calendarWorkouts","weekStartingMonday","weekm","rows","row","filterWorkouts","startOfDay","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","isSameMonth","isToday","now","displayedWorkoutCount","sportLabel","getSportLabel","datasets","chartDatasets","colors","records","t","togglePane","isHidden","height","width","viewBox","data","cx","cy","r","radius","fill","stroke","stroke-dashoffset","stroke-dasharray","circumference","stroke-width","stroke-opacity","transform","returnCircleTransformValue","percentage","angleOffset","PI","calculateStrokeDashOffset","rotation","CalendarWorkout","DonutChart","event","stopPropagation","CalendarWorkoutsChart","CalendarWorkouts","endDate","startDate","getDays","addDays","isWeekEnd","filter","reverse","localeOptions","emit","emits","CalendarCells","CalendarDays","CalendarHeader","getCalendarWorkouts","dateFormat","CALENDAR_WORKOUTS","apiParams","GET_CALENDAR_WORKOUTS","addMonths","subMonths","content","chart-params","chartParams","displayed-sport-ids","selectedSportIds","hide-chart-if-no-data","StatChart","duration","startOfMonth","map","recordsBySport","sort","sportTranslatedLabel","record","record_type","tz","Error","workout_id","getRecordsBySports","translatedSports","reduce","sportList","find","s","sport_id","translatedLabel","RecordsCard","icon","text","total_distance","toFixed","total_duration","nb_sports","StatCard","get_duration","match","split","Timeline","UserCalendar","UserMonthStats","UserRecords","UserStatsCards","AUTH_USER_PROFILE","SPORTS","subYears","dirtyAmount","amount","toInteger","addYears","endOfYear","year","setFullYear","addWeeks","subWeeks","dateFormats","week","api","chart","month","datasetKeys","params","getStatisticsChartDataset","color","backgroundColor","displayedSports","total_ascent","total_descent","displayedSportsId","apiStats","dayKeys","labels","sportsId","displayedSport","datasetKey","dataset","timeFrame","weekStartsOn","startOfYear","startOfWeek","endOfWeek","backward","userAgent","updateTimeFrame","handleOnClickArrows","fullStats","selected-sport-ids","user-sports","updateSelectedSportIds","timeFrames","frame","checked","selectedTimeFrame","onUpdateTimeFrame","style","sportColors","userSports","sportId","SportsMenu","StatsMenu","getChartParams","getSports","newSports","Statistics","sports_list","BikePic","LoginOrRegisterForm","defineWellKnownSymbol","global","has","isObject","defineProperty","copyConstructorProperties","NativeSymbol","description","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","symbolToString","native","regexp","configurable","get","symbol","valueOf","string","desc","replace","NotFound","hideChartIfNoData","emptyStats","displayedData","updateDisplayData","displayedSportIds","formatDuration","totalSeconds","formatWithUnits","BarChart","getNumber","getSum","total","chartData","JSON","parse","stringify","responsive","maintainAspectRatio","animation","layout","padding","top","scales","x","stacked","grid","drawOnChartArea","y","ticks","maxTicksLimit","callback","afterFit","scale","plugins","datalabels","anchor","align","context","chartArea","display","formatter","d","dataIndex","datasetIndex","legend","tooltip","interaction","intersect","mode","tooltipItem","formattedValue","callbacks","parsed","footer","tooltipItems","sum","barChartProps","Chart","statistics","USER_STATS","formattedStats","getStatistics","GET_USER_STATS","filterType","getApiParams","time","newParams","toAbsoluteIndex","createProperty","wellKnownSymbol","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","SPECIES","nativeSlice","max","Constructor","k","fin"],"mappings":"mOACOA,GAAG,kB,GACDA,GAAG,a,GAYGC,MAAM,c,yCAwDG,O,aAORA,MAAM,W,4OA5EpB,yBAoFM,MApFN,EAoFM,CAnFJ,yBAkFM,MAlFN,EAkFM,CAjFJ,yBAgFM,OA/EJA,MAAK,CAAC,WAAU,C,SACc,2B,CAMtB,EAAAC,uB,yBAFR,yBAGE,G,MAFAC,QAAQ,4B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BtZ,MAAQsZ,GAAaD,EAAIG,EAAMD,EAAG,IACvE5Y,EAAI,EAAG4Y,EAAIC,EAAKD,IAAK5Y,IAAS4Y,KAAK/a,GAAGua,EAAe5Z,EAAQwB,EAAGnC,EAAE+a,IAEvE,OADApa,EAAOjC,OAASyD,EACTxB,M","file":"static/js/main.2b9e3dee.js","sourcesContent":["<template>\n <div id=\"user-auth-form\">\n <div id=\"user-form\">\n <div\n class=\"form-box\"\n :class=\"{\n disabled: registration_disabled,\n }\"\n >\n <AlertMessage\n message=\"user.REGISTER_DISABLED\"\n v-if=\"registration_disabled\"\n />\n <form @submit.prevent=\"onSubmit(action)\">\n <div class=\"form-items\">\n <input\n v-if=\"action === 'register'\"\n id=\"username\"\n :disabled=\"registration_disabled\"\n required\n v-model=\"formData.username\"\n :placeholder=\"$t('user.USERNAME')\"\n />\n <input\n v-if=\"action !== 'reset'\"\n id=\"email\"\n :disabled=\"registration_disabled\"\n required\n type=\"email\"\n v-model=\"formData.email\"\n :placeholder=\"\n action === 'reset-request'\n ? $t('user.ENTER_EMAIL')\n : $t('user.EMAIL')\n \"\n />\n <input\n v-if=\"action !== 'reset-request'\"\n id=\"password\"\n :disabled=\"registration_disabled\"\n required\n type=\"password\"\n v-model=\"formData.password\"\n :placeholder=\"\n action === 'reset'\n ? $t('user.ENTER_PASSWORD')\n : $t('user.PASSWORD')\n \"\n />\n <input\n v-if=\"['register', 'reset'].includes(action)\"\n id=\"confirm-password\"\n :disabled=\"registration_disabled\"\n type=\"password\"\n required\n v-model=\"formData.password_conf\"\n :placeholder=\"\n action === 'reset'\n ? $t('user.ENTER_PASSWORD_CONFIRMATION')\n : $t('user.PASSWORD_CONFIRM')\n \"\n />\n </div>\n <button type=\"submit\" :disabled=\"registration_disabled\">\n {{ $t(buttonText) }}\n </button>\n </form>\n <div v-if=\"action === 'login'\">\n <router-link class=\"links\" to=\"/register\">\n {{ $t('user.REGISTER') }}\n </router-link>\n -\n <router-link class=\"links\" to=\"/password-reset/request\">\n {{ $t('user.PASSWORD_FORGOTTEN') }}\n </router-link>\n </div>\n <div v-else>\n <span class=\"account\">{{ $t('user.ALREADY_HAVE_ACCOUNT') }}</span>\n <router-link class=\"links\" to=\"/login\">\n {{ $t('user.LOGIN') }}\n </router-link>\n </div>\n <ErrorMessage :message=\"errorMessages\" v-if=\"errorMessages\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, computed, defineComponent, reactive, watch } from 'vue'\n import { useRoute } from 'vue-router'\n\n import { AUTH_USER_STORE, ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ILoginRegisterFormData } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'UserAuthForm',\n props: {\n action: {\n type: String,\n required: true,\n },\n token: {\n type: String,\n default: '',\n },\n },\n setup(props) {\n const formData: ILoginRegisterFormData = reactive({\n username: '',\n email: '',\n password: '',\n password_conf: '',\n })\n const route = useRoute()\n const store = useStore()\n\n const buttonText: ComputedRef<string> = computed(() =>\n getButtonText(props.action)\n )\n const errorMessages: ComputedRef<string | string[] | null> = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const appConfig: ComputedRef<TAppConfig> = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const registration_disabled: ComputedRef<boolean> = computed(\n () =>\n props.action === 'register' &&\n !appConfig.value.is_registration_enabled\n )\n\n function getButtonText(action: string): string {\n switch (action) {\n case 'reset-request':\n case 'reset':\n return 'buttons.SUBMIT'\n default:\n return `buttons.${props.action.toUpperCase()}`\n }\n }\n function onSubmit(actionType: string) {\n switch (actionType) {\n case 'reset':\n if (!props.token) {\n return store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n 'user.INVALID_TOKEN'\n )\n }\n return store.dispatch(AUTH_USER_STORE.ACTIONS.RESET_USER_PASSWORD, {\n password: formData.password,\n password_conf: formData.password_conf,\n token: props.token,\n })\n case 'reset-request':\n return store.dispatch(\n AUTH_USER_STORE.ACTIONS.SEND_PASSWORD_RESET_REQUEST,\n {\n email: formData.email,\n }\n )\n default:\n store.dispatch(AUTH_USER_STORE.ACTIONS.LOGIN_OR_REGISTER, {\n actionType,\n formData,\n redirectUrl: route.query.from,\n })\n }\n }\n function resetFormData() {\n formData.username = ''\n formData.email = ''\n formData.password = ''\n formData.password_conf = ''\n }\n watch(\n () => route.path,\n async () => {\n store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES)\n resetFormData()\n }\n )\n return {\n appConfig,\n buttonText,\n errorMessages,\n formData,\n registration_disabled,\n onSubmit,\n }\n },\n })\n</script>\n\n<style scoped lang=\"scss\">\n @import '~@/scss/base';\n\n #user-auth-form {\n display: flex;\n align-items: center;\n\n margin: $default-margin 0;\n height: 100%;\n\n #user-form {\n width: 60%;\n\n .account {\n font-size: 0.9em;\n padding-left: $default-padding;\n }\n .links {\n font-size: 0.9em;\n font-style: italic;\n padding: 0 $default-padding;\n }\n\n button {\n margin: $default-margin;\n border: solid 1px var(--app-color);\n\n &:disabled {\n border-color: var(--disabled-color);\n }\n }\n }\n\n @media screen and (max-width: $medium-limit) {\n height: auto;\n margin-bottom: 50px;\n\n #user-form {\n margin-top: $default-margin;\n width: 100%;\n }\n }\n }\n</style>\n","\n import { ComputedRef, computed, defineComponent, reactive, watch } from 'vue'\n import { useRoute } from 'vue-router'\n\n import { AUTH_USER_STORE, ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ILoginRegisterFormData } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'UserAuthForm',\n props: {\n action: {\n type: String,\n required: true,\n },\n token: {\n type: String,\n default: '',\n },\n },\n setup(props) {\n const formData: ILoginRegisterFormData = reactive({\n username: '',\n email: '',\n password: '',\n password_conf: '',\n })\n const route = useRoute()\n const store = useStore()\n\n const buttonText: ComputedRef<string> = computed(() =>\n getButtonText(props.action)\n )\n const errorMessages: ComputedRef<string | string[] | null> = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const appConfig: ComputedRef<TAppConfig> = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const registration_disabled: ComputedRef<boolean> = computed(\n () =>\n props.action === 'register' &&\n !appConfig.value.is_registration_enabled\n )\n\n function getButtonText(action: string): string {\n switch (action) {\n case 'reset-request':\n case 'reset':\n return 'buttons.SUBMIT'\n default:\n return `buttons.${props.action.toUpperCase()}`\n }\n }\n function onSubmit(actionType: string) {\n switch (actionType) {\n case 'reset':\n if (!props.token) {\n return store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n 'user.INVALID_TOKEN'\n )\n }\n return store.dispatch(AUTH_USER_STORE.ACTIONS.RESET_USER_PASSWORD, {\n password: formData.password,\n password_conf: formData.password_conf,\n token: props.token,\n })\n case 'reset-request':\n return store.dispatch(\n AUTH_USER_STORE.ACTIONS.SEND_PASSWORD_RESET_REQUEST,\n {\n email: formData.email,\n }\n )\n default:\n store.dispatch(AUTH_USER_STORE.ACTIONS.LOGIN_OR_REGISTER, {\n actionType,\n formData,\n redirectUrl: route.query.from,\n })\n }\n }\n function resetFormData() {\n formData.username = ''\n formData.email = ''\n formData.password = ''\n formData.password_conf = ''\n }\n watch(\n () => route.path,\n async () => {\n store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES)\n resetFormData()\n }\n )\n return {\n appConfig,\n buttonText,\n errorMessages,\n formData,\n registration_disabled,\n onSubmit,\n }\n },\n })\n","import { render } from \"./UserAuthForm.vue?vue&type=template&id=06a2ad44&scoped=true\"\nimport script from \"./UserAuthForm.vue?vue&type=script&lang=ts\"\nexport * from \"./UserAuthForm.vue?vue&type=script&lang=ts\"\n\nimport \"./UserAuthForm.vue?vue&type=style&index=0&id=06a2ad44&scoped=true&lang=scss\"\nscript.render = render\nscript.__scopeId = \"data-v-06a2ad44\"\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=831b4ece&lang=scss&scoped=true\"","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('../internals/to-length');\nvar repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = String(requireObjectCoercible($this));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarWorkoutsChart.vue?vue&type=style&index=0&id=b30dea28&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarWorkouts.vue?vue&type=style&index=0&id=3822f77d&lang=scss\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./UserMonthStats.vue?vue&type=style&index=0&id=7958b39f&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarCells.vue?vue&type=style&index=0&id=17e3f666&lang=scss\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./RecordsCard.vue?vue&type=style&index=0&id=db29ce96&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarWorkout.vue?vue&type=style&index=0&id=cf219d62&lang=scss\"","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.es/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=702a8534&lang=scss\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Dashboard.vue?vue&type=style&index=0&id=ad6483fc&lang=scss&scoped=true\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarDays.vue?vue&type=style&index=0&id=8c842a34&lang=scss\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./BikePic.vue?vue&type=style&index=0&id=645e8c6f&scoped=true&lang=scss\"","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./WorkoutCard.vue?vue&type=style&index=0&id=99d3cd20&lang=scss&scoped=true\"","<template>\n <div\n id=\"dashboard\"\n class=\"view\"\n v-if=\"authUser.username && sports.length > 0\"\n >\n <div class=\"container mobile-menu\">\n <div class=\"box\">\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'chart' }\"\n @click=\"updateDisplayColumn('chart')\"\n >\n <i class=\"fa fa-bar-chart\" aria-hidden=\"true\" />\n </div>\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'calendar' }\"\n @click=\"updateDisplayColumn('calendar')\"\n >\n <i class=\"fa fa-calendar\" aria-hidden=\"true\" />\n </div>\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'timeline' }\"\n @click=\"updateDisplayColumn('timeline')\"\n >\n <i class=\"fa fa-map-o\" aria-hidden=\"true\" />\n </div>\n <div\n class=\"mobile-menu-item\"\n :class=\"{ 'is-selected': isSelected === 'records' }\"\n @click=\"updateDisplayColumn('records')\"\n >\n <i class=\"fa fa-trophy\" aria-hidden=\"true\" />\n </div>\n </div>\n </div>\n <div class=\"container\">\n <UserStatsCards :user=\"authUser\" />\n </div>\n <div class=\"container dashboard-container\">\n <div class=\"left-container dashboard-sub-container\">\n <UserMonthStats\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'chart') }\"\n />\n <UserRecords\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'records') }\"\n />\n </div>\n <div class=\"right-container dashboard-sub-container\">\n <UserCalendar\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'calendar') }\"\n />\n <Timeline\n :sports=\"sports\"\n :user=\"authUser\"\n :class=\"{ 'is-hidden': !(isSelected === 'timeline') }\"\n />\n </div>\n </div>\n <div id=\"bottom\" />\n </div>\n <div v-else class=\"app-loading\">\n <Loader />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, Ref, computed, defineComponent, ref } from 'vue'\n\n import Timeline from '@/components/Dashboard/Timeline.vue'\n import UserCalendar from '@/components/Dashboard/UserCalendar/index.vue'\n import UserMonthStats from '@/components/Dashboard/UserMonthStats.vue'\n import UserRecords from '@/components/Dashboard/UserRecords/index.vue'\n import UserStatsCards from '@/components/Dashboard/UserStatsCards/index.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'Dashboard',\n components: {\n Timeline,\n UserCalendar,\n UserMonthStats,\n UserRecords,\n UserStatsCards,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const isSelected: Ref<string> = ref('chart')\n\n function updateDisplayColumn(target: string) {\n isSelected.value = target\n }\n\n return { authUser, sports, isSelected, updateDisplayColumn }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n #dashboard {\n .dashboard-container {\n display: flex;\n flex-direction: row;\n\n .dashboard-sub-container {\n display: flex;\n flex-direction: column;\n }\n\n .left-container {\n width: 32%;\n }\n\n .right-container {\n width: 68%;\n }\n }\n .mobile-menu {\n display: none;\n }\n\n @media screen and (max-width: $medium-limit) {\n padding-bottom: 60px;\n .dashboard-container {\n display: flex;\n flex-direction: column;\n\n .left-container {\n width: 100%;\n }\n\n .right-container {\n width: 100%;\n }\n }\n .mobile-menu {\n display: flex;\n .box {\n display: flex;\n justify-content: space-between;\n padding: 0;\n width: 100%;\n\n .mobile-menu-item {\n display: flex;\n justify-content: space-around;\n border: none;\n border-radius: $border-radius;\n box-shadow: none;\n font-size: 0.95em;\n padding: $default-padding;\n width: 25%;\n\n .fa-trophy {\n color: var(--app-color);\n }\n &.is-selected {\n .fa-trophy {\n color: var(--mobile-menu-selected-color);\n }\n color: var(--mobile-menu-selected-color);\n background-color: var(--mobile-menu-selected-bgcolor);\n }\n }\n }\n }\n .is-hidden {\n display: none;\n }\n }\n }\n</style>\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","<template>\n <div id=\"timeline\">\n <div class=\"section-title\">{{ $t('workouts.LATEST_WORKOUTS') }}</div>\n <div v-if=\"user.nb_workouts > 0 && workouts.length === 0\">\n <WorkoutCard\n v-for=\"index in [...Array(initWorkoutsCount).keys()]\"\n :user=\"user\"\n :key=\"index\"\n />\n </div>\n <div v-else>\n <WorkoutCard\n v-for=\"workout in workouts\"\n :workout=\"workout\"\n :sport=\"\n workouts.length > 0\n ? sports.filter((s) => s.id === workout.sport_id)[0]\n : null\n \"\n :user=\"user\"\n :key=\"workout.id\"\n />\n <NoWorkouts v-if=\"workouts.length === 0\" />\n <div v-if=\"moreWorkoutsExist\" class=\"more-workouts\">\n <button @click=\"loadMoreWorkouts\">\n {{ $t('workouts.LOAD_MORE_WORKOUT') }}\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import WorkoutCard from '@/components/Workout/WorkoutCard.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'Timeline',\n components: {\n NoWorkouts,\n WorkoutCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n let page = ref(1)\n const per_page = 5\n const initWorkoutsCount =\n props.user.nb_workouts >= per_page ? per_page : props.user.nb_workouts\n onBeforeMount(() => loadWorkouts())\n\n const workouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.TIMELINE_WORKOUTS]\n )\n const moreWorkoutsExist: ComputedRef<boolean> = computed(() =>\n workouts.value.length > 0\n ? workouts.value[workouts.value.length - 1].previous_workout !== null\n : false\n )\n\n function loadWorkouts() {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n function loadMoreWorkouts() {\n page.value += 1\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_MORE_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n\n return {\n initWorkoutsCount,\n moreWorkoutsExist,\n per_page,\n workouts,\n loadMoreWorkouts,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n #timeline {\n margin-bottom: 20px;\n\n .more-workouts {\n display: flex;\n justify-content: center;\n }\n }\n</style>\n","<template>\n <div class=\"timeline-workout\">\n <div class=\"box\">\n <div class=\"workout-user-date\">\n <div class=\"workout-user\">\n <UserPicture :user=\"user\" />\n <router-link\n v-if=\"user.username\"\n class=\"workout-user-name\"\n :to=\"{\n name: 'User',\n params: { username: user.username },\n }\"\n >\n {{ user.username }}\n </router-link>\n </div>\n <router-link\n class=\"workout-title\"\n v-if=\"workout\"\n :to=\"{\n name: 'Workout',\n params: { workoutId: workout.id },\n }\"\n >\n {{ workout.title }}\n </router-link>\n <div\n class=\"workout-date\"\n v-if=\"workout && user\"\n :title=\"\n format(\n getDateWithTZ(workout.workout_date, user.timezone),\n 'dd/MM/yyyy HH:mm'\n )\n \"\n >\n {{\n formatDistance(new Date(workout.workout_date), new Date(), {\n addSuffix: true,\n locale,\n })\n }}\n </div>\n </div>\n <div\n class=\"workout-map\"\n :class=\"{ 'no-cursor': !workout }\"\n @click=\"\n workout\n ? $router.push({\n name: 'Workout',\n params: { workoutId: workout.id },\n })\n : null\n \"\n >\n <div v-if=\"workout\">\n <StaticMap v-if=\"workout.with_gpx\" :workout=\"workout\" />\n <div v-else class=\"no-map\">\n {{ $t('workouts.NO_MAP') }}\n </div>\n </div>\n </div>\n <div\n class=\"workout-data\"\n :class=\"{ 'without-gpx': workout && !workout.with_gpx }\"\n @click=\"\n $router.push({ name: 'Workout', params: { workoutId: workout.id } })\n \"\n >\n <div class=\"img\">\n <SportImage v-if=\"sport\" :sport-label=\"sport.label\" />\n </div>\n <div class=\"data\">\n <i class=\"fa fa-clock-o\" aria-hidden=\"true\" />\n <span v-if=\"workout\">{{ workout.moving }}</span>\n </div>\n <div class=\"data\">\n <i class=\"fa fa-road\" aria-hidden=\"true\" />\n <span v-if=\"workout\">{{ workout.distance }} km</span>\n </div>\n <div class=\"data elevation\" v-if=\"workout && workout.with_gpx\">\n <img\n class=\"mountains\"\n src=\"/img/workouts/mountains.svg\"\n :alt=\"$t('workouts.ELEVATION')\"\n />\n <div class=\"data-values\">\n <span>{{ workout.min_alt }}/</span>\n <span>{{ workout.max_alt }} m </span>\n </div>\n </div>\n <div class=\"data altitude\" v-if=\"workout && workout.with_gpx\">\n <i class=\"fa fa-location-arrow\" aria-hidden=\"true\" />\n <div class=\"data-values\">\n <span>+ {{ workout.ascent }}/</span>\n <span>- {{ workout.descent }} m </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { Locale, format, formatDistance } from 'date-fns'\n import { PropType, defineComponent, ComputedRef, computed } from 'vue'\n\n import StaticMap from '@/components/Common/StaticMap.vue'\n import UserPicture from '@/components/User/UserPicture.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'WorkoutCard',\n components: {\n StaticMap,\n UserPicture,\n },\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: false,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n sport: {\n type: Object as PropType<ISport>,\n required: false,\n },\n },\n setup() {\n const store = useStore()\n const locale: ComputedRef<Locale> = computed(\n () => store.getters[ROOT_STORE.GETTERS.LOCALE]\n )\n return {\n format,\n formatDistance,\n getDateWithTZ,\n locale,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .mountains {\n padding-right: $default-padding * 0.5;\n }\n\n .timeline-workout {\n margin-bottom: $default-margin * 2;\n\n .box {\n flex-direction: column;\n padding: 0;\n .workout-user-date {\n display: flex;\n justify-content: space-between;\n padding: $default-padding * 0.5 $default-padding;\n .workout-user {\n display: flex;\n ::v-deep(.user-picture) {\n img {\n height: 25px;\n width: 25px;\n }\n .no-picture {\n font-size: 1.5em;\n }\n }\n .workout-user-name {\n padding-left: 5px;\n }\n }\n .workout-date {\n font-size: 0.85em;\n font-style: italic;\n }\n .workout-title {\n display: block;\n padding: 0 $default-padding;\n @media screen and (max-width: $x-small-limit) {\n display: none;\n }\n }\n }\n\n .workout-map {\n background-color: var(--workout-no-map-bg-color);\n height: 150px;\n .no-map {\n line-height: 150px;\n }\n ::v-deep(.bg-map-image) {\n height: 150px;\n }\n }\n\n .workout-data {\n display: flex;\n padding: $default-padding * 0.5;\n font-size: 0.9em;\n .sport-img {\n height: 25px;\n width: 25px;\n }\n .img,\n .data {\n display: flex;\n align-items: center;\n .data-values {\n display: flex;\n flex-wrap: wrap;\n }\n }\n .img {\n justify-content: flex-end;\n width: 10%;\n }\n .data {\n justify-content: center;\n width: 22%;\n }\n @media screen and (max-width: $x-small-limit) {\n .img {\n justify-content: center;\n width: 20%;\n }\n .data {\n justify-content: center;\n width: 40%;\n }\n .altitude,\n .elevation {\n display: none;\n }\n }\n\n &.without-gpx {\n .img,\n .data {\n justify-content: center;\n width: 33%;\n }\n }\n }\n\n .workout-map,\n .workout-data {\n cursor: pointer;\n }\n .no-cursor {\n cursor: default;\n }\n .fa {\n padding-right: $default-padding;\n }\n }\n }\n</style>\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result; // Check for the difference of less than month\n\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n } // Prevent negative zero\n\n\n return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getTime() - dateRight.getTime();\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000;\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff);\n}","export default function assign(target, dirtyObject) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n dirtyObject = dirtyObject || {};\n\n for (var property in dirtyObject) {\n if (Object.prototype.hasOwnProperty.call(dirtyObject, property)) {\n target[property] = dirtyObject[property];\n }\n }\n\n return target;\n}","import assign from \"../assign/index.js\";\nexport default function cloneObject(dirtyObject) {\n return assign({}, dirtyObject);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","\n import { Locale, format, formatDistance } from 'date-fns'\n import { PropType, defineComponent, ComputedRef, computed } from 'vue'\n\n import StaticMap from '@/components/Common/StaticMap.vue'\n import UserPicture from '@/components/User/UserPicture.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'WorkoutCard',\n components: {\n StaticMap,\n UserPicture,\n },\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: false,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n sport: {\n type: Object as PropType<ISport>,\n required: false,\n },\n },\n setup() {\n const store = useStore()\n const locale: ComputedRef<Locale> = computed(\n () => store.getters[ROOT_STORE.GETTERS.LOCALE]\n )\n return {\n format,\n formatDistance,\n getDateWithTZ,\n locale,\n }\n },\n })\n","import { render } from \"./WorkoutCard.vue?vue&type=template&id=99d3cd20&scoped=true\"\nimport script from \"./WorkoutCard.vue?vue&type=script&lang=ts\"\nexport * from \"./WorkoutCard.vue?vue&type=script&lang=ts\"\n\nimport \"./WorkoutCard.vue?vue&type=style&index=0&id=99d3cd20&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-99d3cd20\"\n\nexport default script","\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import WorkoutCard from '@/components/Workout/WorkoutCard.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'Timeline',\n components: {\n NoWorkouts,\n WorkoutCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n let page = ref(1)\n const per_page = 5\n const initWorkoutsCount =\n props.user.nb_workouts >= per_page ? per_page : props.user.nb_workouts\n onBeforeMount(() => loadWorkouts())\n\n const workouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.TIMELINE_WORKOUTS]\n )\n const moreWorkoutsExist: ComputedRef<boolean> = computed(() =>\n workouts.value.length > 0\n ? workouts.value[workouts.value.length - 1].previous_workout !== null\n : false\n )\n\n function loadWorkouts() {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n function loadMoreWorkouts() {\n page.value += 1\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_MORE_TIMELINE_WORKOUTS, {\n page: page.value,\n per_page,\n ...defaultOrder,\n })\n }\n\n return {\n initWorkoutsCount,\n moreWorkoutsExist,\n per_page,\n workouts,\n loadMoreWorkouts,\n }\n },\n })\n","import { render } from \"./Timeline.vue?vue&type=template&id=e324c07c&scoped=true\"\nimport script from \"./Timeline.vue?vue&type=script&lang=ts\"\nexport * from \"./Timeline.vue?vue&type=script&lang=ts\"\n\nimport \"./Timeline.vue?vue&type=style&index=0&id=e324c07c&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-e324c07c\"\n\nexport default script","<template>\n <div id=\"user-calendar\">\n <div class=\"calendar-card box\">\n <CalendarHeader\n :day=\"day\"\n locale-options=\"enGB\"\n @displayNextMonth=\"displayNextMonth\"\n @displayPreviousMonth=\"displayPreviousMonth\"\n />\n <CalendarDays :start-date=\"calendarDates.start\" locale-options=\"enGB\" />\n <CalendarCells\n :currentDay=\"day\"\n :end-date=\"calendarDates.end\"\n :sports=\"sports\"\n :start-date=\"calendarDates.start\"\n :timezone=\"user.timezone\"\n :workouts=\"calendarWorkouts\"\n :weekStartingMonday=\"user.weekm\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { addMonths, format, subMonths } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import CalendarCells from '@/components/Dashboard/UserCalendar/CalendarCells.vue'\n import CalendarDays from '@/components/Dashboard/UserCalendar/CalendarDays.vue'\n import CalendarHeader from '@/components/Dashboard/UserCalendar/CalendarHeader.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getCalendarStartAndEnd } from '@/utils/dates'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'UserCalendar',\n components: {\n CalendarCells,\n CalendarDays,\n CalendarHeader,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n onBeforeMount(() => getCalendarWorkouts())\n\n const dateFormat = 'yyyy-MM-dd'\n let day = ref(new Date())\n let calendarDates = ref(\n getCalendarStartAndEnd(day.value, props.user.weekm)\n )\n const calendarWorkouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.CALENDAR_WORKOUTS]\n )\n\n function getCalendarWorkouts() {\n calendarDates.value = getCalendarStartAndEnd(\n day.value,\n props.user.weekm\n )\n const apiParams: TWorkoutsPayload = {\n from: format(calendarDates.value.start, dateFormat),\n to: format(calendarDates.value.end, dateFormat),\n page: 1,\n per_page: 100,\n ...defaultOrder,\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_CALENDAR_WORKOUTS, apiParams)\n }\n\n function displayNextMonth() {\n day.value = addMonths(day.value, 1)\n getCalendarWorkouts()\n }\n function displayPreviousMonth() {\n day.value = subMonths(day.value, 1)\n getCalendarWorkouts()\n }\n\n return {\n day,\n calendarDates,\n calendarWorkouts,\n displayNextMonth,\n displayPreviousMonth,\n }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n #user-calendar {\n .calendar-card {\n padding: 0;\n\n .card-content {\n padding: 0;\n }\n }\n }\n</style>\n","<template>\n <div class=\"calendar-cells\">\n <div class=\"calendar-row\" v-for=\"(row, index) in rows\" :key=\"index\">\n <div\n class=\"calendar-cell\"\n :class=\"{\n 'disabled-cell': !isSameMonth(day, currentDay),\n 'week-end': isWeekEnd(i),\n today: isToday(day),\n }\"\n v-for=\"(day, i) in row\"\n :key=\"i\"\n >\n <CalendarWorkouts\n :workouts=\"filterWorkouts(day, workouts)\"\n :sports=\"sports\"\n />\n <div class=\"calendar-cell-day\">\n {{ format(day, 'd') }}\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { addDays, format, isSameDay, isSameMonth, isToday } from 'date-fns'\n import {\n PropType,\n Ref,\n defineComponent,\n ref,\n toRefs,\n watch,\n onMounted,\n } from 'vue'\n\n import CalendarWorkouts from '@/components/Dashboard/UserCalendar/CalendarWorkouts.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'CalendarCells',\n components: {\n CalendarWorkouts,\n },\n props: {\n currentDay: {\n type: Date,\n required: true,\n },\n endDate: {\n type: Date,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n startDate: {\n type: Date,\n required: true,\n },\n timezone: {\n type: String,\n required: true,\n },\n weekStartingMonday: {\n type: Boolean,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup(props) {\n const rows: Ref<Date[][]> = ref([])\n let { startDate, endDate, weekStartingMonday } = toRefs(props)\n\n onMounted(() => getDays())\n\n function getDays() {\n rows.value = []\n let day = startDate.value\n while (day <= endDate.value) {\n const days: Date[] = []\n for (let i = 0; i < 7; i++) {\n days.push(day)\n day = addDays(day, 1)\n }\n rows.value.push(days)\n }\n }\n\n function isWeekEnd(day: number): boolean {\n return weekStartingMonday.value\n ? [5, 6].includes(day)\n : [0, 6].includes(day)\n }\n\n function filterWorkouts(day: Date, workouts: IWorkout[]) {\n if (workouts) {\n return workouts\n .filter((workout) =>\n isSameDay(\n getDateWithTZ(workout.workout_date, props.timezone),\n day\n )\n )\n .reverse()\n }\n return []\n }\n\n watch(\n () => props.currentDay,\n () => getDays()\n )\n\n return { rows, format, isSameMonth, isToday, isWeekEnd, filterWorkouts }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-cells {\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .calendar-row {\n display: flex;\n flex-wrap: wrap;\n border-top: solid 1px var(--calendar-border-color);\n\n .calendar-cell {\n border-right: solid 1px var(--calendar-border-color);\n height: 40px;\n flex-grow: 1;\n flex-basis: 8%;\n padding: $default-padding * 0.5 $default-padding $default-padding * 0.5\n $default-padding * 0.5;\n width: 8%;\n position: relative;\n\n .calendar-cell-day {\n position: absolute;\n font-size: 0.8em;\n line-height: 1;\n top: 0.5em;\n right: 0.5em;\n font-weight: bold;\n }\n }\n .calendar-cell:last-child {\n border-right: 0;\n @media screen and (max-width: $small-limit) {\n .calendar-workouts {\n .more-workouts {\n left: -45px;\n }\n }\n }\n }\n .disabled-cell {\n color: var(--app-color-light);\n }\n .week-end {\n background: var(--calendar-week-end-color);\n }\n .today {\n background: var(--calendar-today-color);\n }\n }\n @media screen and (max-width: $small-limit) {\n .calendar-row:last-child {\n .calendar-workouts {\n .more-workouts {\n top: inherit;\n bottom: 20px;\n }\n }\n }\n }\n }\n</style>\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import isSameDay from \"../isSameDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is today\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * var result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\n\nexport default function isToday(dirtyDate) {\n requiredArgs(1, arguments);\n return isSameDay(dirtyDate, Date.now());\n}","<template>\n <div class=\"calendar-workouts\">\n <div class=\"desktop-display\">\n <div\n class=\"workouts-display\"\n v-if=\"workouts.length <= displayedWorkoutCount\"\n >\n <CalendarWorkout\n v-for=\"(workout, index) in workouts.slice(0, displayedWorkoutCount)\"\n :key=\"index\"\n :workout=\"workout\"\n :sportLabel=\"getSportLabel(workout, sports)\"\n />\n </div>\n <div v-else class=\"donut-display\">\n <CalendarWorkoutsChart\n :workouts=\"workouts\"\n :sports=\"sports\"\n :datasets=\"chartDatasets\"\n :colors=\"colors\"\n />\n </div>\n </div>\n <div class=\"mobile-display\">\n <div class=\"donut-display\" v-if=\"workouts.length > 0\">\n <CalendarWorkoutsChart\n :workouts=\"workouts\"\n :sports=\"sports\"\n :datasets=\"chartDatasets\"\n :colors=\"colors\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, computed, defineComponent } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import CalendarWorkoutsChart from '@/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel, sportIdColors } from '@/utils/sports'\n import { getDonutDatasets } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkouts',\n components: {\n CalendarWorkout,\n CalendarWorkoutsChart,\n },\n props: {\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n setup(props) {\n return {\n chartDatasets: computed(() => getDonutDatasets(props.workouts)),\n colors: computed(() => sportIdColors(props.sports)),\n displayedWorkoutCount: 6,\n getSportLabel,\n }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-workouts {\n .desktop-display {\n display: flex;\n }\n .mobile-display {\n display: none;\n }\n\n .workouts-display {\n display: flex;\n flex-wrap: wrap;\n position: relative;\n margin: 0 $default-padding 0 0;\n }\n .donut-display {\n display: flex;\n height: 34px;\n width: 34px;\n }\n\n @media screen and (max-width: $small-limit) {\n .desktop-display {\n display: none;\n }\n .mobile-display {\n display: flex;\n }\n }\n }\n</style>\n","<template>\n <div\n class=\"calendar-workout\"\n @click=\"\n $router.push({ name: 'Workout', params: { workoutId: workout.id } })\n \"\n >\n <SportImage :sport-label=\"sportLabel\" :title=\"workout.title\" />\n <sup>\n <i\n v-if=\"workout.records.length > 0\"\n class=\"fa fa-trophy custom-fa-small\"\n aria-hidden=\"true\"\n :title=\"\n workout.records.map(\n (record) => ` ${t(`workouts.RECORD_${record.record_type}`)}`\n )\n \"\n />\n </sup>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWorkout } from '@/types/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkout',\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: true,\n },\n sportLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n\n .calendar-workout {\n display: flex;\n padding: 1px;\n cursor: pointer;\n .sport-img {\n width: 18px;\n height: 18px;\n }\n sup {\n position: relative;\n top: -8px;\n left: -3px;\n width: 2px;\n .custom-fa-small {\n font-size: 0.7em;\n }\n }\n\n @media screen and (max-width: $small-limit) {\n .sport-img {\n padding: 3px;\n width: 20px;\n height: 20px;\n }\n sup {\n .custom-fa-small {\n font-size: 0.6em;\n }\n }\n }\n }\n</style>\n","\n import { defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWorkout } from '@/types/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkout',\n props: {\n workout: {\n type: Object as PropType<IWorkout>,\n required: true,\n },\n sportLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n","import { render } from \"./CalendarWorkout.vue?vue&type=template&id=cf219d62\"\nimport script from \"./CalendarWorkout.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarWorkout.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarWorkout.vue?vue&type=style&index=0&id=cf219d62&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"calendar-workouts-chart\">\n <div class=\"workouts-chart\" @click=\"togglePane\">\n <div class=\"workouts-count\">{{ workouts.length }}</div>\n <DonutChart :datasets=\"datasets\" :colors=\"colors\" />\n </div>\n <div class=\"workouts-pane\" v-if=\"!isHidden\">\n <div class=\"more-workouts\" v-click-outside=\"togglePane\">\n <i\n class=\"fa fa-times calendar-more\"\n aria-hidden=\"true\"\n @click=\"togglePane\"\n />\n <CalendarWorkout\n v-for=\"(workout, index) in workouts\"\n :key=\"index\"\n :workout=\"workout\"\n :sportLabel=\"getSportLabel(workout, sports)\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, defineComponent, ref } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import DonutChart from '@/components/Dashboard/UserCalendar/DonutChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel } from '@/utils/sports'\n\n export default defineComponent({\n name: 'CalendarWorkoutsChart',\n components: {\n CalendarWorkout,\n DonutChart,\n },\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup() {\n const isHidden = ref(true)\n function togglePane(event: Event & { target: HTMLElement }) {\n event.stopPropagation()\n isHidden.value = !isHidden.value\n }\n return { isHidden, getSportLabel, togglePane }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n .calendar-workouts-chart {\n display: flex;\n\n .workouts-chart {\n position: relative;\n .workouts-count {\n display: flex;\n justify-content: center;\n position: absolute;\n top: 4px;\n left: 6px;\n width: 20px;\n font-size: 1.1em;\n font-weight: bold;\n }\n @media screen and (max-width: $small-limit) {\n .workouts-count {\n top: 16px;\n left: 6px;\n }\n ::v-deep(.donut-chart) {\n padding-top: 12px;\n svg g circle {\n stroke-width: 2;\n stroke-opacity: 0.8;\n }\n }\n }\n }\n\n .workouts-pane {\n display: flex;\n padding-left: 40px;\n\n .more-workouts {\n background: whitesmoke;\n border-radius: 4px;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),\n 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n position: absolute;\n top: 52px;\n left: 0;\n min-width: 60px;\n @media screen and (max-width: $small-limit) {\n min-width: 70px;\n }\n\n margin-bottom: 20px;\n padding: 10px 10px;\n\n display: flex;\n flex-wrap: wrap;\n z-index: 1000;\n\n .calendar-more {\n position: absolute;\n font-size: 0.9em;\n top: 5px;\n right: 5px;\n }\n }\n }\n }\n</style>\n","// adapted from: https://css-tricks.com/building-a-donut-chart-with-vue-and-svg/\n<template>\n <div class=\"donut-chart\">\n <svg height=\"34\" width=\"34\" viewBox=\"0 0 34 34\">\n <g v-for=\"(data, index) of Object.entries(datasets)\" :key=\"index\">\n <circle\n :cx=\"cx\"\n :cy=\"cy\"\n :r=\"radius\"\n fill=\"transparent\"\n :stroke=\"colors[+data[0]]\"\n :stroke-dashoffset=\"\n calculateStrokeDashOffset(data[1].percentage, circumference)\n \"\n :stroke-dasharray=\"circumference\"\n stroke-width=\"3\"\n stroke-opacity=\"0.8\"\n :transform=\"returnCircleTransformValue(index, data[1].percentage)\"\n />\n </g>\n </svg>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'DonutChart',\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n },\n setup() {\n let angleOffset = -90\n const cx = 16\n const cy = 16\n const radius = 14\n const circumference = 2 * Math.PI * radius\n\n function calculateStrokeDashOffset(\n percentage: number,\n circumference: number\n ): number {\n return circumference - percentage * circumference\n }\n function returnCircleTransformValue(\n index: number,\n percentage: number\n ): string {\n const rotation = `rotate(${angleOffset}, ${cx}, ${cy})`\n angleOffset = percentage * 360 + angleOffset\n return rotation\n }\n\n return {\n angleOffset,\n circumference,\n cx,\n cy,\n radius,\n calculateStrokeDashOffset,\n returnCircleTransformValue,\n }\n },\n })\n</script>\n","\n import { PropType, defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'DonutChart',\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n },\n setup() {\n let angleOffset = -90\n const cx = 16\n const cy = 16\n const radius = 14\n const circumference = 2 * Math.PI * radius\n\n function calculateStrokeDashOffset(\n percentage: number,\n circumference: number\n ): number {\n return circumference - percentage * circumference\n }\n function returnCircleTransformValue(\n index: number,\n percentage: number\n ): string {\n const rotation = `rotate(${angleOffset}, ${cx}, ${cy})`\n angleOffset = percentage * 360 + angleOffset\n return rotation\n }\n\n return {\n angleOffset,\n circumference,\n cx,\n cy,\n radius,\n calculateStrokeDashOffset,\n returnCircleTransformValue,\n }\n },\n })\n","import { render } from \"./DonutChart.vue?vue&type=template&id=76d4f86b\"\nimport script from \"./DonutChart.vue?vue&type=script&lang=ts\"\nexport * from \"./DonutChart.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","\n import { PropType, defineComponent, ref } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import DonutChart from '@/components/Dashboard/UserCalendar/DonutChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel } from '@/utils/sports'\n\n export default defineComponent({\n name: 'CalendarWorkoutsChart',\n components: {\n CalendarWorkout,\n DonutChart,\n },\n props: {\n colors: {\n type: Object as PropType<Record<number, string>>,\n required: true,\n },\n datasets: {\n type: Object as PropType<Record<number, Record<string, number>>>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup() {\n const isHidden = ref(true)\n function togglePane(event: Event & { target: HTMLElement }) {\n event.stopPropagation()\n isHidden.value = !isHidden.value\n }\n return { isHidden, getSportLabel, togglePane }\n },\n })\n","import { render } from \"./CalendarWorkoutsChart.vue?vue&type=template&id=b30dea28&scoped=true\"\nimport script from \"./CalendarWorkoutsChart.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarWorkoutsChart.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarWorkoutsChart.vue?vue&type=style&index=0&id=b30dea28&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-b30dea28\"\n\nexport default script","\n import { PropType, computed, defineComponent } from 'vue'\n\n import CalendarWorkout from '@/components/Dashboard/UserCalendar/CalendarWorkout.vue'\n import CalendarWorkoutsChart from '@/components/Dashboard/UserCalendar/CalendarWorkoutsChart.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getSportLabel, sportIdColors } from '@/utils/sports'\n import { getDonutDatasets } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'CalendarWorkouts',\n components: {\n CalendarWorkout,\n CalendarWorkoutsChart,\n },\n props: {\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n setup(props) {\n return {\n chartDatasets: computed(() => getDonutDatasets(props.workouts)),\n colors: computed(() => sportIdColors(props.sports)),\n displayedWorkoutCount: 6,\n getSportLabel,\n }\n },\n })\n","import { render } from \"./CalendarWorkouts.vue?vue&type=template&id=3822f77d\"\nimport script from \"./CalendarWorkouts.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarWorkouts.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarWorkouts.vue?vue&type=style&index=0&id=3822f77d&lang=scss\"\nscript.render = render\n\nexport default script","\n import { addDays, format, isSameDay, isSameMonth, isToday } from 'date-fns'\n import {\n PropType,\n Ref,\n defineComponent,\n ref,\n toRefs,\n watch,\n onMounted,\n } from 'vue'\n\n import CalendarWorkouts from '@/components/Dashboard/UserCalendar/CalendarWorkouts.vue'\n import { ISport } from '@/types/sports'\n import { IWorkout } from '@/types/workouts'\n import { getDateWithTZ } from '@/utils/dates'\n\n export default defineComponent({\n name: 'CalendarCells',\n components: {\n CalendarWorkouts,\n },\n props: {\n currentDay: {\n type: Date,\n required: true,\n },\n endDate: {\n type: Date,\n required: true,\n },\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n startDate: {\n type: Date,\n required: true,\n },\n timezone: {\n type: String,\n required: true,\n },\n weekStartingMonday: {\n type: Boolean,\n required: true,\n },\n workouts: {\n type: Object as PropType<IWorkout[]>,\n required: true,\n },\n },\n setup(props) {\n const rows: Ref<Date[][]> = ref([])\n let { startDate, endDate, weekStartingMonday } = toRefs(props)\n\n onMounted(() => getDays())\n\n function getDays() {\n rows.value = []\n let day = startDate.value\n while (day <= endDate.value) {\n const days: Date[] = []\n for (let i = 0; i < 7; i++) {\n days.push(day)\n day = addDays(day, 1)\n }\n rows.value.push(days)\n }\n }\n\n function isWeekEnd(day: number): boolean {\n return weekStartingMonday.value\n ? [5, 6].includes(day)\n : [0, 6].includes(day)\n }\n\n function filterWorkouts(day: Date, workouts: IWorkout[]) {\n if (workouts) {\n return workouts\n .filter((workout) =>\n isSameDay(\n getDateWithTZ(workout.workout_date, props.timezone),\n day\n )\n )\n .reverse()\n }\n return []\n }\n\n watch(\n () => props.currentDay,\n () => getDays()\n )\n\n return { rows, format, isSameMonth, isToday, isWeekEnd, filterWorkouts }\n },\n })\n","import { render } from \"./CalendarCells.vue?vue&type=template&id=17e3f666\"\nimport script from \"./CalendarCells.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarCells.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarCells.vue?vue&type=style&index=0&id=17e3f666&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"calendar-days\">\n <div class=\"calendar-day\" v-for=\"(day, index) in days\" :key=\"index\">\n {{ format(day, 'EEE', localeOptions) }}\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { format, addDays } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarDays',\n props: {\n startDate: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n setup(props) {\n const days = []\n for (let i = 0; i < 7; i++) {\n days.push(addDays(props.startDate, i))\n }\n return { days, addDays, format }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-days {\n display: flex;\n flex-direction: row;\n border-top: solid 1px var(--calendar-border-color);\n\n .calendar-day {\n flex-grow: 1;\n padding: $default-padding * 0.5;\n text-align: center;\n text-transform: uppercase;\n color: var(--app-color-light);\n }\n }\n</style>\n","\n import { format, addDays } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarDays',\n props: {\n startDate: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n setup(props) {\n const days = []\n for (let i = 0; i < 7; i++) {\n days.push(addDays(props.startDate, i))\n }\n return { days, addDays, format }\n },\n })\n","import { render } from \"./CalendarDays.vue?vue&type=template&id=8c842a34\"\nimport script from \"./CalendarDays.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarDays.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarDays.vue?vue&type=style&index=0&id=8c842a34&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"calendar-header\">\n <div\n class=\"calendar-arrow calendar-arrow-left\"\n @click=\"emit('displayPreviousMonth')\"\n >\n <i class=\"fa fa-chevron-left\" aria-hidden=\"true\" />\n </div>\n <div class=\"calendar-month\">\n <span>\n {{ format(day, 'MMM yyyy', localeOptions) }}\n </span>\n </div>\n <div\n class=\"calendar-arrow calendar-arrow-right\"\n @click=\"emit('displayNextMonth')\"\n >\n <i class=\"fa fa-chevron-right\" aria-hidden=\"true\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { format } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarHeader',\n props: {\n day: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n emits: ['displayNextMonth', 'displayPreviousMonth'],\n setup(props, { emit }) {\n return { emit, format }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n .calendar-header {\n display: flex;\n flex-direction: row;\n\n .calendar-arrow,\n .calendar-month {\n flex-grow: 1;\n padding: $default-padding;\n }\n .calendar-arrow-left {\n text-align: left;\n cursor: pointer;\n }\n .calendar-arrow-right {\n text-align: right;\n cursor: pointer;\n }\n .calendar-month {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n }\n }\n</style>\n","\n import { format } from 'date-fns'\n import { defineComponent } from 'vue'\n\n export default defineComponent({\n name: 'CalendarHeader',\n props: {\n day: {\n type: Date,\n required: true,\n },\n localeOptions: {\n type: String,\n required: true,\n },\n },\n emits: ['displayNextMonth', 'displayPreviousMonth'],\n setup(props, { emit }) {\n return { emit, format }\n },\n })\n","import { render } from \"./CalendarHeader.vue?vue&type=template&id=4eabec52\"\nimport script from \"./CalendarHeader.vue?vue&type=script&lang=ts\"\nexport * from \"./CalendarHeader.vue?vue&type=script&lang=ts\"\n\nimport \"./CalendarHeader.vue?vue&type=style&index=0&id=4eabec52&lang=scss\"\nscript.render = render\n\nexport default script","\n import { addMonths, format, subMonths } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n computed,\n defineComponent,\n ref,\n onBeforeMount,\n } from 'vue'\n\n import CalendarCells from '@/components/Dashboard/UserCalendar/CalendarCells.vue'\n import CalendarDays from '@/components/Dashboard/UserCalendar/CalendarDays.vue'\n import CalendarHeader from '@/components/Dashboard/UserCalendar/CalendarHeader.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getCalendarStartAndEnd } from '@/utils/dates'\n import { defaultOrder } from '@/utils/workouts'\n\n export default defineComponent({\n name: 'UserCalendar',\n components: {\n CalendarCells,\n CalendarDays,\n CalendarHeader,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const store = useStore()\n\n onBeforeMount(() => getCalendarWorkouts())\n\n const dateFormat = 'yyyy-MM-dd'\n let day = ref(new Date())\n let calendarDates = ref(\n getCalendarStartAndEnd(day.value, props.user.weekm)\n )\n const calendarWorkouts: ComputedRef<IWorkout[]> = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.CALENDAR_WORKOUTS]\n )\n\n function getCalendarWorkouts() {\n calendarDates.value = getCalendarStartAndEnd(\n day.value,\n props.user.weekm\n )\n const apiParams: TWorkoutsPayload = {\n from: format(calendarDates.value.start, dateFormat),\n to: format(calendarDates.value.end, dateFormat),\n page: 1,\n per_page: 100,\n ...defaultOrder,\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_CALENDAR_WORKOUTS, apiParams)\n }\n\n function displayNextMonth() {\n day.value = addMonths(day.value, 1)\n getCalendarWorkouts()\n }\n function displayPreviousMonth() {\n day.value = subMonths(day.value, 1)\n getCalendarWorkouts()\n }\n\n return {\n day,\n calendarDates,\n calendarWorkouts,\n displayNextMonth,\n displayPreviousMonth,\n }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=702a8534\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=702a8534&lang=scss\"\nscript.render = render\n\nexport default script","<template>\n <div class=\"user-month-stats\">\n <Card>\n <template #title>{{ $t('dashboard.THIS_MONTH') }}</template>\n <template #content>\n <StatChart\n :sports=\"sports\"\n :user=\"user\"\n :chart-params=\"chartParams\"\n :displayed-sport-ids=\"selectedSportIds\"\n :hide-chart-if-no-data=\"true\"\n />\n </template>\n </Card>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { endOfMonth, startOfMonth } from 'date-fns'\n import { PropType, defineComponent } from 'vue'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n StatChart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const date = new Date()\n return {\n chartParams: {\n duration: 'week',\n start: startOfMonth(date),\n end: endOfMonth(date),\n },\n selectedSportIds: props.sports.map((sport) => sport.id),\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .user-month-stats {\n ::v-deep(.card-content) {\n padding: $default-padding;\n }\n }\n</style>\n","\n import { endOfMonth, startOfMonth } from 'date-fns'\n import { PropType, defineComponent } from 'vue'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n StatChart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const date = new Date()\n return {\n chartParams: {\n duration: 'week',\n start: startOfMonth(date),\n end: endOfMonth(date),\n },\n selectedSportIds: props.sports.map((sport) => sport.id),\n }\n },\n })\n","import { render } from \"./UserMonthStats.vue?vue&type=template&id=7958b39f&scoped=true\"\nimport script from \"./UserMonthStats.vue?vue&type=script&lang=ts\"\nexport * from \"./UserMonthStats.vue?vue&type=script&lang=ts\"\n\nimport \"./UserMonthStats.vue?vue&type=style&index=0&id=7958b39f&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-7958b39f\"\n\nexport default script","<template>\n <div class=\"user-records-section\">\n <div class=\"section-title\">\n <i class=\"fa fa-trophy custom-fa-small\" aria-hidden=\"true\" />\n {{ $t('workouts.RECORD', 2) }}\n </div>\n <div class=\"user-records\">\n <div v-if=\"Object.keys(recordsBySport).length === 0\" class=\"no-records\">\n {{ $t('workouts.NO_RECORDS') }}\n </div>\n <RecordsCard\n v-for=\"sportTranslatedLabel in Object.keys(recordsBySport).sort()\"\n :sportTranslatedLabel=\"sportTranslatedLabel\"\n :records=\"recordsBySport[sportTranslatedLabel]\"\n :key=\"sportTranslatedLabel\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import RecordsCard from '@/components/Dashboard/UserRecords/RecordsCard.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { getRecordsBySports } from '@/utils/records'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'UserRecords',\n components: {\n RecordsCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const recordsBySport = computed(() =>\n getRecordsBySports(\n props.user.records,\n translateSports(props.sports, t),\n props.user.timezone\n )\n )\n return { recordsBySport }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .user-records {\n .no-records {\n border: solid 1px var(--card-border-color);\n border-radius: $border-radius;\n padding: $default-padding;\n margin: $default-margin;\n }\n }\n</style>\n","<template>\n <div class=\"records-card\">\n <Card>\n <template #title>\n <SportImage :sport-label=\"records.label\" />\n {{ sportTranslatedLabel }}\n </template>\n <template #content>\n <div class=\"record\" v-for=\"record in records.records\" :key=\"record.id\">\n <span class=\"record-type\">{{\n t(`workouts.RECORD_${record.record_type}`)\n }}</span>\n <span class=\"record-value\">{{ record.value }}</span>\n <span class=\"record-date\">\n <router-link\n :to=\"{\n name: 'Workout',\n params: { workoutId: record.workout_id },\n }\"\n >{{ record.workout_date }}</router-link\n >\n </span>\n </div>\n </template>\n </Card>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { PropType, defineComponent } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IRecord } from '@/types/workouts'\n\n export default defineComponent({\n name: 'RecordsCard',\n props: {\n records: {\n type: Object as PropType<IRecord[]>,\n required: true,\n },\n sportTranslatedLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .records-card {\n width: 100%;\n padding-bottom: $default-padding * 0.3;\n\n ::v-deep(.card) {\n font-size: 0.9em;\n .card-title {\n display: flex;\n font-size: 0.9em;\n .sport-img {\n padding-right: $default-padding;\n height: 20px;\n width: 20px;\n }\n }\n .card-content {\n font-size: 0.9em;\n padding: $default-padding;\n .record {\n display: flex;\n justify-content: space-between;\n span {\n padding: 2px 5px;\n }\n .record-type {\n flex-grow: 1;\n }\n .record-value {\n font-weight: bold;\n padding-right: $default-padding * 2;\n }\n }\n }\n @media screen and (max-width: $medium-limit) {\n font-size: 1em;\n .card-title {\n font-size: 1em;\n .sport-img {\n height: 22px;\n width: 22px;\n }\n }\n }\n }\n }\n</style>\n","\n import { PropType, defineComponent } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IRecord } from '@/types/workouts'\n\n export default defineComponent({\n name: 'RecordsCard',\n props: {\n records: {\n type: Object as PropType<IRecord[]>,\n required: true,\n },\n sportTranslatedLabel: {\n type: String,\n required: true,\n },\n },\n setup() {\n const { t } = useI18n()\n return { t }\n },\n })\n","import { render } from \"./RecordsCard.vue?vue&type=template&id=db29ce96&scoped=true\"\nimport script from \"./RecordsCard.vue?vue&type=script&lang=ts\"\nexport * from \"./RecordsCard.vue?vue&type=script&lang=ts\"\n\nimport \"./RecordsCard.vue?vue&type=style&index=0&id=db29ce96&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-db29ce96\"\n\nexport default script","import { ITranslatedSport } from '@/types/sports'\nimport { IRecord, IRecordsBySports } from '@/types/workouts'\nimport { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n\nexport const formatRecord = (\n record: IRecord,\n tz: string\n): Record<string, string | number> => {\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 case 'LD':\n value = record.value\n break\n default:\n throw new Error(\n `Invalid record type, expected: \"AS\", \"FD\", \"LD\", \"MD\", got: \"${record.record_type}\"`\n )\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: record.record_type,\n value: value,\n }\n}\n\nexport const getRecordsBySports = (\n records: IRecord[],\n translatedSports: ITranslatedSport[],\n tz: string\n): IRecordsBySports =>\n records.reduce((sportList: IRecordsBySports, record) => {\n const sport = translatedSports.find((s) => s.id === record.sport_id)\n if (sport && sport.label) {\n if (sportList[sport.translatedLabel] === void 0) {\n sportList[sport.translatedLabel] = {\n label: sport.label,\n records: [],\n }\n }\n sportList[sport.translatedLabel].records.push(formatRecord(record, tz))\n }\n return sportList\n }, {})\n","\n import { computed, defineComponent, PropType } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import RecordsCard from '@/components/Dashboard/UserRecords/RecordsCard.vue'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { getRecordsBySports } from '@/utils/records'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'UserRecords',\n components: {\n RecordsCard,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const recordsBySport = computed(() =>\n getRecordsBySports(\n props.user.records,\n translateSports(props.sports, t),\n props.user.timezone\n )\n )\n return { recordsBySport }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=080b37ac&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=080b37ac&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-080b37ac\"\n\nexport default script","<template>\n <div id=\"user-stats\">\n <StatCard\n icon=\"calendar\"\n :value=\"user.nb_workouts\"\n :text=\"$t('workouts.WORKOUT', user.nb_workouts)\"\n />\n <StatCard\n icon=\"road\"\n :value=\"Number(user.total_distance).toFixed(2)\"\n :text=\"$t('workouts.KM')\"\n />\n <StatCard\n icon=\"clock-o\"\n :value=\"total_duration.days\"\n :text=\"total_duration.duration\"\n />\n <StatCard\n icon=\"tags\"\n :value=\"user.nb_sports\"\n :text=\"$t('workouts.SPORT', user.nb_sports)\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, PropType, defineComponent, computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatCard from '@/components/Common/StatCard.vue'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserStatsCards',\n components: {\n StatCard,\n },\n props: {\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const total_duration: ComputedRef<string> = computed(\n () => props.user.total_duration\n )\n\n function get_duration(total_duration: ComputedRef<string>) {\n const duration = total_duration.value.match(/day/g)\n ? total_duration.value.split(', ')[1]\n : total_duration.value\n return {\n days: total_duration.value.match(/day/g)\n ? `${total_duration.value.split(' ')[0]} ${\n total_duration.value.match(/days/g)\n ? t('common.DAY', 2)\n : t('common.DAY', 1)\n }`\n : `0 ${t('common.DAY', 2)},`,\n duration: `${duration.split(':')[0]}h ${duration.split(':')[1]}min`,\n }\n }\n\n return { total_duration: computed(() => get_duration(total_duration)) }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n #user-stats {\n display: flex;\n flex: 1 0 25%;\n justify-content: space-around;\n flex-wrap: wrap;\n }\n</style>\n","\n import { ComputedRef, PropType, defineComponent, computed } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatCard from '@/components/Common/StatCard.vue'\n import { IUserProfile } from '@/types/user'\n\n export default defineComponent({\n name: 'UserStatsCards',\n components: {\n StatCard,\n },\n props: {\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n const total_duration: ComputedRef<string> = computed(\n () => props.user.total_duration\n )\n\n function get_duration(total_duration: ComputedRef<string>) {\n const duration = total_duration.value.match(/day/g)\n ? total_duration.value.split(', ')[1]\n : total_duration.value\n return {\n days: total_duration.value.match(/day/g)\n ? `${total_duration.value.split(' ')[0]} ${\n total_duration.value.match(/days/g)\n ? t('common.DAY', 2)\n : t('common.DAY', 1)\n }`\n : `0 ${t('common.DAY', 2)},`,\n duration: `${duration.split(':')[0]}h ${duration.split(':')[1]}min`,\n }\n }\n\n return { total_duration: computed(() => get_duration(total_duration)) }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=082d819e\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=082d819e&lang=scss\"\nscript.render = render\n\nexport default script","\n import { ComputedRef, Ref, computed, defineComponent, ref } from 'vue'\n\n import Timeline from '@/components/Dashboard/Timeline.vue'\n import UserCalendar from '@/components/Dashboard/UserCalendar/index.vue'\n import UserMonthStats from '@/components/Dashboard/UserMonthStats.vue'\n import UserRecords from '@/components/Dashboard/UserRecords/index.vue'\n import UserStatsCards from '@/components/Dashboard/UserStatsCards/index.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'Dashboard',\n components: {\n Timeline,\n UserCalendar,\n UserMonthStats,\n UserRecords,\n UserStatsCards,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const isSelected: Ref<string> = ref('chart')\n\n function updateDisplayColumn(target: string) {\n isSelected.value = target\n }\n\n return { authUser, sports, isSelected, updateDisplayColumn }\n },\n })\n","import { render } from \"./Dashboard.vue?vue&type=template&id=ad6483fc&scoped=true\"\nimport script from \"./Dashboard.vue?vue&type=script&lang=ts\"\nexport * from \"./Dashboard.vue?vue&type=script&lang=ts\"\n\nimport \"./Dashboard.vue?vue&type=style&index=0&id=ad6483fc&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-ad6483fc\"\n\nexport default script","import toInteger from \"../_lib/toInteger/index.js\";\nimport addYears from \"../addYears/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\n\nexport default function subYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addYears(dirtyDate, -amount);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\n\nexport default function endOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n date.setFullYear(year + 1, 0, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n var days = amount * 7;\n return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addWeeks from \"../addWeeks/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\n\nexport default function subWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addWeeks(dirtyDate, -amount);\n}","import {\n addMonths,\n addWeeks,\n addYears,\n endOfMonth,\n endOfWeek,\n endOfYear,\n format,\n startOfMonth,\n startOfWeek,\n startOfYear,\n subMonths,\n subWeeks,\n subYears,\n} from 'date-fns'\n\nimport { IChartDataset } from '@/types/chart'\nimport { ISport } from '@/types/sports'\nimport {\n IStatisticsChartData,\n IStatisticsDateParams,\n TStatisticsDatasetKeys,\n TStatisticsDatasets,\n TStatisticsFromApi,\n} from '@/types/statistics'\nimport { incrementDate, getStartDate } from '@/utils/dates'\nimport { sportColors } from '@/utils/sports'\n\nconst dateFormats: Record<string, Record<string, string>> = {\n week: {\n api: 'yyyy-MM-dd',\n chart: 'dd/MM/yyyy',\n },\n month: {\n api: 'yyyy-MM',\n chart: 'MM/yyyy',\n },\n year: {\n api: 'yyyy',\n chart: 'yyyy',\n },\n}\n\nexport const datasetKeys: TStatisticsDatasetKeys[] = [\n 'nb_workouts',\n 'total_duration',\n 'total_distance',\n 'total_ascent',\n 'total_descent',\n]\n\nexport const getDateKeys = (\n params: IStatisticsDateParams,\n weekStartingMonday: boolean\n): Date[] => {\n const days = []\n for (\n let day = getStartDate(params.duration, params.start, weekStartingMonday);\n day <= params.end;\n day = incrementDate(params.duration, day)\n ) {\n days.push(day)\n }\n return days\n}\n\nconst getStatisticsChartDataset = (\n sportLabel: string,\n color: string\n): IChartDataset => {\n return {\n label: sportLabel,\n backgroundColor: [color],\n data: [],\n }\n}\n\nexport const getDatasets = (displayedSports: ISport[]): TStatisticsDatasets => {\n const datasets: TStatisticsDatasets = {\n nb_workouts: [],\n total_distance: [],\n total_duration: [],\n total_ascent: [],\n total_descent: [],\n }\n displayedSports.map((sport) => {\n const color = sportColors[sport.label]\n datasets.nb_workouts.push(getStatisticsChartDataset(sport.label, color))\n datasets.total_distance.push(getStatisticsChartDataset(sport.label, color))\n datasets.total_duration.push(getStatisticsChartDataset(sport.label, color))\n datasets.total_ascent.push(getStatisticsChartDataset(sport.label, color))\n datasets.total_descent.push(getStatisticsChartDataset(sport.label, color))\n })\n return datasets\n}\n\nexport const formatStats = (\n params: IStatisticsDateParams,\n weekStartingMonday: boolean,\n sports: ISport[],\n displayedSportsId: number[],\n apiStats: TStatisticsFromApi\n): IStatisticsChartData => {\n const dayKeys = getDateKeys(params, weekStartingMonday)\n const dateFormat = dateFormats[params.duration]\n const displayedSports = sports.filter((sport) =>\n displayedSportsId.includes(sport.id)\n )\n const labels: string[] = []\n const datasets = getDatasets(displayedSports)\n const sportsId: Record<string, number> = {}\n displayedSports.map(\n (displayedSport) => (sportsId[displayedSport.label] = displayedSport.id)\n )\n\n dayKeys.map((key) => {\n const date: string = format(key, dateFormat.api)\n const label: string = format(key, dateFormat.chart)\n labels.push(label)\n datasetKeys.map((datasetKey) => {\n datasets[datasetKey].map((dataset) => {\n dataset.data.push(\n apiStats !== {} &&\n date in apiStats &&\n sportsId[dataset.label] in apiStats[date]\n ? apiStats[date][sportsId[dataset.label]][datasetKey]\n : 0\n )\n })\n })\n })\n return {\n labels,\n datasets,\n }\n}\n\nexport const getStatsDateParams = (\n date: Date,\n timeFrame: string,\n weekStartingMonday: boolean\n): IStatisticsDateParams => {\n const weekStartsOn = weekStartingMonday ? 1 : 0\n const start =\n timeFrame === 'year'\n ? startOfYear(subYears(date, 9))\n : timeFrame === 'week'\n ? startOfWeek(subMonths(date, 2), { weekStartsOn })\n : startOfMonth(subMonths(date, 11)) // month\n const end =\n timeFrame === 'year'\n ? endOfYear(date)\n : timeFrame === 'week'\n ? endOfWeek(date, { weekStartsOn })\n : endOfMonth(date) // month\n return {\n duration: timeFrame,\n end,\n start,\n }\n}\n\nexport const updateChartParams = (\n chartParams: IStatisticsDateParams,\n backward: boolean,\n weekStartingMonday: boolean\n): IStatisticsDateParams => {\n const { duration, start, end } = chartParams\n const weekStartsOn = weekStartingMonday ? 1 : 0\n return {\n duration,\n end:\n duration === 'year'\n ? endOfYear(backward ? subYears(end, 1) : addYears(end, 1))\n : duration === 'week'\n ? endOfWeek(backward ? subWeeks(end, 1) : addWeeks(end, 1), {\n weekStartsOn,\n })\n : endOfMonth(backward ? subMonths(end, 1) : addMonths(end, 1)),\n start:\n duration === 'year'\n ? startOfYear(backward ? subYears(start, 1) : addYears(start, 1))\n : duration === 'week'\n ? startOfWeek(backward ? subWeeks(start, 1) : addWeeks(start, 1), {\n weekStartsOn,\n })\n : startOfMonth(backward ? subMonths(start, 1) : addMonths(start, 1)),\n }\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=dad311d4&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./LoginOrRegister.vue?vue&type=style&index=0&id=66631e9e&lang=scss\"","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line unicorn/no-unsafe-regex -- safe\nmodule.exports = /Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./StatsMenu.vue?vue&type=style&index=0&id=56f0f302&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./StatsSportsMenu.vue?vue&type=style&index=0&id=00cc1862&lang=scss\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=080b37ac&lang=scss&scoped=true\"","<template>\n <div id=\"statistics\" class=\"view\">\n <div class=\"container\" v-if=\"authUser.username\">\n <Card>\n <template #title>{{ $t('statistics.STATISTICS') }}</template>\n <template #content>\n <Statistics\n :class=\"{ 'stats-disabled': authUser.nb_workouts === 0 }\"\n :user=\"authUser\"\n :sports=\"sports\"\n />\n </template>\n </Card>\n <NoWorkouts v-if=\"authUser.nb_workouts === 0\"></NoWorkouts>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, computed, defineComponent } from 'vue'\n\n import Statistics from '@/components/Statistics/index.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'StatisticsView',\n components: {\n NoWorkouts,\n Statistics,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(() =>\n store.getters[SPORTS_STORE.GETTERS.SPORTS].filter((sport) =>\n authUser.value.sports_list.includes(sport.id)\n )\n )\n return { authUser, sports }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n #statistics {\n display: flex;\n width: 100%;\n .container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n }\n</style>\n","<template>\n <div id=\"user-statistics\" v-if=\"translatedSports\">\n <StatsMenu\n @timeFrameUpdate=\"updateTimeFrame\"\n @arrowClick=\"handleOnClickArrows\"\n />\n <StatChart\n :sports=\"sports\"\n :user=\"user\"\n :chartParams=\"chartParams\"\n :displayed-sport-ids=\"selectedSportIds\"\n :fullStats=\"true\"\n />\n <SportsMenu\n :selected-sport-ids=\"selectedSportIds\"\n :user-sports=\"sports\"\n @selectedSportIdsUpdate=\"updateSelectedSportIds\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import StatsMenu from '@/components/Statistics/StatsMenu.vue'\n import SportsMenu from '@/components/Statistics/StatsSportsMenu.vue'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IStatisticsDateParams } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { getStatsDateParams, updateChartParams } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'Statistics',\n components: {\n SportsMenu,\n StatChart,\n StatsMenu,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n const chartParams: Ref<IStatisticsDateParams> = ref(\n getChartParams(selectedTimeFrame.value)\n )\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.sports, t)\n )\n const selectedSportIds: Ref<number[]> = ref(getSports(props.sports))\n\n function updateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n chartParams.value = getChartParams(selectedTimeFrame.value)\n }\n function getChartParams(timeFrame: string): IStatisticsDateParams {\n return getStatsDateParams(new Date(), timeFrame, props.user.weekm)\n }\n function handleOnClickArrows(backward: boolean) {\n chartParams.value = updateChartParams(\n chartParams.value,\n backward,\n props.user.weekm\n )\n }\n function getSports(sports: ISport[]) {\n return sports.map((sport) => sport.id)\n }\n function updateSelectedSportIds(sportId: number) {\n if (selectedSportIds.value.includes(sportId)) {\n selectedSportIds.value = selectedSportIds.value.filter(\n (id) => id !== sportId\n )\n } else {\n selectedSportIds.value.push(sportId)\n }\n }\n\n watch(\n () => props.sports,\n (newSports) => {\n selectedSportIds.value = getSports(newSports)\n }\n )\n\n return {\n chartParams,\n selectedTimeFrame,\n timeFrames,\n translatedSports,\n selectedSportIds,\n handleOnClickArrows,\n updateSelectedSportIds,\n updateTimeFrame,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n #user-statistics {\n &.stats-disabled {\n opacity: 0.3;\n pointer-events: none;\n }\n\n ::v-deep(.chart-radio) {\n justify-content: space-around;\n padding: $default-padding * 3 $default-padding\n $default-padding$default-padding;\n }\n }\n</style>\n","<template>\n <div class=\"chart-menu\">\n <div class=\"chart-arrow\">\n <i\n class=\"fa fa-chevron-left\"\n aria-hidden=\"true\"\n @click=\"emit('arrowClick', true)\"\n />\n </div>\n <div class=\"time-frames custom-checkboxes-group\">\n <div class=\"time-frames-checkboxes custom-checkboxes\">\n <div\n v-for=\"frame in timeFrames\"\n class=\"time-frame custom-checkbox\"\n :key=\"frame\"\n >\n <label>\n <input\n type=\"radio\"\n :id=\"frame\"\n :name=\"frame\"\n :checked=\"selectedTimeFrame === frame\"\n @input=\"onUpdateTimeFrame(frame)\"\n />\n <span>{{ $t(`statistics.TIME_FRAMES.${frame}`) }}</span>\n </label>\n </div>\n </div>\n </div>\n <div class=\"chart-arrow\">\n <i\n class=\"fa fa-chevron-right\"\n aria-hidden=\"true\"\n @click=\"emit('arrowClick', false)\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, ref } from 'vue'\n\n export default defineComponent({\n name: 'StatsMenu',\n emits: ['arrowClick', 'timeFrameUpdate'],\n setup(props, { emit }) {\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n\n function onUpdateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n emit('timeFrameUpdate', timeFrame)\n }\n\n return {\n selectedTimeFrame,\n timeFrames,\n onUpdateTimeFrame,\n emit,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n\n .chart-menu {\n display: flex;\n\n .chart-arrow,\n .time-frames {\n flex-grow: 1;\n text-align: center;\n }\n\n .chart-arrow {\n cursor: pointer;\n }\n }\n</style>\n","\n import { defineComponent, ref } from 'vue'\n\n export default defineComponent({\n name: 'StatsMenu',\n emits: ['arrowClick', 'timeFrameUpdate'],\n setup(props, { emit }) {\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n\n function onUpdateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n emit('timeFrameUpdate', timeFrame)\n }\n\n return {\n selectedTimeFrame,\n timeFrames,\n onUpdateTimeFrame,\n emit,\n }\n },\n })\n","import { render } from \"./StatsMenu.vue?vue&type=template&id=56f0f302&scoped=true\"\nimport script from \"./StatsMenu.vue?vue&type=script&lang=ts\"\nexport * from \"./StatsMenu.vue?vue&type=script&lang=ts\"\n\nimport \"./StatsMenu.vue?vue&type=style&index=0&id=56f0f302&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-56f0f302\"\n\nexport default script","<template>\n <div class=\"sports-menu\">\n <label\n v-for=\"sport in translatedSports\"\n type=\"checkbox\"\n :key=\"sport.id\"\n :style=\"{ color: sportColors[sport.label] }\"\n >\n <input\n type=\"checkbox\"\n :id=\"sport.id\"\n :name=\"sport.label\"\n :checked=\"selectedSportIds.includes(sport.id)\"\n @input=\"updateSelectedSportIds(sport.id)\"\n />\n <SportImage :sport-label=\"sport.label\" />\n <span class=\"sport-label\">{{ sport.translatedLabel }}</span>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ComputedRef, PropType, computed, defineComponent, inject } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'SportsMenu',\n props: {\n selectedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n userSports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n emits: ['selectedSportIdsUpdate'],\n setup(props, { emit }) {\n const { t } = useI18n()\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.userSports, t)\n )\n\n function updateSelectedSportIds(sportId: number) {\n emit('selectedSportIdsUpdate', sportId)\n }\n\n return {\n sportColors: inject('sportColors'),\n translatedSports,\n updateSelectedSportIds,\n }\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base.scss';\n .sports-menu {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: $default-padding;\n @media screen and (max-width: $medium-limit) {\n justify-content: normal;\n }\n\n label {\n display: flex;\n align-items: center;\n font-size: 0.9em;\n font-weight: normal;\n min-width: 120px;\n padding: $default-padding;\n @media screen and (max-width: $medium-limit) {\n min-width: 100px;\n }\n @media screen and (max-width: $x-small-limit) {\n min-width: 20px;\n .sport-label {\n display: none;\n }\n }\n }\n\n .sport-img {\n padding: 3px;\n width: 20px;\n height: 20px;\n }\n }\n</style>\n","\n import { ComputedRef, PropType, computed, defineComponent, inject } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { translateSports } from '@/utils/sports'\n\n export default defineComponent({\n name: 'SportsMenu',\n props: {\n selectedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n userSports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n },\n emits: ['selectedSportIdsUpdate'],\n setup(props, { emit }) {\n const { t } = useI18n()\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.userSports, t)\n )\n\n function updateSelectedSportIds(sportId: number) {\n emit('selectedSportIdsUpdate', sportId)\n }\n\n return {\n sportColors: inject('sportColors'),\n translatedSports,\n updateSelectedSportIds,\n }\n },\n })\n","import { render } from \"./StatsSportsMenu.vue?vue&type=template&id=00cc1862\"\nimport script from \"./StatsSportsMenu.vue?vue&type=script&lang=ts\"\nexport * from \"./StatsSportsMenu.vue?vue&type=script&lang=ts\"\n\nimport \"./StatsSportsMenu.vue?vue&type=style&index=0&id=00cc1862&lang=scss\"\nscript.render = render\n\nexport default script","\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import StatsMenu from '@/components/Statistics/StatsMenu.vue'\n import SportsMenu from '@/components/Statistics/StatsSportsMenu.vue'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IStatisticsDateParams } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { getStatsDateParams, updateChartParams } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'Statistics',\n components: {\n SportsMenu,\n StatChart,\n StatsMenu,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n let selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n const chartParams: Ref<IStatisticsDateParams> = ref(\n getChartParams(selectedTimeFrame.value)\n )\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.sports, t)\n )\n const selectedSportIds: Ref<number[]> = ref(getSports(props.sports))\n\n function updateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n chartParams.value = getChartParams(selectedTimeFrame.value)\n }\n function getChartParams(timeFrame: string): IStatisticsDateParams {\n return getStatsDateParams(new Date(), timeFrame, props.user.weekm)\n }\n function handleOnClickArrows(backward: boolean) {\n chartParams.value = updateChartParams(\n chartParams.value,\n backward,\n props.user.weekm\n )\n }\n function getSports(sports: ISport[]) {\n return sports.map((sport) => sport.id)\n }\n function updateSelectedSportIds(sportId: number) {\n if (selectedSportIds.value.includes(sportId)) {\n selectedSportIds.value = selectedSportIds.value.filter(\n (id) => id !== sportId\n )\n } else {\n selectedSportIds.value.push(sportId)\n }\n }\n\n watch(\n () => props.sports,\n (newSports) => {\n selectedSportIds.value = getSports(newSports)\n }\n )\n\n return {\n chartParams,\n selectedTimeFrame,\n timeFrames,\n translatedSports,\n selectedSportIds,\n handleOnClickArrows,\n updateSelectedSportIds,\n updateTimeFrame,\n }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=dad311d4&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=dad311d4&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-dad311d4\"\n\nexport default script","\n import { ComputedRef, computed, defineComponent } from 'vue'\n\n import Statistics from '@/components/Statistics/index.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n export default defineComponent({\n name: 'StatisticsView',\n components: {\n NoWorkouts,\n Statistics,\n },\n setup() {\n const store = useStore()\n const authUser: ComputedRef<IUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(() =>\n store.getters[SPORTS_STORE.GETTERS.SPORTS].filter((sport) =>\n authUser.value.sports_list.includes(sport.id)\n )\n )\n return { authUser, sports }\n },\n })\n","import { render } from \"./StatisticsView.vue?vue&type=template&id=cdc23a7c&scoped=true\"\nimport script from \"./StatisticsView.vue?vue&type=script&lang=ts\"\nexport * from \"./StatisticsView.vue?vue&type=script&lang=ts\"\n\nimport \"./StatisticsView.vue?vue&type=style&index=0&id=cdc23a7c&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-cdc23a7c\"\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./index.vue?vue&type=style&index=0&id=082d819e&lang=scss\"","<template>\n <div id=\"loginOrRegister\" class=\"view\">\n <div class=\"container\">\n <div class=\"container-sub\">\n <BikePic />\n </div>\n <div class=\"container-sub\">\n <LoginOrRegisterForm :action=\"action\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue'\n\n import BikePic from '@/components/BikePic.vue'\n import LoginOrRegisterForm from '@/components/User/UserAuthForm.vue'\n\n export default defineComponent({\n name: 'NavBar',\n components: {\n BikePic,\n LoginOrRegisterForm,\n },\n props: {\n action: {\n type: String,\n required: true,\n },\n },\n })\n</script>\n\n<style lang=\"scss\">\n @import '~@/scss/base';\n\n #loginOrRegister {\n display: flex;\n height: 100%;\n\n .container {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n margin-bottom: $default-margin * 2;\n width: 100%;\n\n .container-sub {\n min-width: 50%;\n height: 100%;\n }\n }\n @media screen and (max-width: $medium-limit) {\n height: auto;\n .container {\n .container-sub {\n align-items: center;\n .bike-img {\n max-width: 60%;\n }\n }\n }\n }\n @media screen and (max-width: $small-limit) {\n .container {\n flex-direction: column;\n }\n }\n }\n</style>\n","<template>\n <div id=\"about\">\n <img class=\"bike-img\" :src=\"'/img/bike.svg'\" alt=\"mountain bike\" />\n </div>\n</template>\n\n<script>\n export default {\n name: 'About',\n }\n</script>\n\n<style scoped lang=\"scss\">\n @import '~@/scss/base';\n\n #about {\n display: flex;\n justify-content: center;\n\n padding: $default-padding;\n height: 100%;\n\n .bike-img {\n max-width: 40%;\n }\n }\n</style>\n","import { render } from \"./BikePic.vue?vue&type=template&id=645e8c6f&scoped=true\"\nimport script from \"./BikePic.vue?vue&type=script&lang=js\"\nexport * from \"./BikePic.vue?vue&type=script&lang=js\"\n\nimport \"./BikePic.vue?vue&type=style&index=0&id=645e8c6f&scoped=true&lang=scss\"\nscript.render = render\nscript.__scopeId = \"data-v-645e8c6f\"\n\nexport default script","\n import { defineComponent } from 'vue'\n\n import BikePic from '@/components/BikePic.vue'\n import LoginOrRegisterForm from '@/components/User/UserAuthForm.vue'\n\n export default defineComponent({\n name: 'NavBar',\n components: {\n BikePic,\n LoginOrRegisterForm,\n },\n props: {\n action: {\n type: String,\n required: true,\n },\n },\n })\n","import { render } from \"./LoginOrRegister.vue?vue&type=template&id=66631e9e\"\nimport script from \"./LoginOrRegister.vue?vue&type=script&lang=ts\"\nexport * from \"./LoginOrRegister.vue?vue&type=script&lang=ts\"\n\nimport \"./LoginOrRegister.vue?vue&type=style&index=0&id=66631e9e&lang=scss\"\nscript.render = render\n\nexport default script","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./StatisticsView.vue?vue&type=style&index=0&id=cdc23a7c&lang=scss&scoped=true\"","// `Symbol.prototype.description` getter\n// https://tc39.es/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Timeline.vue?vue&type=style&index=0&id=e324c07c&lang=scss&scoped=true\"","<template>\n <div class=\"not-found view\">\n <NotFound />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue'\n\n import NotFound from '@/components/Common/NotFound.vue'\n\n export default defineComponent({\n name: 'NotFoundView',\n components: {\n NotFound,\n },\n })\n</script>\n","\n import { defineComponent } from 'vue'\n\n import NotFound from '@/components/Common/NotFound.vue'\n\n export default defineComponent({\n name: 'NotFoundView',\n components: {\n NotFound,\n },\n })\n","import { render } from \"./NotFoundView.vue?vue&type=template&id=2944cbc5\"\nimport script from \"./NotFoundView.vue?vue&type=script&lang=ts\"\nexport * from \"./NotFoundView.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./CalendarHeader.vue?vue&type=style&index=0&id=4eabec52&lang=scss\"","<template>\n <div class=\"start-chart\">\n <div v-if=\"hideChartIfNoData && emptyStats\">\n {{ $t('workouts.NO_WORKOUTS') }}\n </div>\n <div v-else>\n <div class=\"chart-radio\">\n <label>\n <input\n type=\"radio\"\n name=\"total_distance\"\n :checked=\"displayedData === 'total_distance'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.DISTANCE') }}\n </label>\n <label>\n <input\n type=\"radio\"\n name=\"total_duration\"\n :checked=\"displayedData === 'total_duration'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.DURATION') }}\n </label>\n <label>\n <input\n type=\"radio\"\n name=\"nb_workouts\"\n :checked=\"displayedData === 'nb_workouts'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.WORKOUT', 2) }}\n </label>\n <label v-if=\"fullStats\">\n <input\n type=\"radio\"\n name=\"total_ascent\"\n :checked=\"displayedData === 'total_ascent'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.ASCENT') }}\n </label>\n <label v-if=\"fullStats\">\n <input\n type=\"radio\"\n name=\"total_descent\"\n :checked=\"displayedData === 'total_descent'\"\n @click=\"updateDisplayData\"\n />\n {{ $t('workouts.DESCENT') }}\n </label>\n </div>\n <Chart\n v-if=\"labels.length > 0\"\n :datasets=\"datasets\"\n :labels=\"labels\"\n :displayedData=\"displayedData\"\n :displayedSportIds=\"displayedSportIds\"\n :fullStats=\"fullStats\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { format } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n onBeforeMount,\n } from 'vue'\n\n import Chart from '@/components/Common/StatsChart/Chart.vue'\n import { STATS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import {\n IStatisticsChartData,\n TStatisticsDatasetKeys,\n IStatisticsDateParams,\n TStatisticsFromApi,\n IStatisticsParams,\n } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { formatStats } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n Chart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n chartParams: {\n type: Object as PropType<IStatisticsDateParams>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n fullStats: {\n type: Boolean,\n default: false,\n },\n hideChartIfNoData: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const store = useStore()\n\n let displayedData: Ref<TStatisticsDatasetKeys> = ref('total_distance')\n const statistics: ComputedRef<TStatisticsFromApi> = computed(\n () => store.getters[STATS_STORE.GETTERS.USER_STATS]\n )\n const formattedStats: ComputedRef<IStatisticsChartData> = computed(() =>\n formatStats(\n props.chartParams,\n props.user.weekm,\n props.sports,\n props.displayedSportIds,\n statistics.value\n )\n )\n\n onBeforeMount(() =>\n getStatistics(getApiParams(props.chartParams, props.user))\n )\n\n function getStatistics(apiParams: IStatisticsParams) {\n store.dispatch(STATS_STORE.ACTIONS.GET_USER_STATS, {\n username: props.user.username,\n filterType: 'by_time',\n params: apiParams,\n })\n }\n function updateDisplayData(\n event: Event & {\n target: HTMLInputElement & { name: TStatisticsDatasetKeys }\n }\n ) {\n displayedData.value = event.target.name\n }\n function getApiParams(\n chartParams: IStatisticsDateParams,\n user: IUserProfile\n ): IStatisticsParams {\n return {\n from: format(chartParams.start, 'yyyy-MM-dd'),\n to: format(chartParams.end, 'yyyy-MM-dd'),\n time:\n chartParams.duration === 'week'\n ? `week${user.weekm ? 'm' : ''}`\n : chartParams.duration,\n }\n }\n\n watch(\n () => props.chartParams,\n async (newParams) => {\n getStatistics(getApiParams(newParams, props.user))\n }\n )\n\n return {\n datasets: computed(\n () => formattedStats.value.datasets[displayedData.value]\n ),\n labels: computed(() => formattedStats.value.labels),\n emptyStats: computed(() => Object.keys(statistics.value).length === 0),\n displayedData,\n updateDisplayData,\n }\n },\n })\n</script>\n\n<style lang=\"scss\" scoped>\n @import '~@/scss/base';\n .start-chart {\n .chart-radio {\n display: flex;\n justify-content: space-between;\n padding: $default-padding;\n\n label {\n font-size: 0.85em;\n font-weight: normal;\n }\n }\n }\n</style>\n","<template>\n <div class=\"chart\">\n <BarChart v-bind=\"barChartProps\" class=\"bar-chart\" />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { ChartData, ChartOptions, LayoutItem } from 'chart.js'\n import { ComputedRef, PropType, computed, defineComponent } from 'vue'\n import { BarChart, useBarChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { IChartDataset } from '@/types/chart'\n import { TStatisticsDatasetKeys } from '@/types/statistics'\n import { formatTooltipValue } from '@/utils/tooltip'\n\n export default defineComponent({\n name: 'Chart',\n components: {\n BarChart,\n },\n props: {\n datasets: {\n type: Object as PropType<IChartDataset[]>,\n required: true,\n },\n labels: {\n type: Object as PropType<unknown[]>,\n required: true,\n },\n displayedData: {\n type: String as PropType<TStatisticsDatasetKeys>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n required: true,\n },\n fullStats: {\n type: Boolean,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getNumber(value: any): number {\n return isNaN(value) ? 0 : +value\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getSum(total: any, value: any): number {\n return getNumber(total) + getNumber(value)\n }\n let chartData: ComputedRef<ChartData<'bar'>> = computed(() => ({\n labels: props.labels,\n // workaround to avoid dataset modification\n datasets: JSON.parse(JSON.stringify(props.datasets)),\n }))\n const options = computed<ChartOptions<'bar'>>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: props.fullStats ? 40 : 22,\n },\n },\n scales: {\n x: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n },\n y: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n maxTicksLimit: 6,\n callback: function (value) {\n return formatTooltipValue(props.displayedData, +value, false)\n },\n },\n afterFit: function (scale: LayoutItem) {\n scale.width = props.fullStats ? 75 : 60\n },\n },\n },\n plugins: {\n datalabels: {\n anchor: 'end',\n align: 'end',\n rotation: function (context) {\n return props.fullStats && context.chart.chartArea.width < 580\n ? 310\n : 0\n },\n display: function (context) {\n return !(props.fullStats && context.chart.chartArea.width < 300)\n },\n formatter: function (value, context) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const total: number = context.chart.data.datasets\n .map((d) => d.data[context.dataIndex])\n .reduce((total, value) => getSum(total, value), 0)\n return context.datasetIndex ===\n props.displayedSportIds.length - 1 && total > 0\n ? formatTooltipValue(props.displayedData, total, false)\n : null\n },\n },\n legend: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: true,\n mode: 'index',\n },\n filter: function (tooltipItem) {\n return tooltipItem.formattedValue !== '0'\n },\n callbacks: {\n label: function (context) {\n let label = t(`sports.${context.dataset.label}.LABEL`) || ''\n if (label) {\n label += ': '\n }\n if (context.parsed.y !== null) {\n label += formatTooltipValue(\n props.displayedData,\n context.parsed.y\n )\n }\n return label\n },\n footer: function (tooltipItems) {\n let sum = 0\n tooltipItems.map((tooltipItem) => {\n sum += tooltipItem.parsed.y\n })\n return (\n `${t('common.TOTAL')}: ` +\n formatTooltipValue(props.displayedData, sum)\n )\n },\n },\n },\n },\n }))\n const { barChartProps } = useBarChart({\n chartData,\n options,\n })\n return { barChartProps }\n },\n })\n</script>\n","export const formatDuration = (\n totalSeconds: number,\n formatWithUnits = false\n): string => {\n let days = '0'\n if (formatWithUnits) {\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 (formatWithUnits) {\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","import { TStatisticsDatasetKeys } from '@/types/statistics'\nimport { formatDuration } from '@/utils/duration'\n\nexport const formatTooltipValue = (\n displayedData: TStatisticsDatasetKeys,\n value: number,\n formatWithUnits = true\n): string => {\n switch (displayedData) {\n case 'total_duration':\n return formatDuration(value, formatWithUnits)\n case 'total_distance':\n return value.toFixed(2) + ' km'\n case 'total_ascent':\n case 'total_descent':\n return (value / 1000).toFixed(2) + ' km'\n default:\n return value.toString()\n }\n}\n","\n import { ChartData, ChartOptions, LayoutItem } from 'chart.js'\n import { ComputedRef, PropType, computed, defineComponent } from 'vue'\n import { BarChart, useBarChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { IChartDataset } from '@/types/chart'\n import { TStatisticsDatasetKeys } from '@/types/statistics'\n import { formatTooltipValue } from '@/utils/tooltip'\n\n export default defineComponent({\n name: 'Chart',\n components: {\n BarChart,\n },\n props: {\n datasets: {\n type: Object as PropType<IChartDataset[]>,\n required: true,\n },\n labels: {\n type: Object as PropType<unknown[]>,\n required: true,\n },\n displayedData: {\n type: String as PropType<TStatisticsDatasetKeys>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n required: true,\n },\n fullStats: {\n type: Boolean,\n required: true,\n },\n },\n setup(props) {\n const { t } = useI18n()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getNumber(value: any): number {\n return isNaN(value) ? 0 : +value\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function getSum(total: any, value: any): number {\n return getNumber(total) + getNumber(value)\n }\n let chartData: ComputedRef<ChartData<'bar'>> = computed(() => ({\n labels: props.labels,\n // workaround to avoid dataset modification\n datasets: JSON.parse(JSON.stringify(props.datasets)),\n }))\n const options = computed<ChartOptions<'bar'>>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: props.fullStats ? 40 : 22,\n },\n },\n scales: {\n x: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n },\n y: {\n stacked: true,\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n maxTicksLimit: 6,\n callback: function (value) {\n return formatTooltipValue(props.displayedData, +value, false)\n },\n },\n afterFit: function (scale: LayoutItem) {\n scale.width = props.fullStats ? 75 : 60\n },\n },\n },\n plugins: {\n datalabels: {\n anchor: 'end',\n align: 'end',\n rotation: function (context) {\n return props.fullStats && context.chart.chartArea.width < 580\n ? 310\n : 0\n },\n display: function (context) {\n return !(props.fullStats && context.chart.chartArea.width < 300)\n },\n formatter: function (value, context) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const total: number = context.chart.data.datasets\n .map((d) => d.data[context.dataIndex])\n .reduce((total, value) => getSum(total, value), 0)\n return context.datasetIndex ===\n props.displayedSportIds.length - 1 && total > 0\n ? formatTooltipValue(props.displayedData, total, false)\n : null\n },\n },\n legend: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: true,\n mode: 'index',\n },\n filter: function (tooltipItem) {\n return tooltipItem.formattedValue !== '0'\n },\n callbacks: {\n label: function (context) {\n let label = t(`sports.${context.dataset.label}.LABEL`) || ''\n if (label) {\n label += ': '\n }\n if (context.parsed.y !== null) {\n label += formatTooltipValue(\n props.displayedData,\n context.parsed.y\n )\n }\n return label\n },\n footer: function (tooltipItems) {\n let sum = 0\n tooltipItems.map((tooltipItem) => {\n sum += tooltipItem.parsed.y\n })\n return (\n `${t('common.TOTAL')}: ` +\n formatTooltipValue(props.displayedData, sum)\n )\n },\n },\n },\n },\n }))\n const { barChartProps } = useBarChart({\n chartData,\n options,\n })\n return { barChartProps }\n },\n })\n","import { render } from \"./Chart.vue?vue&type=template&id=1e15ee41\"\nimport script from \"./Chart.vue?vue&type=script&lang=ts\"\nexport * from \"./Chart.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","\n import { format } from 'date-fns'\n import {\n ComputedRef,\n PropType,\n Ref,\n computed,\n defineComponent,\n ref,\n watch,\n onBeforeMount,\n } from 'vue'\n\n import Chart from '@/components/Common/StatsChart/Chart.vue'\n import { STATS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import {\n IStatisticsChartData,\n TStatisticsDatasetKeys,\n IStatisticsDateParams,\n TStatisticsFromApi,\n IStatisticsParams,\n } from '@/types/statistics'\n import { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { formatStats } from '@/utils/statistics'\n\n export default defineComponent({\n name: 'UserMonthStats',\n components: {\n Chart,\n },\n props: {\n sports: {\n type: Object as PropType<ISport[]>,\n required: true,\n },\n user: {\n type: Object as PropType<IUserProfile>,\n required: true,\n },\n chartParams: {\n type: Object as PropType<IStatisticsDateParams>,\n required: true,\n },\n displayedSportIds: {\n type: Array as PropType<number[]>,\n default: () => [],\n },\n fullStats: {\n type: Boolean,\n default: false,\n },\n hideChartIfNoData: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const store = useStore()\n\n let displayedData: Ref<TStatisticsDatasetKeys> = ref('total_distance')\n const statistics: ComputedRef<TStatisticsFromApi> = computed(\n () => store.getters[STATS_STORE.GETTERS.USER_STATS]\n )\n const formattedStats: ComputedRef<IStatisticsChartData> = computed(() =>\n formatStats(\n props.chartParams,\n props.user.weekm,\n props.sports,\n props.displayedSportIds,\n statistics.value\n )\n )\n\n onBeforeMount(() =>\n getStatistics(getApiParams(props.chartParams, props.user))\n )\n\n function getStatistics(apiParams: IStatisticsParams) {\n store.dispatch(STATS_STORE.ACTIONS.GET_USER_STATS, {\n username: props.user.username,\n filterType: 'by_time',\n params: apiParams,\n })\n }\n function updateDisplayData(\n event: Event & {\n target: HTMLInputElement & { name: TStatisticsDatasetKeys }\n }\n ) {\n displayedData.value = event.target.name\n }\n function getApiParams(\n chartParams: IStatisticsDateParams,\n user: IUserProfile\n ): IStatisticsParams {\n return {\n from: format(chartParams.start, 'yyyy-MM-dd'),\n to: format(chartParams.end, 'yyyy-MM-dd'),\n time:\n chartParams.duration === 'week'\n ? `week${user.weekm ? 'm' : ''}`\n : chartParams.duration,\n }\n }\n\n watch(\n () => props.chartParams,\n async (newParams) => {\n getStatistics(getApiParams(newParams, props.user))\n }\n )\n\n return {\n datasets: computed(\n () => formattedStats.value.datasets[displayedData.value]\n ),\n labels: computed(() => formattedStats.value.labels),\n emptyStats: computed(() => Object.keys(statistics.value).length === 0),\n displayedData,\n updateDisplayData,\n }\n },\n })\n","import { render } from \"./index.vue?vue&type=template&id=831b4ece&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=ts\"\nexport * from \"./index.vue?vue&type=script&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=831b4ece&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-831b4ece\"\n\nexport default script","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./UserAuthForm.vue?vue&type=style&index=0&id=06a2ad44&scoped=true&lang=scss\"","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n"],"sourceRoot":""}