FitTrackee/fittrackee/dist/static/js/workouts.ad3402f3.js
2021-11-29 18:07:22 +01:00

2 lines
108 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["workouts"],{"0385":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),r=n("47e2"),a=(n("b0c0"),n("4de4"),n("d3b7"),n("caad"),n("2532"),n("6c02")),c=n("1119"),l=n("6284"),i=function(e){return Object(o["pushScopeId"])("data-v-fe8ba900"),e=e(),Object(o["popScopeId"])(),e},u={class:"workouts-filters"},s={class:"box"},d={class:"form"},b={class:"form-items-group"},p={class:"form-item"},f=["value"],m={class:"form-item"},O=["value"],j={class:"form-items-group"},h={class:"form-item"},g=["value"],y=i((function(){return Object(o["createElementVNode"])("option",{value:""},null,-1)})),v=["value"],k={class:"form-items-group"},w={class:"form-item"},E={class:"form-inputs-group"},N=["value"],S=["value"],V={class:"form-items-group"},T={class:"form-item"},D={class:"form-inputs-group"},_=["value"],I=["value"],x={class:"form-items-group"},R={class:"form-item"},B={class:"form-inputs-group"},A=["value"],C=["value"],U={class:"form-items-group"},L={class:"form-item"},$={class:"form-inputs-group"},P=["value"],M=["value"],F={class:"form-button"},q=Object(o["defineComponent"])({props:{authUser:null,sports:null},emits:["filter"],setup:function(e,t){var n=t.emit,i=e,q=Object(r["b"])(),G=q.t,W=Object(a["c"])(),z=Object(a["d"])(),H=Object(o["toRefs"])(i),K=H.authUser,Z=K.value.imperial_units?l["c"]["km"].defaultTarget:"km",X=Object(o["computed"])((function(){return Object(c["e"])(i.sports,G)})),J=Object.assign({},W.query);function Y(e){""===e.target.value?delete J[e.target.name]:J[e.target.name]=e.target.value}function Q(){n("filter"),"page"in J&&(J["page"]="1"),z.push({path:"/workouts",query:J})}function ee(){n("filter"),z.push({path:"/workouts",query:{}})}return Object(o["watch"])((function(){return W.query}),(function(e){J=Object.assign({},e)})),function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",u,[Object(o["createElementVNode"])("div",s,[Object(o["createElementVNode"])("div",d,[Object(o["createElementVNode"])("div",b,[Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.FROM"))+": ",1),Object(o["createElementVNode"])("input",{name:"from",type:"date",value:e.$route.query.from,onChange:Y},null,40,f)]),Object(o["createElementVNode"])("div",m,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.TO"))+": ",1),Object(o["createElementVNode"])("input",{name:"to",type:"date",value:e.$route.query.to,onChange:Y},null,40,O)])]),Object(o["createElementVNode"])("div",j,[Object(o["createElementVNode"])("div",h,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.SPORT",1))+":",1),Object(o["createElementVNode"])("select",{name:"sport_id",value:e.$route.query.sport_id,onChange:Y},[y,(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(Object(o["unref"])(X).filter((function(e){return Object(o["unref"])(K).sports_list.includes(e.id)})),(function(e){return Object(o["openBlock"])(),Object(o["createElementBlock"])("option",{value:e.id,key:e.id},Object(o["toDisplayString"])(e.translatedLabel),9,v)})),128))],40,g)])]),Object(o["createElementVNode"])("div",k,[Object(o["createElementVNode"])("div",w,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.DISTANCE"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",E,[Object(o["createElementVNode"])("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:e.$route.query.distance_from,onChange:Y},null,40,N),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:e.$route.query.distance_to,onChange:Y},null,40,S)])])]),Object(o["createElementVNode"])("div",V,[Object(o["createElementVNode"])("div",T,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.DURATION"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",D,[Object(o["createElementVNode"])("input",{name:"duration_from",value:e.$route.query.duration_from,onChange:Y,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text"},null,40,_),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{name:"duration_to",value:e.$route.query.duration_to,onChange:Y,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text"},null,40,I)])])]),Object(o["createElementVNode"])("div",x,[Object(o["createElementVNode"])("div",R,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.AVE_SPEED"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",B,[Object(o["createElementVNode"])("input",{min:"0",name:"ave_speed_from",value:e.$route.query.ave_speed_from,onChange:Y,step:"0.1",type:"number"},null,40,A),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{min:"0",name:"ave_speed_to",value:e.$route.query.ave_speed_to,onChange:Y,step:"0.1",type:"number"},null,40,C)])])]),Object(o["createElementVNode"])("div",U,[Object(o["createElementVNode"])("div",L,[Object(o["createElementVNode"])("label",null,Object(o["toDisplayString"])(e.$t("workouts.MAX_SPEED"))+" ("+Object(o["toDisplayString"])(Object(o["unref"])(Z))+"): ",1),Object(o["createElementVNode"])("div",$,[Object(o["createElementVNode"])("input",{min:"0",name:"max_speed_from",value:e.$route.query.max_speed_from,onChange:Y,step:"0.1",type:"number"},null,40,P),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.TO")),1),Object(o["createElementVNode"])("input",{min:"0",name:"max_speed_to",value:e.$route.query.max_speed_to,onChange:Y,step:"0.1",type:"number"},null,40,M)])])])]),Object(o["createElementVNode"])("div",F,[Object(o["createElementVNode"])("button",{class:"confirm",onClick:Q},Object(o["toDisplayString"])(e.$t("buttons.FILTER")),1),Object(o["createElementVNode"])("button",{class:"confirm",onClick:ee},Object(o["toDisplayString"])(e.$t("buttons.CLEAR_FILTER")),1)])])])}}}),G=(n("5022"),n("6b0d")),W=n.n(G);const z=W()(q,[["__scopeId","data-v-fe8ba900"]]);var H=z,K=n("1da1"),Z=n("5530"),X=(n("96cf"),n("d81d"),n("b64b"),n("4fad"),n("ac1f"),n("466d"),n("7db0"),n("b166")),J=n("9176"),Y=n("6d7d"),Q=n("68c6"),ee=n("1724"),te=n("dad5"),ne=n("2906"),oe=n("97e5"),re=n("5e65"),ae=n("9230"),ce=function(e){return Object(o["pushScopeId"])("data-v-c2063212"),e=e(),Object(o["popScopeId"])(),e},le={class:"workouts-list"},ie={class:"total"},ue={class:"total-label"},se={key:0},de={key:0,class:"workouts-table responsive-table"},be=ce((function(){return Object(o["createElementVNode"])("th",{class:"sport-col"},null,-1)})),pe={class:"sport-col"},fe={class:"cell-heading"},me=["onMouseover"],Oe={class:"cell-heading"},je={key:0,class:"fa fa-map-o","aria-hidden":"true"},he={class:"cell-heading"},ge={class:"text-right"},ye={class:"cell-heading"},ve={class:"text-right"},ke={class:"cell-heading"},we={class:"text-right"},Ee={class:"cell-heading"},Ne={class:"text-right"},Se={class:"cell-heading"},Ve={class:"text-right"},Te={class:"cell-heading"},De={class:"text-right"},_e={class:"cell-heading"},Ie=ce((function(){return Object(o["createElementVNode"])("div",{id:"bottom"},null,-1)})),xe=Object(o["defineComponent"])({props:{user:null,sports:null},setup:function(e){var t=e,n=Object(ne["a"])(),r=Object(a["c"])(),i=Object(a["d"])(),u=Object(o["toRefs"])(t),s=u.user,d=u.sports,b=["ave_speed","distance","duration","workout_date"],p=Object(o["computed"])((function(){return n.getters[te["f"].GETTERS.USER_WORKOUTS]})),f=Object(o["computed"])((function(){return n.getters[te["f"].GETTERS.WORKOUTS_PAGINATION]})),m=g(r.query),O=Object(o["ref"])(null);function j(e){n.dispatch(te["f"].ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?y(e):e)}function h(e,t){var n=Object.assign({},r.query);n[e]=t,"per_page"===e&&(n["page"]="1"),m=g(n),i.push({path:"/workouts",query:m})}function g(e){return m=Object(oe["a"])(e,b,ae["a"].order_by,{defaultSort:ae["a"].order}),Object.keys(e).filter((function(e){return oe["d"].includes(e)})).map((function(t){"string"===typeof e[t]&&(m[t]=e[t])})),m}function y(e){var t=Object(Z["a"])({},e);return Object.entries(t).map((function(e){e[0].match("speed|distance")&&(t[e[0]]=Object(l["a"])(+e[1],"mi","km"))})),t}function v(e){O.value=e}return Object(o["onBeforeMount"])((function(){j(m)})),Object(o["watch"])((function(){return r.query}),function(){var e=Object(K["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:m=g(t),j(m);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){var n=Object(o["resolveComponent"])("SportImage"),r=Object(o["resolveComponent"])("router-link"),a=Object(o["resolveComponent"])("Distance");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",le,[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["box",{"empty-table":0===Object(o["unref"])(p).length}])},[Object(o["createElementVNode"])("div",ie,[Object(o["createElementVNode"])("span",ue,Object(o["toDisplayString"])(e.$t("common.TOTAL").toLowerCase())+": ",1),null!==Object(o["unref"])(f).total?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",se,Object(o["toDisplayString"])(Object(o["unref"])(f).total)+" "+Object(o["toDisplayString"])(e.$t("workouts.WORKOUT",Object(o["unref"])(f).total)),1)):Object(o["createCommentVNode"])("",!0)]),Object(o["createVNode"])(J["a"],{sort:Object(o["unref"])(oe["c"]),order_by:b,query:Object(o["unref"])(m),message:"workouts",onUpdateSelect:h},null,8,["sort","query"]),Object(o["unref"])(p).length>0?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",de,[Object(o["createVNode"])(Y["a"],{class:"top-pagination",pagination:Object(o["unref"])(f),path:"/workouts",query:Object(o["unref"])(m)},null,8,["pagination","query"]),Object(o["createElementVNode"])("table",null,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[be,Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.WORKOUT",1))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DATE"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DISTANCE"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DURATION"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.AVE_SPEED"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.MAX_SPEED"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.ASCENT"))),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.DESCENT"))),1)])]),Object(o["createElementVNode"])("tbody",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(Object(o["unref"])(p),(function(l){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:l.id},[Object(o["createElementVNode"])("td",pe,[Object(o["createElementVNode"])("span",fe,Object(o["toDisplayString"])(e.$t("workouts.SPORT",1)),1),Object(o["unref"])(d).length>0?(Object(o["openBlock"])(),Object(o["createBlock"])(n,{key:0,title:Object(o["unref"])(d).find((function(e){return e.id===l.sport_id})).translatedLabel,"sport-label":Object(o["unref"])(c["b"])(l,Object(o["unref"])(d)),color:Object(o["unref"])(c["a"])(l,Object(o["unref"])(d))},null,8,["title","sport-label","color"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("td",{class:"workout-title",onMouseover:function(e){return v(l.id)},onMouseleave:t[0]||(t[0]=function(e){return v(null)})},[Object(o["createElementVNode"])("span",Oe,Object(o["toDisplayString"])(Object(o["capitalize"])(e.$t("workouts.WORKOUT",1))),1),Object(o["createVNode"])(r,{class:"nav-item",to:{name:"Workout",params:{workoutId:l.id}}},{default:Object(o["withCtx"])((function(){return[l.with_gpx?(Object(o["openBlock"])(),Object(o["createElementBlock"])("i",je)):Object(o["createCommentVNode"])("",!0),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(l.title),1)]})),_:2},1032,["to"]),l.with_gpx&&O.value===l.id?(Object(o["openBlock"])(),Object(o["createBlock"])(Q["a"],{key:0,workout:l,"display-hover":!0},null,8,["workout"])):Object(o["createCommentVNode"])("",!0)],40,me),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",he,Object(o["toDisplayString"])(e.$t("workouts.DATE")),1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(Object(o["unref"])(X["a"])(Object(o["unref"])(re["c"])(l.workout_date,Object(o["unref"])(s).timezone),"dd/MM/yyyy HH:mm")),1)]),Object(o["createElementVNode"])("td",ge,[Object(o["createElementVNode"])("span",ye,Object(o["toDisplayString"])(e.$t("workouts.DISTANCE")),1),Object(o["createVNode"])(a,{distance:l.distance,unitFrom:"km",useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])]),Object(o["createElementVNode"])("td",ve,[Object(o["createElementVNode"])("span",ke,Object(o["toDisplayString"])(e.$t("workouts.DURATION")),1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(l.moving),1)]),Object(o["createElementVNode"])("td",we,[Object(o["createElementVNode"])("span",Ee,Object(o["toDisplayString"])(e.$t("workouts.AVE_SPEED")),1),Object(o["createVNode"])(a,{distance:l.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])]),Object(o["createElementVNode"])("td",Ne,[Object(o["createElementVNode"])("span",Se,Object(o["toDisplayString"])(e.$t("workouts.MAX_SPEED")),1),Object(o["createVNode"])(a,{distance:l.max_speed,unitFrom:"km",speed:!0,useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])]),Object(o["createElementVNode"])("td",Ve,[Object(o["createElementVNode"])("span",Te,Object(o["toDisplayString"])(e.$t("workouts.ASCENT")),1),l.with_gpx?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,distance:l.ascent,unitFrom:"m",useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("td",De,[Object(o["createElementVNode"])("span",_e,Object(o["toDisplayString"])(e.$t("workouts.DESCENT")),1),l.with_gpx?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,distance:l.descent,unitFrom:"m",useImperialUnits:Object(o["unref"])(s).imperial_units},null,8,["distance","useImperialUnits"])):Object(o["createCommentVNode"])("",!0)])])})),128))])]),Object(o["createVNode"])(Y["a"],{pagination:Object(o["unref"])(f),path:"/workouts",query:Object(o["unref"])(m)},null,8,["pagination","query"])])):Object(o["createCommentVNode"])("",!0)],2),0===Object(o["unref"])(p).length?(Object(o["openBlock"])(),Object(o["createBlock"])(ee["a"],{key:0})):Object(o["createCommentVNode"])("",!0),Ie])}}});n("8aa2");const Re=W()(xe,[["__scopeId","data-v-c2063212"]]);var Be=Re,Ae={key:0,id:"workouts",class:"view"},Ce={class:"container workouts-container"},Ue={class:"display-filters"},Le={class:"list-container"},$e=Object(o["defineComponent"])({setup:function(e){var t=Object(r["b"])(),n=t.t,a=Object(ne["a"])(),l=Object(o["computed"])((function(){return a.getters[te["a"].GETTERS.AUTH_USER_PROFILE]})),i=Object(o["computed"])((function(){return a.getters[te["c"].GETTERS.SPORTS]})),u=Object(o["computed"])((function(){return Object(c["e"])(i.value,n)})),s=Object(o["ref"])(!0);function d(){s.value=!s.value}return function(e,t){return Object(o["unref"])(l).username?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ae,[Object(o["createElementVNode"])("div",Ce,[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["filters-container",{hidden:s.value}])},[Object(o["createVNode"])(H,{sports:Object(o["unref"])(u),authUser:Object(o["unref"])(l),onFilter:d},null,8,["sports","authUser"])],2),Object(o["createElementVNode"])("div",Ue,[Object(o["createElementVNode"])("div",{onClick:d},[Object(o["createElementVNode"])("i",{class:Object(o["normalizeClass"])("fa fa-caret-".concat(s.value?"down":"up")),"aria-hidden":"true"},null,2),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.$t("workouts.".concat(s.value?"DISPLAY":"HIDE","_FILTERS"))),1)])]),Object(o["createElementVNode"])("div",Le,[Object(o["createVNode"])(Be,{user:Object(o["unref"])(l),sports:Object(o["unref"])(u)},null,8,["user","sports"])])])])):Object(o["createCommentVNode"])("",!0)}}});n("b1c7");const Pe=W()($e,[["__scopeId","data-v-03de0ddc"]]);t["default"]=Pe},"0716":function(e,t,n){},"0d3b":function(e,t,n){var o=n("d039"),r=n("b622"),a=n("c430"),c=r("iterator");e.exports=!o((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,o){t["delete"]("b"),n+=o+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[c]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},"17b6":function(e,t,n){},"1c8d":function(e,t,n){},2146:function(e,t,n){"use strict";n("4c68")},"2b3d":function(e,t,n){"use strict";n("3ca3");var o,r=n("23e7"),a=n("83ab"),c=n("0d3b"),l=n("da84"),i=n("0366"),u=n("c65b"),s=n("e330"),d=n("37e8"),b=n("6eeb"),p=n("19aa"),f=n("1a2d"),m=n("60da"),O=n("4df4"),j=n("f36a"),h=n("6547").codeAt,g=n("5fb2"),y=n("577e"),v=n("d44e"),k=n("9861"),w=n("69f3"),E=w.set,N=w.getterFor("URL"),S=k.URLSearchParams,V=k.getState,T=l.URL,D=l.TypeError,_=l.parseInt,I=Math.floor,x=Math.pow,R=s("".charAt),B=s(/./.exec),A=s([].join),C=s(1..toString),U=s([].pop),L=s([].push),$=s("".replace),P=s([].shift),M=s("".split),F=s("".slice),q=s("".toLowerCase),G=s([].unshift),W="Invalid authority",z="Invalid scheme",H="Invalid host",K="Invalid port",Z=/[a-z]/i,X=/[\d+-.a-z]/i,J=/\d/,Y=/^0x/i,Q=/^[0-7]+$/,ee=/^\d+$/,te=/^[\da-f]+$/i,ne=/[\0\t\n\r #%/:<>?@[\\\]^|]/,oe=/[\0\t\n\r #/:<>?@[\\\]^|]/,re=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,ae=/[\t\n\r]/g,ce=function(e,t){var n,o,r;if("["==R(t,0)){if("]"!=R(t,t.length-1))return H;if(n=ie(F(t,1,-1)),!n)return H;e.host=n}else if(je(e)){if(t=g(t),B(ne,t))return H;if(n=le(t),null===n)return H;e.host=n}else{if(B(oe,t))return H;for(n="",o=O(t),r=0;r<o.length;r++)n+=me(o[r],de);e.host=n}},le=function(e){var t,n,o,r,a,c,l,i=M(e,".");if(i.length&&""==i[i.length-1]&&i.length--,t=i.length,t>4)return e;for(n=[],o=0;o<t;o++){if(r=i[o],""==r)return e;if(a=10,r.length>1&&"0"==R(r,0)&&(a=B(Y,r)?16:8,r=F(r,8==a?1:2)),""===r)c=0;else{if(!B(10==a?ee:8==a?Q:te,r))return e;c=_(r,a)}L(n,c)}for(o=0;o<t;o++)if(c=n[o],o==t-1){if(c>=x(256,5-t))return null}else if(c>255)return null;for(l=U(n),o=0;o<n.length;o++)l+=n[o]*x(256,3-o);return l},ie=function(e){var t,n,o,r,a,c,l,i=[0,0,0,0,0,0,0,0],u=0,s=null,d=0,b=function(){return R(e,d)};if(":"==b()){if(":"!=R(e,1))return;d+=2,u++,s=u}while(b()){if(8==u)return;if(":"!=b()){t=n=0;while(n<4&&B(te,b()))t=16*t+_(b(),16),d++,n++;if("."==b()){if(0==n)return;if(d-=n,u>6)return;o=0;while(b()){if(r=null,o>0){if(!("."==b()&&o<4))return;d++}if(!B(J,b()))return;while(B(J,b())){if(a=_(b(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;d++}i[u]=256*i[u]+r,o++,2!=o&&4!=o||u++}if(4!=o)return;break}if(":"==b()){if(d++,!b())return}else if(b())return;i[u++]=t}else{if(null!==s)return;d++,u++,s=u}}if(null!==s){c=u-s,u=7;while(0!=u&&c>0)l=i[u],i[u--]=i[s+c-1],i[s+--c]=l}else if(8!=u)return;return i},ue=function(e){for(var t=null,n=1,o=null,r=0,a=0;a<8;a++)0!==e[a]?(r>n&&(t=o,n=r),o=null,r=0):(null===o&&(o=a),++r);return r>n&&(t=o,n=r),t},se=function(e){var t,n,o,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)G(t,e%256),e=I(e/256);return A(t,".")}if("object"==typeof e){for(t="",o=ue(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),o===n?(t+=n?":":"::",r=!0):(t+=C(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},de={},be=m({},de,{" ":1,'"':1,"<":1,">":1,"`":1}),pe=m({},be,{"#":1,"?":1,"{":1,"}":1}),fe=m({},pe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),me=function(e,t){var n=h(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},Oe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},je=function(e){return f(Oe,e.scheme)},he=function(e){return""!=e.username||""!=e.password},ge=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},ye=function(e,t){var n;return 2==e.length&&B(Z,R(e,0))&&(":"==(n=R(e,1))||!t&&"|"==n)},ve=function(e){var t;return e.length>1&&ye(F(e,0,2))&&(2==e.length||"/"===(t=R(e,2))||"\\"===t||"?"===t||"#"===t)},ke=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&ye(t[0],!0)||t.length--},we=function(e){return"."===e||"%2e"===q(e)},Ee=function(e){return e=q(e),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},Ne={},Se={},Ve={},Te={},De={},_e={},Ie={},xe={},Re={},Be={},Ae={},Ce={},Ue={},Le={},$e={},Pe={},Me={},Fe={},qe={},Ge={},We={},ze=function(e,t,n,r){var a,c,l,i,u=n||Ne,s=0,d="",b=!1,p=!1,m=!1;n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=$(t,re,"")),t=$(t,ae,""),a=O(t);while(s<=a.length){switch(c=a[s],u){case Ne:if(!c||!B(Z,c)){if(n)return z;u=Ve;continue}d+=q(c),u=Se;break;case Se:if(c&&(B(X,c)||"+"==c||"-"==c||"."==c))d+=q(c);else{if(":"!=c){if(n)return z;d="",u=Ve,s=0;continue}if(n&&(je(e)!=f(Oe,d)||"file"==d&&(he(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,n)return void(je(e)&&Oe[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?u=Le:je(e)&&r&&r.scheme==e.scheme?u=Te:je(e)?u=xe:"/"==a[s+1]?(u=De,s++):(e.cannotBeABaseURL=!0,L(e.path,""),u=qe)}break;case Ve:if(!r||r.cannotBeABaseURL&&"#"!=c)return z;if(r.cannotBeABaseURL&&"#"==c){e.scheme=r.scheme,e.path=j(r.path),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,u=We;break}u="file"==r.scheme?Le:_e;continue;case Te:if("/"!=c||"/"!=a[s+1]){u=_e;continue}u=Re,s++;break;case De:if("/"==c){u=Be;break}u=Fe;continue;case _e:if(e.scheme=r.scheme,c==o)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=j(r.path),e.query=r.query;else if("/"==c||"\\"==c&&je(e))u=Ie;else if("?"==c)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=j(r.path),e.query="",u=Ge;else{if("#"!=c){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=j(r.path),e.path.length--,u=Fe;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=j(r.path),e.query=r.query,e.fragment="",u=We}break;case Ie:if(!je(e)||"/"!=c&&"\\"!=c){if("/"!=c){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,u=Fe;continue}u=Be}else u=Re;break;case xe:if(u=Re,"/"!=c||"/"!=R(d,s+1))continue;s++;break;case Re:if("/"!=c&&"\\"!=c){u=Be;continue}break;case Be:if("@"==c){b&&(d="%40"+d),b=!0,l=O(d);for(var h=0;h<l.length;h++){var g=l[h];if(":"!=g||m){var y=me(g,fe);m?e.password+=y:e.username+=y}else m=!0}d=""}else if(c==o||"/"==c||"?"==c||"#"==c||"\\"==c&&je(e)){if(b&&""==d)return W;s-=O(d).length+1,d="",u=Ae}else d+=c;break;case Ae:case Ce:if(n&&"file"==e.scheme){u=Pe;continue}if(":"!=c||p){if(c==o||"/"==c||"?"==c||"#"==c||"\\"==c&&je(e)){if(je(e)&&""==d)return H;if(n&&""==d&&(he(e)||null!==e.port))return;if(i=ce(e,d),i)return i;if(d="",u=Me,n)return;continue}"["==c?p=!0:"]"==c&&(p=!1),d+=c}else{if(""==d)return H;if(i=ce(e,d),i)return i;if(d="",u=Ue,n==Ce)return}break;case Ue:if(!B(J,c)){if(c==o||"/"==c||"?"==c||"#"==c||"\\"==c&&je(e)||n){if(""!=d){var v=_(d,10);if(v>65535)return K;e.port=je(e)&&v===Oe[e.scheme]?null:v,d=""}if(n)return;u=Me;continue}return K}d+=c;break;case Le:if(e.scheme="file","/"==c||"\\"==c)u=$e;else{if(!r||"file"!=r.scheme){u=Fe;continue}if(c==o)e.host=r.host,e.path=j(r.path),e.query=r.query;else if("?"==c)e.host=r.host,e.path=j(r.path),e.query="",u=Ge;else{if("#"!=c){ve(A(j(a,s),""))||(e.host=r.host,e.path=j(r.path),ke(e)),u=Fe;continue}e.host=r.host,e.path=j(r.path),e.query=r.query,e.fragment="",u=We}}break;case $e:if("/"==c||"\\"==c){u=Pe;break}r&&"file"==r.scheme&&!ve(A(j(a,s),""))&&(ye(r.path[0],!0)?L(e.path,r.path[0]):e.host=r.host),u=Fe;continue;case Pe:if(c==o||"/"==c||"\\"==c||"?"==c||"#"==c){if(!n&&ye(d))u=Fe;else if(""==d){if(e.host="",n)return;u=Me}else{if(i=ce(e,d),i)return i;if("localhost"==e.host&&(e.host=""),n)return;d="",u=Me}continue}d+=c;break;case Me:if(je(e)){if(u=Fe,"/"!=c&&"\\"!=c)continue}else if(n||"?"!=c)if(n||"#"!=c){if(c!=o&&(u=Fe,"/"!=c))continue}else e.fragment="",u=We;else e.query="",u=Ge;break;case Fe:if(c==o||"/"==c||"\\"==c&&je(e)||!n&&("?"==c||"#"==c)){if(Ee(d)?(ke(e),"/"==c||"\\"==c&&je(e)||L(e.path,"")):we(d)?"/"==c||"\\"==c&&je(e)||L(e.path,""):("file"==e.scheme&&!e.path.length&&ye(d)&&(e.host&&(e.host=""),d=R(d,0)+":"),L(e.path,d)),d="","file"==e.scheme&&(c==o||"?"==c||"#"==c))while(e.path.length>1&&""===e.path[0])P(e.path);"?"==c?(e.query="",u=Ge):"#"==c&&(e.fragment="",u=We)}else d+=me(c,pe);break;case qe:"?"==c?(e.query="",u=Ge):"#"==c?(e.fragment="",u=We):c!=o&&(e.path[0]+=me(c,de));break;case Ge:n||"#"!=c?c!=o&&("'"==c&&je(e)?e.query+="%27":e.query+="#"==c?"%23":me(c,de)):(e.fragment="",u=We);break;case We:c!=o&&(e.fragment+=me(c,be));break}s++}},He=function(e){var t,n,o=p(this,Ke),r=arguments.length>1?arguments[1]:void 0,c=y(e),l=E(o,{type:"URL"});if(void 0!==r)try{t=N(r)}catch(d){if(n=ze(t={},y(r)),n)throw D(n)}if(n=ze(l,c,null,t),n)throw D(n);var i=l.searchParams=new S,s=V(i);s.updateSearchParams(l.query),s.updateURL=function(){l.query=y(i)||null},a||(o.href=u(Ze,o),o.origin=u(Xe,o),o.protocol=u(Je,o),o.username=u(Ye,o),o.password=u(Qe,o),o.host=u(et,o),o.hostname=u(tt,o),o.port=u(nt,o),o.pathname=u(ot,o),o.search=u(rt,o),o.searchParams=u(at,o),o.hash=u(ct,o))},Ke=He.prototype,Ze=function(){var e=N(this),t=e.scheme,n=e.username,o=e.password,r=e.host,a=e.port,c=e.path,l=e.query,i=e.fragment,u=t+":";return null!==r?(u+="//",he(e)&&(u+=n+(o?":"+o:"")+"@"),u+=se(r),null!==a&&(u+=":"+a)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?c[0]:c.length?"/"+A(c,"/"):"",null!==l&&(u+="?"+l),null!==i&&(u+="#"+i),u},Xe=function(){var e=N(this),t=e.scheme,n=e.port;if("blob"==t)try{return new He(t.path[0]).origin}catch(o){return"null"}return"file"!=t&&je(e)?t+"://"+se(e.host)+(null!==n?":"+n:""):"null"},Je=function(){return N(this).scheme+":"},Ye=function(){return N(this).username},Qe=function(){return N(this).password},et=function(){var e=N(this),t=e.host,n=e.port;return null===t?"":null===n?se(t):se(t)+":"+n},tt=function(){var e=N(this).host;return null===e?"":se(e)},nt=function(){var e=N(this).port;return null===e?"":y(e)},ot=function(){var e=N(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+A(t,"/"):""},rt=function(){var e=N(this).query;return e?"?"+e:""},at=function(){return N(this).searchParams},ct=function(){var e=N(this).fragment;return e?"#"+e:""},lt=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&d(Ke,{href:lt(Ze,(function(e){var t=N(this),n=y(e),o=ze(t,n);if(o)throw D(o);V(t.searchParams).updateSearchParams(t.query)})),origin:lt(Xe),protocol:lt(Je,(function(e){var t=N(this);ze(t,y(e)+":",Ne)})),username:lt(Ye,(function(e){var t=N(this),n=O(y(e));if(!ge(t)){t.username="";for(var o=0;o<n.length;o++)t.username+=me(n[o],fe)}})),password:lt(Qe,(function(e){var t=N(this),n=O(y(e));if(!ge(t)){t.password="";for(var o=0;o<n.length;o++)t.password+=me(n[o],fe)}})),host:lt(et,(function(e){var t=N(this);t.cannotBeABaseURL||ze(t,y(e),Ae)})),hostname:lt(tt,(function(e){var t=N(this);t.cannotBeABaseURL||ze(t,y(e),Ce)})),port:lt(nt,(function(e){var t=N(this);ge(t)||(e=y(e),""==e?t.port=null:ze(t,e,Ue))})),pathname:lt(ot,(function(e){var t=N(this);t.cannotBeABaseURL||(t.path=[],ze(t,y(e),Me))})),search:lt(rt,(function(e){var t=N(this);e=y(e),""==e?t.query=null:("?"==R(e,0)&&(e=F(e,1)),t.query="",ze(t,e,Ge)),V(t.searchParams).updateSearchParams(t.query)})),searchParams:lt(at),hash:lt(ct,(function(e){var t=N(this);e=y(e),""!=e?("#"==R(e,0)&&(e=F(e,1)),t.fragment="",ze(t,e,We)):t.fragment=null}))}),b(Ke,"toJSON",(function(){return u(Ze,this)}),{enumerable:!0}),b(Ke,"toString",(function(){return u(Ze,this)}),{enumerable:!0}),T){var it=T.createObjectURL,ut=T.revokeObjectURL;it&&b(He,"createObjectURL",i(it,T)),ut&&b(He,"revokeObjectURL",i(ut,T))}v(He,"URL"),r({global:!0,forced:!c,sham:!a},{URL:He})},"304a":function(e,t,n){"use strict";n.r(t);var o=n("1da1"),r=(n("96cf"),n("7a23")),a=n("6c02"),c=n("f7f9"),l=(n("7db0"),n("d3b7"),n("99af"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("9c4a")),i=function(e){return Object(r["pushScopeId"])("data-v-4d9f9a8a"),e=e(),Object(r["popScopeId"])(),e},u={id:"workout-card-title"},s=["title"],d=i((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)})),b=[d],p={class:"workout-card-title"},f={class:"workout-title-date"},m={key:0,class:"workout-title"},O={key:1,class:"workout-title"},j={class:"workout-segment"},h=Object(r["createTextVNode"])(" — "),g=i((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)})),y={class:"workout-date"},v={class:"workout-link"},k=["title"],w=i((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)})),E=[w],N=Object(r["defineComponent"])({props:{sport:null,workoutObject:null},emits:["displayModal"],setup:function(e,t){var n=t.emit,a=e,c=Object(r["toRefs"])(a),i=c.sport,d=c.workoutObject;function w(e){return N.apply(this,arguments)}function N(){return N=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,l["a"].get("workouts/".concat(t,"/gpx/download"),{responseType:"blob"}).then((function(e){var n=window.URL.createObjectURL(new Blob([e.data],{type:"application/gpx+xml"})),o=document.createElement("a");o.href=n,o.setAttribute("download","".concat(t,".gpx")),document.body.appendChild(o),o.click()}));case 2:case"end":return e.stop()}}),e)}))),N.apply(this,arguments)}return function(e,t){var o=Object(r["resolveComponent"])("SportImage"),a=Object(r["resolveComponent"])("router-link");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",u,[Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["workout-previous workout-arrow",{inactive:!Object(r["unref"])(d).previousUrl}]),title:Object(r["unref"])(d).previousUrl?e.$t("workouts.PREVIOUS_".concat(Object(r["unref"])(d).type)):e.$t("workouts.NO_PREVIOUS_".concat(Object(r["unref"])(d).type)),onClick:t[0]||(t[0]=function(t){return Object(r["unref"])(d).previousUrl?e.$router.push(Object(r["unref"])(d).previousUrl):null})},b,10,s),Object(r["createElementVNode"])("div",p,[Object(r["createVNode"])(o,{"sport-label":Object(r["unref"])(i).label,color:Object(r["unref"])(i).color},null,8,["sport-label","color"]),Object(r["createElementVNode"])("div",f,["WORKOUT"===Object(r["unref"])(d).type?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",m,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(Object(r["unref"])(d).title),1),Object(r["createElementVNode"])("i",{class:"fa fa-edit","aria-hidden":"true",onClick:t[1]||(t[1]=function(t){return e.$router.push({name:"EditWorkout",params:{workoutId:Object(r["unref"])(d).workoutId}})})}),Object(r["unref"])(d).with_gpx?(Object(r["openBlock"])(),Object(r["createElementBlock"])("i",{key:0,class:"fa fa-download","aria-hidden":"true",onClick:t[2]||(t[2]=Object(r["withModifiers"])((function(e){return w(Object(r["unref"])(d).workoutId)}),["prevent"]))})):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("i",{class:"fa fa-trash","aria-hidden":"true",onClick:t[3]||(t[3]=function(e){return n("displayModal",!0)})})])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",O,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(d).title)+" ",1),Object(r["createElementVNode"])("span",j,[h,g,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.SEGMENT"))+" "+Object(r["toDisplayString"])(Object(r["unref"])(d).segmentId+1),1)])])),Object(r["createElementVNode"])("div",y,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(d).workoutDate)+" - "+Object(r["toDisplayString"])(Object(r["unref"])(d).workoutTime)+" ",1),Object(r["createElementVNode"])("span",v,["SEGMENT"===Object(r["unref"])(d).type?(Object(r["openBlock"])(),Object(r["createBlock"])(a,{key:0,to:{name:"Workout",params:{workoutId:Object(r["unref"])(d).workoutId}}},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(" > "+Object(r["toDisplayString"])(e.$t("workouts.BACK_TO_WORKOUT")),1)]})),_:1},8,["to"])):Object(r["createCommentVNode"])("",!0)])])])]),Object(r["createElementVNode"])("div",{class:Object(r["normalizeClass"])(["workout-next workout-arrow",{inactive:!Object(r["unref"])(d).nextUrl}]),title:Object(r["unref"])(d).nextUrl?e.$t("workouts.NEXT_".concat(Object(r["unref"])(d).type)):e.$t("workouts.NO_NEXT_".concat(Object(r["unref"])(d).type)),onClick:t[4]||(t[4]=function(t){return Object(r["unref"])(d).nextUrl?e.$router.push(Object(r["unref"])(d).nextUrl):null})},E,10,k)])}}}),S=(n("c12b"),n("6b0d")),V=n.n(S);const T=V()(N,[["__scopeId","data-v-4d9f9a8a"]]);var D=T,_=function(e){return Object(r["pushScopeId"])("data-v-1a5282f6"),e=e(),Object(r["popScopeId"])(),e},I={key:0,class:"workout-record"},x=_((function(){return Object(r["createElementVNode"])("sup",null,[Object(r["createElementVNode"])("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)})),R=[x],B=Object(r["defineComponent"])({props:{recordType:null,workoutObject:null},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.recordType,a=n.workoutObject;return function(e,t){return Object(r["unref"])(a).records&&Object(r["unref"])(a).records.find((function(e){return e.record_type===Object(r["unref"])(o)}))?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",I,R)):Object(r["createCommentVNode"])("",!0)}}});n("b86c");const A=V()(B,[["__scopeId","data-v-1a5282f6"]]);var C=A,U=(n("b680"),n("a9e3"),function(e){return Object(r["pushScopeId"])("data-v-59cb2880"),e=e(),Object(r["popScopeId"])(),e}),L={key:0,id:"workout-weather"},$={class:"weather-table"},P=U((function(){return Object(r["createElementVNode"])("th",null,null,-1)})),M={class:"weather-th"},F=["src","alt","title"],q={class:"weather-th"},G=["src","alt","title"],W=["alt","title"],z=["alt","title"],H=["alt","title"],K=Object(r["defineComponent"])({props:{workoutObject:null,useImperialUnits:{type:Boolean}},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.useImperialUnits,a=n.workoutObject;return function(e,t){var n=Object(r["resolveComponent"])("Distance");return Object(r["unref"])(a).weatherStart&&Object(r["unref"])(a).weatherEnd?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",L,[Object(r["createElementVNode"])("table",$,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[P,Object(r["createElementVNode"])("th",null,[Object(r["createElementVNode"])("div",M,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.START"))+" ",1),Object(r["createElementVNode"])("img",{class:"weather-img",src:"/img/weather/".concat(Object(r["unref"])(a).weatherStart.icon,".svg"),alt:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(a).weatherStart.icon)),title:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(a).weatherStart.icon))},null,8,F)])]),Object(r["createElementVNode"])("th",null,[Object(r["createElementVNode"])("div",q,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.END"))+" ",1),Object(r["createElementVNode"])("img",{class:"weather-img",src:"/img/weather/".concat(Object(r["unref"])(a).weatherEnd.icon,".svg"),alt:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(a).weatherEnd.icon)),title:e.$t("workouts.WEATHER.DARK_SKY.".concat(Object(r["unref"])(a).weatherEnd.icon))},null,8,G)])])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("img",{class:"weather-img weather-img-small",src:"/img/weather/temperature.svg",alt:e.$t("workouts.WEATHER.TEMPERATURE"),title:e.$t("workouts.WEATHER.TEMPERATURE")},null,8,W)]),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(Object(r["unref"])(a).weatherStart.temperature).toFixed(1))+"°C ",1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(Object(r["unref"])(a).weatherEnd.temperature).toFixed(1))+"°C ",1)]),Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("img",{class:"weather-img weather-img-small",src:"/img/weather/pour-rain.svg",alt:e.$t("workouts.WEATHER.HUMIDITY"),title:e.$t("workouts.WEATHER.HUMIDITY")},null,8,z)]),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(100*Object(r["unref"])(a).weatherStart.humidity).toFixed(1))+"% ",1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(Number(100*Object(r["unref"])(a).weatherEnd.humidity).toFixed(1))+"% ",1)]),Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("img",{class:"weather-img weather-img-small",src:"/img/weather/breeze.svg",alt:e.$t("workouts.WEATHER.WIND"),title:e.$t("workouts.WEATHER.WIND")},null,8,H)]),Object(r["createElementVNode"])("td",null,[Object(r["createVNode"])(n,{distance:Object(r["unref"])(a).weatherStart.wind,unitFrom:"m",digits:1,displayUnit:!1,useImperialUnits:Object(r["unref"])(o)},null,8,["distance","useImperialUnits"]),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(Object(r["unref"])(o)?"ft":"m")+"/s ",1)]),Object(r["createElementVNode"])("td",null,[Object(r["createVNode"])(n,{distance:Object(r["unref"])(a).weatherEnd.wind,unitFrom:"m",digits:1,displayUnit:!1,useImperialUnits:Object(r["unref"])(o)},null,8,["distance","useImperialUnits"]),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(Object(r["unref"])(o)?"ft":"m")+"/s ",1)])])])])])):Object(r["createCommentVNode"])("",!0)}}});n("a497");const Z=V()(K,[["__scopeId","data-v-59cb2880"]]);var X=Z,J=function(e){return Object(r["pushScopeId"])("data-v-dc2fbc66"),e=e(),Object(r["popScopeId"])(),e},Y={id:"workout-info"},Q={class:"workout-data"},ee=J((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)})),te={class:"label"},ne=Object(r["createTextVNode"])(": "),oe={class:"value"},re={key:0},ae={class:"value"},ce={class:"value"},le={class:"workout-data"},ie=J((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)})),ue={class:"label"},se=Object(r["createTextVNode"])(": "),de={class:"workout-data"},be=J((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)})),pe={class:"label"},fe=Object(r["createTextVNode"])(": "),me=J((function(){return Object(r["createElementVNode"])("br",null,null,-1)})),Oe={class:"label"},je=Object(r["createTextVNode"])(": "),he={key:0,class:"workout-data"},ge=["alt"],ye={class:"label"},ve=Object(r["createTextVNode"])(": "),ke=J((function(){return Object(r["createElementVNode"])("br",null,null,-1)})),we={class:"label"},Ee=Object(r["createTextVNode"])(": "),Ne={key:1,class:"workout-data"},Se=J((function(){return Object(r["createElementVNode"])("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)})),Ve={class:"label"},Te=Object(r["createTextVNode"])(": "),De=J((function(){return Object(r["createElementVNode"])("br",null,null,-1)})),_e={class:"label"},Ie=Object(r["createTextVNode"])(": "),xe=Object(r["defineComponent"])({props:{workoutObject:null,useImperialUnits:{type:Boolean}},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.workoutObject,a=n.useImperialUnits,c=Object(r["computed"])((function(){return"0:00:00"!==t.workoutObject.pauses&&null!==t.workoutObject.pauses}));return function(e,t){var n=Object(r["resolveComponent"])("Distance");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Y,[Object(r["createElementVNode"])("div",Q,[ee,Object(r["createElementVNode"])("span",te,Object(r["toDisplayString"])(e.$t("workouts.DURATION")),1),ne,Object(r["createElementVNode"])("span",oe,Object(r["toDisplayString"])(Object(r["unref"])(o).moving),1),Object(r["createVNode"])(C,{workoutObject:Object(r["unref"])(o),recordType:"LD"},null,8,["workoutObject"]),Object(r["unref"])(c)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",re,[Object(r["createTextVNode"])(" ("+Object(r["toDisplayString"])(e.$t("workouts.PAUSES"))+": ",1),Object(r["createElementVNode"])("span",ae,Object(r["toDisplayString"])(Object(r["unref"])(o).pauses),1),Object(r["createTextVNode"])(" - "+Object(r["toDisplayString"])(e.$t("workouts.TOTAL_DURATION"))+": ",1),Object(r["createElementVNode"])("span",ce,Object(r["toDisplayString"])(Object(r["unref"])(o).duration)+")",1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",le,[ie,Object(r["createElementVNode"])("span",ue,Object(r["toDisplayString"])(e.$t("workouts.DISTANCE")),1),se,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"]),Object(r["createVNode"])(C,{workoutObject:Object(r["unref"])(o),recordType:"FD"},null,8,["workoutObject"])]),Object(r["createElementVNode"])("div",de,[be,Object(r["createElementVNode"])("span",pe,Object(r["toDisplayString"])(e.$t("workouts.AVERAGE_SPEED")),1),fe,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"]),Object(r["createVNode"])(C,{workoutObject:Object(r["unref"])(o),recordType:"AS"},null,8,["workoutObject"]),me,Object(r["createElementVNode"])("span",Oe,Object(r["toDisplayString"])(e.$t("workouts.MAX_SPEED")),1),je,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"]),Object(r["createVNode"])(C,{workoutObject:Object(r["unref"])(o),recordType:"MS"},null,8,["workoutObject"])]),null!==Object(r["unref"])(o).maxAlt&&null!==Object(r["unref"])(o).minAlt?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",he,[Object(r["createElementVNode"])("img",{class:"mountains",src:"/img/workouts/mountains.svg",alt:e.$t("workouts.ELEVATION")},null,8,ge),Object(r["createElementVNode"])("span",ye,Object(r["toDisplayString"])(e.$t("workouts.MIN_ALTITUDE")),1),ve,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).minAlt,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"]),ke,Object(r["createElementVNode"])("span",we,Object(r["toDisplayString"])(e.$t("workouts.MAX_ALTITUDE")),1),Ee,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"])])):Object(r["createCommentVNode"])("",!0),null!==Object(r["unref"])(o).ascent&&null!==Object(r["unref"])(o).descent?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ne,[Se,Object(r["createElementVNode"])("span",Ve,Object(r["toDisplayString"])(e.$t("workouts.ASCENT")),1),Te,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).ascent,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"]),De,Object(r["createElementVNode"])("span",_e,Object(r["toDisplayString"])(e.$t("workouts.DESCENT")),1),Ie,Object(r["createVNode"])(n,{distance:Object(r["unref"])(o).descent,unitFrom:"m",strong:!0,useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"])])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(X,{workoutObject:Object(r["unref"])(o),useImperialUnits:Object(r["unref"])(a)},null,8,["workoutObject","useImperialUnits"])])}}});n("5f44");const Re=V()(xe,[["__scopeId","data-v-dc2fbc66"]]);var Be=Re,Ae=n("e94f"),Ce=n("5afd"),Ue=n("dad5"),Le=n("2906"),$e=n("d257"),Pe={id:"workout-map"},Me={key:0,class:"leaflet-container"},Fe={key:1},qe={key:0,class:"leaflet-container"},Ge={key:1,class:"no-map"},We=Object(r["defineComponent"])({props:{workoutData:null,markerCoordinates:{default:function(){return{}}}},setup:function(e){var t=e,n=Object(Le["a"])(),o=Object(r["toRefs"])(t),a=o.workoutData,c=o.markerCoordinates,l=Object(r["ref"])(null),i=Object(r["computed"])((function(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]})),u=Object(r["computed"])((function(){return n.getters[Ue["b"].GETTERS.APP_CONFIG]})),s=Object(r["computed"])((function(){return p(i)})),d=Object(r["computed"])((function(){return t.workoutData&&t.workoutData.gpx?b(t.workoutData.gpx):{}}));function b(e){if(!e||""!==e)try{var t=Object(Ae["gpx"])((new DOMParser).parseFromString(e,"text/xml"));return{jsonData:t}}catch(n){return console.error("Invalid gpx content"),{}}return{}}function p(e){return[(e.value[0][0]+e.value[1][0])/2,(e.value[0][1]+e.value[1][1])/2]}function f(e){var t,n;null!==(t=l.value)&&void 0!==t&&t.leafletObject&&(null===(n=l.value)||void 0===n||n.leafletObject.fitBounds(e))}return function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Pe,[Object(r["unref"])(a).loading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Me)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Fe,[Object(r["unref"])(a).workout.with_gpx?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",qe,[Object(r["unref"])(d).jsonData&&Object(r["unref"])(s)&&2===Object(r["unref"])(i).length?(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["unref"])(Ce["b"]),{key:0,zoom:13,center:Object(r["unref"])(s),bounds:Object(r["unref"])(i),ref:function(e,t){t["workoutMap"]=e,l.value=e},onReady:t[0]||(t[0]=function(e){return f(Object(r["unref"])(i))})},{default:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(Object(r["unref"])(Ce["d"]),{url:"".concat(Object(r["unref"])($e["a"])(),"workouts/map_tile/{s}/{z}/{x}/{y}.png"),attribution:Object(r["unref"])(u).map_attribution,bounds:Object(r["unref"])(i)},null,8,["url","attribution","bounds"]),Object(r["createVNode"])(Object(r["unref"])(Ce["a"]),{geojson:Object(r["unref"])(d).jsonData},null,8,["geojson"]),Object(r["unref"])(c).latitude?(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["unref"])(Ce["c"]),{key:0,"lat-lng":[Object(r["unref"])(c).latitude,Object(r["unref"])(c).longitude]},null,8,["lat-lng"])):Object(r["createCommentVNode"])("",!0)]})),_:1},8,["center","bounds"])):Object(r["createCommentVNode"])("",!0)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ge,Object(r["toDisplayString"])(e.$t("workouts.NO_MAP")),1))]))])}}});n("58a2");const ze=V()(We,[["__scopeId","data-v-3ee4aadc"]]);var He=ze,Ke=n("5e65"),Ze={class:"workout-detail"},Xe=Object(r["defineComponent"])({props:{authUser:null,displaySegment:{type:Boolean},sports:null,workoutData:null,markerCoordinates:{default:function(){return{}}}},setup:function(e){var t=e,n=Object(a["c"])(),c=Object(Le["a"])(),l=Object(r["toRefs"])(t),i=l.authUser,u=l.markerCoordinates,s=l.workoutData,d=Object(r["computed"])((function(){return t.workoutData.workout})),b=Object(r["ref"])(n.params.workoutId?+n.params.segmentId:null),p=Object(r["computed"])((function(){return d.value.segments.length>0&&b.value?d.value.segments[+b.value-1]:null})),f=Object(r["ref"])(!1),m=Object(r["computed"])((function(){return t.sports?t.sports.find((function(e){return e.id===t.workoutData.workout.sport_id})):{}})),O=Object(r["computed"])((function(){return h(d.value,p.value)}));function j(e,t,n){var o=t&&n&&1!==n?"/workouts/".concat(e.id,"/segment/").concat(n-1):!t&&e.previous_workout?"/workouts/".concat(e.previous_workout):null,r=t&&n&&n<e.segments.length?"/workouts/".concat(e.id,"/segment/").concat(n+1):!t&&e.next_workout?"/workouts/".concat(e.next_workout):null;return{previousUrl:o,nextUrl:r}}function h(e,n){var o=j(e,t.displaySegment,b.value?+b.value:null),r=Object(Ke["a"])(Object(Ke["c"])(t.workoutData.workout.workout_date,t.authUser.timezone));return{ascent:n?n.ascent:e.ascent,aveSpeed:n?n.ave_speed:e.ave_speed,distance:n?n.distance:e.distance,descent:n?n.descent:e.descent,duration:n?n.duration:e.duration,maxAlt:n?n.max_alt:e.max_alt,maxSpeed:n?n.max_speed:e.max_speed,minAlt:n?n.min_alt:e.min_alt,moving:n?n.moving:e.moving,nextUrl:o.nextUrl,pauses:n?n.pauses:e.pauses,previousUrl:o.previousUrl,records:n?[]:e.records,segmentId:n?n.segment_id:null,title:e.title,type:t.displaySegment?"SEGMENT":"WORKOUT",workoutDate:r.workout_date,weatherEnd:n?null:e.weather_end,weatherStart:n?null:e.weather_start,with_gpx:e.with_gpx,workoutId:e.id,workoutTime:r.workout_time}}function g(e){f.value=e}function y(e){c.dispatch(Ue["f"].ACTIONS.DELETE_WORKOUT,{workoutId:e})}return Object(r["watch"])((function(){return n.params.segmentId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t&&(b.value=+t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){var n=Object(r["resolveComponent"])("Modal"),o=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ze,[Object(r["unref"])(f)?(Object(r["openBlock"])(),Object(r["createBlock"])(n,{key:0,title:e.$t("common.CONFIRMATION"),message:e.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:t[0]||(t[0]=function(e){return y(Object(r["unref"])(O).workoutId)}),onCancelAction:t[1]||(t[1]=function(e){return g(!1)})},null,8,["title","message"])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(o,null,{title:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(D,{sport:Object(r["unref"])(m),workoutObject:Object(r["unref"])(O),onDisplayModal:t[2]||(t[2]=function(e){return g(!0)})},null,8,["sport","workoutObject"])]})),content:Object(r["withCtx"])((function(){return[Object(r["createVNode"])(He,{workoutData:Object(r["unref"])(s),markerCoordinates:Object(r["unref"])(u)},null,8,["workoutData","markerCoordinates"]),Object(r["createVNode"])(Be,{workoutObject:Object(r["unref"])(O),useImperialUnits:Object(r["unref"])(i).imperial_units},null,8,["workoutObject","useImperialUnits"])]})),_:1})])}}});n("95c4");const Je=V()(Xe,[["__scopeId","data-v-7aa3a3b2"]]);var Ye=Je,Qe=n("ade3"),et=(n("e9c4"),n("ac1f"),n("5319"),n("b48c")),tt=n("47e2"),nt=(n("159b"),function(e){var t=document.getElementById(e);if(t){var n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")}),ot={id:"htmlLegend",afterUpdate:function(e,t,n){var o,r,a,c,l,i,u=nt(n.containerID);while(u.firstChild)u.firstChild.remove();var s=null!==(o=e.options.plugins)&&void 0!==o&&null!==(r=o.legend)&&void 0!==r&&null!==(a=r.labels)&&void 0!==a&&a.generateLabels?null===(c=e.options.plugins)||void 0===c||null===(l=c.legend)||void 0===l||null===(i=l.labels)||void 0===i?void 0:i.generateLabels(e):[];s.forEach((function(t){var n=document.createElement("li");n.onclick=function(){e.setDatasetVisibility(t.datasetIndex,!e.isDatasetVisible(t.datasetIndex)),e.update()};var o=document.createElement("input");o&&(o.type="checkbox",o.id=t.text,o.checked=!t.hidden);var r=document.createTextNode(t.text),a=document.createElement("span");a&&(a.style.background=String(t.fillStyle),a.style.borderColor=String(t.strokeStyle)),n.appendChild(o),n.appendChild(r),n.appendChild(a),u.appendChild(n)}))}},rt=n("6284"),at=n("9230"),ct=function(e){return Object(r["pushScopeId"])("data-v-7b25bb74"),e=e(),Object(r["popScopeId"])(),e},lt={id:"workout-chart"},it={class:"chart-radio"},ut=["checked"],st=["checked"],dt=ct((function(){return Object(r["createElementVNode"])("div",{id:"chart-legend"},null,-1)})),bt={class:"chart-info"},pt={class:"no-data-cleaning"},ft={class:"elevation-start"},mt=["checked"],Ot=Object(r["defineComponent"])({props:{authUser:null,workoutData:null},emits:["getCoordinates"],setup:function(e,t){var n=t.emit,o=e,a=Object(tt["b"])(),c=a.t,l=Object(r["ref"])(!0),i=Object(r["ref"])(!0),u=Object(r["computed"])((function(){return Object(at["b"])(o.workoutData.chartData,c,o.authUser.imperial_units)})),s=v("km"),d=v("m"),b=Object(r["computed"])((function(){return{labels:l.value?u.value.distance_labels:u.value.duration_labels,datasets:JSON.parse(JSON.stringify([u.value.datasets.speed,u.value.datasets.elevation]))}})),p=Object(r["computed"])((function(){return u.value.coordinates})),f=Object(r["computed"])((function(){var e;return{responsive:!0,maintainAspectRatio:!0,animation:!1,layout:{padding:{top:22}},scales:(e={},Object(Qe["a"])(e,l.value?"xDistance":"xDuration",{grid:{drawOnChartArea:!1},ticks:{count:10,callback:function(e){return l.value?Number(e).toFixed(2):h(e)}},type:"linear",bounds:"data",title:{display:!0,text:l.value?c("workouts.DISTANCE")+" (".concat(s,")"):c("workouts.DURATION")}}),Object(Qe["a"])(e,"ySpeed",{grid:{drawOnChartArea:!1},position:"left",title:{display:!0,text:c("workouts.SPEED")+" (".concat(s,"/h)")}}),Object(Qe["a"])(e,"yElevation",{beginAtZero:i.value,grid:{drawOnChartArea:!1},position:"right",title:{display:!0,text:c("workouts.ELEVATION")+" (".concat(d,")")}}),e),elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(e){var t=" ".concat(e.dataset.label,": ").concat(e.formattedValue);return"yElevation"===e.dataset.yAxisID?t+" ".concat(d):t+" ".concat(s,"/h")},title:function(e){return e.length>0&&g(p.value[e[0].dataIndex]),0===e.length?"":l.value?"".concat(c("workouts.DISTANCE"),": ").concat(e[0].label," ").concat(s):"".concat(c("workouts.DURATION"),": ").concat(h(e[0].label.replace(",","")))}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend"}}}})),m=Object(et["useLineChart"])({chartData:b,options:f,plugins:[ot]}),O=m.lineChartProps;function j(){l.value=!l.value}function h(e){return new Date(1e3*+e).toISOString().substr(11,8)}function g(e){n("getCoordinates",e)}function y(){g({latitude:null,longitude:null})}function v(e){return o.authUser.imperial_units?rt["c"][e].defaultTarget:e}return function(e,t){var n=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",lt,[Object(r["createVNode"])(n,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.ANALYSIS")),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",it,[Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{type:"radio",name:"distance",checked:Object(r["unref"])(l),onClick:j},null,8,ut),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DISTANCE")),1)]),Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{type:"radio",name:"duration",checked:!Object(r["unref"])(l),onClick:j},null,8,st),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.DURATION")),1)])]),dt,Object(r["createVNode"])(Object(r["unref"])(et["LineChart"]),Object(r["mergeProps"])(Object(r["unref"])(O),{class:"line-chart",onMouseleave:y}),null,16),Object(r["createElementVNode"])("div",bt,[Object(r["createElementVNode"])("div",pt,Object(r["toDisplayString"])(e.$t("workouts.NO_DATA_CLEANING")),1),Object(r["createElementVNode"])("div",ft,[Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{type:"checkbox",checked:Object(r["unref"])(i),onClick:t[0]||(t[0]=function(e){return Object(r["isRef"])(i)?i.value=!Object(r["unref"])(i):i=!Object(r["unref"])(i)})},null,8,mt),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])])]})),_:1})])}}});n("73b0");const jt=V()(Ot,[["__scopeId","data-v-7b25bb74"]]);var ht=jt,gt={id:"workout-note"},yt=Object(r["defineComponent"])({props:{notes:{default:function(){return null}}},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.notes;return function(e,t){var n=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gt,[Object(r["createVNode"])(n,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.NOTES")),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(Object(r["unref"])(o)&&""!==Object(r["unref"])(o)?Object(r["unref"])(o):e.$t("workouts.NO_NOTES")),1)]})),_:1})])}}});n("c4b5");const vt=V()(yt,[["__scopeId","data-v-028ad527"]]);var kt=vt,wt={id:"workout-segments"},Et=Object(r["defineComponent"])({props:{segments:null,useImperialUnits:{type:Boolean}},setup:function(e){var t=e,n=Object(r["toRefs"])(t),o=n.segments,a=n.useImperialUnits;return function(e,t){var n=Object(r["resolveComponent"])("router-link"),c=Object(r["resolveComponent"])("Distance"),l=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",wt,[Object(r["createVNode"])(l,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.SEGMENT",2)),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("ul",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(Object(r["unref"])(o),(function(t,o){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:t.segment_id},[Object(r["createVNode"])(n,{to:{name:"WorkoutSegment",params:{workoutId:t.workout_id,segmentId:o+1}}},{default:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.SEGMENT",1))+" "+Object(r["toDisplayString"])(o+1),1)]})),_:2},1032,["to"]),Object(r["createTextVNode"])(" ("+Object(r["toDisplayString"])(e.$t("workouts.DISTANCE"))+": ",1),Object(r["createVNode"])(c,{distance:t.distance,unitFrom:"km",useImperialUnits:Object(r["unref"])(a)},null,8,["distance","useImperialUnits"]),Object(r["createTextVNode"])(", "+Object(r["toDisplayString"])(e.$t("workouts.DURATION"))+": "+Object(r["toDisplayString"])(t.duration)+") ",1)])})),128))])]})),_:1})])}}});n("dbf6");const Nt=V()(Et,[["__scopeId","data-v-6b8a27cd"]]);var St=Nt,Vt=function(e){return Object(r["pushScopeId"])("data-v-d146d84a"),e=e(),Object(r["popScopeId"])(),e},Tt={id:"workout",class:"view"},Dt={class:"container"},_t={key:0,class:"workout-container"},It={key:0},xt=Vt((function(){return Object(r["createElementVNode"])("div",{id:"bottom"},null,-1)})),Rt={key:1},Bt=Object(r["defineComponent"])({props:{displaySegment:{type:Boolean}},setup:function(e){var t=e,n=Object(a["c"])(),l=Object(Le["a"])(),i=Object(r["toRefs"])(t),u=i.displaySegment,s=Object(r["computed"])((function(){return l.getters[Ue["f"].GETTERS.WORKOUT_DATA]})),d=Object(r["computed"])((function(){return l.getters[Ue["a"].GETTERS.AUTH_USER_PROFILE]})),b=Object(r["computed"])((function(){return l.getters[Ue["c"].GETTERS.SPORTS]})),p=Object(r["ref"])({latitude:null,longitude:null});function f(e){p.value={latitude:e.latitude,longitude:e.longitude}}return Object(r["onBeforeMount"])((function(){var e={workoutId:n.params.workoutId};t.displaySegment&&(e.segmentId=n.params.segmentId),l.dispatch(Ue["f"].ACTIONS.GET_WORKOUT_DATA,e)})),Object(r["onUnmounted"])((function(){l.commit(Ue["f"].MUTATIONS.EMPTY_WORKOUT)})),Object(r["watch"])((function(){return n.params.workoutId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t&&l.dispatch(Ue["f"].ACTIONS.GET_WORKOUT_DATA,{workoutId:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Object(r["watch"])((function(){return n.params.segmentId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:n.params.workoutId&&(o={workoutId:n.params.workoutId},t&&(o.segmentId=t),l.dispatch(Ue["f"].ACTIONS.GET_WORKOUT_DATA,o));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Tt,[Object(r["createElementVNode"])("div",Dt,[Object(r["unref"])(b).length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",_t,[Object(r["unref"])(s).workout.id?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",It,[Object(r["createVNode"])(Ye,{workoutData:Object(r["unref"])(s),sports:Object(r["unref"])(b),authUser:Object(r["unref"])(d),markerCoordinates:Object(r["unref"])(p),displaySegment:Object(r["unref"])(u)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),Object(r["unref"])(s).workout.with_gpx&&Object(r["unref"])(s).chartData.length>0?(Object(r["openBlock"])(),Object(r["createBlock"])(ht,{key:0,workoutData:Object(r["unref"])(s),authUser:Object(r["unref"])(d),displaySegment:Object(r["unref"])(u),onGetCoordinates:f},null,8,["workoutData","authUser","displaySegment"])):Object(r["createCommentVNode"])("",!0),!Object(r["unref"])(u)&&Object(r["unref"])(s).workout.segments.length>1?(Object(r["openBlock"])(),Object(r["createBlock"])(St,{key:1,segments:Object(r["unref"])(s).workout.segments,useImperialUnits:Object(r["unref"])(d).imperial_units},null,8,["segments","useImperialUnits"])):Object(r["createCommentVNode"])("",!0),Object(r["unref"])(u)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(kt,{key:2,notes:Object(r["unref"])(s).workout.notes},null,8,["notes"])),xt])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Rt,[Object(r["unref"])(s).loading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createBlock"])(c["a"],{key:0,target:"WORKOUT"}))]))])):Object(r["createCommentVNode"])("",!0)])])}}});n("2146");const At=V()(Bt,[["__scopeId","data-v-d146d84a"]]);t["default"]=At},"30e0":function(e,t,n){},3450:function(e,t,n){},"4c68":function(e,t,n){},5022:function(e,t,n){"use strict";n("83e8")},"57cc":function(e,t,n){},"58a2":function(e,t,n){"use strict";n("1c8d")},"5afd":function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return T})),n.d(t,"b",(function(){return x})),n.d(t,"c",(function(){return A})),n.d(t,"d",(function(){return M}));var o=n("7a23");const r=(e,t)=>{let n;return function(...o){const r=this;n&&clearTimeout(n),n=setTimeout(()=>{e.apply(r,o),n=null},t)}},a=e=>e&&"function"===typeof e.charAt?e.charAt(0).toUpperCase()+e.slice(1):e,c=(e,t,n)=>{for(const r in n){const c="set"+a(r);e[c]?Object(o["watch"])(()=>n[r],(t,n)=>{e[c](t,n)}):t[c]&&Object(o["watch"])(()=>n[r],e=>{t[c](e)})}},l=e=>{const t={};for(const n in e)if(n.startsWith("on")&&!n.startsWith("onUpdate")&&"onReady"!==n){const o=n.slice(2).toLocaleLowerCase();t[o]=e[n]}return t},i=async e=>{const t=await Promise.all([n.e("chunk-2d0c9189").then(n.t.bind(null,"584d",7)),n.e("chunk-2d0cf391").then(n.t.bind(null,"6397",7)),n.e("chunk-2d22523a").then(n.t.bind(null,"e2b9",7))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},u=e=>{const t=Object(o["ref"])(()=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...e)=>t.value(...e);return n.wrapped=t,Object(o["provide"])(e,n),n},s=(e,t)=>e.wrapped.value=t,d="object"===typeof self&&self.self===self&&self||"object"===typeof e&&e.global===e&&e||void 0,b="useGlobalLeaflet",p={options:{type:Object,default:()=>({})}},f=e=>({options:e.options,methods:{}}),m={...p,pane:{type:String,default:"overlayPane"},attribution:{type:String,default:null},name:{type:String,custom:!0,default:void 0},layerType:{type:String,custom:!0,default:void 0},visible:{type:Boolean,custom:!0,default:!0}},O=(e,t,n)=>{const r=Object(o["inject"])("addLayer"),a=Object(o["inject"])("removeLayer"),{options:c,methods:l}=f(e),i={...c,attribution:e.attribution,pane:e.pane},u=()=>r({leafletObject:t.value}),s=()=>a({leafletObject:t.value}),d={...l,setAttribution(e,t){const n=this.$parent.leafletObject.attributionControl;n.removeAttribution(t).addAttribution(e)},setName(){s(),e.visible&&u()},setLayerType(){s(),e.visible&&u()},setVisible(e){t.value&&(e?u():s())},bindPopup({leafletObject:e}){t.value.bindPopup(e)},bindTooltip({leafletObject:e}){t.value.bindTooltip(e)},unbindTooltip(){const e=t.value?t.value.getTooltip():null;e&&e.unbindTooltip()},unbindPopup(){const e=t.value?t.value.getPopup():null;e&&e.unbindPopup()},updateVisibleProp(e){n.emit("update:visible",e)}};return Object(o["provide"])("bindPopup",d.bindPopup),Object(o["provide"])("bindTooltip",d.bindTooltip),Object(o["provide"])("unbindTooltip",d.unbindTooltip),Object(o["provide"])("unbindPopup",d.unbindPopup),Object(o["onUnmounted"])(()=>{d.unbindPopup(),d.unbindTooltip(),s()}),{options:i,methods:d}},j=(e,t)=>{if(e&&t.default)return Object(o["h"])("div",{style:{display:"none"}},t.default())},h={...p,interactive:{type:Boolean,default:!0},bubblingMouseEvents:{type:Boolean,default:!0}},g={...m,...h,stroke:{type:Boolean,custom:!0,default:!0},color:{type:String,custom:!0,default:"#3388ff"},weight:{type:Number,custom:!0,default:3},opacity:{type:Number,custom:!0,default:1},lineCap:{type:String,custom:!0,default:"round"},lineJoin:{type:String,custom:!0,default:"round"},dashArray:{type:String,custom:!0,default:null},dashOffset:{type:String,custom:!0,default:null},fill:{type:Boolean,custom:!0,default:!1},fillColor:{type:String,custom:!0,default:"#3388ff"},fillOpacity:{type:Number,custom:!0,default:.2},fillRule:{type:String,custom:!0,default:"evenodd"},className:{type:String,custom:!0,default:null}},y={...g,latLng:{type:[Object,Array],custom:!0,default:null},radius:{type:Number,default:null}};const v={...p,position:{type:String,default:"topright"}},k=(e,t)=>{const{options:n,methods:r}=f(e),a={...n,position:e.position},c={...r,setPosition(e){t.value&&t.value.setPosition(e)}};return Object(o["onUnmounted"])(()=>{t.value&&t.value.remove()}),{options:a,methods:c}},w=e=>e.default?Object(o["h"])("div",{ref:"root"},e.default()):null;Boolean,Boolean;Boolean,Boolean,Boolean,Boolean;Boolean,Boolean,Boolean;const E={...m},N=(e,t,n)=>{const{options:r,methods:a}=O(e,t,n),c={...r},l={...a,addLayer(e){t.value.addLayer(e.leafletObject)},removeLayer(e){t.value.removeLayer(e.leafletObject)}};return Object(o["provide"])("addLayer",l.addLayer),Object(o["provide"])("removeLayer",l.removeLayer),{options:c,methods:l}};const S={...E,geojson:{type:[Object,Array],default:()=>({})}},V=(e,t)=>{const{options:n,methods:o}=N(e,t),r={...n,...e},a={...o,setGeojson(e){t.value.clearLayers(),t.value.addData(e)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:r,methods:a}};var T={props:S,setup(e,t){const r=Object(o["ref"])({}),a=Object(o["ref"])(!1),i=Object(o["inject"])(b),u=Object(o["inject"])("addLayer"),{methods:s,options:p}=V(e,r);return Object(o["onMounted"])(async()=>{const{geoJSON:b,DomEvent:f}=i?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));r.value=b(e.geojson,p);const m=l(t.attrs);f.on(r.value,m),c(s,r.value,e),u({...e,...s,leafletObject:r.value}),a.value=!0,Object(o["nextTick"])(()=>t.emit("ready",r.value))}),{ready:a,leafletObject:r}},render(){return j(this.ready,this.$slots)},__file:"src/components/LGeoJson.vue"};const D={...m,pane:{type:String,default:"tilePane"},opacity:{type:Number,custom:!1,default:1},zIndex:{type:Number,default:1},tileSize:{type:Number,default:256},noWrap:{type:Boolean,default:!1},minZoom:{type:Number,default:0},maxZoom:{type:Number,default:void 0}},_=(e,t,n)=>{const{options:o,methods:r}=O(e,t,n),a={...o,pane:e.pane,opacity:e.opacity,zIndex:e.zIndex,tileSize:e.tileSize,noWrap:e.noWrap,minZoom:e.minZoom,maxZoom:e.maxZoom};return{options:a,methods:{...r}}};const I={iconUrl:{type:String,custom:!0,default:null},iconRetinaUrl:{type:String,custom:!0,default:null},iconSize:{type:[Object,Array],custom:!0,default:null},iconAnchor:{type:[Object,Array],custom:!0,default:null},popupAnchor:{type:[Object,Array],custom:!0,default:()=>[0,0]},tooltipAnchor:{type:[Object,Array],custom:!0,default:()=>[0,0]},shadowUrl:{type:String,custom:!0,default:null},shadowRetinaUrl:{type:String,custom:!0,default:null},shadowSize:{type:[Object,Array],custom:!0,default:null},shadowAnchor:{type:[Object,Array],custom:!0,default:null},bgPos:{type:[Object,Array],custom:!0,default:()=>[0,0]},className:{type:String,custom:!0,default:""},options:{type:Object,custom:!0,default:()=>({})}};Boolean,Boolean;var x={emits:["ready","update:zoom","update:center","update:bounds"],props:{...p,center:{type:[Object,Array],default:()=>[0,0]},bounds:{type:[Array,Object],default:void 0},maxBounds:{type:[Array,Object],default:void 0},zoom:{type:Number,default:0},minZoom:{type:Number,default:void 0},maxZoom:{type:Number,default:void 0},paddingBottomRight:{type:Array,default:void 0},paddingTopLeft:{type:Array,default:void 0},padding:{type:Array,default:void 0},worldCopyJump:{type:Boolean,default:!1},crs:{type:[String,Object],default:"EPSG3857"},maxBoundsViscosity:{type:Number,default:void 0},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number,default:void 0},inertiaMaxSpeed:{type:Number,default:void 0},easeLinearity:{type:Number,default:void 0},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number,default:void 0},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:!1},useGlobalLeaflet:{type:Boolean,default:!1}},setup(e,t){const a=Object(o["ref"])(null),p=Object(o["reactive"])({ready:!1,leafletRef:{},layersToAdd:[],layersInControl:[]}),{options:m}=f(e),O={...m,minZoom:e.minZoom,maxZoom:e.maxZoom,maxBounds:e.maxBounds,maxBoundsViscosity:e.maxBoundsViscosity,worldCopyJump:e.worldCopyJump,crs:e.crs,center:e.center,zoom:e.zoom,inertia:e.inertia,inertiaDeceleration:e.inertiaDeceleration,inertiaMaxSpeed:e.inertiaMaxSpeed,easeLinearity:e.easeLinearity,zoomAnimation:e.zoomAnimation,zoomAnimationThreshold:e.zoomAnimationThreshold,fadeAnimation:e.fadeAnimation,markerZoomAnimation:e.markerZoomAnimation},j=u("addLayer"),h=u("removeLayer"),g=u("registerControl"),y=u("registerLayerControl");Object(o["provide"])(b,e.useGlobalLeaflet);const v={moveEndHandler(){t.emit("update:zoom",p.leafletRef.getZoom()),t.emit("update:center",p.leafletRef.getCenter()),t.emit("update:bounds",p.leafletRef.getBounds())},overlayAddHandler(e){const t=p.layersInControl.find(t=>t.name===e.name);t&&t.updateVisibleProp(!0)},overlayRemoveHandler(e){const t=p.layersInControl.find(t=>t.name===e.name);t&&t.updateVisibleProp(!1)}};Object(o["onMounted"])(async()=>{e.useGlobalLeaflet&&(d.L=d.L||await n.e("chunk-2d2248b6").then(n.t.bind(null,"e11e",7)));const{map:u,CRS:b,Icon:f,latLngBounds:m,latLng:k,DomEvent:w}=e.useGlobalLeaflet?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));try{O.beforeMapMount&&await O.beforeMapMount()}catch(V){console.error("The following error occurred running the provided beforeMapMount hook "+V.message)}await i(f);const E="string"==typeof O.crs?b[O.crs]:O.crs;O.crs=E||b.EPSG3857;const N={addLayer(e){if(void 0!==e.layerType)if(void 0===p.layerControl)p.layersToAdd.push(e);else{const t=p.layersInControl.find(t=>t.leafletObject._leaflet_id===e.leafletObject._leaflet_id);t||(p.layerControl.addLayer(e),p.layersInControl.push(e))}!1!==e.visible&&p.leafletRef.addLayer(e.leafletObject)},removeLayer(e){void 0!==e.layerType&&(void 0===p.layerControl?p.layersToAdd=p.layersToAdd.filter(t=>t.name!==e.name):(p.layerControl.removeLayer(e.leafletObject),p.layersInControl=p.layersInControl.filter(t=>t.leafletObject._leaflet_id!==e.leafletObject._leaflet_id))),p.leafletRef.removeLayer(e.leafletObject)},registerLayerControl(e){p.layerControl=e,p.layersToAdd.forEach(e=>{p.layerControl.addLayer(e)}),p.layersToAdd=[],g(e)},registerControl(e){p.leafletRef.addControl(e.leafletObject)},setZoom(t){const n=p.leafletRef.getZoom();t!==n&&p.leafletRef.setZoom(t,{animate:!e.noBlockingAnimations&&null})},setPaddingBottomRight(e){p.paddingBottomRight=e},setPaddingTopLeft(e){p.paddingTopLeft=e},setPadding(e){p.padding=e},setCrs(e){const t=p.leafletRef.getBounds();p.leafletRef.options.crs=e,p.leafletRef.fitBounds(t,{animate:!1,padding:[0,0]})},fitBounds(e){p.leafletRef.fitBounds(e,{animate:!this.noBlockingAnimations&&null})},setBounds(e){if(!e)return;const t=m(e);if(!t.isValid())return;const n=p.lastSetBounds||p.leafletRef.getBounds(),o=!n.equals(t,0);o&&(p.lastSetBounds=t,p.leafletRef.fitBounds(t,this.fitBoundsOptions))},setCenter(e){if(null==e)return;const t=k(e),n=p.lastSetCenter||p.leafletRef.getCenter();n.lat===t.lat&&n.lng===t.lng||(p.lastSetCenter=t,p.leafletRef.panTo(t,{animate:!this.noBlockingAnimations&&null}))}};s(j,N.addLayer),s(h,N.removeLayer),s(g,N.registerControl),s(y,N.registerLayerControl),p.leafletRef=u(a.value,O),c(N,p.leafletRef,e);const S=l(t.attrs);p.leafletRef.on("moveend",r(v.moveEndHandler,100)),p.leafletRef.on("overlayadd",v.overlayAddHandler),p.leafletRef.on("overlayremove",v.overlayRemoveHandler),w.on(p.leafletRef,S),p.ready=!0,Object(o["nextTick"])(()=>t.emit("ready",p.leafletRef))}),Object(o["onBeforeUnmount"])(()=>{p.leafletRef&&p.leafletRef.remove()});const k=Object(o["computed"])(()=>p.leafletRef),w=Object(o["computed"])(()=>p.ready);return{root:a,ready:w,leafletObject:k}},render(){return Object(o["h"])("div",{style:{width:"100%",height:"100%"},ref:"root"},this.ready?this.$slots.default():{})},__file:"src/components/LMap.vue"};const R={...m,pane:{type:String,default:"markerPane"},draggable:{type:Boolean,custom:!0,default:!1},latLng:{type:[Object,Array],custom:!0,default:null},icon:{type:[Object],default:()=>{},custom:!1},zIndexOffset:{type:Number,custom:!1,default:null}},B=(e,t,n)=>{const{options:o,methods:r}=O(e,t,n),a={...o,...e},c={...r,setDraggable(e){t.value.dragging&&(e?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(e){n.emit("update:latLng",e.latlng),n.emit("update:lat-lng",e.latlng)},setLatLng(e){if(null!=e&&t.value){const n=t.value.getLatLng();n&&n.equals(e)||t.value.setLatLng(e)}}};return{options:a,methods:c}};var A={name:"LMarker",props:R,setup(e,t){const a=Object(o["ref"])({}),i=Object(o["ref"])(!1),u=Object(o["inject"])(b),s=Object(o["inject"])("addLayer");Object(o["provide"])("canSetParentHtml",()=>!!a.value.getElement()),Object(o["provide"])("setParentHtml",e=>a.value.getElement().innerHTML=e),Object(o["provide"])("setIcon",e=>a.value.setIcon&&a.value.setIcon(e));const{options:p,methods:f}=B(e,a,t);return void 0===p.icon&&delete p.icon,Object(o["onMounted"])(async()=>{const{marker:b,DomEvent:m}=u?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));a.value=b(e.latLng,p);const O=l(t.attrs);m.on(a.value,O),a.value.on("move",r(f.latLngSync,100)),c(f,a.value,e),s({...e,...f,leafletObject:a.value}),i.value=!0,Object(o["nextTick"])(()=>t.emit("ready",a.value))}),{ready:i,leafletObject:a}},render(){return j(this.ready,this.$slots)},__file:"src/components/LMarker.vue"};const C={...g,latLngs:{type:Array,default:()=>[]},smoothFactor:{type:Number,custom:!0,default:1},noClip:{type:Boolean,custom:!0,default:!1}},U={...C};const L={...p,content:{type:String,default:null}};const $={...D,tms:{type:Boolean,default:!1},subdomains:{type:String,default:"abc"},detectRetina:{type:Boolean,default:!1},url:{type:String,default:null}},P=(e,t)=>{const{options:n,methods:o}=_(e,t),r={...n,tms:e.tms,subdomains:e.subdomains,detectRetina:e.detectRetina};return{options:r,methods:{...o}}};var M={props:$,setup(e,t){const r=Object(o["ref"])({}),a=Object(o["inject"])(b),i=Object(o["inject"])("addLayer"),{options:u,methods:s}=P(e,r);return Object(o["onMounted"])(async()=>{const{tileLayer:b,DomEvent:p}=a?d.L:await n.e("chunk-2d0da8f3").then(n.bind(null,"6bb3"));r.value=b(e.url,u);const f=l(t.attrs);p.on(r.value,f),c(s,r.value,e),i({...e,...s,leafletObject:r.value}),Object(o["nextTick"])(()=>t.emit("ready",r.value))}),{leafletObject:r}},render(){return null},__file:"src/components/LTileLayer.vue"};Boolean,Boolean}).call(this,n("c8ba"))},"5c76":function(e,t,n){"use strict";var o=n("1da1"),r=(n("96cf"),n("ac1f"),n("1276"),n("b680"),n("99af"),n("7a23")),a=n("47e2"),c=n("6c02"),l=n("dad5"),i=n("2906"),u=n("5e65"),s=n("c364"),d=n("1119"),b=n("6284"),p={id:"workout-form"},f=["onSubmit"],m={class:"form-items"},O={key:0,class:"form-item-radio"},j=["checked","disabled"],h={for:"withGpx"},g=["checked","disabled"],y={for:"withoutGpx"},v={class:"form-item"},k=["disabled"],w=["value"],E={key:1,class:"form-item"},N={for:"gpxFile"},S=["disabled"],V={class:"files-help info-box"},T={key:2,class:"form-item"},D={for:"title"},_=["required","disabled"],I={key:3},x={class:"workout-date-duration"},R={class:"form-item"},B={class:"workout-date-time"},A=["disabled"],C=["disabled"],U={class:"form-item"},L=["disabled"],$=Object(r["createTextVNode"])(" : "),P=["disabled"],M=Object(r["createTextVNode"])(" : "),F=["disabled"],q={class:"form-item"},G=["disabled"],W={class:"form-item"},z={key:1},H={key:2,class:"form-buttons"},K=["disabled"],Z=["onClick"],X=Object(r["defineComponent"])({props:{authUser:null,sports:null,isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:function(){return{}}}},setup:function(e){var t=e,n=Object(a["b"])(),X=n.t,J=Object(i["a"])(),Y=Object(c["d"])(),Q=Object(r["toRefs"])(t),ee=Q.authUser,te=Q.workout,ne=Q.isCreation,oe=Q.loading,re=Object(r["computed"])((function(){return Object(d["e"])(t.sports,X,!0,te.value.id?[te.value.sport_id]:null)})),ae=Object(r["computed"])((function(){return J.getters[l["b"].GETTERS.APP_CONFIG]})),ce=ae.value.max_single_file_size?Object(s["b"])(ae.value.max_single_file_size):"",le=ae.value.gpx_limit_import,ie=ae.value.max_zip_file_size?Object(s["b"])(ae.value.max_zip_file_size):"",ue=Object(r["computed"])((function(){return J.getters[l["b"].GETTERS.ERROR_MESSAGES]})),se=Object(r["reactive"])({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:""}),de=Object(r["ref"])(t.workout.id?t.workout.with_gpx:t.isCreation),be=null,pe=Object(r["ref"])(!1);function fe(e){se.notes=e}function me(){de.value=!de.value,pe.value=!1}function Oe(e){e.target.files&&(be=e.target.files[0])}function je(e){if(se.sport_id="".concat(e.sport_id),se.title=e.title,se.notes=e.notes,!e.with_gpx){var n=Object(u["a"])(Object(u["c"])(e.workout_date,t.authUser.timezone),"yyyy-MM-dd"),o=e.duration.split(":");se.workoutDistance="".concat(ee.value.imperial_units?Object(b["a"])(e.distance,"km","mi",2):parseFloat(e.distance.toFixed(2))),se.workoutDate=n.workout_date,se.workoutTime=n.workout_time,se.workoutDurationHour=o[0],se.workoutDurationMinutes=o[1],se.workoutDurationSeconds=o[2]}}function he(e){e.title=se.title,e.distance=ee.value.imperial_units?Object(b["a"])(+se.workoutDistance,"mi","km",3):+se.workoutDistance,e.duration=3600*+se.workoutDurationHour+60*+se.workoutDurationMinutes+ +se.workoutDurationSeconds,e.workout_date="".concat(se.workoutDate," ").concat(se.workoutTime)}function ge(){var e={sport_id:+se.sport_id,notes:se.notes};if(t.workout.id)t.workout.with_gpx?e.title=se.title:he(e),J.dispatch(l["f"].ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:e});else if(de.value){if(!be){var n="workouts.NO_FILE_PROVIDED";return void J.commit(l["b"].MUTATIONS.SET_ERROR_MESSAGES,n)}e.file=be,J.dispatch(l["f"].ACTIONS.ADD_WORKOUT,e)}else he(e),J.dispatch(l["f"].ACTIONS.ADD_WORKOUT_WITHOUT_GPX,e)}function ye(){t.workout.id?Y.push({name:"Workout",params:{workoutId:t.workout.id}}):Y.go(-1)}function ve(){pe.value=!0}return Object(r["onMounted"])((function(){t.workout.id&&je(t.workout)})),Object(r["onUnmounted"])((function(){return J.commit(l["b"].MUTATIONS.EMPTY_ERROR_MESSAGES)})),Object(r["watch"])((function(){return t.workout}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t!==n&&t&&t.id&&je(t);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),function(e,t){var n=Object(r["resolveComponent"])("CustomTextArea"),o=Object(r["resolveComponent"])("ErrorMessage"),a=Object(r["resolveComponent"])("Loader"),c=Object(r["resolveComponent"])("Card");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{id:"workout-edition",class:Object(r["normalizeClass"])(["center-card center-card with-margin",{"center-form":Object(r["unref"])(te)&&Object(r["unref"])(te).with_gpx}])},[Object(r["createVNode"])(c,null,{title:Object(r["withCtx"])((function(){return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.$t("workouts.".concat(Object(r["unref"])(ne)?"ADD":"EDIT","_WORKOUT"))),1)]})),content:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("div",p,[Object(r["createElementVNode"])("form",{class:Object(r["normalizeClass"])({errors:pe.value}),onSubmit:Object(r["withModifiers"])(ge,["prevent"])},[Object(r["createElementVNode"])("div",m,[Object(r["unref"])(ne)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",O,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("input",{id:"withGpx",type:"radio",checked:Object(r["unref"])(de),disabled:Object(r["unref"])(oe),onClick:me},null,8,j),Object(r["createElementVNode"])("label",h,Object(r["toDisplayString"])(e.$t("workouts.WITH_GPX")),1)]),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("input",{id:"withoutGpx",type:"radio",checked:!Object(r["unref"])(de),disabled:Object(r["unref"])(oe),onClick:me},null,8,g),Object(r["createElementVNode"])("label",y,Object(r["toDisplayString"])(e.$t("workouts.WITHOUT_GPX")),1)])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",v,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.SPORT",1))+": ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("select",{id:"sport",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[0]||(t[0]=function(e){return Object(r["unref"])(se).sport_id=e})},[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(Object(r["unref"])(re),(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("option",{value:e.id,key:e.id},Object(r["toDisplayString"])(e.translatedLabel),9,w)})),128))],40,k),[[r["vModelSelect"],Object(r["unref"])(se).sport_id]])]),Object(r["unref"])(ne)&&Object(r["unref"])(de)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",E,[Object(r["createElementVNode"])("label",N,Object(r["toDisplayString"])(e.$t("workouts.GPX_FILE"))+" "+Object(r["toDisplayString"])(e.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+": ",1),Object(r["createElementVNode"])("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:Object(r["unref"])(oe),required:"",onInvalid:ve,onInput:Oe},null,40,S),Object(r["createElementVNode"])("div",V,[Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.$t("workouts.GPX_FILE"))+":",1),Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.MAX_SIZE"))+": "+Object(r["toDisplayString"])(Object(r["unref"])(ce)),1)])]),Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.$t("workouts.ZIP_ARCHIVE"))+":",1),Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.NO_FOLDER")),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.MAX_FILES"))+": "+Object(r["toDisplayString"])(Object(r["unref"])(le)),1),Object(r["createElementVNode"])("li",null,Object(r["toDisplayString"])(e.$t("workouts.MAX_SIZE"))+": "+Object(r["toDisplayString"])(Object(r["unref"])(ie)),1)])])])])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",T,[Object(r["createElementVNode"])("label",D,Object(r["toDisplayString"])(e.$t("workouts.TITLE"))+": ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"title",name:"title",type:"text",required:!Object(r["unref"])(ne),onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[1]||(t[1]=function(e){return Object(r["unref"])(se).title=e})},null,40,_),[[r["vModelText"],Object(r["unref"])(se).title]])])),Object(r["unref"])(de)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",I,[Object(r["createElementVNode"])("div",x,[Object(r["createElementVNode"])("div",R,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.WORKOUT_DATE"))+":",1),Object(r["createElementVNode"])("div",B,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[2]||(t[2]=function(e){return Object(r["unref"])(se).workoutDate=e})},null,40,A),[[r["vModelText"],Object(r["unref"])(se).workoutDate]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[3]||(t[3]=function(e){return Object(r["unref"])(se).workoutTime=e})},null,40,C),[[r["vModelText"],Object(r["unref"])(se).workoutTime]])])]),Object(r["createElementVNode"])("div",U,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.DURATION"))+":",1),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:"workout-duration",type:"text",placeholder:"HH",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[4]||(t[4]=function(e){return Object(r["unref"])(se).workoutDurationHour=e})},null,40,L),[[r["vModelText"],Object(r["unref"])(se).workoutDurationHour]]),$,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:"workout-duration",type:"text",pattern:"^([0-5][0-9])$",placeholder:"MM",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[5]||(t[5]=function(e){return Object(r["unref"])(se).workoutDurationMinutes=e})},null,40,P),[[r["vModelText"],Object(r["unref"])(se).workoutDurationMinutes]]),M,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:"workout-duration",type:"text",pattern:"^([0-5][0-9])$",placeholder:"SS",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[6]||(t[6]=function(e){return Object(r["unref"])(se).workoutDurationSeconds=e})},null,40,F),[[r["vModelText"],Object(r["unref"])(se).workoutDurationSeconds]])])])]),Object(r["createElementVNode"])("div",q,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.DISTANCE"))+" ("+Object(r["toDisplayString"])(Object(r["unref"])(ee).imperial_units?"mi":"km")+"): ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ve,disabled:Object(r["unref"])(oe),"onUpdate:modelValue":t[7]||(t[7]=function(e){return Object(r["unref"])(se).workoutDistance=e})},null,40,G),[[r["vModelText"],Object(r["unref"])(se).workoutDistance]])])])),Object(r["createElementVNode"])("div",W,[Object(r["createElementVNode"])("label",null,Object(r["toDisplayString"])(e.$t("workouts.NOTES"))+": ",1),Object(r["createVNode"])(n,{name:"notes",input:Object(r["unref"])(se).notes,disabled:Object(r["unref"])(oe),onUpdateValue:fe},null,8,["input","disabled"])])]),Object(r["unref"])(ue)?(Object(r["openBlock"])(),Object(r["createBlock"])(o,{key:0,message:Object(r["unref"])(ue)},null,8,["message"])):Object(r["createCommentVNode"])("",!0),Object(r["unref"])(oe)?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",z,[Object(r["createVNode"])(a)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",H,[Object(r["createElementVNode"])("button",{class:"confirm",type:"submit",disabled:Object(r["unref"])(oe)},Object(r["toDisplayString"])(e.$t("buttons.SUBMIT")),9,K),Object(r["createElementVNode"])("button",{class:"cancel",onClick:Object(r["withModifiers"])(ye,["prevent"])},Object(r["toDisplayString"])(e.$t("buttons.CANCEL")),9,Z)]))],42,f)])]})),_:1})],2)}}}),J=(n("fedc"),n("6b0d")),Y=n.n(J);const Q=Y()(X,[["__scopeId","data-v-6d22c97d"]]);t["a"]=Q},"5f44":function(e,t,n){"use strict";n("0716")},"5fb2":function(e,t,n){"use strict";var o=n("da84"),r=n("e330"),a=2147483647,c=36,l=1,i=26,u=38,s=700,d=72,b=128,p="-",f=/[^\0-\u007E]/,m=/[.\u3002\uFF0E\uFF61]/g,O="Overflow: input needs wider integers to process",j=c-l,h=o.RangeError,g=r(m.exec),y=Math.floor,v=String.fromCharCode,k=r("".charCodeAt),w=r([].join),E=r([].push),N=r("".replace),S=r("".split),V=r("".toLowerCase),T=function(e){var t=[],n=0,o=e.length;while(n<o){var r=k(e,n++);if(r>=55296&&r<=56319&&n<o){var a=k(e,n++);56320==(64512&a)?E(t,((1023&r)<<10)+(1023&a)+65536):(E(t,r),n--)}else E(t,r)}return t},D=function(e){return e+22+75*(e<26)},_=function(e,t,n){var o=0;for(e=n?y(e/s):e>>1,e+=y(e/t);e>j*i>>1;o+=c)e=y(e/j);return y(o+(j+1)*e/(e+u))},I=function(e){var t=[];e=T(e);var n,o,r=e.length,u=b,s=0,f=d;for(n=0;n<e.length;n++)o=e[n],o<128&&E(t,v(o));var m=t.length,j=m;m&&E(t,p);while(j<r){var g=a;for(n=0;n<e.length;n++)o=e[n],o>=u&&o<g&&(g=o);var k=j+1;if(g-u>y((a-s)/k))throw h(O);for(s+=(g-u)*k,u=g,n=0;n<e.length;n++){if(o=e[n],o<u&&++s>a)throw h(O);if(o==u){for(var N=s,S=c;;S+=c){var V=S<=f?l:S>=f+i?i:S-f;if(N<V)break;var I=N-V,x=c-V;E(t,v(D(V+I%x))),N=y(I/x)}E(t,v(D(N))),f=_(s,k,j==m),s=0,++j}}++s,++u}return w(t,"")};e.exports=function(e){var t,n,o=[],r=S(N(V(e),m,"."),".");for(t=0;t<r.length;t++)n=r[t],E(o,g(f,n)?"xn--"+I(n):n);return w(o,".")}},"692d":function(e,t,n){"use strict";n.r(t);var o=n("7a23"),r=n("5c76"),a=n("dad5"),c=n("2906"),l={id:"add-workout",class:"view"},i={class:"container"},u=Object(o["defineComponent"])({setup:function(e){var t=Object(c["a"])(),n=Object(o["computed"])((function(){return t.getters[a["c"].GETTERS.SPORTS]})),u=Object(o["computed"])((function(){return t.getters[a["a"].GETTERS.AUTH_USER_PROFILE]})),s=Object(o["computed"])((function(){return t.getters[a["f"].GETTERS.WORKOUT_DATA]}));return function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",l,[Object(o["createElementVNode"])("div",i,[Object(o["createVNode"])(r["a"],{authUser:Object(o["unref"])(u),sports:Object(o["unref"])(n),isCreation:!0,loading:Object(o["unref"])(s).loading},null,8,["authUser","sports","loading"])])])}}});const s=u;t["default"]=s},"6bbf":function(e,t,n){},7156:function(e,t,n){var o=n("1626"),r=n("861d"),a=n("d2bb");e.exports=function(e,t,n){var c,l;return a&&o(c=t.constructor)&&c!==n&&r(l=c.prototype)&&l!==n.prototype&&a(e,l),e}},7240:function(e,t,n){},"73b0":function(e,t,n){"use strict";n("a0a8")},7787:function(e,t,n){},"83e8":function(e,t,n){},"8aa2":function(e,t,n){"use strict";n("17b6")},"8ee9":function(e,t,n){"use strict";n.r(t);var o=n("1da1"),r=(n("96cf"),n("7a23")),a=n("6c02"),c=n("5c76"),l=n("dad5"),i=n("2906"),u={id:"edit-workout",class:"view"},s={class:"container"},d=Object(r["defineComponent"])({setup:function(e){var t=Object(a["c"])(),n=Object(i["a"])(),d=Object(r["computed"])((function(){return n.getters[l["a"].GETTERS.AUTH_USER_PROFILE]})),b=Object(r["computed"])((function(){return n.getters[l["c"].GETTERS.SPORTS]})),p=Object(r["computed"])((function(){return n.getters[l["f"].GETTERS.WORKOUT_DATA]}));return Object(r["onBeforeMount"])((function(){n.dispatch(l["f"].ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})})),Object(r["watch"])((function(){return t.params.workoutId}),function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t||n.commit(l["f"].MUTATIONS.EMPTY_WORKOUT);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",u,[Object(r["createElementVNode"])("div",s,[Object(r["createVNode"])(c["a"],{authUser:Object(r["unref"])(d),sports:Object(r["unref"])(b),workout:Object(r["unref"])(p).workout,loading:Object(r["unref"])(p).loading},null,8,["authUser","sports","workout","loading"])])])}}});const b=d;t["default"]=b},"95c4":function(e,t,n){"use strict";n("6bbf")},9861:function(e,t,n){"use strict";n("e260");var o=n("23e7"),r=n("da84"),a=n("d066"),c=n("c65b"),l=n("e330"),i=n("0d3b"),u=n("6eeb"),s=n("e2cc"),d=n("d44e"),b=n("9ed3"),p=n("69f3"),f=n("19aa"),m=n("1626"),O=n("1a2d"),j=n("0366"),h=n("f5df"),g=n("825a"),y=n("861d"),v=n("577e"),k=n("7c73"),w=n("5c6c"),E=n("9a1f"),N=n("35a1"),S=n("b622"),V=n("addb"),T=S("iterator"),D="URLSearchParams",_=D+"Iterator",I=p.set,x=p.getterFor(D),R=p.getterFor(_),B=a("fetch"),A=a("Request"),C=a("Headers"),U=A&&A.prototype,L=C&&C.prototype,$=r.RegExp,P=r.TypeError,M=r.decodeURIComponent,F=r.encodeURIComponent,q=l("".charAt),G=l([].join),W=l([].push),z=l("".replace),H=l([].shift),K=l([].splice),Z=l("".split),X=l("".slice),J=/\+/g,Y=Array(4),Q=function(e){return Y[e-1]||(Y[e-1]=$("((?:%[\\da-f]{2}){"+e+"})","gi"))},ee=function(e){try{return M(e)}catch(t){return e}},te=function(e){var t=z(e,J," "),n=4;try{return M(t)}catch(o){while(n)t=z(t,Q(n--),ee);return t}},ne=/[!'()~]|%20/g,oe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},re=function(e){return oe[e]},ae=function(e){return z(F(e),ne,re)},ce=function(e,t){if(t){var n,o,r=Z(t,"&"),a=0;while(a<r.length)n=r[a++],n.length&&(o=Z(n,"="),W(e,{key:te(H(o)),value:te(G(o,"="))}))}},le=function(e){this.entries.length=0,ce(this.entries,e)},ie=function(e,t){if(e<t)throw P("Not enough arguments")},ue=b((function(e,t){I(this,{type:_,iterator:E(x(e).entries),kind:t})}),"Iterator",(function(){var e=R(this),t=e.kind,n=e.iterator.next(),o=n.value;return n.done||(n.value="keys"===t?o.key:"values"===t?o.value:[o.key,o.value]),n})),se=function(){f(this,de);var e,t,n,o,r,a,l,i,u,s=arguments.length>0?arguments[0]:void 0,d=this,b=[];if(I(d,{type:D,entries:b,updateURL:function(){},updateSearchParams:le}),void 0!==s)if(y(s))if(e=N(s),e){t=E(s,e),n=t.next;while(!(o=c(n,t)).done){if(r=E(g(o.value)),a=r.next,(l=c(a,r)).done||(i=c(a,r)).done||!c(a,r).done)throw P("Expected sequence with length 2");W(b,{key:v(l.value),value:v(i.value)})}}else for(u in s)O(s,u)&&W(b,{key:u,value:v(s[u])});else ce(b,"string"==typeof s?"?"===q(s,0)?X(s,1):s:v(s))},de=se.prototype;if(s(de,{append:function(e,t){ie(arguments.length,2);var n=x(this);W(n.entries,{key:v(e),value:v(t)}),n.updateURL()},delete:function(e){ie(arguments.length,1);var t=x(this),n=t.entries,o=v(e),r=0;while(r<n.length)n[r].key===o?K(n,r,1):r++;t.updateURL()},get:function(e){ie(arguments.length,1);for(var t=x(this).entries,n=v(e),o=0;o<t.length;o++)if(t[o].key===n)return t[o].value;return null},getAll:function(e){ie(arguments.length,1);for(var t=x(this).entries,n=v(e),o=[],r=0;r<t.length;r++)t[r].key===n&&W(o,t[r].value);return o},has:function(e){ie(arguments.length,1);var t=x(this).entries,n=v(e),o=0;while(o<t.length)if(t[o++].key===n)return!0;return!1},set:function(e,t){ie(arguments.length,1);for(var n,o=x(this),r=o.entries,a=!1,c=v(e),l=v(t),i=0;i<r.length;i++)n=r[i],n.key===c&&(a?K(r,i--,1):(a=!0,n.value=l));a||W(r,{key:c,value:l}),o.updateURL()},sort:function(){var e=x(this);V(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){var t,n=x(this).entries,o=j(e,arguments.length>1?arguments[1]:void 0),r=0;while(r<n.length)t=n[r++],o(t.value,t.key,this)},keys:function(){return new ue(this,"keys")},values:function(){return new ue(this,"values")},entries:function(){return new ue(this,"entries")}},{enumerable:!0}),u(de,T,de.entries,{name:"entries"}),u(de,"toString",(function(){var e,t=x(this).entries,n=[],o=0;while(o<t.length)e=t[o++],W(n,ae(e.key)+"="+ae(e.value));return G(n,"&")}),{enumerable:!0}),d(se,D),o({global:!0,forced:!i},{URLSearchParams:se}),!i&&m(C)){var be=l(L.has),pe=l(L.set),fe=function(e){if(y(e)){var t,n=e.body;if(h(n)===D)return t=e.headers?new C(e.headers):new C,be(t,"content-type")||pe(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k(e,{body:w(0,v(n)),headers:w(0,t)})}return e};if(m(B)&&o({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return B(e,arguments.length>1?fe(arguments[1]):{})}}),m(A)){var me=function(e){return f(this,U),new A(e,arguments.length>1?fe(arguments[1]):{})};U.constructor=me,me.prototype=U,o({global:!0,forced:!0},{Request:me})}}e.exports={URLSearchParams:se,getState:x}},a0a8:function(e,t,n){},a497:function(e,t,n){"use strict";n("30e0")},a4ee:function(e,t,n){},a9e3:function(e,t,n){"use strict";var o=n("83ab"),r=n("da84"),a=n("e330"),c=n("94ca"),l=n("6eeb"),i=n("1a2d"),u=n("7156"),s=n("3a9b"),d=n("d9b5"),b=n("c04e"),p=n("d039"),f=n("241c").f,m=n("06cf").f,O=n("9bf2").f,j=n("408a"),h=n("58a8").trim,g="Number",y=r[g],v=y.prototype,k=r.TypeError,w=a("".slice),E=a("".charCodeAt),N=function(e){var t=b(e,"number");return"bigint"==typeof t?t:S(t)},S=function(e){var t,n,o,r,a,c,l,i,u=b(e,"number");if(d(u))throw k("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=h(u),t=E(u,0),43===t||45===t){if(n=E(u,2),88===n||120===n)return NaN}else if(48===t){switch(E(u,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+u}for(a=w(u,2),c=a.length,l=0;l<c;l++)if(i=E(a,l),i<48||i>r)return NaN;return parseInt(a,o)}return+u};if(c(g,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var V,T=function(e){var t=arguments.length<1?0:y(N(e)),n=this;return s(v,n)&&p((function(){j(n)}))?u(Object(t),n,T):t},D=o?f(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),_=0;D.length>_;_++)i(y,V=D[_])&&!i(T,V)&&O(T,V,m(y,V));T.prototype=v,v.constructor=T,l(r,g,T)}},b1c7:function(e,t,n){"use strict";n("57cc")},b3d2:function(e,t,n){},b86c:function(e,t,n){"use strict";n("7240")},c12b:function(e,t,n){"use strict";n("7787")},c4b5:function(e,t,n){"use strict";n("3450")},dbf6:function(e,t,n){"use strict";n("a4ee")},e94f:function(e,t,n){!function(e,n){n(t)}(0,(function(e){"use strict";function t(e){return e&&e.normalize&&e.normalize(),e&&e.textContent||""}function n(e,t){const n=e.getElementsByTagName(t);return n.length?n[0]:null}function o(e){const o={};if(e){const r=n(e,"line");if(r){const e=t(n(r,"color")),a=parseFloat(t(n(r,"opacity"))),c=parseFloat(t(n(r,"width")));e&&(o.stroke=e),isNaN(a)||(o["stroke-opacity"]=a),isNaN(c)||(o["stroke-width"]=96*c/25.4)}}return o}function r(e,o){const r={};let a,c;for(c=0;c<o.length;c++)a=n(e,o[c]),a&&(r[o[c]]=t(a));return r}function a(e){const n=r(e,["name","cmt","desc","type","time","keywords"]),o=e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*");for(let r=0;r<o.length;r++){const a=o[r];a.parentNode.parentNode===e&&(n[a.tagName.replace(":","_")]=t(a))}const a=e.getElementsByTagName("link");a.length&&(n.links=[]);for(let t=0;t<a.length;t++)n.links.push(Object.assign({href:a[t].getAttribute("href")},r(a[t],["text","type"])));return n}function c(e){const o=[parseFloat(e.getAttribute("lon")),parseFloat(e.getAttribute("lat"))],r=n(e,"ele"),a=n(e,"gpxtpx:hr")||n(e,"hr"),c=n(e,"time");let l;r&&(l=parseFloat(t(r)),isNaN(l)||o.push(l));const i={coordinates:o,time:c?t(c):null,extendedValues:[]};a&&i.extendedValues.push(["heart",parseFloat(t(a))]);const u=n(e,"extensions");if(null!==u)for(const s of["speed","course","hAcc","vAcc"]){const e=parseFloat(t(n(u,s)));isNaN(e)||i.extendedValues.push([s,e])}return i}function l(e){const t=i(e,"rtept");if(t)return{type:"Feature",properties:Object.assign(a(e),o(n(e,"extensions")),{_gpxType:"rte"}),geometry:{type:"LineString",coordinates:t.line}}}function i(e,t){const n=e.getElementsByTagName(t);if(n.length<2)return;const o=[],r=[],a={};for(let l=0;l<n.length;l++){const e=c(n[l]);o.push(e.coordinates),e.time&&r.push(e.time);for(let t=0;t<e.extendedValues.length;t++){const[o,r]=e.extendedValues[t],c="heart"===o?o:o+"s";a[c]||(a[c]=Array(n.length).fill(null)),a[c][l]=r}}return{line:o,times:r,extendedValues:a}}function u(e){const t=e.getElementsByTagName("trkseg"),r=[],c=[],l=[];for(let n=0;n<t.length;n++){const e=i(t[n],"trkpt");e&&(l.push(e),e.times&&e.times.length&&c.push(e.times))}if(0===l.length)return;const u=l.length>1,s=Object.assign(a(e),o(n(e,"extensions")),{_gpxType:"trk"},c.length?{coordinateProperties:{times:u?c:c[0]}}:{});for(let n=0;n<l.length;n++){const e=l[n];r.push(e.line);for(const[t,o]of Object.entries(e.extendedValues)){let e=s;"heart"===t&&(s.coordinateProperties||(s.coordinateProperties={}),e=s.coordinateProperties),u?(e[t]||(e[t]=l.map(e=>new Array(e.line.length).fill(null))),e[t][n]=o):e[t]=o}}return{type:"Feature",properties:s,geometry:u?{type:"MultiLineString",coordinates:r}:{type:"LineString",coordinates:r[0]}}}function*s(e){const t=e.getElementsByTagName("trk"),n=e.getElementsByTagName("rte"),o=e.getElementsByTagName("wpt");for(let r=0;r<t.length;r++){const e=u(t[r]);e&&(yield e)}for(let r=0;r<n.length;r++){const e=l(n[r]);e&&(yield e)}for(let l=0;l<o.length;l++)yield(i=o[l],{type:"Feature",properties:Object.assign(a(i),r(i,["sym"])),geometry:{type:"Point",coordinates:c(i).coordinates}});var i}const d=[["heartRate","heartRates"],["Cadence","cadences"],["Speed","speeds"],["Watts","watts"]],b=[["TotalTimeSeconds","totalTimeSeconds"],["DistanceMeters","distanceMeters"],["MaximumSpeed","maxSpeed"],["AverageHeartRateBpm","avgHeartRate"],["MaximumHeartRateBpm","maxHeartRate"],["AvgSpeed","avgSpeed"],["AvgWatts","avgWatts"],["MaxWatts","maxWatts"]];function p(e,o){const r=[];for(const[a,c]of o){let o=n(e,a);if(!o){const t=e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/ActivityExtension/v2",a);t.length&&(o=t[0])}const l=parseFloat(t(o));isNaN(l)||r.push([c,l])}return r}function f(e){const o=t(n(e,"LongitudeDegrees")),r=t(n(e,"LatitudeDegrees"));if(!o.length||!r.length)return null;const a=[parseFloat(o),parseFloat(r)],c=n(e,"AltitudeMeters"),l=n(e,"HeartRateBpm"),i=n(e,"Time");let u;return c&&(u=parseFloat(t(c)),isNaN(u)||a.push(u)),{coordinates:a,time:i?t(i):null,heartRate:l?parseFloat(t(l)):null,extensions:p(e,d)}}function m(e,t){const n=e.getElementsByTagName(t),o=[],r=[],a=[];if(n.length<2)return null;const c={extendedProperties:{}};for(let l=0;l<n.length;l++){const e=f(n[l]);if(null!==e){o.push(e.coordinates),e.time&&r.push(e.time),e.heartRate&&a.push(e.heartRate);for(const[t,o]of e.extensions)c.extendedProperties[t]||(c.extendedProperties[t]=Array(n.length).fill(null)),c.extendedProperties[t][l]=o}}return Object.assign(c,{line:o,times:r,heartRates:a})}function O(e){const o=e.getElementsByTagName("Track"),r=[],a=[],c=[],l=[];let i;const u=function(e){const t={};for(const[n,o]of e)t[n]=o;return t}(p(e,b)),s=n(e,"Name");s&&(u.name=t(s));for(let t=0;t<o.length;t++)i=m(o[t],"Trackpoint"),i&&(r.push(i.line),i.times.length&&a.push(i.times),i.heartRates.length&&c.push(i.heartRates),l.push(i.extendedProperties));for(let t=0;t<l.length;t++){const e=l[t];for(const n in e)1===o.length?u[n]=i.extendedProperties[n]:(u[n]||(u[n]=r.map(e=>Array(e.length).fill(null))),u[n][t]=e[n])}if(0!==r.length)return(a.length||c.length)&&(u.coordinateProperties=Object.assign(a.length?{times:1===r.length?a[0]:a}:{},c.length?{heart:1===r.length?c[0]:c}:{})),{type:"Feature",properties:u,geometry:{type:1===r.length?"LineString":"MultiLineString",coordinates:1===r.length?r[0]:r}}}function*j(e){const t=e.getElementsByTagName("Lap");for(let o=0;o<t.length;o++){const e=O(t[o]);e&&(yield e)}const n=e.getElementsByTagName("Courses");for(let o=0;o<n.length;o++){const e=O(n[o]);e&&(yield e)}}const h=/\s*/g,g=/^\s*|\s*$/g,y=/\s+/;function v(e){if(!e||!e.length)return 0;let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function k(e){return e.replace(h,"").split(",").map(parseFloat)}function w(e){return e.replace(g,"").split(y).map(k)}function E(e){if(void 0!==e.xml)return e.xml;if(e.tagName){let t=e.tagName;for(let n=0;n<e.attributes.length;n++)t+=e.attributes[n].name+e.attributes[n].value;for(let n=0;n<e.childNodes.length;n++)t+=E(e.childNodes[n]);return t}return"#text"===e.nodeName?(e.nodeValue||e.value||"").trim():"#cdata-section"===e.nodeName?e.nodeValue:""}const N=["Polygon","LineString","Point","Track","gx:Track"];function S(e,o,r){let a=t(n(o,"color"))||"";const c="stroke"==r||"fill"===r?r:r+"-color";"#"===a.substr(0,1)&&(a=a.substr(1)),6===a.length||3===a.length?e[c]=a:8===a.length&&(e[r+"-opacity"]=parseInt(a.substr(0,2),16)/255,e[c]="#"+a.substr(6,2)+a.substr(4,2)+a.substr(2,2))}function V(e,o,r,a){const c=parseFloat(t(n(o,r)));isNaN(c)||(e[a]=c)}function T(e){let n=e.getElementsByTagName("coord");const o=[],r=[];0===n.length&&(n=e.getElementsByTagName("gx:coord"));for(let c=0;c<n.length;c++)o.push(t(n[c]).split(" ").map(parseFloat));const a=e.getElementsByTagName("when");for(let c=0;c<a.length;c++)r.push(t(a[c]));return{coords:o,times:r}}function D(e){let o,r,a,c,l;const i=[],u=[];if(n(e,"MultiGeometry"))return D(n(e,"MultiGeometry"));if(n(e,"MultiTrack"))return D(n(e,"MultiTrack"));if(n(e,"gx:MultiTrack"))return D(n(e,"gx:MultiTrack"));for(a=0;a<N.length;a++)if(r=e.getElementsByTagName(N[a]),r)for(c=0;c<r.length;c++)if(o=r[c],"Point"===N[a])i.push({type:"Point",coordinates:k(t(n(o,"coordinates")))});else if("LineString"===N[a])i.push({type:"LineString",coordinates:w(t(n(o,"coordinates")))});else if("Polygon"===N[a]){const e=o.getElementsByTagName("LinearRing"),r=[];for(l=0;l<e.length;l++)r.push(w(t(n(e[l],"coordinates"))));i.push({type:"Polygon",coordinates:r})}else if("Track"===N[a]||"gx:Track"===N[a]){const e=T(o);i.push({type:"LineString",coordinates:e.coords}),e.times.length&&u.push(e.times)}return{geoms:i,coordTimes:u}}function _(e,o,r,a){const c=D(e);let l;const i={},u=t(n(e,"name")),s=t(n(e,"address"));let d=t(n(e,"styleUrl"));const b=t(n(e,"description")),p=n(e,"TimeSpan"),f=n(e,"TimeStamp"),m=n(e,"ExtendedData");let O=n(e,"IconStyle"),j=n(e,"LabelStyle"),h=n(e,"LineStyle"),g=n(e,"PolyStyle");const y=n(e,"visibility");if(u&&(i.name=u),s&&(i.address=s),d){"#"!==d[0]&&(d="#"+d),i.styleUrl=d,o[d]&&(i.styleHash=o[d]),r[d]&&(i.styleMapHash=r[d],i.styleHash=o[r[d].normal]);const e=a[i.styleHash];e&&(O||(O=n(e,"IconStyle")),j||(j=n(e,"LabelStyle")),h||(h=n(e,"LineStyle")),g||(g=n(e,"PolyStyle")))}if(b&&(i.description=b),p){const e=t(n(p,"begin")),o=t(n(p,"end"));i.timespan={begin:e,end:o}}if(f&&(i.timestamp=t(n(f,"when"))),O){S(i,O,"icon"),V(i,O,"scale","icon-scale"),V(i,O,"heading","icon-heading");const e=n(O,"hotSpot");if(e){const t=parseFloat(e.getAttribute("x")),n=parseFloat(e.getAttribute("y"));isNaN(t)||isNaN(n)||(i["icon-offset"]=[t,n])}const o=n(O,"Icon");if(o){const e=t(n(o,"href"));e&&(i.icon=e)}}if(j&&(S(i,j,"label"),V(i,j,"scale","label-scale")),h&&(S(i,h,"stroke"),V(i,h,"width","stroke-width")),g){S(i,g,"fill");const e=t(n(g,"fill")),o=t(n(g,"outline"));e&&(i["fill-opacity"]="1"===e?i["fill-opacity"]||1:0),o&&(i["stroke-opacity"]="1"===o?i["stroke-opacity"]||1:0)}if(m){const e=m.getElementsByTagName("Data"),o=m.getElementsByTagName("SimpleData");for(l=0;l<e.length;l++)i[e[l].getAttribute("name")]=t(n(e[l],"value"));for(l=0;l<o.length;l++)i[o[l].getAttribute("name")]=t(o[l])}y&&(i.visibility=t(y)),c.coordTimes.length&&(i.coordinateProperties={times:1===c.coordTimes.length?c.coordTimes[0]:c.coordTimes});const v={type:"Feature",geometry:0===c.geoms.length?null:1===c.geoms.length?c.geoms[0]:{type:"GeometryCollection",geometries:c.geoms},properties:i};return e.getAttribute("id")&&(v.id=e.getAttribute("id")),v}function*I(e){const o={},r={},a={},c=e.getElementsByTagName("Placemark"),l=e.getElementsByTagName("Style"),i=e.getElementsByTagName("StyleMap");for(let t=0;t<l.length;t++){const e=v(E(l[t])).toString(16);o["#"+l[t].getAttribute("id")]=e,r[e]=l[t]}for(let u=0;u<i.length;u++){o["#"+i[u].getAttribute("id")]=v(E(i[u])).toString(16);const e=i[u].getElementsByTagName("Pair"),r={};for(let o=0;o<e.length;o++)r[t(n(e[o],"key"))]=t(n(e[o],"styleUrl"));a["#"+i[u].getAttribute("id")]=r}for(let t=0;t<c.length;t++){const e=_(c[t],o,a,r);e&&(yield e)}}e.gpx=function(e){return{type:"FeatureCollection",features:Array.from(s(e))}},e.gpxGen=s,e.kml=function(e){return{type:"FeatureCollection",features:Array.from(I(e))}},e.kmlGen=I,e.tcx=function(e){return{type:"FeatureCollection",features:Array.from(j(e))}},e.tcxGen=j,Object.defineProperty(e,"__esModule",{value:!0})}))},fedc:function(e,t,n){"use strict";n("b3d2")}}]);
//# sourceMappingURL=workouts.ad3402f3.js.map