FitTrackee/fittrackee/dist/static/js/workouts.29d99435.js

2 lines
109 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"},C=["value"],A=["value"],U={class:"form-items-group"},L={class:"form-item"},P={class:"form-inputs-group"},$=["value"],M=["value"],F={class:"form-button"},H=Object(o["defineComponent"])({props:{authUser:null,sports:null},emits:["filter"],setup:function(e,t){var n=t.emit,i=e,H=Object(r["b"])(),q=H.t,G=Object(a["c"])(),z=Object(a["d"])(),W=Object(o["toRefs"])(i),K=W.authUser,Z=K.value.imperial_units?l["c"]["km"].defaultTarget:"km",X=Object(o["computed"])((function(){return Object(c["e"])(i.sports,q)})),J=Object.assign({},G.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 G.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,C),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,A)])])]),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",P,[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,$),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)])])])}}}),q=(n("5022"),n("6b0d")),G=n.n(q);const z=G()(H,[["__scopeId","data-v-fe8ba900"]]);var W=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=G()(xe,[["__scopeId","data-v-c2063212"]]);var Be=Re,Ce={key:0,id:"workouts",class:"view"},Ae={class:"container workouts-container"},Ue={class:"display-filters"},Le={class:"list-container"},Pe=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",Ce,[Object(o["createElementVNode"])("div",Ae,[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["filters-container",{hidden:s.value}])},[Object(o["createVNode"])(W,{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 $e=G()(Pe,[["__scopeId","data-v-03de0ddc"]]);t["default"]=$e},"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("e330"),s=n("37e8"),d=n("6eeb"),b=n("19aa"),p=n("1a2d"),f=n("60da"),m=n("4df4"),O=n("4dae"),j=n("6547").codeAt,h=n("5fb2"),g=n("577e"),y=n("d44e"),v=n("9861"),k=n("69f3"),w=k.set,E=k.getterFor("URL"),N=v.URLSearchParams,S=v.getState,V=l.URL,T=l.TypeError,D=l.parseInt,_=Math.floor,I=Math.pow,x=u("".charAt),R=u(/./.exec),B=u([].join),C=u(1..toString),A=u([].pop),U=u([].push),L=u("".replace),P=u([].shift),$=u("".split),M=u("".slice),F=u("".toLowerCase),H=u([].unshift),q="Invalid authority",G="Invalid scheme",z="Invalid host",W="Invalid port",K=/[a-z]/i,Z=/[\d+-.a-z]/i,X=/\d/,J=/^0x/i,Y=/^[0-7]+$/,Q=/^\d+$/,ee=/^[\da-f]+$/i,te=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ne=/[\0\t\n\r #/:<>?@[\\\]^|]/,oe=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,re=/[\t\n\r]/g,ae=function(e){var t,n,o,r,a,c,l,i=$(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"==x(r,0)&&(a=R(J,r)?16:8,r=M(r,8==a?1:2)),""===r)c=0;else{if(!R(10==a?Q:8==a?Y:ee,r))return e;c=D(r,a)}U(n,c)}for(o=0;o<t;o++)if(c=n[o],o==t-1){if(c>=I(256,5-t))return null}else if(c>255)return null;for(l=A(n),o=0;o<n.length;o++)l+=n[o]*I(256,3-o);return l},ce=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 x(e,d)};if(":"==b()){if(":"!=x(e,1))return;d+=2,u++,s=u}while(b()){if(8==u)return;if(":"!=b()){t=n=0;while(n<4&&R(ee,b()))t=16*t+D(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(!R(X,b()))return;while(R(X,b())){if(a=D(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},le=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},ie=function(e){var t,n,o,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)H(t,e%256),e=_(e/256);return B(t,".")}if("object"==typeof e){for(t="",o=le(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},ue={},se=f({},ue,{" ":1,'"':1,"<":1,">":1,"`":1}),de=f({},se,{"#":1,"?":1,"{":1,"}":1}),be=f({},de,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pe=function(e,t){var n=j(e,0);return n>32&&n<127&&!p(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},me=function(e,t){var n;return 2==e.length&&R(K,x(e,0))&&(":"==(n=x(e,1))||!t&&"|"==n)},Oe=function(e){var t;return e.length>1&&me(M(e,0,2))&&(2==e.length||"/"===(t=x(e,2))||"\\"===t||"?"===t||"#"===t)},je=function(e){return"."===e||"%2e"===F(e)},he=function(e){return e=F(e),".."===e||"%2e."===e||".%2e"===e||"%2e%2e"===e},ge={},ye={},ve={},ke={},we={},Ee={},Ne={},Se={},Ve={},Te={},De={},_e={},Ie={},xe={},Re={},Be={},Ce={},Ae={},Ue={},Le={},Pe={},$e=function(e,t,n){var o,r,a,c=g(e);if(t){if(r=this.parse(c),r)throw T(r);this.searchParams=null}else{if(void 0!==n&&(o=new $e(n,!0)),r=this.parse(c,null,o),r)throw T(r);a=S(new N),a.bindURL(this),this.searchParams=a}};$e.prototype={type:"URL",parse:function(e,t,n){var r,a,c,l,i=this,u=t||ge,s=0,d="",b=!1,f=!1,j=!1;e=g(e),t||(i.scheme="",i.username="",i.password="",i.host=null,i.port=null,i.path=[],i.query=null,i.fragment=null,i.cannotBeABaseURL=!1,e=L(e,oe,"")),e=L(e,re,""),r=m(e);while(s<=r.length){switch(a=r[s],u){case ge:if(!a||!R(K,a)){if(t)return G;u=ve;continue}d+=F(a),u=ye;break;case ye:if(a&&(R(Z,a)||"+"==a||"-"==a||"."==a))d+=F(a);else{if(":"!=a){if(t)return G;d="",u=ve,s=0;continue}if(t&&(i.isSpecial()!=p(fe,d)||"file"==d&&(i.includesCredentials()||null!==i.port)||"file"==i.scheme&&!i.host))return;if(i.scheme=d,t)return void(i.isSpecial()&&fe[i.scheme]==i.port&&(i.port=null));d="","file"==i.scheme?u=xe:i.isSpecial()&&n&&n.scheme==i.scheme?u=ke:i.isSpecial()?u=Se:"/"==r[s+1]?(u=we,s++):(i.cannotBeABaseURL=!0,U(i.path,""),u=Ue)}break;case ve:if(!n||n.cannotBeABaseURL&&"#"!=a)return G;if(n.cannotBeABaseURL&&"#"==a){i.scheme=n.scheme,i.path=O(n.path),i.query=n.query,i.fragment="",i.cannotBeABaseURL=!0,u=Pe;break}u="file"==n.scheme?xe:Ee;continue;case ke:if("/"!=a||"/"!=r[s+1]){u=Ee;continue}u=Ve,s++;break;case we:if("/"==a){u=Te;break}u=Ae;continue;case Ee:if(i.scheme=n.scheme,a==o)i.username=n.username,i.password=n.password,i.host=n.host,i.port=n.port,i.path=O(n.path),i.query=n.query;else if("/"==a||"\\"==a&&i.isSpecial())u=Ne;else if("?"==a)i.username=n.username,i.password=n.password,i.host=n.host,i.port=n.port,i.path=O(n.path),i.query="",u=Le;else{if("#"!=a){i.username=n.username,i.password=n.password,i.host=n.host,i.port=n.port,i.path=O(n.path),i.path.length--,u=Ae;continue}i.username=n.username,i.password=n.password,i.host=n.host,i.port=n.port,i.path=O(n.path),i.query=n.query,i.fragment="",u=Pe}break;case Ne:if(!i.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){i.username=n.username,i.password=n.password,i.host=n.host,i.port=n.port,u=Ae;continue}u=Te}else u=Ve;break;case Se:if(u=Ve,"/"!=a||"/"!=x(d,s+1))continue;s++;break;case Ve:if("/"!=a&&"\\"!=a){u=Te;continue}break;case Te:if("@"==a){b&&(d="%40"+d),b=!0,c=m(d);for(var h=0;h<c.length;h++){var y=c[h];if(":"!=y||j){var v=pe(y,be);j?i.password+=v:i.username+=v}else j=!0}d=""}else if(a==o||"/"==a||"?"==a||"#"==a||"\\"==a&&i.isSpecial()){if(b&&""==d)return q;s-=m(d).length+1,d="",u=De}else d+=a;break;case De:case _e:if(t&&"file"==i.scheme){u=Be;continue}if(":"!=a||f){if(a==o||"/"==a||"?"==a||"#"==a||"\\"==a&&i.isSpecial()){if(i.isSpecial()&&""==d)return z;if(t&&""==d&&(i.includesCredentials()||null!==i.port))return;if(l=i.parseHost(d),l)return l;if(d="",u=Ce,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),d+=a}else{if(""==d)return z;if(l=i.parseHost(d),l)return l;if(d="",u=Ie,t==_e)return}break;case Ie:if(!R(X,a)){if(a==o||"/"==a||"?"==a||"#"==a||"\\"==a&&i.isSpecial()||t){if(""!=d){var k=D(d,10);if(k>65535)return W;i.port=i.isSpecial()&&k===fe[i.scheme]?null:k,d=""}if(t)return;u=Ce;continue}return W}d+=a;break;case xe:if(i.scheme="file","/"==a||"\\"==a)u=Re;else{if(!n||"file"!=n.scheme){u=Ae;continue}if(a==o)i.host=n.host,i.path=O(n.path),i.query=n.query;else if("?"==a)i.host=n.host,i.path=O(n.path),i.query="",u=Le;else{if("#"!=a){Oe(B(O(r,s),""))||(i.host=n.host,i.path=O(n.path),i.shortenPath()),u=Ae;continue}i.host=n.host,i.path=O(n.path),i.query=n.query,i.fragment="",u=Pe}}break;case Re:if("/"==a||"\\"==a){u=Be;break}n&&"file"==n.scheme&&!Oe(B(O(r,s),""))&&(me(n.path[0],!0)?U(i.path,n.path[0]):i.host=n.host),u=Ae;continue;case Be:if(a==o||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&me(d))u=Ae;else if(""==d){if(i.host="",t)return;u=Ce}else{if(l=i.parseHost(d),l)return l;if("localhost"==i.host&&(i.host=""),t)return;d="",u=Ce}continue}d+=a;break;case Ce:if(i.isSpecial()){if(u=Ae,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=o&&(u=Ae,"/"!=a))continue}else i.fragment="",u=Pe;else i.query="",u=Le;break;case Ae:if(a==o||"/"==a||"\\"==a&&i.isSpecial()||!t&&("?"==a||"#"==a)){if(he(d)?(i.shortenPath(),"/"==a||"\\"==a&&i.isSpecial()||U(i.path,"")):je(d)?"/"==a||"\\"==a&&i.isSpecial()||U(i.path,""):("file"==i.scheme&&!i.path.length&&me(d)&&(i.host&&(i.host=""),d=x(d,0)+":"),U(i.path,d)),d="","file"==i.scheme&&(a==o||"?"==a||"#"==a))while(i.path.length>1&&""===i.path[0])P(i.path);"?"==a?(i.query="",u=Le):"#"==a&&(i.fragment="",u=Pe)}else d+=pe(a,de);break;case Ue:"?"==a?(i.query="",u=Le):"#"==a?(i.fragment="",u=Pe):a!=o&&(i.path[0]+=pe(a,ue));break;case Le:t||"#"!=a?a!=o&&("'"==a&&i.isSpecial()?i.query+="%27":i.query+="#"==a?"%23":pe(a,ue)):(i.fragment="",u=Pe);break;case Pe:a!=o&&(i.fragment+=pe(a,se));break}s++}},parseHost:function(e){var t,n,o;if("["==x(e,0)){if("]"!=x(e,e.length-1))return z;if(t=ce(M(e,1,-1)),!t)return z;this.host=t}else if(this.isSpecial()){if(e=h(e),R(te,e))return z;if(t=ae(e),null===t)return z;this.host=t}else{if(R(ne,e))return z;for(t="",n=m(e),o=0;o<n.length;o++)t+=pe(n[o],ue);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return p(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&me(e[0],!0)||e.length--},serialize:function(){var e=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+="//",e.includesCredentials()&&(u+=n+(o?":"+o:"")+"@"),u+=ie(r),null!==a&&(u+=":"+a)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?c[0]:c.length?"/"+B(c,"/"):"",null!==l&&(u+="?"+l),null!==i&&(u+="#"+i),u},setHref:function(e){var t=this.parse(e);if(t)throw T(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Me(e.path[0]).origin}catch(n){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(g(e)+":",ge)},getUsername:function(){return this.username},setUsername:function(e){var t=m(g(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=pe(t[n],be)}},getPassword:function(){return this.password},setPassword:function(e){var t=m(g(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=pe(t[n],be)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,De)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,_e)},getPort:function(){var e=this.port;return null===e?"":g(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=g(e),""==e?this.port=null:this.parse(e,Ie))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+B(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ce))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=g(e),""==e?this.query=null:("?"==x(e,0)&&(e=M(e,1)),this.query="",this.parse(e,Le)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){e=g(e),""!=e?("#"==x(e,0)&&(e=M(e,1)),this.fragment="",this.parse(e,Pe)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Me=function(e){var t=b(this,Fe),n=arguments.length>1?arguments[1]:void 0,o=w(t,new $e(e,!1,n));a||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},Fe=Me.prototype,He=function(e,t){return{get:function(){return E(this)[e]()},set:t&&function(e){return E(this)[t](e)},configurable:!0,enumerable:!0}};if(a&&s(Fe,{href:He("serialize","setHref"),origin:He("getOrigin"),protocol:He("getProtocol","setProtocol"),username:He("getUsername","setUsername"),password:He("getPassword","setPassword"),host:He("getHost","setHost"),hostname:He("getHostname","setHostname"),port:He("getPort","setPort"),pathname:He("getPathname","setPathname"),search:He("getSearch","setSearch"),searchParams:He("getSearchParams"),hash:He("getHash","setHash")}),d(Fe,"toJSON",(function(){return E(this).serialize()}),{enumerable:!0}),d(Fe,"toString",(function(){return E(this).serialize()}),{enumerable:!0}),V){var qe=V.createObjectURL,Ge=V.revokeObjectURL;qe&&d(Me,"createObjectURL",i(qe,V)),Ge&&d(Me,"revokeObjectURL",i(Ge,V))}y(Me,"URL"),r({global:!0,forced:!c,sham:!a},{URL:Me})},"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 C=V()(B,[["__scopeId","data-v-1a5282f6"]]);var A=C,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"},P={class:"weather-table"},$=U((function(){return Object(r["createElementVNode"])("th",null,null,-1)})),M={class:"weather-th"},F=["src","alt","title"],H={class:"weather-th"},q=["src","alt","title"],G=["alt","title"],z=["alt","title"],W=["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",P,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[$,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",H,[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,q)])])])]),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,G)]),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,W)]),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"])(A,{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"])(A,{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"])(A,{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"])(A,{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,Ce=n("e94f"),Ae=n("5afd"),Ue=n("dad5"),Le=n("2906"),Pe=n("d257"),$e={id:"workout-map"},Me={key:0,class:"leaflet-container"},Fe={key:1},He={key:0,class:"leaflet-container"},qe={key:1,class:"no-map"},Ge=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(Ce["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",$e,[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",He,[Object(r["unref"])(d).jsonData&&Object(r["unref"])(s)&&2===Object(r["unref"])(i).length?(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["unref"])(Ae["b"]),{key:0,zoom:13,center:Object(r["unref"])(s),bounds:Object(r["unref"])(i),ref_key:"workoutMap",ref:l,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"])(Ae["d"]),{url:"".concat(Object(r["unref"])(Pe["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"])(Ae["a"]),{geojson:Object(r["unref"])(d).jsonData},null,8,["geojson"]),Object(r["unref"])(c).latitude?(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["unref"])(Ae["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",qe,Object(r["toDisplayString"])(e.$t("workouts.NO_MAP")),1))]))])}}});n("58a2");const ze=V()(Ge,[["__scopeId","data-v-3ee4aadc"]]);var We=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"])(We,{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 Ct=V()(Bt,[["__scopeId","data-v-d146d84a"]]);t["default"]=Ct},"30e0":function(e,t,n){},3450:function(e,t,n){},"3bd0":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 C})),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 C={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 A={...g,latLngs:{type:Array,default:()=>[]},smoothFactor:{type:Number,custom:!0,default:1},noClip:{type:Boolean,custom:!0,default:!1}},U={...A};const L={...p,content:{type:String,default:null}};const P={...D,tms:{type:Boolean,default:!1},subdomains:{type:String,default:"abc"},detectRetina:{type:Boolean,default:!1},url:{type:String,default:null}},$=(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:P,setup(e,t){const r=Object(o["ref"])({}),a=Object(o["inject"])(b),i=Object(o["inject"])("addLayer"),{options:u,methods:s}=$(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"},C=["disabled"],A=["disabled"],U={class:"form-item"},L=["disabled"],P=Object(r["createTextVNode"])(" : "),$=["disabled"],M=Object(r["createTextVNode"])(" : "),F=["disabled"],H={class:"form-item"},q=["disabled"],G={class:"form-item"},z={key:1},W={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,"is_active_for_user",te.value.id?[te.value.sport_id]:[])})),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,C),[[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,A),[[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]]),P,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,$),[[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",H,[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,q),[[r["vModelText"],Object(r["unref"])(se).workoutDistance]])])])),Object(r["createElementVNode"])("div",G,[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",W,[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("e18c"),n("6b0d")),Y=n.n(J);const Q=Y()(X,[["__scopeId","data-v-22f139f6"]]);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;e=n?y(e/s):e>>1,e+=y(e/t);while(e>j*i>>1)e=y(e/j),o+=c;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){var N=s,S=c;while(1){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),S+=c}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"),C=a("Request"),A=a("Headers"),U=C&&C.prototype,L=A&&A.prototype,P=r.RegExp,$=r.TypeError,M=r.decodeURIComponent,F=r.encodeURIComponent,H=l("".charAt),q=l([].join),G=l([].push),z=l("".replace),W=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]=P("((?:%[\\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(e<t)throw $("Not enough arguments")},le=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}),!0),ie=function(e){this.entries=[],this.url=null,void 0!==e&&(y(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===H(e,0)?X(e,1):e:v(e)))};ie.prototype={type:D,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,o,r,a,l,i,u=N(e);if(u){t=E(e,u),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 $("Expected sequence with length 2");G(this.entries,{key:v(l.value),value:v(i.value)})}}else for(var s in e)O(e,s)&&G(this.entries,{key:s,value:v(e[s])})},parseQuery:function(e){if(e){var t,n,o=Z(e,"&"),r=0;while(r<o.length)t=o[r++],t.length&&(n=Z(t,"="),G(this.entries,{key:te(W(n)),value:te(q(n,"="))}))}},serialize:function(){var e,t=this.entries,n=[],o=0;while(o<t.length)e=t[o++],G(n,ae(e.key)+"="+ae(e.value));return q(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ue=function(){f(this,se);var e=arguments.length>0?arguments[0]:void 0;I(this,new ie(e))},se=ue.prototype;if(s(se,{append:function(e,t){ce(arguments.length,2);var n=x(this);G(n.entries,{key:v(e),value:v(t)}),n.updateURL()},delete:function(e){ce(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){ce(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){ce(arguments.length,1);for(var t=x(this).entries,n=v(e),o=[],r=0;r<t.length;r++)t[r].key===n&&G(o,t[r].value);return o},has:function(e){ce(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){ce(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||G(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 le(this,"keys")},values:function(){return new le(this,"values")},entries:function(){return new le(this,"entries")}},{enumerable:!0}),u(se,T,se.entries,{name:"entries"}),u(se,"toString",(function(){return x(this).serialize()}),{enumerable:!0}),d(ue,D),o({global:!0,forced:!i},{URLSearchParams:ue}),!i&&m(A)){var de=l(L.has),be=l(L.set),pe=function(e){if(y(e)){var t,n=e.body;if(h(n)===D)return t=e.headers?new A(e.headers):new A,de(t,"content-type")||be(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?pe(arguments[1]):{})}}),m(C)){var fe=function(e){return f(this,U),new C(e,arguments.length>1?pe(arguments[1]):{})};U.constructor=fe,fe.prototype=U,o({global:!0,forced:!0},{Request:fe})}}e.exports={URLSearchParams:ue,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")},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")},e18c:function(e,t,n){"use strict";n("3bd0")},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})}))}}]);
//# sourceMappingURL=workouts.29d99435.js.map