n.params.segmentId,async v=>{v&&(u.value=+v,R())}),Fe(()=>n.params.workoutId,async v=>{v&&(l.value=!1,R())}),(v,A)=>{const C=ue("Modal"),w=ue("Card");return T(),N("div",qLe,[l.value?(T(),ne(C,{key:0,title:v.$t("common.CONFIRMATION"),message:v.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:A[0]||(A[0]=k=>I(d.value.workoutId)),onCancelAction:b,onKeydown:At(b,["esc"])},null,8,["title","message"])):W("",!0),M(w,null,{title:fe(()=>[f.value?(T(),ne(awe,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:A[1]||(A[1]=k=>g(!0))},null,8,["sport","workoutObject"])):W("",!0)]),content:fe(()=>[M(YLe,{workoutData:h(o),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),M(sLe,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),ZLe=ae(XLe,[["__scopeId","data-v-f8b05eca"]]),QLe=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},JLe={id:"htmlLegend",afterUpdate(e,t,n){var s,o,i,u,c,l;const r=QLe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((i=(o=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:o.labels)!=null&&i.generateLabels?(l=(c=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:c.labels)==null?void 0:l.generateLabels(e):[]).forEach(f=>{var b,I,R;if(!((R=(I=(b=e.config.options)==null?void 0:b.scales)==null?void 0:I.yElevation)!=null&&R.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const m=document.createElement("input");m&&(m.type="checkbox",m.id=f.text,m.checked=!f.hidden);const E=document.createTextNode(f.text),g=document.createElement("span");g&&(g.style.background=String(f.fillStyle),g.style.borderColor=String(f.strokeStyle)),d.appendChild(m),d.appendChild(E),d.appendChild(g),r.appendChild(d)})}},e6e=e=>(ut("data-v-85c323a2"),e=e(),ct(),e),t6e={id:"workout-chart"},n6e={class:"chart-radio"},r6e=["checked"],a6e=["checked"],s6e=e6e(()=>p("div",{id:"chart-legend"},null,-1)),o6e={class:"line-chart"},i6e={class:"chart-info"},u6e={class:"no-data-cleaning"},c6e={key:0,class:"elevation-start"},l6e=["checked"],d6e=Q({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=Cf(),{t:s}=jt(),{authUser:o,workoutData:i}=_e(n),u=$(()=>a.getters[H.GETTERS.DARK_MODE]),c=ce(!0),l=ce(o.value.start_elevation_at_zero),f=$(()=>U3e(i.value.chartData,s,o.value.imperial_units,u.value!==!1)),d=$(()=>f.value&&f.value.datasets.elevation.data.length>0),m=z("km"),E=z("m"),g=$(()=>({labels:c.value?f.value.distance_labels:f.value.duration_labels,datasets:JSON.parse(JSON.stringify([f.value.datasets.speed,f.value.datasets.elevation]))})),b=$(()=>f.value.coordinates),I=$(()=>({color:u.value!==!1?Gr.darkMode.line:Gr.ligthMode.line})),R=$(()=>({color:u.value!==!1?Gr.darkMode.text:Gr.ligthMode.text})),v=$(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...I.value},border:{...I.value},ticks:{count:10,callback:function(F){return c.value?Number(F).toFixed(2):w(F)},...R.value},type:"linear",bounds:"data",title:{display:!0,text:c.value?s("workouts.DISTANCE")+` (${m})`:s("workouts.DURATION"),...R.value}},ySpeed:{grid:{drawOnChartArea:!1,...I.value},border:{...I.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${m}/h)`,...R.value},ticks:{...R.value}},yElevation:{beginAtZero:l.value,display:d.value,grid:{drawOnChartArea:!1,...I.value},border:{...I.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${E})`,...R.value},ticks:{...R.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(F){const U=` ${F.dataset.label}: ${F.formattedValue}`;return F.dataset.yAxisID==="yElevation"?U+` ${E}`:U+` ${m}/h`},title:function(F){return F.length>0&&k(b.value[F[0].dataIndex]),F.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${F[0].label} ${m}`:`${s("workouts.DURATION")}: ${w(F[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:d.value}}})),A=[JLe];function C(){c.value=!c.value}function w(F){return new Date(+F*1e3).toISOString().substr(11,8)}function k(F){r("getCoordinates",F)}function L(){k({latitude:null,longitude:null})}function z(F){return n.authUser.imperial_units?$n[F].defaultTarget:F}return(F,U)=>{const Z=ue("Card");return T(),N("div",t6e,[M(Z,null,{title:fe(()=>[K(_(F.$t("workouts.ANALYSIS")),1)]),content:fe(()=>[p("div",n6e,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:C},null,8,r6e),K(" "+_(F.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:C},null,8,a6e),K(" "+_(F.$t("workouts.DURATION")),1)])]),s6e,p("div",o6e,[M(h(PCe),{data:g.value,options:v.value,plugins:A,onMouseleave:L},null,8,["data","options"])]),p("div",i6e,[p("div",u6e,_(F.$t("workouts.NO_DATA_CLEANING")),1),d.value?(T(),N("div",c6e,[p("label",null,[p("input",{type:"checkbox",checked:l.value,onClick:U[0]||(U[0]=ee=>l.value=!l.value)},null,8,l6e),K(" "+_(F.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):W("",!0)])]),_:1})])}}}),f6e=ae(d6e,[["__scopeId","data-v-85c323a2"]]),p6e={id:"workout-note"},m6e=["innerHTML"],E6e=Q({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(r,a)=>{const s=ue("Card");return T(),N("div",p6e,[M(s,null,{title:fe(()=>[K(_(r.$t("workouts.NOTES")),1)]),content:fe(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(vo)(h(n)):r.$t("workouts.NO_NOTES")},null,8,m6e)]),_:1})])}}}),h6e=ae(E6e,[["__scopeId","data-v-f3e81eff"]]),_6e={id:"workout-segments"},T6e=Q({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const o=ue("router-link"),i=ue("Distance"),u=ue("Card");return T(),N("div",_6e,[M(u,null,{title:fe(()=>[K(_(a.$t("workouts.SEGMENT",2)),1)]),content:fe(()=>[p("ul",null,[(T(!0),N(Ie,null,xe(h(n),(c,l)=>(T(),N("li",{key:c.segment_id},[M(o,{to:{name:"WorkoutSegment",params:{workoutId:c.workout_id,segmentId:l+1}}},{default:fe(()=>[K(_(a.$t("workouts.SEGMENT",1))+" "+_(l+1),1)]),_:2},1032,["to"]),K(" ("+_(a.$t("workouts.DISTANCE"))+": ",1),M(i,{distance:c.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),K(", "+_(a.$t("workouts.DURATION"))+": "+_(c.duration)+") ",1)]))),128))])]),_:1})])}}}),g6e=ae(T6e,[["__scopeId","data-v-15725c61"]]),A6e=e=>(ut("data-v-eac6aa4b"),e=e(),ct(),e),S6e={id:"workout",class:"view"},O6e={class:"container"},I6e={key:0,class:"workout-container"},v6e={key:0},R6e=A6e(()=>p("div",{id:"bottom"},null,-1)),b6e={key:1},N6e=Q({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=Vt(),r=$e(),{displaySegment:a}=_e(t),s=$(()=>r.getters[Te.GETTERS.WORKOUT_DATA]),o=$(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),i=$(()=>r.getters[$t.GETTERS.SPORTS]),u=ce({latitude:null,longitude:null});It(()=>{const l={workoutId:n.params.workoutId};t.displaySegment&&(l.segmentId=n.params.segmentId),r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,l)}),Rt(()=>{r.commit(Te.MUTATIONS.EMPTY_WORKOUT)});function c(l){u.value={latitude:l.latitude,longitude:l.longitude}}return Fe(()=>n.params.workoutId,async l=>{l&&r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:l})}),Fe(()=>n.params.segmentId,async l=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};l&&(f.segmentId=l),r.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,f)}}),(l,f)=>(T(),N("div",S6e,[p("div",O6e,[i.value.length>0?(T(),N("div",I6e,[s.value.workout.id?(T(),N("div",v6e,[M(ZLe,{workoutData:s.value,sports:i.value,authUser:o.value,markerCoordinates:u.value,displaySegment:h(a)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(T(),ne(f6e,{key:0,workoutData:s.value,authUser:o.value,displaySegment:h(a),onGetCoordinates:c},null,8,["workoutData","authUser","displaySegment"])):W("",!0),!h(a)&&s.value.workout.segments.length>1?(T(),ne(g6e,{key:1,segments:s.value.workout.segments,useImperialUnits:o.value.imperial_units},null,8,["segments","useImperialUnits"])):W("",!0),h(a)?W("",!0):(T(),ne(h6e,{key:2,notes:s.value.workout.notes},null,8,["notes"])),R6e])):(T(),N("div",b6e,[s.value.loading?W("",!0):(T(),ne(O0,{key:0,target:"WORKOUT"}))]))])):W("",!0)])]))}}),Lh=ae(N6e,[["__scopeId","data-v-eac6aa4b"]]),C6e=e=>(ut("data-v-29caaf8f"),e=e(),ct(),e),y6e={class:"workouts-filters"},D6e={class:"box"},P6e={class:"form-all-items"},w6e={class:"form-items-group"},L6e={class:"form-item"},$6e=["value"],k6e={class:"form-item"},U6e=["value"],M6e={class:"form-items-group"},x6e={class:"form-item"},F6e=["value"],W6e=C6e(()=>p("option",{value:""},null,-1)),G6e=["value"],z6e={class:"form-item form-item-title"},B6e={class:"form-inputs-group"},H6e=["value"],j6e={class:"form-items-group"},V6e={class:"form-item"},K6e={class:"form-inputs-group"},Y6e=["value"],q6e=["value"],X6e={class:"form-items-group"},Z6e={class:"form-item"},Q6e={class:"form-inputs-group"},J6e=["value"],e$e=["value"],t$e={class:"form-items-group"},n$e={class:"form-item"},r$e={class:"form-inputs-group"},a$e=["value"],s$e=["value"],o$e={class:"form-items-group"},i$e={class:"form-item"},u$e={class:"form-inputs-group"},c$e=["value"],l$e=["value"],d$e={class:"form-button"},f$e=Q({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=Vt(),o=Zr(),{authUser:i}=_e(n),u=i.value.imperial_units?$n.km.defaultTarget:"km",c=$(()=>Jr(n.sports,a));let l=Object.assign({},s.query);gt(()=>{const E=document.getElementById("from");E&&E.focus()});function f(E){const g=E.target.name,b=E.target.value;b===""?delete l[g]:l[g]=b}function d(){r("filter"),"page"in l&&(l.page="1"),o.push({path:"/workouts",query:l})}function m(){r("filter"),o.push({path:"/workouts",query:{}})}return Fe(()=>s.query,E=>{l=Object.assign({},E)}),(E,g)=>(T(),N("div",y6e,[p("div",D6e,[p("form",{onSubmit:Xe(d,["prevent"]),class:"form"},[p("div",P6e,[p("div",w6e,[p("div",L6e,[p("label",null,_(E.$t("workouts.FROM"))+": ",1),p("input",{id:"from",name:"from",type:"date",value:E.$route.query.from,onChange:f},null,40,$6e)]),p("div",k6e,[p("label",null,_(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,U6e)])]),p("div",M6e,[p("div",x6e,[p("label",null,_(E.$t("workouts.SPORT",1))+":",1),p("select",{name:"sport_id",value:E.$route.query.sport_id,onChange:f,onKeyup:At(d,["enter"])},[W6e,(T(!0),N(Ie,null,xe(c.value.filter(b=>h(i).sports_list.includes(b.id)),b=>(T(),N("option",{value:b.id,key:b.id},_(b.translatedLabel),9,G6e))),128))],40,F6e)]),p("div",z6e,[p("label",null,_(E.$t("workouts.TITLE",1))+":",1),p("div",B6e,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,H6e)])])]),p("div",j6e,[p("div",V6e,[p("label",null,_(E.$t("workouts.DISTANCE"))+" ("+_(h(u))+"): ",1),p("div",K6e,[p("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_from,onChange:f,onKeyup:At(d,["enter"])},null,40,Y6e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_to,onChange:f,onKeyup:At(d,["enter"])},null,40,q6e)])])]),p("div",X6e,[p("div",Z6e,[p("label",null,_(E.$t("workouts.DURATION"))+": ",1),p("div",Q6e,[p("input",{name:"duration_from",value:E.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,J6e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{name:"duration_to",value:E.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,e$e)])])]),p("div",t$e,[p("div",n$e,[p("label",null,_(E.$t("workouts.AVE_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",r$e,[p("input",{min:"0",name:"ave_speed_from",value:E.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,a$e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{min:"0",name:"ave_speed_to",value:E.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,s$e)])])]),p("div",o$e,[p("div",i$e,[p("label",null,_(E.$t("workouts.MAX_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",u$e,[p("input",{min:"0",name:"max_speed_from",value:E.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,c$e),p("span",null,_(E.$t("workouts.TO")),1),p("input",{min:"0",name:"max_speed_to",value:E.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,l$e)])])])]),p("div",d$e,[p("button",{type:"submit",class:"confirm",onClick:d},_(E.$t("buttons.FILTER")),1),p("button",{class:"confirm",onClick:m},_(E.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),p$e=ae(f$e,[["__scopeId","data-v-29caaf8f"]]),SS=e=>(ut("data-v-bb980a00"),e=e(),ct(),e),m$e={class:"workouts-list"},E$e={class:"total"},h$e={class:"total-label"},_$e={key:0},T$e={key:0,class:"workouts-table responsive-table"},g$e=SS(()=>p("th",{class:"sport-col"},null,-1)),A$e={class:"sport-col"},S$e={class:"cell-heading"},O$e=["onMouseover"],I$e={class:"cell-heading"},v$e={key:0,class:"fa fa-map-o","aria-hidden":"true"},R$e={class:"title"},b$e={class:"workout-date"},N$e={class:"cell-heading"},C$e={class:"text-right"},y$e={class:"cell-heading"},D$e={class:"text-right"},P$e={class:"cell-heading"},w$e={class:"text-right"},L$e={class:"cell-heading"},$$e={class:"text-right"},k$e={class:"cell-heading"},U$e={class:"text-right"},M$e={class:"cell-heading"},x$e={class:"text-right"},F$e={class:"cell-heading"},W$e=SS(()=>p("div",{id:"bottom"},null,-1)),G$e=Q({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=$e(),r=Vt(),a=Zr(),{user:s,sports:o}=_e(t),i=["ave_speed","distance","duration","workout_date"],u=$(()=>n.getters[Te.GETTERS.USER_WORKOUTS]),c=$(()=>n.getters[Te.GETTERS.WORKOUTS_PAGINATION]),l=$(()=>n.getters[H.GETTERS.LANGUAGE]);let f=g(r.query);const d=ce(null);It(()=>{m(f)});function m(R){n.dispatch(Te.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?b(R):R)}function E(R,v){const A=Object.assign({},r.query);A[R]=v,R==="per_page"&&(A.page="1"),f=g(A),a.push({path:"/workouts",query:f})}function g(R){const v=Wd(R,i,bo.order_by,{defaultSort:bo.order});return Object.keys(R).filter(A=>wAe.includes(A)).map(A=>{typeof R[A]=="string"&&(v[A]=R[A])}),v}function b(R){const v={...R};return Object.entries(v).map(A=>{A[0].match("speed|distance")&&A[1]&&(v[A[0]]=sn(+A[1],"mi","km"))}),v}function I(R){d.value=R}return Fe(()=>r.query,async R=>{f=g(R),m(f)}),(R,v)=>{const A=ue("SportImage"),C=ue("router-link"),w=ue("Distance");return T(),N("div",m$e,[p("div",{class:ge(["box",{"empty-table":u.value.length===0}])},[p("div",E$e,[p("span",h$e,_(R.$t("common.TOTAL").toLowerCase())+": ",1),c.value.total?(T(),N("span",_$e,_(c.value.total)+" "+_(R.$t("workouts.WORKOUT",c.value.total)),1)):W("",!0)]),M(EA,{sort:h(T0),order_by:i,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(T(),N("div",T$e,[M(Wu,{class:"top-pagination",pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),p("table",null,[p("thead",{class:ge({smaller:l.value==="de"})},[p("tr",null,[g$e,p("th",null,_(St(R.$t("workouts.WORKOUT",1))),1),p("th",null,_(St(R.$t("workouts.DATE"))),1),p("th",null,_(St(R.$t("workouts.DISTANCE"))),1),p("th",null,_(St(R.$t("workouts.DURATION"))),1),p("th",null,_(St(R.$t("workouts.AVE_SPEED"))),1),p("th",null,_(St(R.$t("workouts.MAX_SPEED"))),1),p("th",null,_(St(R.$t("workouts.ASCENT"))),1),p("th",null,_(St(R.$t("workouts.DESCENT"))),1)])],2),p("tbody",null,[(T(!0),N(Ie,null,xe(u.value,k=>(T(),N("tr",{key:k.id},[p("td",A$e,[p("span",S$e,_(R.$t("workouts.SPORT",1)),1),h(o).length>0?(T(),ne(A,{key:0,title:h(o).filter(L=>L.id===k.sport_id)[0].translatedLabel,"sport-label":h(h0)(k,h(o)),color:h(_0)(k,h(o))},null,8,["title","sport-label","color"])):W("",!0)]),p("td",{class:"workout-title",onMouseover:L=>I(k.id),onMouseleave:v[0]||(v[0]=L=>I(null))},[p("span",I$e,_(St(R.$t("workouts.WORKOUT",1))),1),M(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:k.id}}},{default:fe(()=>[k.with_gpx?(T(),N("i",v$e)):W("",!0),p("span",R$e,_(k.title),1)]),_:2},1032,["to"]),k.with_gpx&&d.value===k.id?(T(),ne(BA,{key:0,workout:k,"display-hover":!0},null,8,["workout"])):W("",!0)],40,O$e),p("td",b$e,[p("span",N$e,_(R.$t("workouts.DATE")),1),p("time",null,_(h(xn)(k.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",C$e,[p("span",y$e,_(R.$t("workouts.DISTANCE")),1),k.distance!==null?(T(),ne(w,{key:0,distance:k.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):W("",!0)]),p("td",D$e,[p("span",P$e,_(R.$t("workouts.DURATION")),1),K(" "+_(k.moving),1)]),p("td",w$e,[p("span",L$e,_(R.$t("workouts.AVE_SPEED")),1),k.ave_speed!==null?(T(),ne(w,{key:0,distance:k.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):W("",!0)]),p("td",$$e,[p("span",k$e,_(R.$t("workouts.MAX_SPEED")),1),k.max_speed!==null?(T(),ne(w,{key:0,distance:k.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):W("",!0)]),p("td",U$e,[p("span",M$e,_(R.$t("workouts.ASCENT")),1),k.ascent!==null?(T(),ne(w,{key:0,distance:k.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):W("",!0)]),p("td",x$e,[p("span",F$e,_(R.$t("workouts.DESCENT")),1),k.descent!==null?(T(),ne(w,{key:0,distance:k.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):W("",!0)])]))),128))])]),M(Wu,{pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):W("",!0)],2),u.value.length===0?(T(),ne(v0,{key:0})):W("",!0),W$e])}}}),z$e=ae(G$e,[["__scopeId","data-v-bb980a00"]]),B$e={key:0,id:"workouts",class:"view"},H$e={class:"container workouts-container"},j$e={class:"display-filters"},V$e={class:"list-container"},K$e=Q({__name:"WorkoutsView",setup(e){const{t}=jt(),n=$e(),r=$(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[$t.GETTERS.SPORTS]),s=$(()=>Jr(a.value,t)),o=ce(!0);function i(){o.value=!o.value}return(u,c)=>r.value.username?(T(),N("div",B$e,[p("div",H$e,[p("div",{class:ge(["filters-container",{hidden:o.value}])},[M(p$e,{sports:s.value,authUser:r.value,onFilter:i},null,8,["sports","authUser"])],2),p("div",j$e,[p("div",{onClick:i},[p("i",{class:ge(`fa fa-caret-${o.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,_(u.$t(`workouts.${o.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",V$e,[M(z$e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):W("",!0)}}),Y$e=ae(K$e,[["__scopeId","data-v-3fa59b88"]]),{t:$h}=ga.global,kh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},q$e=[{path:"/",name:"Dashboard",component:qye,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:Ih,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:Ih,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:iPe,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:Oh,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:Oh,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:()=>Ai,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:Ai,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:Ai,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:Ai,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:dPe,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:xPe,children:[{path:"",name:"UserProfile",component:iOe,props:e=>({tab:kh(e.path)}),children:[{path:"",name:"UserInfos",component:RA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:yOe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:ph,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:Lbe,children:[{path:"",name:"UserAppsList",component:Jbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:fh,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:fh,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:Abe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:Pbe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:POe,props:e=>({tab:kh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:yRe,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:pRe,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:FRe,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:M2e,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:ph,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:Z2e,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:RDe,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:vh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:Y$e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:Lh,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:w4e,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:Lh,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:y4e,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:d3e,children:[{path:"",name:"AdministrationMenu",component:Jge,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:BE,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:BE,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:OAe,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:vh,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:WSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:t3e,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:tDe,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:Zye,meta:{title:"error.NOT_FOUND.PAGE"}}],OS=Upe({history:Q0e("/"),routes:q$e});OS.beforeEach((e,t,n)=>{if("title"in e.meta){const r=typeof e.meta.title=="string"?e.meta.title:"",a=r?typeof e.meta.count=="number"?$h(r,+e.meta.count):$h(r):"";window.document.title=`FitTrackee${r?` - ${St(a)}`:""}`}eo.dispatch(Y.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(eo.getters[Y.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!eo.getters[Y.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const r=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(r)}else n()}).catch(r=>{console.error(r),n()})});const _t=OS;Yd.register(vS,RS,bS,NS,CS,yS,DS,Uh,PS,Mh,wS,LS);const IS=gv(h0e).provide("sportColors",E0).use(ga).use(eo).use(_t).use(a2,{name:"VFullscreen"}).directive("click-outside",she);ahe.forEach(e=>{IS.component(e.name,e.target)});IS.mount("#app");
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = ["static/maps-ZyuCPqes.js","static/css/maps-B7qTrBCW.css"]
diff --git a/fittrackee_client/src/components/Common/StatsChart/Chart.vue b/fittrackee_client/src/components/Common/StatsChart/Chart.vue
index b4456b85..54bc76e7 100644
--- a/fittrackee_client/src/components/Common/StatsChart/Chart.vue
+++ b/fittrackee_client/src/components/Common/StatsChart/Chart.vue
@@ -42,14 +42,16 @@
() => store.getters[ROOT_STORE.GETTERS.DARK_MODE]
)
const lineColors = computed(() => ({
- color: darkMode.value
- ? chartsColors.darkMode.line
- : chartsColors.ligthMode.line,
+ color:
+ darkMode.value !== false
+ ? chartsColors.darkMode.line
+ : chartsColors.ligthMode.line,
}))
const textColors = computed(() => ({
- color: darkMode.value
- ? chartsColors.darkMode.text
- : chartsColors.ligthMode.text,
+ color:
+ darkMode.value !== false
+ ? chartsColors.darkMode.text
+ : chartsColors.ligthMode.text,
}))
const chartData = computed(() => ({
@@ -117,7 +119,7 @@
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
context.dataset.backgroundColor[0]
- : '#666666'
+ : textColors.value.color
},
rotation: function (context) {
return fullStats.value && context.chart.chartArea.width < 580
diff --git a/fittrackee_client/src/components/PrivacyPolicyToAccept.vue b/fittrackee_client/src/components/PrivacyPolicyToAccept.vue
index 54231c62..c425e837 100644
--- a/fittrackee_client/src/components/PrivacyPolicyToAccept.vue
+++ b/fittrackee_client/src/components/PrivacyPolicyToAccept.vue
@@ -2,7 +2,7 @@
-
+
{{ $t('user.REVIEW') }}
@@ -18,5 +18,10 @@
color: var(--alert-color);
border-radius: $border-radius;
padding: $default-padding $default-padding * 2;
+
+ .policy-link {
+ color: var(--policy-link-color);
+ text-decoration: underline;
+ }
}
diff --git a/fittrackee_client/src/components/Workout/WorkoutCard.vue b/fittrackee_client/src/components/Workout/WorkoutCard.vue
index 2b00f720..5c63ab3c 100644
--- a/fittrackee_client/src/components/Workout/WorkoutCard.vue
+++ b/fittrackee_client/src/components/Workout/WorkoutCard.vue
@@ -234,7 +234,7 @@
}
.workout-map {
- background-color: var(--workout-no-map-bg-color);
+ background-color: var(--workout-static-map-bg-color);
height: 150px;
.no-map {
line-height: 150px;
diff --git a/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue b/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue
index ebf1edb7..cd56fb5e 100644
--- a/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue
+++ b/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/index.vue
@@ -118,14 +118,16 @@
() => datasets.value.coordinates
)
const lineColors = computed(() => ({
- color: darkMode.value
- ? chartsColors.darkMode.line
- : chartsColors.ligthMode.line,
+ color:
+ darkMode.value !== false
+ ? chartsColors.darkMode.line
+ : chartsColors.ligthMode.line,
}))
const textColors = computed(() => ({
- color: darkMode.value
- ? chartsColors.darkMode.text
- : chartsColors.ligthMode.text,
+ color:
+ darkMode.value !== false
+ ? chartsColors.darkMode.text
+ : chartsColors.ligthMode.text,
}))
const options = computed>(() => ({
diff --git a/fittrackee_client/src/scss/colors-dark.scss b/fittrackee_client/src/scss/colors-dark.scss
index 09cc1f9f..a0add3b3 100644
--- a/fittrackee_client/src/scss/colors-dark.scss
+++ b/fittrackee_client/src/scss/colors-dark.scss
@@ -30,6 +30,7 @@
--dropdown-background-color: var(--dark-blue);
--dropdown-border-color: var(--input-border-color);
--policy-border-color: #ccc;
+ --policy-link-color: var(--alert-color);
--box-shadow-color: lightgrey;
--admin-disabled-input-color: var(--dark-blue);
@@ -87,13 +88,14 @@
--map-attribution-text: #e8e8e8;
--map-display-hover-attribution-text: #444444;
--map-attribution-bg-color: none;
- --map-filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(0.8);
+ --map-filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.85);
--map-display-hover-filter: invert(1) hue-rotate(180deg) brightness(1.5)
contrast(0.6);
--map-layers-overlays: var(--app-color);
--map-control-bar: var(--app-color);
--no-map-filter: invert(1) brightness(1.5) contrast(0.9);
--workout-static-map-shadow-color: #d2d2d2;
+ --workout-static-map-bg-color: #818181;
--mountains-filter: invert(90%) sepia(19%) saturate(0%) hue-rotate(39deg)
brightness(86%) contrast(102%);
diff --git a/fittrackee_client/src/scss/colors.scss b/fittrackee_client/src/scss/colors.scss
index a26306ef..19a47a1f 100644
--- a/fittrackee_client/src/scss/colors.scss
+++ b/fittrackee_client/src/scss/colors.scss
@@ -27,6 +27,7 @@
--dropdown-background-color: #ffffff;
--dropdown-border-color: lightgrey;
--policy-border-color: #ccc;
+ --policy-link-color: var(--app-a-color);
--box-shadow-color: lightgrey;
--admin-disabled-input-color: #ffffff;
@@ -90,6 +91,7 @@
--map-control-bar: #bfc0ab;
--no-map-filter: initial;
--workout-static-map-shadow-color: var(--app-shadow-color);
+ --workout-static-map-bg-color: var(--workout-no-map-bg-color);
--mountains-filter: invert(19%) sepia(9%) saturate(2921%) hue-rotate(169deg)
brightness(85%) contrast(80%);