diff --git a/fittrackee/dist/index.html b/fittrackee/dist/index.html
index 6a2b2637..3ee111b2 100644
--- a/fittrackee/dist/index.html
+++ b/fittrackee/dist/index.html
@@ -7,7 +7,7 @@
FitTrackee
-
+
diff --git a/fittrackee/dist/static/index-9Y8IgSRf.js b/fittrackee/dist/static/index-w1tTRLlK.js
similarity index 99%
rename from fittrackee/dist/static/index-9Y8IgSRf.js
rename to fittrackee/dist/static/index-w1tTRLlK.js
index eb858592..936e9adb 100644
--- a/fittrackee/dist/static/index-9Y8IgSRf.js
+++ b/fittrackee/dist/static/index-w1tTRLlK.js
@@ -448,7 +448,7 @@ and ensure you are accounting for this risk.
C5.613,166.626,0,172.24,0,179.14v153.722c0,6.9,5.613,12.513,12.513,12.513h259.278c4.147,0,7.508-3.361,7.508-7.508
C279.299,333.72,275.939,330.359,271.792,330.359z">`,7),bDe=[RDe];function NDe(e,t,n,r,a,s){return T(),N("svg",vDe,bDe)}const CDe=re(IDe,[["render",NDe]]),yDe={id:"password-action-done",class:"center-card with-margin"},DDe={class:"password-message"},PDe={key:0},wDe=Q({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=ue("router-link"),i=ue("i18n-t");return T(),N("div",yDe,[h(n)==="request-sent"?(T(),te(ZA,{key:0})):(T(),te(CDe,{key:1})),p("div",DDe,[h(n)==="request-sent"?(T(),N("span",PDe,_(r.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(T(),te(i,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:fe(()=>[M(s,{to:"/login"},{default:fe(()=>[K(_(r.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),LDe=re(wDe,[["__scopeId","data-v-ee1004fc"]]),$De={id:"password-reset-request",class:"center-card with-margin"},kDe=Q({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:r}=_e(t);return(a,s)=>{const i=ue("Card");return T(),N("div",$De,[M(i,null,{title:fe(()=>[K(_(a.$t("user.RESET_PASSWORD")),1)]),content:fe(()=>[M(R0,{action:h(n),token:h(r)},null,8,["action","token"])]),_:1})])}}}),UDe=re(kDe,[["__scopeId","data-v-97f01ba1"]]),MDe={id:"password-reset",class:"view"},xDe={class:"container"},FDe=Q({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=Vt(),r=Zr(),{action:a}=_e(t),s=$(()=>n.query.token);return It(()=>{t.action==="reset"&&!s.value&&r.push("/")}),(i,o)=>(T(),N("div",MDe,[p("div",xDe,[h(a).startsWith("reset")?(T(),te(UDe,{key:0,action:h(a),token:s.value},null,8,["action","token"])):(T(),te(LDe,{key:1,action:h(a)},null,8,["action"]))])]))}}),Ao=re(FDe,[["__scopeId","data-v-5cbe9029"]]),WDe=e=>(ut("data-v-af92ad3a"),e=e(),ct(),e),GDe={key:0,id:"profile",class:"view"},zDe=WDe(()=>p("div",{id:"bottom"},null,-1)),BDe=Q({__name:"ProfileView",setup(e){const t=$e(),n=$(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]);return(r,a)=>{const s=ue("router-view");return n.value.username?(T(),N("div",GDe,[M(s,{user:n.value},null,8,["user"]),zDe])):F("",!0)}}}),HDe=re(BDe,[["__scopeId","data-v-af92ad3a"]]),jDe={key:0,id:"user",class:"view"},VDe={class:"box"},KDe=Q({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),r=Vt(),a=$e(),s=$(()=>a.getters[Ce.GETTERS.USER]);return It(()=>{r.params.username&&typeof r.params.username=="string"&&a.dispatch(Ce.ACTIONS.GET_USER,r.params.username)}),Ni(()=>{a.dispatch(Ce.ACTIONS.EMPTY_USER)}),(i,o)=>s.value.username?(T(),N("div",jDe,[M(IA,{user:s.value},null,8,["user"]),p("div",VDe,[M(RA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):F("",!0)}}),vh=re(KDe,[["__scopeId","data-v-1b7a0b4f"]]),YDe={id:"workout-form"},qDe={class:"form-items"},XDe={key:0,class:"form-item-radio"},ZDe=["checked","disabled"],QDe={for:"withGpx"},JDe=["checked","disabled"],ePe={for:"withoutGpx"},tPe={class:"form-item"},nPe=["disabled"],rPe=["value"],aPe={key:1,class:"form-item"},sPe={for:"gpxFile"},iPe=["disabled"],oPe={class:"files-help info-box"},uPe={key:2,class:"form-item"},cPe={for:"title"},lPe=["required","disabled"],dPe={key:3},fPe={class:"workout-date-duration"},pPe={class:"form-item"},mPe={class:"workout-date-time"},EPe=["disabled"],hPe=["disabled"],_Pe={class:"form-item"},TPe=["disabled"],gPe=["disabled"],APe=["disabled"],SPe={class:"workout-data"},OPe={class:"form-item"},IPe=["disabled"],vPe={class:"form-item"},RPe=["disabled"],bPe={class:"form-item"},NPe=["disabled"],CPe={class:"form-item"},yPe={key:1},DPe={key:2,class:"form-buttons"},PPe=["disabled"],wPe=Q({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=jt(),r=$e(),a=Zr(),{authUser:s,workout:i,isCreation:o,loading:u}=_e(t),c=$(()=>Jr(t.sports,n,"is_active_for_user",i.value.id?[i.value.sport_id]:[])),l=$(()=>r.getters[H.GETTERS.APP_CONFIG]),f=l.value.max_single_file_size?tu(l.value.max_single_file_size):"",d=l.value.gpx_limit_import,m=l.value.max_zip_file_size?tu(l.value.max_zip_file_size):"",E=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),g=xt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),b=ce(i.value.id?i.value.with_gpx:o.value);let I=null;const R=ce(!1),v=ce([]);gt(()=>{let P;t.workout.id?(k(t.workout),P=document.getElementById("sport")):P=document.getElementById("withGpx"),P&&P.focus()});function A(P){g.notes=P}function C(){b.value=!b.value,R.value=!1}function w(P){P.target.files&&(I=P.target.files[0])}function k(P){if(g.sport_id=`${P.sport_id}`,g.title=P.title,g.notes=P.notes,!P.with_gpx){const B=SA(yc(P.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=P.duration.split(":");g.workoutDistance=`${s.value.imperial_units?sn(P.distance,"km","mi",3):parseFloat(P.distance.toFixed(3))}`,g.workoutDate=B.workout_date,g.workoutTime=B.workout_time,g.workoutDurationHour=V[0],g.workoutDurationMinutes=V[1],g.workoutDurationSeconds=V[2],g.workoutAscent=P.ascent===null?"":`${s.value.imperial_units?sn(P.ascent,"m","ft",2):parseFloat(P.ascent.toFixed(2))}`,g.workoutDescent=P.descent===null?"":`${s.value.imperial_units?sn(P.descent,"m","ft",2):parseFloat(P.descent.toFixed(2))}`}}function L(){return v.value.includes("workouts.INVALID_DISTANCE")}function z(){return v.value.includes("workouts.INVALID_DURATION")}function W(){return v.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function U(P){v.value=[],P.title=g.title,P.duration=+g.workoutDurationHour*3600+ +g.workoutDurationMinutes*60+ +g.workoutDurationSeconds,P.duration<=0&&v.value.push("workouts.INVALID_DURATION"),P.distance=s.value.imperial_units?sn(+g.workoutDistance,"mi","km",3):+g.workoutDistance,P.distance<=0&&v.value.push("workouts.INVALID_DISTANCE"),P.workout_date=`${g.workoutDate} ${g.workoutTime}`,P.ascent=g.workoutAscent===""?null:s.value.imperial_units?sn(+g.workoutAscent,"ft","m",3):+g.workoutAscent,P.descent=g.workoutDescent===""?null:s.value.imperial_units?sn(+g.workoutDescent,"ft","m",3):+g.workoutDescent,(P.ascent!==null&&P.descent===null||P.ascent===null&&P.descent!==null)&&v.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function Z(){const P={sport_id:+g.sport_id,notes:g.notes};if(t.workout.id)t.workout.with_gpx?P.title=g.title:U(P),v.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,v.value):r.dispatch(Te.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:P});else if(b.value){if(!I){const B="workouts.NO_FILE_PROVIDED";r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,B);return}P.file=I,r.dispatch(Te.ACTIONS.ADD_WORKOUT,P)}else U(P),v.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,v.value):r.dispatch(Te.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,P)}function ee(){t.workout.id?a.push({name:"Workout",params:{workoutId:t.workout.id}}):a.go(-1)}function ae(){R.value=!0}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>t.workout,async(P,B)=>{P!==B&&P&&P.id&&k(P)}),(P,B)=>{const V=ue("CustomTextArea"),se=ue("ErrorMessage"),Pe=ue("Loader"),We=ue("Card");return T(),N("div",{id:"workout-edition",class:ge(["center-card with-margin",{"center-form":h(i)&&h(i).with_gpx}])},[M(We,null,{title:fe(()=>[K(_(P.$t(`workouts.${h(o)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:fe(()=>[p("div",YDe,[p("form",{class:ge({errors:R.value}),onSubmit:Xe(Z,["prevent"])},[p("div",qDe,[h(o)?(T(),N("div",XDe,[p("div",null,[p("input",{id:"withGpx",type:"radio",checked:b.value,disabled:h(u),onClick:C},null,8,ZDe),p("label",QDe,_(P.$t("workouts.WITH_GPX")),1)]),p("div",null,[p("input",{id:"withoutGpx",type:"radio",checked:!b.value,disabled:h(u),onClick:C},null,8,JDe),p("label",ePe,_(P.$t("workouts.WITHOUT_GPX")),1)])])):F("",!0),p("div",tPe,[p("label",null,_(P.$t("workouts.SPORT",1))+"*: ",1),Ke(p("select",{id:"sport",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[0]||(B[0]=Ae=>g.sport_id=Ae)},[(T(!0),N(Ie,null,xe(c.value,Ae=>(T(),N("option",{value:Ae.id,key:Ae.id},_(Ae.translatedLabel),9,rPe))),128))],40,nPe),[[js,g.sport_id]])]),h(o)&&b.value?(T(),N("div",aPe,[p("label",sPe,_(P.$t("workouts.GPX_FILE"))+" "+_(P.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),p("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:ae,onInput:w},null,40,iPe),p("div",oPe,[p("div",null,[p("strong",null,_(P.$t("workouts.GPX_FILE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(f)),1)])]),p("div",null,[p("strong",null,_(P.$t("workouts.ZIP_ARCHIVE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.NO_FOLDER")),1),p("li",null,_(P.$t("workouts.MAX_FILES"))+": "+_(h(d)),1),p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(m)),1)])])])])):(T(),N("div",uPe,[p("label",cPe,_(P.$t("workouts.TITLE"))+": ",1),Ke(p("input",{id:"title",name:"title",type:"text",required:!h(o),onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[1]||(B[1]=Ae=>g.title=Ae)},null,40,lPe),[[tt,g.title]])])),b.value?F("",!0):(T(),N("div",dPe,[p("div",fPe,[p("div",pPe,[p("label",null,_(P.$t("workouts.WORKOUT_DATE"))+"*:",1),p("div",mPe,[Ke(p("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[2]||(B[2]=Ae=>g.workoutDate=Ae)},null,40,EPe),[[tt,g.workoutDate]]),Ke(p("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[3]||(B[3]=Ae=>g.workoutTime=Ae)},null,40,hPe),[[tt,g.workoutTime]])])]),p("div",_Pe,[p("label",null,_(P.$t("workouts.DURATION"))+"*:",1),p("div",null,[Ke(p("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:ge(["workout-duration",{errored:z()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[4]||(B[4]=Ae=>g.workoutDurationHour=Ae)},null,42,TPe),[[tt,g.workoutDurationHour]]),K(" : "),Ke(p("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:ge(["workout-duration",{errored:z()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[5]||(B[5]=Ae=>g.workoutDurationMinutes=Ae)},null,42,gPe),[[tt,g.workoutDurationMinutes]]),K(" : "),Ke(p("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:ge(["workout-duration",{errored:z()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[6]||(B[6]=Ae=>g.workoutDurationSeconds=Ae)},null,42,APe),[[tt,g.workoutDurationSeconds]])])])]),p("div",SPe,[p("div",OPe,[p("label",null,_(P.$t("workouts.DISTANCE"))+" ("+_(h(s).imperial_units?"mi":"km")+")*: ",1),Ke(p("input",{class:ge({errored:L()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[7]||(B[7]=Ae=>g.workoutDistance=Ae)},null,42,IPe),[[tt,g.workoutDistance]])]),p("div",vPe,[p("label",null,_(P.$t("workouts.ASCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:W()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[8]||(B[8]=Ae=>g.workoutAscent=Ae)},null,42,RPe),[[tt,g.workoutAscent]])]),p("div",bPe,[p("label",null,_(P.$t("workouts.DESCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:W()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[9]||(B[9]=Ae=>g.workoutDescent=Ae)},null,42,NPe),[[tt,g.workoutDescent]])])])])),p("div",CPe,[p("label",null,_(P.$t("workouts.NOTES"))+": ",1),M(V,{name:"notes",input:g.notes,disabled:h(u),onUpdateValue:A},null,8,["input","disabled"])])]),E.value?(T(),te(se,{key:0,message:E.value},null,8,["message"])):F("",!0),h(u)?(T(),N("div",yPe,[M(Pe)])):(T(),N("div",DPe,[p("button",{class:"confirm",type:"submit",disabled:h(u)},_(P.$t("buttons.SUBMIT")),9,PPe),p("button",{class:"cancel",onClick:Xe(ee,["prevent"])},_(P.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),JA=re(wPe,[["__scopeId","data-v-4c5a9cd1"]]),LPe={id:"add-workout",class:"view"},$Pe={class:"container"},kPe=Q({__name:"AddWorkout",setup(e){const t=$e(),n=$(()=>t.getters[$t.GETTERS.SPORTS]),r=$(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=$(()=>t.getters[Te.GETTERS.WORKOUT_DATA]);return(s,i)=>(T(),N("div",LPe,[p("div",$Pe,[M(JA,{authUser:r.value,sports:n.value,isCreation:!0,loading:a.value.loading},null,8,["authUser","sports","loading"])])]))}}),UPe={id:"edit-workout",class:"view"},MPe={class:"container"},xPe=Q({__name:"EditWorkout",setup(e){const t=Vt(),n=$e(),r=$(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[$t.GETTERS.SPORTS]),s=$(()=>n.getters[Te.GETTERS.WORKOUT_DATA]);return It(()=>{n.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),Fe(()=>t.params.workoutId,async i=>{i||n.commit(Te.MUTATIONS.EMPTY_WORKOUT)}),(i,o)=>(T(),N("div",UPe,[p("div",MPe,[s.value.workout.id?(T(),te(JA,{key:0,authUser:r.value,sports:a.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):F("",!0)])]))}}),Os=e=>(ut("data-v-e1628a52"),e=e(),ct(),e),FPe={id:"workout-card-title"},WPe=["disabled","title"],GPe=Os(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),zPe=[GPe],BPe={class:"workout-card-title"},HPe={class:"workout-title-date"},jPe={key:0,class:"workout-title"},VPe=["aria-label"],KPe=Os(()=>p("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),YPe=[KPe],qPe=["aria-label"],XPe=Os(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),ZPe=[XPe],QPe=["aria-label"],JPe=Os(()=>p("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),e6e=[JPe],t6e={key:1,class:"workout-title"},n6e={class:"workout-segment"},r6e=Os(()=>p("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),a6e={class:"workout-date"},s6e={class:"workout-link"},i6e=["disabled","title"],o6e=Os(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),u6e=[o6e],c6e=Q({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,r=t,{sport:a,workoutObject:s}=_e(n);async function i(u){await Be.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(c=>{const l=window.URL.createObjectURL(new Blob([c.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=l,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function o(){r("displayModal",!0)}return(u,c)=>{const l=ue("SportImage"),f=ue("router-link");return T(),N("div",FPe,[p("button",{class:ge(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:c[0]||(c[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},zPe,10,WPe),p("div",BPe,[M(l,{"sport-label":h(a).label,color:h(a).color},null,8,["sport-label","color"]),p("div",HPe,[h(s).type==="WORKOUT"?(T(),N("div",jPe,[p("span",null,_(h(s).title),1),p("button",{class:"transparent icon-button",onClick:c[1]||(c[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},YPe,8,VPe),h(s).with_gpx?(T(),N("button",{key:0,class:"transparent icon-button",onClick:c[2]||(c[2]=Xe(d=>i(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},ZPe,8,qPe)):F("",!0),p("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Xe(o,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},e6e,8,QPe)])):h(s).segmentId!==null?(T(),N("div",t6e,[K(_(h(s).title)+" ",1),p("span",n6e,[K(" — "),r6e,K(" "+_(u.$t("workouts.SEGMENT"))+" "+_(h(s).segmentId+1),1)])])):F("",!0),p("div",a6e,[p("time",null,_(h(s).workoutDate)+" - "+_(h(s).workoutTime),1),p("span",s6e,[h(s).type==="SEGMENT"?(T(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:fe(()=>[K(" > "+_(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):F("",!0)])])])]),p("button",{class:ge(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:c[3]||(c[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},u6e,10,i6e)])}}}),l6e=re(c6e,[["__scopeId","data-v-e1628a52"]]),d6e=e=>(ut("data-v-1b247cbe"),e=e(),ct(),e),f6e={key:0,class:"workout-record"},p6e=d6e(()=>p("sup",null,[p("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),m6e=[p6e],E6e=Q({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:r}=_e(t);return(a,s)=>h(r).records&&h(r).records.find(i=>i.record_type===h(n))?(T(),N("span",f6e,m6e)):F("",!0)}}),Ms=re(E6e,[["__scopeId","data-v-1b247cbe"]]),h6e="/img/weather/temperature.svg",_6e="/img/weather/pour-rain.svg",T6e="/img/weather/breeze.svg",g6e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],A6e=e=>{const t=Math.floor(e/22.5+.5);return g6e[t%16]},S6e={class:"wind"},O6e={class:"wind-bearing"},I6e=["title"],v6e=Q({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:r}=_e(t),{t:a}=jt();function s(i){return a(`workouts.WEATHER.WIND_DIRECTIONS.${A6e(i)}`)}return(i,o)=>(T(),N("div",S6e,[K(_(h(w0e)(h(r).wind,h(n)))+" ",1),p("div",O6e,[h(r).windBearing?(T(),N("i",{key:0,class:"fa fa-long-arrow-down",style:Yr({transform:`rotate(${h(r).windBearing}deg)`}),"aria-hidden":"true",title:s(h(r).windBearing)},null,12,I6e)):F("",!0)])]))}}),Rh=re(v6e,[["__scopeId","data-v-e1f7f9cc"]]),R6e=e=>(ut("data-v-0eb0ef9d"),e=e(),ct(),e),b6e={key:0,id:"workout-weather"},N6e={class:"weather-table"},C6e=R6e(()=>p("th",null,null,-1)),y6e={class:"weather-th"},D6e=["src","alt","title"],P6e={class:"weather-th"},w6e=["src","alt","title"],L6e=["alt","title"],$6e=["alt","title"],k6e=["alt","title"],U6e=Q({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:r}=_e(t);return(a,s)=>h(r).weatherStart&&h(r).weatherEnd?(T(),N("div",b6e,[p("table",N6e,[p("thead",null,[p("tr",null,[C6e,p("th",null,[p("div",y6e,[K(_(a.$t("workouts.START"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherStart.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`)},null,8,D6e)])]),p("th",null,[p("div",P6e,[K(_(a.$t("workouts.END"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherEnd.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`)},null,8,w6e)])])])]),p("tbody",null,[p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:h6e,alt:a.$t("workouts.WEATHER.TEMPERATURE"),title:a.$t("workouts.WEATHER.TEMPERATURE")},null,8,L6e)]),p("td",null,_(h(Gm)(h(r).weatherStart.temperature,h(n))),1),p("td",null,_(h(Gm)(h(r).weatherEnd.temperature,h(n))),1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:_6e,alt:a.$t("workouts.WEATHER.HUMIDITY"),title:a.$t("workouts.WEATHER.HUMIDITY")},null,8,$6e)]),p("td",null,_(Number(h(r).weatherStart.humidity*100).toFixed(1))+"% ",1),p("td",null,_(Number(h(r).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:T6e,alt:a.$t("workouts.WEATHER.WIND"),title:a.$t("workouts.WEATHER.WIND")},null,8,k6e)]),p("td",null,[M(Rh,{weather:h(r).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),p("td",null,[M(Rh,{weather:h(r).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):F("",!0)}}),M6e=re(U6e,[["__scopeId","data-v-0eb0ef9d"]]),Ia=e=>(ut("data-v-5b72626f"),e=e(),ct(),e),x6e={id:"workout-info"},F6e={class:"workout-data"},W6e=Ia(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),G6e={class:"label"},z6e={class:"value"},B6e={key:0},H6e={class:"value"},j6e={class:"value"},V6e={key:0,class:"workout-data"},K6e=Ia(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),Y6e={class:"label"},q6e={key:1,class:"workout-data"},X6e=Ia(()=>p("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),Z6e={class:"label"},Q6e=Ia(()=>p("br",null,null,-1)),J6e={class:"label"},ewe={key:2,class:"workout-data"},twe=["alt"],nwe={class:"label"},rwe=Ia(()=>p("br",null,null,-1)),awe={class:"label"},swe={key:3,class:"workout-data"},iwe=Ia(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),owe={class:"label"},uwe=Ia(()=>p("br",null,null,-1)),cwe={class:"label"},lwe=Q({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:r,useImperialUnits:a}=_e(t),s=$(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(i,o)=>{const u=ue("Distance");return T(),N("div",x6e,[p("div",F6e,[W6e,p("span",G6e,_(i.$t("workouts.DURATION")),1),K(": "),p("span",z6e,_(h(r).moving),1),M(Ms,{workoutObject:h(r),recordType:"LD"},null,8,["workoutObject"]),s.value?(T(),N("div",B6e,[K(" ("+_(i.$t("workouts.PAUSES"))+": ",1),p("span",H6e,_(h(r).pauses),1),K(" - "+_(i.$t("workouts.TOTAL_DURATION"))+": ",1),p("span",j6e,_(h(r).duration)+")",1)])):F("",!0)]),h(r).distance!==null?(T(),N("div",V6e,[K6e,p("span",Y6e,_(i.$t("workouts.DISTANCE")),1),K(": "),M(u,{distance:h(r).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"FD"},null,8,["workoutObject"])])):F("",!0),h(r).aveSpeed!==null&&h(r).maxSpeed!==null?(T(),N("div",q6e,[X6e,p("span",Z6e,_(i.$t("workouts.AVERAGE_SPEED")),1),K(": "),M(u,{distance:h(r).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"AS"},null,8,["workoutObject"]),Q6e,p("span",J6e,_(i.$t("workouts.MAX_SPEED")),1),K(": "),M(u,{distance:h(r).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"MS"},null,8,["workoutObject"])])):F("",!0),h(r).maxAlt!==null&&h(r).minAlt!==null?(T(),N("div",ewe,[p("img",{class:"mountains",src:zA,alt:i.$t("workouts.ELEVATION")},null,8,twe),p("span",nwe,_(i.$t("workouts.MIN_ALTITUDE")),1),K(": "),M(u,{distance:h(r).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),rwe,p("span",awe,_(i.$t("workouts.MAX_ALTITUDE")),1),K(": "),M(u,{distance:h(r).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),h(r).ascent!==null&&h(r).descent!==null?(T(),N("div",swe,[iwe,p("span",owe,_(i.$t("workouts.ASCENT")),1),K(": "),M(u,{distance:h(r).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),h(n)?(T(),te(Ms,{key:0,workoutObject:h(r),recordType:"HA"},null,8,["workoutObject"])):F("",!0),uwe,p("span",cwe,_(i.$t("workouts.DESCENT")),1),K(": "),M(u,{distance:h(r).descent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),M(M6e,{workoutObject:h(r),useImperialUnits:h(a)},null,8,["workoutObject","useImperialUnits"])])}}}),dwe=re(lwe,[["__scopeId","data-v-5b72626f"]]);function Ha(e,t){return Array.from(e.getElementsByTagName(t))}function Is(e){return e==null||e.normalize(),e&&e.textContent||""}function ha(e,t,n){const r=e.getElementsByTagName(t),a=r.length?r[0]:null;return a&&n&&n(a),a}function fwe(e,t,n){const r={};if(!e)return r;const a=e.getElementsByTagName(t),s=a.length?a[0]:null;return s&&n?n(s,r):r}function eS(e,t,n){const r=Is(ha(e,t));return r&&n?n(r)||{}:{}}function bh(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return r&&n?n(r)||{}:{}}function pwe(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return n&&n(r),r}function Kd(e,t){const n={};for(const r of t)eS(e,r,a=>{n[r]=a});return n}function mwe(e){return(e==null?void 0:e.nodeType)===1}function tS(e){return fwe(e,"line",t=>Object.assign({},eS(t,"color",r=>({stroke:`#${r}`})),bh(t,"opacity",r=>({"stroke-opacity":r})),bh(t,"width",r=>({"stroke-width":r*96/25.4}))))}function nS(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!mwe(n))continue;const r=Ewe(n.nodeName);if(r==="gpxtpx:TrackPointExtension")t=t.concat(nS(n));else{const a=Is(n);t.push([r,hwe(a)])}}return t}function Ewe(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function hwe(e){const t=parseFloat(e);return isNaN(t)?e:t}function rS(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;pwe(e,"ele",r=>{t.push(r)});const n=ha(e,"time");return{coordinates:t,time:n?Is(n):null,extendedValues:nS(ha(e,"extensions"))}}function b0(e){var a;const t=Kd(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((a=s.parentNode)==null?void 0:a.parentNode)===e&&(t[s.tagName.replace(":","_")]=Is(s));const r=Ha(e,"link");return r.length&&(t.links=r.map(s=>Object.assign({href:s.getAttribute("href")},Kd(s,["text","type"])))),t}function aS(e,t){const n=Ha(e,t),r=[],a=[],s={};for(let i=0;i1,i=Object.assign({_gpxType:"trk"},b0(e),tS(ha(e,"extensions")),r.length?{coordinateProperties:{times:s?r:r[0]}}:{});for(const o of a){n.push(o.line),i.coordinateProperties||(i.coordinateProperties={});const u=i.coordinateProperties,c=Object.entries(o.extendedValues);for(let l=0;lnew Array(m.line.length).fill(null))),u[f][l]=d):u[f]=d}}return{type:"Feature",properties:i,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function gwe(e){const t=Object.assign(b0(e),Kd(e,["sym"])),n=rS(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*Awe(e){for(const t of Ha(e,"trk")){const n=Twe(t);n&&(yield n)}for(const t of Ha(e,"rte")){const n=_we(t);n&&(yield n)}for(const t of Ha(e,"wpt")){const n=gwe(t);n&&(yield n)}}function Swe(e){return{type:"FeatureCollection",features:Array.from(Awe(e))}}const Nh=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},sS=e=>{for(const t of Object.keys(e)){const n=e[t];n&&Mr(n.cancel)&&n.cancel()}},Owe=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),Mr=e=>typeof e=="function",Ir=(e,t,n)=>{for(const r in n){const a="set"+Owe(r);e[a]?Fe(()=>n[r],(s,i)=>{e[a](s,i)}):t[a]&&Fe(()=>n[r],s=>{t[a](s)})}},rr=(e,t,n={})=>{const r={...n};for(const a in e){const s=t[a],i=e[a];s&&(s&&s.custom===!0||i!==void 0&&(r[a]=i))}return r},va=e=>{const t={},n={};for(const r in e)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const a=r.slice(2).toLocaleLowerCase();t[a]=e[r]}else n[r]=e[r];return{listeners:t,attrs:n}},Iwe=async e=>{const t=await Promise.all([bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},So=e=>{const t=ce((...r)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...r)=>t.value(...r);return n.wrapped=t,Jt(e,n),n},Oo=(e,t)=>e.wrapped.value=t,Ln=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,bn=e=>{const t=ht(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},vr=Symbol("useGlobalLeaflet"),ea=Symbol("addLayer"),N0=Symbol("removeLayer"),iS=Symbol("registerControl"),oS=Symbol("registerLayerControl"),uS=Symbol("canSetParentHtml"),cS=Symbol("setParentHtml"),lS=Symbol("setIcon"),vwe=Symbol("bindPopup"),Rwe=Symbol("bindTooltip"),bwe=Symbol("unbindPopup"),Nwe=Symbol("unbindTooltip"),Hi={options:{type:Object,default:()=>({}),custom:!0}},Dc=e=>({options:e.options,methods:{}}),vs={...Hi,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},C0=(e,t,n)=>{const r=bn(ea),a=bn(N0),{options:s,methods:i}=Dc(e),o=rr(e,vs,s),u=()=>r({leafletObject:t.value}),c=()=>a({leafletObject:t.value}),l={...i,setAttribution(f){c(),t.value.options.attribution=f,e.visible&&u()},setName(){c(),e.visible&&u()},setLayerType(){c(),e.visible&&u()},setVisible(f){t.value&&(f?u():c())},bindPopup(f){if(!t.value||!Mr(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!Mr(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(Mr(t.value.closeTooltip)&&t.value.closeTooltip(),Mr(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(Mr(t.value.closePopup)&&t.value.closePopup(),Mr(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return Jt(vwe,l.bindPopup),Jt(Rwe,l.bindTooltip),Jt(bwe,l.unbindPopup),Jt(Nwe,l.unbindTooltip),Rt(()=>{l.unbindPopup(),l.unbindTooltip(),c()}),{options:o,methods:l}},y0=(e,t)=>{if(e&&t.default)return An("div",{style:{display:"none"}},t.default())},Cwe={...vs,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},dS={...Cwe,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},ywe={...dS,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...ywe});const Rs={...Hi,position:{type:String}},fS=(e,t)=>{const{options:n,methods:r}=Dc(e),a=rr(e,Rs,n),s={...r,setPosition(i){t.value&&t.value.setPosition(i)}};return Rt(()=>{t.value&&t.value.remove()}),{options:a,methods:s}},Dwe=e=>e.default?An("div",{ref:"root"},e.default()):null,Ch=Q({name:"LControl",props:{...Rs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=ce(),r=ce(),a=ht(vr),s=bn(iS),{options:i,methods:o}=fS(e,n);return gt(async()=>{const{Control:u,DomEvent:c}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),l=u.extend({onAdd(){return r.value}});n.value=er(new l(i)),Ir(o,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&r.value&&c.disableClickPropagation(r.value),e.disableScrollPropagation&&r.value&&c.disableScrollPropagation(r.value),gn(()=>t.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return Dwe(this.$slots)}});({...Rs});const pS={...Rs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},Pwe=(e,t)=>{const{options:n}=fS(e,t);return{options:rr(e,pS,n),methods:{addLayer(r){r.layerType==="base"?t.value.addBaseLayer(r.leafletObject,r.name):r.layerType==="overlay"&&t.value.addOverlay(r.leafletObject,r.name)},removeLayer(r){t.value.removeLayer(r.leafletObject)}}}},wwe=Q({name:"LControlLayers",props:pS,setup(e,t){const n=ce(),r=ht(vr),a=bn(oS),{options:s,methods:i}=Pwe(e,n);return gt(async()=>{const{control:o}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=er(o.layers(void 0,void 0,s)),Ir(i,n.value,e),a({...e,...i,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...Rs});({...Rs});const Pc={...vs},mS=(e,t,n)=>{const{options:r,methods:a}=C0(e,t,n),s=rr(e,Pc,r),i={...a,addLayer(o){t.value.addLayer(o.leafletObject)},removeLayer(o){t.value.removeLayer(o.leafletObject)}};return Jt(ea,i.addLayer),Jt(N0,i.removeLayer),{options:s,methods:i}};({...Pc});const ES={...Pc,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},Lwe=(e,t,n)=>{const{options:r,methods:a}=mS(e,t,n),s=rr(e,ES,r);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const i={...a,setGeojson(o){t.value.clearLayers(),t.value.addData(o)},setOptionsStyle(o){t.value.setStyle(o)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:i}},$we=Q({props:ES,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:i,options:o}=Lwe(e,n,t);return gt(async()=>{const{geoJSON:u}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=er(u(e.geojson,o));const{listeners:c}=va(t.attrs);n.value.on(c),Ir(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return y0(this.ready,this.$slots)}}),D0={...vs,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},hS=(e,t,n)=>{const{options:r,methods:a}=C0(e,t,n),s=rr(e,D0,r),i={...a,setTileComponent(){var o;(o=t.value)==null||o.redraw()}};return Rt(()=>{t.value.off()}),{options:s,methods:i}},kwe=(e,t,n,r)=>e.extend({initialize(a){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,a)},createTile(a){const s=this._tileCoordsToKey(a);this.tileComponents[s]=t.create("div");const i=An({setup:r,props:["coords"]},{coords:a});return T2(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(a){const s=this._tileCoordsToKey(a.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...D0});const yh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},Uwe=Q({name:"LIcon",props:{...yh,...Hi},setup(e,t){const n=ce(),r=ht(vr),a=bn(uS),s=bn(cS),i=bn(lS);let o,u,c,l,f;const d=(b,I,R)=>{const v=b&&b.innerHTML;if(!I){R&&f&&a()&&s(v);return}const{listeners:A}=va(t.attrs);f&&u(f,A);const{options:C}=Dc(e),w=rr(e,yh,C);v&&(w.html=v),f=w.html?c(w):l(w),o(f,A),i(f)},m=()=>{gn(()=>d(n.value,!0,!1))},E=()=>{gn(()=>d(n.value,!1,!0))},g={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return gt(async()=>{const{DomEvent:b,divIcon:I,icon:R}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(v=>v.e),__vite__mapDeps([0,1]));o=b.on,u=b.off,c=I,l=R,Ir(g,{},e),new MutationObserver(E).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return An("div",{ref:"root"},e)}});({...vs});const Mwe=Q({props:Pc,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:i}=mS(e,n,t);return gt(async()=>{const{layerGroup:o}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=er(o(void 0,e.options));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return y0(this.ready,this.$slots)}});function _S(e,t,n){var r,a,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,o=(a=n.callback)!=null&&a,u=n.maxWait,c=Date.now(),l=[];function f(){if(u!==void 0){var m=Date.now()-c;if(m+t>=u)return u-m}return t}var d=function(){var m=[].slice.call(arguments),E=this;return new Promise(function(g,b){var I=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,c=Date.now(),!i){var v=e.apply(E,m);o&&o(v),l.forEach(function(A){return(0,A.resolve)(v)}),l=[]}},f()),I){var R=e.apply(E,m);return o&&o(R),g(R)}l.push({resolve:g,reject:b})})};return d.cancel=function(m){s!==void 0&&clearTimeout(s),l.forEach(function(E){return(0,E.reject)(m)}),l=[]},d}const Dh={...Hi,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},xwe=Q({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:Dh,setup(e,t){const n=ce(),r=xt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:a}=Dc(e),s=rr(e,Dh,a),{listeners:i,attrs:o}=va(t.attrs),u=So(ea),c=So(N0),l=So(iS),f=So(oS);Jt(vr,e.useGlobalLeaflet);const d=$(()=>{const I={};return e.noBlockingAnimations&&(I.animate=!1),I}),m=$(()=>{const I=d.value;return e.padding&&(I.padding=e.padding),e.paddingTopLeft&&(I.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(I.paddingBottomRight=e.paddingBottomRight),I}),E={moveend:_S(I=>{r.leafletRef&&(t.emit("update:zoom",r.leafletRef.getZoom()),t.emit("update:center",r.leafletRef.getCenter()),t.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(I){const R=r.layersInControl.find(v=>v.name===I.name);R&&R.updateVisibleProp(!0)},overlayremove(I){const R=r.layersInControl.find(v=>v.name===I.name);R&&R.updateVisibleProp(!1)}};gt(async()=>{e.useGlobalLeaflet&&(Ln.L=Ln.L||await bt(()=>import("./maps-ZyuCPqes.js").then(z=>z.l),__vite__mapDeps([0,1])));const{map:I,CRS:R,Icon:v,latLngBounds:A,latLng:C,stamp:w}=e.useGlobalLeaflet?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(z=>z.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(z){console.error(`The following error occurred running the provided beforeMapMount hook ${z.message}`)}await Iwe(v);const k=typeof s.crs=="string"?R[s.crs]:s.crs;s.crs=k||R.EPSG3857;const L={addLayer(z){z.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(z):r.layersInControl.find(W=>w(W.leafletObject)===w(z.leafletObject))||(r.layerControl.addLayer(z),r.layersInControl.push(z))),z.visible!==!1&&r.leafletRef.addLayer(z.leafletObject)},removeLayer(z){z.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(W=>W.name!==z.name):(r.layerControl.removeLayer(z.leafletObject),r.layersInControl=r.layersInControl.filter(W=>w(W.leafletObject)!==w(z.leafletObject)))),r.leafletRef.removeLayer(z.leafletObject)},registerLayerControl(z){r.layerControl=z,r.layersToAdd.forEach(W=>{r.layerControl.addLayer(W)}),r.layersToAdd=[],l(z)},registerControl(z){r.leafletRef.addControl(z.leafletObject)},setZoom(z){const W=r.leafletRef.getZoom();z!==W&&r.leafletRef.setZoom(z,d.value)},setCrs(z){const W=r.leafletRef.getBounds();r.leafletRef.options.crs=z,r.leafletRef.fitBounds(W,{animate:!1,padding:[0,0]})},fitBounds(z){r.leafletRef.fitBounds(z,m.value)},setBounds(z){if(!z)return;const W=A(z);W.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(W,0)&&(r.lastSetBounds=W,r.leafletRef.fitBounds(W))},setCenter(z){if(z==null)return;const W=C(z),U=r.lastSetCenter||r.leafletRef.getCenter();(U.lat!==W.lat||U.lng!==W.lng)&&(r.lastSetCenter=W,r.leafletRef.panTo(W,d.value))}};Oo(u,L.addLayer),Oo(c,L.removeLayer),Oo(l,L.registerControl),Oo(f,L.registerLayerControl),r.leafletRef=er(I(n.value,s)),Ir(L,r.leafletRef,e),Nh(r.leafletRef,E),Nh(r.leafletRef,i),r.ready=!0,gn(()=>t.emit("ready",r.leafletRef))}),Ni(()=>{sS(E),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const g=$(()=>r.leafletRef),b=$(()=>r.ready);return{root:n,ready:b,leafletObject:g,attrs:o}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),An("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),Fwe=["Symbol(Comment)","Symbol(Text)"],Wwe=["LTooltip","LPopup"],TS={...vs,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},Gwe=(e,t,n)=>{const{options:r,methods:a}=C0(e,t,n),s=rr(e,TS,r),i={...a,setDraggable(o){t.value.dragging&&(o?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(o){n.emit("update:latLng",o.latlng),n.emit("update:lat-lng",o.latlng)},setLatLng(o){if(o!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(o))&&t.value.setLatLng(o)}}};return{options:s,methods:i}},zwe=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(Bwe)};function Bwe(e){return!(Fwe.includes(e.type.toString())||Wwe.includes(e.type.name))}const gS=Q({name:"LMarker",props:TS,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea);Jt(uS,()=>{var c;return!!((c=n.value)!=null&&c.getElement())}),Jt(cS,c=>{var l,f;const d=Mr((l=n.value)==null?void 0:l.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=c)}),Jt(lS,c=>{var l;return((l=n.value)==null?void 0:l.setIcon)&&n.value.setIcon(c)});const{options:i,methods:o}=Gwe(e,n,t),u={moveHandler:_S(o.latLngSync)};return gt(async()=>{const{marker:c,divIcon:l}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));zwe(i,t)&&(i.icon=l({className:""})),n.value=er(c(e.latLng,i));const{listeners:f}=va(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),Ir(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),Ni(()=>sS(u)),{ready:r,leafletObject:n}},render(){return y0(this.ready,this.$slots)}}),Hwe={...dS,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},Ph={...Hwe},AS={...Hi,content:{type:String,default:null}};({...AS});({...Ph,latLngs:{...Ph.latLngs}});const P0={...D0,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},jwe=(e,t,n)=>{const{options:r,methods:a}=hS(e,t,n),s=rr(e,P0,r),i={...a};return{options:s,methods:i}},Vwe=Q({props:P0,setup(e,t){const n=ce(),r=ht(vr),a=bn(ea),{options:s,methods:i}=jwe(e,n,t);return gt(async()=>{const{tileLayer:o}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=er(o(e.url,s));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(i,n.value,e),a({...e,...i,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...AS});({...P0});const wh=Q({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:r}=_e(t);return(a,s)=>h(r).latitude?(T(),te(h(gS),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},{default:fe(()=>[M(h(Uwe),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):F("",!0)}}),Kwe=e=>(ut("data-v-eb9f1569"),e=e(),ct(),e),Ywe={id:"workout-map"},qwe={key:0,class:"leaflet-container"},Xwe={key:1},Zwe=Kwe(()=>p("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),Qwe={key:1,class:"no-map"},Jwe=Q({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=$e(),{workoutData:r,markerCoordinates:a}=_e(t),s=ce(null),i=$(()=>b()),o=$(()=>n.getters[H.GETTERS.APP_CONFIG]),u=$(()=>E(i)),c=$(()=>t.workoutData&&t.workoutData.gpx?m(t.workoutData.gpx):{}),l=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=ce(!1);function m(v){if(!v||v!=="")try{return{jsonData:Swe(new DOMParser().parseFromString(v,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function E(v){return[(v.value[0][0]+v.value[1][0])/2,(v.value[0][1]+v.value[1][1])/2]}function g(v){var A,C;(A=s.value)!=null&&A.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(v))}function b(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function I(){var v;(v=s.value)==null||v.leafletObject.fitBounds(b())}function R(){d.value=!d.value,d.value||setTimeout(()=>{I()},100)}return(v,A)=>{const C=ue("VFullscreen");return T(),N("div",Ywe,[h(r).loading?(T(),N("div",qwe)):(T(),N("div",Xwe,[h(r).workout.with_gpx?(T(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":A[1]||(A[1]=w=>d.value=w)},{default:fe(()=>[p("div",{class:ge(["leaflet-container",{"fullscreen-map":d.value}])},[c.value.jsonData&&u.value&&i.value.length===2?(T(),te(h(xwe),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:i.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:A[0]||(A[0]=w=>g(i.value)),"use-global-leaflet":!1,class:"map"},{default:fe(()=>[M(h(wwe)),M(h(Ch),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":v.$t("workouts.RESET_ZOOM"),onClick:I},{default:fe(()=>[Zwe]),_:1},8,["aria-label"]),M(h(Ch),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":v.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:R},{default:fe(()=>[p("i",{class:ge(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),M(h(Vwe),{url:`${h(Pi)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:o.value.map_attribution,bounds:i.value},null,8,["url","attribution","bounds"]),M(h($we),{geojson:c.value.jsonData},null,8,["geojson"]),h(a).latitude?(T(),te(h(gS),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},null,8,["lat-lng"])):F("",!0),M(h(Mwe),{name:v.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:fe(()=>[l.value.latitude?(T(),te(wh,{key:0,markerCoordinates:l.value,isStart:!0},null,8,["markerCoordinates"])):F("",!0),f.value.latitude?(T(),te(wh,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):F("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):F("",!0)],2)]),_:1},8,["modelValue"])):(T(),N("div",Qwe,_(v.$t("workouts.NO_MAP")),1))]))])}}}),eLe=re(Jwe,[["__scopeId","data-v-eb9f1569"]]),tLe={class:"workout-detail"},nLe=Q({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Vt(),r=$e(),{authUser:a,markerCoordinates:s,workoutData:i}=_e(t),o=$(()=>t.workoutData.workout),u=ce(n.params.workoutId?+n.params.segmentId:null),c=$(()=>o.value.segments.length>0&&u.value?o.value.segments[+u.value-1]:null),l=ce(!1),f=$(()=>t.sports?t.sports.find(v=>v.id===t.workoutData.workout.sport_id):{}),d=$(()=>E(o.value,c.value));function m(v,A,C){const w=A&&C&&C!==1?`/workouts/${v.id}/segment/${C-1}`:!A&&v.previous_workout?`/workouts/${v.previous_workout}`:null,k=A&&C&&Cn.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",tLe,[l.value?(T(),te(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"])):F("",!0),M(w,null,{title:fe(()=>[f.value?(T(),te(l6e,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:A[1]||(A[1]=k=>g(!0))},null,8,["sport","workoutObject"])):F("",!0)]),content:fe(()=>[M(eLe,{workoutData:h(i),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),M(dwe,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),rLe=re(nLe,[["__scopeId","data-v-f8b05eca"]]),aLe=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")},sLe={id:"htmlLegend",afterUpdate(e,t,n){var s,i,o,u,c,l;const r=aLe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((o=(i=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:i.labels)!=null&&o.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)})}},iLe=e=>(ut("data-v-85c323a2"),e=e(),ct(),e),oLe={id:"workout-chart"},uLe={class:"chart-radio"},cLe=["checked"],lLe=["checked"],dLe=iLe(()=>p("div",{id:"chart-legend"},null,-1)),fLe={class:"line-chart"},pLe={class:"chart-info"},mLe={class:"no-data-cleaning"},ELe={key:0,class:"elevation-start"},hLe=["checked"],_Le=Q({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=Cf(),{t:s}=jt(),{authUser:i,workoutData:o}=_e(n),u=$(()=>a.getters[H.GETTERS.DARK_MODE]),c=ce(!0),l=ce(i.value.start_elevation_at_zero),f=$(()=>z3e(o.value.chartData,s,i.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(W){return c.value?Number(W).toFixed(2):w(W)},...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(W){const U=` ${W.dataset.label}: ${W.formattedValue}`;return W.dataset.yAxisID==="yElevation"?U+` ${E}`:U+` ${m}/h`},title:function(W){return W.length>0&&k(b.value[W[0].dataIndex]),W.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${W[0].label} ${m}`:`${s("workouts.DURATION")}: ${w(W[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:d.value}}})),A=[sLe];function C(){c.value=!c.value}function w(W){return new Date(+W*1e3).toISOString().substr(11,8)}function k(W){r("getCoordinates",W)}function L(){k({latitude:null,longitude:null})}function z(W){return n.authUser.imperial_units?$n[W].defaultTarget:W}return(W,U)=>{const Z=ue("Card");return T(),N("div",oLe,[M(Z,null,{title:fe(()=>[K(_(W.$t("workouts.ANALYSIS")),1)]),content:fe(()=>[p("div",uLe,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:C},null,8,cLe),K(" "+_(W.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:C},null,8,lLe),K(" "+_(W.$t("workouts.DURATION")),1)])]),dLe,p("div",fLe,[M(h(MCe),{data:g.value,options:v.value,plugins:A,onMouseleave:L},null,8,["data","options"])]),p("div",pLe,[p("div",mLe,_(W.$t("workouts.NO_DATA_CLEANING")),1),d.value?(T(),N("div",ELe,[p("label",null,[p("input",{type:"checkbox",checked:l.value,onClick:U[0]||(U[0]=ee=>l.value=!l.value)},null,8,hLe),K(" "+_(W.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):F("",!0)])]),_:1})])}}}),TLe=re(_Le,[["__scopeId","data-v-85c323a2"]]),gLe={id:"workout-note"},ALe=["innerHTML"],SLe=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",gLe,[M(s,null,{title:fe(()=>[K(_(r.$t("workouts.NOTES")),1)]),content:fe(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(Ii)(h(n)):r.$t("workouts.NO_NOTES")},null,8,ALe)]),_:1})])}}}),OLe=re(SLe,[["__scopeId","data-v-f3e81eff"]]),ILe={id:"workout-segments"},vLe=Q({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const i=ue("router-link"),o=ue("Distance"),u=ue("Card");return T(),N("div",ILe,[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(i,{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(o,{distance:c.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),K(", "+_(a.$t("workouts.DURATION"))+": "+_(c.duration)+") ",1)]))),128))])]),_:1})])}}}),RLe=re(vLe,[["__scopeId","data-v-15725c61"]]),bLe=e=>(ut("data-v-eac6aa4b"),e=e(),ct(),e),NLe={id:"workout",class:"view"},CLe={class:"container"},yLe={key:0,class:"workout-container"},DLe={key:0},PLe=bLe(()=>p("div",{id:"bottom"},null,-1)),wLe={key:1},LLe=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]),i=$(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),o=$(()=>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",NLe,[p("div",CLe,[o.value.length>0?(T(),N("div",yLe,[s.value.workout.id?(T(),N("div",DLe,[M(rLe,{workoutData:s.value,sports:o.value,authUser:i.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(),te(TLe,{key:0,workoutData:s.value,authUser:i.value,displaySegment:h(a),onGetCoordinates:c},null,8,["workoutData","authUser","displaySegment"])):F("",!0),!h(a)&&s.value.workout.segments.length>1?(T(),te(RLe,{key:1,segments:s.value.workout.segments,useImperialUnits:i.value.imperial_units},null,8,["segments","useImperialUnits"])):F("",!0),h(a)?F("",!0):(T(),te(OLe,{key:2,notes:s.value.workout.notes},null,8,["notes"])),PLe])):(T(),N("div",wLe,[s.value.loading?F("",!0):(T(),te(O0,{key:0,target:"WORKOUT"}))]))])):F("",!0)])]))}}),Lh=re(LLe,[["__scopeId","data-v-eac6aa4b"]]),$Le=e=>(ut("data-v-29caaf8f"),e=e(),ct(),e),kLe={class:"workouts-filters"},ULe={class:"box"},MLe={class:"form-all-items"},xLe={class:"form-items-group"},FLe={class:"form-item"},WLe=["value"],GLe={class:"form-item"},zLe=["value"],BLe={class:"form-items-group"},HLe={class:"form-item"},jLe=["value"],VLe=$Le(()=>p("option",{value:""},null,-1)),KLe=["value"],YLe={class:"form-item form-item-title"},qLe={class:"form-inputs-group"},XLe=["value"],ZLe={class:"form-items-group"},QLe={class:"form-item"},JLe={class:"form-inputs-group"},e8e=["value"],t8e=["value"],n8e={class:"form-items-group"},r8e={class:"form-item"},a8e={class:"form-inputs-group"},s8e=["value"],i8e=["value"],o8e={class:"form-items-group"},u8e={class:"form-item"},c8e={class:"form-inputs-group"},l8e=["value"],d8e=["value"],f8e={class:"form-items-group"},p8e={class:"form-item"},m8e={class:"form-inputs-group"},E8e=["value"],h8e=["value"],_8e={class:"form-button"},T8e=Q({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=Vt(),i=Zr(),{authUser:o}=_e(n),u=o.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"),i.push({path:"/workouts",query:l})}function m(){r("filter"),i.push({path:"/workouts",query:{}})}return Fe(()=>s.query,E=>{l=Object.assign({},E)}),(E,g)=>(T(),N("div",kLe,[p("div",ULe,[p("form",{onSubmit:Xe(d,["prevent"]),class:"form"},[p("div",MLe,[p("div",xLe,[p("div",FLe,[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,WLe)]),p("div",GLe,[p("label",null,_(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,zLe)])]),p("div",BLe,[p("div",HLe,[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"])},[VLe,(T(!0),N(Ie,null,xe(c.value.filter(b=>h(o).sports_list.includes(b.id)),b=>(T(),N("option",{value:b.id,key:b.id},_(b.translatedLabel),9,KLe))),128))],40,jLe)]),p("div",YLe,[p("label",null,_(E.$t("workouts.TITLE",1))+":",1),p("div",qLe,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,XLe)])])]),p("div",ZLe,[p("div",QLe,[p("label",null,_(E.$t("workouts.DISTANCE"))+" ("+_(h(u))+"): ",1),p("div",JLe,[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,e8e),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,t8e)])])]),p("div",n8e,[p("div",r8e,[p("label",null,_(E.$t("workouts.DURATION"))+": ",1),p("div",a8e,[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,s8e),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,i8e)])])]),p("div",o8e,[p("div",u8e,[p("label",null,_(E.$t("workouts.AVE_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",c8e,[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,l8e),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,d8e)])])]),p("div",f8e,[p("div",p8e,[p("label",null,_(E.$t("workouts.MAX_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",m8e,[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,E8e),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,h8e)])])])]),p("div",_8e,[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)])]))}}),g8e=re(T8e,[["__scopeId","data-v-29caaf8f"]]),SS=e=>(ut("data-v-bb980a00"),e=e(),ct(),e),A8e={class:"workouts-list"},S8e={class:"total"},O8e={class:"total-label"},I8e={key:0},v8e={key:0,class:"workouts-table responsive-table"},R8e=SS(()=>p("th",{class:"sport-col"},null,-1)),b8e={class:"sport-col"},N8e={class:"cell-heading"},C8e=["onMouseover"],y8e={class:"cell-heading"},D8e={key:0,class:"fa fa-map-o","aria-hidden":"true"},P8e={class:"title"},w8e={class:"workout-date"},L8e={class:"cell-heading"},$8e={class:"text-right"},k8e={class:"cell-heading"},U8e={class:"text-right"},M8e={class:"cell-heading"},x8e={class:"text-right"},F8e={class:"cell-heading"},W8e={class:"text-right"},G8e={class:"cell-heading"},z8e={class:"text-right"},B8e={class:"cell-heading"},H8e={class:"text-right"},j8e={class:"cell-heading"},V8e=SS(()=>p("div",{id:"bottom"},null,-1)),K8e=Q({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=$e(),r=Vt(),a=Zr(),{user:s,sports:i}=_e(t),o=["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,o,Ri.order_by,{defaultSort:Ri.order});return Object.keys(R).filter(A=>xAe.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",A8e,[p("div",{class:ge(["box",{"empty-table":u.value.length===0}])},[p("div",S8e,[p("span",O8e,_(R.$t("common.TOTAL").toLowerCase())+": ",1),c.value.total?(T(),N("span",I8e,_(c.value.total)+" "+_(R.$t("workouts.WORKOUT",c.value.total)),1)):F("",!0)]),M(EA,{sort:h(T0),order_by:o,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(T(),N("div",v8e,[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,[R8e,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",b8e,[p("span",N8e,_(R.$t("workouts.SPORT",1)),1),h(i).length>0?(T(),te(A,{key:0,title:h(i).filter(L=>L.id===k.sport_id)[0].translatedLabel,"sport-label":h(h0)(k,h(i)),color:h(_0)(k,h(i))},null,8,["title","sport-label","color"])):F("",!0)]),p("td",{class:"workout-title",onMouseover:L=>I(k.id),onMouseleave:v[0]||(v[0]=L=>I(null))},[p("span",y8e,_(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",D8e)):F("",!0),p("span",P8e,_(k.title),1)]),_:2},1032,["to"]),k.with_gpx&&d.value===k.id?(T(),te(BA,{key:0,workout:k,"display-hover":!0},null,8,["workout"])):F("",!0)],40,C8e),p("td",w8e,[p("span",L8e,_(R.$t("workouts.DATE")),1),p("time",null,_(h(xn)(k.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",$8e,[p("span",k8e,_(R.$t("workouts.DISTANCE")),1),k.distance!==null?(T(),te(w,{key:0,distance:k.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",U8e,[p("span",M8e,_(R.$t("workouts.DURATION")),1),K(" "+_(k.moving),1)]),p("td",x8e,[p("span",F8e,_(R.$t("workouts.AVE_SPEED")),1),k.ave_speed!==null?(T(),te(w,{key:0,distance:k.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",W8e,[p("span",G8e,_(R.$t("workouts.MAX_SPEED")),1),k.max_speed!==null?(T(),te(w,{key:0,distance:k.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",z8e,[p("span",B8e,_(R.$t("workouts.ASCENT")),1),k.ascent!==null?(T(),te(w,{key:0,distance:k.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",H8e,[p("span",j8e,_(R.$t("workouts.DESCENT")),1),k.descent!==null?(T(),te(w,{key:0,distance:k.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)])]))),128))])]),M(Wu,{pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):F("",!0)],2),u.value.length===0?(T(),te(v0,{key:0})):F("",!0),V8e])}}}),Y8e=re(K8e,[["__scopeId","data-v-bb980a00"]]),q8e={key:0,id:"workouts",class:"view"},X8e={class:"container workouts-container"},Z8e={class:"display-filters"},Q8e={class:"list-container"},J8e=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)),i=ce(!0);function o(){i.value=!i.value}return(u,c)=>r.value.username?(T(),N("div",q8e,[p("div",X8e,[p("div",{class:ge(["filters-container",{hidden:i.value}])},[M(g8e,{sports:s.value,authUser:r.value,onFilter:o},null,8,["sports","authUser"])],2),p("div",Z8e,[p("div",{onClick:o},[p("i",{class:ge(`fa fa-caret-${i.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,_(u.$t(`workouts.${i.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",Q8e,[M(Y8e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):F("",!0)}}),e$e=re(J8e,[["__scopeId","data-v-3fa59b88"]]),{t:$h}=ga.global,kh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},t$e=[{path:"/",name:"Dashboard",component:t4e,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:pDe,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:()=>Ao,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:Ao,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:Ao,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:Ao,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:_De,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:HDe,children:[{path:"",name:"UserProfile",component:pOe,props:e=>({tab:kh(e.path)}),children:[{path:"",name:"UserInfos",component:RA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:kOe,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:Fbe,children:[{path:"",name:"UserAppsList",component:sNe,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:bbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:Mbe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:MOe,props:e=>({tab:kh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:kve,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:gve,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:jve,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:BRe,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:rbe,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:P4e,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:vh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:e$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:xPe,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:kPe,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:_3e,children:[{path:"",name:"AdministrationMenu",component:sAe,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:CAe,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:VSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:o3e,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:o4e,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:r4e,meta:{title:"error.NOT_FOUND.PAGE"}}],OS=Upe({history:Q0e("/"),routes:t$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)}`:""}`}ei.dispatch(Y.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(ei.getters[Y.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!ei.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=g2(h0e).provide("sportColors",E0).use(ga).use(ei).use(_t).use(aR,{name:"VFullscreen"}).directive("click-outside",dhe);lhe.forEach(e=>{IS.component(e.name,e.target)});IS.mount("#app");
+ C512.001,172.24,506.387,166.626,499.487,166.626z">`,7),bDe=[RDe];function NDe(e,t,n,r,a,s){return T(),N("svg",vDe,bDe)}const CDe=re(IDe,[["render",NDe]]),yDe={id:"password-action-done",class:"center-card with-margin"},DDe={class:"password-message"},PDe={key:0},wDe=Q({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=ue("router-link"),i=ue("i18n-t");return T(),N("div",yDe,[h(n)==="request-sent"?(T(),te(ZA,{key:0})):(T(),te(CDe,{key:1})),p("div",DDe,[h(n)==="request-sent"?(T(),N("span",PDe,_(r.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(T(),te(i,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:fe(()=>[M(s,{to:"/login"},{default:fe(()=>[K(_(r.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),LDe=re(wDe,[["__scopeId","data-v-ee1004fc"]]),$De={id:"password-reset-request",class:"center-card with-margin"},kDe=Q({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:r}=_e(t);return(a,s)=>{const i=ue("Card");return T(),N("div",$De,[M(i,null,{title:fe(()=>[K(_(a.$t("user.RESET_PASSWORD")),1)]),content:fe(()=>[M(R0,{action:h(n),token:h(r)},null,8,["action","token"])]),_:1})])}}}),UDe=re(kDe,[["__scopeId","data-v-97f01ba1"]]),MDe={id:"password-reset",class:"view"},xDe={class:"container"},FDe=Q({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=Vt(),r=Zr(),{action:a}=_e(t),s=$(()=>n.query.token);return It(()=>{t.action==="reset"&&!s.value&&r.push("/")}),(i,o)=>(T(),N("div",MDe,[p("div",xDe,[h(a).startsWith("reset")?(T(),te(UDe,{key:0,action:h(a),token:s.value},null,8,["action","token"])):(T(),te(LDe,{key:1,action:h(a)},null,8,["action"]))])]))}}),Ao=re(FDe,[["__scopeId","data-v-5cbe9029"]]),WDe=e=>(ut("data-v-af92ad3a"),e=e(),ct(),e),GDe={key:0,id:"profile",class:"view"},zDe=WDe(()=>p("div",{id:"bottom"},null,-1)),BDe=Q({__name:"ProfileView",setup(e){const t=$e(),n=$(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]);return(r,a)=>{const s=ue("router-view");return n.value.username?(T(),N("div",GDe,[M(s,{user:n.value},null,8,["user"]),zDe])):F("",!0)}}}),HDe=re(BDe,[["__scopeId","data-v-af92ad3a"]]),jDe={key:0,id:"user",class:"view"},VDe={class:"box"},KDe=Q({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),r=Vt(),a=$e(),s=$(()=>a.getters[Ce.GETTERS.USER]);return It(()=>{r.params.username&&typeof r.params.username=="string"&&a.dispatch(Ce.ACTIONS.GET_USER,r.params.username)}),Ni(()=>{a.dispatch(Ce.ACTIONS.EMPTY_USER)}),(i,o)=>s.value.username?(T(),N("div",jDe,[M(IA,{user:s.value},null,8,["user"]),p("div",VDe,[M(RA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):F("",!0)}}),vh=re(KDe,[["__scopeId","data-v-1b7a0b4f"]]),YDe={id:"workout-form"},qDe={class:"form-items"},XDe={key:0,class:"form-item-radio"},ZDe=["checked","disabled"],QDe={for:"withGpx"},JDe=["checked","disabled"],ePe={for:"withoutGpx"},tPe={class:"form-item"},nPe=["disabled"],rPe=["value"],aPe={key:1,class:"form-item"},sPe={for:"gpxFile"},iPe=["disabled"],oPe={class:"files-help info-box"},uPe={key:2,class:"form-item"},cPe={for:"title"},lPe=["required","disabled"],dPe={key:3},fPe={class:"workout-date-duration"},pPe={class:"form-item"},mPe={class:"workout-date-time"},EPe=["disabled"],hPe=["disabled"],_Pe={class:"form-item"},TPe=["disabled"],gPe=["disabled"],APe=["disabled"],SPe={class:"workout-data"},OPe={class:"form-item"},IPe=["disabled"],vPe={class:"form-item"},RPe=["disabled"],bPe={class:"form-item"},NPe=["disabled"],CPe={class:"form-item"},yPe={key:1},DPe={key:2,class:"form-buttons"},PPe=["disabled"],wPe=Q({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=jt(),r=$e(),a=Zr(),{authUser:s,workout:i,isCreation:o,loading:u}=_e(t),c=$(()=>Jr(t.sports,n,"is_active_for_user",i.value.id?[i.value.sport_id]:[])),l=$(()=>r.getters[H.GETTERS.APP_CONFIG]),f=l.value.max_single_file_size?tu(l.value.max_single_file_size):"",d=l.value.gpx_limit_import,m=l.value.max_zip_file_size?tu(l.value.max_zip_file_size):"",E=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),g=xt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),b=ce(i.value.id?i.value.with_gpx:o.value);let I=null;const R=ce(!1),v=ce([]);gt(()=>{let P;t.workout.id?(k(t.workout),P=document.getElementById("sport")):P=document.getElementById("withGpx"),P&&P.focus()});function A(P){g.notes=P}function C(){b.value=!b.value,R.value=!1}function w(P){P.target.files&&(I=P.target.files[0])}function k(P){if(g.sport_id=`${P.sport_id}`,g.title=P.title,g.notes=P.notes,!P.with_gpx){const B=SA(yc(P.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=P.duration.split(":");g.workoutDistance=`${s.value.imperial_units?sn(P.distance,"km","mi",3):parseFloat(P.distance.toFixed(3))}`,g.workoutDate=B.workout_date,g.workoutTime=B.workout_time,g.workoutDurationHour=V[0],g.workoutDurationMinutes=V[1],g.workoutDurationSeconds=V[2],g.workoutAscent=P.ascent===null?"":`${s.value.imperial_units?sn(P.ascent,"m","ft",2):parseFloat(P.ascent.toFixed(2))}`,g.workoutDescent=P.descent===null?"":`${s.value.imperial_units?sn(P.descent,"m","ft",2):parseFloat(P.descent.toFixed(2))}`}}function L(){return v.value.includes("workouts.INVALID_DISTANCE")}function z(){return v.value.includes("workouts.INVALID_DURATION")}function W(){return v.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function U(P){v.value=[],P.title=g.title,P.duration=+g.workoutDurationHour*3600+ +g.workoutDurationMinutes*60+ +g.workoutDurationSeconds,P.duration<=0&&v.value.push("workouts.INVALID_DURATION"),P.distance=s.value.imperial_units?sn(+g.workoutDistance,"mi","km",3):+g.workoutDistance,P.distance<=0&&v.value.push("workouts.INVALID_DISTANCE"),P.workout_date=`${g.workoutDate} ${g.workoutTime}`,P.ascent=g.workoutAscent===""?null:s.value.imperial_units?sn(+g.workoutAscent,"ft","m",3):+g.workoutAscent,P.descent=g.workoutDescent===""?null:s.value.imperial_units?sn(+g.workoutDescent,"ft","m",3):+g.workoutDescent,(P.ascent!==null&&P.descent===null||P.ascent===null&&P.descent!==null)&&v.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function Z(){const P={sport_id:+g.sport_id,notes:g.notes};if(t.workout.id)t.workout.with_gpx?P.title=g.title:U(P),v.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,v.value):r.dispatch(Te.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:P});else if(b.value){if(!I){const B="workouts.NO_FILE_PROVIDED";r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,B);return}P.file=I,r.dispatch(Te.ACTIONS.ADD_WORKOUT,P)}else U(P),v.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,v.value):r.dispatch(Te.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,P)}function ee(){t.workout.id?a.push({name:"Workout",params:{workoutId:t.workout.id}}):a.go(-1)}function ae(){R.value=!0}return Rt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Fe(()=>t.workout,async(P,B)=>{P!==B&&P&&P.id&&k(P)}),(P,B)=>{const V=ue("CustomTextArea"),se=ue("ErrorMessage"),Pe=ue("Loader"),We=ue("Card");return T(),N("div",{id:"workout-edition",class:ge(["center-card with-margin",{"center-form":h(i)&&h(i).with_gpx}])},[M(We,null,{title:fe(()=>[K(_(P.$t(`workouts.${h(o)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:fe(()=>[p("div",YDe,[p("form",{class:ge({errors:R.value}),onSubmit:Xe(Z,["prevent"])},[p("div",qDe,[h(o)?(T(),N("div",XDe,[p("div",null,[p("input",{id:"withGpx",type:"radio",checked:b.value,disabled:h(u),onClick:C},null,8,ZDe),p("label",QDe,_(P.$t("workouts.WITH_GPX")),1)]),p("div",null,[p("input",{id:"withoutGpx",type:"radio",checked:!b.value,disabled:h(u),onClick:C},null,8,JDe),p("label",ePe,_(P.$t("workouts.WITHOUT_GPX")),1)])])):F("",!0),p("div",tPe,[p("label",null,_(P.$t("workouts.SPORT",1))+"*: ",1),Ke(p("select",{id:"sport",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[0]||(B[0]=Ae=>g.sport_id=Ae)},[(T(!0),N(Ie,null,xe(c.value,Ae=>(T(),N("option",{value:Ae.id,key:Ae.id},_(Ae.translatedLabel),9,rPe))),128))],40,nPe),[[js,g.sport_id]])]),h(o)&&b.value?(T(),N("div",aPe,[p("label",sPe,_(P.$t("workouts.GPX_FILE"))+" "+_(P.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),p("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:ae,onInput:w},null,40,iPe),p("div",oPe,[p("div",null,[p("strong",null,_(P.$t("workouts.GPX_FILE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(f)),1)])]),p("div",null,[p("strong",null,_(P.$t("workouts.ZIP_ARCHIVE"))+":",1),p("ul",null,[p("li",null,_(P.$t("workouts.NO_FOLDER")),1),p("li",null,_(P.$t("workouts.MAX_FILES"))+": "+_(h(d)),1),p("li",null,_(P.$t("workouts.MAX_SIZE"))+": "+_(h(m)),1)])])])])):(T(),N("div",uPe,[p("label",cPe,_(P.$t("workouts.TITLE"))+": ",1),Ke(p("input",{id:"title",name:"title",type:"text",required:!h(o),onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[1]||(B[1]=Ae=>g.title=Ae)},null,40,lPe),[[tt,g.title]])])),b.value?F("",!0):(T(),N("div",dPe,[p("div",fPe,[p("div",pPe,[p("label",null,_(P.$t("workouts.WORKOUT_DATE"))+"*:",1),p("div",mPe,[Ke(p("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[2]||(B[2]=Ae=>g.workoutDate=Ae)},null,40,EPe),[[tt,g.workoutDate]]),Ke(p("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[3]||(B[3]=Ae=>g.workoutTime=Ae)},null,40,hPe),[[tt,g.workoutTime]])])]),p("div",_Pe,[p("label",null,_(P.$t("workouts.DURATION"))+"*:",1),p("div",null,[Ke(p("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:ge(["workout-duration",{errored:z()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[4]||(B[4]=Ae=>g.workoutDurationHour=Ae)},null,42,TPe),[[tt,g.workoutDurationHour]]),K(" : "),Ke(p("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:ge(["workout-duration",{errored:z()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[5]||(B[5]=Ae=>g.workoutDurationMinutes=Ae)},null,42,gPe),[[tt,g.workoutDurationMinutes]]),K(" : "),Ke(p("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:ge(["workout-duration",{errored:z()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[6]||(B[6]=Ae=>g.workoutDurationSeconds=Ae)},null,42,APe),[[tt,g.workoutDurationSeconds]])])])]),p("div",SPe,[p("div",OPe,[p("label",null,_(P.$t("workouts.DISTANCE"))+" ("+_(h(s).imperial_units?"mi":"km")+")*: ",1),Ke(p("input",{class:ge({errored:L()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[7]||(B[7]=Ae=>g.workoutDistance=Ae)},null,42,IPe),[[tt,g.workoutDistance]])]),p("div",vPe,[p("label",null,_(P.$t("workouts.ASCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:W()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[8]||(B[8]=Ae=>g.workoutAscent=Ae)},null,42,RPe),[[tt,g.workoutAscent]])]),p("div",bPe,[p("label",null,_(P.$t("workouts.DESCENT"))+" ("+_(h(s).imperial_units?"ft":"m")+"): ",1),Ke(p("input",{class:ge({errored:W()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:ae,disabled:h(u),"onUpdate:modelValue":B[9]||(B[9]=Ae=>g.workoutDescent=Ae)},null,42,NPe),[[tt,g.workoutDescent]])])])])),p("div",CPe,[p("label",null,_(P.$t("workouts.NOTES"))+": ",1),M(V,{name:"notes",input:g.notes,disabled:h(u),onUpdateValue:A},null,8,["input","disabled"])])]),E.value?(T(),te(se,{key:0,message:E.value},null,8,["message"])):F("",!0),h(u)?(T(),N("div",yPe,[M(Pe)])):(T(),N("div",DPe,[p("button",{class:"confirm",type:"submit",disabled:h(u)},_(P.$t("buttons.SUBMIT")),9,PPe),p("button",{class:"cancel",onClick:Xe(ee,["prevent"])},_(P.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),JA=re(wPe,[["__scopeId","data-v-4c5a9cd1"]]),LPe={id:"add-workout",class:"view"},$Pe={class:"container"},kPe=Q({__name:"AddWorkout",setup(e){const t=$e(),n=$(()=>t.getters[$t.GETTERS.SPORTS]),r=$(()=>t.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=$(()=>t.getters[Te.GETTERS.WORKOUT_DATA]);return(s,i)=>(T(),N("div",LPe,[p("div",$Pe,[M(JA,{authUser:r.value,sports:n.value,isCreation:!0,loading:a.value.loading},null,8,["authUser","sports","loading"])])]))}}),UPe={id:"edit-workout",class:"view"},MPe={class:"container"},xPe=Q({__name:"EditWorkout",setup(e){const t=Vt(),n=$e(),r=$(()=>n.getters[Y.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[$t.GETTERS.SPORTS]),s=$(()=>n.getters[Te.GETTERS.WORKOUT_DATA]);return It(()=>{n.dispatch(Te.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),Fe(()=>t.params.workoutId,async i=>{i||n.commit(Te.MUTATIONS.EMPTY_WORKOUT)}),(i,o)=>(T(),N("div",UPe,[p("div",MPe,[s.value.workout.id?(T(),te(JA,{key:0,authUser:r.value,sports:a.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):F("",!0)])]))}}),Os=e=>(ut("data-v-e1628a52"),e=e(),ct(),e),FPe={id:"workout-card-title"},WPe=["disabled","title"],GPe=Os(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),zPe=[GPe],BPe={class:"workout-card-title"},HPe={class:"workout-title-date"},jPe={key:0,class:"workout-title"},VPe=["aria-label"],KPe=Os(()=>p("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),YPe=[KPe],qPe=["aria-label"],XPe=Os(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),ZPe=[XPe],QPe=["aria-label"],JPe=Os(()=>p("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),e6e=[JPe],t6e={key:1,class:"workout-title"},n6e={class:"workout-segment"},r6e=Os(()=>p("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),a6e={class:"workout-date"},s6e={class:"workout-link"},i6e=["disabled","title"],o6e=Os(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),u6e=[o6e],c6e=Q({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,r=t,{sport:a,workoutObject:s}=_e(n);async function i(u){await Be.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(c=>{const l=window.URL.createObjectURL(new Blob([c.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=l,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function o(){r("displayModal",!0)}return(u,c)=>{const l=ue("SportImage"),f=ue("router-link");return T(),N("div",FPe,[p("button",{class:ge(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:c[0]||(c[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},zPe,10,WPe),p("div",BPe,[M(l,{"sport-label":h(a).label,color:h(a).color},null,8,["sport-label","color"]),p("div",HPe,[h(s).type==="WORKOUT"?(T(),N("div",jPe,[p("span",null,_(h(s).title),1),p("button",{class:"transparent icon-button",onClick:c[1]||(c[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},YPe,8,VPe),h(s).with_gpx?(T(),N("button",{key:0,class:"transparent icon-button",onClick:c[2]||(c[2]=Xe(d=>i(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},ZPe,8,qPe)):F("",!0),p("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Xe(o,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},e6e,8,QPe)])):h(s).segmentId!==null?(T(),N("div",t6e,[K(_(h(s).title)+" ",1),p("span",n6e,[K(" — "),r6e,K(" "+_(u.$t("workouts.SEGMENT"))+" "+_(h(s).segmentId+1),1)])])):F("",!0),p("div",a6e,[p("time",null,_(h(s).workoutDate)+" - "+_(h(s).workoutTime),1),p("span",s6e,[h(s).type==="SEGMENT"?(T(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:fe(()=>[K(" > "+_(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):F("",!0)])])])]),p("button",{class:ge(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:c[3]||(c[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},u6e,10,i6e)])}}}),l6e=re(c6e,[["__scopeId","data-v-e1628a52"]]),d6e=e=>(ut("data-v-1b247cbe"),e=e(),ct(),e),f6e={key:0,class:"workout-record"},p6e=d6e(()=>p("sup",null,[p("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),m6e=[p6e],E6e=Q({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:r}=_e(t);return(a,s)=>h(r).records&&h(r).records.find(i=>i.record_type===h(n))?(T(),N("span",f6e,m6e)):F("",!0)}}),Ms=re(E6e,[["__scopeId","data-v-1b247cbe"]]),h6e="/img/weather/temperature.svg",_6e="/img/weather/pour-rain.svg",T6e="/img/weather/breeze.svg",g6e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],A6e=e=>{const t=Math.floor(e/22.5+.5);return g6e[t%16]},S6e={class:"wind"},O6e={class:"wind-bearing"},I6e=["title"],v6e=Q({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:r}=_e(t),{t:a}=jt();function s(i){return a(`workouts.WEATHER.WIND_DIRECTIONS.${A6e(i)}`)}return(i,o)=>(T(),N("div",S6e,[K(_(h(w0e)(h(r).wind,h(n)))+" ",1),p("div",O6e,[h(r).windBearing?(T(),N("i",{key:0,class:"fa fa-long-arrow-down",style:Yr({transform:`rotate(${h(r).windBearing}deg)`}),"aria-hidden":"true",title:s(h(r).windBearing)},null,12,I6e)):F("",!0)])]))}}),Rh=re(v6e,[["__scopeId","data-v-e1f7f9cc"]]),R6e=e=>(ut("data-v-0eb0ef9d"),e=e(),ct(),e),b6e={key:0,id:"workout-weather"},N6e={class:"weather-table"},C6e=R6e(()=>p("th",null,null,-1)),y6e={class:"weather-th"},D6e=["src","alt","title"],P6e={class:"weather-th"},w6e=["src","alt","title"],L6e=["alt","title"],$6e=["alt","title"],k6e=["alt","title"],U6e=Q({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:r}=_e(t);return(a,s)=>h(r).weatherStart&&h(r).weatherEnd?(T(),N("div",b6e,[p("table",N6e,[p("thead",null,[p("tr",null,[C6e,p("th",null,[p("div",y6e,[K(_(a.$t("workouts.START"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherStart.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`)},null,8,D6e)])]),p("th",null,[p("div",P6e,[K(_(a.$t("workouts.END"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherEnd.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`)},null,8,w6e)])])])]),p("tbody",null,[p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:h6e,alt:a.$t("workouts.WEATHER.TEMPERATURE"),title:a.$t("workouts.WEATHER.TEMPERATURE")},null,8,L6e)]),p("td",null,_(h(Gm)(h(r).weatherStart.temperature,h(n))),1),p("td",null,_(h(Gm)(h(r).weatherEnd.temperature,h(n))),1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:_6e,alt:a.$t("workouts.WEATHER.HUMIDITY"),title:a.$t("workouts.WEATHER.HUMIDITY")},null,8,$6e)]),p("td",null,_(Number(h(r).weatherStart.humidity*100).toFixed(1))+"% ",1),p("td",null,_(Number(h(r).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:T6e,alt:a.$t("workouts.WEATHER.WIND"),title:a.$t("workouts.WEATHER.WIND")},null,8,k6e)]),p("td",null,[M(Rh,{weather:h(r).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),p("td",null,[M(Rh,{weather:h(r).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):F("",!0)}}),M6e=re(U6e,[["__scopeId","data-v-0eb0ef9d"]]),Ia=e=>(ut("data-v-5b72626f"),e=e(),ct(),e),x6e={id:"workout-info"},F6e={class:"workout-data"},W6e=Ia(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),G6e={class:"label"},z6e={class:"value"},B6e={key:0},H6e={class:"value"},j6e={class:"value"},V6e={key:0,class:"workout-data"},K6e=Ia(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),Y6e={class:"label"},q6e={key:1,class:"workout-data"},X6e=Ia(()=>p("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),Z6e={class:"label"},Q6e=Ia(()=>p("br",null,null,-1)),J6e={class:"label"},ewe={key:2,class:"workout-data"},twe=["alt"],nwe={class:"label"},rwe=Ia(()=>p("br",null,null,-1)),awe={class:"label"},swe={key:3,class:"workout-data"},iwe=Ia(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),owe={class:"label"},uwe=Ia(()=>p("br",null,null,-1)),cwe={class:"label"},lwe=Q({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:r,useImperialUnits:a}=_e(t),s=$(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(i,o)=>{const u=ue("Distance");return T(),N("div",x6e,[p("div",F6e,[W6e,p("span",G6e,_(i.$t("workouts.DURATION")),1),K(": "),p("span",z6e,_(h(r).moving),1),M(Ms,{workoutObject:h(r),recordType:"LD"},null,8,["workoutObject"]),s.value?(T(),N("div",B6e,[K(" ("+_(i.$t("workouts.PAUSES"))+": ",1),p("span",H6e,_(h(r).pauses),1),K(" - "+_(i.$t("workouts.TOTAL_DURATION"))+": ",1),p("span",j6e,_(h(r).duration)+")",1)])):F("",!0)]),h(r).distance!==null?(T(),N("div",V6e,[K6e,p("span",Y6e,_(i.$t("workouts.DISTANCE")),1),K(": "),M(u,{distance:h(r).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"FD"},null,8,["workoutObject"])])):F("",!0),h(r).aveSpeed!==null&&h(r).maxSpeed!==null?(T(),N("div",q6e,[X6e,p("span",Z6e,_(i.$t("workouts.AVERAGE_SPEED")),1),K(": "),M(u,{distance:h(r).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"AS"},null,8,["workoutObject"]),Q6e,p("span",J6e,_(i.$t("workouts.MAX_SPEED")),1),K(": "),M(u,{distance:h(r).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),M(Ms,{workoutObject:h(r),recordType:"MS"},null,8,["workoutObject"])])):F("",!0),h(r).maxAlt!==null&&h(r).minAlt!==null?(T(),N("div",ewe,[p("img",{class:"mountains",src:zA,alt:i.$t("workouts.ELEVATION")},null,8,twe),p("span",nwe,_(i.$t("workouts.MIN_ALTITUDE")),1),K(": "),M(u,{distance:h(r).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),rwe,p("span",awe,_(i.$t("workouts.MAX_ALTITUDE")),1),K(": "),M(u,{distance:h(r).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),h(r).ascent!==null&&h(r).descent!==null?(T(),N("div",swe,[iwe,p("span",owe,_(i.$t("workouts.ASCENT")),1),K(": "),M(u,{distance:h(r).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),h(n)?(T(),te(Ms,{key:0,workoutObject:h(r),recordType:"HA"},null,8,["workoutObject"])):F("",!0),uwe,p("span",cwe,_(i.$t("workouts.DESCENT")),1),K(": "),M(u,{distance:h(r).descent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):F("",!0),M(M6e,{workoutObject:h(r),useImperialUnits:h(a)},null,8,["workoutObject","useImperialUnits"])])}}}),dwe=re(lwe,[["__scopeId","data-v-5b72626f"]]);function Ha(e,t){return Array.from(e.getElementsByTagName(t))}function Is(e){return e==null||e.normalize(),e&&e.textContent||""}function ha(e,t,n){const r=e.getElementsByTagName(t),a=r.length?r[0]:null;return a&&n&&n(a),a}function fwe(e,t,n){const r={};if(!e)return r;const a=e.getElementsByTagName(t),s=a.length?a[0]:null;return s&&n?n(s,r):r}function eS(e,t,n){const r=Is(ha(e,t));return r&&n?n(r)||{}:{}}function bh(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return r&&n?n(r)||{}:{}}function pwe(e,t,n){const r=parseFloat(Is(ha(e,t)));if(!isNaN(r))return n&&n(r),r}function Kd(e,t){const n={};for(const r of t)eS(e,r,a=>{n[r]=a});return n}function mwe(e){return(e==null?void 0:e.nodeType)===1}function tS(e){return fwe(e,"line",t=>Object.assign({},eS(t,"color",r=>({stroke:`#${r}`})),bh(t,"opacity",r=>({"stroke-opacity":r})),bh(t,"width",r=>({"stroke-width":r*96/25.4}))))}function nS(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!mwe(n))continue;const r=Ewe(n.nodeName);if(r==="gpxtpx:TrackPointExtension")t=t.concat(nS(n));else{const a=Is(n);t.push([r,hwe(a)])}}return t}function Ewe(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function hwe(e){const t=parseFloat(e);return isNaN(t)?e:t}function rS(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;pwe(e,"ele",r=>{t.push(r)});const n=ha(e,"time");return{coordinates:t,time:n?Is(n):null,extendedValues:nS(ha(e,"extensions"))}}function b0(e){var a;const t=Kd(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((a=s.parentNode)==null?void 0:a.parentNode)===e&&(t[s.tagName.replace(":","_")]=Is(s));const r=Ha(e,"link");return r.length&&(t.links=r.map(s=>Object.assign({href:s.getAttribute("href")},Kd(s,["text","type"])))),t}function aS(e,t){const n=Ha(e,t),r=[],a=[],s={};for(let i=0;i1,i=Object.assign({_gpxType:"trk"},b0(e),tS(ha(e,"extensions")),r.length?{coordinateProperties:{times:s?r:r[0]}}:{});for(const o of a){n.push(o.line),i.coordinateProperties||(i.coordinateProperties={});const u=i.coordinateProperties,c=Object.entries(o.extendedValues);for(let l=0;lnew Array(m.line.length).fill(null))),u[f][l]=d):u[f]=d}}return{type:"Feature",properties:i,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function gwe(e){const t=Object.assign(b0(e),Kd(e,["sym"])),n=rS(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*Awe(e){for(const t of Ha(e,"trk")){const n=Twe(t);n&&(yield n)}for(const t of Ha(e,"rte")){const n=_we(t);n&&(yield n)}for(const t of Ha(e,"wpt")){const n=gwe(t);n&&(yield n)}}function Swe(e){return{type:"FeatureCollection",features:Array.from(Awe(e))}}const Nh=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},sS=e=>{for(const t of Object.keys(e)){const n=e[t];n&&Mr(n.cancel)&&n.cancel()}},Owe=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),Mr=e=>typeof e=="function",Ir=(e,t,n)=>{for(const r in n){const a="set"+Owe(r);e[a]?Fe(()=>n[r],(s,i)=>{e[a](s,i)}):t[a]&&Fe(()=>n[r],s=>{t[a](s)})}},rr=(e,t,n={})=>{const r={...n};for(const a in e){const s=t[a],i=e[a];s&&(s&&s.custom===!0||i!==void 0&&(r[a]=i))}return r},va=e=>{const t={},n={};for(const r in e)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const a=r.slice(2).toLocaleLowerCase();t[a]=e[r]}else n[r]=e[r];return{listeners:t,attrs:n}},Iwe=async e=>{const t=await Promise.all([bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),bt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},So=e=>{const t=ce((...r)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...r)=>t.value(...r);return n.wrapped=t,Jt(e,n),n},Oo=(e,t)=>e.wrapped.value=t,Ln=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,bn=e=>{const t=ht(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},vr=Symbol("useGlobalLeaflet"),ea=Symbol("addLayer"),N0=Symbol("removeLayer"),iS=Symbol("registerControl"),oS=Symbol("registerLayerControl"),uS=Symbol("canSetParentHtml"),cS=Symbol("setParentHtml"),lS=Symbol("setIcon"),vwe=Symbol("bindPopup"),Rwe=Symbol("bindTooltip"),bwe=Symbol("unbindPopup"),Nwe=Symbol("unbindTooltip"),Hi={options:{type:Object,default:()=>({}),custom:!0}},Dc=e=>({options:e.options,methods:{}}),vs={...Hi,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},C0=(e,t,n)=>{const r=bn(ea),a=bn(N0),{options:s,methods:i}=Dc(e),o=rr(e,vs,s),u=()=>r({leafletObject:t.value}),c=()=>a({leafletObject:t.value}),l={...i,setAttribution(f){c(),t.value.options.attribution=f,e.visible&&u()},setName(){c(),e.visible&&u()},setLayerType(){c(),e.visible&&u()},setVisible(f){t.value&&(f?u():c())},bindPopup(f){if(!t.value||!Mr(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!Mr(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(Mr(t.value.closeTooltip)&&t.value.closeTooltip(),Mr(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(Mr(t.value.closePopup)&&t.value.closePopup(),Mr(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return Jt(vwe,l.bindPopup),Jt(Rwe,l.bindTooltip),Jt(bwe,l.unbindPopup),Jt(Nwe,l.unbindTooltip),Rt(()=>{l.unbindPopup(),l.unbindTooltip(),c()}),{options:o,methods:l}},y0=(e,t)=>{if(e&&t.default)return An("div",{style:{display:"none"}},t.default())},Cwe={...vs,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},dS={...Cwe,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},ywe={...dS,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...ywe});const Rs={...Hi,position:{type:String}},fS=(e,t)=>{const{options:n,methods:r}=Dc(e),a=rr(e,Rs,n),s={...r,setPosition(i){t.value&&t.value.setPosition(i)}};return Rt(()=>{t.value&&t.value.remove()}),{options:a,methods:s}},Dwe=e=>e.default?An("div",{ref:"root"},e.default()):null,Ch=Q({name:"LControl",props:{...Rs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=ce(),r=ce(),a=ht(vr),s=bn(iS),{options:i,methods:o}=fS(e,n);return gt(async()=>{const{Control:u,DomEvent:c}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),l=u.extend({onAdd(){return r.value}});n.value=er(new l(i)),Ir(o,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&r.value&&c.disableClickPropagation(r.value),e.disableScrollPropagation&&r.value&&c.disableScrollPropagation(r.value),gn(()=>t.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return Dwe(this.$slots)}});({...Rs});const pS={...Rs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},Pwe=(e,t)=>{const{options:n}=fS(e,t);return{options:rr(e,pS,n),methods:{addLayer(r){r.layerType==="base"?t.value.addBaseLayer(r.leafletObject,r.name):r.layerType==="overlay"&&t.value.addOverlay(r.leafletObject,r.name)},removeLayer(r){t.value.removeLayer(r.leafletObject)}}}},wwe=Q({name:"LControlLayers",props:pS,setup(e,t){const n=ce(),r=ht(vr),a=bn(oS),{options:s,methods:i}=Pwe(e,n);return gt(async()=>{const{control:o}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=er(o.layers(void 0,void 0,s)),Ir(i,n.value,e),a({...e,...i,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...Rs});({...Rs});const Pc={...vs},mS=(e,t,n)=>{const{options:r,methods:a}=C0(e,t,n),s=rr(e,Pc,r),i={...a,addLayer(o){t.value.addLayer(o.leafletObject)},removeLayer(o){t.value.removeLayer(o.leafletObject)}};return Jt(ea,i.addLayer),Jt(N0,i.removeLayer),{options:s,methods:i}};({...Pc});const ES={...Pc,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},Lwe=(e,t,n)=>{const{options:r,methods:a}=mS(e,t,n),s=rr(e,ES,r);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const i={...a,setGeojson(o){t.value.clearLayers(),t.value.addData(o)},setOptionsStyle(o){t.value.setStyle(o)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:i}},$we=Q({props:ES,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:i,options:o}=Lwe(e,n,t);return gt(async()=>{const{geoJSON:u}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=er(u(e.geojson,o));const{listeners:c}=va(t.attrs);n.value.on(c),Ir(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return y0(this.ready,this.$slots)}}),D0={...vs,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},hS=(e,t,n)=>{const{options:r,methods:a}=C0(e,t,n),s=rr(e,D0,r),i={...a,setTileComponent(){var o;(o=t.value)==null||o.redraw()}};return Rt(()=>{t.value.off()}),{options:s,methods:i}},kwe=(e,t,n,r)=>e.extend({initialize(a){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,a)},createTile(a){const s=this._tileCoordsToKey(a);this.tileComponents[s]=t.create("div");const i=An({setup:r,props:["coords"]},{coords:a});return T2(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(a){const s=this._tileCoordsToKey(a.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...D0});const yh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},Uwe=Q({name:"LIcon",props:{...yh,...Hi},setup(e,t){const n=ce(),r=ht(vr),a=bn(uS),s=bn(cS),i=bn(lS);let o,u,c,l,f;const d=(b,I,R)=>{const v=b&&b.innerHTML;if(!I){R&&f&&a()&&s(v);return}const{listeners:A}=va(t.attrs);f&&u(f,A);const{options:C}=Dc(e),w=rr(e,yh,C);v&&(w.html=v),f=w.html?c(w):l(w),o(f,A),i(f)},m=()=>{gn(()=>d(n.value,!0,!1))},E=()=>{gn(()=>d(n.value,!1,!0))},g={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return gt(async()=>{const{DomEvent:b,divIcon:I,icon:R}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(v=>v.e),__vite__mapDeps([0,1]));o=b.on,u=b.off,c=I,l=R,Ir(g,{},e),new MutationObserver(E).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return An("div",{ref:"root"},e)}});({...vs});const Mwe=Q({props:Pc,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea),{methods:i}=mS(e,n,t);return gt(async()=>{const{layerGroup:o}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=er(o(void 0,e.options));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return y0(this.ready,this.$slots)}});function _S(e,t,n){var r,a,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,o=(a=n.callback)!=null&&a,u=n.maxWait,c=Date.now(),l=[];function f(){if(u!==void 0){var m=Date.now()-c;if(m+t>=u)return u-m}return t}var d=function(){var m=[].slice.call(arguments),E=this;return new Promise(function(g,b){var I=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,c=Date.now(),!i){var v=e.apply(E,m);o&&o(v),l.forEach(function(A){return(0,A.resolve)(v)}),l=[]}},f()),I){var R=e.apply(E,m);return o&&o(R),g(R)}l.push({resolve:g,reject:b})})};return d.cancel=function(m){s!==void 0&&clearTimeout(s),l.forEach(function(E){return(0,E.reject)(m)}),l=[]},d}const Dh={...Hi,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},xwe=Q({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:Dh,setup(e,t){const n=ce(),r=xt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:a}=Dc(e),s=rr(e,Dh,a),{listeners:i,attrs:o}=va(t.attrs),u=So(ea),c=So(N0),l=So(iS),f=So(oS);Jt(vr,e.useGlobalLeaflet);const d=$(()=>{const I={};return e.noBlockingAnimations&&(I.animate=!1),I}),m=$(()=>{const I=d.value;return e.padding&&(I.padding=e.padding),e.paddingTopLeft&&(I.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(I.paddingBottomRight=e.paddingBottomRight),I}),E={moveend:_S(I=>{r.leafletRef&&(t.emit("update:zoom",r.leafletRef.getZoom()),t.emit("update:center",r.leafletRef.getCenter()),t.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(I){const R=r.layersInControl.find(v=>v.name===I.name);R&&R.updateVisibleProp(!0)},overlayremove(I){const R=r.layersInControl.find(v=>v.name===I.name);R&&R.updateVisibleProp(!1)}};gt(async()=>{e.useGlobalLeaflet&&(Ln.L=Ln.L||await bt(()=>import("./maps-ZyuCPqes.js").then(z=>z.l),__vite__mapDeps([0,1])));const{map:I,CRS:R,Icon:v,latLngBounds:A,latLng:C,stamp:w}=e.useGlobalLeaflet?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(z=>z.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(z){console.error(`The following error occurred running the provided beforeMapMount hook ${z.message}`)}await Iwe(v);const k=typeof s.crs=="string"?R[s.crs]:s.crs;s.crs=k||R.EPSG3857;const L={addLayer(z){z.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(z):r.layersInControl.find(W=>w(W.leafletObject)===w(z.leafletObject))||(r.layerControl.addLayer(z),r.layersInControl.push(z))),z.visible!==!1&&r.leafletRef.addLayer(z.leafletObject)},removeLayer(z){z.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(W=>W.name!==z.name):(r.layerControl.removeLayer(z.leafletObject),r.layersInControl=r.layersInControl.filter(W=>w(W.leafletObject)!==w(z.leafletObject)))),r.leafletRef.removeLayer(z.leafletObject)},registerLayerControl(z){r.layerControl=z,r.layersToAdd.forEach(W=>{r.layerControl.addLayer(W)}),r.layersToAdd=[],l(z)},registerControl(z){r.leafletRef.addControl(z.leafletObject)},setZoom(z){const W=r.leafletRef.getZoom();z!==W&&r.leafletRef.setZoom(z,d.value)},setCrs(z){const W=r.leafletRef.getBounds();r.leafletRef.options.crs=z,r.leafletRef.fitBounds(W,{animate:!1,padding:[0,0]})},fitBounds(z){r.leafletRef.fitBounds(z,m.value)},setBounds(z){if(!z)return;const W=A(z);W.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(W,0)&&(r.lastSetBounds=W,r.leafletRef.fitBounds(W))},setCenter(z){if(z==null)return;const W=C(z),U=r.lastSetCenter||r.leafletRef.getCenter();(U.lat!==W.lat||U.lng!==W.lng)&&(r.lastSetCenter=W,r.leafletRef.panTo(W,d.value))}};Oo(u,L.addLayer),Oo(c,L.removeLayer),Oo(l,L.registerControl),Oo(f,L.registerLayerControl),r.leafletRef=er(I(n.value,s)),Ir(L,r.leafletRef,e),Nh(r.leafletRef,E),Nh(r.leafletRef,i),r.ready=!0,gn(()=>t.emit("ready",r.leafletRef))}),Ni(()=>{sS(E),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const g=$(()=>r.leafletRef),b=$(()=>r.ready);return{root:n,ready:b,leafletObject:g,attrs:o}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),An("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),Fwe=["Symbol(Comment)","Symbol(Text)"],Wwe=["LTooltip","LPopup"],TS={...vs,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},Gwe=(e,t,n)=>{const{options:r,methods:a}=C0(e,t,n),s=rr(e,TS,r),i={...a,setDraggable(o){t.value.dragging&&(o?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(o){n.emit("update:latLng",o.latlng),n.emit("update:lat-lng",o.latlng)},setLatLng(o){if(o!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(o))&&t.value.setLatLng(o)}}};return{options:s,methods:i}},zwe=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(Bwe)};function Bwe(e){return!(Fwe.includes(e.type.toString())||Wwe.includes(e.type.name))}const gS=Q({name:"LMarker",props:TS,setup(e,t){const n=ce(),r=ce(!1),a=ht(vr),s=bn(ea);Jt(uS,()=>{var c;return!!((c=n.value)!=null&&c.getElement())}),Jt(cS,c=>{var l,f;const d=Mr((l=n.value)==null?void 0:l.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=c)}),Jt(lS,c=>{var l;return((l=n.value)==null?void 0:l.setIcon)&&n.value.setIcon(c)});const{options:i,methods:o}=Gwe(e,n,t),u={moveHandler:_S(o.latLngSync)};return gt(async()=>{const{marker:c,divIcon:l}=a?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));zwe(i,t)&&(i.icon=l({className:""})),n.value=er(c(e.latLng,i));const{listeners:f}=va(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),Ir(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,gn(()=>t.emit("ready",n.value))}),Ni(()=>sS(u)),{ready:r,leafletObject:n}},render(){return y0(this.ready,this.$slots)}}),Hwe={...dS,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},Ph={...Hwe},AS={...Hi,content:{type:String,default:null}};({...AS});({...Ph,latLngs:{...Ph.latLngs}});const P0={...D0,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},jwe=(e,t,n)=>{const{options:r,methods:a}=hS(e,t,n),s=rr(e,P0,r),i={...a};return{options:s,methods:i}},Vwe=Q({props:P0,setup(e,t){const n=ce(),r=ht(vr),a=bn(ea),{options:s,methods:i}=jwe(e,n,t);return gt(async()=>{const{tileLayer:o}=r?Ln.L:await bt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=er(o(e.url,s));const{listeners:u}=va(t.attrs);n.value.on(u),Ir(i,n.value,e),a({...e,...i,leafletObject:n.value}),gn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...AS});({...P0});const wh=Q({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:r}=_e(t);return(a,s)=>h(r).latitude?(T(),te(h(gS),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},{default:fe(()=>[M(h(Uwe),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):F("",!0)}}),Kwe=e=>(ut("data-v-eb9f1569"),e=e(),ct(),e),Ywe={id:"workout-map"},qwe={key:0,class:"leaflet-container"},Xwe={key:1},Zwe=Kwe(()=>p("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),Qwe={key:1,class:"no-map"},Jwe=Q({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=$e(),{workoutData:r,markerCoordinates:a}=_e(t),s=ce(null),i=$(()=>b()),o=$(()=>n.getters[H.GETTERS.APP_CONFIG]),u=$(()=>E(i)),c=$(()=>t.workoutData&&t.workoutData.gpx?m(t.workoutData.gpx):{}),l=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=ce(!1);function m(v){if(!v||v!=="")try{return{jsonData:Swe(new DOMParser().parseFromString(v,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function E(v){return[(v.value[0][0]+v.value[1][0])/2,(v.value[0][1]+v.value[1][1])/2]}function g(v){var A,C;(A=s.value)!=null&&A.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(v))}function b(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function I(){var v;(v=s.value)==null||v.leafletObject.fitBounds(b())}function R(){d.value=!d.value,d.value||setTimeout(()=>{I()},100)}return(v,A)=>{const C=ue("VFullscreen");return T(),N("div",Ywe,[h(r).loading?(T(),N("div",qwe)):(T(),N("div",Xwe,[h(r).workout.with_gpx?(T(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":A[1]||(A[1]=w=>d.value=w)},{default:fe(()=>[p("div",{class:ge(["leaflet-container",{"fullscreen-map":d.value}])},[c.value.jsonData&&u.value&&i.value.length===2?(T(),te(h(xwe),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:i.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:A[0]||(A[0]=w=>g(i.value)),"use-global-leaflet":!1,class:"map"},{default:fe(()=>[M(h(wwe)),M(h(Ch),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":v.$t("workouts.RESET_ZOOM"),onClick:I},{default:fe(()=>[Zwe]),_:1},8,["aria-label"]),M(h(Ch),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":v.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:R},{default:fe(()=>[p("i",{class:ge(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),M(h(Vwe),{url:`${h(Pi)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:o.value.map_attribution,bounds:i.value},null,8,["url","attribution","bounds"]),M(h($we),{geojson:c.value.jsonData},null,8,["geojson"]),h(a).latitude?(T(),te(h(gS),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},null,8,["lat-lng"])):F("",!0),M(h(Mwe),{name:v.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:fe(()=>[l.value.latitude?(T(),te(wh,{key:0,markerCoordinates:l.value,isStart:!0},null,8,["markerCoordinates"])):F("",!0),f.value.latitude?(T(),te(wh,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):F("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):F("",!0)],2)]),_:1},8,["modelValue"])):(T(),N("div",Qwe,_(v.$t("workouts.NO_MAP")),1))]))])}}}),eLe=re(Jwe,[["__scopeId","data-v-eb9f1569"]]),tLe={class:"workout-detail"},nLe=Q({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Vt(),r=$e(),{authUser:a,markerCoordinates:s,workoutData:i}=_e(t),o=$(()=>t.workoutData.workout),u=ce(n.params.workoutId?+n.params.segmentId:null),c=$(()=>o.value.segments.length>0&&u.value?o.value.segments[+u.value-1]:null),l=ce(!1),f=$(()=>t.sports?t.sports.find(v=>v.id===t.workoutData.workout.sport_id):{}),d=$(()=>E(o.value,c.value));function m(v,A,C){const w=A&&C&&C!==1?`/workouts/${v.id}/segment/${C-1}`:!A&&v.previous_workout?`/workouts/${v.previous_workout}`:null,k=A&&C&&Cn.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",tLe,[l.value?(T(),te(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"])):F("",!0),M(w,null,{title:fe(()=>[f.value?(T(),te(l6e,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:A[1]||(A[1]=k=>g(!0))},null,8,["sport","workoutObject"])):F("",!0)]),content:fe(()=>[M(eLe,{workoutData:h(i),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),M(dwe,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),rLe=re(nLe,[["__scopeId","data-v-f8b05eca"]]),aLe=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")},sLe={id:"htmlLegend",afterUpdate(e,t,n){var s,i,o,u,c,l;const r=aLe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((o=(i=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:i.labels)!=null&&o.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)})}},iLe=e=>(ut("data-v-85c323a2"),e=e(),ct(),e),oLe={id:"workout-chart"},uLe={class:"chart-radio"},cLe=["checked"],lLe=["checked"],dLe=iLe(()=>p("div",{id:"chart-legend"},null,-1)),fLe={class:"line-chart"},pLe={class:"chart-info"},mLe={class:"no-data-cleaning"},ELe={key:0,class:"elevation-start"},hLe=["checked"],_Le=Q({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=Cf(),{t:s}=jt(),{authUser:i,workoutData:o}=_e(n),u=$(()=>a.getters[H.GETTERS.DARK_MODE]),c=ce(!0),l=ce(i.value.start_elevation_at_zero),f=$(()=>z3e(o.value.chartData,s,i.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(W){return c.value?Number(W).toFixed(2):w(W)},...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(W){const U=` ${W.dataset.label}: ${W.formattedValue}`;return W.dataset.yAxisID==="yElevation"?U+` ${E}`:U+` ${m}/h`},title:function(W){return W.length>0&&k(b.value[W[0].dataIndex]),W.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${W[0].label} ${m}`:`${s("workouts.DURATION")}: ${w(W[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:d.value}}})),A=[sLe];function C(){c.value=!c.value}function w(W){return new Date(+W*1e3).toISOString().substr(11,8)}function k(W){r("getCoordinates",W)}function L(){k({latitude:null,longitude:null})}function z(W){return n.authUser.imperial_units?$n[W].defaultTarget:W}return(W,U)=>{const Z=ue("Card");return T(),N("div",oLe,[M(Z,null,{title:fe(()=>[K(_(W.$t("workouts.ANALYSIS")),1)]),content:fe(()=>[p("div",uLe,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:C},null,8,cLe),K(" "+_(W.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:C},null,8,lLe),K(" "+_(W.$t("workouts.DURATION")),1)])]),dLe,p("div",fLe,[M(h(MCe),{data:g.value,options:v.value,plugins:A,onMouseleave:L},null,8,["data","options"])]),p("div",pLe,[p("div",mLe,_(W.$t("workouts.NO_DATA_CLEANING")),1),d.value?(T(),N("div",ELe,[p("label",null,[p("input",{type:"checkbox",checked:l.value,onClick:U[0]||(U[0]=ee=>l.value=!l.value)},null,8,hLe),K(" "+_(W.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):F("",!0)])]),_:1})])}}}),TLe=re(_Le,[["__scopeId","data-v-85c323a2"]]),gLe={id:"workout-note"},ALe=["innerHTML"],SLe=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",gLe,[M(s,null,{title:fe(()=>[K(_(r.$t("workouts.NOTES")),1)]),content:fe(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(Ii)(h(n)):r.$t("workouts.NO_NOTES")},null,8,ALe)]),_:1})])}}}),OLe=re(SLe,[["__scopeId","data-v-f3e81eff"]]),ILe={id:"workout-segments"},vLe=Q({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const i=ue("router-link"),o=ue("Distance"),u=ue("Card");return T(),N("div",ILe,[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(i,{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(o,{distance:c.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),K(", "+_(a.$t("workouts.DURATION"))+": "+_(c.duration)+") ",1)]))),128))])]),_:1})])}}}),RLe=re(vLe,[["__scopeId","data-v-15725c61"]]),bLe=e=>(ut("data-v-eac6aa4b"),e=e(),ct(),e),NLe={id:"workout",class:"view"},CLe={class:"container"},yLe={key:0,class:"workout-container"},DLe={key:0},PLe=bLe(()=>p("div",{id:"bottom"},null,-1)),wLe={key:1},LLe=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]),i=$(()=>r.getters[Y.GETTERS.AUTH_USER_PROFILE]),o=$(()=>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",NLe,[p("div",CLe,[o.value.length>0?(T(),N("div",yLe,[s.value.workout.id?(T(),N("div",DLe,[M(rLe,{workoutData:s.value,sports:o.value,authUser:i.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(),te(TLe,{key:0,workoutData:s.value,authUser:i.value,displaySegment:h(a),onGetCoordinates:c},null,8,["workoutData","authUser","displaySegment"])):F("",!0),!h(a)&&s.value.workout.segments.length>1?(T(),te(RLe,{key:1,segments:s.value.workout.segments,useImperialUnits:i.value.imperial_units},null,8,["segments","useImperialUnits"])):F("",!0),h(a)?F("",!0):(T(),te(OLe,{key:2,notes:s.value.workout.notes},null,8,["notes"])),PLe])):(T(),N("div",wLe,[s.value.loading?F("",!0):(T(),te(O0,{key:0,target:"WORKOUT"}))]))])):F("",!0)])]))}}),Lh=re(LLe,[["__scopeId","data-v-eac6aa4b"]]),$Le=e=>(ut("data-v-29caaf8f"),e=e(),ct(),e),kLe={class:"workouts-filters"},ULe={class:"box"},MLe={class:"form-all-items"},xLe={class:"form-items-group"},FLe={class:"form-item"},WLe=["value"],GLe={class:"form-item"},zLe=["value"],BLe={class:"form-items-group"},HLe={class:"form-item"},jLe=["value"],VLe=$Le(()=>p("option",{value:""},null,-1)),KLe=["value"],YLe={class:"form-item form-item-title"},qLe={class:"form-inputs-group"},XLe=["value"],ZLe={class:"form-items-group"},QLe={class:"form-item"},JLe={class:"form-inputs-group"},e8e=["value"],t8e=["value"],n8e={class:"form-items-group"},r8e={class:"form-item"},a8e={class:"form-inputs-group"},s8e=["value"],i8e=["value"],o8e={class:"form-items-group"},u8e={class:"form-item"},c8e={class:"form-inputs-group"},l8e=["value"],d8e=["value"],f8e={class:"form-items-group"},p8e={class:"form-item"},m8e={class:"form-inputs-group"},E8e=["value"],h8e=["value"],_8e={class:"form-button"},T8e=Q({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=jt(),s=Vt(),i=Zr(),{authUser:o}=_e(n),u=o.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"),i.push({path:"/workouts",query:l})}function m(){r("filter"),i.push({path:"/workouts",query:{}})}return Fe(()=>s.query,E=>{l=Object.assign({},E)}),(E,g)=>(T(),N("div",kLe,[p("div",ULe,[p("form",{onSubmit:Xe(d,["prevent"]),class:"form"},[p("div",MLe,[p("div",xLe,[p("div",FLe,[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,WLe)]),p("div",GLe,[p("label",null,_(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,zLe)])]),p("div",BLe,[p("div",HLe,[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"])},[VLe,(T(!0),N(Ie,null,xe(c.value.filter(b=>h(o).sports_list.includes(b.id)),b=>(T(),N("option",{value:b.id,key:b.id},_(b.translatedLabel),9,KLe))),128))],40,jLe)]),p("div",YLe,[p("label",null,_(E.$t("workouts.TITLE",1))+":",1),p("div",qLe,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,XLe)])])]),p("div",ZLe,[p("div",QLe,[p("label",null,_(E.$t("workouts.DISTANCE"))+" ("+_(h(u))+"): ",1),p("div",JLe,[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,e8e),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,t8e)])])]),p("div",n8e,[p("div",r8e,[p("label",null,_(E.$t("workouts.DURATION"))+": ",1),p("div",a8e,[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,s8e),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,i8e)])])]),p("div",o8e,[p("div",u8e,[p("label",null,_(E.$t("workouts.AVE_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",c8e,[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,l8e),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,d8e)])])]),p("div",f8e,[p("div",p8e,[p("label",null,_(E.$t("workouts.MAX_SPEED"))+" ("+_(h(u))+"/h): ",1),p("div",m8e,[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,E8e),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,h8e)])])])]),p("div",_8e,[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)])]))}}),g8e=re(T8e,[["__scopeId","data-v-29caaf8f"]]),SS=e=>(ut("data-v-bb980a00"),e=e(),ct(),e),A8e={class:"workouts-list"},S8e={class:"total"},O8e={class:"total-label"},I8e={key:0},v8e={key:0,class:"workouts-table responsive-table"},R8e=SS(()=>p("th",{class:"sport-col"},null,-1)),b8e={class:"sport-col"},N8e={class:"cell-heading"},C8e=["onMouseover"],y8e={class:"cell-heading"},D8e={key:0,class:"fa fa-map-o","aria-hidden":"true"},P8e={class:"title"},w8e={class:"workout-date"},L8e={class:"cell-heading"},$8e={class:"text-right"},k8e={class:"cell-heading"},U8e={class:"text-right"},M8e={class:"cell-heading"},x8e={class:"text-right"},F8e={class:"cell-heading"},W8e={class:"text-right"},G8e={class:"cell-heading"},z8e={class:"text-right"},B8e={class:"cell-heading"},H8e={class:"text-right"},j8e={class:"cell-heading"},V8e=SS(()=>p("div",{id:"bottom"},null,-1)),K8e=Q({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=$e(),r=Vt(),a=Zr(),{user:s,sports:i}=_e(t),o=["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,o,Ri.order_by,{defaultSort:Ri.order});return Object.keys(R).filter(A=>xAe.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",A8e,[p("div",{class:ge(["box",{"empty-table":u.value.length===0}])},[p("div",S8e,[p("span",O8e,_(R.$t("common.TOTAL").toLowerCase())+": ",1),c.value.total?(T(),N("span",I8e,_(c.value.total)+" "+_(R.$t("workouts.WORKOUT",c.value.total)),1)):F("",!0)]),M(EA,{sort:h(T0),order_by:o,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(T(),N("div",v8e,[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,[R8e,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",b8e,[p("span",N8e,_(R.$t("workouts.SPORT",1)),1),h(i).length>0?(T(),te(A,{key:0,title:h(i).filter(L=>L.id===k.sport_id)[0].translatedLabel,"sport-label":h(h0)(k,h(i)),color:h(_0)(k,h(i))},null,8,["title","sport-label","color"])):F("",!0)]),p("td",{class:"workout-title",onMouseover:L=>I(k.id),onMouseleave:v[0]||(v[0]=L=>I(null))},[p("span",y8e,_(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",D8e)):F("",!0),p("span",P8e,_(k.title),1)]),_:2},1032,["to"]),k.with_gpx&&d.value===k.id?(T(),te(BA,{key:0,workout:k,"display-hover":!0},null,8,["workout"])):F("",!0)],40,C8e),p("td",w8e,[p("span",L8e,_(R.$t("workouts.DATE")),1),p("time",null,_(h(xn)(k.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",$8e,[p("span",k8e,_(R.$t("workouts.DISTANCE")),1),k.distance!==null?(T(),te(w,{key:0,distance:k.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",U8e,[p("span",M8e,_(R.$t("workouts.DURATION")),1),K(" "+_(k.moving),1)]),p("td",x8e,[p("span",F8e,_(R.$t("workouts.AVE_SPEED")),1),k.ave_speed!==null?(T(),te(w,{key:0,distance:k.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",W8e,[p("span",G8e,_(R.$t("workouts.MAX_SPEED")),1),k.max_speed!==null?(T(),te(w,{key:0,distance:k.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",z8e,[p("span",B8e,_(R.$t("workouts.ASCENT")),1),k.ascent!==null?(T(),te(w,{key:0,distance:k.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)]),p("td",H8e,[p("span",j8e,_(R.$t("workouts.DESCENT")),1),k.descent!==null?(T(),te(w,{key:0,distance:k.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):F("",!0)])]))),128))])]),M(Wu,{pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):F("",!0)],2),u.value.length===0?(T(),te(v0,{key:0})):F("",!0),V8e])}}}),Y8e=re(K8e,[["__scopeId","data-v-bb980a00"]]),q8e={key:0,id:"workouts",class:"view"},X8e={class:"container workouts-container"},Z8e={class:"display-filters"},Q8e={class:"list-container"},J8e=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)),i=ce(!0);function o(){i.value=!i.value}return(u,c)=>r.value.username?(T(),N("div",q8e,[p("div",X8e,[p("div",{class:ge(["filters-container",{hidden:i.value}])},[M(g8e,{sports:s.value,authUser:r.value,onFilter:o},null,8,["sports","authUser"])],2),p("div",Z8e,[p("div",{onClick:o},[p("i",{class:ge(`fa fa-caret-${i.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,_(u.$t(`workouts.${i.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",Q8e,[M(Y8e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):F("",!0)}}),e$e=re(J8e,[["__scopeId","data-v-3fa59b88"]]),{t:$h}=ga.global,kh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},t$e=[{path:"/",name:"Dashboard",component:t4e,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:pDe,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:Ao,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:Ao,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:Ao,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:Ao,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:_De,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:HDe,children:[{path:"",name:"UserProfile",component:pOe,props:e=>({tab:kh(e.path)}),children:[{path:"",name:"UserInfos",component:RA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:kOe,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:Fbe,children:[{path:"",name:"UserAppsList",component:sNe,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:bbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:Mbe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:MOe,props:e=>({tab:kh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:kve,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:gve,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:jve,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:BRe,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:rbe,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:P4e,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:vh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:e$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:xPe,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:kPe,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:_3e,children:[{path:"",name:"AdministrationMenu",component:sAe,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:CAe,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:VSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:o3e,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:o4e,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:r4e,meta:{title:"error.NOT_FOUND.PAGE"}}],OS=Upe({history:Q0e("/"),routes:t$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)}`:""}`}ei.dispatch(Y.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(ei.getters[Y.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!ei.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=g2(h0e).provide("sportColors",E0).use(ga).use(ei).use(_t).use(aR,{name:"VFullscreen"}).directive("click-outside",dhe);lhe.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/router/index.ts b/fittrackee_client/src/router/index.ts
index 382df094..e56e0618 100644
--- a/fittrackee_client/src/router/index.ts
+++ b/fittrackee_client/src/router/index.ts
@@ -111,7 +111,7 @@ const routes: Array = [
{
path: '/password-reset/sent',
name: 'PasswordEmailSent',
- component: () => PasswordResetView,
+ component: PasswordResetView,
props: { action: 'request-sent' },
meta: {
title: 'user.PASSWORD_RESET',