diff --git a/_includes/calculate-vam.html b/_includes/calculate-vam.html new file mode 100644 index 000000000000..506dd1c73913 --- /dev/null +++ b/_includes/calculate-vam.html @@ -0,0 +1,24 @@ +
diff --git a/_posts/2024-07-23-vam.md b/_posts/2024-07-23-vam.md new file mode 100644 index 000000000000..dc64f27ea6f0 --- /dev/null +++ b/_posts/2024-07-23-vam.md @@ -0,0 +1,74 @@ +--- +title: &title "Hvor hurtigt cykler du op ad? VAM - Velocità Ascensionale Media" +seo_title: &title "Hvor hurtigt cykler du op ad? VAM - Velocità Ascensionale Media" +permalink: /vam/ +description: "VAM er en måde at måle, hvor hurtigt du cykler lodret op, så du kan sammenligne dig med de bedste klatrere i verden." +excerpt: "VAM er en måde at måle, hvor hurtigt du cykler lodret op, så du kan sammenligne dig med de bedste klatrere i verden." +language: da +header: + teaser: https://images.unsplash.com/photo-1534787238916-9ba6764efd4f?q=10&w=400&h=300&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D + caption: *title +category: + - Træning +tags: + - kondition + - cykling +last_modified_at: 2024-07-11T10:14:14Z +faq: + - question: "Hvad er VAM?" + answer: "VAM står for Velocità Ascensionale Media. På engelsk kan det oversættes til _vertical ascent in meters_, hvilket betyder hvor mange meter en cyklist klatrer lodret i timen." + - question: "Rekorder og watt i cykling" + answer: "På [@WattsinCycling](https://x.com/WattsinCycling) kan du følge med i de vilde rekorder der bliver kørt i øjeblikket i cykling." +--- + +VAM står for Velocità Ascensionale Media. På engelsk kan det oversættes til _vertical ascent in meters_, hvilket betyder hvor mange meter en cyklist klatrer lodret i timen. + +VAM er udarbejdet af den berømte dopinglæge Michelle Ferrari, som havde brug for et mål, der fortalte noget om den enkeltes evner. VAM kan stadig bruges til at sammenligne cykelryttere, og hvor dygtige de er til at klatre. + +VAM er et simpelt mål for hvor hurtigt du kommer lodret op. Det er bare dig og cyklen mod tyngdekraften, og jo højere tal, jo bedre. + +## Beregner til VAM + +{% include calculate-vam.html %} + +## Hvordan udregner jeg VAM? + +Hvis du har taget tid på en stigning og ved hvor mange lodrette meter stigningen er, så kan du selv udregne VAM. + +Du kan udregne VAM med følgende formel: + +{% include math formula="VAM (m/t) = \frac{vertical distance klatret (m) * 60 (min/t)}{tid (min)}" %} + +Det er altså relativt enkelt at udregne din egen VAM. + +Når du har din VAM, så kan du også udregne din egen relative _power_ (watt/kg) ud fra tallene. Det kræver bare, at du kender den gennemsnitlige hældning på stigningen. + +{% include math formula="Gradient Factor = 2 + \frac{stigning (%)}{10}" %} + +Derved kan du udregne din relative power: + +{% include math formula="Relativ Power (watt/kg) = \frac{VAM (m/t)}{Gradient Factor * 100*}" %} + +Læg mærke til, at den relative power ikke tager højde for vindforhold og rullemodstand, men er baseret på Michelle Ferraris måde at sammenligne ryttere. Fordelen ved denne måde at opgøre det på er at det er utrolig enkelt,o g det kommer ikke så langt væk fra andre tal. + +## Eksempel fra Tour de France 2024 + ++ +## Hvordan finder jeg ellers VAM? + +På fx Strava kan du finde din VAM på forskellige segmenter, hvis du går ind på en aktivitet. + +Jeg har fx kørt op af Tabayesco på Lanzarote. Du går først ind på aktiviteten. + +{% include figure image_path="/assets/images/blog/vam-strava-1.jpg" %} + +Herfra kan du scrolle ned til segments, og der finder du så din VAM. + +{% include figure image_path="/assets/images/blog/vam-strava-2.jpg" %} + +Jeg har undret mig lidt over, at jeg ikke har fået et tilbud fra et professionelt cykelhold, men når jeg kigger på tallene, så kan jeg godt se, at der er lidt op til de vanvittige tal de bedste klatrere i verden kører lige nu. + +## Ofte stillede spørgsmål + +{% include faq.html %} \ No newline at end of file diff --git a/assets/images/blog/vam-strava-1.jpg b/assets/images/blog/vam-strava-1.jpg new file mode 100644 index 000000000000..072d79355f08 Binary files /dev/null and b/assets/images/blog/vam-strava-1.jpg differ diff --git a/assets/images/blog/vam-strava-2.jpg b/assets/images/blog/vam-strava-2.jpg new file mode 100644 index 000000000000..0e0375dd4854 Binary files /dev/null and b/assets/images/blog/vam-strava-2.jpg differ diff --git a/_posts/image.png b/assets/images/image.png similarity index 100% rename from _posts/image.png rename to assets/images/image.png diff --git a/assets/js/bundle.js b/assets/js/bundle.js index 1bd8ba3e347e..02a1b92eedc8 100644 --- a/assets/js/bundle.js +++ b/assets/js/bundle.js @@ -11,9 +11,9 @@ let motionsplan={Estimate1RM:function(t,e=5){function n(t="lower",e=1){return"lo let motionsplan={AndersenTest:function(e,n,t,o="andersen_2008"){function r(){return"aadland_2014"==o?23.262+.05*n-3.858*e-.376*t:18.38+.03301*n-5.92*e}return e="female"==e?1:0,n=n,{getFitnessLevel:r,getVO2max:function(){return t*r()/1e3}}}};module.exports=motionsplan; },{}],5:[function(require,module,exports){ -"use strict";const rpe=require("./rpe-strength"),how_tall=require("./how-tall"),water=require("./water-intake"),inol=require("./inol"),ipfpoints=require("./ipf-points"),mcculloch=require("./ipf-points-mcculloch"),ybalance=require("./y-balance"),lung=require("./lung"),blood=require("./blood"),andersen=require("./andersen-test"),jog=require("./fitness-jogging"),jump_reach=require("./jumpreach"),tee_pal=require("./bmr-totalenergy-pal"),schofield=require("./bmr-schofield"),vmax_bike=require("./vmax"),vmax_intervals=require("./vmax-intervals"),billat=require("./billat"),runwalk=require("./running-walking"),runwalkenergy=require("./running-walking-energy.js"),pandolf=require("./running-walking-pandolf.js"),leger=require("./running-walking-leger.js"),pushup=require("./pushup"),yyir1=require("./beeptest-yyir1"),beeptest=require("./beeptest"),fitness=require("./fitness-hr"),maxhr=require("./max-hr"),cooper=require("./cooper"),cooper_test=require("./cooper-running"),running_weightchange=require("./running-weightloss"),riegel=require("./riegel"),fat=require("./fat-pct"),fp_navy=require("./fat-pct-navy"),fatm=require("./fat-pct-measurements"),rm=require("./1rm"),etpunkt=require("./etpunkttest"),borg15=require("./borg15"),topunkt=require("./topunkttest"),bmr_benedict_harris=require("./bmr-benedict-harris"),bmr_equilibrium=require("./bmr-ligevaegt"),ree=require("./bmr-nordic-2012"),bmi=require("./bmi"),bmievaluation=require("./bmi-evaluation"),ponderalindex=require("./ponderal-index"),idealweight=require("./ideal-weight"),karvonen=require("./karvonen"),index23=require("./fitness-index-23"),running=require("./running"),running_distance_vo2=require("./running-distance-vo2"),running_economy=require("./running-economy"),index100=require("./index100"),skinfold_durnin=require("./skinfold-durnin"),skinfold_peterson=require("./skinfold-peterson"),skinfold_pollock=require("./skinfold-pollock"),skinfold_lohman=require("./skinfold-lohman"),skinfold_slaughter=require("./skinfold-slaughter"),rockport=require("../js/walktest-rockport-16"),walktest_sixminutes=require("../js/walktest-sixminutes"),fatenergypct=require("../js/fatenergypct"),whr=require("../js/waist"),tbw=require("../js/bodywater"),wattmax=require("../js/wattmax"),hr_intensity=require("../js/hr-intensity"),wilks=require("wilks-calculator"),treadmill=require("../js/treadmill"),flyer_handicap=require("../js/flyer-handicap"),rowing_power_calculator=require("../js/rowing-power-calculator"),rowing_vo2=require("../js/rowing-vo2"),rowing_powerprofile=require("../js/rowing-ergrowing"),rer=require("../js/rer");require("image-map-resizer"),$(function(){$("map").imageMapResize(),$('.rating input[name="rating"]').one("click",function(){console.log("Clicked star");let e=Number(1*$("#votes").text());$("#votes").text(e+1)}),$("#target_bmi_man").change(function(){console.log("Ready to calculate"),$("table#idealweight > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html(),n=Number($("#target_bmi_man").val()),l=idealweight.IdealWeight(t,"man").getPeterson(n);$(this).find("td").eq(1).html(l.toFixed(0))})}),$("#maxhr_age").change(function(){console.log("Ready to calculate");let e=Number($("#maxhr_age").val()),a=maxhr.EstimateMaxHr(e,"tanaka");$("#maxhr_tanaka").text(a.getMaxHr().toFixed(0));let t=maxhr.EstimateMaxHr(e,"fox");$("#maxhr_fox").text(t.getMaxHr().toFixed(0));let n=maxhr.EstimateMaxHr(e,"gellish_linear");$("#maxhr_gellish_linear").text(n.getMaxHr().toFixed(0));let l=maxhr.EstimateMaxHr(e,"gellish");$("#maxhr_gellish").text(l.getMaxHr().toFixed(0));let r=maxhr.EstimateMaxHr(e,"nes");$("#maxhr_nes").text(r.getMaxHr().toFixed(0));let o=maxhr.EstimateMaxHr(e,"arena");$("#maxhr_arena").text(o.getMaxHr().toFixed(0));let i=maxhr.EstimateMaxHr(e,"aastrand");$("#maxhr_aastrand").text(i.getMaxHr().toFixed(0));let m=maxhr.EstimateMaxHr(e,"inbar");$("#maxhr_inbar").text(m.getMaxHr().toFixed(0));let u=maxhr.EstimateMaxHr(e,"londeree_moeschberger");$("#maxhr_londeree_moeschberger").text(u.getMaxHr().toFixed(0))}),$("#maxhr_age_men_women").change(function(){console.log("Ready to calculate");let e=Number($("#maxhr_age_men_women").val()),a=maxhr.EstimateMaxHr(e,"fairbarn_female");$("#maxhr_fairbarn_female").text(a.getMaxHr().toFixed(0));let t=maxhr.EstimateMaxHr(e,"fairbarn_male");$("#maxhr_fairbarn_male").text(t.getMaxHr().toFixed(0));let n=maxhr.EstimateMaxHr(e,"whyte_female");$("#maxhr_whyte_female").text(n.getMaxHr().toFixed(0));let l=maxhr.EstimateMaxHr(e,"whyte_male");$("#maxhr_whyte_male").text(l.getMaxHr().toFixed(0))}),$("#target_bmi_woman").change(function(){console.log("Ready to calculate"),$("table#idealweight > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html(),n=Number($("#target_bmi_woman").val()),l=idealweight.IdealWeight(t,"woman").getPeterson(n);$(this).find("td").eq(2).html(l.toFixed(0))})}),$("#smolov_jr").submit(function(e){console.log("Calculate 1RM"),e.preventDefault()}),$("#smolov_jr").change(function(){console.log("Ready to calculate Smolov Jr");let e=Number($("#one_rep_max").val());$("table#smolov_jr_week_1 > tbody > tr").each(function(a,t){let n=$(this).find("td").eq(1).html().replace(/[^0-9]/g,""),l=e*n/100;console.log(e+" "+n+" "+l),$(this).find("td").eq(4).html(l.toFixed(2))}),$("table#smolov_jr_week_2 > tbody > tr").each(function(a,t){let n=Number($("#increment_1").val()),l=$(this).find("td").eq(1).html().replace(/[^0-9]/g,""),r=e*l/100+n;console.log(e+" "+l+" "+r),$(this).find("td").eq(2).html("+"+n.toFixed(1)+" kg"),$(this).find("td").eq(5).html(r.toFixed(2))}),$("table#smolov_jr_week_3 > tbody > tr").each(function(a,t){let n=Number($("#increment_1").val()),l=Number($("#increment_2").val()),r=$(this).find("td").eq(1).html().replace(/[^0-9]/g,""),o=e*(r/100)+n+l;console.log(e+" "+r+" "+o),$(this).find("td").eq(2).html("+"+l.toFixed(1)+" kg"),$(this).find("td").eq(5).html(o.toFixed(2))})}),$("#step_man").change(function(){console.log("Ready to calculate"),$("table#steps > tbody > tr").each(function(e,a){let t=1e3*$(this).find("td:first").html()/($("#step_man").val()/100);$(this).find("td").eq(1).html(t.toFixed(0))})}),$("#step_woman").change(function(){console.log("Ready to calculate"),$("table#steps > tbody > tr").each(function(e,a){let t=1e3*$(this).find("td:first").html()/($("#step_woman").val()/100);$(this).find("td").eq(2).html(t.toFixed(0))})}),$("#step_length_man").change(function(){console.log("Ready to calculate"),$("table#steps_to_km > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html()*$("#step_length_man").val()/1e3/100;$(this).find("td").eq(1).html(t.toFixed(2))})}),$("#step_length_woman").change(function(){console.log("Ready to calculate"),$("table#steps_to_km > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html()*$("#step_length_woman").val()/1e3/100;$(this).find("td").eq(2).html(t.toFixed(2))})}),$("#form-formula").ready(function(){$(".reynolds").hide()}),$("#form-formula").change(function(){"reynolds"==$("#form-formula").val()?$(".reynolds").show():$(".reynolds").hide()}),$("#calculator_running_walking").ready(function(){$(".walk-met").hide(),$(".run-met").hide(),$(".met-explanation").hide()}),$("#calculator_walking_energy").ready(function(){$(".walk-met").hide(),$(".met-explanation").hide(),$(".walk-pandolf").hide()}),$("#bmi-evaluation-criteria").ready(function(){$("#bmi-evaluation-criteria").hide()}),$("#calculator_bmi").change(function(){Number($("[name='age']").val())<18?$("#bmi-evaluation-criteria").hide():$("#bmi-evaluation-criteria").show()}),$("#calculator_running_walking").change(function(){"met"==$("#formula-energy-running").val()?($(".run-met").show(),$(".met-explanation").show(),$(".run-ascm").hide()):($(".run-met").hide(),$(".run-ascm").show()),"met"==$("#formula-energy-walking").val()?($(".walk-met").show(),$(".met-explanation").show(),$(".walk-ascm").hide()):($(".walk-met").hide(),$(".walk-ascm").show())}),$("#calculator_walking_energy").change(function(){"met"==$("#formula-walking-energy").val()?($(".walk-met").show(),$(".met-explanation").show(),$(".walk-ascm").hide(),$(".walk-pandolf").hide()):"pandolf"==$("#formula-walking-energy").val()?($(".walk-ascm").show(),$(".walk-met").hide(),$(".met-explanation").hide(),$(".walk-pandolf").show()):($(".walk-met").hide(),$(".walk-ascm").show(),$(".met-explanation").hide(),$(".walk-pandolf").hide())}),$("#calculator_rm").submit(function(e){let a;console.log("Calculate 1RM"),e.preventDefault();let t=$("#form-formula").val(),n=Number($("#form-reps").val()),l=Number($("#form-weight").val()),r=$("#form-bodypart").val(),o=rm.Estimate1RM(l,n);"brzycki"==t?(a=o.getBrzycki(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getBrzycki(2).toFixed(1)),$("#rm3").val(o.getBrzycki(3).toFixed(1)),$("#rm4").val(o.getBrzycki(4).toFixed(1)),$("#rm5").val(o.getBrzycki(5).toFixed(1)),$("#rm6").val(o.getBrzycki(6).toFixed(1)),$("#rm8").val(o.getBrzycki(8).toFixed(1)),$("#rm10").val(o.getBrzycki(10).toFixed(1)),$("#rm12").val(o.getBrzycki(12).toFixed(1)),$("#rm15").val(o.getBrzycki(15).toFixed(1))):"reynolds"==t?(a=o.getReynolds(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getReynolds(r,2).toFixed(1)),$("#rm3").val(o.getReynolds(r,3).toFixed(1)),$("#rm4").val(o.getReynolds(r,4).toFixed(1)),$("#rm5").val(o.getReynolds(r,5).toFixed(1)),$("#rm6").val(o.getReynolds(r,6).toFixed(1)),$("#rm8").val(o.getReynolds(r,8).toFixed(1)),$("#rm10").val(o.getReynolds(r,10).toFixed(1)),$("#rm12").val(o.getReynolds(r,12).toFixed(1)),$("#rm15").val(o.getReynolds(r,15).toFixed(1))):"epley"==t?(a=o.getEpley(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getEpley(2).toFixed(1)),$("#rm3").val(o.getEpley(3).toFixed(1)),$("#rm4").val(o.getEpley(4).toFixed(1)),$("#rm5").val(o.getEpley(5).toFixed(1)),$("#rm6").val(o.getEpley(6).toFixed(1)),$("#rm8").val(o.getEpley(8).toFixed(1)),$("#rm10").val(o.getEpley(10).toFixed(1)),$("#rm12").val(o.getEpley(12).toFixed(1)),$("#rm15").val(o.getEpley(15).toFixed(1))):"lander"==t?(a=o.getLander(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getLander(2).toFixed(1)),$("#rm3").val(o.getLander(3).toFixed(1)),$("#rm4").val(o.getLander(4).toFixed(1)),$("#rm5").val(o.getLander(5).toFixed(1)),$("#rm6").val(o.getLander(6).toFixed(1)),$("#rm8").val(o.getLander(8).toFixed(1)),$("#rm10").val(o.getLander(10).toFixed(1)),$("#rm12").val(o.getLander(12).toFixed(1)),$("#rm15").val(o.getLander(15).toFixed(1))):"lombardi"==t?(a=o.getLombardi(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getLombardi(2).toFixed(1)),$("#rm3").val(o.getLombardi(3).toFixed(1)),$("#rm4").val(o.getLombardi(4).toFixed(1)),$("#rm5").val(o.getLombardi(5).toFixed(1)),$("#rm6").val(o.getLombardi(6).toFixed(1)),$("#rm8").val(o.getLombardi(8).toFixed(1)),$("#rm10").val(o.getLombardi(10).toFixed(1)),$("#rm12").val(o.getLombardi(12).toFixed(1)),$("#rm15").val(o.getLombardi(15).toFixed(1))):"mayhew"==t?(a=o.getMayhew(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getMayhew(2).toFixed(1)),$("#rm3").val(o.getMayhew(3).toFixed(1)),$("#rm4").val(o.getMayhew(4).toFixed(1)),$("#rm5").val(o.getMayhew(5).toFixed(1)),$("#rm6").val(o.getMayhew(6).toFixed(1)),$("#rm8").val(o.getMayhew(8).toFixed(1)),$("#rm10").val(o.getMayhew(10).toFixed(1)),$("#rm12").val(o.getMayhew(12).toFixed(1)),$("#rm15").val(o.getMayhew(15).toFixed(1))):"oconnor"==t?(a=o.getOconnor(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getOconnor(2).toFixed(1)),$("#rm3").val(o.getOconnor(3).toFixed(1)),$("#rm4").val(o.getOconnor(4).toFixed(1)),$("#rm5").val(o.getOconnor(5).toFixed(1)),$("#rm6").val(o.getOconnor(6).toFixed(1)),$("#rm8").val(o.getOconnor(8).toFixed(1)),$("#rm10").val(o.getOconnor(10).toFixed(1)),$("#rm12").val(o.getOconnor(12).toFixed(1)),$("#rm15").val(o.getOconnor(15).toFixed(1))):"wathan"==t?(a=o.getWathan(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getWathan(2).toFixed(1)),$("#rm3").val(o.getWathan(3).toFixed(1)),$("#rm4").val(o.getWathan(4).toFixed(1)),$("#rm5").val(o.getWathan(5).toFixed(1)),$("#rm6").val(o.getWathan(6).toFixed(1)),$("#rm8").val(o.getWathan(8).toFixed(1)),$("#rm10").val(o.getWathan(10).toFixed(1)),$("#rm12").val(o.getWathan(12).toFixed(1)),$("#rm15").val(o.getWathan(15).toFixed(1))):"wendler"==t&&(a=o.getWendler(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getWendler(2).toFixed(1)),$("#rm3").val(o.getWendler(3).toFixed(1)),$("#rm4").val(o.getWendler(4).toFixed(1)),$("#rm5").val(o.getWendler(5).toFixed(1)),$("#rm6").val(o.getWendler(6).toFixed(1)),$("#rm8").val(o.getWendler(8).toFixed(1)),$("#rm10").val(o.getWendler(10).toFixed(1)),$("#rm12").val(o.getWendler(12).toFixed(1)),$("#rm15").val(o.getWendler(15).toFixed(1))),$("#p100").val(o.getPercentOfRm(a,100).toFixed(1)),$("#p95").val(o.getPercentOfRm(a,95).toFixed(1)),$("#p90").val(o.getPercentOfRm(a,90).toFixed(1)),$("#p85").val(o.getPercentOfRm(a,85).toFixed(1)),$("#p80").val(o.getPercentOfRm(a,80).toFixed(1)),$("#p75").val(o.getPercentOfRm(a,75).toFixed(1)),$("#p70").val(o.getPercentOfRm(a,70).toFixed(1)),$("#p60").val(o.getPercentOfRm(a,60).toFixed(1)),$("#p50").val(o.getPercentOfRm(a,50).toFixed(1)),$("#p40").val(o.getPercentOfRm(a,40).toFixed(1))}),$("#calculator_ftp").submit(function(e){console.log("Calculate FTP"),e.preventDefault();let a=Number($("#ftp").val());$("#ftp_value").text(a),$("#ftp_recovery").val("<"+(.56*a).toFixed(0)),$("#ftp_endurance").val((.56*a).toFixed(0)+"-"+(.76*a).toFixed(0)),$("#ftp_tempo").val((.76*a).toFixed(0)+"-"+(.91*a).toFixed(0)),$("#ftp_ftp").val((.91*a).toFixed(0)+"-"+(1.06*a).toFixed(0)),$("#ftp_vo2").val((1.06*a).toFixed(0)+"-"+(1.21*a).toFixed(0)),$("#ftp_anaerob").val((1.21*a).toFixed(0)+"-"+(1.5*a).toFixed(0))}),$("#calculator_ftp_cp").submit(function(e){console.log("Calculate FTP CP"),e.preventDefault();let a=Number($("#zone_cp").val())*Number($("#zone_adjust").val())/100;$("#ftp_value").text(a.toFixed(0)),$("#ftp_recovery").val("<"+(.56*a).toFixed(0)),$("#ftp_endurance").val((.56*a).toFixed(0)+"-"+(.76*a).toFixed(0)),$("#ftp_tempo").val((.76*a).toFixed(0)+"-"+(.91*a).toFixed(0)),$("#ftp_ftp").val((.91*a).toFixed(0)+"-"+(1.06*a).toFixed(0)),$("#ftp_vo2").val((1.06*a).toFixed(0)+"-"+(1.21*a).toFixed(0)),$("#ftp_anaerob").val((1.21*a).toFixed(0)+"-"+(1.5*a).toFixed(0))}),$("#calculator_ftpa").submit(function(e){console.log("Calculate FTPa"),e.preventDefault();let a=Number($("#ftpa").val());$("#ftpa_value").text(a),$("#ftpa_recovery").val("<"+(1.29*a).toFixed(0)),$("#ftpa_endurance").val((1.14*a).toFixed(0)+"-"+(1.29*a).toFixed(0)),$("#ftpa_tempo").val((1.06*a).toFixed(0)+"-"+(1.14*a).toFixed(0)),$("#ftpa_ftp").val((1.01*a).toFixed(0)+"-"+(1.05*a).toFixed(0)),$("#ftpa_vo2").val((.97*a).toFixed(0)+"-"+(1.01*a).toFixed(0)),$("#ftpa_anaerob").val((.9*a).toFixed(0)+"-"+(.97*a).toFixed(0))}),$("#calculator_koffein").submit(function(e){console.log("Calculate Koffein"),e.preventDefault();let a=$("#body_weight").val(),t=$("#koffein_intake_kg").val()*a;$("#koffein_intake").val(t)}),$("#calculator_kreatin").submit(function(e){console.log("Calculate Kreatin"),e.preventDefault();let a=$("#body_weight").val(),t=$("#kreatin_intake_kg").val()*a;$("#kreatin_intake").val(t)}),$("#calculator_kroppens_rumfang").submit(function(e){console.log("Calculate Kroppens Rumfang"),e.preventDefault();let a=Number($("[name='weight']").val()),t=Number($("[name='density']").val());$("[name='kroppens_rumfang']").val((a/t).toFixed(5))}),$("#calculator_rpe_strength").submit(function(e){console.log("Calculate RPE Strength"),e.preventDefault();let a=Number($("[name='have_weight']").val()),t=Number($("[name='have_reps']").val()),n=Number($("[name='have_rpe']").val()),l=Number($("[name='want_reps']").val()),r=Number($("[name='want_rpe']").val()),o=rpe.RPEStrength(a,t,n);$("[name='e1rm']").val(o.getE1RM().toFixed(1)),$("[name='want_weight']").val(o.getWantWeight(l,r).toFixed(1))}),$("#calculator_fat_bai").submit(function(e){console.log("Calculate BAI"),e.preventDefault();let a=Number($("[name='hc']").val()),t=Number($("[name='hm']").val()/100),n=a/Math.pow(t,1.5)-18;$("[name='bai']").val(n.toFixed(1))}),$("#calculator_maffetone").submit(function(e){console.log("Calculate Maffetone"),e.preventDefault();let a=Number($("[name='age']").val()),t=Number($("[name='category']:checked").val());$("[name='mahr']").val((180-a+t).toFixed(0))}),$("#calculator_cooper_mortality").submit(function(e){console.log("Calculate Cooper"),e.preventDefault();let a=Number($("#age").val()),t=Number($("#hrrest").val()),n=$("#bloodpressure").val(),l=$("#diabetes").val(),r=$("#smoker").val(),o=Number($("#bmi").val()),i=Number($("#kondital").val()),m=cooper.CooperClinicMortalityRiskIndex(a,t,n,l,r,o,i);$("#risk_points").val(m.getRiskPoint()),$("#absolute_risk").val(m.getAbsoluteRisk()),$("#relative_risk").val(m.getRelativeRisk())}),$("#calculator_fat_percent_navy").ready(function(){$(".navy-hip").hide()}),$("#calculator_fat_percent_navy").change(function(){$("#checkbox-woman").is(":checked")?$(".navy-hip").show():$(".navy-hip").hide()}),$("#calculator_ybalance").submit(function(e){console.log("Y-balance"),e.preventDefault();let a=Number($("[name='limb_length']").val()),t=Number($("[name='anterior']").val()),n=Number($("[name='posterolateral']").val()),l=Number($("[name='posteromedial']").val()),r=ybalance.YBalance(t,n,l);$("[name='absolute_score']").val(r.getAbsoluteReachDistance().toFixed(0)),$("[name='relative_score']").val(r.getRelativeReachScore(a).toFixed(0)),$("[name='composite_score']").val(r.getCompositeReachScore(a).toFixed(0))}),$("#calculator_treadmill").submit(function(e){console.log("Treadmill"),e.preventDefault();let a=Number($("[name='gradient']").val()),t=Number($("[name='speed']").val()),n=Number($("[name='time']").val()),l=Number($("[name='distance']").val()),r=Number($("[name='weight']").val()),o=treadmill.Treadmill(a,t,n,l,r);$("[name='speed_gradient']").val(o.getGradientCorrectedSpeed().toFixed(2)),$("[name='distance_gradient']").val(o.getGradientCorrectedDistance().toFixed(2)),$("[name='time_gradient']").val(o.getGradientCorrectedDistance().toFixed(2)),$("[name='speed_calculated']").val(o.getSpeed().toFixed(0)),$("[name='distance_calculated']").val(o.getDistance().toFixed(0)),$("[name='time_calculated']").val(o.getTime().toFixed(0)),$("[name='kcal']").val(o.getKcal().toFixed(0)),$("[name='kj']").val(o.getKj().toFixed(0)),$("[name='kwh']").val(o.getKwh().toFixed(2)),$("[name='mets']").val(o.getMets().toFixed(1)),$("[name='gradient_calculated']").val(a)}),$("#calculator_fat_percent_navy").submit(function(e){console.log("Fat percent navy"),e.preventDefault();let a=$("[name='sex']:checked").val(),t=Number($("[name='height']").val()),n=Number($("[name='waist']").val()),l=Number($("[name='neck']").val()),r=Number($("[name='hip']").val()),o=fp_navy.CalculateFatPercentNavy(a,t,n,l,r);$("#fat_percent_navy").val(o.getFatPercent().toFixed(2))}),$("#calculator_wave_ladder").submit(function(e){console.log("Calculate Wave Ladder"),e.preventDefault();let a=Number($("[name='wave_ladder_1rm']").val()),t=Number($("[name='wave_ladder_intensity']").val()),n=Number($("[name='wave_ladder_2_plus']").val()),l=Number($("[name='wave_ladder_3_plus']").val()),r=a*t/100;$("#wave_ladder_1_1").val(r),$("#wave_ladder_1_2").val(r),$("#wave_ladder_1_3").val(r),$("#wave_ladder_2_1").val(r+n),$("#wave_ladder_2_2").val(r+n),$("#wave_ladder_2_3").val(r+n),$("#wave_ladder_3_1").val(r+n+l),$("#wave_ladder_3_2").val(r+n+l),$("#wave_ladder_3_3").val(r+n+l)}),$("#calculator_wave_traditional").submit(function(e){console.log("Calculate Wave Traditional"),e.preventDefault();let a=Number($("[name='wave_traditional_1rm']").val()),t=Number($("[name='wave_traditional_intensity_1']").val()),n=Number($("[name='wave_traditional_intensity_2']").val()),l=Number($("[name='wave_traditional_intensity_3']").val()),r=Number($("[name='wave_traditional_2_plus']").val()),o=Number($("[name='wave_traditional_3_plus']").val()),i=a*t/100,m=a*n/100,u=a*l/100;$("#wave_traditional_1_1").val(i),$("#wave_traditional_1_2").val(m),$("#wave_traditional_1_3").val(u),$("#wave_traditional_2_1").val(i+r),$("#wave_traditional_2_2").val(m+r),$("#wave_traditional_2_3").val(u+r),$("#wave_traditional_3_1").val(i+r+o),$("#wave_traditional_3_2").val(m+r+o),$("#wave_traditional_3_3").val(u+r+o)}),$("#calculator_step_to_km").submit(function(e){console.log("Steps to km"),e.preventDefault();let a=Number($("[name='steps']").val())*Number($("[name='step_to_km_step_length']").val())/1e5;$("#step_to_km_km").val(a)}),$("#calculator_kj_kcal").submit(function(e){console.log("kj to kcal"),e.preventDefault();let a=Number($("[name='kj_kcal_kj']").val())/4.184;$("[name='kj_kcal_kcal']").val(a.toFixed(2))}),$("#calculator_kcal_kj").submit(function(e){console.log("kcal to kj"),e.preventDefault();let a=4.184*Number($("[name='kcal_kj_kcal']").val());$("[name='kcal_kj_kj']").val(a.toFixed(2))}),$("#calculator_billat").submit(function(e){console.log("Billat"),e.preventDefault();let a=Number($("[name='distance']").val()),t=billat.Billat(a);$("#speed").val(t.getVelocity().toFixed(2)),$("#d30").val(t.getDistance30()),$("#r30").val(t.getRecovery30()),$("#d60").val(t.getDistance60()),$("#r60").val(t.getRecovery60()),$("#session").val(t.getDistance3min()),$("#mins").val(t.getMinutes3min()),$("#secs").val(t.getSeconds3min()),$("#secs400").val(t.getTimePr400Meter3min())}),$("[name='peterson_target_bmi']").change(function(){$("#calculator_idealweight").submit()}),$("[name='zacho_target_bmi']").change(function(){$("#calculator_idealweight").submit()}),$("#calculator_idealweight").submit(function(e){console.log("Idealweight"),e.preventDefault();let a=$("[name='sex']:checked").val(),t=Number($("[name='height']").val()),n=idealweight.IdealWeight(t,a);""==$("[name='zacho_target_bmi']").val()&&(n.isMale()?$("[name='zacho_target_bmi']").val(24.5):$("[name='zacho_target_bmi']").val(22.5));let l=Number($("[name='peterson_target_bmi']").val()),r=Number($("[name='zacho_target_bmi']").val()),o=Number($("[name='bodytype']").val());$("[name='idealweight_robinson']").val(n.getRobinson().toFixed(1)),$("[name='idealweight_miller']").val(n.getMiller().toFixed(1)),$("[name='idealweight_hamwi']").val(n.getHamwi().toFixed(1)),$("[name='idealweight_devine']").val(n.getDevine().toFixed(1)),$("[name='idealweight_peterson']").val(n.getPeterson(l).toFixed(1)),$("[name='idealweight_zacho']").val(n.getIdealWeightBasedOnBMI(r).toFixed(1)),$("[name='idealweight_robinson_bodytype']").val((n.getRobinson()*o).toFixed(1)),$("[name='idealweight_miller_bodytype']").val((n.getMiller()*o).toFixed(1)),$("[name='idealweight_hamwi_bodytype']").val((n.getHamwi()*o).toFixed(1)),$("[name='idealweight_devine_bodytype']").val((n.getDevine()*o).toFixed(1)),$("[name='idealweight_peterson_bodytype']").val((n.getPeterson(l)*o).toFixed(1)),$("[name='idealweight_zacho_bodytype']").val((n.getIdealWeightBasedOnBMI(r)*o).toFixed(1))}),$("#calculator_running_walking").submit(function(e){console.log("Running Walking Energy Expenditure"),e.preventDefault();let a,t,n,l,r=Number($("[name='weight']").val());console.log($("#formula-energy-walking").val()),console.log($("#formula-energy-running").val()),"met"==$("#formula-energy-walking").val()?(l=Number($("[name='walking']").val()),a=runwalk.RunningWalking("walking",l,r)):"pandolf"==$("#formula-energy-walking").val()?(l=Number($("[name='walk_velocity']").val()),a=pandolf.RunningWalkingEnergyExpenditurePandolf(r,l)):(l=Number($("[name='walk_velocity']").val()),a=runwalkenergy.RunningWalkingEnergyExpenditure("walking",r,l)),"met"==$("#formula-energy-running").val()?(n=Number($("[name='running']").val()),t=runwalk.RunningWalking("running",n,r)):"leger"==$("#formula-energy-running").val()?(n=Number($("[name='run_velocity']").val()),t=leger.RunningWalkingEnergyExpenditureLeger(r,n)):(n=Number($("[name='run_velocity']").val()),t=runwalkenergy.RunningWalkingEnergyExpenditure("running",r,n));let o=t.getCaloriesPrKilometer()/a.getCaloriesPrKilometer(),i=t.getCaloriesPrMinute()/a.getCaloriesPrMinute();$("#walking-velocity").text(l+" km/t"),$("#running-velocity").text(n+" km/t"),$("#calories_walking_kilometer").val(a.getCaloriesPrKilometer().toFixed(0)),$("#calories_walking_minute").val(a.getCaloriesPrMinute().toFixed(0)),$("#calories_running_minute").val(t.getCaloriesPrMinute().toFixed(0)),$("#calories_running_kilometer").val(t.getCaloriesPrKilometer().toFixed(0)),$("#ratio_kilometer").val(o.toFixed(1)),$("#ratio_minute").val(i.toFixed(1))}),$("#calculator_walking_energy").submit(function(e){console.log("Running Walking Energy Expenditure"),e.preventDefault();let a,t,n=Number($("[name='weight']").val());if(console.log($("#formula-walking-energy").val()),"met"==$("#formula-walking-energy").val())t=Number($("[name='walking']").val()),a=runwalk.RunningWalking("walking",t,n);else if("pandolf"==$("#formula-walking-energy").val()){t=Number($("[name='walk_velocity']").val());let e=Number($("[name='walk_grade']").val()),l=Number($("[name='walk_load']").val());a=pandolf.RunningWalkingEnergyExpenditurePandolf(n,t,e,l)}else{t=Number($("[name='walk_velocity']").val());let e=Number($("[name='walk_grade']").val());a=runwalkenergy.RunningWalkingEnergyExpenditure("walking",n,e)}console.log(t);let l=60*$("#time").val(),r=a.getCaloriesPrMinute()*l;$("#calories_walking_kilometer").val(a.getCaloriesPrKilometer().toFixed(0)),$("#calories_walking_minute").val(a.getCaloriesPrMinute().toFixed(1)),$("#calories_walking_total").val(r.toFixed(0))}),$("#calculator_jump_reach_height").submit(function(e){console.log("Jump Reach test"),e.preventDefault();let a=Number($("[name='standing_height']").val()),t=Number($("[name='jumping_height']").val());$("[name='jump_reach_height_score']").val(t-a)}),$("#calculator_jump_reach_power").submit(function(e){console.log("Jump Reach test"),e.preventDefault();let a=$("[name='jump-reach-formula']").val(),t=Number($("[name='body_weight']").val()),n=Number($("[name='body_height']").val()),l=Number($("#jump_reach_height_score").val());console.log(a+" "+t+" "+n+" "+l);let r=jump_reach.JumpReach(a,l,t,n);$("[name='average_power']").val(r.getAveragePower()),$("[name='peak_power']").val(r.getPeakPower())}),$("#calculator_jump_cmj").submit(function(e){console.log("CMJ test"),e.preventDefault();let a=Number($("[name='cmj_flight_time']").val());console.log("CMJ flight time "+a);let t=9.81*Math.pow(a,2)/8;t*=100,$("[name='cmj_jump_height']").val(t.toFixed(2))}),$("#calculator_dsi").submit(function(e){console.log("DSI test"),e.preventDefault();let a=Number($("[name='dsi_peak_force_max_strength']").val()),t=Number($("[name='dsi_peak_force_max_ballistic']").val())/a;$("[name='dsi']").val(t.toFixed(2))}),$("#calculator_walking_steps_how_fast").submit(function(e){console.log("Calculate how fast steps"),e.preventDefault();let a=Number($("[name='steps']").val())*Number($("[name='step_length']").val())/100/1e3,t=a/Number($("[name='velocity']").val()),n=Math.floor(t);var l=60*(t-Math.floor(t));let r=Math.floor(l),o=Math.round(60*(l-Math.floor(l)));o<10&&(o="0"+o);let i=n+":"+r+":"+o;$("[name='distance']").val(a),$("[name='time']").val(i)}),$("#calculator_6sek_relative_ppo").submit(function(e){console.log("6sek_relative_ppo"),e.preventDefault();let a=Number($("[name='6sek_ppo']").val())/Number($("[name='6sek_bw']").val());$("[name='relative_ppo']").val(a.toFixed(2))}),$("#calculator_musclemass_upper_limit").submit(function(e){console.log("musclemass_upper_limit"),e.preventDefault();let a=Number($("[name='height']").val())/100,t=a*a*34,n=a*a*17;$("[name='ffm']").val(t.toFixed(2)),$("[name='musclemass']").val(n.toFixed(2))}),$("#calculator_musclemass").submit(function(e){console.log("musclemass"),e.preventDefault();let a=$("[name='ethniticity']").val(),t=$("[name='gender']").val();console.log(a+" "+t);let n,l=Number($("[name='height']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='age']").val()),i=Number($("[name='waist']").val());n=i>0?"man"==t?"white"==a?.46*r+.03*l+.013*o-6e-4*Math.pow(o,2)-.28*i+13.8:.5*r+.03*l+.031*o-8e-4*Math.pow(o,2)-.31*i+13.3:"white"==a?.24*r+.09*l-.097*o+4e-4*Math.pow(o,2)-.06*i-3.9:.26*r+.1*l-.12*o+6e-4*Math.pow(o,2)-.06*i-4.9:"man"==t?"white"==a?.23*r+.15*l-.058*o-5e-4*Math.pow(o,2)-13.2:.26*r+.16*l-.054*o-7e-4*Math.pow(o,2)-14.8:"white"==a?.19*r+.11*l-.095*o+3e-4*A2-9:.21*r+.12*l-.132*o+6e-4*A2-9.6,$("[name='musclemass']").val(n.toFixed(2))}),$("#calculator_6sek_fi").submit(function(e){console.log("6sek_fi"),e.preventDefault();let a=Number($("[name='6sek_best']").val()),t=(a-Number($("[name='6sek_worst']").val()))/a*100;$("[name='fi']").val(t.toFixed(2))}),$("#calculator_galloway_magic_mile").submit(function(e){console.log("Gallowway_magic_mile"),e.preventDefault();let a=Number($("[name='time_mm_minutes']").val()),t=Number($("[name='time_mm_seconds']").val()),n=running.Running(),l=n.getKilometersPrHour(1.609,a,t);console.log("mmtime"+l);let r=a,o=t+33;o>59&&(o-=60,r+=1);let i=n.getKilometersPrHour(1.609,r,o),m=n.convertKmtToMinPerKm(i),u=l/1.15,c=n.convertKmtToMinPerKm(u),s=l/1.2,v=n.convertKmtToMinPerKm(s),_=l/1.3,g=n.convertKmtToMinPerKm(_),d=l/1.55,b=n.convertKmtToMinPerKm(d);$("[name='pace_long_run']").val(b),$("[name='pace_5k_run']").val(m),$("[name='pace_10k_run']").val(c),$("[name='pace_half_marathon_run']").val(v),$("[name='pace_marathon_run']").val(g)}),$("#calculator_run_walk_time").submit(function(e){console.log("run_walk_time"),e.preventDefault();let a=Number($("[name='time_running_minutes']").val()),t=Number($("[name='time_running_seconds']").val()),n=Number($("[name='time_walking_minutes']").val()),l=Number($("[name='time_walking_seconds']").val()),r=Number($("[name='pace_walking_minutes']").val()),o=Number($("[name='pace_running_minutes']").val()),i=Number($("[name='pace_walking_seconds']").val()),m=Number($("[name='pace_running_seconds']").val());console.log("Pace walking"+r+":"+i),console.log("Time"+n+":"+l),console.log("Pace running"+r+":"+i);let u=running.Running(),c=u.convertMinPerKmToDistanceForDuration(o,m,a,t),s=u.convertMinPerKmToDistanceForDuration(r,i,n,l),v=(c+s)/1e3,_=a+n,g=t+l;g>59&&(g-=60,_+=1),console.log("dist_running: "+c+"dist_walking: "+s+"dist: "+v+" - min: "+_+" - sec: "+g),$("[name='velocity']").val(u.getKilometersPrHour(v,_,g).toFixed(2)),$("[name='pace']").val(u.getTimePrKilometer(v,_,g))}),$("#calculator_6sek_sdec").submit(function(e){console.log("6sek_sdec"),e.preventDefault();let a,t=$("[name='6sek_type']").val(),n=Number($("[name='6sek_1']").val()),l=Number($("[name='6sek_2']").val()),r=Number($("[name='6sek_3']").val()),o=Number($("[name='6sek_4']").val()),i=Number($("[name='6sek_5']").val()),m=(n+l+r+o+i)/(5*Math.max(n,l,r,o,i));a="running"==t?100*(m-1):100*(1-m),$("[name='6sek_sdec']").val(a.toFixed(2))}),$("#calculator_jump_cmj_initial_velocity").submit(function(e){console.log("CMJ test"),e.preventDefault();let a=Number($("[name='cmj_initial_velocity']").val());console.log("CMJ flight time "+a);let t=Math.pow(a,2)/9.81/2;t*=100,$("[name='cmj_jump_height_initial_velocity']").val(t.toFixed(2))}),$("#calculator_fitness_jog_vo2").submit(function(e){console.log("Etpunkt test"),e.preventDefault();let a=Number($("[name='time_min']").val())+Number($("[name='time_sec']").val())/60,t=Number($("[name='gender']").val()),n=Number($("[name='hr']").val()),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=jog.VO2MaxJog(t,l,r,a,n);$("[name='vo2max']").val(o.getMaximalOxygenUptake().toFixed(2)),$("[name='kondital']").val(o.getFitnessLevel().toFixed(0))}),$("#calculator_etpunkttest").submit(function(e){console.log("Etpunkt test"),e.preventDefault();let a=Number($("[name='work']").val()),t=Number($("[name='gender']").val()),n=Number($("[name='hr']").val()),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=etpunkt.EtPunktTest(t,l,r,n,a);$("[name='vo2max']").val(o.getMaximalOxygenUptake().toFixed(2)),$("[name='kondital']").val(o.getFitnessLevel().toFixed(0))}),$("#calculator_topunkttest").submit(function(e){console.log("Topunkt test"),e.preventDefault();let a=Number($("[name='work_1']").val()),t=Number($("[name='work_2']").val()),n=Number($("[name='hr_1']").val()),l=Number($("[name='hr_2']").val()),r=Number($("[name='age']").val()),o=Number($("[name='weight']").val()),i=Number($("[name='max_hr']").val()),m=topunkt.ToPunktTest(r,o,i,a,n,t,l);$("[name='work_max']").val(m.getMaximalWork().toFixed(0)),$("[name='vo2max']").val(m.getMaximalOxygenUptake().toFixed(2)),$("[name='kondital']").val(m.getFitnessLevel().toFixed(0))}),$("#calculator_maxhr").submit(function(e){console.log("Calculate Maximal Heart Rate"),e.preventDefault();let a=Number($("[name='age']").val()),t=$("[name='maxhr-formula']").val(),n=maxhr.EstimateMaxHr(a,t);$("[name='max_hr']").val(n.getMaxHr().toFixed(0))}),$("#calculator_bmi").submit(function(e){console.log("Calculate BMI"),e.preventDefault();let a=Number($("[name='height']").val()),t=Number($("[name='weight']").val()),n=Number($("[name='age']").val()),l=$("[name='gender']:checked").val(),r=$("[name='type']").val(),o=bmi.BMI(a,t),i=bmievaluation.BMIEvaluation(r,l,n);$("#meter-text").text(i.getEvaluation(o.getBMI())),$("[name='BMI']").val(o.getBMI().toFixed(1));let m=$("#meter-bmi");m.val(o.getBMI().toFixed(1)),m.text(o.getBMI().toFixed(1)),m.attr("low",i.getLow()),m.attr("high",i.getHigh()),m.attr("optimum",i.getOptimum()),m.attr("min",i.getMin()),m.attr("max",i.getMax())}),$("#calculator_water_intake").submit(function(e){console.log("Calculate Water Intake"),e.preventDefault();let a=Number($("[name='weight']").val()),t=water.WaterIntake(a);$("[name='daily_water_intake_lower']").val(t.getDailyWaterIntake()),$("[name='daily_water_intake_upper']").val(t.getDailyWaterIntake("upper"))}),$("#calculator_ponderal_index").submit(function(e){console.log("Calculate BMI"),e.preventDefault();let a=Number($("[name='height']").val()),t=Number($("[name='weight']").val()),n=ponderalindex.PonderalIndex(a,t);$("[name='PMI']").val(n.getPonderalIndex().toFixed(1))}),$("#calculator_bodywater").submit(function(e){console.log("Calculate Body Water"),e.preventDefault();let a=Number($("#age").val()),t=Number($("#height").val()),n=Number($("#weight").val()),l=$("[name='sex']:checked").val(),r=tbw.BodyWater(t,n,a,l);$("#tbw").val(r.getTotalBodyWater().toFixed(2)),$("#tbw_pct").val(r.getPercent().toFixed(2))}),$("#calculator_fat_percent").submit(function(e){console.log("Calculate Fat Percent"),e.preventDefault();let a=Number($("[name='age']").val()),t=Number($("[name='height']").val()),n=Number($("[name='weight']").val()),l=$("[name='sex']:checked").val(),r=fat.CalculateFatPercent(t,n,a,l);$("[name='BMI']").val(r.getBMI().toFixed(2)),$("[name='fat_percent_durnin']").val(r.getWomersleyDurnin1977().toFixed(1)),$("[name='fat_percent_jackson_pollock']").val(r.getJacksonPollock1980().toFixed(1)),$("[name='fat_percent_heitmann']").val(r.getHeitmann1990().toFixed(1)),$("[name='fat_percent_duerenberg']").val(r.getDuerenberg1991().toFixed(1)),$("[name='fat_percent_duerenberg_1998']").val(r.getDuerenberg1998().toFixed(1)),$("[name='fat_percent_gallagher']").val(r.getGallagher2000().toFixed(1)),$("[name='fat_percent_heritage_2002']").val(r.getHeritage2002().toFixed(1))}),$("#calculator_how_tall").submit(function(e){console.log("Calculate How Tall"),e.preventDefault();let a=Number($("[name='father_height']").val()),t=Number($("[name='mother_height']").val()),n=$("[name='sex']:checked").val(),l=how_tall.HowTall(n,a,t);$("[name='adult_height']").val(l.getHeight().toFixed(0))}),$("#calculator_flyer_handicap").submit(function(e){console.log("Calculate Flyer Handicap"),e.preventDefault();let a=$("[name='gender']").val(),t=Number($("[name='weight']").val()),n=Number($("[name='age']").val()),l=$("[name='distance']").val(),r=Number($("[name='hours']").val()),o=Number($("[name='minutes']").val()),i=Number($("[name='seconds']").val());n<25&&$("[name='age']").val(25),"female"==a?(t<50&&$("[name='weight']").val(50),$("#fh_weight").text(50),$("#fh_gender").text("kvinde")):"male"==a&&(t<65&&$("[name='weight']").val(65),$("#fh_weight").text(65),$("#fh_gender").text("mand"));let m=flyer_handicap.FlyerHandicap(n,t,a);$("[name='fh_time']").val(m.getAdjustedTime(l,r,o,i))}),$("#calculator_who5").submit(function(e){console.log("Calculate Eating Disorder"),e.preventDefault();let a,t=4*(Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val()));a=t>49?"Din score på "+t+" ligger her inden for gennemsnittet for resten af befolkningen som er 68 med en nedre grænse omkring 50.":t>35?"Din score på "+t+" ligger lavere end gennemsnittet for resten af befolkningen. Resultatet tyder på, at du nok ikke har det helt godt. Vær opmærksom på, om du får det bedre eller værre og søg evt. læge, hvis du får det værre.":"Din score på "+t+" ligger væsentligt lavere end gennemsnittet for resten af befolkningen. Resultatet tyder på, at du ikke er på toppen, og der kan være en reel risiko for, at du lider af depression eller langvarig stress. Du bør overveje at søge hjælp hos din læge for at få det undersøgt.",$("[name='who5_score']").val(t),$("#result").text(a)}),$("#calculator_phq9").submit(function(e){console.log("Calculate PHQ-9"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val())+Number($("[name='question_6']:checked").val())+Number($("[name='question_7']:checked").val())+Number($("[name='question_8']:checked").val())+Number($("[name='question_9']:checked").val());a=t>19?"Din score på "+t+" viser, at du har svære symptomer på depression. Du skal søge professionel hjælp, så du kan komme til en specialist, der vil hjælpe dig med at igangsætte en øjeblikkelig behandling.":t>14?"Din score på "+t+" viser, at du har moderate til svære symptomer på depression. Du skal søge professionel hjælp, som kan hjælpe med at få dig i behandling.":t>9?"Din score på "+t+" viser at du har moderate symptomer på depression. Du bør søge professionel hjælp og lægge en plan.":t>4?"Din score på "+t+" viser at du kan have milde symptomer på depression. Det er godt at følge op efter lidt tid med at besvare skemaet igen for at se, om symptomerne bliver værre.":"Din score på "+t+" viser, at du ingen eller kun minimale depressive symptomer har.",$("[name='phq9_score']").val(t),$("#result").text(a)}),$("#calculator_stress").submit(function(e){console.log("Calculate Stress"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val())+Number($("[name='question_6']:checked").val())+Number($("[name='question_7']:checked").val())+Number($("[name='question_8']:checked").val())+Number($("[name='question_9']:checked").val())+Number($("[name='question_10']:checked").val())+Number($("[name='question_11']:checked").val())+Number($("[name='question_12']:checked").val())+Number($("[name='question_13']:checked").val())+Number($("[name='question_14']:checked").val())+Number($("[name='question_15']:checked").val())+Number($("[name='question_16']:checked").val());a=t>50?"Din score på "+t+" viser, at dit stressniveau er meget højt niveau. Dit stressniveau er meget højt. Du bør tage hånd om din situation straks og række ud efter hjælp, så du kan få det bedre.":t>36?"Din score på "+t+" viser, at dit stressniveau er for højt niveau. Dit stressniveau er højt. Du har måske været belastet over en længere periode, hvor stressen gradvist er taget til. Du bør gøre noget ved din situation nu.":t>23?"Din score på "+t+" viser, at dit stressniveau er på et mellem niveau. Dit stress-niveau er ikke alarmerende højt, men du er alligevel tilpas stresset til, at du bør se på, hvad der kan ændres i dit liv.":"Din score på "+t+" viser, at dit stressniveau er på et afslappet niveau. Du er ikke stresset for tiden. Det er rigtig godt, men vær alligevel opmærksom på, om din tilstand ændrer sig.",$("[name='stress_score']").val(t),$("#result").text(a)}),$("#calculator_atq").submit(function(e){console.log("Calculate ATQ"),e.preventDefault();let a=Number($("[name='frequency_1']:checked").val()),t=Number($("[name='frequency_2']:checked").val()),n=Number($("[name='frequency_3']:checked").val()),l=Number($("[name='frequency_4']:checked").val()),r=Number($("[name='frequency_5']:checked").val()),o=Number($("[name='frequency_6']:checked").val()),i=Number($("[name='frequency_7']:checked").val()),m=Number($("[name='frequency_8']:checked").val()),u=Number($("[name='frequency_9']:checked").val()),c=Number($("[name='frequency_10']:checked").val()),s=Number($("[name='frequency_11']:checked").val()),v=Number($("[name='frequency_12']:checked").val()),_=Number($("[name='frequency_13']:checked").val()),g=Number($("[name='frequency_14']:checked").val()),d=Number($("[name='frequency_15']:checked").val()),b=Number($("[name='frequency_16']:checked").val()),p=Number($("[name='frequency_17']:checked").val()),f=Number($("[name='frequency_18']:checked").val()),h=Number($("[name='frequency_19']:checked").val()),x=Number($("[name='frequency_20']:checked").val()),k=Number($("[name='frequency_21']:checked").val()),N=Number($("[name='frequency_22']:checked").val()),y=Number($("[name='frequency_23']:checked").val()),F=Number($("[name='frequency_24']:checked").val()),w=Number($("[name='frequency_25']:checked").val()),D=Number($("[name='frequency_26']:checked").val()),C=Number($("[name='frequency_27']:checked").val()),M=Number($("[name='frequency_28']:checked").val()),q=Number($("[name='frequency_29']:checked").val()),R=Number($("[name='frequency_30']:checked").val()),P=a+t+n+l+r+o+i+m+u+c+s+v+_+g+d+b+p+f+h+x+k+N+y+F+w+D+C+M+q+R,j=Number($("[name='believe_1']:checked").val())+Number($("[name='believe_2']:checked").val())+Number($("[name='believe_3']:checked").val())+Number($("[name='believe_4']:checked").val())+Number($("[name='believe_5']:checked").val())+Number($("[name='believe_6']:checked").val())+Number($("[name='believe_7']:checked").val())+Number($("[name='believe_8']:checked").val())+Number($("[name='believe_9']:checked").val())+Number($("[name='believe_10']:checked").val())+Number($("[name='believe_11']:checked").val())+Number($("[name='believe_12']:checked").val())+Number($("[name='believe_13']:checked").val())+Number($("[name='believe_14']:checked").val())+Number($("[name='believe_15']:checked").val())+Number($("[name='believe_16']:checked").val())+Number($("[name='believe_17']:checked").val())+Number($("[name='believe_18']:checked").val())+Number($("[name='believe_19']:checked").val())+Number($("[name='believe_20']:checked").val())+Number($("[name='believe_21']:checked").val())+Number($("[name='believe_22']:checked").val())+Number($("[name='believe_23']:checked").val())+Number($("[name='believe_24']:checked").val())+Number($("[name='believe_25']:checked").val())+Number($("[name='believe_26']:checked").val())+Number($("[name='believe_27']:checked").val())+Number($("[name='believe_28']:checked").val())+Number($("[name='believe_29']:checked").val())+Number($("[name='believe_30']:checked").val()),W=i+c+g+x+D,H=t+n+u+k+y+F+M,E=p+f,B=q+R;$("[name='frequency_score']").val(P),$("[name='believe_score']").val(j),$("[name='pmdc_score']").val(W),$("[name='nsne_score']").val(H),$("[name='lse_score']").val(E),$("[name='helplessness_score']").val(B),$("#result").text(void 0)}),$("#calculator_excercise_addiction").submit(function(e){console.log("Calculate Eating Disorder"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val())+Number($("[name='question_6']:checked").val());a=t>23?"Din score på "+t+" ligger mellem 24-30. Det er sandsynligt, at du er afhængig af træning på en måde, der kan skade dig.":t>15?"Du har fået "+t+" point. Hvis du får 24 point eller mere, så er du sandsynligvis afhængig af træning på en måde, der kan skade dig.":"Du er med "+t+" point sandsynligvis ikke i risikogruppen for at være afhængig af træning.",$("#result").text(a)}),$("#calculator_eating_disorder").submit(function(e){console.log("Calculate Eating Disorder"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val()),n=Number($("[name='question_2']:checked").val()),l=Number($("[name='question_3']:checked").val()),r=Number($("[name='question_4']:checked").val()),o=Number($("[name='question_5']:checked").val()),i=Number($("[name='question_6']:checked").val()),m=t+n+l+r;a=m>1?"Du har svaret ja på "+m+" af de fire første spørgsmål. Du er i risikogruppen for at have en spiseforstyrrelse og bør søge hjælp. Yderligere udredning er nødvendig for at vurdere, om der er tale om en spiseforstyrrelse.":m>0?"Du har svaret ja på et af de fire første spørgsmål. At svare ja på et af spørgsmålene er formentlig ikke alvorligt, men det kan være tegn på et forstyrret spisemønster.":0==o+i?"Dine s let tyder på, at du ikke har et forstyrret spisemønster.":"Det let ikke muligt at konkludere noget på baggrund af dine svar. De første fire spørgsmål har en sammenhæng med det at have en spiseforstyrrelse. De sidste to spørgsmål kan afdække om du er uden for risikogruppen.",$("#result").text(a)}),$("#calculator_norwegian_2011").submit(function(e){console.log("Calculate Norwegian 2011"),e.preventDefault();let a,t=$("[name='gender']").val(),n=Number($("[name='age']").val()),l=Number($("[name='hr_rest']").val()),r=Number($("[name='waist']").val()),o=Number($("[name='frequency']").val())*Number($("[name='intensity']").val())*Number($("[name='duration']").val());a="male"==t?100.27+.226*o-.296*n-.369*r-.155*l:74.74+.198*o-.247*n-.259*r-.114*l,$("[name='kondital']").val(a.toFixed(0)),$("[name='pa']").val(o)}),$("#calculator_jackson").submit(function(e){console.log("Calculate Jackson"),e.preventDefault();let a=Number($("[name='jackson_gender']").val()),t=Number($("[name='jackson_age']").val()),n=Number($("[name='jackson_height']").val()),l=Number($("[name='jackson_weight']").val()),r=56.363+1.921*Number($("[name='par']:checked").val())-.381*t-.754*bmi.BMI(n,l).getBMI()+10.987*a;$("[name='jackson_kondital']").val(r.toFixed(0))}),$("#calculator_skinfold_durnin").submit(function(e){console.log("Calculate Skinfold Durnin"),e.preventDefault();let a=Number($("[name='biceps']").val()),t=Number($("[name='triceps']").val()),n=Number($("[name='suprailiac']").val()),l=Number($("[name='subscapularis']").val()),r=Number($("[name='weight']").val()),o=$("[name='gender']").val(),i=Number($("[name='age']").val()),m=skinfold_durnin.SkinfoldDurnin(a,t,n,l,r,o,i);$("[name='skinfold_durnin']").val(m.getSkinfoldSum().toFixed(2)),$("[name='fatpercent_durnin']").val(m.getBodyFatPercent().toFixed(2)),$("[name='ffm_durnin']").val(m.getFatFreeMass().toFixed(2))}),$("#calculator_skinfold_peterson").submit(function(e){console.log("Calculate Skinfold Durnin"),e.preventDefault();let a=Number($("[name='midthigh']").val()),t=Number($("[name='triceps']").val()),n=Number($("[name='suprailiac']").val()),l=Number($("[name='subscapularis']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='height']").val()),i=$("[name='gender']").val(),m=Number($("[name='age']").val()),u=skinfold_peterson.SkinfoldPeterson(a,t,n,l,o,r,i,m);$("[name='skinfold_peterson']").val(u.getSkinfoldSum().toFixed(2)),$("[name='fatpercent_peterson']").val(u.getBodyFatPercent().toFixed(2)),$("[name='ffm_peterson']").val(u.getFatFreeMass().toFixed(2))}),$("#calculator_skinfold_pollock_men").submit(function(e){console.log("Calculate Skinfold Pollock Men"),e.preventDefault();let a=Number($("[name='chest_male']").val()),t=Number($("[name='abdomen_male']").val()),n=Number($("[name='thigh_male']").val()),l=Number($("[name='age_male']").val()),r=Number($("[name='weight_male']").val()),o=skinfold_pollock.SkinfoldPollock(r,l);$("[name='fatpercent_male']").val(o.getBodyFatPercentMale(a,t,n)),$("[name='ffm_male']").val(o.getBodyFatFreeMass())}),$("#calculator_skinfold_pollock_women").submit(function(e){console.log("Calculate Skinfold Pollock Women"),e.preventDefault();let a=Number($("[name='triceps_female']").val()),t=Number($("[name='supiliac_female']").val()),n=Number($("[name='thigh_female']").val()),l=Number($("[name='age_female']").val()),r=Number($("[name='weight_female']").val()),o=skinfold_pollock.SkinfoldPollock(r,l);$("[name='fatpercent_female']").val(o.getBodyFatPercentFemale(a,t,n)),$("[name='ffm_female']").val(o.getBodyFatFreeMass())}),$("#calculator_skinfold_lohman").submit(function(e){console.log("Calculate Skinfold Lohman"),e.preventDefault();let a=Number($("[name='triceps']").val()),t=Number($("[name='calf']").val()),n=Number($("[name='gender']").val()),l=skinfold_lohman.SkinfoldLohman(n,a,t);$("[name='fatpercent']").val(l.getBodyFatPercent())}),$("#calculator_skinfold_slaughter").submit(function(e){console.log("Calculate Skinfold Slaughter"),e.preventDefault();let a=Number($("[name='triceps']").val()),t=Number($("[name='subscapular']").val()),n=Number($("[name='gender']").val()),l=skinfold_slaughter.SkinfoldSlaughter(n,a,t);$("[name='fatpercent']").val(l.getBodyFatpercent())}),$("#calculator_fat_percent_measurement").ready(function(){$("#calculator_fat_percent_men_under_26").hide(),$("#calculator_fat_percent_men_over_26").hide(),$("#calculator_fat_percent_women_under_26").hide(),$("#calculator_fat_percent_women_over_26").hide()}),$("#calculator_fat_percent_measurement [name='group']").change(function(){let e=$("[name='group']").val();$("#calculator_fat_percent_men_under_26").hide(),$("#calculator_fat_percent_men_over_26").hide(),$("#calculator_fat_percent_women_under_26").hide(),$("#calculator_fat_percent_women_over_26").hide(),$("#calculator_fat_percent_"+e).show()}),$("#calculator_fat_percent_men_under_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_men_under_26']").val(a.getFatPercentMenUnder26(Number($("#calculator_fat_percent_men_under_26 [name='right_upperarm']").val()),Number($("#calculator_fat_percent_men_under_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_men_under_26 [name='right_forearm']").val())).toFixed(2))}),$("#calculator_fat_percent_men_over_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_men_over_26']").val(a.getFatPercentMenOver26(Number($("#calculator_fat_percent_men_over_26 [name='hips']").val()),Number($("#calculator_fat_percent_men_over_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_men_over_26 [name='right_forearm']").val())).toFixed(2))}),$("#calculator_fat_percent_women_under_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_women_under_26']").val(a.getFatPercentWomenUnder26(Number($("#calculator_fat_percent_women_under_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_women_under_26 [name='right_thigh']").val()),Number($("#calculator_fat_percent_women_under_26 [name='right_forearm']").val())).toFixed(2))}),$("#calculator_fat_percent_women_over_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_women_over_26']").val(a.getFatPercentWomenOver26(Number($("#calculator_fat_percent_women_over_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_women_over_26 [name='right_thigh']").val()),Number($("#calculator_fat_percent_women_over_26 [name='right_calf']").val())).toFixed(2))}),$("#calculate_fitness_level_hr").submit(function(e){console.log("Calculate VO2 from HR"),e.preventDefault();let a=Number($("#hr_rest").val()),t=Number($("#hr_max").val()),n=Number($("#weight").val()),l=fitness.CalculateFitnessFromHr(t,a,n),r=l.getMaximalOxygenUptake(),o=l.getFitnessLevel();$("#vo2max").val(r).toFixed(2),$("#kondital").val(o).toFixed(0)}),$("#calculator_borg15").submit(function(e){console.log("Calculate Borg 15 fitness"),e.preventDefault();let a=Number($("#borg_watt").val()),t=Number($("#borg_age").val()),n=Number($("#borg_weight").val()),l=borg15.Borg15(t,n,a);$("#borg_iltoptagelse").val(l.getMaximalOxygenUptake().toFixed(2)),$("#borg_kondital").val(l.getFitnessLevel().toFixed(0))}),$("#calculator_inol").submit(function(e){console.log("Calculate INOL"),e.preventDefault();let a=Number($("[name='reps']").val()),t=Number($("[name='intensity']").val()),n=inol.INOL(t);$("[name='inol']").val(n.getINOL(a))}),$("#calculator_inol_reverse").submit(function(e){console.log("Calculate INOL"),e.preventDefault();let a=Number($("[name='inol_reverse_inol']").val()),t=Number($("[name='inol_reverse_intensity']").val()),n=inol.INOL(t);$("[name='inol_reverse_reps']").val(n.getReps(a))}),$("#calculator_ffmi").submit(function(e){console.log("Calculate FFMI"),e.preventDefault();let a=Number($("[name='ffmi_weight']").val()),t=Number($("[name='ffmi_height']").val()),n=a*(1-a*(Number($("[name='ffmi_fat_percent']").val())/100)/100)/Math.Pow(t,2),l=n+6.1*(1.8-t);$("[name='ffmi']").val(n),$("[name='ffmi_normalized']").val(l)}),$("#calculator_fitness_wattmax").submit(function(e){console.log("Calculate Wattmax"),e.preventDefault();let a=Number($("[name='wmax']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='weight']").val()),l=wattmax.Wattmax(a,t,n);$("[name='kondital']").val(l.getFitnessLevel()),$("[name='vo2max']").val(l.getMaximalOxygenUptake()),$("[name='mpo']").val(l.getMPO())}),$("#calculator_fitness_wattmax_children").submit(function(e){console.log("Calculate Wattmax Children"),e.preventDefault();let a=Number($("[name='wmax']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='weight']").val()),l=Number($("[name='watt_jumps']").val()),r=wattmax.Wattmax(a,t,n,15,l);$("[name='kondital']").val(r.getFitnessLevel()),$("[name='vo2max']").val(r.getMaximalOxygenUptake()),$("[name='mpo']").val(r.getMPO())}),$("#calculator_fitness_trappetest").submit(function(e){console.log("Calculate Trappetest"),e.preventDefault();let a=Number($("[name='wmax']").val())-25+Number($("[name='sec']").val())/150*25,t=.01141*a+.435,n=t/Number($("[name='weight']").val())*1e3;$("[name='kondital']").val(n.toFixed(0)),$("[name='vo2max']").val(t.toFixed(2)),$("[name='ppo']").val(a)}),$("#calculator_walktest_6min").submit(function(e){console.log("Calculate Walktest 6 min"),e.preventDefault();let a=Number($("[name='meter']").val()),t=Number($("[name='gender']").val()),n=Number($("[name='age']").val()),l=Number($("[name='height']").val()),r=Number($("[name='weight']").val()),o=$("#formula").val(),i=walktest_sixminutes.SixMinutesWalkingTest(t,n,l,r,a);$("[name='reference_distance']").val(i.getReferenceMeter(o).toFixed(1)),$("[name='procent']").val(i.getPercent(o).toFixed(0)),$("#walktest_gauge").val(i.getPercent(o))}),$("#calculator_walktest_16km").submit(function(e){console.log("Calculate Walktest 1,6 km"),e.preventDefault();let a=$("[name='walktest-formula']").val(),t=Number($("[name='min']").val()),n=Number($("[name='sec']").val()),l=Number($("[name='hr_after']").val()),r=$("[name='gender']").val(),o=Number($("[name='age']").val()),i=Number($("[name='weight']").val());console.log(r);let m=rockport.RockPortWalkingTest(t,n,l,r,o,i,a);$("[name='kondital']").val(m.getFitnessLevel().toFixed(0)),$("[name='vo2max']").val(m.getMaximalOxygenUptake().toFixed(2))}),$("#calculator_index23").submit(function(e){console.log("Calculate Index23"),e.preventDefault();let a=Number($("#height").val()),t=Number($("#weight").val()),n=Number($("#kondital").val()),l=index23.FitnessIndex23(a,t);$("#index23").val(l.getIndex23BasedOnFitnessLevel(n))}),$("#calculator_andersen_test").submit(function(e){console.log("Calculate Andersen Test"),e.preventDefault();let a=$("[name='formula']").val(),t=Number($("[name='distance']").val()),n=Number($("[name='bodyweight']").val()),l=$("[name='gender']").val(),r=andersen.AndersenTest(l,t,n,a);$("[name='kondital']").val(r.getFitnessLevel().toFixed(0)),$("[name='vo2max']").val(r.getVO2max().toFixed(1))}),$("#calculator_index100").submit(function(e){console.log("Calculate Index100"),e.preventDefault();let a=Number($("[name='lifted']").val()),t=Number($("[name='weight']").val()),n=index100.Index100(a,t);$("[name='index_100_lift']").val(n.getIndex100())}),$("#calculator_necessary_energy_deficit").submit(function(e){console.log("Calculate calculator_necessary_energy_deficit"),e.preventDefault();let a=Number($("[name='lost']").val())/Number($("[name='days']").val())*1e3,t=9*a,n=a;$("[name='daily_diff']").val(t.toFixed(0)+" kcal"),$("[name='daily_weight_loss']").val(n.toFixed(0)+" g")}),$("#calculator_change").submit(function(e){console.log("Calculate Equilibrium"),e.preventDefault();let a=Number($("#calculator_change [name='tee']").val()),t=Number($("[name='intake']").val()),n=bmr_equilibrium.BMREquilibrium(),l=n.getBalance(a,t);$("[name='balance']").val(l+" kJ"),$("[name='weekly_weightchange']").val((1e3*n.getMaximalWeightChange(l,7)).toFixed(0)+" g"),$("[name='monthly_weightchange']").val(n.getMaximalWeightChange(l,30).toFixed(2)+" kg")}),$("#bmr-formula").change(function(){$("#bmr_legend").text($("#bmr-formula option:selected").text())}),$("#calculator_bmr_pal").submit(function(e){console.log("Calculate BMR - 2012"),e.preventDefault();let a,t=$("[name='bmr-formula']").val(),n=$("[name='gender']").val(),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='height']").val());if(o<1&&(t="nordic_2012"),a="schofield"==t?schofield.BMRSchofield(n,l,r):"benedict_harris"==t?bmr_benedict_harris.BMRBenedictHarris(n,l,r,o):ree.BMRNordicNutritionRecommendations2012(n,l,r,o),$("[name='bmr']").val(a.getBasicMetabolicRate().toFixed(0)),$("input[name='pal']").length>0){let e=Number($("[name='pal']:checked").val()),t=Number($("[name='moderate_leisure_activity']").val()),n=Number($("[name='strenuous_leisure_activity']").val()),l=tee_pal.TotalEnergyExpenditurePAL(a.getBasicMetabolicRate(),e,t,n);$("[name='pal_calc']").val(l.getPhysicalActivityLevel().toFixed(2)),$("[name='tee']").val(l.getTotalEnergyExpenditure().toFixed(0))}}),$("#calculator_critical_power_time").submit(function(e){console.log("Calculate CP Time"),e.preventDefault();let a=Number($("[name='time_cp']").val()),t=1e3*Number($("[name='time_w']").val())/(Number($("[name='time_p']").val())-a);$("[name='time']").val(t.toFixed(0))}),$("#calculator_rowing_2000_meter_time").submit(function(e){console.log("Calculate VO2max rowing"),e.preventDefault();let a=Number($("[name='tid_min']").val()),t=Number($("[name='tid_sek']").val()),n=Number($("[name='rowing_body_weight']").val()),l=$("[name='rowing_gender']").val(),r=rowing_power_calculator.RowingPowerCalculator(),o=r.getPaceFromTimeAndDistance(2e3,a,t),i=r.getWattsFromPace(o),m=rowing_vo2.RowingVO2(i,l);$("[name='vo2_max']").val(m.getVO2().toFixed(2)),$("[name='kondital']").val(m.getFitnessLevel(n).toFixed(0)),$("[name='mean_power']").val(i.toFixed(0))}),$("#calculator_rowing_trappetest").submit(function(e){console.log("Calculate VO2max rowing"),e.preventDefault();let a=Number($("[name='trappetest_tid_min']").val()),t=Number($("[name='trappetest_tid_sek']").val()),n=Number($("[name='trappetest_body_weight']").val()),l=Number($("[name='trappetest_second_watts']").val()),r=l+(Number($("[name='trappetest_last_watts']").val())-l)*((a+t/60/100)/5),o=(13.7*r+287)/1e3,i=o/n*1e3;$("[name='trappetest_vo2_max']").val(o.toFixed(2)),$("[name='trappetest_kondital']").val(i.toFixed(0)),$("[name='trappetest_mean_power']").val(r.toFixed(0))}),$("#calculator_rowing_powerprofile").submit(function(e){console.log("Calculate VO2max rowing"),e.preventDefault();let a=Number($("[name='roning_pp_tid_min']").val()),t=Number($("[name='roning_pp_tid_sek']").val()),n=Number($("[name='roning_pp_tid_ms']").val()),l=rowing_powerprofile.RowingErgRowing(a,t,n);$("#pace10sec").text(l.getPaceFromWatts(l.getWatts10Sec())),$("#pace60sec").text(l.getPaceFromWatts(l.getWatts60Sec())),$("#pace2k").text(l.getPaceFromWatts(l.getWatts2k())),$("#pace6k").text(l.getPaceFromWatts(l.getWatts6k())),$("#pace60min").text(l.getPaceFromWatts(l.getWatts60min())),$("#watts10sec").text(l.getWatts10Sec().toFixed(0)),$("#watts60sec").text(l.getWatts60Sec().toFixed(0)),$("#watts2k").text(l.getWatts2k().toFixed(0)),$("#watts6k").text(l.getWatts6k().toFixed(0)),$("#watts60min").text(l.getWatts60min().toFixed(0))}),$("#calculator_critical_power_power_for_time").submit(function(e){console.log("Calculate CP Power for time"),e.preventDefault();let a=Number($("[name='power_time_cp']").val()),t=1e3*Number($("[name='power_time_w']").val())/Number($("[name='power_time_time']").val())+a;$("[name='power_for_time']").val(t.toFixed(0))}),$("#calculator_bruce").submit(function(e){console.log("Calculate Bruce"),e.preventDefault();let a=Number($("[name='bruce_time']").val()),t=14.8-1.379*a+.451*Math.pow(a,2)-.012*Math.pow(a,3);$("[name='bruce_kondital']").val(t.toFixed(0))}),$("#calculator_critical_power").submit(function(e){console.log("Calculate CP"),e.preventDefault();let a=Number($("[name='p3']").val()),t=Number($("[name='p12']").val()),n=(12*t-3*a)/9,l=.24*(a-t);$("[name='cp']").val(n.toFixed(0)),$("[name='w']").val(l.toFixed(0))}),$("#calculator_blood").submit(function(e){console.log("Calculate Blood"),e.preventDefault();$("[name='bloodvolume-formula']").val();let a=$("[name='gender']").val(),t=Number($("[name='age']").val()),n=Number($("[name='weight']").val()),l=Number($("[name='height']").val()),r=blood.Blood(a,t,n,l);$("[name='bloodvolume']").val(r.getVolume().toFixed(0))}),$("#calculator_rer").submit(function(e){console.log("Calculate RER"),e.preventDefault();let a=$("[name='r']").val(),t=$("[name='o']").val(),n=rer.RER(a,t);$("[name='energy_expenditure']").val(n.getKcalMin().toFixed(0)),$("[name='energy_fat_percent']").val(100*n.getFatPercent().toFixed(2)),$("[name='energy_cho_percent']").val(100*n.getCHOPercent().toFixed(2)),$("[name='energy_fat_kcal_min']").val(n.getCaloriesFromFat().toFixed(2)),$("[name='energy_cho_kcal_min']").val(n.getCaloriesFromCHO().toFixed(2))}),$("#calculator_lung").submit(function(e){console.log("Calculate Blood"),e.preventDefault();let a=$("[name='gender']").val(),t=Number($("[name='age']").val()),n=Number($("[name='height']").val()),l=lung.Lung(a,n,t);$("[name='vital_capacity']").val(l.getVitalCapacity().toFixed(0))}),$("#activity_intense, #activity_moderat, #activity_light, #activity_standing, #activity_sleeping").change(function(e){let a=1440-document.getElementById("activity_intense").value-document.getElementById("activity_moderat").value-document.getElementById("activity_light").value-document.getElementById("activity_standing").value-document.getElementById("activity_sleeping").value;$("[name='activity_sitting']").val(a)}),$("#calculator_bmr_advanced_pal").submit(function(e){console.log("Calculate BMR - Advanced"),e.preventDefault();let a,t=$("[name='bmr-formula']").val(),n=$("[name='sex']:checked").val(),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='height']").val()),i=(a="schofield"==t?schofield.BMRSchofield(n,l,r):"benedict_harris"==t?bmr_benedict_harris.BMRBenedictHarris(n,l,r,o):ree.BMRNordicNutritionRecommendations2012(n,l,r,o)).getBasicMetabolicRate(),m=document.getElementById("activity_intense").value,u=document.getElementById("activity_moderat").value,c=document.getElementById("activity_light").value,s=document.getElementById("activity_standing").value,v=document.getElementById("activity_sleeping").value,_=1440-m-u-c-s-v,g=i/4.2,d=1.1+1.15/.9*m*9/1440/(g/(.0175*1440*r))+1.15/.9*u*6/1440/(g/(.0175*1440*r))+1.15/.9*c*3/1440/(g/(.0175*1440*r))+1.15/.9*s*1/1440/(g/(.0175*1440*r))+1.15/.9*v*(.9-1)/1440/(g/(.0175*1440*r))+1.15/.9*_*(1.2-1)/1440/(g/(.0175*1440*r)),b=i*d;$("[name='pal_gerrior']").val(d),$("[name='activity_sitting']").val(_),$("[name='bmr']").val(i+" kJ"),$("[name='equilibrium']").val(b+" kJ")}),$("#calculator_riegels").submit(function(e){console.log("Riegels formular"),e.preventDefault();let a=Number($("[name='dist']").val()),t=Number($("[name='hours']").val()),n=Number($("[name='minutes']").val()),l=Number($("[name='seconds']").val()),r=riegel.Riegel(a,t,n,l);$("#results").html(r.getTableWithEndTimes())}),$("#calculator_weightloss_running_time").submit(function(e){console.log("Running time weight loss"),e.preventDefault();let a=Number($("[name='weight']").val()),t=Number($("[name='change']").val()),n=Number($("[name='hours']").val()),l=Number($("[name='minutes']").val()),r=Number($("[name='seconds']").val()),o=Number($("[name='change_effect']").val()),i=running_weightchange.RunningWeightLoss(a,t,o/100);$("#result").val(i.getEstimatedFinishTime(n,l,r))}),$("#calculator_vmax_bike_vmax").submit(function(e){console.log("Calculate Vmax from VO2"),e.preventDefault();let a=Number($("[name='vo2max']").val()),t=vmax_bike.Vmax(a);$("[name='vmax']").val(t.getVmax())}),$("#calculator_vmax_biking_intervals").submit(function(e){console.log("Calculate Vmax for Biking"),e.preventDefault();let a=Number($("[name='biking_vmax_program']").val()),t=Number($("[name='biking_tmax_min']").val()),n=Number($("[name='biking_tmax_sec']").val()),l=Number($("[name='biking_warmup_percentage']").val()),r=Number($("[name='biking_tmax_percentage']").val()),o=Number($("[name='biking_vmax_pause_percentage']").val()),i=Number($("[name='biking_tmax_pause_percentage']").val()),m=vmax_intervals.VmaxIntervals(a,t,n);$("[name='biking_warmup_velocity']").val(m.getVelocity(l)),$("[name='biking_vmax_program_value']").val(a),$("[name='biking_time_program_time']").val(m.getTime(r)),$("[name='biking_pause_velocity']").val(m.getVelocity(o)),$("[name='biking_time_pause']").val(m.getTime(i))}),$("#calculator_vmax_running_intervals").submit(function(e){console.log("Calculate Vmax for Running"),e.preventDefault();let a=Number($("[name='running_vmax_program']").val()),t=Number($("[name='running_tmax_min']").val()),n=Number($("[name='running_tmax_sec']").val()),l=Number($("[name='running_warmup_percentage']").val()),r=Number($("[name='running_tmax_percentage']").val()),o=Number($("[name='running_vmax_pause_percentage']").val()),i=Number($("[name='running_tmax_pause_percentage']").val()),m=vmax_intervals.VmaxIntervals(a,t,n);return $("[name='running_warmup_velocity']").val(m.getVelocity(l)),$("[name='running_vmax_program_value']").val(a),$("[name='running_time_program_time']").val(m.getTime(r)),$("[name='running_pause_velocity']").val(m.getVelocity(o)),$("[name='running_time_pause']").val(m.getTime(i)),!1}),$("#calculator_hr_intensity_hrr").submit(function(e){console.log("Calculate HR intensity HRR"),e.preventDefault();let a=Number($("[name='hr_rest']").val()),t=Number($("[name='hr_max']").val()),n=Number($("[name='hr_work']").val()),l=hr_intensity.HRIntensity(t).getHRIntensityFromHeartRateReserve(a,n);$("[name='hrr_intensity']").val(l.toFixed(0))}),$("#calculator_hr_intensity_work").submit(function(e){console.log("Calculate HR work intensity HRR"),e.preventDefault();let a=Number($("[name='hr_rest_form2']").val()),t=Number($("[name='hr_max_form2']").val()),n=Number($("[name='intensity']").val()),l=n.HRIntensity(t).getHRBasedOnIntensityFromHeartRateReserve(a,n);$("[name='hrr_heartrate']").val(l.toFixed(0))}),$("#calculator_hr_intensity_from_max").submit(function(e){console.log("Calculate HR work intensity from HRmax"),e.preventDefault();let a=Number($("[name='hr_work_form3']").val()),t=Number($("[name='hr_max_form3']").val()),n=hr_intensity.HRIntensity(t).getWorkIntensityBasedOnMaxHR(a);$("[name='intensity_form3']").val(n.toFixed(0))}),$("#calculator_yyir1").submit(function(e){console.log("Calculate YYIR1"),e.preventDefault();let a=$("[name='sex']:checked").val(),t=Number($("[name='level']").val()),n=Number($("[name='shuttles']").val()),l=yyir1.YYIR1(t,n);$("[name='distance_result']").val(l.getDistance()),$("[name='vo2max_result']").val(l.getFitnessLevel()),$("[name='status']").val(l.getEvaluation(a,10))}),$("#calculator_beeptest_yye1").submit(function(e){console.log("Calculate YYIR1"),e.preventDefault();let a=$("[name='version']:checked").val(),t=Number($("[name='level']").val()),n=Number($("[name='shuttles']").val()),l=beeptest.BeepTest(t,n,a);$("[name='distance_result']").val(l.getDistance()),$("[name='vo2max_result']").val(l.getFitnessLevel().toFixed(1)),$("[name='totalshuttles_result']").val(l.getTotalShuttles())}),$("#calculator_pushups").submit(function(e){console.log("Calculate Pushups"),e.preventDefault();let a=$("[name='gender']:checked").val(),t=Number($("[name='age']").val()),n=Number($("[name='repetitions']").val()),l=pushup.Pushup(a,t,n);$("[name='population_average']").val(l.getPopulationAverage()),$("[name='score']").val(l.getScore()),$("[name='rating']").val(l.getRating())}),$("#calculator_wilksscore").submit(function(e){console.log("Calculate Wilks Score"),e.preventDefault();let a=$("[name='gender']:checked").val(),t=Number($("[name='bodyweight']").val()),n=Number($("[name='lifted']").val()),l=wilks.calculateWilksScore(a,t,n);$("[name='wilksscore']").val(l.toFixed(1))}),$("#calculator_ipf").submit(function(e){console.log("Calculate IPF Score"),e.preventDefault();let a,t=$("[name='ipf_gender']:checked").val(),n=Number($("[name='ipf_bodyweight']").val()),l=Number($("[name='ipf_lifted']").val()),r=$("[name='ipf_event']").val(),o=$("[name='ipf_equipment']").val(),i=Number($("[name='ipf_age']").val()),m=ipfpoints.IPFPoint(t,n,l,r,o),u=mcculloch.McCulloch(i);a=""!=u.getCoefficient()?m.getPoints()*u.getCoefficient():m.getPoints(),$("[name='ipf_points']").val(m.getPoints().toFixed(2)),$("[name='mcculloch_ipf_points']").val(a.toFixed(2))}),$("#calculator_hrzones_karvonen").submit(function(e){console.log("Calculate Karvonen Intensity Zones"),e.preventDefault();let a=Number($("#karvonen_min_hr").val()),t=Number($("#karvonen_max_hr").val()),n=karvonen.Karvonen(a,t),l=t-a;$("#karvonen_zone1_a").val(n.getTargetHR(50)),$("#karvonen_zone1_b").val(n.getTargetHR(60)),$("#karvonen_zone2_a").val(n.getTargetHR(60)),$("#karvonen_zone2_b").val(n.getTargetHR(70)),$("#karvonen_zone3_a").val(n.getTargetHR(70)),$("#karvonen_zone3_b").val(n.getTargetHR(80)),$("#karvonen_zone4_a").val(n.getTargetHR(80)),$("#karvonen_zone4_b").val(n.getTargetHR(90)),$("#karvonen_zone5_a").val(n.getTargetHR(90)),$("#karvonen_zone5_b").val(t),$("#karvonen_hrr").val(l)}),$("#calculator_hrzones_friel").submit(function(e){console.log("Calculate Friel Intensity Zones"),e.preventDefault();let a=Number($("#friel_lthr").val());$("#friel_zone1_a").val((.6*a).toFixed(0)),$("#friel_zone1_b").val((.75*a).toFixed(0)),$("#friel_zone2_a").val((.75*a).toFixed(0)),$("#friel_zone2_b").val((.85*a).toFixed(0)),$("#friel_zone3_a").val((.85*a).toFixed(0)),$("#friel_zone3_b").val((.95*a).toFixed(0)),$("#friel_zone4_a").val((.95*a).toFixed(0)),$("#friel_zone4_b").val((1.02*a).toFixed(0)),$("#friel_zone5_a").val((1.02*a).toFixed(0)),$("#friel_zone5_b").val("Maxpuls")}),$("#calculator_hrzones_maxhr").submit(function(e){console.log("Calculate Maxhr Intensity Zones"),e.preventDefault();let a=Number($("#maxhr_max_hr").val());$("#maxhr_zone1_a").val((.65*a).toFixed(0)),$("#maxhr_zone1_b").val((.7*a).toFixed(0)),$("#maxhr_zone2_a").val((.7*a).toFixed(0)),$("#maxhr_zone2_b").val((.8*a).toFixed(0)),$("#maxhr_zone3_a").val((.8*a).toFixed(0)),$("#maxhr_zone3_b").val((.9*a).toFixed(0)),$("#maxhr_zone4_a").val((.88*a).toFixed(0)),$("#maxhr_zone4_b").val((.94*a).toFixed(0)),$("#maxhr_zone5_a").val((.94*a).toFixed(0)),$("#maxhr_zone5_b").val(a)}),$("#calculator_vo2max_distance_test").submit(function(e){console.log("Calculate Distance"),e.preventDefault();let a=Number($("#tid_hours").val()),t=Number($("#tid_min").val()),n=Number($("#tid_sek").val()),l=Number($("#distance").val());t+=60*a,l/=1e3;let r=running_distance_vo2.RunningDistanceVO2();$("#kondital").val(r.getEstimatedFitnessLevel(t,n,l))}),$("#calculator_velocity").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='min']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='distance']").val()),l=running.Running();$("#velocity_kmt").val(l.getKilometersPrHour(n,a,t).toFixed(2)),$("#velocity_ms").val(l.getMeterPerSecond(n,a,t).toFixed(2)),$("#velocity_min_km").val(l.getTimePrKilometer(n,a,t))}),$("#calculator_velocity_speedlight").submit(function(e){console.log("Calculate speedlight"),e.preventDefault();let a=Number($("[name='sec']").val()),t=Number($("[name='hundrededele']").val()),n=Number($("[name='distance']").val())/1e3,l=running.Running();$("#velocity_kmt").val(l.getKilometersPrHour(n,0,a,t).toFixed(2)),$("#velocity_ms").val(l.getMeterPerSecond(n,0,a,t).toFixed(2))}),$("#calculator_velocity_speedlight_advanced").submit(function(e){console.log("Calculate speedlight Advanced"),e.preventDefault();let a=Number($("[name='sec_1']").val()),t=Number($("[name='hundrededele_1']").val()),n=Number($("[name='distance_1']").val())/1e3;console.log("Calculate:"+a+":"+t+" - "+n);let l=running.Running();$("#velocity_kmt_1").val(l.getKilometersPrHour(n,0,a,t).toFixed(2)),$("#velocity_ms_1").val(l.getMeterPerSecond(n,0,a,t).toFixed(2));let r=Number($("[name='sec_2']").val()),o=Number($("[name='hundrededele_2']").val()),i=Number($("[name='distance_2']").val())/1e3;console.log("Calculate:"+r+":"+o+" - "+i),$("#velocity_kmt_2").val(l.getKilometersPrHour(i-n,0,r-a,o-t).toFixed(2)),$("#velocity_ms_2").val(l.getMeterPerSecond(i-n,0,r-a,o-t).toFixed(2));let m=Number($("[name='sec_3']").val()),u=Number($("[name='hundrededele_3']").val()),c=Number($("[name='distance_3']").val())/1e3;console.log("Calculate:"+m+":"+u+" - "+c),$("#velocity_kmt_3").val(l.getKilometersPrHour(c-i,0,m-r,u-o).toFixed(2)),$("#velocity_ms_3").val(l.getMeterPerSecond(c-i,0,m-r,u-o).toFixed(2));let s=Number($("[name='sec_4']").val()),v=Number($("[name='hundrededele_4']").val()),_=Number($("[name='distance_4']").val())/1e3;console.log("Calculate:"+s+":"+v+" - "+_),$("#velocity_kmt_4").val(l.getKilometersPrHour(_-c,0,s-m,v-u).toFixed(2)),$("#velocity_ms_4").val(l.getMeterPerSecond(_-c,0,s-m,v-u).toFixed(2)),$("#velocity_kmt_advanced").val(l.getKilometersPrHour(_,0,s,v).toFixed(2)),$("#velocity_ms_advanced").val(l.getMeterPerSecond(_,0,s,v).toFixed(2))}),$("#calculator_velocity_distance").submit(function(e){console.log("Calculate distance"),e.preventDefault();let a=Number($("[name='dist_min']").val()),t=Number($("[name='dist_sec']").val()),n=Number($("[name='dist_velocity']").val()),l=running.Running();$("#dist_distance").val(l.getDistanceFromTimeAndVelocity(a,t,n).toFixed(1))}),$("#calculator_kipchoge_challenge").submit(function(e){console.log("Calculate time"),e.preventDefault();let a,t,n,l=Number($("[name='velocity']").val()),r=running.Running();(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.1,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t100']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.2,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t200']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.4,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t400']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.6,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t600']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.8,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t800']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1000']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.2,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1200']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.4,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1400']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.6,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1600']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.8,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1800']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(2,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t2000']").val(t+":"+n)}),$("#calculator_velocity_time").submit(function(e){console.log("Calculate time"),e.preventDefault();let a=Number($("[name='time_distance']").val()),t=Number($("[name='time_velocity']").val()),n=running.Running().getTimeFromDistanceAndVelocity(a,t),l=Math.floor(n),r=60*(n-l);$("[name='time_min']").val(l),$("[name='time_sec']").val(r.toFixed(0))}),$("#calculator_how_far_interval").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='min']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='duration_min']").val()),l=Number($("[name='duration_sec']").val()),r=running.Running();$("[name='distance_to_run']").val(r.convertMinPerKmToDistanceForDuration(a,t,n,l).toFixed(0))}),$("#calculator_convert_kmt_minkm_velocity").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='kmt']").val()),t=running.Running();$("#velocity_convert_minkm").val(t.convertKmtToMinPerKm(a))}),$("#calculator_convert_minkm_kmt_velocity").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='minkm_kmt_min']").val()),t=Number($("[name='minkm_kmt_sec']").val()),n=running.Running();$("#velocity_convert_kmt").val(n.convertMinPerKmToKmt(a,t))}),$("#calculator_running_economy").submit(function(e){console.log("Calculate running economy"),e.preventDefault();let a=Number($("[name='weight']").val()),t=Number($("[name='velocity']").val()),n=Number($("[name='oxygenuptake']").val()),l=running_economy.RunningEconomy(n,t);$("#running_economy").val(l.getRunningEconomyInMlPrKgPrMin(a).toFixed(2))}),$("#calculator_oxygen_uptake").submit(function(e){console.log("Calculate oxygen uptake"),e.preventDefault();let a=Number($("[name='fitness_weight']").val()),t=Number($("[name='fitness_oxygenuptake']").val()),n=running_economy.RunningEconomy(a,t);$("#fitness_level").val(n.getFitnessLevel().toFixed(2))}),$("#calculator_cooper_2400_test").submit(function(e){console.log("Calculate CooperTest 2400"),e.preventDefault();let a=Number($("#tid_min").val()),t=Number($("#tid_sek").val()),n=cooper_test.CooperRunning();$("#kondital").val(n.getVO22400MeterTest(a,t))}),$("#calculator_cooper_test").submit(function(e){console.log("Calculate CooperTest"),e.preventDefault();let a=Number($("#distance").val()),t=cooper_test.CooperRunning();$("#kondital").val(t.getVO212MinTest(a).toFixed(0))}),$("#calculator_cooper_reverse_test").submit(function(e){console.log("Calculate CooperTest"),e.preventDefault();let a=Number($("#reverse-kondital").val()),t=cooper_test.CooperRunning();$("#reverse-distance").val(t.getDistanceFromVO2Max(a).toFixed(0))}),$("#calculator_fat_percent_food").submit(function(e){console.log("Calculate Fat Energy Pct"),e.preventDefault();let a=Number($("#kj").val()),t=Number($("#fat").val()),n=fatenergypct.FatEnergyPct(a,t);$("#fat_energy_pct").val(n.getFatEnergyPct())}),$("#calculator_waist").submit(function(e){console.log("Calculate Waist"),e.preventDefault();let a=Number($("#hip").val()),t=Number($("#waist").val()),n=Number($("#height").val()),l=whr.WaistRatio();$("#whr").val(l.getWaistHipRatio(t,a).toFixed(2)),$("#waistheightratio").val(l.getWaistHeightRatio(t,n).toFixed(2))}),$("[input='number']").on("input keyup change paste",function(){this.min&&(this.value=Math.max(parseInt(this.min),parseInt(this.value))),this.max&&(this.value=Math.min(parseInt(this.max),parseInt(this.value)))}),$(".adductor-longus").hover(function(){$(".adductor-longus").toggleClass("anatomy-popup-on")}),$(".adductor-magnus").hover(function(){$(".adductor-magnus").toggleClass("anatomy-popup-on")}),$(".anconeus").hover(function(){$(".anconeus").toggleClass("anatomy-popup-on")}),$(".biceps-brachii").hover(function(){$(".biceps-brachii").toggleClass("anatomy-popup-on")}),$(".biceps-femoris").hover(function(){$(".biceps-femoris").toggleClass("anatomy-popup-on")}),$(".brachioradialis").hover(function(){$(".brachioradialis").toggleClass("anatomy-popup-on")}),$(".deltoideus").hover(function(){$(".deltoideus").toggleClass("anatomy-popup-on")}),$(".extensor-carpi-radialis-longus").hover(function(){$(".extensor-carpi-radialis-longus").toggleClass("anatomy-popup-on")}),$(".extensor-carpi-ulnaris").hover(function(){$(".extensor-carpi-ulnaris").toggleClass("anatomy-popup-on")}),$(".extensor-digitori-minimi").hover(function(){$(".extensor-digitori-minimi").toggleClass("anatomy-popup-on")}),$(".extensor-digitorum").hover(function(){$(".extensor-digitorum").toggleClass("anatomy-popup-on")}),$(".external-oblique").hover(function(){$(".external-oblique").toggleClass("anatomy-popup-on")}),$(".flexor-carpi-radialis").hover(function(){$(".flexor-carpi-radialis").toggleClass("anatomy-popup-on")}),$(".flexor-carpi-ulnaris").hover(function(){$(".flexor-carpi-ulnaris").toggleClass("anatomy-popup-on")}),$(".gastrocnemius").hover(function(){$(".gastrocnemius").toggleClass("anatomy-popup-on")}),$(".gluteus-maximus").hover(function(){$(".gluteus-maximus").toggleClass("anatomy-popup-on")}),$(".gluteus-medius").hover(function(){$(".gluteus-medius").toggleClass("anatomy-popup-on")}),$(".gracilis").hover(function(){$(".gracilis").toggleClass("anatomy-popup-on")}),$(".infraspinatus").hover(function(){$(".infraspinatus").toggleClass("anatomy-popup-on")}),$(".internal-oblique").hover(function(){$(".internal-oblique").toggleClass("anatomy-popup-on")}),$(".latissimus-dorsi").hover(function(){$(".latissimus-dorsi").toggleClass("anatomy-popup-on")}),$(".pectineus").hover(function(){$(".pectineus").toggleClass("anatomy-popup-on")}),$(".pectoralis-major").hover(function(){$(".pectoralis-major").toggleClass("anatomy-popup-on")}),$(".rectus-abdominis").hover(function(){$(".rectus-abdominis").toggleClass("anatomy-popup-on")}),$(".rectus-femoris").hover(function(){$(".rectus-femoris").toggleClass("anatomy-popup-on")}),$(".sartorius").hover(function(){$(".sartorius").toggleClass("anatomy-popup-on")}),$(".semimembranosus").hover(function(){$(".semimembranosus").toggleClass("anatomy-popup-on")}),$(".semitendinosus").hover(function(){$(".semitendinosus").toggleClass("anatomy-popup-on")}),$(".serratus-anterior").hover(function(){$(".serratus-anterior").toggleClass("anatomy-popup-on")}),$(".soleus").hover(function(){$(".soleus").toggleClass("anatomy-popup-on")}),$(".teres-major").hover(function(){$(".teres-major").toggleClass("anatomy-popup-on")}),$(".tibialis-anterior").hover(function(){$(".tibialis-anterior").toggleClass("anatomy-popup-on")}),$(".trapezius").hover(function(){$(".trapezius").toggleClass("anatomy-popup-on")}),$(".triceps-brachii").hover(function(){$(".triceps-brachii").toggleClass("anatomy-popup-on")}),$(".vastus-lateralis").hover(function(){$(".vastus-lateralis").toggleClass("anatomy-popup-on")}),$(".vastus-medialis").hover(function(){$(".vastus-medialis").toggleClass("anatomy-popup-on")})}); +"use strict";const rpe=require("./rpe-strength"),how_tall=require("./how-tall"),water=require("./water-intake"),inol=require("./inol"),ipfpoints=require("./ipf-points"),mcculloch=require("./ipf-points-mcculloch"),ybalance=require("./y-balance"),lung=require("./lung"),blood=require("./blood"),andersen=require("./andersen-test"),jog=require("./fitness-jogging"),jump_reach=require("./jumpreach"),tee_pal=require("./bmr-totalenergy-pal"),schofield=require("./bmr-schofield"),vmax_bike=require("./vmax"),vmax_intervals=require("./vmax-intervals"),billat=require("./billat"),runwalk=require("./running-walking"),runwalkenergy=require("./running-walking-energy.js"),pandolf=require("./running-walking-pandolf.js"),leger=require("./running-walking-leger.js"),pushup=require("./pushup"),yyir1=require("./beeptest-yyir1"),beeptest=require("./beeptest"),fitness=require("./fitness-hr"),maxhr=require("./max-hr"),cooper=require("./cooper"),cooper_test=require("./cooper-running"),running_weightchange=require("./running-weightloss"),riegel=require("./riegel"),fat=require("./fat-pct"),fp_navy=require("./fat-pct-navy"),fatm=require("./fat-pct-measurements"),rm=require("./1rm"),etpunkt=require("./etpunkttest"),borg15=require("./borg15"),topunkt=require("./topunkttest"),bmr_benedict_harris=require("./bmr-benedict-harris"),bmr_equilibrium=require("./bmr-ligevaegt"),ree=require("./bmr-nordic-2012"),bmi=require("./bmi"),bmievaluation=require("./bmi-evaluation"),ponderalindex=require("./ponderal-index"),idealweight=require("./ideal-weight"),karvonen=require("./karvonen"),index23=require("./fitness-index-23"),running=require("./running"),running_distance_vo2=require("./running-distance-vo2"),running_economy=require("./running-economy"),index100=require("./index100"),skinfold_durnin=require("./skinfold-durnin"),skinfold_peterson=require("./skinfold-peterson"),skinfold_pollock=require("./skinfold-pollock"),skinfold_lohman=require("./skinfold-lohman"),skinfold_slaughter=require("./skinfold-slaughter"),rockport=require("../js/walktest-rockport-16"),walktest_sixminutes=require("../js/walktest-sixminutes"),fatenergypct=require("../js/fatenergypct"),whr=require("../js/waist"),tbw=require("../js/bodywater"),wattmax=require("../js/wattmax"),hr_intensity=require("../js/hr-intensity"),wilks=require("wilks-calculator"),treadmill=require("../js/treadmill"),flyer_handicap=require("../js/flyer-handicap"),rowing_power_calculator=require("../js/rowing-power-calculator"),rowing_vo2=require("../js/rowing-vo2"),rowing_powerprofile=require("../js/rowing-ergrowing"),rer=require("../js/rer"),vam=require("../js/vam");require("image-map-resizer"),$(function(){$("map").imageMapResize(),$('.rating input[name="rating"]').one("click",function(){console.log("Clicked star");let e=Number(1*$("#votes").text());$("#votes").text(e+1)}),$("#target_bmi_man").change(function(){console.log("Ready to calculate"),$("table#idealweight > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html(),n=Number($("#target_bmi_man").val()),l=idealweight.IdealWeight(t,"man").getPeterson(n);$(this).find("td").eq(1).html(l.toFixed(0))})}),$("#maxhr_age").change(function(){console.log("Ready to calculate");let e=Number($("#maxhr_age").val()),a=maxhr.EstimateMaxHr(e,"tanaka");$("#maxhr_tanaka").text(a.getMaxHr().toFixed(0));let t=maxhr.EstimateMaxHr(e,"fox");$("#maxhr_fox").text(t.getMaxHr().toFixed(0));let n=maxhr.EstimateMaxHr(e,"gellish_linear");$("#maxhr_gellish_linear").text(n.getMaxHr().toFixed(0));let l=maxhr.EstimateMaxHr(e,"gellish");$("#maxhr_gellish").text(l.getMaxHr().toFixed(0));let r=maxhr.EstimateMaxHr(e,"nes");$("#maxhr_nes").text(r.getMaxHr().toFixed(0));let o=maxhr.EstimateMaxHr(e,"arena");$("#maxhr_arena").text(o.getMaxHr().toFixed(0));let i=maxhr.EstimateMaxHr(e,"aastrand");$("#maxhr_aastrand").text(i.getMaxHr().toFixed(0));let m=maxhr.EstimateMaxHr(e,"inbar");$("#maxhr_inbar").text(m.getMaxHr().toFixed(0));let u=maxhr.EstimateMaxHr(e,"londeree_moeschberger");$("#maxhr_londeree_moeschberger").text(u.getMaxHr().toFixed(0))}),$("#maxhr_age_men_women").change(function(){console.log("Ready to calculate");let e=Number($("#maxhr_age_men_women").val()),a=maxhr.EstimateMaxHr(e,"fairbarn_female");$("#maxhr_fairbarn_female").text(a.getMaxHr().toFixed(0));let t=maxhr.EstimateMaxHr(e,"fairbarn_male");$("#maxhr_fairbarn_male").text(t.getMaxHr().toFixed(0));let n=maxhr.EstimateMaxHr(e,"whyte_female");$("#maxhr_whyte_female").text(n.getMaxHr().toFixed(0));let l=maxhr.EstimateMaxHr(e,"whyte_male");$("#maxhr_whyte_male").text(l.getMaxHr().toFixed(0))}),$("#target_bmi_woman").change(function(){console.log("Ready to calculate"),$("table#idealweight > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html(),n=Number($("#target_bmi_woman").val()),l=idealweight.IdealWeight(t,"woman").getPeterson(n);$(this).find("td").eq(2).html(l.toFixed(0))})}),$("#smolov_jr").submit(function(e){console.log("Calculate 1RM"),e.preventDefault()}),$("#smolov_jr").change(function(){console.log("Ready to calculate Smolov Jr");let e=Number($("#one_rep_max").val());$("table#smolov_jr_week_1 > tbody > tr").each(function(a,t){let n=$(this).find("td").eq(1).html().replace(/[^0-9]/g,""),l=e*n/100;console.log(e+" "+n+" "+l),$(this).find("td").eq(4).html(l.toFixed(2))}),$("table#smolov_jr_week_2 > tbody > tr").each(function(a,t){let n=Number($("#increment_1").val()),l=$(this).find("td").eq(1).html().replace(/[^0-9]/g,""),r=e*l/100+n;console.log(e+" "+l+" "+r),$(this).find("td").eq(2).html("+"+n.toFixed(1)+" kg"),$(this).find("td").eq(5).html(r.toFixed(2))}),$("table#smolov_jr_week_3 > tbody > tr").each(function(a,t){let n=Number($("#increment_1").val()),l=Number($("#increment_2").val()),r=$(this).find("td").eq(1).html().replace(/[^0-9]/g,""),o=e*(r/100)+n+l;console.log(e+" "+r+" "+o),$(this).find("td").eq(2).html("+"+l.toFixed(1)+" kg"),$(this).find("td").eq(5).html(o.toFixed(2))})}),$("#step_man").change(function(){console.log("Ready to calculate"),$("table#steps > tbody > tr").each(function(e,a){let t=1e3*$(this).find("td:first").html()/($("#step_man").val()/100);$(this).find("td").eq(1).html(t.toFixed(0))})}),$("#step_woman").change(function(){console.log("Ready to calculate"),$("table#steps > tbody > tr").each(function(e,a){let t=1e3*$(this).find("td:first").html()/($("#step_woman").val()/100);$(this).find("td").eq(2).html(t.toFixed(0))})}),$("#step_length_man").change(function(){console.log("Ready to calculate"),$("table#steps_to_km > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html()*$("#step_length_man").val()/1e3/100;$(this).find("td").eq(1).html(t.toFixed(2))})}),$("#step_length_woman").change(function(){console.log("Ready to calculate"),$("table#steps_to_km > tbody > tr").each(function(e,a){let t=$(this).find("td:first").html()*$("#step_length_woman").val()/1e3/100;$(this).find("td").eq(2).html(t.toFixed(2))})}),$("#form-formula").ready(function(){$(".reynolds").hide()}),$("#form-formula").change(function(){"reynolds"==$("#form-formula").val()?$(".reynolds").show():$(".reynolds").hide()}),$("#calculator_running_walking").ready(function(){$(".walk-met").hide(),$(".run-met").hide(),$(".met-explanation").hide()}),$("#calculator_walking_energy").ready(function(){$(".walk-met").hide(),$(".met-explanation").hide(),$(".walk-pandolf").hide()}),$("#bmi-evaluation-criteria").ready(function(){$("#bmi-evaluation-criteria").hide()}),$("#calculator_bmi").change(function(){Number($("[name='age']").val())<18?$("#bmi-evaluation-criteria").hide():$("#bmi-evaluation-criteria").show()}),$("#calculator_running_walking").change(function(){"met"==$("#formula-energy-running").val()?($(".run-met").show(),$(".met-explanation").show(),$(".run-ascm").hide()):($(".run-met").hide(),$(".run-ascm").show()),"met"==$("#formula-energy-walking").val()?($(".walk-met").show(),$(".met-explanation").show(),$(".walk-ascm").hide()):($(".walk-met").hide(),$(".walk-ascm").show())}),$("#calculator_walking_energy").change(function(){"met"==$("#formula-walking-energy").val()?($(".walk-met").show(),$(".met-explanation").show(),$(".walk-ascm").hide(),$(".walk-pandolf").hide()):"pandolf"==$("#formula-walking-energy").val()?($(".walk-ascm").show(),$(".walk-met").hide(),$(".met-explanation").hide(),$(".walk-pandolf").show()):($(".walk-met").hide(),$(".walk-ascm").show(),$(".met-explanation").hide(),$(".walk-pandolf").hide())}),$("#calculator_rm").submit(function(e){let a;console.log("Calculate 1RM"),e.preventDefault();let t=$("#form-formula").val(),n=Number($("#form-reps").val()),l=Number($("#form-weight").val()),r=$("#form-bodypart").val(),o=rm.Estimate1RM(l,n);"brzycki"==t?(a=o.getBrzycki(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getBrzycki(2).toFixed(1)),$("#rm3").val(o.getBrzycki(3).toFixed(1)),$("#rm4").val(o.getBrzycki(4).toFixed(1)),$("#rm5").val(o.getBrzycki(5).toFixed(1)),$("#rm6").val(o.getBrzycki(6).toFixed(1)),$("#rm8").val(o.getBrzycki(8).toFixed(1)),$("#rm10").val(o.getBrzycki(10).toFixed(1)),$("#rm12").val(o.getBrzycki(12).toFixed(1)),$("#rm15").val(o.getBrzycki(15).toFixed(1))):"reynolds"==t?(a=o.getReynolds(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getReynolds(r,2).toFixed(1)),$("#rm3").val(o.getReynolds(r,3).toFixed(1)),$("#rm4").val(o.getReynolds(r,4).toFixed(1)),$("#rm5").val(o.getReynolds(r,5).toFixed(1)),$("#rm6").val(o.getReynolds(r,6).toFixed(1)),$("#rm8").val(o.getReynolds(r,8).toFixed(1)),$("#rm10").val(o.getReynolds(r,10).toFixed(1)),$("#rm12").val(o.getReynolds(r,12).toFixed(1)),$("#rm15").val(o.getReynolds(r,15).toFixed(1))):"epley"==t?(a=o.getEpley(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getEpley(2).toFixed(1)),$("#rm3").val(o.getEpley(3).toFixed(1)),$("#rm4").val(o.getEpley(4).toFixed(1)),$("#rm5").val(o.getEpley(5).toFixed(1)),$("#rm6").val(o.getEpley(6).toFixed(1)),$("#rm8").val(o.getEpley(8).toFixed(1)),$("#rm10").val(o.getEpley(10).toFixed(1)),$("#rm12").val(o.getEpley(12).toFixed(1)),$("#rm15").val(o.getEpley(15).toFixed(1))):"lander"==t?(a=o.getLander(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getLander(2).toFixed(1)),$("#rm3").val(o.getLander(3).toFixed(1)),$("#rm4").val(o.getLander(4).toFixed(1)),$("#rm5").val(o.getLander(5).toFixed(1)),$("#rm6").val(o.getLander(6).toFixed(1)),$("#rm8").val(o.getLander(8).toFixed(1)),$("#rm10").val(o.getLander(10).toFixed(1)),$("#rm12").val(o.getLander(12).toFixed(1)),$("#rm15").val(o.getLander(15).toFixed(1))):"lombardi"==t?(a=o.getLombardi(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getLombardi(2).toFixed(1)),$("#rm3").val(o.getLombardi(3).toFixed(1)),$("#rm4").val(o.getLombardi(4).toFixed(1)),$("#rm5").val(o.getLombardi(5).toFixed(1)),$("#rm6").val(o.getLombardi(6).toFixed(1)),$("#rm8").val(o.getLombardi(8).toFixed(1)),$("#rm10").val(o.getLombardi(10).toFixed(1)),$("#rm12").val(o.getLombardi(12).toFixed(1)),$("#rm15").val(o.getLombardi(15).toFixed(1))):"mayhew"==t?(a=o.getMayhew(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getMayhew(2).toFixed(1)),$("#rm3").val(o.getMayhew(3).toFixed(1)),$("#rm4").val(o.getMayhew(4).toFixed(1)),$("#rm5").val(o.getMayhew(5).toFixed(1)),$("#rm6").val(o.getMayhew(6).toFixed(1)),$("#rm8").val(o.getMayhew(8).toFixed(1)),$("#rm10").val(o.getMayhew(10).toFixed(1)),$("#rm12").val(o.getMayhew(12).toFixed(1)),$("#rm15").val(o.getMayhew(15).toFixed(1))):"oconnor"==t?(a=o.getOconnor(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getOconnor(2).toFixed(1)),$("#rm3").val(o.getOconnor(3).toFixed(1)),$("#rm4").val(o.getOconnor(4).toFixed(1)),$("#rm5").val(o.getOconnor(5).toFixed(1)),$("#rm6").val(o.getOconnor(6).toFixed(1)),$("#rm8").val(o.getOconnor(8).toFixed(1)),$("#rm10").val(o.getOconnor(10).toFixed(1)),$("#rm12").val(o.getOconnor(12).toFixed(1)),$("#rm15").val(o.getOconnor(15).toFixed(1))):"wathan"==t?(a=o.getWathan(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getWathan(2).toFixed(1)),$("#rm3").val(o.getWathan(3).toFixed(1)),$("#rm4").val(o.getWathan(4).toFixed(1)),$("#rm5").val(o.getWathan(5).toFixed(1)),$("#rm6").val(o.getWathan(6).toFixed(1)),$("#rm8").val(o.getWathan(8).toFixed(1)),$("#rm10").val(o.getWathan(10).toFixed(1)),$("#rm12").val(o.getWathan(12).toFixed(1)),$("#rm15").val(o.getWathan(15).toFixed(1))):"wendler"==t&&(a=o.getWendler(),$("#rm1").val(a.toFixed(1)),$("#rm2").val(o.getWendler(2).toFixed(1)),$("#rm3").val(o.getWendler(3).toFixed(1)),$("#rm4").val(o.getWendler(4).toFixed(1)),$("#rm5").val(o.getWendler(5).toFixed(1)),$("#rm6").val(o.getWendler(6).toFixed(1)),$("#rm8").val(o.getWendler(8).toFixed(1)),$("#rm10").val(o.getWendler(10).toFixed(1)),$("#rm12").val(o.getWendler(12).toFixed(1)),$("#rm15").val(o.getWendler(15).toFixed(1))),$("#p100").val(o.getPercentOfRm(a,100).toFixed(1)),$("#p95").val(o.getPercentOfRm(a,95).toFixed(1)),$("#p90").val(o.getPercentOfRm(a,90).toFixed(1)),$("#p85").val(o.getPercentOfRm(a,85).toFixed(1)),$("#p80").val(o.getPercentOfRm(a,80).toFixed(1)),$("#p75").val(o.getPercentOfRm(a,75).toFixed(1)),$("#p70").val(o.getPercentOfRm(a,70).toFixed(1)),$("#p60").val(o.getPercentOfRm(a,60).toFixed(1)),$("#p50").val(o.getPercentOfRm(a,50).toFixed(1)),$("#p40").val(o.getPercentOfRm(a,40).toFixed(1))}),$("#calculator_ftp").submit(function(e){console.log("Calculate FTP"),e.preventDefault();let a=Number($("#ftp").val());$("#ftp_value").text(a),$("#ftp_recovery").val("<"+(.56*a).toFixed(0)),$("#ftp_endurance").val((.56*a).toFixed(0)+"-"+(.76*a).toFixed(0)),$("#ftp_tempo").val((.76*a).toFixed(0)+"-"+(.91*a).toFixed(0)),$("#ftp_ftp").val((.91*a).toFixed(0)+"-"+(1.06*a).toFixed(0)),$("#ftp_vo2").val((1.06*a).toFixed(0)+"-"+(1.21*a).toFixed(0)),$("#ftp_anaerob").val((1.21*a).toFixed(0)+"-"+(1.5*a).toFixed(0))}),$("#calculator_ftp_cp").submit(function(e){console.log("Calculate FTP CP"),e.preventDefault();let a=Number($("#zone_cp").val())*Number($("#zone_adjust").val())/100;$("#ftp_value").text(a.toFixed(0)),$("#ftp_recovery").val("<"+(.56*a).toFixed(0)),$("#ftp_endurance").val((.56*a).toFixed(0)+"-"+(.76*a).toFixed(0)),$("#ftp_tempo").val((.76*a).toFixed(0)+"-"+(.91*a).toFixed(0)),$("#ftp_ftp").val((.91*a).toFixed(0)+"-"+(1.06*a).toFixed(0)),$("#ftp_vo2").val((1.06*a).toFixed(0)+"-"+(1.21*a).toFixed(0)),$("#ftp_anaerob").val((1.21*a).toFixed(0)+"-"+(1.5*a).toFixed(0))}),$("#calculator_ftpa").submit(function(e){console.log("Calculate FTPa"),e.preventDefault();let a=Number($("#ftpa").val());$("#ftpa_value").text(a),$("#ftpa_recovery").val("<"+(1.29*a).toFixed(0)),$("#ftpa_endurance").val((1.14*a).toFixed(0)+"-"+(1.29*a).toFixed(0)),$("#ftpa_tempo").val((1.06*a).toFixed(0)+"-"+(1.14*a).toFixed(0)),$("#ftpa_ftp").val((1.01*a).toFixed(0)+"-"+(1.05*a).toFixed(0)),$("#ftpa_vo2").val((.97*a).toFixed(0)+"-"+(1.01*a).toFixed(0)),$("#ftpa_anaerob").val((.9*a).toFixed(0)+"-"+(.97*a).toFixed(0))}),$("#calculator_koffein").submit(function(e){console.log("Calculate Koffein"),e.preventDefault();let a=$("#body_weight").val(),t=$("#koffein_intake_kg").val()*a;$("#koffein_intake").val(t)}),$("#calculator_kreatin").submit(function(e){console.log("Calculate Kreatin"),e.preventDefault();let a=$("#body_weight").val(),t=$("#kreatin_intake_kg").val()*a;$("#kreatin_intake").val(t)}),$("#calculator_vam").submit(function(e){console.log("Calculate VAM"),e.preventDefault();let a=Number($("[name='distance_climbed']").val()),t=Number($("[name='gradient']").val()),n=Number($("[name='tid_min']").val()),l=Number($("[name='tid_sek']").val()),r=vam.VAM(a,n,l);$("#vam").val(r.getVAM().toFixed(0)),$("#gradient_factor").val(r.getGradientFactor(t).toFixed(2)),$("#relative_power").val(r.getRelativePower(t).toFixed(2))}),$("#calculator_kroppens_rumfang").submit(function(e){console.log("Calculate Kroppens Rumfang"),e.preventDefault();let a=Number($("[name='weight']").val()),t=Number($("[name='density']").val());$("[name='kroppens_rumfang']").val((a/t).toFixed(5))}),$("#calculator_rpe_strength").submit(function(e){console.log("Calculate RPE Strength"),e.preventDefault();let a=Number($("[name='have_weight']").val()),t=Number($("[name='have_reps']").val()),n=Number($("[name='have_rpe']").val()),l=Number($("[name='want_reps']").val()),r=Number($("[name='want_rpe']").val()),o=rpe.RPEStrength(a,t,n);$("[name='e1rm']").val(o.getE1RM().toFixed(1)),$("[name='want_weight']").val(o.getWantWeight(l,r).toFixed(1))}),$("#calculator_fat_bai").submit(function(e){console.log("Calculate BAI"),e.preventDefault();let a=Number($("[name='hc']").val()),t=Number($("[name='hm']").val()/100),n=a/Math.pow(t,1.5)-18;$("[name='bai']").val(n.toFixed(1))}),$("#calculator_maffetone").submit(function(e){console.log("Calculate Maffetone"),e.preventDefault();let a=Number($("[name='age']").val()),t=Number($("[name='category']:checked").val());$("[name='mahr']").val((180-a+t).toFixed(0))}),$("#calculator_cooper_mortality").submit(function(e){console.log("Calculate Cooper"),e.preventDefault();let a=Number($("#age").val()),t=Number($("#hrrest").val()),n=$("#bloodpressure").val(),l=$("#diabetes").val(),r=$("#smoker").val(),o=Number($("#bmi").val()),i=Number($("#kondital").val()),m=cooper.CooperClinicMortalityRiskIndex(a,t,n,l,r,o,i);$("#risk_points").val(m.getRiskPoint()),$("#absolute_risk").val(m.getAbsoluteRisk()),$("#relative_risk").val(m.getRelativeRisk())}),$("#calculator_fat_percent_navy").ready(function(){$(".navy-hip").hide()}),$("#calculator_fat_percent_navy").change(function(){$("#checkbox-woman").is(":checked")?$(".navy-hip").show():$(".navy-hip").hide()}),$("#calculator_ybalance").submit(function(e){console.log("Y-balance"),e.preventDefault();let a=Number($("[name='limb_length']").val()),t=Number($("[name='anterior']").val()),n=Number($("[name='posterolateral']").val()),l=Number($("[name='posteromedial']").val()),r=ybalance.YBalance(t,n,l);$("[name='absolute_score']").val(r.getAbsoluteReachDistance().toFixed(0)),$("[name='relative_score']").val(r.getRelativeReachScore(a).toFixed(0)),$("[name='composite_score']").val(r.getCompositeReachScore(a).toFixed(0))}),$("#calculator_treadmill").submit(function(e){console.log("Treadmill"),e.preventDefault();let a=Number($("[name='gradient']").val()),t=Number($("[name='speed']").val()),n=Number($("[name='time']").val()),l=Number($("[name='distance']").val()),r=Number($("[name='weight']").val()),o=treadmill.Treadmill(a,t,n,l,r);$("[name='speed_gradient']").val(o.getGradientCorrectedSpeed().toFixed(2)),$("[name='distance_gradient']").val(o.getGradientCorrectedDistance().toFixed(2)),$("[name='time_gradient']").val(o.getGradientCorrectedDistance().toFixed(2)),$("[name='speed_calculated']").val(o.getSpeed().toFixed(0)),$("[name='distance_calculated']").val(o.getDistance().toFixed(0)),$("[name='time_calculated']").val(o.getTime().toFixed(0)),$("[name='kcal']").val(o.getKcal().toFixed(0)),$("[name='kj']").val(o.getKj().toFixed(0)),$("[name='kwh']").val(o.getKwh().toFixed(2)),$("[name='mets']").val(o.getMets().toFixed(1)),$("[name='gradient_calculated']").val(a)}),$("#calculator_fat_percent_navy").submit(function(e){console.log("Fat percent navy"),e.preventDefault();let a=$("[name='sex']:checked").val(),t=Number($("[name='height']").val()),n=Number($("[name='waist']").val()),l=Number($("[name='neck']").val()),r=Number($("[name='hip']").val()),o=fp_navy.CalculateFatPercentNavy(a,t,n,l,r);$("#fat_percent_navy").val(o.getFatPercent().toFixed(2))}),$("#calculator_wave_ladder").submit(function(e){console.log("Calculate Wave Ladder"),e.preventDefault();let a=Number($("[name='wave_ladder_1rm']").val()),t=Number($("[name='wave_ladder_intensity']").val()),n=Number($("[name='wave_ladder_2_plus']").val()),l=Number($("[name='wave_ladder_3_plus']").val()),r=a*t/100;$("#wave_ladder_1_1").val(r),$("#wave_ladder_1_2").val(r),$("#wave_ladder_1_3").val(r),$("#wave_ladder_2_1").val(r+n),$("#wave_ladder_2_2").val(r+n),$("#wave_ladder_2_3").val(r+n),$("#wave_ladder_3_1").val(r+n+l),$("#wave_ladder_3_2").val(r+n+l),$("#wave_ladder_3_3").val(r+n+l)}),$("#calculator_wave_traditional").submit(function(e){console.log("Calculate Wave Traditional"),e.preventDefault();let a=Number($("[name='wave_traditional_1rm']").val()),t=Number($("[name='wave_traditional_intensity_1']").val()),n=Number($("[name='wave_traditional_intensity_2']").val()),l=Number($("[name='wave_traditional_intensity_3']").val()),r=Number($("[name='wave_traditional_2_plus']").val()),o=Number($("[name='wave_traditional_3_plus']").val()),i=a*t/100,m=a*n/100,u=a*l/100;$("#wave_traditional_1_1").val(i),$("#wave_traditional_1_2").val(m),$("#wave_traditional_1_3").val(u),$("#wave_traditional_2_1").val(i+r),$("#wave_traditional_2_2").val(m+r),$("#wave_traditional_2_3").val(u+r),$("#wave_traditional_3_1").val(i+r+o),$("#wave_traditional_3_2").val(m+r+o),$("#wave_traditional_3_3").val(u+r+o)}),$("#calculator_step_to_km").submit(function(e){console.log("Steps to km"),e.preventDefault();let a=Number($("[name='steps']").val())*Number($("[name='step_to_km_step_length']").val())/1e5;$("#step_to_km_km").val(a)}),$("#calculator_kj_kcal").submit(function(e){console.log("kj to kcal"),e.preventDefault();let a=Number($("[name='kj_kcal_kj']").val())/4.184;$("[name='kj_kcal_kcal']").val(a.toFixed(2))}),$("#calculator_kcal_kj").submit(function(e){console.log("kcal to kj"),e.preventDefault();let a=4.184*Number($("[name='kcal_kj_kcal']").val());$("[name='kcal_kj_kj']").val(a.toFixed(2))}),$("#calculator_billat").submit(function(e){console.log("Billat"),e.preventDefault();let a=Number($("[name='distance']").val()),t=billat.Billat(a);$("#speed").val(t.getVelocity().toFixed(2)),$("#d30").val(t.getDistance30()),$("#r30").val(t.getRecovery30()),$("#d60").val(t.getDistance60()),$("#r60").val(t.getRecovery60()),$("#session").val(t.getDistance3min()),$("#mins").val(t.getMinutes3min()),$("#secs").val(t.getSeconds3min()),$("#secs400").val(t.getTimePr400Meter3min())}),$("[name='peterson_target_bmi']").change(function(){$("#calculator_idealweight").submit()}),$("[name='zacho_target_bmi']").change(function(){$("#calculator_idealweight").submit()}),$("#calculator_idealweight").submit(function(e){console.log("Idealweight"),e.preventDefault();let a=$("[name='sex']:checked").val(),t=Number($("[name='height']").val()),n=idealweight.IdealWeight(t,a);""==$("[name='zacho_target_bmi']").val()&&(n.isMale()?$("[name='zacho_target_bmi']").val(24.5):$("[name='zacho_target_bmi']").val(22.5));let l=Number($("[name='peterson_target_bmi']").val()),r=Number($("[name='zacho_target_bmi']").val()),o=Number($("[name='bodytype']").val());$("[name='idealweight_robinson']").val(n.getRobinson().toFixed(1)),$("[name='idealweight_miller']").val(n.getMiller().toFixed(1)),$("[name='idealweight_hamwi']").val(n.getHamwi().toFixed(1)),$("[name='idealweight_devine']").val(n.getDevine().toFixed(1)),$("[name='idealweight_peterson']").val(n.getPeterson(l).toFixed(1)),$("[name='idealweight_zacho']").val(n.getIdealWeightBasedOnBMI(r).toFixed(1)),$("[name='idealweight_robinson_bodytype']").val((n.getRobinson()*o).toFixed(1)),$("[name='idealweight_miller_bodytype']").val((n.getMiller()*o).toFixed(1)),$("[name='idealweight_hamwi_bodytype']").val((n.getHamwi()*o).toFixed(1)),$("[name='idealweight_devine_bodytype']").val((n.getDevine()*o).toFixed(1)),$("[name='idealweight_peterson_bodytype']").val((n.getPeterson(l)*o).toFixed(1)),$("[name='idealweight_zacho_bodytype']").val((n.getIdealWeightBasedOnBMI(r)*o).toFixed(1))}),$("#calculator_running_walking").submit(function(e){console.log("Running Walking Energy Expenditure"),e.preventDefault();let a,t,n,l,r=Number($("[name='weight']").val());console.log($("#formula-energy-walking").val()),console.log($("#formula-energy-running").val()),"met"==$("#formula-energy-walking").val()?(l=Number($("[name='walking']").val()),a=runwalk.RunningWalking("walking",l,r)):"pandolf"==$("#formula-energy-walking").val()?(l=Number($("[name='walk_velocity']").val()),a=pandolf.RunningWalkingEnergyExpenditurePandolf(r,l)):(l=Number($("[name='walk_velocity']").val()),a=runwalkenergy.RunningWalkingEnergyExpenditure("walking",r,l)),"met"==$("#formula-energy-running").val()?(n=Number($("[name='running']").val()),t=runwalk.RunningWalking("running",n,r)):"leger"==$("#formula-energy-running").val()?(n=Number($("[name='run_velocity']").val()),t=leger.RunningWalkingEnergyExpenditureLeger(r,n)):(n=Number($("[name='run_velocity']").val()),t=runwalkenergy.RunningWalkingEnergyExpenditure("running",r,n));let o=t.getCaloriesPrKilometer()/a.getCaloriesPrKilometer(),i=t.getCaloriesPrMinute()/a.getCaloriesPrMinute();$("#walking-velocity").text(l+" km/t"),$("#running-velocity").text(n+" km/t"),$("#calories_walking_kilometer").val(a.getCaloriesPrKilometer().toFixed(0)),$("#calories_walking_minute").val(a.getCaloriesPrMinute().toFixed(0)),$("#calories_running_minute").val(t.getCaloriesPrMinute().toFixed(0)),$("#calories_running_kilometer").val(t.getCaloriesPrKilometer().toFixed(0)),$("#ratio_kilometer").val(o.toFixed(1)),$("#ratio_minute").val(i.toFixed(1))}),$("#calculator_walking_energy").submit(function(e){console.log("Running Walking Energy Expenditure"),e.preventDefault();let a,t,n=Number($("[name='weight']").val());if(console.log($("#formula-walking-energy").val()),"met"==$("#formula-walking-energy").val())t=Number($("[name='walking']").val()),a=runwalk.RunningWalking("walking",t,n);else if("pandolf"==$("#formula-walking-energy").val()){t=Number($("[name='walk_velocity']").val());let e=Number($("[name='walk_grade']").val()),l=Number($("[name='walk_load']").val());a=pandolf.RunningWalkingEnergyExpenditurePandolf(n,t,e,l)}else{t=Number($("[name='walk_velocity']").val());let e=Number($("[name='walk_grade']").val());a=runwalkenergy.RunningWalkingEnergyExpenditure("walking",n,e)}console.log(t);let l=60*$("#time").val(),r=a.getCaloriesPrMinute()*l;$("#calories_walking_kilometer").val(a.getCaloriesPrKilometer().toFixed(0)),$("#calories_walking_minute").val(a.getCaloriesPrMinute().toFixed(1)),$("#calories_walking_total").val(r.toFixed(0))}),$("#calculator_jump_reach_height").submit(function(e){console.log("Jump Reach test"),e.preventDefault();let a=Number($("[name='standing_height']").val()),t=Number($("[name='jumping_height']").val());$("[name='jump_reach_height_score']").val(t-a)}),$("#calculator_jump_reach_power").submit(function(e){console.log("Jump Reach test"),e.preventDefault();let a=$("[name='jump-reach-formula']").val(),t=Number($("[name='body_weight']").val()),n=Number($("[name='body_height']").val()),l=Number($("#jump_reach_height_score").val());console.log(a+" "+t+" "+n+" "+l);let r=jump_reach.JumpReach(a,l,t,n);$("[name='average_power']").val(r.getAveragePower()),$("[name='peak_power']").val(r.getPeakPower())}),$("#calculator_jump_cmj").submit(function(e){console.log("CMJ test"),e.preventDefault();let a=Number($("[name='cmj_flight_time']").val());console.log("CMJ flight time "+a);let t=9.81*Math.pow(a,2)/8;t*=100,$("[name='cmj_jump_height']").val(t.toFixed(2))}),$("#calculator_dsi").submit(function(e){console.log("DSI test"),e.preventDefault();let a=Number($("[name='dsi_peak_force_max_strength']").val()),t=Number($("[name='dsi_peak_force_max_ballistic']").val())/a;$("[name='dsi']").val(t.toFixed(2))}),$("#calculator_walking_steps_how_fast").submit(function(e){console.log("Calculate how fast steps"),e.preventDefault();let a=Number($("[name='steps']").val())*Number($("[name='step_length']").val())/100/1e3,t=a/Number($("[name='velocity']").val()),n=Math.floor(t);var l=60*(t-Math.floor(t));let r=Math.floor(l),o=Math.round(60*(l-Math.floor(l)));o<10&&(o="0"+o);let i=n+":"+r+":"+o;$("[name='distance']").val(a),$("[name='time']").val(i)}),$("#calculator_6sek_relative_ppo").submit(function(e){console.log("6sek_relative_ppo"),e.preventDefault();let a=Number($("[name='6sek_ppo']").val())/Number($("[name='6sek_bw']").val());$("[name='relative_ppo']").val(a.toFixed(2))}),$("#calculator_musclemass_upper_limit").submit(function(e){console.log("musclemass_upper_limit"),e.preventDefault();let a=Number($("[name='height']").val())/100,t=a*a*34,n=a*a*17;$("[name='ffm']").val(t.toFixed(2)),$("[name='musclemass']").val(n.toFixed(2))}),$("#calculator_musclemass").submit(function(e){console.log("musclemass"),e.preventDefault();let a=$("[name='ethniticity']").val(),t=$("[name='gender']").val();console.log(a+" "+t);let n,l=Number($("[name='height']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='age']").val()),i=Number($("[name='waist']").val());n=i>0?"man"==t?"white"==a?.46*r+.03*l+.013*o-6e-4*Math.pow(o,2)-.28*i+13.8:.5*r+.03*l+.031*o-8e-4*Math.pow(o,2)-.31*i+13.3:"white"==a?.24*r+.09*l-.097*o+4e-4*Math.pow(o,2)-.06*i-3.9:.26*r+.1*l-.12*o+6e-4*Math.pow(o,2)-.06*i-4.9:"man"==t?"white"==a?.23*r+.15*l-.058*o-5e-4*Math.pow(o,2)-13.2:.26*r+.16*l-.054*o-7e-4*Math.pow(o,2)-14.8:"white"==a?.19*r+.11*l-.095*o+3e-4*A2-9:.21*r+.12*l-.132*o+6e-4*A2-9.6,$("[name='musclemass']").val(n.toFixed(2))}),$("#calculator_6sek_fi").submit(function(e){console.log("6sek_fi"),e.preventDefault();let a=Number($("[name='6sek_best']").val()),t=(a-Number($("[name='6sek_worst']").val()))/a*100;$("[name='fi']").val(t.toFixed(2))}),$("#calculator_galloway_magic_mile").submit(function(e){console.log("Gallowway_magic_mile"),e.preventDefault();let a=Number($("[name='time_mm_minutes']").val()),t=Number($("[name='time_mm_seconds']").val()),n=running.Running(),l=n.getKilometersPrHour(1.609,a,t);console.log("mmtime"+l);let r=a,o=t+33;o>59&&(o-=60,r+=1);let i=n.getKilometersPrHour(1.609,r,o),m=n.convertKmtToMinPerKm(i),u=l/1.15,c=n.convertKmtToMinPerKm(u),s=l/1.2,v=n.convertKmtToMinPerKm(s),_=l/1.3,g=n.convertKmtToMinPerKm(_),d=l/1.55,b=n.convertKmtToMinPerKm(d);$("[name='pace_long_run']").val(b),$("[name='pace_5k_run']").val(m),$("[name='pace_10k_run']").val(c),$("[name='pace_half_marathon_run']").val(v),$("[name='pace_marathon_run']").val(g)}),$("#calculator_run_walk_time").submit(function(e){console.log("run_walk_time"),e.preventDefault();let a=Number($("[name='time_running_minutes']").val()),t=Number($("[name='time_running_seconds']").val()),n=Number($("[name='time_walking_minutes']").val()),l=Number($("[name='time_walking_seconds']").val()),r=Number($("[name='pace_walking_minutes']").val()),o=Number($("[name='pace_running_minutes']").val()),i=Number($("[name='pace_walking_seconds']").val()),m=Number($("[name='pace_running_seconds']").val());console.log("Pace walking"+r+":"+i),console.log("Time"+n+":"+l),console.log("Pace running"+r+":"+i);let u=running.Running(),c=u.convertMinPerKmToDistanceForDuration(o,m,a,t),s=u.convertMinPerKmToDistanceForDuration(r,i,n,l),v=(c+s)/1e3,_=a+n,g=t+l;g>59&&(g-=60,_+=1),console.log("dist_running: "+c+"dist_walking: "+s+"dist: "+v+" - min: "+_+" - sec: "+g),$("[name='velocity']").val(u.getKilometersPrHour(v,_,g).toFixed(2)),$("[name='pace']").val(u.getTimePrKilometer(v,_,g))}),$("#calculator_6sek_sdec").submit(function(e){console.log("6sek_sdec"),e.preventDefault();let a,t=$("[name='6sek_type']").val(),n=Number($("[name='6sek_1']").val()),l=Number($("[name='6sek_2']").val()),r=Number($("[name='6sek_3']").val()),o=Number($("[name='6sek_4']").val()),i=Number($("[name='6sek_5']").val()),m=(n+l+r+o+i)/(5*Math.max(n,l,r,o,i));a="running"==t?100*(m-1):100*(1-m),$("[name='6sek_sdec']").val(a.toFixed(2))}),$("#calculator_jump_cmj_initial_velocity").submit(function(e){console.log("CMJ test"),e.preventDefault();let a=Number($("[name='cmj_initial_velocity']").val());console.log("CMJ flight time "+a);let t=Math.pow(a,2)/9.81/2;t*=100,$("[name='cmj_jump_height_initial_velocity']").val(t.toFixed(2))}),$("#calculator_fitness_jog_vo2").submit(function(e){console.log("Etpunkt test"),e.preventDefault();let a=Number($("[name='time_min']").val())+Number($("[name='time_sec']").val())/60,t=Number($("[name='gender']").val()),n=Number($("[name='hr']").val()),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=jog.VO2MaxJog(t,l,r,a,n);$("[name='vo2max']").val(o.getMaximalOxygenUptake().toFixed(2)),$("[name='kondital']").val(o.getFitnessLevel().toFixed(0))}),$("#calculator_etpunkttest").submit(function(e){console.log("Etpunkt test"),e.preventDefault();let a=Number($("[name='work']").val()),t=Number($("[name='gender']").val()),n=Number($("[name='hr']").val()),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=etpunkt.EtPunktTest(t,l,r,n,a);$("[name='vo2max']").val(o.getMaximalOxygenUptake().toFixed(2)),$("[name='kondital']").val(o.getFitnessLevel().toFixed(0))}),$("#calculator_topunkttest").submit(function(e){console.log("Topunkt test"),e.preventDefault();let a=Number($("[name='work_1']").val()),t=Number($("[name='work_2']").val()),n=Number($("[name='hr_1']").val()),l=Number($("[name='hr_2']").val()),r=Number($("[name='age']").val()),o=Number($("[name='weight']").val()),i=Number($("[name='max_hr']").val()),m=topunkt.ToPunktTest(r,o,i,a,n,t,l);$("[name='work_max']").val(m.getMaximalWork().toFixed(0)),$("[name='vo2max']").val(m.getMaximalOxygenUptake().toFixed(2)),$("[name='kondital']").val(m.getFitnessLevel().toFixed(0))}),$("#calculator_maxhr").submit(function(e){console.log("Calculate Maximal Heart Rate"),e.preventDefault();let a=Number($("[name='age']").val()),t=$("[name='maxhr-formula']").val(),n=maxhr.EstimateMaxHr(a,t);$("[name='max_hr']").val(n.getMaxHr().toFixed(0))}),$("#calculator_bmi").submit(function(e){console.log("Calculate BMI"),e.preventDefault();let a=Number($("[name='height']").val()),t=Number($("[name='weight']").val()),n=Number($("[name='age']").val()),l=$("[name='gender']:checked").val(),r=$("[name='type']").val(),o=bmi.BMI(a,t),i=bmievaluation.BMIEvaluation(r,l,n);$("#meter-text").text(i.getEvaluation(o.getBMI())),$("[name='BMI']").val(o.getBMI().toFixed(1));let m=$("#meter-bmi");m.val(o.getBMI().toFixed(1)),m.text(o.getBMI().toFixed(1)),m.attr("low",i.getLow()),m.attr("high",i.getHigh()),m.attr("optimum",i.getOptimum()),m.attr("min",i.getMin()),m.attr("max",i.getMax())}),$("#calculator_water_intake").submit(function(e){console.log("Calculate Water Intake"),e.preventDefault();let a=Number($("[name='weight']").val()),t=water.WaterIntake(a);$("[name='daily_water_intake_lower']").val(t.getDailyWaterIntake()),$("[name='daily_water_intake_upper']").val(t.getDailyWaterIntake("upper"))}),$("#calculator_ponderal_index").submit(function(e){console.log("Calculate BMI"),e.preventDefault();let a=Number($("[name='height']").val()),t=Number($("[name='weight']").val()),n=ponderalindex.PonderalIndex(a,t);$("[name='PMI']").val(n.getPonderalIndex().toFixed(1))}),$("#calculator_bodywater").submit(function(e){console.log("Calculate Body Water"),e.preventDefault();let a=Number($("#age").val()),t=Number($("#height").val()),n=Number($("#weight").val()),l=$("[name='sex']:checked").val(),r=tbw.BodyWater(t,n,a,l);$("#tbw").val(r.getTotalBodyWater().toFixed(2)),$("#tbw_pct").val(r.getPercent().toFixed(2))}),$("#calculator_fat_percent").submit(function(e){console.log("Calculate Fat Percent"),e.preventDefault();let a=Number($("[name='age']").val()),t=Number($("[name='height']").val()),n=Number($("[name='weight']").val()),l=$("[name='sex']:checked").val(),r=fat.CalculateFatPercent(t,n,a,l);$("[name='BMI']").val(r.getBMI().toFixed(2)),$("[name='fat_percent_durnin']").val(r.getWomersleyDurnin1977().toFixed(1)),$("[name='fat_percent_jackson_pollock']").val(r.getJacksonPollock1980().toFixed(1)),$("[name='fat_percent_heitmann']").val(r.getHeitmann1990().toFixed(1)),$("[name='fat_percent_duerenberg']").val(r.getDuerenberg1991().toFixed(1)),$("[name='fat_percent_duerenberg_1998']").val(r.getDuerenberg1998().toFixed(1)),$("[name='fat_percent_gallagher']").val(r.getGallagher2000().toFixed(1)),$("[name='fat_percent_heritage_2002']").val(r.getHeritage2002().toFixed(1))}),$("#calculator_how_tall").submit(function(e){console.log("Calculate How Tall"),e.preventDefault();let a=Number($("[name='father_height']").val()),t=Number($("[name='mother_height']").val()),n=$("[name='sex']:checked").val(),l=how_tall.HowTall(n,a,t);$("[name='adult_height']").val(l.getHeight().toFixed(0))}),$("#calculator_flyer_handicap").submit(function(e){console.log("Calculate Flyer Handicap"),e.preventDefault();let a=$("[name='gender']").val(),t=Number($("[name='weight']").val()),n=Number($("[name='age']").val()),l=$("[name='distance']").val(),r=Number($("[name='hours']").val()),o=Number($("[name='minutes']").val()),i=Number($("[name='seconds']").val());n<25&&$("[name='age']").val(25),"female"==a?(t<50&&$("[name='weight']").val(50),$("#fh_weight").text(50),$("#fh_gender").text("kvinde")):"male"==a&&(t<65&&$("[name='weight']").val(65),$("#fh_weight").text(65),$("#fh_gender").text("mand"));let m=flyer_handicap.FlyerHandicap(n,t,a);$("[name='fh_time']").val(m.getAdjustedTime(l,r,o,i))}),$("#calculator_who5").submit(function(e){console.log("Calculate Eating Disorder"),e.preventDefault();let a,t=4*(Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val()));a=t>49?"Din score på "+t+" ligger her inden for gennemsnittet for resten af befolkningen som er 68 med en nedre grænse omkring 50.":t>35?"Din score på "+t+" ligger lavere end gennemsnittet for resten af befolkningen. Resultatet tyder på, at du nok ikke har det helt godt. Vær opmærksom på, om du får det bedre eller værre og søg evt. læge, hvis du får det værre.":"Din score på "+t+" ligger væsentligt lavere end gennemsnittet for resten af befolkningen. Resultatet tyder på, at du ikke er på toppen, og der kan være en reel risiko for, at du lider af depression eller langvarig stress. Du bør overveje at søge hjælp hos din læge for at få det undersøgt.",$("[name='who5_score']").val(t),$("#result").text(a)}),$("#calculator_phq9").submit(function(e){console.log("Calculate PHQ-9"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val())+Number($("[name='question_6']:checked").val())+Number($("[name='question_7']:checked").val())+Number($("[name='question_8']:checked").val())+Number($("[name='question_9']:checked").val());a=t>19?"Din score på "+t+" viser, at du har svære symptomer på depression. Du skal søge professionel hjælp, så du kan komme til en specialist, der vil hjælpe dig med at igangsætte en øjeblikkelig behandling.":t>14?"Din score på "+t+" viser, at du har moderate til svære symptomer på depression. Du skal søge professionel hjælp, som kan hjælpe med at få dig i behandling.":t>9?"Din score på "+t+" viser at du har moderate symptomer på depression. Du bør søge professionel hjælp og lægge en plan.":t>4?"Din score på "+t+" viser at du kan have milde symptomer på depression. Det er godt at følge op efter lidt tid med at besvare skemaet igen for at se, om symptomerne bliver værre.":"Din score på "+t+" viser, at du ingen eller kun minimale depressive symptomer har.",$("[name='phq9_score']").val(t),$("#result").text(a)}),$("#calculator_stress").submit(function(e){console.log("Calculate Stress"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val())+Number($("[name='question_6']:checked").val())+Number($("[name='question_7']:checked").val())+Number($("[name='question_8']:checked").val())+Number($("[name='question_9']:checked").val())+Number($("[name='question_10']:checked").val())+Number($("[name='question_11']:checked").val())+Number($("[name='question_12']:checked").val())+Number($("[name='question_13']:checked").val())+Number($("[name='question_14']:checked").val())+Number($("[name='question_15']:checked").val())+Number($("[name='question_16']:checked").val());a=t>50?"Din score på "+t+" viser, at dit stressniveau er meget højt niveau. Dit stressniveau er meget højt. Du bør tage hånd om din situation straks og række ud efter hjælp, så du kan få det bedre.":t>36?"Din score på "+t+" viser, at dit stressniveau er for højt niveau. Dit stressniveau er højt. Du har måske været belastet over en længere periode, hvor stressen gradvist er taget til. Du bør gøre noget ved din situation nu.":t>23?"Din score på "+t+" viser, at dit stressniveau er på et mellem niveau. Dit stress-niveau er ikke alarmerende højt, men du er alligevel tilpas stresset til, at du bør se på, hvad der kan ændres i dit liv.":"Din score på "+t+" viser, at dit stressniveau er på et afslappet niveau. Du er ikke stresset for tiden. Det er rigtig godt, men vær alligevel opmærksom på, om din tilstand ændrer sig.",$("[name='stress_score']").val(t),$("#result").text(a)}),$("#calculator_atq").submit(function(e){console.log("Calculate ATQ"),e.preventDefault();let a=Number($("[name='frequency_1']:checked").val()),t=Number($("[name='frequency_2']:checked").val()),n=Number($("[name='frequency_3']:checked").val()),l=Number($("[name='frequency_4']:checked").val()),r=Number($("[name='frequency_5']:checked").val()),o=Number($("[name='frequency_6']:checked").val()),i=Number($("[name='frequency_7']:checked").val()),m=Number($("[name='frequency_8']:checked").val()),u=Number($("[name='frequency_9']:checked").val()),c=Number($("[name='frequency_10']:checked").val()),s=Number($("[name='frequency_11']:checked").val()),v=Number($("[name='frequency_12']:checked").val()),_=Number($("[name='frequency_13']:checked").val()),g=Number($("[name='frequency_14']:checked").val()),d=Number($("[name='frequency_15']:checked").val()),b=Number($("[name='frequency_16']:checked").val()),p=Number($("[name='frequency_17']:checked").val()),f=Number($("[name='frequency_18']:checked").val()),h=Number($("[name='frequency_19']:checked").val()),x=Number($("[name='frequency_20']:checked").val()),k=Number($("[name='frequency_21']:checked").val()),N=Number($("[name='frequency_22']:checked").val()),y=Number($("[name='frequency_23']:checked").val()),F=Number($("[name='frequency_24']:checked").val()),w=Number($("[name='frequency_25']:checked").val()),D=Number($("[name='frequency_26']:checked").val()),C=Number($("[name='frequency_27']:checked").val()),M=Number($("[name='frequency_28']:checked").val()),q=Number($("[name='frequency_29']:checked").val()),R=Number($("[name='frequency_30']:checked").val()),P=a+t+n+l+r+o+i+m+u+c+s+v+_+g+d+b+p+f+h+x+k+N+y+F+w+D+C+M+q+R,j=Number($("[name='believe_1']:checked").val())+Number($("[name='believe_2']:checked").val())+Number($("[name='believe_3']:checked").val())+Number($("[name='believe_4']:checked").val())+Number($("[name='believe_5']:checked").val())+Number($("[name='believe_6']:checked").val())+Number($("[name='believe_7']:checked").val())+Number($("[name='believe_8']:checked").val())+Number($("[name='believe_9']:checked").val())+Number($("[name='believe_10']:checked").val())+Number($("[name='believe_11']:checked").val())+Number($("[name='believe_12']:checked").val())+Number($("[name='believe_13']:checked").val())+Number($("[name='believe_14']:checked").val())+Number($("[name='believe_15']:checked").val())+Number($("[name='believe_16']:checked").val())+Number($("[name='believe_17']:checked").val())+Number($("[name='believe_18']:checked").val())+Number($("[name='believe_19']:checked").val())+Number($("[name='believe_20']:checked").val())+Number($("[name='believe_21']:checked").val())+Number($("[name='believe_22']:checked").val())+Number($("[name='believe_23']:checked").val())+Number($("[name='believe_24']:checked").val())+Number($("[name='believe_25']:checked").val())+Number($("[name='believe_26']:checked").val())+Number($("[name='believe_27']:checked").val())+Number($("[name='believe_28']:checked").val())+Number($("[name='believe_29']:checked").val())+Number($("[name='believe_30']:checked").val()),W=i+c+g+x+D,H=t+n+u+k+y+F+M,E=p+f,B=q+R;$("[name='frequency_score']").val(P),$("[name='believe_score']").val(j),$("[name='pmdc_score']").val(W),$("[name='nsne_score']").val(H),$("[name='lse_score']").val(E),$("[name='helplessness_score']").val(B),$("#result").text(void 0)}),$("#calculator_excercise_addiction").submit(function(e){console.log("Calculate Eating Disorder"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val())+Number($("[name='question_2']:checked").val())+Number($("[name='question_3']:checked").val())+Number($("[name='question_4']:checked").val())+Number($("[name='question_5']:checked").val())+Number($("[name='question_6']:checked").val());a=t>23?"Din score på "+t+" ligger mellem 24-30. Det er sandsynligt, at du er afhængig af træning på en måde, der kan skade dig.":t>15?"Du har fået "+t+" point. Hvis du får 24 point eller mere, så er du sandsynligvis afhængig af træning på en måde, der kan skade dig.":"Du er med "+t+" point sandsynligvis ikke i risikogruppen for at være afhængig af træning.",$("#result").text(a)}),$("#calculator_eating_disorder").submit(function(e){console.log("Calculate Eating Disorder"),e.preventDefault();let a,t=Number($("[name='question_1']:checked").val()),n=Number($("[name='question_2']:checked").val()),l=Number($("[name='question_3']:checked").val()),r=Number($("[name='question_4']:checked").val()),o=Number($("[name='question_5']:checked").val()),i=Number($("[name='question_6']:checked").val()),m=t+n+l+r;a=m>1?"Du har svaret ja på "+m+" af de fire første spørgsmål. Du er i risikogruppen for at have en spiseforstyrrelse og bør søge hjælp. Yderligere udredning er nødvendig for at vurdere, om der er tale om en spiseforstyrrelse.":m>0?"Du har svaret ja på et af de fire første spørgsmål. At svare ja på et af spørgsmålene er formentlig ikke alvorligt, men det kan være tegn på et forstyrret spisemønster.":0==o+i?"Dine s let tyder på, at du ikke har et forstyrret spisemønster.":"Det let ikke muligt at konkludere noget på baggrund af dine svar. De første fire spørgsmål har en sammenhæng med det at have en spiseforstyrrelse. De sidste to spørgsmål kan afdække om du er uden for risikogruppen.",$("#result").text(a)}),$("#calculator_norwegian_2011").submit(function(e){console.log("Calculate Norwegian 2011"),e.preventDefault();let a,t=$("[name='gender']").val(),n=Number($("[name='age']").val()),l=Number($("[name='hr_rest']").val()),r=Number($("[name='waist']").val()),o=Number($("[name='frequency']").val())*Number($("[name='intensity']").val())*Number($("[name='duration']").val());a="male"==t?100.27+.226*o-.296*n-.369*r-.155*l:74.74+.198*o-.247*n-.259*r-.114*l,$("[name='kondital']").val(a.toFixed(0)),$("[name='pa']").val(o)}),$("#calculator_jackson").submit(function(e){console.log("Calculate Jackson"),e.preventDefault();let a=Number($("[name='jackson_gender']").val()),t=Number($("[name='jackson_age']").val()),n=Number($("[name='jackson_height']").val()),l=Number($("[name='jackson_weight']").val()),r=56.363+1.921*Number($("[name='par']:checked").val())-.381*t-.754*bmi.BMI(n,l).getBMI()+10.987*a;$("[name='jackson_kondital']").val(r.toFixed(0))}),$("#calculator_skinfold_durnin").submit(function(e){console.log("Calculate Skinfold Durnin"),e.preventDefault();let a=Number($("[name='biceps']").val()),t=Number($("[name='triceps']").val()),n=Number($("[name='suprailiac']").val()),l=Number($("[name='subscapularis']").val()),r=Number($("[name='weight']").val()),o=$("[name='gender']").val(),i=Number($("[name='age']").val()),m=skinfold_durnin.SkinfoldDurnin(a,t,n,l,r,o,i);$("[name='skinfold_durnin']").val(m.getSkinfoldSum().toFixed(2)),$("[name='fatpercent_durnin']").val(m.getBodyFatPercent().toFixed(2)),$("[name='ffm_durnin']").val(m.getFatFreeMass().toFixed(2))}),$("#calculator_skinfold_peterson").submit(function(e){console.log("Calculate Skinfold Durnin"),e.preventDefault();let a=Number($("[name='midthigh']").val()),t=Number($("[name='triceps']").val()),n=Number($("[name='suprailiac']").val()),l=Number($("[name='subscapularis']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='height']").val()),i=$("[name='gender']").val(),m=Number($("[name='age']").val()),u=skinfold_peterson.SkinfoldPeterson(a,t,n,l,o,r,i,m);$("[name='skinfold_peterson']").val(u.getSkinfoldSum().toFixed(2)),$("[name='fatpercent_peterson']").val(u.getBodyFatPercent().toFixed(2)),$("[name='ffm_peterson']").val(u.getFatFreeMass().toFixed(2))}),$("#calculator_skinfold_pollock_men").submit(function(e){console.log("Calculate Skinfold Pollock Men"),e.preventDefault();let a=Number($("[name='chest_male']").val()),t=Number($("[name='abdomen_male']").val()),n=Number($("[name='thigh_male']").val()),l=Number($("[name='age_male']").val()),r=Number($("[name='weight_male']").val()),o=skinfold_pollock.SkinfoldPollock(r,l);$("[name='fatpercent_male']").val(o.getBodyFatPercentMale(a,t,n)),$("[name='ffm_male']").val(o.getBodyFatFreeMass())}),$("#calculator_skinfold_pollock_women").submit(function(e){console.log("Calculate Skinfold Pollock Women"),e.preventDefault();let a=Number($("[name='triceps_female']").val()),t=Number($("[name='supiliac_female']").val()),n=Number($("[name='thigh_female']").val()),l=Number($("[name='age_female']").val()),r=Number($("[name='weight_female']").val()),o=skinfold_pollock.SkinfoldPollock(r,l);$("[name='fatpercent_female']").val(o.getBodyFatPercentFemale(a,t,n)),$("[name='ffm_female']").val(o.getBodyFatFreeMass())}),$("#calculator_skinfold_lohman").submit(function(e){console.log("Calculate Skinfold Lohman"),e.preventDefault();let a=Number($("[name='triceps']").val()),t=Number($("[name='calf']").val()),n=Number($("[name='gender']").val()),l=skinfold_lohman.SkinfoldLohman(n,a,t);$("[name='fatpercent']").val(l.getBodyFatPercent())}),$("#calculator_skinfold_slaughter").submit(function(e){console.log("Calculate Skinfold Slaughter"),e.preventDefault();let a=Number($("[name='triceps']").val()),t=Number($("[name='subscapular']").val()),n=Number($("[name='gender']").val()),l=skinfold_slaughter.SkinfoldSlaughter(n,a,t);$("[name='fatpercent']").val(l.getBodyFatpercent())}),$("#calculator_fat_percent_measurement").ready(function(){$("#calculator_fat_percent_men_under_26").hide(),$("#calculator_fat_percent_men_over_26").hide(),$("#calculator_fat_percent_women_under_26").hide(),$("#calculator_fat_percent_women_over_26").hide()}),$("#calculator_fat_percent_measurement [name='group']").change(function(){let e=$("[name='group']").val();$("#calculator_fat_percent_men_under_26").hide(),$("#calculator_fat_percent_men_over_26").hide(),$("#calculator_fat_percent_women_under_26").hide(),$("#calculator_fat_percent_women_over_26").hide(),$("#calculator_fat_percent_"+e).show()}),$("#calculator_fat_percent_men_under_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_men_under_26']").val(a.getFatPercentMenUnder26(Number($("#calculator_fat_percent_men_under_26 [name='right_upperarm']").val()),Number($("#calculator_fat_percent_men_under_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_men_under_26 [name='right_forearm']").val())).toFixed(2))}),$("#calculator_fat_percent_men_over_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_men_over_26']").val(a.getFatPercentMenOver26(Number($("#calculator_fat_percent_men_over_26 [name='hips']").val()),Number($("#calculator_fat_percent_men_over_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_men_over_26 [name='right_forearm']").val())).toFixed(2))}),$("#calculator_fat_percent_women_under_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_women_under_26']").val(a.getFatPercentWomenUnder26(Number($("#calculator_fat_percent_women_under_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_women_under_26 [name='right_thigh']").val()),Number($("#calculator_fat_percent_women_under_26 [name='right_forearm']").val())).toFixed(2))}),$("#calculator_fat_percent_women_over_26").submit(function(e){console.log("Calculate Fat Percent on Measurements"),e.preventDefault();let a=fatm.CalculateFatPercentMeasurements();$("[name='fat_women_over_26']").val(a.getFatPercentWomenOver26(Number($("#calculator_fat_percent_women_over_26 [name='abdomen']").val()),Number($("#calculator_fat_percent_women_over_26 [name='right_thigh']").val()),Number($("#calculator_fat_percent_women_over_26 [name='right_calf']").val())).toFixed(2))}),$("#calculate_fitness_level_hr").submit(function(e){console.log("Calculate VO2 from HR"),e.preventDefault();let a=Number($("#hr_rest").val()),t=Number($("#hr_max").val()),n=Number($("#weight").val()),l=fitness.CalculateFitnessFromHr(t,a,n),r=l.getMaximalOxygenUptake(),o=l.getFitnessLevel();$("#vo2max").val(r).toFixed(2),$("#kondital").val(o).toFixed(0)}),$("#calculator_borg15").submit(function(e){console.log("Calculate Borg 15 fitness"),e.preventDefault();let a=Number($("#borg_watt").val()),t=Number($("#borg_age").val()),n=Number($("#borg_weight").val()),l=borg15.Borg15(t,n,a);$("#borg_iltoptagelse").val(l.getMaximalOxygenUptake().toFixed(2)),$("#borg_kondital").val(l.getFitnessLevel().toFixed(0))}),$("#calculator_inol").submit(function(e){console.log("Calculate INOL"),e.preventDefault();let a=Number($("[name='reps']").val()),t=Number($("[name='intensity']").val()),n=inol.INOL(t);$("[name='inol']").val(n.getINOL(a))}),$("#calculator_inol_reverse").submit(function(e){console.log("Calculate INOL"),e.preventDefault();let a=Number($("[name='inol_reverse_inol']").val()),t=Number($("[name='inol_reverse_intensity']").val()),n=inol.INOL(t);$("[name='inol_reverse_reps']").val(n.getReps(a))}),$("#calculator_ffmi").submit(function(e){console.log("Calculate FFMI"),e.preventDefault();let a=Number($("[name='ffmi_weight']").val()),t=Number($("[name='ffmi_height']").val()),n=a*(1-a*(Number($("[name='ffmi_fat_percent']").val())/100)/100)/Math.Pow(t,2),l=n+6.1*(1.8-t);$("[name='ffmi']").val(n),$("[name='ffmi_normalized']").val(l)}),$("#calculator_fitness_wattmax").submit(function(e){console.log("Calculate Wattmax"),e.preventDefault();let a=Number($("[name='wmax']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='weight']").val()),l=wattmax.Wattmax(a,t,n);$("[name='kondital']").val(l.getFitnessLevel()),$("[name='vo2max']").val(l.getMaximalOxygenUptake()),$("[name='mpo']").val(l.getMPO())}),$("#calculator_fitness_wattmax_children").submit(function(e){console.log("Calculate Wattmax Children"),e.preventDefault();let a=Number($("[name='wmax']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='weight']").val()),l=Number($("[name='watt_jumps']").val()),r=wattmax.Wattmax(a,t,n,15,l);$("[name='kondital']").val(r.getFitnessLevel()),$("[name='vo2max']").val(r.getMaximalOxygenUptake()),$("[name='mpo']").val(r.getMPO())}),$("#calculator_fitness_trappetest").submit(function(e){console.log("Calculate Trappetest"),e.preventDefault();let a=Number($("[name='wmax']").val())-25+Number($("[name='sec']").val())/150*25,t=.01141*a+.435,n=t/Number($("[name='weight']").val())*1e3;$("[name='kondital']").val(n.toFixed(0)),$("[name='vo2max']").val(t.toFixed(2)),$("[name='ppo']").val(a)}),$("#calculator_walktest_6min").submit(function(e){console.log("Calculate Walktest 6 min"),e.preventDefault();let a=Number($("[name='meter']").val()),t=Number($("[name='gender']").val()),n=Number($("[name='age']").val()),l=Number($("[name='height']").val()),r=Number($("[name='weight']").val()),o=$("#formula").val(),i=walktest_sixminutes.SixMinutesWalkingTest(t,n,l,r,a);$("[name='reference_distance']").val(i.getReferenceMeter(o).toFixed(1)),$("[name='procent']").val(i.getPercent(o).toFixed(0)),$("#walktest_gauge").val(i.getPercent(o))}),$("#calculator_walktest_16km").submit(function(e){console.log("Calculate Walktest 1,6 km"),e.preventDefault();let a=$("[name='walktest-formula']").val(),t=Number($("[name='min']").val()),n=Number($("[name='sec']").val()),l=Number($("[name='hr_after']").val()),r=$("[name='gender']").val(),o=Number($("[name='age']").val()),i=Number($("[name='weight']").val());console.log(r);let m=rockport.RockPortWalkingTest(t,n,l,r,o,i,a);$("[name='kondital']").val(m.getFitnessLevel().toFixed(0)),$("[name='vo2max']").val(m.getMaximalOxygenUptake().toFixed(2))}),$("#calculator_index23").submit(function(e){console.log("Calculate Index23"),e.preventDefault();let a=Number($("#height").val()),t=Number($("#weight").val()),n=Number($("#kondital").val()),l=index23.FitnessIndex23(a,t);$("#index23").val(l.getIndex23BasedOnFitnessLevel(n))}),$("#calculator_andersen_test").submit(function(e){console.log("Calculate Andersen Test"),e.preventDefault();let a=$("[name='formula']").val(),t=Number($("[name='distance']").val()),n=Number($("[name='bodyweight']").val()),l=$("[name='gender']").val(),r=andersen.AndersenTest(l,t,n,a);$("[name='kondital']").val(r.getFitnessLevel().toFixed(0)),$("[name='vo2max']").val(r.getVO2max().toFixed(1))}),$("#calculator_index100").submit(function(e){console.log("Calculate Index100"),e.preventDefault();let a=Number($("[name='lifted']").val()),t=Number($("[name='weight']").val()),n=index100.Index100(a,t);$("[name='index_100_lift']").val(n.getIndex100())}),$("#calculator_necessary_energy_deficit").submit(function(e){console.log("Calculate calculator_necessary_energy_deficit"),e.preventDefault();let a=Number($("[name='lost']").val())/Number($("[name='days']").val())*1e3,t=9*a,n=a;$("[name='daily_diff']").val(t.toFixed(0)+" kcal"),$("[name='daily_weight_loss']").val(n.toFixed(0)+" g")}),$("#calculator_change").submit(function(e){console.log("Calculate Equilibrium"),e.preventDefault();let a=Number($("#calculator_change [name='tee']").val()),t=Number($("[name='intake']").val()),n=bmr_equilibrium.BMREquilibrium(),l=n.getBalance(a,t);$("[name='balance']").val(l+" kJ"),$("[name='weekly_weightchange']").val((1e3*n.getMaximalWeightChange(l,7)).toFixed(0)+" g"),$("[name='monthly_weightchange']").val(n.getMaximalWeightChange(l,30).toFixed(2)+" kg")}),$("#bmr-formula").change(function(){$("#bmr_legend").text($("#bmr-formula option:selected").text())}),$("#calculator_bmr_pal").submit(function(e){console.log("Calculate BMR - 2012"),e.preventDefault();let a,t=$("[name='bmr-formula']").val(),n=$("[name='gender']").val(),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='height']").val());if(o<1&&(t="nordic_2012"),a="schofield"==t?schofield.BMRSchofield(n,l,r):"benedict_harris"==t?bmr_benedict_harris.BMRBenedictHarris(n,l,r,o):ree.BMRNordicNutritionRecommendations2012(n,l,r,o),$("[name='bmr']").val(a.getBasicMetabolicRate().toFixed(0)),$("input[name='pal']").length>0){let e=Number($("[name='pal']:checked").val()),t=Number($("[name='moderate_leisure_activity']").val()),n=Number($("[name='strenuous_leisure_activity']").val()),l=tee_pal.TotalEnergyExpenditurePAL(a.getBasicMetabolicRate(),e,t,n);$("[name='pal_calc']").val(l.getPhysicalActivityLevel().toFixed(2)),$("[name='tee']").val(l.getTotalEnergyExpenditure().toFixed(0))}}),$("#calculator_critical_power_time").submit(function(e){console.log("Calculate CP Time"),e.preventDefault();let a=Number($("[name='time_cp']").val()),t=1e3*Number($("[name='time_w']").val())/(Number($("[name='time_p']").val())-a);$("[name='time']").val(t.toFixed(0))}),$("#calculator_rowing_2000_meter_time").submit(function(e){console.log("Calculate VO2max rowing"),e.preventDefault();let a=Number($("[name='tid_min']").val()),t=Number($("[name='tid_sek']").val()),n=Number($("[name='rowing_body_weight']").val()),l=$("[name='rowing_gender']").val(),r=rowing_power_calculator.RowingPowerCalculator(),o=r.getPaceFromTimeAndDistance(2e3,a,t),i=r.getWattsFromPace(o),m=rowing_vo2.RowingVO2(i,l);$("[name='vo2_max']").val(m.getVO2().toFixed(2)),$("[name='kondital']").val(m.getFitnessLevel(n).toFixed(0)),$("[name='mean_power']").val(i.toFixed(0))}),$("#calculator_rowing_trappetest").submit(function(e){console.log("Calculate VO2max rowing"),e.preventDefault();let a=Number($("[name='trappetest_tid_min']").val()),t=Number($("[name='trappetest_tid_sek']").val()),n=Number($("[name='trappetest_body_weight']").val()),l=Number($("[name='trappetest_second_watts']").val()),r=l+(Number($("[name='trappetest_last_watts']").val())-l)*((a+t/60/100)/5),o=(13.7*r+287)/1e3,i=o/n*1e3;$("[name='trappetest_vo2_max']").val(o.toFixed(2)),$("[name='trappetest_kondital']").val(i.toFixed(0)),$("[name='trappetest_mean_power']").val(r.toFixed(0))}),$("#calculator_rowing_powerprofile").submit(function(e){console.log("Calculate VO2max rowing"),e.preventDefault();let a=Number($("[name='roning_pp_tid_min']").val()),t=Number($("[name='roning_pp_tid_sek']").val()),n=Number($("[name='roning_pp_tid_ms']").val()),l=rowing_powerprofile.RowingErgRowing(a,t,n);$("#pace10sec").text(l.getPaceFromWatts(l.getWatts10Sec())),$("#pace60sec").text(l.getPaceFromWatts(l.getWatts60Sec())),$("#pace2k").text(l.getPaceFromWatts(l.getWatts2k())),$("#pace6k").text(l.getPaceFromWatts(l.getWatts6k())),$("#pace60min").text(l.getPaceFromWatts(l.getWatts60min())),$("#watts10sec").text(l.getWatts10Sec().toFixed(0)),$("#watts60sec").text(l.getWatts60Sec().toFixed(0)),$("#watts2k").text(l.getWatts2k().toFixed(0)),$("#watts6k").text(l.getWatts6k().toFixed(0)),$("#watts60min").text(l.getWatts60min().toFixed(0))}),$("#calculator_critical_power_power_for_time").submit(function(e){console.log("Calculate CP Power for time"),e.preventDefault();let a=Number($("[name='power_time_cp']").val()),t=1e3*Number($("[name='power_time_w']").val())/Number($("[name='power_time_time']").val())+a;$("[name='power_for_time']").val(t.toFixed(0))}),$("#calculator_bruce").submit(function(e){console.log("Calculate Bruce"),e.preventDefault();let a=Number($("[name='bruce_time']").val()),t=14.8-1.379*a+.451*Math.pow(a,2)-.012*Math.pow(a,3);$("[name='bruce_kondital']").val(t.toFixed(0))}),$("#calculator_critical_power").submit(function(e){console.log("Calculate CP"),e.preventDefault();let a=Number($("[name='p3']").val()),t=Number($("[name='p12']").val()),n=(12*t-3*a)/9,l=.24*(a-t);$("[name='cp']").val(n.toFixed(0)),$("[name='w']").val(l.toFixed(0))}),$("#calculator_blood").submit(function(e){console.log("Calculate Blood"),e.preventDefault();$("[name='bloodvolume-formula']").val();let a=$("[name='gender']").val(),t=Number($("[name='age']").val()),n=Number($("[name='weight']").val()),l=Number($("[name='height']").val()),r=blood.Blood(a,t,n,l);$("[name='bloodvolume']").val(r.getVolume().toFixed(0))}),$("#calculator_rer").submit(function(e){console.log("Calculate RER"),e.preventDefault();let a=$("[name='r']").val(),t=$("[name='o']").val(),n=rer.RER(a,t);$("[name='energy_expenditure']").val(n.getKcalMin().toFixed(0)),$("[name='energy_fat_percent']").val(100*n.getFatPercent().toFixed(2)),$("[name='energy_cho_percent']").val(100*n.getCHOPercent().toFixed(2)),$("[name='energy_fat_kcal_min']").val(n.getCaloriesFromFat().toFixed(2)),$("[name='energy_cho_kcal_min']").val(n.getCaloriesFromCHO().toFixed(2))}),$("#calculator_lung").submit(function(e){console.log("Calculate Blood"),e.preventDefault();let a=$("[name='gender']").val(),t=Number($("[name='age']").val()),n=Number($("[name='height']").val()),l=lung.Lung(a,n,t);$("[name='vital_capacity']").val(l.getVitalCapacity().toFixed(0))}),$("#activity_intense, #activity_moderat, #activity_light, #activity_standing, #activity_sleeping").change(function(e){let a=1440-document.getElementById("activity_intense").value-document.getElementById("activity_moderat").value-document.getElementById("activity_light").value-document.getElementById("activity_standing").value-document.getElementById("activity_sleeping").value;$("[name='activity_sitting']").val(a)}),$("#calculator_bmr_advanced_pal").submit(function(e){console.log("Calculate BMR - Advanced"),e.preventDefault();let a,t=$("[name='bmr-formula']").val(),n=$("[name='sex']:checked").val(),l=Number($("[name='age']").val()),r=Number($("[name='weight']").val()),o=Number($("[name='height']").val()),i=(a="schofield"==t?schofield.BMRSchofield(n,l,r):"benedict_harris"==t?bmr_benedict_harris.BMRBenedictHarris(n,l,r,o):ree.BMRNordicNutritionRecommendations2012(n,l,r,o)).getBasicMetabolicRate(),m=document.getElementById("activity_intense").value,u=document.getElementById("activity_moderat").value,c=document.getElementById("activity_light").value,s=document.getElementById("activity_standing").value,v=document.getElementById("activity_sleeping").value,_=1440-m-u-c-s-v,g=i/4.2,d=1.1+1.15/.9*m*9/1440/(g/(.0175*1440*r))+1.15/.9*u*6/1440/(g/(.0175*1440*r))+1.15/.9*c*3/1440/(g/(.0175*1440*r))+1.15/.9*s*1/1440/(g/(.0175*1440*r))+1.15/.9*v*(.9-1)/1440/(g/(.0175*1440*r))+1.15/.9*_*(1.2-1)/1440/(g/(.0175*1440*r)),b=i*d;$("[name='pal_gerrior']").val(d),$("[name='activity_sitting']").val(_),$("[name='bmr']").val(i+" kJ"),$("[name='equilibrium']").val(b+" kJ")}),$("#calculator_riegels").submit(function(e){console.log("Riegels formular"),e.preventDefault();let a=Number($("[name='dist']").val()),t=Number($("[name='hours']").val()),n=Number($("[name='minutes']").val()),l=Number($("[name='seconds']").val()),r=riegel.Riegel(a,t,n,l);$("#results").html(r.getTableWithEndTimes())}),$("#calculator_weightloss_running_time").submit(function(e){console.log("Running time weight loss"),e.preventDefault();let a=Number($("[name='weight']").val()),t=Number($("[name='change']").val()),n=Number($("[name='hours']").val()),l=Number($("[name='minutes']").val()),r=Number($("[name='seconds']").val()),o=Number($("[name='change_effect']").val()),i=running_weightchange.RunningWeightLoss(a,t,o/100);$("#result").val(i.getEstimatedFinishTime(n,l,r))}),$("#calculator_vmax_bike_vmax").submit(function(e){console.log("Calculate Vmax from VO2"),e.preventDefault();let a=Number($("[name='vo2max']").val()),t=vmax_bike.Vmax(a);$("[name='vmax']").val(t.getVmax())}),$("#calculator_vmax_biking_intervals").submit(function(e){console.log("Calculate Vmax for Biking"),e.preventDefault();let a=Number($("[name='biking_vmax_program']").val()),t=Number($("[name='biking_tmax_min']").val()),n=Number($("[name='biking_tmax_sec']").val()),l=Number($("[name='biking_warmup_percentage']").val()),r=Number($("[name='biking_tmax_percentage']").val()),o=Number($("[name='biking_vmax_pause_percentage']").val()),i=Number($("[name='biking_tmax_pause_percentage']").val()),m=vmax_intervals.VmaxIntervals(a,t,n);$("[name='biking_warmup_velocity']").val(m.getVelocity(l)),$("[name='biking_vmax_program_value']").val(a),$("[name='biking_time_program_time']").val(m.getTime(r)),$("[name='biking_pause_velocity']").val(m.getVelocity(o)),$("[name='biking_time_pause']").val(m.getTime(i))}),$("#calculator_vmax_running_intervals").submit(function(e){console.log("Calculate Vmax for Running"),e.preventDefault();let a=Number($("[name='running_vmax_program']").val()),t=Number($("[name='running_tmax_min']").val()),n=Number($("[name='running_tmax_sec']").val()),l=Number($("[name='running_warmup_percentage']").val()),r=Number($("[name='running_tmax_percentage']").val()),o=Number($("[name='running_vmax_pause_percentage']").val()),i=Number($("[name='running_tmax_pause_percentage']").val()),m=vmax_intervals.VmaxIntervals(a,t,n);return $("[name='running_warmup_velocity']").val(m.getVelocity(l)),$("[name='running_vmax_program_value']").val(a),$("[name='running_time_program_time']").val(m.getTime(r)),$("[name='running_pause_velocity']").val(m.getVelocity(o)),$("[name='running_time_pause']").val(m.getTime(i)),!1}),$("#calculator_hr_intensity_hrr").submit(function(e){console.log("Calculate HR intensity HRR"),e.preventDefault();let a=Number($("[name='hr_rest']").val()),t=Number($("[name='hr_max']").val()),n=Number($("[name='hr_work']").val()),l=hr_intensity.HRIntensity(t).getHRIntensityFromHeartRateReserve(a,n);$("[name='hrr_intensity']").val(l.toFixed(0))}),$("#calculator_hr_intensity_work").submit(function(e){console.log("Calculate HR work intensity HRR"),e.preventDefault();let a=Number($("[name='hr_rest_form2']").val()),t=Number($("[name='hr_max_form2']").val()),n=Number($("[name='intensity']").val()),l=n.HRIntensity(t).getHRBasedOnIntensityFromHeartRateReserve(a,n);$("[name='hrr_heartrate']").val(l.toFixed(0))}),$("#calculator_hr_intensity_from_max").submit(function(e){console.log("Calculate HR work intensity from HRmax"),e.preventDefault();let a=Number($("[name='hr_work_form3']").val()),t=Number($("[name='hr_max_form3']").val()),n=hr_intensity.HRIntensity(t).getWorkIntensityBasedOnMaxHR(a);$("[name='intensity_form3']").val(n.toFixed(0))}),$("#calculator_yyir1").submit(function(e){console.log("Calculate YYIR1"),e.preventDefault();let a=$("[name='sex']:checked").val(),t=Number($("[name='level']").val()),n=Number($("[name='shuttles']").val()),l=yyir1.YYIR1(t,n);$("[name='distance_result']").val(l.getDistance()),$("[name='vo2max_result']").val(l.getFitnessLevel()),$("[name='status']").val(l.getEvaluation(a,10))}),$("#calculator_beeptest_yye1").submit(function(e){console.log("Calculate YYIR1"),e.preventDefault();let a=$("[name='version']:checked").val(),t=Number($("[name='level']").val()),n=Number($("[name='shuttles']").val()),l=beeptest.BeepTest(t,n,a);$("[name='distance_result']").val(l.getDistance()),$("[name='vo2max_result']").val(l.getFitnessLevel().toFixed(1)),$("[name='totalshuttles_result']").val(l.getTotalShuttles())}),$("#calculator_pushups").submit(function(e){console.log("Calculate Pushups"),e.preventDefault();let a=$("[name='gender']:checked").val(),t=Number($("[name='age']").val()),n=Number($("[name='repetitions']").val()),l=pushup.Pushup(a,t,n);$("[name='population_average']").val(l.getPopulationAverage()),$("[name='score']").val(l.getScore()),$("[name='rating']").val(l.getRating())}),$("#calculator_wilksscore").submit(function(e){console.log("Calculate Wilks Score"),e.preventDefault();let a=$("[name='gender']:checked").val(),t=Number($("[name='bodyweight']").val()),n=Number($("[name='lifted']").val()),l=wilks.calculateWilksScore(a,t,n);$("[name='wilksscore']").val(l.toFixed(1))}),$("#calculator_ipf").submit(function(e){console.log("Calculate IPF Score"),e.preventDefault();let a,t=$("[name='ipf_gender']:checked").val(),n=Number($("[name='ipf_bodyweight']").val()),l=Number($("[name='ipf_lifted']").val()),r=$("[name='ipf_event']").val(),o=$("[name='ipf_equipment']").val(),i=Number($("[name='ipf_age']").val()),m=ipfpoints.IPFPoint(t,n,l,r,o),u=mcculloch.McCulloch(i);a=""!=u.getCoefficient()?m.getPoints()*u.getCoefficient():m.getPoints(),$("[name='ipf_points']").val(m.getPoints().toFixed(2)),$("[name='mcculloch_ipf_points']").val(a.toFixed(2))}),$("#calculator_hrzones_karvonen").submit(function(e){console.log("Calculate Karvonen Intensity Zones"),e.preventDefault();let a=Number($("#karvonen_min_hr").val()),t=Number($("#karvonen_max_hr").val()),n=karvonen.Karvonen(a,t),l=t-a;$("#karvonen_zone1_a").val(n.getTargetHR(50)),$("#karvonen_zone1_b").val(n.getTargetHR(60)),$("#karvonen_zone2_a").val(n.getTargetHR(60)),$("#karvonen_zone2_b").val(n.getTargetHR(70)),$("#karvonen_zone3_a").val(n.getTargetHR(70)),$("#karvonen_zone3_b").val(n.getTargetHR(80)),$("#karvonen_zone4_a").val(n.getTargetHR(80)),$("#karvonen_zone4_b").val(n.getTargetHR(90)),$("#karvonen_zone5_a").val(n.getTargetHR(90)),$("#karvonen_zone5_b").val(t),$("#karvonen_hrr").val(l)}),$("#calculator_hrzones_friel").submit(function(e){console.log("Calculate Friel Intensity Zones"),e.preventDefault();let a=Number($("#friel_lthr").val());$("#friel_zone1_a").val((.6*a).toFixed(0)),$("#friel_zone1_b").val((.75*a).toFixed(0)),$("#friel_zone2_a").val((.75*a).toFixed(0)),$("#friel_zone2_b").val((.85*a).toFixed(0)),$("#friel_zone3_a").val((.85*a).toFixed(0)),$("#friel_zone3_b").val((.95*a).toFixed(0)),$("#friel_zone4_a").val((.95*a).toFixed(0)),$("#friel_zone4_b").val((1.02*a).toFixed(0)),$("#friel_zone5_a").val((1.02*a).toFixed(0)),$("#friel_zone5_b").val("Maxpuls")}),$("#calculator_hrzones_maxhr").submit(function(e){console.log("Calculate Maxhr Intensity Zones"),e.preventDefault();let a=Number($("#maxhr_max_hr").val());$("#maxhr_zone1_a").val((.65*a).toFixed(0)),$("#maxhr_zone1_b").val((.7*a).toFixed(0)),$("#maxhr_zone2_a").val((.7*a).toFixed(0)),$("#maxhr_zone2_b").val((.8*a).toFixed(0)),$("#maxhr_zone3_a").val((.8*a).toFixed(0)),$("#maxhr_zone3_b").val((.9*a).toFixed(0)),$("#maxhr_zone4_a").val((.88*a).toFixed(0)),$("#maxhr_zone4_b").val((.94*a).toFixed(0)),$("#maxhr_zone5_a").val((.94*a).toFixed(0)),$("#maxhr_zone5_b").val(a)}),$("#calculator_vo2max_distance_test").submit(function(e){console.log("Calculate Distance"),e.preventDefault();let a=Number($("#tid_hours").val()),t=Number($("#tid_min").val()),n=Number($("#tid_sek").val()),l=Number($("#distance").val());t+=60*a,l/=1e3;let r=running_distance_vo2.RunningDistanceVO2();$("#kondital").val(r.getEstimatedFitnessLevel(t,n,l))}),$("#calculator_velocity").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='min']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='distance']").val()),l=running.Running();$("#velocity_kmt").val(l.getKilometersPrHour(n,a,t).toFixed(2)),$("#velocity_ms").val(l.getMeterPerSecond(n,a,t).toFixed(2)),$("#velocity_min_km").val(l.getTimePrKilometer(n,a,t))}),$("#calculator_velocity_speedlight").submit(function(e){console.log("Calculate speedlight"),e.preventDefault();let a=Number($("[name='sec']").val()),t=Number($("[name='hundrededele']").val()),n=Number($("[name='distance']").val())/1e3,l=running.Running();$("#velocity_kmt").val(l.getKilometersPrHour(n,0,a,t).toFixed(2)),$("#velocity_ms").val(l.getMeterPerSecond(n,0,a,t).toFixed(2))}),$("#calculator_velocity_speedlight_advanced").submit(function(e){console.log("Calculate speedlight Advanced"),e.preventDefault();let a=Number($("[name='sec_1']").val()),t=Number($("[name='hundrededele_1']").val()),n=Number($("[name='distance_1']").val())/1e3;console.log("Calculate:"+a+":"+t+" - "+n);let l=running.Running();$("#velocity_kmt_1").val(l.getKilometersPrHour(n,0,a,t).toFixed(2)),$("#velocity_ms_1").val(l.getMeterPerSecond(n,0,a,t).toFixed(2));let r=Number($("[name='sec_2']").val()),o=Number($("[name='hundrededele_2']").val()),i=Number($("[name='distance_2']").val())/1e3;console.log("Calculate:"+r+":"+o+" - "+i),$("#velocity_kmt_2").val(l.getKilometersPrHour(i-n,0,r-a,o-t).toFixed(2)),$("#velocity_ms_2").val(l.getMeterPerSecond(i-n,0,r-a,o-t).toFixed(2));let m=Number($("[name='sec_3']").val()),u=Number($("[name='hundrededele_3']").val()),c=Number($("[name='distance_3']").val())/1e3;console.log("Calculate:"+m+":"+u+" - "+c),$("#velocity_kmt_3").val(l.getKilometersPrHour(c-i,0,m-r,u-o).toFixed(2)),$("#velocity_ms_3").val(l.getMeterPerSecond(c-i,0,m-r,u-o).toFixed(2));let s=Number($("[name='sec_4']").val()),v=Number($("[name='hundrededele_4']").val()),_=Number($("[name='distance_4']").val())/1e3;console.log("Calculate:"+s+":"+v+" - "+_),$("#velocity_kmt_4").val(l.getKilometersPrHour(_-c,0,s-m,v-u).toFixed(2)),$("#velocity_ms_4").val(l.getMeterPerSecond(_-c,0,s-m,v-u).toFixed(2)),$("#velocity_kmt_advanced").val(l.getKilometersPrHour(_,0,s,v).toFixed(2)),$("#velocity_ms_advanced").val(l.getMeterPerSecond(_,0,s,v).toFixed(2))}),$("#calculator_velocity_distance").submit(function(e){console.log("Calculate distance"),e.preventDefault();let a=Number($("[name='dist_min']").val()),t=Number($("[name='dist_sec']").val()),n=Number($("[name='dist_velocity']").val()),l=running.Running();$("#dist_distance").val(l.getDistanceFromTimeAndVelocity(a,t,n).toFixed(1))}),$("#calculator_kipchoge_challenge").submit(function(e){console.log("Calculate time"),e.preventDefault();let a,t,n,l=Number($("[name='velocity']").val()),r=running.Running();(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.1,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t100']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.2,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t200']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.4,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t400']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.6,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t600']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(.8,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t800']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1000']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.2,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1200']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.4,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1400']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.6,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1600']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(1.8,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t1800']").val(t+":"+n),(n=(n=60*((a=r.getTimeFromDistanceAndVelocity(2,l))-(t=Math.floor(a)))).toFixed(0))<10&&(n="0"+n),$("[name='t2000']").val(t+":"+n)}),$("#calculator_velocity_time").submit(function(e){console.log("Calculate time"),e.preventDefault();let a=Number($("[name='time_distance']").val()),t=Number($("[name='time_velocity']").val()),n=running.Running().getTimeFromDistanceAndVelocity(a,t),l=Math.floor(n),r=60*(n-l);$("[name='time_min']").val(l),$("[name='time_sec']").val(r.toFixed(0))}),$("#calculator_how_far_interval").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='min']").val()),t=Number($("[name='sec']").val()),n=Number($("[name='duration_min']").val()),l=Number($("[name='duration_sec']").val()),r=running.Running();$("[name='distance_to_run']").val(r.convertMinPerKmToDistanceForDuration(a,t,n,l).toFixed(0))}),$("#calculator_convert_kmt_minkm_velocity").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='kmt']").val()),t=running.Running();$("#velocity_convert_minkm").val(t.convertKmtToMinPerKm(a))}),$("#calculator_convert_minkm_kmt_velocity").submit(function(e){console.log("Calculate velocity"),e.preventDefault();let a=Number($("[name='minkm_kmt_min']").val()),t=Number($("[name='minkm_kmt_sec']").val()),n=running.Running();$("#velocity_convert_kmt").val(n.convertMinPerKmToKmt(a,t))}),$("#calculator_running_economy").submit(function(e){console.log("Calculate running economy"),e.preventDefault();let a=Number($("[name='weight']").val()),t=Number($("[name='velocity']").val()),n=Number($("[name='oxygenuptake']").val()),l=running_economy.RunningEconomy(n,t);$("#running_economy").val(l.getRunningEconomyInMlPrKgPrMin(a).toFixed(2))}),$("#calculator_oxygen_uptake").submit(function(e){console.log("Calculate oxygen uptake"),e.preventDefault();let a=Number($("[name='fitness_weight']").val()),t=Number($("[name='fitness_oxygenuptake']").val()),n=running_economy.RunningEconomy(a,t);$("#fitness_level").val(n.getFitnessLevel().toFixed(2))}),$("#calculator_cooper_2400_test").submit(function(e){console.log("Calculate CooperTest 2400"),e.preventDefault();let a=Number($("#tid_min").val()),t=Number($("#tid_sek").val()),n=cooper_test.CooperRunning();$("#kondital").val(n.getVO22400MeterTest(a,t))}),$("#calculator_cooper_test").submit(function(e){console.log("Calculate CooperTest"),e.preventDefault();let a=Number($("#distance").val()),t=cooper_test.CooperRunning();$("#kondital").val(t.getVO212MinTest(a).toFixed(0))}),$("#calculator_cooper_reverse_test").submit(function(e){console.log("Calculate CooperTest"),e.preventDefault();let a=Number($("#reverse-kondital").val()),t=cooper_test.CooperRunning();$("#reverse-distance").val(t.getDistanceFromVO2Max(a).toFixed(0))}),$("#calculator_fat_percent_food").submit(function(e){console.log("Calculate Fat Energy Pct"),e.preventDefault();let a=Number($("#kj").val()),t=Number($("#fat").val()),n=fatenergypct.FatEnergyPct(a,t);$("#fat_energy_pct").val(n.getFatEnergyPct())}),$("#calculator_waist").submit(function(e){console.log("Calculate Waist"),e.preventDefault();let a=Number($("#hip").val()),t=Number($("#waist").val()),n=Number($("#height").val()),l=whr.WaistRatio();$("#whr").val(l.getWaistHipRatio(t,a).toFixed(2)),$("#waistheightratio").val(l.getWaistHeightRatio(t,n).toFixed(2))}),$("[input='number']").on("input keyup change paste",function(){this.min&&(this.value=Math.max(parseInt(this.min),parseInt(this.value))),this.max&&(this.value=Math.min(parseInt(this.max),parseInt(this.value)))}),$(".adductor-longus").hover(function(){$(".adductor-longus").toggleClass("anatomy-popup-on")}),$(".adductor-magnus").hover(function(){$(".adductor-magnus").toggleClass("anatomy-popup-on")}),$(".anconeus").hover(function(){$(".anconeus").toggleClass("anatomy-popup-on")}),$(".biceps-brachii").hover(function(){$(".biceps-brachii").toggleClass("anatomy-popup-on")}),$(".biceps-femoris").hover(function(){$(".biceps-femoris").toggleClass("anatomy-popup-on")}),$(".brachioradialis").hover(function(){$(".brachioradialis").toggleClass("anatomy-popup-on")}),$(".deltoideus").hover(function(){$(".deltoideus").toggleClass("anatomy-popup-on")}),$(".extensor-carpi-radialis-longus").hover(function(){$(".extensor-carpi-radialis-longus").toggleClass("anatomy-popup-on")}),$(".extensor-carpi-ulnaris").hover(function(){$(".extensor-carpi-ulnaris").toggleClass("anatomy-popup-on")}),$(".extensor-digitori-minimi").hover(function(){$(".extensor-digitori-minimi").toggleClass("anatomy-popup-on")}),$(".extensor-digitorum").hover(function(){$(".extensor-digitorum").toggleClass("anatomy-popup-on")}),$(".external-oblique").hover(function(){$(".external-oblique").toggleClass("anatomy-popup-on")}),$(".flexor-carpi-radialis").hover(function(){$(".flexor-carpi-radialis").toggleClass("anatomy-popup-on")}),$(".flexor-carpi-ulnaris").hover(function(){$(".flexor-carpi-ulnaris").toggleClass("anatomy-popup-on")}),$(".gastrocnemius").hover(function(){$(".gastrocnemius").toggleClass("anatomy-popup-on")}),$(".gluteus-maximus").hover(function(){$(".gluteus-maximus").toggleClass("anatomy-popup-on")}),$(".gluteus-medius").hover(function(){$(".gluteus-medius").toggleClass("anatomy-popup-on")}),$(".gracilis").hover(function(){$(".gracilis").toggleClass("anatomy-popup-on")}),$(".infraspinatus").hover(function(){$(".infraspinatus").toggleClass("anatomy-popup-on")}),$(".internal-oblique").hover(function(){$(".internal-oblique").toggleClass("anatomy-popup-on")}),$(".latissimus-dorsi").hover(function(){$(".latissimus-dorsi").toggleClass("anatomy-popup-on")}),$(".pectineus").hover(function(){$(".pectineus").toggleClass("anatomy-popup-on")}),$(".pectoralis-major").hover(function(){$(".pectoralis-major").toggleClass("anatomy-popup-on")}),$(".rectus-abdominis").hover(function(){$(".rectus-abdominis").toggleClass("anatomy-popup-on")}),$(".rectus-femoris").hover(function(){$(".rectus-femoris").toggleClass("anatomy-popup-on")}),$(".sartorius").hover(function(){$(".sartorius").toggleClass("anatomy-popup-on")}),$(".semimembranosus").hover(function(){$(".semimembranosus").toggleClass("anatomy-popup-on")}),$(".semitendinosus").hover(function(){$(".semitendinosus").toggleClass("anatomy-popup-on")}),$(".serratus-anterior").hover(function(){$(".serratus-anterior").toggleClass("anatomy-popup-on")}),$(".soleus").hover(function(){$(".soleus").toggleClass("anatomy-popup-on")}),$(".teres-major").hover(function(){$(".teres-major").toggleClass("anatomy-popup-on")}),$(".tibialis-anterior").hover(function(){$(".tibialis-anterior").toggleClass("anatomy-popup-on")}),$(".trapezius").hover(function(){$(".trapezius").toggleClass("anatomy-popup-on")}),$(".triceps-brachii").hover(function(){$(".triceps-brachii").toggleClass("anatomy-popup-on")}),$(".vastus-lateralis").hover(function(){$(".vastus-lateralis").toggleClass("anatomy-popup-on")}),$(".vastus-medialis").hover(function(){$(".vastus-medialis").toggleClass("anatomy-popup-on")})}); -},{"../js/bodywater":17,"../js/fatenergypct":25,"../js/flyer-handicap":29,"../js/hr-intensity":31,"../js/rer":43,"../js/rowing-ergrowing":45,"../js/rowing-power-calculator":46,"../js/rowing-vo2":47,"../js/treadmill":63,"../js/waist":66,"../js/walktest-rockport-16":67,"../js/walktest-sixminutes":68,"../js/wattmax":70,"./1rm":3,"./andersen-test":4,"./beeptest":7,"./beeptest-yyir1":6,"./billat":8,"./blood":9,"./bmi":11,"./bmi-evaluation":10,"./bmr-benedict-harris":12,"./bmr-ligevaegt":13,"./bmr-nordic-2012":14,"./bmr-schofield":15,"./bmr-totalenergy-pal":16,"./borg15":18,"./cooper":20,"./cooper-running":19,"./etpunkttest":21,"./fat-pct":24,"./fat-pct-measurements":22,"./fat-pct-navy":23,"./fitness-hr":26,"./fitness-index-23":27,"./fitness-jogging":28,"./how-tall":30,"./ideal-weight":32,"./index100":33,"./inol":34,"./ipf-points":36,"./ipf-points-mcculloch":35,"./jumpreach":37,"./karvonen":38,"./lung":39,"./max-hr":40,"./ponderal-index":41,"./pushup":42,"./riegel":44,"./rpe-strength":48,"./running":56,"./running-distance-vo2":49,"./running-economy":50,"./running-walking":54,"./running-walking-energy.js":51,"./running-walking-leger.js":52,"./running-walking-pandolf.js":53,"./running-weightloss":55,"./skinfold-durnin":57,"./skinfold-lohman":58,"./skinfold-peterson":59,"./skinfold-pollock":60,"./skinfold-slaughter":61,"./topunkttest":62,"./vmax":65,"./vmax-intervals":64,"./water-intake":69,"./y-balance":71,"image-map-resizer":1,"wilks-calculator":2}],6:[function(require,module,exports){ +},{"../js/bodywater":17,"../js/fatenergypct":25,"../js/flyer-handicap":29,"../js/hr-intensity":31,"../js/rer":43,"../js/rowing-ergrowing":45,"../js/rowing-power-calculator":46,"../js/rowing-vo2":47,"../js/treadmill":63,"../js/vam":64,"../js/waist":67,"../js/walktest-rockport-16":68,"../js/walktest-sixminutes":69,"../js/wattmax":71,"./1rm":3,"./andersen-test":4,"./beeptest":7,"./beeptest-yyir1":6,"./billat":8,"./blood":9,"./bmi":11,"./bmi-evaluation":10,"./bmr-benedict-harris":12,"./bmr-ligevaegt":13,"./bmr-nordic-2012":14,"./bmr-schofield":15,"./bmr-totalenergy-pal":16,"./borg15":18,"./cooper":20,"./cooper-running":19,"./etpunkttest":21,"./fat-pct":24,"./fat-pct-measurements":22,"./fat-pct-navy":23,"./fitness-hr":26,"./fitness-index-23":27,"./fitness-jogging":28,"./how-tall":30,"./ideal-weight":32,"./index100":33,"./inol":34,"./ipf-points":36,"./ipf-points-mcculloch":35,"./jumpreach":37,"./karvonen":38,"./lung":39,"./max-hr":40,"./ponderal-index":41,"./pushup":42,"./riegel":44,"./rpe-strength":48,"./running":56,"./running-distance-vo2":49,"./running-economy":50,"./running-walking":54,"./running-walking-energy.js":51,"./running-walking-leger.js":52,"./running-walking-pandolf.js":53,"./running-weightloss":55,"./skinfold-durnin":57,"./skinfold-lohman":58,"./skinfold-peterson":59,"./skinfold-pollock":60,"./skinfold-slaughter":61,"./topunkttest":62,"./vmax":66,"./vmax-intervals":65,"./water-intake":70,"./y-balance":72,"image-map-resizer":1,"wilks-calculator":2}],6:[function(require,module,exports){ let motionsplan={YYIR1:function(e,r){let t=[0,0,0,0,0,40,40,40,40,80,80,120,200,320,480,800,1120,1440,1760,2080,2400,2720,3040,3360][e]+(40*r-40),n=.0084*t+36.4;function i(){return t}return{getDistance:i,getEvaluation:function(e,r=10){let t,n=i();if(t=r<=25?0:r<=35?1:r<=45?2:r<=55?3:r<=65?4:5,"male"==e){let e=[[2400,57,52,46,42,38],[2e3,49,43,39,36,33],[1520,43,39,36,32,29],[1040,40,35,32,30,26],[520,35,31,29,26,22],[0,30,26,25,22,20],[0,0,0,0,0,0]];if(n>=e[0][t])return"Elite";if(n>=e[1][t])return"Excellent";if(n>=e[2][t])return"Good";if(n>=e[3][t])return"Average";if(n>=e[4][t])return"Below Average";if(n>=e[5][t])return"Poor";if(n>=e[6][t])return"Poor"}else{let e=[[1600,53,46,41,38,33],[1320,45,38,34,32,28],[1e3,39,34,31,28,25],[680,35,31,28,25,22],[320,31,27,25,22,19],[0,26,22,20,18,17],[0,0,0,0,0,0]];if(n>=e[0][t])return"Elite";if(n>=e[1][t])return"Excellent";if(n>=e[2][t])return"Good";if(n>=e[3][t])return"Average";if(n>=e[4][t])return"Below Average";if(n>=e[5][t])return"Poor";if(n>=e[6][t])return"Poor"}},getFitnessLevel:function(){return n}}}};module.exports=motionsplan; },{}],7:[function(require,module,exports){ @@ -188,27 +188,30 @@ let motionsplan={ToPunktTest:function(t,n,e,o,r,u,i){let l=o,a=r,s=u,m=i,c=e;fun let motionsplan={Treadmill:function(t,e,y,_,n){return{getKcal:function(){let d=e,m=y,a=_,l=n;return d=d,y_00=d/1.61,a=a,d_00=a/1.61,l=l,m_00=l/.454,0==d&&0!=m&&(d=a/m*60,y_00=d/1.61),0==m&&0!=d&&(m=a/d*60),0==a&&(a=d*m/60,d_00=a/1.61),y0=d+d*t*9/200,ymp0=y_00+y_00*t*9/200,z0=m,d0=y0*m/60,dm0=ymp0*m/60,cal=(1e3*y0/60+17.5)*m*l/1e3,cal},getMets:function(){let d=e,m=y,a=_,l=n;return d=d,y_00=d/1.61,a=a,d_00=a/1.61,l=l,m_00=l/.454,0==d&&0!=m&&(d=a/m*60,y_00=d/1.61),0==m&&0!=d&&(m=a/d*60),0==a&&(a=d*m/60,d_00=a/1.61),y0=d+d*t*9/200,ymp0=y_00+y_00*t*9/200,z0=m,d0=y0*m/60,dm0=ymp0*m/60,cal=(1e3*y0/60+17.5)*m*l/1e3,fat=cal/7/2,fatoz=fat/28.3495,mets=cal/l/m*60,mets},getKj:function(){let d=e,m=y,a=_,l=n;return d=d,y_00=d/1.61,a=a,d_00=a/1.61,l=l,m_00=l/.454,0==d&&0!=m&&(d=a/m*60,y_00=d/1.61),0==m&&0!=d&&(m=a/d*60),0==a&&(a=d*m/60,d_00=a/1.61),y0=d+d*t*9/200,ymp0=y_00+y_00*t*9/200,z0=m,d0=y0*m/60,dm0=ymp0*m/60,cal=(1e3*y0/60+17.5)*m*l/1e3,fat=cal/7/2,fatoz=fat/28.3495,mets=cal/l/m*60,kj=4.184*cal,kj},getKwh:function(){let d=e,m=y,a=_,l=n;return d=d,y_00=d/1.61,a=a,d_00=a/1.61,l=l,m_00=l/.454,0==d&&0!=m&&(d=a/m*60,y_00=d/1.61),0==m&&0!=d&&(m=a/d*60),0==a&&(a=d*m/60,d_00=a/1.61),y0=d+d*t*9/200,ymp0=y_00+y_00*t*9/200,z0=m,d0=y0*m/60,dm0=ymp0*m/60,cal=(1e3*y0/60+17.5)*m*l/1e3,fat=cal/7/2,fatoz=fat/28.3495,mets=cal/l/m*60,kj=4.184*cal,kw=kj/3600,kw},getTime:function(){let t=e,d=y,m=_,a=n;return t=t,y_00=t/1.61,m=m,d_00=m/1.61,a=a,m_00=a/.454,0==t&&0!=d&&(t=m/d*60,y_00=t/1.61),0==d&&0!=t&&(d=m/t*60),0==m&&(m=t*d/60,d_00=m/1.61),d},getSpeed:function(){let t=e,d=y,m=_,a=n;return t=t,y_00=t/1.61,m=m,d_00=m/1.61,a=a,m_00=a/.454,0==t&&0!=d&&(t=m/d*60,y_00=t/1.61),0==d&&0!=t&&(d=m/t*60),0==m&&(m=t*d/60,d_00=m/1.61),t},getDistance:function(){let t=e,d=y,m=_,a=n;return t=t,y_00=t/1.61,m=m,d_00=m/1.61,a=a,m_00=a/.454,0==t&&0!=d&&(t=m/d*60,y_00=t/1.61),0==d&&0!=t&&(d=m/t*60),0==m&&(m=t*d/60,d_00=m/1.61),m},getGradientCorrectedDistance:function(){let d=e,m=y,a=_,l=n;return d=d,y_00=d/1.61,a=a,d_00=a/1.61,l=l,m_00=l/.454,0==d&&0!=m&&(d=a/m*60,y_00=d/1.61),0==m&&0!=d&&(m=a/d*60),0==a&&(a=d*m/60,d_00=a/1.61),y0=d+d*t*9/200,ymp0=y_00+y_00*t*9/200,z0=m,d0=y0*m/60,dm0=ymp0*m/60,d0},getGradientCorrectedSpeed:function(){let d=e,m=y,a=_,l=n;return d=d,y_00=d/1.61,a=a,d_00=a/1.61,l=l,m_00=l/.454,0==d&&0!=m&&(d=a/m*60,y_00=d/1.61),0==m&&0!=d&&(m=a/d*60),0==a&&(a=d*m/60,d_00=a/1.61),y0=d+d*t*9/200,ymp0=y_00+y_00*t*9/200,y0}}}};module.exports=motionsplan; },{}],64:[function(require,module,exports){ -let motionsplan={VmaxIntervals:function(t,o,e){t=t;let n=60*(o=o)+(e=e);return{getVelocity:function(o=60){return(t*(o/=100)).toFixed(2)},getTime:function(t=60){t/=100;let o=Math.floor(n*t/60),e=(n*t-60*Math.floor(n*t/60)).toFixed(0);return e<10&&(e="0"+e),o+":"+e}}}};module.exports=motionsplan; +let motionsplan={VAM:function(t,n,e){function o(){return 60*t/(n+e/60)}function r(t){return 2+t/10}return{getVAM:o,getGradientFactor:r,getRelativePower:function(t){return o()/(100*r(t))}}}};module.exports=motionsplan; },{}],65:[function(require,module,exports){ -let motionsplan={Vmax:function(n){return n=n,{getVmax:function(){return 21*n/60*.23}}}};module.exports=motionsplan; +let motionsplan={VmaxIntervals:function(t,o,e){t=t;let n=60*(o=o)+(e=e);return{getVelocity:function(o=60){return(t*(o/=100)).toFixed(2)},getTime:function(t=60){t/=100;let o=Math.floor(n*t/60),e=(n*t-60*Math.floor(n*t/60)).toFixed(0);return e<10&&(e="0"+e),o+":"+e}}}};module.exports=motionsplan; },{}],66:[function(require,module,exports){ -let motionsplan={WaistRatio:function(){return{getWaistHeightRatio:function(t,i){return t/i},getWaistHipRatio:function(t,i){return t/i}}}};module.exports=motionsplan; +let motionsplan={Vmax:function(n){return n=n,{getVmax:function(){return 21*n/60*.23}}}};module.exports=motionsplan; },{}],67:[function(require,module,exports){ -let motionsplan={};motionsplan.RockPortWalkingTest=function(t,n,e,l,o,i,u="kline"){let r;e=e,o=o;let a=2.2046226218*i;r="male"==(l=l)?1:0;let s=t+n/60;function m(){return"lunt"==u?c():132.853-.0769*a-.3877*o+6.315*r-3.2649*s-.1565*e}function c(){return 51.047+8.336*r+635.012/s-.225*e-.271*i-.231*o}return{getFitnessLevel:m,getLunt:c,getMaximalOxygenUptake:function(){return m()*i/1e3}}},module.exports=motionsplan; +let motionsplan={WaistRatio:function(){return{getWaistHeightRatio:function(t,i){return t/i},getWaistHipRatio:function(t,i){return t/i}}}};module.exports=motionsplan; },{}],68:[function(require,module,exports){ -let motionsplan={};motionsplan.SixMinutesWalkingTest=function(n,e,t,r,u){function i(){return 1==n}function o(n="false"){return"repeated"==n?function(){if(i())return 868.8-2.99*e;return 868.8-2.99*e-74.7}():function(){if(i())return 7.57*t-5.02*e-1.76*r-309;return 2.11*t-5.78*e-2.29*r+667}()}return n=n,e=e,t=t,r=r,u=u=u,{getReferenceMeter:o,getPercent:function(n="false"){return u/o(n)*100}}},module.exports=motionsplan; +let motionsplan={};motionsplan.RockPortWalkingTest=function(t,n,e,l,o,i,u="kline"){let r;e=e,o=o;let a=2.2046226218*i;r="male"==(l=l)?1:0;let s=t+n/60;function m(){return"lunt"==u?c():132.853-.0769*a-.3877*o+6.315*r-3.2649*s-.1565*e}function c(){return 51.047+8.336*r+635.012/s-.225*e-.271*i-.231*o}return{getFitnessLevel:m,getLunt:c,getMaximalOxygenUptake:function(){return m()*i/1e3}}},module.exports=motionsplan; },{}],69:[function(require,module,exports){ -let motionsplan={WaterIntake:function(t){let e=30,n=40;return{getDailyWaterIntake:function(o="lower"){return"upper"==o?t*n:t*e}}}};module.exports=motionsplan; +let motionsplan={};motionsplan.SixMinutesWalkingTest=function(n,e,t,r,u){function i(){return 1==n}function o(n="false"){return"repeated"==n?function(){if(i())return 868.8-2.99*e;return 868.8-2.99*e-74.7}():function(){if(i())return 7.57*t-5.02*e-1.76*r-309;return 2.11*t-5.78*e-2.29*r+667}()}return n=n,e=e,t=t,r=r,u=u=u,{getReferenceMeter:o,getPercent:function(n="false"){return u/o(n)*100}}},module.exports=motionsplan; },{}],70:[function(require,module,exports){ -let motionsplan={Wattmax:function(n,t,e,o,r=25){function u(){return o<18}function i(){return u()?n-r+r*t/180:n-35+35*t/120}function a(){return u()?(13.16*i()+5*e)/1e3:.0117*i()+.16}return n=n,t=t,e=e,o=o,r=r,{getFitnessLevel:function(){return u(),a()/e*1e3},getMaximalOxygenUptake:a,getMPO:i}}};module.exports=motionsplan; +let motionsplan={WaterIntake:function(t){let e=30,n=40;return{getDailyWaterIntake:function(o="lower"){return"upper"==o?t*n:t*e}}}};module.exports=motionsplan; },{}],71:[function(require,module,exports){ +let motionsplan={Wattmax:function(n,t,e,o,r=25){function u(){return o<18}function i(){return u()?n-r+r*t/180:n-35+35*t/120}function a(){return u()?(13.16*i()+5*e)/1e3:.0117*i()+.16}return n=n,t=t,e=e,o=o,r=r,{getFitnessLevel:function(){return u(),a()/e*1e3},getMaximalOxygenUptake:a,getMPO:i}}};module.exports=motionsplan; + +},{}],72:[function(require,module,exports){ let motionsplan={YBalance:function(e,t,n){function o(){return(e+t+n)/3}return{getAbsoluteReachDistance:o,getRelativeReachScore:function(e){return o()/e*100},getCompositeReachScore:function(o){return(e+t+n)/(3*o)*100}}}};module.exports=motionsplan; },{}]},{},[5]); diff --git a/src/js/app.bundle.js b/src/js/app.bundle.js index 8162ff5a6f34..2c164c7e598e 100644 --- a/src/js/app.bundle.js +++ b/src/js/app.bundle.js @@ -71,6 +71,7 @@ const rowing_power_calculator = require('../js/rowing-power-calculator'); const rowing_vo2 = require('../js/rowing-vo2'); const rowing_powerprofile = require('../js/rowing-ergrowing'); const rer = require('../js/rer'); +const vam = require('../js/vam'); require('image-map-resizer'); $(function() { @@ -494,6 +495,21 @@ $(function() { let recommended_kreatin_intake = kreatin_intake_kg * weight; $("#kreatin_intake").val(recommended_kreatin_intake); }); + $("#calculator_vam").submit(function(e) { + console.log("Calculate VAM"); + e.preventDefault(); + + let distance_climbed = Number($("[name='distance_climbed']").val()); + let gradient = Number($("[name='gradient']").val()); + let minutes = Number($("[name='tid_min']").val()); + let seconds = Number($("[name='tid_sek']").val()); + + let o_vam = vam.VAM(distance_climbed, minutes, seconds); + + $("#vam").val(o_vam.getVAM().toFixed(0)); + $("#gradient_factor").val(o_vam.getGradientFactor(gradient).toFixed(2)); + $("#relative_power").val(o_vam.getRelativePower(gradient).toFixed(2)); + }); $("#calculator_kroppens_rumfang").submit(function(e) { console.log("Calculate Kroppens Rumfang"); e.preventDefault(); diff --git a/src/js/vam.js b/src/js/vam.js new file mode 100644 index 000000000000..0233a116e49f --- /dev/null +++ b/src/js/vam.js @@ -0,0 +1,26 @@ +let motionsplan = {}; + +motionsplan.VAM = function(ascent_meters, minutes, seconds) { + + function getVAM() { + return ascent_meters * 60 / (minutes + seconds/60); + } + + function getGradientFactor(gradient_percent) { + return 2 + (gradient_percent / 10); + } + + function getRelativePower(gradient_percent) { + return getVAM() / (getGradientFactor(gradient_percent) * 100); + } + + let publicAPI = { + getVAM : getVAM, + getGradientFactor : getGradientFactor, + getRelativePower : getRelativePower + }; + + return publicAPI; +}; + +module.exports = motionsplan; diff --git a/src/test/running-economy.js b/src/test/running-economy.js index 8302c93596ad..da7404c2a8d9 100644 --- a/src/test/running-economy.js +++ b/src/test/running-economy.js @@ -6,10 +6,10 @@ describe('RunningEconomy', function() { it('should return the correct number', function() { let r = motionsplan.RunningEconomy(3.5, 12.5); - assert.equal(r.getRunningEconomyInMlPrKgPrMin(), 240); + assert.equal(r.getRunningEconomyInMlPrKgPrMin(70), 240); }); }); - describe('getFitnessLevel', function() { + describe('ggetOxygenPrKgPrMin', function() { it('should return the correct number', function() { let r = motionsplan.RunningEconomy(3.5, 12.5); @@ -17,7 +17,7 @@ describe('RunningEconomy', function() { }); }); - describe('getFitnessLevel', function() { + describe('getOxygenPrKm', function() { it('should return the correct number', function() { let r = motionsplan.RunningEconomy(3.5, 12.5); diff --git a/src/test/vam.js b/src/test/vam.js new file mode 100644 index 000000000000..0b375af0ccff --- /dev/null +++ b/src/test/vam.js @@ -0,0 +1,27 @@ +const motionsplan = require('../js/vam.js'); +let assert = require('assert'); + +describe('VAM', function() { + describe('getGradientFactor', function() { + it('should return the correct number', function() { + + // age, heart rate, blood pressure, diabetes, smoker, bmi, fitness + let vam = motionsplan.VAM(1249, 39, 43); + assert.equal(vam.getGradientFactor(7.91), 2.791); + }); + }); + describe('getVAM', function() { + it('should return the correct number', function() { + // age, heart rate, blood pressure, diabetes, smoker, bmi, fitness + let vam = motionsplan.VAM(1249, 39, 43); + assert.equal(vam.getVAM(), 1886.8652958455727); + }); + }); + describe('getRelativePower', function() { + it('should return the correct number', function() { + // age, heart rate, blood pressure, diabetes, smoker, bmi, fitness + let vam = motionsplan.VAM(1249, 39, 43); + assert.equal(vam.getRelativePower(7.91), 6.76053491883043); + }); + }); +});#TDF2024 | Stage 15 🇫🇷
— Watts in Cycling (@WattsinCycling) July 14, 2024
⛰️🏁 PLATEAU DE BEILLE (15.8 km, 7.91%, 1249 m)
🇸🇮 Tadej Pogačar
• 39:43 - RECORD
• 6.90 w/kg (est. 65 kg standard)
• 1887 m/h VAM
• 23.87 km/h
The greatest performance of all time, shattering Marco Pantani's old record
(1998 | 43:28) pic.twitter.com/IvOWaHmCj3