@glandais/vcyclist-engine 4.3.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,21 +38,28 @@
38
38
  var initMetadataForClass = kotlin_kotlin.$_$.u6;
39
39
  var toString = kotlin_kotlin.$_$.m7;
40
40
  var hashCode = kotlin_kotlin.$_$.t6;
41
+ var ElevationGainPreset_DEM_getInstance = kotlin_io_github_glandais_gpx.$_$.c;
41
42
  var initMetadataForObject = kotlin_kotlin.$_$.a7;
42
43
  var getBooleanHashCode = kotlin_kotlin.$_$.p6;
43
44
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.a2;
44
45
  var Unit_instance = kotlin_kotlin.$_$.g1;
46
+ var ElevationGainOptions = kotlin_io_github_glandais_gpx.$_$.y;
47
+ var isFinite = kotlin_kotlin.$_$.ma;
45
48
  var CoroutineImpl = kotlin_kotlin.$_$.d5;
46
- var PointPerDistance_instance = kotlin_io_github_glandais_gpx.$_$.l;
47
- var ElevationStep_instance = kotlin_io_github_glandais_gpx.$_$.i;
49
+ var PointPerDistance_instance = kotlin_io_github_glandais_gpx.$_$.o;
50
+ var ElevationStep_instance = kotlin_io_github_glandais_gpx.$_$.l;
48
51
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.o4;
49
- var PointPerSecond_instance = kotlin_io_github_glandais_gpx.$_$.m;
50
- var PathSimplifier_instance = kotlin_io_github_glandais_gpx.$_$.j;
52
+ var PointPerSecond_instance = kotlin_io_github_glandais_gpx.$_$.p;
53
+ var PathSimplifier_instance = kotlin_io_github_glandais_gpx.$_$.m;
54
+ var ElevationGain_instance = kotlin_io_github_glandais_gpx.$_$.k;
51
55
  var initMetadataForCoroutine = kotlin_kotlin.$_$.w6;
56
+ var Companion_instance = kotlin_kotlin.$_$.e1;
57
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.x2;
58
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i1;
52
59
  var enumEntries = kotlin_kotlin.$_$.f5;
53
60
  var Enum = kotlin_kotlin.$_$.t9;
54
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j1;
55
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i1;
61
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.qa;
62
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.j1;
56
63
  var last = kotlin_kotlin.$_$.q3;
57
64
  var toIntArray = kotlin_kotlin.$_$.f4;
58
65
  var sortedWith = kotlin_kotlin.$_$.b4;
@@ -60,8 +67,7 @@
60
67
  var first = kotlin_kotlin.$_$.j3;
61
68
  var removeAll = kotlin_kotlin.$_$.w3;
62
69
  var numberRangeToNumber = kotlin_kotlin.$_$.f7;
63
- var collectionSizeOrDefault = kotlin_kotlin.$_$.x2;
64
- var Vector3D = kotlin_io_github_glandais_elevation.$_$.g;
70
+ var Vector3D = kotlin_io_github_glandais_elevation.$_$.h;
65
71
  var emptyList = kotlin_kotlin.$_$.g3;
66
72
  var coerceIn = kotlin_kotlin.$_$.u7;
67
73
  var DouglasPeucker_instance = kotlin_io_github_glandais_elevation.$_$.b;
@@ -73,14 +79,11 @@
73
79
  var Pair = kotlin_kotlin.$_$.z9;
74
80
  var listOf = kotlin_kotlin.$_$.r3;
75
81
  var Default_getInstance = kotlin_kotlin.$_$.b1;
76
- var Companion_instance = kotlin_kotlin.$_$.e1;
77
82
  var equals_0 = kotlin_kotlin.$_$.p8;
78
- var noWhenBranchMatchedException = kotlin_kotlin.$_$.qa;
79
83
  var isNaN_0 = kotlin_kotlin.$_$.oa;
80
- var isFinite = kotlin_kotlin.$_$.ma;
81
- var PointField_TEMPERATURE_getInstance = kotlin_io_github_glandais_gpx.$_$.c;
82
- var get_entries = kotlin_io_github_glandais_gpx.$_$.w;
83
- var Path = kotlin_io_github_glandais_gpx.$_$.v;
84
+ var PointField_TEMPERATURE_getInstance = kotlin_io_github_glandais_gpx.$_$.d;
85
+ var get_entries = kotlin_io_github_glandais_gpx.$_$.a1;
86
+ var Path = kotlin_io_github_glandais_gpx.$_$.z;
84
87
  var arrayCopy = kotlin_kotlin.$_$.t2;
85
88
  var sort = kotlin_kotlin.$_$.d4;
86
89
  var numberToInt = kotlin_kotlin.$_$.h7;
@@ -102,42 +105,44 @@
102
105
  var zipWithNext = kotlin_kotlin.$_$.l4;
103
106
  var toDoubleArray = kotlin_kotlin.$_$.e4;
104
107
  var joinToString = kotlin_kotlin.$_$.m3;
105
- var GpxParser_instance = kotlin_io_github_glandais_gpx.$_$.d;
108
+ var GpxParser_instance = kotlin_io_github_glandais_gpx.$_$.e;
106
109
  var copyToArray = kotlin_kotlin.$_$.f3;
107
- var firstTrackAsPath = kotlin_io_github_glandais_gpx.$_$.o;
108
- var tracksAsPaths = kotlin_io_github_glandais_gpx.$_$.s;
109
- var segmentsAsPaths = kotlin_io_github_glandais_gpx.$_$.q;
110
+ var firstTrackAsPath = kotlin_io_github_glandais_gpx.$_$.r;
111
+ var tracksAsPaths = kotlin_io_github_glandais_gpx.$_$.v;
112
+ var segmentsAsPaths = kotlin_io_github_glandais_gpx.$_$.t;
110
113
  var GpxPathKind_TRACK_getInstance = kotlin_io_github_glandais_gpx.$_$.b;
111
114
  var setOf = kotlin_kotlin.$_$.z3;
112
115
  var GpxPathKind_ROUTE_getInstance = kotlin_io_github_glandais_gpx.$_$.a;
113
- var GpxWriter_instance = kotlin_io_github_glandais_gpx.$_$.f;
116
+ var GpxWriter_instance = kotlin_io_github_glandais_gpx.$_$.g;
114
117
  var toList = kotlin_kotlin.$_$.i4;
115
- var pathsToGpxDocument = kotlin_io_github_glandais_gpx.$_$.p;
116
- var toGpxDocument = kotlin_io_github_glandais_gpx.$_$.r;
117
118
  var Companion_getInstance = kotlin_kotlin.$_$.d1;
119
+ var pathsToGpxDocument = kotlin_io_github_glandais_gpx.$_$.s;
120
+ var toGpxDocument = kotlin_io_github_glandais_gpx.$_$.u;
118
121
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
119
122
  var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
120
- var Companion_getInstance_0 = kotlin_io_github_glandais_gpx.$_$.k;
123
+ var Companion_getInstance_0 = kotlin_io_github_glandais_gpx.$_$.n;
121
124
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.c2;
122
- var CsvWriter_instance = kotlin_io_github_glandais_gpx.$_$.g;
125
+ var CsvOptions = kotlin_io_github_glandais_gpx.$_$.w;
126
+ var CsvWriter_instance = kotlin_io_github_glandais_gpx.$_$.h;
123
127
  var firstOrNull = kotlin_kotlin.$_$.q8;
124
- var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.b;
125
128
  var Char = kotlin_kotlin.$_$.r9;
126
- var CsvOptions = kotlin_io_github_glandais_gpx.$_$.t;
127
- var JsonWriter_instance = kotlin_io_github_glandais_gpx.$_$.h;
128
- var JsonOptions = kotlin_io_github_glandais_gpx.$_$.u;
129
+ var charSequenceLength = kotlin_kotlin.$_$.i6;
130
+ var JsonOptions = kotlin_io_github_glandais_gpx.$_$.x;
131
+ var JsonWriter_instance = kotlin_io_github_glandais_gpx.$_$.i;
129
132
  var toFitBytes = kotlin_io_github_glandais_fit.$_$.a;
130
133
  var Companion_getInstance_1 = kotlin_kotlin.$_$.c1;
131
134
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.w;
132
135
  var toDuration = kotlin_kotlin.$_$.q9;
133
136
  var toFitBytes_0 = kotlin_io_github_glandais_fit.$_$.b;
134
137
  var toNumber = kotlin_kotlin.$_$.a6;
135
- var Companion_getInstance_2 = kotlin_io_github_glandais_gpx.$_$.e;
136
- var GpxWaypoint = kotlin_io_github_glandais_gpx.$_$.n;
138
+ var Companion_getInstance_2 = kotlin_io_github_glandais_gpx.$_$.f;
139
+ var GpxWaypoint = kotlin_io_github_glandais_gpx.$_$.q;
140
+ var Companion_instance_0 = kotlin_io_github_glandais_gpx.$_$.j;
141
+ var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.e;
142
+ var ElevationProviderConfig = kotlin_io_github_glandais_elevation.$_$.d;
137
143
  var sorted = kotlin_kotlin.$_$.c4;
138
144
  var THROW_CCE = kotlin_kotlin.$_$.ca;
139
145
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
140
- var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.d;
141
146
  var initMetadataForLambda = kotlin_kotlin.$_$.z6;
142
147
  var constructCallableReference = kotlin_kotlin.$_$.k6;
143
148
  var setOf_0 = kotlin_kotlin.$_$.a4;
@@ -157,12 +162,13 @@
157
162
  initMetadataForClass(EnhanceOptions, 'EnhanceOptions', EnhanceOptions);
158
163
  initMetadataForCoroutine($enhanceCourseCOROUTINE$, CoroutineImpl);
159
164
  initMetadataForObject(Enhancer, 'Enhancer', VOID, VOID, VOID, [3]);
165
+ initMetadataForCompanion(Companion_3);
160
166
  initMetadataForClass(RoadCondition, 'RoadCondition', VOID, Enum);
161
167
  initMetadataForClass(Climb, 'Climb');
162
168
  initMetadataForClass(ClimbPart, 'ClimbPart');
163
- initMetadataForCompanion(Companion_3);
164
- initMetadataForClass(ClimbOptions, 'ClimbOptions', ClimbOptions);
165
169
  initMetadataForCompanion(Companion_4);
170
+ initMetadataForClass(ClimbOptions, 'ClimbOptions', ClimbOptions);
171
+ initMetadataForCompanion(Companion_5);
166
172
  initMetadataForClass(Profile, 'Profile');
167
173
  initMetadataForClass(Candidate, 'Candidate');
168
174
  initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
@@ -170,9 +176,9 @@
170
176
  initMetadataForObject(ClimbDetector, 'ClimbDetector');
171
177
  initMetadataForObject(AeroPowerProvider, 'AeroPowerProvider');
172
178
  initMetadataForObject(AeroProviderConstant, 'AeroProviderConstant');
173
- initMetadataForCompanion(Companion_5);
174
- initMetadataForClass(CyclistPowerProviderBase, 'CyclistPowerProviderBase');
175
179
  initMetadataForCompanion(Companion_6);
180
+ initMetadataForClass(CyclistPowerProviderBase, 'CyclistPowerProviderBase');
181
+ initMetadataForCompanion(Companion_7);
176
182
  initMetadataForClass(PowerModel, 'PowerModel', VOID, Enum);
177
183
  initMetadataForClass(CyclistPowerSpec, 'CyclistPowerSpec', CyclistPowerSpec);
178
184
  initMetadataForObject(GravPowerProvider, 'GravPowerProvider');
@@ -181,20 +187,20 @@
181
187
  initMetadataForObject(MuscularPowerProvider, 'MuscularPowerProvider');
182
188
  initMetadataForObject(PowerComputer, 'PowerComputer');
183
189
  initMetadataForClass(PowerProviderConstant, 'PowerProviderConstant', VOID, CyclistPowerProviderBase);
184
- initMetadataForCompanion(Companion_7);
185
- initMetadataForClass(PowerProviderCriticalPower, 'PowerProviderCriticalPower', VOID, CyclistPowerProviderBase);
186
190
  initMetadataForCompanion(Companion_8);
191
+ initMetadataForClass(PowerProviderCriticalPower, 'PowerProviderCriticalPower', VOID, CyclistPowerProviderBase);
192
+ initMetadataForCompanion(Companion_9);
187
193
  initMetadataForClass(PowerProviderDurability, 'PowerProviderDurability', VOID, CyclistPowerProviderBase);
188
194
  initMetadataForObject(PowerProviderFromData, 'PowerProviderFromData');
189
195
  initMetadataForClass(PowerProviderSlewLimited, 'PowerProviderSlewLimited');
190
- initMetadataForCompanion(Companion_9);
196
+ initMetadataForCompanion(Companion_10);
191
197
  initMetadataForClass(PowerProviderTerrainPacing, 'PowerProviderTerrainPacing');
192
198
  initMetadataForObject(RhoProviderDefault, 'RhoProviderDefault');
193
199
  initMetadataForObject(RhoProviderEstimate, 'RhoProviderEstimate');
194
200
  initMetadataForObject(RollingResistancePowerProvider, 'RollingResistancePowerProvider');
195
201
  initMetadataForObject(VirtualizeService, 'VirtualizeService');
196
202
  initMetadataForObject(WheelBearingsPowerProvider, 'WheelBearingsPowerProvider');
197
- initMetadataForCompanion(Companion_10);
203
+ initMetadataForCompanion(Companion_11);
198
204
  initMetadataForClass(Wind, 'Wind');
199
205
  initMetadataForObject(WindProviderNone, 'WindProviderNone');
200
206
  initMetadataForClass(WindProviderConstant, 'WindProviderConstant');
@@ -207,33 +213,33 @@
207
213
  initMetadataForClass(Fit, 'Fit');
208
214
  initMetadataForObject(CurvatureEstimator, 'CurvatureEstimator');
209
215
  initMetadataForObject(LocalFrame, 'LocalFrame');
210
- initMetadataForCompanion(Companion_11);
216
+ initMetadataForCompanion(Companion_12);
211
217
  initMetadataForClass(OffsetEnergy, 'OffsetEnergy');
212
218
  initMetadataForClass(QpResult, 'QpResult');
213
219
  initMetadataForObject(OffsetQp, 'OffsetQp');
214
- initMetadataForCompanion(Companion_12);
220
+ initMetadataForCompanion(Companion_13);
215
221
  initMetadataForClass(CurvatureOptions, 'CurvatureOptions', CurvatureOptions);
216
222
  initMetadataForObject(PathCurvature, 'PathCurvature');
217
223
  initMetadataForClass(PlanarFrame, 'PlanarFrame');
218
224
  initMetadataForClass(RacingLineReport, 'RacingLineReport');
219
225
  initMetadataForObject(RacingLine, 'RacingLine');
220
- initMetadataForCompanion(Companion_13);
226
+ initMetadataForCompanion(Companion_14);
221
227
  initMetadataForClass(CorridorMode, 'CorridorMode', VOID, Enum);
222
228
  initMetadataForClass(CornerKind, 'CornerKind', VOID, Enum);
223
- initMetadataForCompanion(Companion_14);
229
+ initMetadataForCompanion(Companion_15);
224
230
  initMetadataForClass(RacingLineOptions, 'RacingLineOptions', RacingLineOptions);
225
231
  initMetadataForLambda(enhance$slambda, CoroutineImpl, VOID, [1]);
226
232
  initMetadataForLambda(enhanceWithCourse$slambda, CoroutineImpl, VOID, [1]);
227
233
  //endregion
228
234
  function Companion() {
229
- Companion_instance_0 = this;
235
+ Companion_instance_1 = this;
230
236
  this.DEFAULT_1 = new Bike();
231
237
  }
232
- var Companion_instance_0;
238
+ var Companion_instance_1;
233
239
  function Companion_getInstance_3() {
234
- if (Companion_instance_0 == null)
240
+ if (Companion_instance_1 == null)
235
241
  new Companion();
236
- return Companion_instance_0;
242
+ return Companion_instance_1;
237
243
  }
238
244
  function Bike(crr, inertiaFront, inertiaRear, wheelRadiusM, efficiency, maxPedalingLeanAngleDeg) {
239
245
  Companion_getInstance_3();
@@ -331,14 +337,14 @@
331
337
  return true;
332
338
  };
333
339
  function Companion_0() {
334
- Companion_instance_1 = this;
340
+ Companion_instance_2 = this;
335
341
  this.DEFAULT_CYCLIST_POWER_PROVIDER_1 = new PowerProviderConstant(280.0);
336
342
  }
337
- var Companion_instance_1;
343
+ var Companion_instance_2;
338
344
  function Companion_getInstance_4() {
339
- if (Companion_instance_1 == null)
345
+ if (Companion_instance_2 == null)
340
346
  new Companion_0();
341
- return Companion_instance_1;
347
+ return Companion_instance_2;
342
348
  }
343
349
  function CoursePhysics(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
344
350
  Companion_getInstance_4();
@@ -401,14 +407,14 @@
401
407
  return true;
402
408
  };
403
409
  function Companion_1() {
404
- Companion_instance_2 = this;
410
+ Companion_instance_3 = this;
405
411
  this.DEFAULT_1 = new Cyclist();
406
412
  }
407
- var Companion_instance_2;
413
+ var Companion_instance_3;
408
414
  function Companion_getInstance_5() {
409
- if (Companion_instance_2 == null)
415
+ if (Companion_instance_3 == null)
410
416
  new Companion_1();
411
- return Companion_instance_2;
417
+ return Companion_instance_3;
412
418
  }
413
419
  function Cyclist(massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH) {
414
420
  Companion_getInstance_5();
@@ -436,6 +442,18 @@
436
442
  protoOf(Cyclist).get_maxSpeedMS_xz2r7y_k$ = function () {
437
443
  return this.maxSpeedKmH_1 / 3.6;
438
444
  };
445
+ protoOf(Cyclist).copy_q986iz_k$ = function (massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH) {
446
+ return new Cyclist(massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH);
447
+ };
448
+ protoOf(Cyclist).copy$default_8ozrtu_k$ = function (massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH, $super) {
449
+ massKg = massKg === VOID ? this.massKg_1 : massKg;
450
+ maxBrakeG = maxBrakeG === VOID ? this.maxBrakeG_1 : maxBrakeG;
451
+ cd = cd === VOID ? this.cd_1 : cd;
452
+ frontalAreaM2 = frontalAreaM2 === VOID ? this.frontalAreaM2__1 : frontalAreaM2;
453
+ maxLeanAngleDeg = maxLeanAngleDeg === VOID ? this.maxLeanAngleDeg_1 : maxLeanAngleDeg;
454
+ maxSpeedKmH = maxSpeedKmH === VOID ? this.maxSpeedKmH_1 : maxSpeedKmH;
455
+ return $super === VOID ? this.copy_q986iz_k$(massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH) : $super.copy_q986iz_k$.call(this, massKg, maxBrakeG, cd, frontalAreaM2, maxLeanAngleDeg, maxSpeedKmH);
456
+ };
439
457
  protoOf(Cyclist).toString = function () {
440
458
  return 'Cyclist(massKg=' + this.massKg_1 + ', maxBrakeG=' + this.maxBrakeG_1 + ', cd=' + this.cd_1 + ', frontalAreaM2=' + this.frontalAreaM2__1 + ', maxLeanAngleDeg=' + this.maxLeanAngleDeg_1 + ', maxSpeedKmH=' + this.maxSpeedKmH_1 + ')';
441
459
  };
@@ -497,6 +515,7 @@
497
515
  this.DEFAULT_DRAG_COEFFICIENT_1 = 0.7;
498
516
  this.DEFAULT_FRONTAL_AREA_M2__1 = 0.5;
499
517
  this.DEFAULT_AIR_DENSITY_1 = 1.225;
518
+ this.DEFAULT_ELEVATION_GAIN_PRESET_1 = ElevationGainPreset_DEM_getInstance();
500
519
  }
501
520
  var EngineConstants_instance;
502
521
  function EngineConstants_getInstance() {
@@ -575,16 +594,16 @@
575
594
  return true;
576
595
  };
577
596
  function Companion_2() {
578
- Companion_instance_3 = this;
597
+ Companion_instance_4 = this;
579
598
  this.DEFAULT_1 = new EnhanceOptions();
580
599
  }
581
- var Companion_instance_3;
600
+ var Companion_instance_4;
582
601
  function Companion_getInstance_6() {
583
- if (Companion_instance_3 == null)
602
+ if (Companion_instance_4 == null)
584
603
  new Companion_2();
585
- return Companion_instance_3;
604
+ return Companion_instance_4;
586
605
  }
587
- function EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine) {
606
+ function EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM) {
588
607
  Companion_getInstance_6();
589
608
  fixElevation = fixElevation === VOID ? true : fixElevation;
590
609
  computeMaxSpeeds = computeMaxSpeeds === VOID ? true : computeMaxSpeeds;
@@ -594,6 +613,8 @@
594
613
  wPrimeBalance = wPrimeBalance === VOID ? new WPrimeBalanceOptions() : wPrimeBalance;
595
614
  curvature = curvature === VOID ? new CurvatureOptions() : curvature;
596
615
  racingLine = racingLine === VOID ? new RacingLineOptions() : racingLine;
616
+ elevationGain = elevationGain === VOID ? new ElevationGainOptions(VOID, EngineConstants_getInstance().DEFAULT_ELEVATION_GAIN_PRESET_1) : elevationGain;
617
+ elevationSmoothWindowM = elevationSmoothWindowM === VOID ? 150.0 : elevationSmoothWindowM;
597
618
  this.fixElevation_1 = fixElevation;
598
619
  this.computeMaxSpeeds_1 = computeMaxSpeeds;
599
620
  this.virtualizeTrack_1 = virtualizeTrack;
@@ -602,11 +623,18 @@
602
623
  this.wPrimeBalance_1 = wPrimeBalance;
603
624
  this.curvature_1 = curvature;
604
625
  this.racingLine_1 = racingLine;
626
+ this.elevationGain_1 = elevationGain;
627
+ this.elevationSmoothWindowM_1 = elevationSmoothWindowM;
628
+ // Inline function 'kotlin.require' call
629
+ if (!(this.elevationSmoothWindowM_1 > 0.0 && isFinite(this.elevationSmoothWindowM_1))) {
630
+ var message = 'elevationSmoothWindowM must be finite and > 0, got ' + this.elevationSmoothWindowM_1;
631
+ throw IllegalArgumentException_init_$Create$(toString(message));
632
+ }
605
633
  }
606
- protoOf(EnhanceOptions).copy_i8t81g_k$ = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine) {
607
- return new EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine);
634
+ protoOf(EnhanceOptions).copy_la5bwq_k$ = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM) {
635
+ return new EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM);
608
636
  };
609
- protoOf(EnhanceOptions).copy$default_q3w1nk_k$ = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, $super) {
637
+ protoOf(EnhanceOptions).copy$default_31cnvc_k$ = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM, $super) {
610
638
  fixElevation = fixElevation === VOID ? this.fixElevation_1 : fixElevation;
611
639
  computeMaxSpeeds = computeMaxSpeeds === VOID ? this.computeMaxSpeeds_1 : computeMaxSpeeds;
612
640
  virtualizeTrack = virtualizeTrack === VOID ? this.virtualizeTrack_1 : virtualizeTrack;
@@ -615,10 +643,12 @@
615
643
  wPrimeBalance = wPrimeBalance === VOID ? this.wPrimeBalance_1 : wPrimeBalance;
616
644
  curvature = curvature === VOID ? this.curvature_1 : curvature;
617
645
  racingLine = racingLine === VOID ? this.racingLine_1 : racingLine;
618
- return $super === VOID ? this.copy_i8t81g_k$(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine) : $super.copy_i8t81g_k$.call(this, fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine);
646
+ elevationGain = elevationGain === VOID ? this.elevationGain_1 : elevationGain;
647
+ elevationSmoothWindowM = elevationSmoothWindowM === VOID ? this.elevationSmoothWindowM_1 : elevationSmoothWindowM;
648
+ return $super === VOID ? this.copy_la5bwq_k$(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM) : $super.copy_la5bwq_k$.call(this, fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, wPrimeBalance, curvature, racingLine, elevationGain, elevationSmoothWindowM);
619
649
  };
620
650
  protoOf(EnhanceOptions).toString = function () {
621
- return 'EnhanceOptions(fixElevation=' + this.fixElevation_1 + ', computeMaxSpeeds=' + this.computeMaxSpeeds_1 + ', virtualizeTrack=' + this.virtualizeTrack_1 + ', computeOnePointPerSecond=' + this.computeOnePointPerSecond_1 + ', simplifyPath=' + this.simplifyPath_1.toString() + ', wPrimeBalance=' + this.wPrimeBalance_1.toString() + ', curvature=' + this.curvature_1.toString() + ', racingLine=' + this.racingLine_1.toString() + ')';
651
+ return 'EnhanceOptions(fixElevation=' + this.fixElevation_1 + ', computeMaxSpeeds=' + this.computeMaxSpeeds_1 + ', virtualizeTrack=' + this.virtualizeTrack_1 + ', computeOnePointPerSecond=' + this.computeOnePointPerSecond_1 + ', simplifyPath=' + this.simplifyPath_1.toString() + ', wPrimeBalance=' + this.wPrimeBalance_1.toString() + ', curvature=' + this.curvature_1.toString() + ', racingLine=' + this.racingLine_1.toString() + ', elevationGain=' + this.elevationGain_1.toString() + ', elevationSmoothWindowM=' + this.elevationSmoothWindowM_1 + ')';
622
652
  };
623
653
  protoOf(EnhanceOptions).hashCode = function () {
624
654
  var result = getBooleanHashCode(this.fixElevation_1);
@@ -629,6 +659,8 @@
629
659
  result = imul(result, 31) + this.wPrimeBalance_1.hashCode() | 0;
630
660
  result = imul(result, 31) + this.curvature_1.hashCode() | 0;
631
661
  result = imul(result, 31) + this.racingLine_1.hashCode() | 0;
662
+ result = imul(result, 31) + this.elevationGain_1.hashCode() | 0;
663
+ result = imul(result, 31) + getNumberHashCode(this.elevationSmoothWindowM_1) | 0;
632
664
  return result;
633
665
  };
634
666
  protoOf(EnhanceOptions).equals = function (other) {
@@ -652,6 +684,10 @@
652
684
  return false;
653
685
  if (!this.racingLine_1.equals(other.racingLine_1))
654
686
  return false;
687
+ if (!this.elevationGain_1.equals(other.elevationGain_1))
688
+ return false;
689
+ if (!equals(this.elevationSmoothWindowM_1, other.elevationSmoothWindowM_1))
690
+ return false;
655
691
  return true;
656
692
  };
657
693
  function $enhanceCourseCOROUTINE$(_this__u8e3s4, course, options, elevationProvider, resultContinuation) {
@@ -694,7 +730,7 @@
694
730
  continue $sm;
695
731
  case 2:
696
732
  this.path0__1 = PointPerDistance_instance.compute_7vlifv_k$(this.path0__1, 1.0, 2.0);
697
- this.path0__1 = ElevationStep_instance.smoothElevation$default_3c035p_k$(this.path0__1);
733
+ this.path0__1 = ElevationStep_instance.smoothElevation_ahln31_k$(this.path0__1, this.options_1.elevationSmoothWindowM_1);
698
734
  var racingLineApplied = this.options_1.racingLine_1.enabled_1;
699
735
  if (racingLineApplied) {
700
736
  this.path0__1 = RacingLine_instance.compute_uyx32p_k$(this.path0__1, this.options_1.racingLine_1);
@@ -733,6 +769,10 @@
733
769
  this.path0__1 = PathSimplifier_instance.simplify_gxhj7b_k$(this.path0__1, tolerance, this.options_1.simplifyPath_1.zExaggeration_1);
734
770
  }
735
771
 
772
+ if (this.options_1.elevationGain_1.enabled_1) {
773
+ ElevationGain_instance.annotate_eeml8q_k$(this.path0__1, this.options_1.elevationGain_1);
774
+ }
775
+
736
776
  return this.path0__1;
737
777
  case 3:
738
778
  throw this.exception_1;
@@ -754,7 +794,7 @@
754
794
  return new CoursePhysics(new Course(path), RhoProviderEstimate_instance, AeroProviderConstant_instance, WindProviderNone_instance, new PowerProviderConstant(280.0));
755
795
  };
756
796
  protoOf(Enhancer).enhanceCourseDefault_jm937y_k$ = function (path, elevationProvider, options, $completion) {
757
- return this.enhanceCourse_mout3j_k$(this.getDefaultCourse_gqi1xw_k$(path), options.copy$default_q3w1nk_k$(options.fixElevation_1 && !(elevationProvider == null)), elevationProvider, $completion);
797
+ return this.enhanceCourse_mout3j_k$(this.getDefaultCourse_gqi1xw_k$(path), options.copy$default_31cnvc_k$(options.fixElevation_1 && !(elevationProvider == null)), elevationProvider, $completion);
758
798
  };
759
799
  protoOf(Enhancer).enhanceCourse_mout3j_k$ = function (course, options, elevationProvider, $completion) {
760
800
  var tmp = new $enhanceCourseCOROUTINE$(this, course, options, elevationProvider, $completion);
@@ -776,9 +816,55 @@
776
816
  var tmp$ret$0 = Math.tan(x);
777
817
  RoadCondition_DRY_instance = new RoadCondition('DRY', 0, tmp$ret$0, 0.4);
778
818
  RoadCondition_WET_instance = new RoadCondition('WET', 1, EngineConstants_getInstance().RIDER_GRIP_FRACTION_1 * 0.36, 0.634920634920635 * 0.36);
819
+ if (Companion_instance_5 == null) {
820
+ Companion_instance;
821
+ new Companion_3();
822
+ }
779
823
  }
780
824
  var RoadCondition_DRY_instance;
781
825
  var RoadCondition_WET_instance;
826
+ function Companion_3() {
827
+ Companion_instance_5 = this;
828
+ this.DEFAULT_1 = RoadCondition_DRY_getInstance();
829
+ }
830
+ protoOf(Companion_3).fromWire_2092k5_k$ = function (value) {
831
+ var tmp0 = get_entries_0();
832
+ var tmp$ret$0;
833
+ $l$block: {
834
+ // Inline function 'kotlin.collections.firstOrNull' call
835
+ var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
836
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
837
+ var element = _iterator__ex2g4s.next_20eer_k$();
838
+ var tmp = element.get_wireName_mo8n7d_k$();
839
+ // Inline function 'kotlin.text.lowercase' call
840
+ // Inline function 'kotlin.js.asDynamic' call
841
+ if (tmp === value.toLowerCase()) {
842
+ tmp$ret$0 = element;
843
+ break $l$block;
844
+ }
845
+ }
846
+ tmp$ret$0 = null;
847
+ }
848
+ return tmp$ret$0;
849
+ };
850
+ protoOf(Companion_3).get_wireNames_7fokbq_k$ = function () {
851
+ // Inline function 'kotlin.collections.map' call
852
+ var this_0 = get_entries_0();
853
+ // Inline function 'kotlin.collections.mapTo' call
854
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
855
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
856
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
857
+ var item = _iterator__ex2g4s.next_20eer_k$();
858
+ var tmp$ret$2 = item.get_wireName_mo8n7d_k$();
859
+ destination.add_utx5q5_k$(tmp$ret$2);
860
+ }
861
+ return destination;
862
+ };
863
+ var Companion_instance_5;
864
+ function Companion_getInstance_7() {
865
+ static_init();
866
+ return Companion_instance_5;
867
+ }
782
868
  function values() {
783
869
  static_init();
784
870
  return [RoadCondition_DRY_getInstance(), RoadCondition_WET_getInstance()];
@@ -800,6 +886,32 @@
800
886
  var x = this.mu_1;
801
887
  return Math.atan(x) * 180.0 / 3.141592653589793;
802
888
  };
889
+ protoOf(RoadCondition).get_wireName_mo8n7d_k$ = function () {
890
+ var tmp;
891
+ switch (this.ordinal_1) {
892
+ case 0:
893
+ tmp = 'dry';
894
+ break;
895
+ case 1:
896
+ tmp = 'wet';
897
+ break;
898
+ default:
899
+ noWhenBranchMatchedException();
900
+ break;
901
+ }
902
+ return tmp;
903
+ };
904
+ function applyTo(_this__u8e3s4, cyclist) {
905
+ var tmp;
906
+ if (_this__u8e3s4 == null) {
907
+ tmp = cyclist;
908
+ } else {
909
+ var tmp0_maxLeanAngleDeg = _this__u8e3s4.get_leanAngleDeg_9xbhfm_k$();
910
+ var tmp1_maxBrakeG = _this__u8e3s4.maxBrakeG_1;
911
+ tmp = cyclist.copy$default_8ozrtu_k$(VOID, tmp1_maxBrakeG, VOID, VOID, tmp0_maxLeanAngleDeg);
912
+ }
913
+ return tmp;
914
+ }
803
915
  function RoadCondition_DRY_getInstance() {
804
916
  static_init();
805
917
  return RoadCondition_DRY_instance;
@@ -832,7 +944,7 @@
832
944
  // Inline function 'kotlin.collections.filter' call
833
945
  var tmp0 = this.parts_1;
834
946
  // Inline function 'kotlin.collections.filterTo' call
835
- var destination = ArrayList_init_$Create$();
947
+ var destination = ArrayList_init_$Create$_0();
836
948
  var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
837
949
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
838
950
  var element = _iterator__ex2g4s.next_20eer_k$();
@@ -931,18 +1043,18 @@
931
1043
  return false;
932
1044
  return true;
933
1045
  };
934
- function Companion_3() {
935
- Companion_instance_4 = this;
1046
+ function Companion_4() {
1047
+ Companion_instance_6 = this;
936
1048
  this.DEFAULT_1 = new ClimbOptions();
937
1049
  }
938
- var Companion_instance_4;
939
- function Companion_getInstance_7() {
940
- if (Companion_instance_4 == null)
941
- new Companion_3();
942
- return Companion_instance_4;
1050
+ var Companion_instance_6;
1051
+ function Companion_getInstance_8() {
1052
+ if (Companion_instance_6 == null)
1053
+ new Companion_4();
1054
+ return Companion_instance_6;
943
1055
  }
944
1056
  function ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGradeRatio, booster, maxAnalysisPoints) {
945
- Companion_getInstance_7();
1057
+ Companion_getInstance_8();
946
1058
  minMinClimbElevationM = minMinClimbElevationM === VOID ? 10.0 : minMinClimbElevationM;
947
1059
  maxMinClimbElevationM = maxMinClimbElevationM === VOID ? 35.0 : maxMinClimbElevationM;
948
1060
  minClimbElevationRatio = minClimbElevationRatio === VOID ? 100.0 : minClimbElevationRatio;
@@ -997,9 +1109,9 @@
997
1109
  return false;
998
1110
  return true;
999
1111
  };
1000
- function Companion_4() {
1112
+ function Companion_5() {
1001
1113
  }
1002
- protoOf(Companion_4).of_tmvbpf_k$ = function (path, maxPoints) {
1114
+ protoOf(Companion_5).of_tmvbpf_k$ = function (path, maxPoints) {
1003
1115
  var tmp;
1004
1116
  if (path.size_1 <= maxPoints) {
1005
1117
  var tmp_0 = 0;
@@ -1013,7 +1125,7 @@
1013
1125
  tmp = tmp_2;
1014
1126
  } else {
1015
1127
  var stride = ((path.size_1 + maxPoints | 0) - 1 | 0) / maxPoints | 0;
1016
- var kept = ArrayList_init_$Create$_0(maxPoints + 1 | 0);
1128
+ var kept = ArrayList_init_$Create$(maxPoints + 1 | 0);
1017
1129
  var i = 0;
1018
1130
  while (i < path.size_1) {
1019
1131
  kept.add_utx5q5_k$(i);
@@ -1043,9 +1155,9 @@
1043
1155
  }
1044
1156
  return new Profile(tmp_6, tmp_10, indices);
1045
1157
  };
1046
- var Companion_instance_5;
1047
- function Companion_getInstance_8() {
1048
- return Companion_instance_5;
1158
+ var Companion_instance_7;
1159
+ function Companion_getInstance_9() {
1160
+ return Companion_instance_7;
1049
1161
  }
1050
1162
  function Profile(distance, elevation, sourceIndex) {
1051
1163
  this.distance_1 = distance;
@@ -1104,7 +1216,7 @@
1104
1216
  var tmp$ret$0 = sortedWith(candidates, tmp$ret$1);
1105
1217
  var remaining = toMutableList(tmp$ret$0);
1106
1218
  // Inline function 'kotlin.collections.mutableListOf' call
1107
- var kept = ArrayList_init_$Create$();
1219
+ var kept = ArrayList_init_$Create$_0();
1108
1220
  $l$loop: while (true) {
1109
1221
  // Inline function 'kotlin.collections.isNotEmpty' call
1110
1222
  if (!!remaining.isEmpty_y1axqb_k$()) {
@@ -1123,7 +1235,7 @@
1123
1235
  // Inline function 'kotlin.collections.map' call
1124
1236
  var this_0 = numberRangeToNumber(startIndex, endIndex);
1125
1237
  // Inline function 'kotlin.collections.mapTo' call
1126
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1238
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1127
1239
  var inductionVariable = this_0.first_1;
1128
1240
  var last = this_0.last_1;
1129
1241
  if (inductionVariable <= last)
@@ -1150,7 +1262,7 @@
1150
1262
  break $l$block;
1151
1263
  }
1152
1264
  // Inline function 'kotlin.collections.mutableListOf' call
1153
- var result = ArrayList_init_$Create$();
1265
+ var result = ArrayList_init_$Create$_0();
1154
1266
  var current = iterator.next_20eer_k$();
1155
1267
  while (iterator.hasNext_bitz1p_k$()) {
1156
1268
  var next = iterator.next_20eer_k$();
@@ -1298,11 +1410,11 @@
1298
1410
  // Inline function 'kotlin.comparisons.maxOf' call
1299
1411
  var b_0 = Math.min(tmp0_0, b);
1300
1412
  var minClimbElevation = Math.max(tmp0, b_0);
1301
- var profile = Companion_instance_5.of_tmvbpf_k$(path, options.maxAnalysisPoints_1);
1413
+ var profile = Companion_instance_7.of_tmvbpf_k$(path, options.maxAnalysisPoints_1);
1302
1414
  // Inline function 'kotlin.collections.mapNotNull' call
1303
1415
  var tmp0_1 = until(0, profile.get_size_woubt6_k$());
1304
1416
  // Inline function 'kotlin.collections.mapNotNullTo' call
1305
- var destination = ArrayList_init_$Create$();
1417
+ var destination = ArrayList_init_$Create$_0();
1306
1418
  // Inline function 'kotlin.collections.forEach' call
1307
1419
  var inductionVariable = tmp0_1.first_1;
1308
1420
  var last = tmp0_1.last_1;
@@ -1329,7 +1441,7 @@
1329
1441
  // Inline function 'kotlin.collections.map' call
1330
1442
  var this_1 = sortedWith(this_0, tmp$ret$10);
1331
1443
  // Inline function 'kotlin.collections.mapTo' call
1332
- var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
1444
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
1333
1445
  var _iterator__ex2g4s = this_1.iterator_jk1svi_k$();
1334
1446
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1335
1447
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -1339,7 +1451,7 @@
1339
1451
  return destination_0;
1340
1452
  };
1341
1453
  protoOf(ClimbDetector).detect$default_6ml3ny_k$ = function (path, options, $super) {
1342
- options = options === VOID ? Companion_getInstance_7().DEFAULT_1 : options;
1454
+ options = options === VOID ? Companion_getInstance_8().DEFAULT_1 : options;
1343
1455
  return $super === VOID ? this.detect_llooq2_k$(path, options) : $super.detect_llooq2_k$.call(this, path, options);
1344
1456
  };
1345
1457
  var ClimbDetector_instance;
@@ -1492,13 +1604,13 @@
1492
1604
  function AeroProviderConstant_getInstance() {
1493
1605
  return AeroProviderConstant_instance;
1494
1606
  }
1495
- function Companion_5() {
1607
+ function Companion_6() {
1496
1608
  this.TOLERANCE_1 = 0.05;
1497
1609
  this.MAX_MULTIPLIER_1 = 3.0;
1498
1610
  }
1499
- var Companion_instance_6;
1500
- function Companion_getInstance_9() {
1501
- return Companion_instance_6;
1611
+ var Companion_instance_8;
1612
+ function Companion_getInstance_10() {
1613
+ return Companion_instance_8;
1502
1614
  }
1503
1615
  function CyclistPowerProviderBase(useHarmonics, random) {
1504
1616
  random = random === VOID ? Default_getInstance() : random;
@@ -1508,7 +1620,7 @@
1508
1620
  if (this.useHarmonics_1) {
1509
1621
  // Inline function 'kotlin.collections.List' call
1510
1622
  // Inline function 'kotlin.collections.MutableList' call
1511
- var list = ArrayList_init_$Create$_0(20);
1623
+ var list = ArrayList_init_$Create$(20);
1512
1624
  // Inline function 'kotlin.repeat' call
1513
1625
  var inductionVariable = 0;
1514
1626
  if (inductionVariable < 20)
@@ -1554,22 +1666,22 @@
1554
1666
  PowerModel_DURABILITY_instance = new PowerModel('DURABILITY', 1, 'durability');
1555
1667
  PowerModel_CRITICAL_POWER_instance = new PowerModel('CRITICAL_POWER', 2, 'critical-power');
1556
1668
  PowerModel_FROM_DATA_instance = new PowerModel('FROM_DATA', 3, 'from_data');
1557
- if (Companion_instance_7 == null) {
1669
+ if (Companion_instance_9 == null) {
1558
1670
  Companion_instance;
1559
- new Companion_6();
1671
+ new Companion_7();
1560
1672
  }
1561
1673
  }
1562
1674
  var PowerModel_CONSTANT_instance;
1563
1675
  var PowerModel_DURABILITY_instance;
1564
1676
  var PowerModel_CRITICAL_POWER_instance;
1565
1677
  var PowerModel_FROM_DATA_instance;
1566
- function Companion_6() {
1678
+ function Companion_7() {
1567
1679
  }
1568
- protoOf(Companion_6).get_ids_18j3qp_k$ = function () {
1680
+ protoOf(Companion_7).get_ids_18j3qp_k$ = function () {
1569
1681
  // Inline function 'kotlin.collections.map' call
1570
1682
  var this_0 = get_entries_1();
1571
1683
  // Inline function 'kotlin.collections.mapTo' call
1572
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1684
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1573
1685
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
1574
1686
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1575
1687
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -1578,7 +1690,7 @@
1578
1690
  }
1579
1691
  return destination;
1580
1692
  };
1581
- protoOf(Companion_6).fromIdOrNull_83jhaj_k$ = function (id) {
1693
+ protoOf(Companion_7).fromIdOrNull_83jhaj_k$ = function (id) {
1582
1694
  var tmp0 = get_entries_1();
1583
1695
  var tmp$ret$0;
1584
1696
  $l$block: {
@@ -1595,9 +1707,9 @@
1595
1707
  }
1596
1708
  return tmp$ret$0;
1597
1709
  };
1598
- var Companion_instance_7;
1599
- function Companion_getInstance_10() {
1600
- return Companion_instance_7;
1710
+ var Companion_instance_9;
1711
+ function Companion_getInstance_11() {
1712
+ return Companion_instance_9;
1601
1713
  }
1602
1714
  function values_0() {
1603
1715
  static_init_0();
@@ -2016,12 +2128,12 @@
2016
2128
  protoOf(PowerProviderConstant).optimalPower_36kg19_k$ = function (course, path, pointIndex) {
2017
2129
  return this.power_1;
2018
2130
  };
2019
- function Companion_7() {
2131
+ function Companion_8() {
2020
2132
  this.DEFAULT_TAPER_START_FRACTION_1 = 0.5;
2021
2133
  }
2022
- var Companion_instance_8;
2023
- function Companion_getInstance_11() {
2024
- return Companion_instance_8;
2134
+ var Companion_instance_10;
2135
+ function Companion_getInstance_12() {
2136
+ return Companion_instance_10;
2025
2137
  }
2026
2138
  function PowerProviderCriticalPower(powerW, criticalPowerW, wPrimeJ, taperStartFraction, useHarmonics, random) {
2027
2139
  criticalPowerW = criticalPowerW === VOID ? 250.0 : criticalPowerW;
@@ -2099,13 +2211,13 @@
2099
2211
  this.lastPowerW_1 = 0.0;
2100
2212
  this.wPrimeBalanceJ_1 = this.wPrimeJ_1;
2101
2213
  };
2102
- function Companion_8() {
2214
+ function Companion_9() {
2103
2215
  this.DEFAULT_DECLINE_PER_KJ_PER_KG_1 = 0.006666666666666667;
2104
2216
  this.DEFAULT_MAX_DECLINE_1 = 0.2;
2105
2217
  }
2106
- var Companion_instance_9;
2107
- function Companion_getInstance_12() {
2108
- return Companion_instance_9;
2218
+ var Companion_instance_11;
2219
+ function Companion_getInstance_13() {
2220
+ return Companion_instance_11;
2109
2221
  }
2110
2222
  function PowerProviderDurability(powerW, criticalPowerW, declinePerKjPerKg, maxDecline, useHarmonics, random) {
2111
2223
  criticalPowerW = criticalPowerW === VOID ? 250.0 : criticalPowerW;
@@ -2238,7 +2350,7 @@
2238
2350
  this.lastElapsedS_1 = 0.0;
2239
2351
  this.lastPowerW_1 = 0.0;
2240
2352
  };
2241
- function Companion_9() {
2353
+ function Companion_10() {
2242
2354
  this.DEFAULT_GRADIENT_GAIN_1 = 3.0;
2243
2355
  this.DEFAULT_HEADWIND_GAIN_PER_MS_1 = 0.02;
2244
2356
  this.DEFAULT_MIN_MULTIPLIER_1 = 0.5;
@@ -2246,9 +2358,9 @@
2246
2358
  this.DEFAULT_RAMP_DISTANCE_M_1 = 300.0;
2247
2359
  this.DEFAULT_ENERGY_BUDGET_SECONDS_1 = 600.0;
2248
2360
  }
2249
- var Companion_instance_10;
2250
- function Companion_getInstance_13() {
2251
- return Companion_instance_10;
2361
+ var Companion_instance_12;
2362
+ function Companion_getInstance_14() {
2363
+ return Companion_instance_12;
2252
2364
  }
2253
2365
  function PowerProviderTerrainPacing(delegate, gradientGain, headwindGainPerMS, minMultiplier, maxMultiplier, rampDistanceM, energyBudgetSeconds) {
2254
2366
  gradientGain = gradientGain === VOID ? 3.0 : gradientGain;
@@ -2515,18 +2627,18 @@
2515
2627
  function WheelBearingsPowerProvider_getInstance() {
2516
2628
  return WheelBearingsPowerProvider_instance;
2517
2629
  }
2518
- function Companion_10() {
2519
- Companion_instance_11 = this;
2630
+ function Companion_11() {
2631
+ Companion_instance_13 = this;
2520
2632
  this.NONE_1 = new Wind(0.0, 0.0);
2521
2633
  }
2522
- var Companion_instance_11;
2523
- function Companion_getInstance_14() {
2524
- if (Companion_instance_11 == null)
2525
- new Companion_10();
2526
- return Companion_instance_11;
2634
+ var Companion_instance_13;
2635
+ function Companion_getInstance_15() {
2636
+ if (Companion_instance_13 == null)
2637
+ new Companion_11();
2638
+ return Companion_instance_13;
2527
2639
  }
2528
2640
  function Wind(speedMS, directionRad) {
2529
- Companion_getInstance_14();
2641
+ Companion_getInstance_15();
2530
2642
  this.speedMS_1 = speedMS;
2531
2643
  this.directionRad_1 = directionRad;
2532
2644
  }
@@ -2552,7 +2664,7 @@
2552
2664
  function WindProviderNone() {
2553
2665
  }
2554
2666
  protoOf(WindProviderNone).wind_umf2tf_k$ = function (course, path, pointIndex) {
2555
- return Companion_getInstance_14().NONE_1;
2667
+ return Companion_getInstance_15().NONE_1;
2556
2668
  };
2557
2669
  var WindProviderNone_instance;
2558
2670
  function WindProviderNone_getInstance() {
@@ -2806,7 +2918,7 @@
2806
2918
  var exit = 1.0 / options.cornerExitRadiusM_1;
2807
2919
  var kappa = frame.kappa_1;
2808
2920
  // Inline function 'kotlin.collections.mutableListOf' call
2809
- var raw = ArrayList_init_$Create$();
2921
+ var raw = ArrayList_init_$Create$_0();
2810
2922
  var start = -1;
2811
2923
  var sign = 0;
2812
2924
  var inductionVariable = 0;
@@ -2850,7 +2962,7 @@
2850
2962
  raw.add_utx5q5_k$(tmp$ret$3);
2851
2963
  }
2852
2964
  // Inline function 'kotlin.collections.mutableListOf' call
2853
- var merged = ArrayList_init_$Create$();
2965
+ var merged = ArrayList_init_$Create$_0();
2854
2966
  var _iterator__ex2g4s = raw.iterator_jk1svi_k$();
2855
2967
  $l$loop: while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
2856
2968
  var span = _iterator__ex2g4s.next_20eer_k$();
@@ -2882,7 +2994,7 @@
2882
2994
  var minTurn = options.minCornerTurnDeg_1 * 3.141592653589793 / 180.0;
2883
2995
  var hairpinTurn = options.hairpinTurnDeg_1 * 3.141592653589793 / 180.0;
2884
2996
  // Inline function 'kotlin.collections.mutableListOf' call
2885
- var out = ArrayList_init_$Create$();
2997
+ var out = ArrayList_init_$Create$_0();
2886
2998
  var _iterator__ex2g4s_0 = merged.iterator_jk1svi_k$();
2887
2999
  $l$loop_2: while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
2888
3000
  var span_0 = _iterator__ex2g4s_0.next_20eer_k$();
@@ -2982,7 +3094,7 @@
2982
3094
  var tmp;
2983
3095
  if (value == null) {
2984
3096
  // Inline function 'kotlin.collections.mutableListOf' call
2985
- var answer = ArrayList_init_$Create$();
3097
+ var answer = ArrayList_init_$Create$_0();
2986
3098
  buckets.put_4fpzoq_k$(key, answer);
2987
3099
  tmp = answer;
2988
3100
  } else {
@@ -3535,9 +3647,9 @@
3535
3647
  function LocalFrame_getInstance() {
3536
3648
  return LocalFrame_instance;
3537
3649
  }
3538
- function Companion_11() {
3650
+ function Companion_12() {
3539
3651
  }
3540
- protoOf(Companion_11).assemble_miimn7_k$ = function (frame, center, rho, steeringLengthM, centeringLengthM) {
3652
+ protoOf(Companion_12).assemble_miimn7_k$ = function (frame, center, rho, steeringLengthM, centeringLengthM) {
3541
3653
  var n = frame.get_size_woubt6_k$();
3542
3654
  var h0 = new Float64Array(n);
3543
3655
  var h1 = new Float64Array(n);
@@ -3607,9 +3719,9 @@
3607
3719
  while (inductionVariable < n);
3608
3720
  return new OffsetEnergy(h0, h1, h2, linear, constant);
3609
3721
  };
3610
- var Companion_instance_12;
3611
- function Companion_getInstance_15() {
3612
- return Companion_instance_12;
3722
+ var Companion_instance_14;
3723
+ function Companion_getInstance_16() {
3724
+ return Companion_instance_14;
3613
3725
  }
3614
3726
  function OffsetEnergy(h0, h1, h2, linear, constant) {
3615
3727
  this.h0__1 = h0;
@@ -3865,18 +3977,18 @@
3865
3977
  function OffsetQp_getInstance() {
3866
3978
  return OffsetQp_instance;
3867
3979
  }
3868
- function Companion_12() {
3869
- Companion_instance_13 = this;
3980
+ function Companion_13() {
3981
+ Companion_instance_15 = this;
3870
3982
  this.DEFAULT_1 = new CurvatureOptions();
3871
3983
  }
3872
- var Companion_instance_13;
3873
- function Companion_getInstance_16() {
3874
- if (Companion_instance_13 == null)
3875
- new Companion_12();
3876
- return Companion_instance_13;
3984
+ var Companion_instance_15;
3985
+ function Companion_getInstance_17() {
3986
+ if (Companion_instance_15 == null)
3987
+ new Companion_13();
3988
+ return Companion_instance_15;
3877
3989
  }
3878
3990
  function CurvatureOptions(enabled, geometrySmoothWindowM, curvatureWindowsM, headingNoiseRad, curvatureSmoothWindowM) {
3879
- Companion_getInstance_16();
3991
+ Companion_getInstance_17();
3880
3992
  enabled = enabled === VOID ? true : enabled;
3881
3993
  geometrySmoothWindowM = geometrySmoothWindowM === VOID ? 3.0 : geometrySmoothWindowM;
3882
3994
  curvatureWindowsM = curvatureWindowsM === VOID ? listOf_0([3.0, 6.0, 12.0, 25.0]) : curvatureWindowsM;
@@ -4124,7 +4236,7 @@
4124
4236
  tmp_3 = tmp_3 + 1 | 0;
4125
4237
  }
4126
4238
  var rho = tmp_5;
4127
- var energy = Companion_instance_12.assemble_miimn7_k$(frame, center, rho, options.steeringLengthM_1, options.centeringLengthM_1);
4239
+ var energy = Companion_instance_14.assemble_miimn7_k$(frame, center, rho, options.steeringLengthM_1, options.centeringLengthM_1);
4128
4240
  var seed = center;
4129
4241
  var solved = OffsetQp_instance.solve_j37bz7_k$(energy, bounds.lo_1, bounds.hi_1, seed, options.maxNewtonIterations_1, options.gradientTolerance_1, options.boundEpsilonM_1);
4130
4242
  var trajectoryCurvature = measureOffsetCurvature($this, frame, solved.offset_1, options);
@@ -4243,17 +4355,17 @@
4243
4355
  CorridorMode_LANE_instance = new CorridorMode('LANE', 0);
4244
4356
  CorridorMode_LANE_LEFT_instance = new CorridorMode('LANE_LEFT', 1);
4245
4357
  CorridorMode_FULL_ROAD_instance = new CorridorMode('FULL_ROAD', 2);
4246
- if (Companion_instance_14 == null) {
4358
+ if (Companion_instance_16 == null) {
4247
4359
  Companion_instance;
4248
- new Companion_13();
4360
+ new Companion_14();
4249
4361
  }
4250
4362
  }
4251
4363
  var CorridorMode_LANE_instance;
4252
4364
  var CorridorMode_LANE_LEFT_instance;
4253
4365
  var CorridorMode_FULL_ROAD_instance;
4254
- function Companion_13() {
4366
+ function Companion_14() {
4255
4367
  }
4256
- protoOf(Companion_13).byId_8gmd94_k$ = function (name) {
4368
+ protoOf(Companion_14).byId_8gmd94_k$ = function (name) {
4257
4369
  var tmp0 = get_entries_2();
4258
4370
  var tmp$ret$0;
4259
4371
  $l$block: {
@@ -4278,9 +4390,9 @@
4278
4390
  }
4279
4391
  return tmp;
4280
4392
  };
4281
- var Companion_instance_14;
4282
- function Companion_getInstance_17() {
4283
- return Companion_instance_14;
4393
+ var Companion_instance_16;
4394
+ function Companion_getInstance_18() {
4395
+ return Companion_instance_16;
4284
4396
  }
4285
4397
  function values_1() {
4286
4398
  static_init_1();
@@ -4329,18 +4441,18 @@
4329
4441
  function CornerKind(name, ordinal) {
4330
4442
  Enum.call(this, name, ordinal);
4331
4443
  }
4332
- function Companion_14() {
4333
- Companion_instance_15 = this;
4444
+ function Companion_15() {
4445
+ Companion_instance_17 = this;
4334
4446
  this.DEFAULT_1 = new RacingLineOptions();
4335
4447
  }
4336
- var Companion_instance_15;
4337
- function Companion_getInstance_18() {
4338
- if (Companion_instance_15 == null)
4339
- new Companion_14();
4340
- return Companion_instance_15;
4448
+ var Companion_instance_17;
4449
+ function Companion_getInstance_19() {
4450
+ if (Companion_instance_17 == null)
4451
+ new Companion_15();
4452
+ return Companion_instance_17;
4341
4453
  }
4342
4454
  function RacingLineOptions(enabled, defaultRoadWidthM, edgeMarginM, corridor, cornerEnterRadiusM, cornerExitRadiusM, minCornerLengthM, minCornerTurnDeg, hairpinTurnDeg, gentleRadiusM, regularityFactor, selfProximityGapM, straightRunM, straightRadiusM, widthSmoothWindowM, objectiveRadiusM, steeringLengthM, centeringLengthM, maxNewtonIterations, gradientTolerance, boundEpsilonM, curvature, simplifyToleranceCapM) {
4343
- Companion_getInstance_18();
4455
+ Companion_getInstance_19();
4344
4456
  enabled = enabled === VOID ? false : enabled;
4345
4457
  defaultRoadWidthM = defaultRoadWidthM === VOID ? 6.0 : defaultRoadWidthM;
4346
4458
  edgeMarginM = edgeMarginM === VOID ? 0.5 : edgeMarginM;
@@ -4362,7 +4474,7 @@
4362
4474
  maxNewtonIterations = maxNewtonIterations === VOID ? 200 : maxNewtonIterations;
4363
4475
  gradientTolerance = gradientTolerance === VOID ? 1.0E-8 : gradientTolerance;
4364
4476
  boundEpsilonM = boundEpsilonM === VOID ? 1.0E-6 : boundEpsilonM;
4365
- curvature = curvature === VOID ? Companion_getInstance_16().DEFAULT_1 : curvature;
4477
+ curvature = curvature === VOID ? Companion_getInstance_17().DEFAULT_1 : curvature;
4366
4478
  simplifyToleranceCapM = simplifyToleranceCapM === VOID ? 2.0 : simplifyToleranceCapM;
4367
4479
  this.enabled_1 = enabled;
4368
4480
  this.defaultRoadWidthM_1 = defaultRoadWidthM;
@@ -4559,6 +4671,11 @@
4559
4671
  static_init_2();
4560
4672
  return CornerKind_HAIRPIN_instance;
4561
4673
  }
4674
+ function get_WAYPOINT_KEYS() {
4675
+ _init_properties_EngineJsApi_kt__9bputf();
4676
+ return WAYPOINT_KEYS;
4677
+ }
4678
+ var WAYPOINT_KEYS;
4562
4679
  function get_POWER_PROVIDER_KEYS() {
4563
4680
  _init_properties_EngineJsApi_kt__9bputf();
4564
4681
  return POWER_PROVIDER_KEYS;
@@ -4589,7 +4706,7 @@
4589
4706
  // Inline function 'kotlin.collections.map' call
4590
4707
  var this_0 = GpxParser_instance.parse$default_ez0f31_k$(xml).waypoints_1;
4591
4708
  // Inline function 'kotlin.collections.mapTo' call
4592
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
4709
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
4593
4710
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
4594
4711
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
4595
4712
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -4627,7 +4744,7 @@
4627
4744
  var this_0 = tracksAsPaths(GpxParser_instance.parse$default_ez0f31_k$(xml), setOf(GpxPathKind_ROUTE_getInstance()));
4628
4745
  return copyToArray(this_0);
4629
4746
  }
4630
- function writeGpxTracks(paths, waypoints, writeExtensions, powerSource) {
4747
+ function writeGpxTracks(paths, waypoints, writeExtensions, powerSource, trackNames, startTimeEpochMs) {
4631
4748
  var tmp;
4632
4749
  if (waypoints === VOID) {
4633
4750
  // Inline function 'kotlin.emptyArray' call
@@ -4638,12 +4755,15 @@
4638
4755
  waypoints = tmp;
4639
4756
  writeExtensions = writeExtensions === VOID ? true : writeExtensions;
4640
4757
  powerSource = powerSource === VOID ? null : powerSource;
4758
+ trackNames = trackNames === VOID ? null : trackNames;
4759
+ startTimeEpochMs = startTimeEpochMs === VOID ? null : startTimeEpochMs;
4641
4760
  _init_properties_EngineJsApi_kt__9bputf();
4642
4761
  var tmp_0 = GpxWriter_instance;
4643
4762
  var tmp_1 = toList(paths);
4763
+ var tmp_2 = trackNames == null ? null : toList(trackNames);
4644
4764
  // Inline function 'kotlin.collections.map' call
4645
4765
  // Inline function 'kotlin.collections.mapTo' call
4646
- var destination = ArrayList_init_$Create$_0(waypoints.length);
4766
+ var destination = ArrayList_init_$Create$(waypoints.length);
4647
4767
  var inductionVariable = 0;
4648
4768
  var last = waypoints.length;
4649
4769
  while (inductionVariable < last) {
@@ -4652,7 +4772,15 @@
4652
4772
  var tmp$ret$3 = toGpxWaypoint(item);
4653
4773
  destination.add_utx5q5_k$(tmp$ret$3);
4654
4774
  }
4655
- return tmp_0.write_7y52k2_k$(pathsToGpxDocument(tmp_1, VOID, VOID, destination, VOID, VOID, toGpxPowerSource(powerSource)), writeExtensions);
4775
+ var tmp_3 = destination;
4776
+ var tmp_4;
4777
+ if (startTimeEpochMs == null) {
4778
+ tmp_4 = null;
4779
+ } else {
4780
+ // Inline function 'kotlin.let' call
4781
+ tmp_4 = Companion_getInstance().fromEpochMilliseconds_uaz65_k$(numberToLong(startTimeEpochMs));
4782
+ }
4783
+ return tmp_0.write_7y52k2_k$(pathsToGpxDocument(tmp_1, VOID, tmp_2, tmp_3, VOID, tmp_4, toGpxPowerSource(powerSource)), writeExtensions);
4656
4784
  }
4657
4785
  function pathSize(path) {
4658
4786
  _init_properties_EngineJsApi_kt__9bputf();
@@ -4674,6 +4802,22 @@
4674
4802
  _init_properties_EngineJsApi_kt__9bputf();
4675
4803
  return path.elevationLoss_1;
4676
4804
  }
4805
+ function pathElevationGainFiltered(path) {
4806
+ _init_properties_EngineJsApi_kt__9bputf();
4807
+ return path.elevationGainFiltered_1;
4808
+ }
4809
+ function pathElevationLossFiltered(path) {
4810
+ _init_properties_EngineJsApi_kt__9bputf();
4811
+ return path.elevationLossFiltered_1;
4812
+ }
4813
+ function pathReportedElevationGain(path) {
4814
+ _init_properties_EngineJsApi_kt__9bputf();
4815
+ return path.get_reportedElevationGain_hffpog_k$();
4816
+ }
4817
+ function pathReportedElevationLoss(path) {
4818
+ _init_properties_EngineJsApi_kt__9bputf();
4819
+ return path.get_reportedElevationLoss_hfc84c_k$();
4820
+ }
4677
4821
  function pointAt(path, i) {
4678
4822
  _init_properties_EngineJsApi_kt__9bputf();
4679
4823
  return pointObj(path.latitudeDeg_i25sm6_k$(i), path.longitudeDeg_ikk1un_k$(i), path.elevation_iziwkb_k$(i), path.time_ryc845_k$(i), path.speed_npav2n_k$(i), path.pComputedPower_g6dnn4_k$(i), path.distance_5s4s77_k$(i), path.grade_c4yjz5_k$(i));
@@ -4723,7 +4867,7 @@
4723
4867
  // Inline function 'kotlin.collections.map' call
4724
4868
  var this_0 = get_entries();
4725
4869
  // Inline function 'kotlin.collections.mapTo' call
4726
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
4870
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
4727
4871
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
4728
4872
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
4729
4873
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -4749,22 +4893,45 @@
4749
4893
  _init_properties_EngineJsApi_kt__9bputf();
4750
4894
  return path.longitudeDeg_ikk1un_k$(i);
4751
4895
  }
4752
- function pathToCsv(path, separator, unitsInHeader) {
4896
+ function pathToCsv(path, separator, unitsInHeader, decimals, lineSeparator) {
4897
+ decimals = decimals === VOID ? null : decimals;
4898
+ lineSeparator = lineSeparator === VOID ? null : lineSeparator;
4753
4899
  _init_properties_EngineJsApi_kt__9bputf();
4900
+ var defaults = new CsvOptions();
4754
4901
  var tmp = CsvWriter_instance;
4755
4902
  var tmp0_elvis_lhs = firstOrNull(separator);
4756
4903
  var tmp_0;
4757
4904
  var tmp_1 = tmp0_elvis_lhs;
4758
4905
  if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
4759
- tmp_0 = _Char___init__impl__6a9atx(44);
4906
+ tmp_0 = defaults.separator_1;
4760
4907
  } else {
4761
4908
  tmp_0 = tmp0_elvis_lhs;
4762
4909
  }
4763
- return tmp.write_p5vnh4_k$(path, new CsvOptions(VOID, tmp_0, unitsInHeader));
4910
+ var tmp_2 = tmp_0;
4911
+ var tmp_3;
4912
+ if (lineSeparator == null) {
4913
+ tmp_3 = null;
4914
+ } else {
4915
+ // Inline function 'kotlin.text.ifEmpty' call
4916
+ var tmp_4;
4917
+ // Inline function 'kotlin.text.isEmpty' call
4918
+ if (charSequenceLength(lineSeparator) === 0) {
4919
+ tmp_4 = null;
4920
+ } else {
4921
+ tmp_4 = lineSeparator;
4922
+ }
4923
+ tmp_3 = tmp_4;
4924
+ }
4925
+ var tmp2_elvis_lhs = tmp_3;
4926
+ return tmp.write_p5vnh4_k$(path, new CsvOptions(VOID, tmp_2, unitsInHeader, decimals, tmp2_elvis_lhs == null ? defaults.lineSeparator_1 : tmp2_elvis_lhs));
4764
4927
  }
4765
- function pathToJson(path, pretty) {
4928
+ function pathToJson(path, pretty, decimals, includeMeta) {
4929
+ decimals = decimals === VOID ? null : decimals;
4930
+ includeMeta = includeMeta === VOID ? null : includeMeta;
4766
4931
  _init_properties_EngineJsApi_kt__9bputf();
4767
- return JsonWriter_instance.write_lwqeog_k$(path, new JsonOptions(VOID, pretty));
4932
+ var defaults = new JsonOptions();
4933
+ var tmp = JsonWriter_instance;
4934
+ return tmp.write_lwqeog_k$(path, new JsonOptions(VOID, pretty, decimals, includeMeta == null ? defaults.includeMeta_1 : includeMeta));
4768
4935
  }
4769
4936
  function pathToFit(path, name, startTimeEpochMs) {
4770
4937
  _init_properties_EngineJsApi_kt__9bputf();
@@ -4794,7 +4961,7 @@
4794
4961
  // Inline function 'kotlin.collections.map' call
4795
4962
  var this_0 = ClimbDetector_instance.detect$default_6ml3ny_k$(path);
4796
4963
  // Inline function 'kotlin.collections.mapTo' call
4797
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
4964
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
4798
4965
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
4799
4966
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
4800
4967
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -4804,12 +4971,14 @@
4804
4971
  // Inline function 'kotlin.collections.toTypedArray' call
4805
4972
  return copyToArray(destination);
4806
4973
  }
4807
- function detectClimbsWithOptions(path, minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster) {
4974
+ function detectClimbsWithOptions(path, minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster, maxAnalysisPoints) {
4975
+ maxAnalysisPoints = maxAnalysisPoints === VOID ? null : maxAnalysisPoints;
4808
4976
  _init_properties_EngineJsApi_kt__9bputf();
4977
+ var tmp = ClimbDetector_instance;
4809
4978
  // Inline function 'kotlin.collections.map' call
4810
- var this_0 = ClimbDetector_instance.detect_llooq2_k$(path, new ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster));
4979
+ var this_0 = tmp.detect_llooq2_k$(path, new ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster, maxAnalysisPoints == null ? (new ClimbOptions()).maxAnalysisPoints_1 : maxAnalysisPoints));
4811
4980
  // Inline function 'kotlin.collections.mapTo' call
4812
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
4981
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
4813
4982
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
4814
4983
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
4815
4984
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -4836,7 +5005,7 @@
4836
5005
  // Inline function 'kotlin.collections.map' call
4837
5006
  var this_0 = report.corners_1;
4838
5007
  // Inline function 'kotlin.collections.mapTo' call
4839
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
5008
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
4840
5009
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
4841
5010
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
4842
5011
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -4903,6 +5072,7 @@
4903
5072
  }
4904
5073
  function toGpxWaypoint(_this__u8e3s4) {
4905
5074
  _init_properties_EngineJsApi_kt__9bputf();
5075
+ requireOnlyKeys(_this__u8e3s4, 'WaypointDto', get_WAYPOINT_KEYS());
4906
5076
  var tmp = _this__u8e3s4.latitudeDeg;
4907
5077
  var tmp_0 = _this__u8e3s4.longitudeDeg;
4908
5078
  var tmp_1 = _this__u8e3s4.elevationM;
@@ -4915,45 +5085,82 @@
4915
5085
  }
4916
5086
  function toEnhanceOptions(_this__u8e3s4) {
4917
5087
  _init_properties_EngineJsApi_kt__9bputf();
5088
+ var d = defaultJsOptions();
4918
5089
  if (_this__u8e3s4 == null)
4919
- return defaultJsOptions();
5090
+ return d;
4920
5091
  requireOnlyKeys(_this__u8e3s4, 'EnhanceOptionsDto', get_ENHANCE_OPTIONS_KEYS());
4921
5092
  var tmp0_elvis_lhs = _this__u8e3s4.fixElevation;
4922
- var tmp = tmp0_elvis_lhs == null ? false : tmp0_elvis_lhs;
5093
+ var tmp = tmp0_elvis_lhs == null ? d.fixElevation_1 : tmp0_elvis_lhs;
4923
5094
  var tmp1_elvis_lhs = _this__u8e3s4.computeMaxSpeeds;
4924
- var tmp_0 = tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
5095
+ var tmp_0 = tmp1_elvis_lhs == null ? d.computeMaxSpeeds_1 : tmp1_elvis_lhs;
4925
5096
  var tmp2_elvis_lhs = _this__u8e3s4.virtualizeTrack;
4926
- var tmp_1 = tmp2_elvis_lhs == null ? true : tmp2_elvis_lhs;
5097
+ var tmp_1 = tmp2_elvis_lhs == null ? d.virtualizeTrack_1 : tmp2_elvis_lhs;
4927
5098
  var tmp3_elvis_lhs = _this__u8e3s4.computeOnePointPerSecond;
4928
- var tmp_2 = tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs;
5099
+ var tmp_2 = tmp3_elvis_lhs == null ? d.computeOnePointPerSecond_1 : tmp3_elvis_lhs;
4929
5100
  var tmp4_elvis_lhs = _this__u8e3s4.simplifyEnabled;
4930
- var tmp_3 = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
5101
+ var tmp_3 = tmp4_elvis_lhs == null ? d.simplifyPath_1.enabled_1 : tmp4_elvis_lhs;
4931
5102
  var tmp5_elvis_lhs = _this__u8e3s4.simplifyToleranceM;
4932
- var tmp_4 = tmp5_elvis_lhs == null ? 10.0 : tmp5_elvis_lhs;
5103
+ var tmp_4 = tmp5_elvis_lhs == null ? d.simplifyPath_1.toleranceM_1 : tmp5_elvis_lhs;
4933
5104
  var tmp6_elvis_lhs = _this__u8e3s4.simplifyZExaggeration;
4934
- var tmp_5 = new SimplifyPathOptions(tmp_3, tmp_4, tmp6_elvis_lhs == null ? 3.0 : tmp6_elvis_lhs);
5105
+ var tmp_5 = new SimplifyPathOptions(tmp_3, tmp_4, tmp6_elvis_lhs == null ? d.simplifyPath_1.zExaggeration_1 : tmp6_elvis_lhs);
4935
5106
  var tmp7_elvis_lhs = _this__u8e3s4.wPrimeBalanceEnabled;
4936
- var tmp_6 = tmp7_elvis_lhs == null ? (new WPrimeBalanceOptions()).enabled_1 : tmp7_elvis_lhs;
5107
+ var tmp_6 = tmp7_elvis_lhs == null ? d.wPrimeBalance_1.enabled_1 : tmp7_elvis_lhs;
4937
5108
  var tmp8_elvis_lhs = _this__u8e3s4.wPrimeBalanceCriticalPower;
4938
- var tmp_7 = tmp8_elvis_lhs == null ? 250.0 : tmp8_elvis_lhs;
5109
+ var tmp_7 = tmp8_elvis_lhs == null ? d.wPrimeBalance_1.criticalPowerW_1 : tmp8_elvis_lhs;
4939
5110
  var tmp9_elvis_lhs = _this__u8e3s4.wPrimeBalanceWPrime;
4940
- var tmp_8 = new WPrimeBalanceOptions(tmp_6, tmp_7, tmp9_elvis_lhs == null ? 20000.0 : tmp9_elvis_lhs);
5111
+ var tmp_8 = new WPrimeBalanceOptions(tmp_6, tmp_7, tmp9_elvis_lhs == null ? d.wPrimeBalance_1.wPrimeJ_1 : tmp9_elvis_lhs);
4941
5112
  var tmp10_elvis_lhs = _this__u8e3s4.curvatureEnabled;
4942
- var tmp_9 = new CurvatureOptions(tmp10_elvis_lhs == null ? true : tmp10_elvis_lhs);
5113
+ var tmp_9 = new CurvatureOptions(tmp10_elvis_lhs == null ? d.curvature_1.enabled_1 : tmp10_elvis_lhs);
4943
5114
  var tmp11_elvis_lhs = _this__u8e3s4.racingLineEnabled;
4944
- var tmp13_enabled = tmp11_elvis_lhs == null ? false : tmp11_elvis_lhs;
5115
+ var tmp13_enabled = tmp11_elvis_lhs == null ? d.racingLine_1.enabled_1 : tmp11_elvis_lhs;
4945
5116
  var tmp14_corridor = parseCorridor(_this__u8e3s4.racingLineCorridor);
4946
5117
  var tmp12_elvis_lhs = _this__u8e3s4.racingLineRoadWidthM;
4947
- var tmp15_defaultRoadWidthM = tmp12_elvis_lhs == null ? Companion_getInstance_18().DEFAULT_1.defaultRoadWidthM_1 : tmp12_elvis_lhs;
4948
- return new EnhanceOptions(tmp, tmp_0, tmp_1, tmp_2, tmp_5, tmp_8, tmp_9, new RacingLineOptions(tmp13_enabled, tmp15_defaultRoadWidthM, VOID, tmp14_corridor));
5118
+ var tmp15_defaultRoadWidthM = tmp12_elvis_lhs == null ? d.racingLine_1.defaultRoadWidthM_1 : tmp12_elvis_lhs;
5119
+ var tmp_10 = new RacingLineOptions(tmp13_enabled, tmp15_defaultRoadWidthM, VOID, tmp14_corridor);
5120
+ // Inline function 'kotlin.run' call
5121
+ var tmp0_safe_receiver = _this__u8e3s4.elevationGainPreset;
5122
+ var tmp_11;
5123
+ if (tmp0_safe_receiver == null) {
5124
+ tmp_11 = null;
5125
+ } else {
5126
+ // Inline function 'kotlin.let' call
5127
+ tmp_11 = Companion_instance_0.byId_8gmd94_k$(tmp0_safe_receiver);
5128
+ }
5129
+ var named = tmp_11;
5130
+ var tmp1_elvis_lhs_0 = _this__u8e3s4.elevationGainEnabled;
5131
+ var tmp_12 = tmp1_elvis_lhs_0 == null ? d.elevationGain_1.enabled_1 : tmp1_elvis_lhs_0;
5132
+ var tmp_13 = named == null ? d.elevationGain_1.preset_1 : named;
5133
+ var tmp3_elvis_lhs_0 = _this__u8e3s4.elevationGainThresholdM;
5134
+ var tmp_14;
5135
+ if (tmp3_elvis_lhs_0 == null) {
5136
+ tmp_14 = named == null ? null : named.thresholdM_1;
5137
+ } else {
5138
+ tmp_14 = tmp3_elvis_lhs_0;
5139
+ }
5140
+ var tmp5_elvis_lhs_0 = tmp_14;
5141
+ var tmp_15 = new ElevationGainOptions(tmp_12, tmp_13, tmp5_elvis_lhs_0 == null ? d.elevationGain_1.thresholdM_1 : tmp5_elvis_lhs_0);
5142
+ var tmp16_elvis_lhs = _this__u8e3s4.elevationSmoothWindowM;
5143
+ return new EnhanceOptions(tmp, tmp_0, tmp_1, tmp_2, tmp_5, tmp_8, tmp_9, tmp_10, tmp_15, tmp16_elvis_lhs == null ? d.elevationSmoothWindowM_1 : tmp16_elvis_lhs);
5144
+ }
5145
+ function elevationProviderFor(options) {
5146
+ _init_properties_EngineJsApi_kt__9bputf();
5147
+ var tmp1_elvis_lhs = options == null ? null : options.demZoom;
5148
+ var tmp;
5149
+ if (tmp1_elvis_lhs == null) {
5150
+ return new ElevationProvider();
5151
+ } else {
5152
+ tmp = tmp1_elvis_lhs;
5153
+ }
5154
+ var zoom = tmp;
5155
+ return new ElevationProvider(new ElevationProviderConfig(zoom));
4949
5156
  }
4950
5157
  function parseCorridor(name) {
4951
5158
  _init_properties_EngineJsApi_kt__9bputf();
4952
- return name == null ? Companion_getInstance_18().DEFAULT_1.corridor_1 : Companion_instance_14.byId_8gmd94_k$(name);
5159
+ return name == null ? Companion_getInstance_19().DEFAULT_1.corridor_1 : Companion_instance_16.byId_8gmd94_k$(name);
4953
5160
  }
4954
5161
  function defaultJsOptions() {
4955
5162
  _init_properties_EngineJsApi_kt__9bputf();
4956
- return new EnhanceOptions(false, true, true, false, new SimplifyPathOptions(false), VOID, new CurvatureOptions(true), new RacingLineOptions(false));
5163
+ return new EnhanceOptions(false, true, true, false, new SimplifyPathOptions(false), VOID, new CurvatureOptions(), new RacingLineOptions());
4957
5164
  }
4958
5165
  function toCyclist(_this__u8e3s4) {
4959
5166
  _init_properties_EngineJsApi_kt__9bputf();
@@ -4961,49 +5168,15 @@
4961
5168
  return new Cyclist();
4962
5169
  requireOnlyKeys(_this__u8e3s4, 'CyclistDto', get_CYCLIST_KEYS());
4963
5170
  var tmp0_safe_receiver = _this__u8e3s4.roadCondition;
4964
- var condition = tmp0_safe_receiver == null ? null : toRoadCondition(tmp0_safe_receiver);
4965
- var tmp = _this__u8e3s4.massKg;
4966
- var tmp2_elvis_lhs = condition == null ? null : condition.maxBrakeG_1;
4967
- var tmp_0 = tmp2_elvis_lhs == null ? _this__u8e3s4.maxBrakeG : tmp2_elvis_lhs;
4968
- var tmp_1 = _this__u8e3s4.cd;
4969
- var tmp_2 = _this__u8e3s4.frontalAreaM2;
4970
- var tmp4_elvis_lhs = condition == null ? null : condition.get_leanAngleDeg_9xbhfm_k$();
4971
- return new Cyclist(tmp, tmp_0, tmp_1, tmp_2, tmp4_elvis_lhs == null ? _this__u8e3s4.maxLeanAngleDeg : tmp4_elvis_lhs, _this__u8e3s4.maxSpeedKmH);
5171
+ return applyTo(tmp0_safe_receiver == null ? null : toRoadCondition(tmp0_safe_receiver), new Cyclist(_this__u8e3s4.massKg, _this__u8e3s4.maxBrakeG, _this__u8e3s4.cd, _this__u8e3s4.frontalAreaM2, _this__u8e3s4.maxLeanAngleDeg, _this__u8e3s4.maxSpeedKmH));
4972
5172
  }
4973
5173
  function toRoadCondition(_this__u8e3s4) {
4974
5174
  _init_properties_EngineJsApi_kt__9bputf();
4975
- var tmp0 = get_entries_0();
4976
- var tmp$ret$0;
4977
- $l$block: {
4978
- // Inline function 'kotlin.collections.firstOrNull' call
4979
- var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
4980
- while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
4981
- var element = _iterator__ex2g4s.next_20eer_k$();
4982
- if (equals_0(element.name_1, _this__u8e3s4, true)) {
4983
- tmp$ret$0 = element;
4984
- break $l$block;
4985
- }
4986
- }
4987
- tmp$ret$0 = null;
4988
- }
4989
- var tmp0_elvis_lhs = tmp$ret$0;
5175
+ var tmp0_elvis_lhs = Companion_getInstance_7().fromWire_2092k5_k$(_this__u8e3s4);
4990
5176
  var tmp;
4991
5177
  if (tmp0_elvis_lhs == null) {
4992
- var tmp_0 = 'Unknown CyclistDto.roadCondition: ' + _this__u8e3s4 + ' (expected one of ';
4993
- // Inline function 'kotlin.collections.map' call
4994
- var this_0 = get_entries_0();
4995
- // Inline function 'kotlin.collections.mapTo' call
4996
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
4997
- var _iterator__ex2g4s_0 = this_0.iterator_jk1svi_k$();
4998
- while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
4999
- var item = _iterator__ex2g4s_0.next_20eer_k$();
5000
- // Inline function 'kotlin.text.lowercase' call
5001
- // Inline function 'kotlin.js.asDynamic' call
5002
- var tmp$ret$4 = item.name_1.toLowerCase();
5003
- destination.add_utx5q5_k$(tmp$ret$4);
5004
- }
5005
5178
  // Inline function 'kotlin.error' call
5006
- var message = tmp_0 + (toString(destination) + ')');
5179
+ var message = 'Unknown CyclistDto.roadCondition: ' + _this__u8e3s4 + ' (expected one of ' + toString(Companion_getInstance_7().get_wireNames_7fokbq_k$()) + ')';
5007
5180
  throw IllegalStateException_init_$Create$(toString(message));
5008
5181
  } else {
5009
5182
  tmp = tmp0_elvis_lhs;
@@ -5021,7 +5194,7 @@
5021
5194
  var tmp_2 = _this__u8e3s4.wheelRadiusM;
5022
5195
  var tmp_3 = _this__u8e3s4.efficiency;
5023
5196
  var tmp0_elvis_lhs = _this__u8e3s4.maxPedalingLeanAngleDeg;
5024
- return new Bike(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp0_elvis_lhs == null ? 20.0 : tmp0_elvis_lhs);
5197
+ return new Bike(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp0_elvis_lhs == null ? (new Bike()).maxPedalingLeanAngleDeg_1 : tmp0_elvis_lhs);
5025
5198
  }
5026
5199
  function toWindProvider(_this__u8e3s4) {
5027
5200
  _init_properties_EngineJsApi_kt__9bputf();
@@ -5040,11 +5213,11 @@
5040
5213
  return new CyclistPowerSpec();
5041
5214
  requireOnlyKeys(_this__u8e3s4, 'PowerProviderDto', get_POWER_PROVIDER_KEYS());
5042
5215
  var defaults = new CyclistPowerSpec();
5043
- var tmp0_elvis_lhs = Companion_instance_7.fromIdOrNull_83jhaj_k$(_this__u8e3s4.type);
5216
+ var tmp0_elvis_lhs = Companion_instance_9.fromIdOrNull_83jhaj_k$(_this__u8e3s4.type);
5044
5217
  var tmp;
5045
5218
  if (tmp0_elvis_lhs == null) {
5046
5219
  // Inline function 'kotlin.error' call
5047
- var message = 'Unknown PowerProviderDto.type: ' + _this__u8e3s4.type + ' (expected one of ' + toString(Companion_instance_7.get_ids_18j3qp_k$()) + ')';
5220
+ var message = 'Unknown PowerProviderDto.type: ' + _this__u8e3s4.type + ' (expected one of ' + toString(Companion_instance_9.get_ids_18j3qp_k$()) + ')';
5048
5221
  throw IllegalStateException_init_$Create$(toString(message));
5049
5222
  } else {
5050
5223
  tmp = tmp0_elvis_lhs;
@@ -5069,7 +5242,7 @@
5069
5242
  var keys = Object.keys(_this__u8e3s4);
5070
5243
  // Inline function 'kotlin.collections.filterNot' call
5071
5244
  // Inline function 'kotlin.collections.filterNotTo' call
5072
- var destination = ArrayList_init_$Create$();
5245
+ var destination = ArrayList_init_$Create$_0();
5073
5246
  var inductionVariable = 0;
5074
5247
  var last = keys.length;
5075
5248
  while (inductionVariable < last) {
@@ -5118,7 +5291,7 @@
5118
5291
  // Inline function 'kotlin.collections.map' call
5119
5292
  var this_0 = _this__u8e3s4.parts_1;
5120
5293
  // Inline function 'kotlin.collections.mapTo' call
5121
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
5294
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
5122
5295
  var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
5123
5296
  while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
5124
5297
  var item = _iterator__ex2g4s.next_20eer_k$();
@@ -5168,7 +5341,7 @@
5168
5341
  case 0:
5169
5342
  this.exceptionState_1 = 2;
5170
5343
  var opts = toEnhanceOptions(this.$options_1);
5171
- var provider = opts.fixElevation_1 ? new ElevationProvider() : null;
5344
+ var provider = opts.fixElevation_1 ? elevationProviderFor(this.$options_1) : null;
5172
5345
  this.state_1 = 1;
5173
5346
  suspendResult = Enhancer_instance.enhanceCourseDefault_jm937y_k$(this.$path_1, provider, opts, this);
5174
5347
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
@@ -5230,7 +5403,7 @@
5230
5403
  case 0:
5231
5404
  this.exceptionState_1 = 2;
5232
5405
  var opts = toEnhanceOptions(this.$options_1);
5233
- var provider = opts.fixElevation_1 ? new ElevationProvider() : null;
5406
+ var provider = opts.fixElevation_1 ? elevationProviderFor(this.$options_1) : null;
5234
5407
  var course = new CoursePhysics(new Course(this.$path_1, toCyclist(this.$cyclist_1), toBike(this.$bike_1)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(this.$wind_1), toCyclistPowerProvider(this.$power_1));
5235
5408
  this.state_1 = 1;
5236
5409
  suspendResult = Enhancer_instance.enhanceCourse_mout3j_k$(course, opts, provider, this);
@@ -5270,29 +5443,30 @@
5270
5443
  function _init_properties_EngineJsApi_kt__9bputf() {
5271
5444
  if (!properties_initialized_EngineJsApi_kt_2x4hj5) {
5272
5445
  properties_initialized_EngineJsApi_kt_2x4hj5 = true;
5446
+ WAYPOINT_KEYS = setOf_0(['latitudeDeg', 'longitudeDeg', 'elevationM', 'name', 'description', 'symbol', 'type', 'timeEpochMs']);
5273
5447
  POWER_PROVIDER_KEYS = setOf_0(['type', 'power', 'useHarmonics', 'criticalPower', 'wPrime', 'pacing', 'maxSlewWPerS']);
5274
5448
  CYCLIST_KEYS = setOf_0(['massKg', 'cd', 'frontalAreaM2', 'maxLeanAngleDeg', 'maxBrakeG', 'maxSpeedKmH', 'roadCondition']);
5275
5449
  BIKE_KEYS = setOf_0(['crr', 'inertiaFront', 'inertiaRear', 'wheelRadiusM', 'efficiency', 'maxPedalingLeanAngleDeg']);
5276
5450
  WIND_KEYS = setOf_0(['windSpeed', 'windDirection']);
5277
- ENHANCE_OPTIONS_KEYS = setOf_0(['fixElevation', 'computeMaxSpeeds', 'virtualizeTrack', 'computeOnePointPerSecond', 'simplifyEnabled', 'simplifyToleranceM', 'simplifyZExaggeration', 'wPrimeBalanceEnabled', 'wPrimeBalanceCriticalPower', 'wPrimeBalanceWPrime', 'curvatureEnabled', 'racingLineEnabled', 'racingLineCorridor', 'racingLineRoadWidthM']);
5451
+ ENHANCE_OPTIONS_KEYS = setOf_0(['fixElevation', 'computeMaxSpeeds', 'virtualizeTrack', 'computeOnePointPerSecond', 'simplifyEnabled', 'simplifyToleranceM', 'simplifyZExaggeration', 'wPrimeBalanceEnabled', 'wPrimeBalanceCriticalPower', 'wPrimeBalanceWPrime', 'curvatureEnabled', 'racingLineEnabled', 'racingLineCorridor', 'racingLineRoadWidthM', 'elevationGainPreset', 'elevationGainThresholdM', 'elevationGainEnabled', 'elevationSmoothWindowM', 'demZoom']);
5278
5452
  }
5279
5453
  }
5280
5454
  //region block: init
5281
5455
  Enhancer_instance = new Enhancer();
5282
- Companion_instance_5 = new Companion_4();
5456
+ Companion_instance_7 = new Companion_5();
5283
5457
  ClimbDetector_instance = new ClimbDetector();
5284
5458
  AeroPowerProvider_instance = new AeroPowerProvider();
5285
5459
  AeroProviderConstant_instance = new AeroProviderConstant();
5286
- Companion_instance_6 = new Companion_5();
5287
- Companion_instance_7 = new Companion_6();
5460
+ Companion_instance_8 = new Companion_6();
5461
+ Companion_instance_9 = new Companion_7();
5288
5462
  GravPowerProvider_instance = new GravPowerProvider();
5289
5463
  MaxSpeedComputer_instance = new MaxSpeedComputer();
5290
5464
  MuscularPowerProvider_instance = new MuscularPowerProvider();
5291
5465
  PowerComputer_instance = new PowerComputer();
5292
- Companion_instance_8 = new Companion_7();
5293
- Companion_instance_9 = new Companion_8();
5466
+ Companion_instance_10 = new Companion_8();
5467
+ Companion_instance_11 = new Companion_9();
5294
5468
  PowerProviderFromData_instance = new PowerProviderFromData();
5295
- Companion_instance_10 = new Companion_9();
5469
+ Companion_instance_12 = new Companion_10();
5296
5470
  RhoProviderDefault_instance = new RhoProviderDefault();
5297
5471
  RhoProviderEstimate_instance = new RhoProviderEstimate();
5298
5472
  RollingResistancePowerProvider_instance = new RollingResistancePowerProvider();
@@ -5305,11 +5479,11 @@
5305
5479
  Corridor_instance = new Corridor();
5306
5480
  CurvatureEstimator_instance = new CurvatureEstimator();
5307
5481
  LocalFrame_instance = new LocalFrame();
5308
- Companion_instance_12 = new Companion_11();
5482
+ Companion_instance_14 = new Companion_12();
5309
5483
  OffsetQp_instance = new OffsetQp();
5310
5484
  PathCurvature_instance = new PathCurvature();
5311
5485
  RacingLine_instance = new RacingLine();
5312
- Companion_instance_14 = new Companion_13();
5486
+ Companion_instance_16 = new Companion_14();
5313
5487
  //endregion
5314
5488
  //region block: exports
5315
5489
  function $jsExportAll$(_) {
@@ -5329,6 +5503,10 @@
5329
5503
  engine.pathDurationMs = pathDurationMs;
5330
5504
  engine.pathElevationGain = pathElevationGain;
5331
5505
  engine.pathElevationLoss = pathElevationLoss;
5506
+ engine.pathElevationGainFiltered = pathElevationGainFiltered;
5507
+ engine.pathElevationLossFiltered = pathElevationLossFiltered;
5508
+ engine.pathReportedElevationGain = pathReportedElevationGain;
5509
+ engine.pathReportedElevationLoss = pathReportedElevationLoss;
5332
5510
  engine.pointAt = pointAt;
5333
5511
  engine.writeGpx = writeGpx;
5334
5512
  engine.writeGpxAt = writeGpxAt;