@glandais/vcyclist-engine 1.1.1 → 1.2.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.
- package/README.md +13 -0
- package/kotlin-kotlin-stdlib.js +2383 -1969
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +1226 -1205
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/package.json +1 -2
- package/vcyclist-elevation.js +923 -943
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +5 -0
- package/vcyclist-engine.js +1194 -991
- package/vcyclist-engine.js.map +1 -1
- package/xmlutil-core.js +8130 -3743
- package/xmlutil-core.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -15
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
package/vcyclist-engine.js
CHANGED
|
@@ -22,80 +22,82 @@
|
|
|
22
22
|
'use strict';
|
|
23
23
|
//region block: imports
|
|
24
24
|
var imul = Math.imul;
|
|
25
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
26
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
25
|
+
var protoOf = kotlin_kotlin.$_$.h5;
|
|
26
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.v4;
|
|
27
27
|
var VOID = kotlin_kotlin.$_$.a;
|
|
28
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
29
|
-
var equals = kotlin_kotlin.$_$.
|
|
30
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
31
|
-
var toString = kotlin_kotlin.$_$.
|
|
32
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
33
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
34
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
35
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
36
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
38
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
39
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
40
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
41
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
28
|
+
var getNumberHashCode = kotlin_kotlin.$_$.q4;
|
|
29
|
+
var equals = kotlin_kotlin.$_$.o4;
|
|
30
|
+
var initMetadataForClass = kotlin_kotlin.$_$.u4;
|
|
31
|
+
var toString = kotlin_kotlin.$_$.j5;
|
|
32
|
+
var hashCode = kotlin_kotlin.$_$.t4;
|
|
33
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.p4;
|
|
34
|
+
var CoroutineImpl = kotlin_kotlin.$_$.p3;
|
|
35
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.a3;
|
|
36
|
+
var Unit_instance = kotlin_kotlin.$_$.r;
|
|
37
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.w4;
|
|
38
|
+
var initMetadataForObject = kotlin_kotlin.$_$.a5;
|
|
39
|
+
var getStringHashCode = kotlin_kotlin.$_$.s4;
|
|
40
|
+
var toString_0 = kotlin_kotlin.$_$.n7;
|
|
41
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
42
42
|
var MathConstants_getInstance = kotlin_io_github_glandais_elevation.$_$.d;
|
|
43
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
44
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
45
|
-
var Long = kotlin_kotlin.$_$.
|
|
46
|
-
var compare = kotlin_kotlin.$_$.
|
|
47
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
48
|
-
var listOf = kotlin_kotlin.$_$.
|
|
49
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
43
|
+
var isNaN_0 = kotlin_kotlin.$_$.i7;
|
|
44
|
+
var numberToLong = kotlin_kotlin.$_$.c4;
|
|
45
|
+
var Long = kotlin_kotlin.$_$.y6;
|
|
46
|
+
var compare = kotlin_kotlin.$_$.v3;
|
|
47
|
+
var roundToInt = kotlin_kotlin.$_$.k5;
|
|
48
|
+
var listOf = kotlin_kotlin.$_$.q2;
|
|
49
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
50
50
|
var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.a;
|
|
51
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
52
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
53
|
-
var isCharSequence = kotlin_kotlin.$_$.
|
|
54
|
-
var trim = kotlin_kotlin.$_$.
|
|
55
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
56
|
-
var isBlank = kotlin_kotlin.$_$.
|
|
57
|
-
var toDoubleOrNull = kotlin_kotlin.$_$.
|
|
58
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
59
|
-
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.
|
|
60
|
-
var Companion_getInstance = kotlin_kotlin.$_$.
|
|
61
|
-
var IllegalArgumentException = kotlin_kotlin.$_$.
|
|
51
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.u;
|
|
52
|
+
var THROW_CCE = kotlin_kotlin.$_$.c7;
|
|
53
|
+
var isCharSequence = kotlin_kotlin.$_$.b5;
|
|
54
|
+
var trim = kotlin_kotlin.$_$.s6;
|
|
55
|
+
var charSequenceLength = kotlin_kotlin.$_$.k4;
|
|
56
|
+
var isBlank = kotlin_kotlin.$_$.h6;
|
|
57
|
+
var toDoubleOrNull = kotlin_kotlin.$_$.p6;
|
|
58
|
+
var numberToInt = kotlin_kotlin.$_$.f5;
|
|
59
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.d1;
|
|
60
|
+
var Companion_getInstance = kotlin_kotlin.$_$.p;
|
|
61
|
+
var IllegalArgumentException = kotlin_kotlin.$_$.x6;
|
|
62
62
|
var get_xmlStreaming = kotlin_io_github_pdvrieze_xmlutil_core.$_$.e;
|
|
63
|
-
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
63
|
+
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.k1;
|
|
64
64
|
var XmlException = kotlin_io_github_pdvrieze_xmlutil_core.$_$.c;
|
|
65
|
-
var firstOrNull = kotlin_kotlin.$_$.
|
|
66
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
67
|
-
var toNumber = kotlin_kotlin.$_$.
|
|
65
|
+
var firstOrNull = kotlin_kotlin.$_$.m2;
|
|
66
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
67
|
+
var toNumber = kotlin_kotlin.$_$.e4;
|
|
68
68
|
var XmlDeclMode_None_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.b;
|
|
69
69
|
var newGenericWriter = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
|
|
70
70
|
var LatLon = kotlin_io_github_glandais_elevation.$_$.g;
|
|
71
71
|
var ElevationSmoother_instance = kotlin_io_github_glandais_elevation.$_$.c;
|
|
72
|
-
var until = kotlin_kotlin.$_$.
|
|
72
|
+
var until = kotlin_kotlin.$_$.r5;
|
|
73
73
|
var LatLonElevation = kotlin_io_github_glandais_elevation.$_$.f;
|
|
74
74
|
var arrayCopy = kotlin_kotlin.$_$.a2;
|
|
75
75
|
var Distance_instance = kotlin_io_github_glandais_elevation.$_$.a;
|
|
76
76
|
var DouglasPeucker_instance = kotlin_io_github_glandais_elevation.$_$.b;
|
|
77
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
78
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
79
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
80
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
81
|
-
var enumEntries = kotlin_kotlin.$_$.
|
|
82
|
-
var Enum = kotlin_kotlin.$_$.
|
|
83
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
84
|
-
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
85
|
-
var multiply = kotlin_kotlin.$_$.
|
|
86
|
-
var subtract = kotlin_kotlin.$_$.
|
|
87
|
-
var equalsLong = kotlin_kotlin.$_$.
|
|
88
|
-
var add = kotlin_kotlin.$_$.
|
|
89
|
-
var get_ONE = kotlin_kotlin.$_$.
|
|
90
|
-
var sorted = kotlin_kotlin.$_$.
|
|
91
|
-
var Default_getInstance = kotlin_kotlin.$_$.
|
|
92
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
77
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.e2;
|
|
78
|
+
var mapCapacity = kotlin_kotlin.$_$.s2;
|
|
79
|
+
var coerceAtLeast = kotlin_kotlin.$_$.m5;
|
|
80
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
81
|
+
var enumEntries = kotlin_kotlin.$_$.r3;
|
|
82
|
+
var Enum = kotlin_kotlin.$_$.u6;
|
|
83
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.k7;
|
|
84
|
+
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.y;
|
|
85
|
+
var multiply = kotlin_kotlin.$_$.b4;
|
|
86
|
+
var subtract = kotlin_kotlin.$_$.d4;
|
|
87
|
+
var equalsLong = kotlin_kotlin.$_$.y3;
|
|
88
|
+
var add = kotlin_kotlin.$_$.u3;
|
|
89
|
+
var get_ONE = kotlin_kotlin.$_$.t3;
|
|
90
|
+
var sorted = kotlin_kotlin.$_$.v2;
|
|
91
|
+
var Default_getInstance = kotlin_kotlin.$_$.o;
|
|
92
|
+
var emptyList = kotlin_kotlin.$_$.k2;
|
|
93
93
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
94
94
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
95
|
+
var copyToArray = kotlin_kotlin.$_$.j2;
|
|
95
96
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
96
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
97
|
+
var isInterface = kotlin_kotlin.$_$.c5;
|
|
97
98
|
var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.e;
|
|
98
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
99
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.z4;
|
|
100
|
+
var constructCallableReference = kotlin_kotlin.$_$.m4;
|
|
99
101
|
//endregion
|
|
100
102
|
//region block: pre-declaration
|
|
101
103
|
initMetadataForCompanion(Companion);
|
|
@@ -143,6 +145,8 @@
|
|
|
143
145
|
initMetadataForObject(MuscularPowerProvider, 'MuscularPowerProvider');
|
|
144
146
|
initMetadataForObject(PowerComputer, 'PowerComputer');
|
|
145
147
|
initMetadataForClass(PowerProviderConstant, 'PowerProviderConstant', VOID, CyclistPowerProviderBase);
|
|
148
|
+
initMetadataForClass(PowerProviderConstantWithTiring, 'PowerProviderConstantWithTiring', VOID, CyclistPowerProviderBase);
|
|
149
|
+
initMetadataForObject(PowerProviderFromData, 'PowerProviderFromData');
|
|
146
150
|
initMetadataForObject(RhoProviderDefault, 'RhoProviderDefault');
|
|
147
151
|
initMetadataForObject(RhoProviderEstimate, 'RhoProviderEstimate');
|
|
148
152
|
initMetadataForObject(RollingResistancePowerProvider, 'RollingResistancePowerProvider');
|
|
@@ -151,11 +155,13 @@
|
|
|
151
155
|
initMetadataForCompanion(Companion_7);
|
|
152
156
|
initMetadataForClass(Wind, 'Wind');
|
|
153
157
|
initMetadataForObject(WindProviderNone, 'WindProviderNone');
|
|
158
|
+
initMetadataForClass(WindProviderConstant, 'WindProviderConstant');
|
|
154
159
|
initMetadataForLambda(enhance$slambda, CoroutineImpl, VOID, [1]);
|
|
160
|
+
initMetadataForLambda(enhanceWithCourse$slambda, CoroutineImpl, VOID, [1]);
|
|
155
161
|
//endregion
|
|
156
162
|
function Companion() {
|
|
157
163
|
Companion_instance = this;
|
|
158
|
-
this.
|
|
164
|
+
this.x1o_1 = new Bike();
|
|
159
165
|
}
|
|
160
166
|
var Companion_instance;
|
|
161
167
|
function Companion_getInstance_0() {
|
|
@@ -170,21 +176,21 @@
|
|
|
170
176
|
inertiaRear = inertiaRear === VOID ? 0.07 : inertiaRear;
|
|
171
177
|
wheelRadiusM = wheelRadiusM === VOID ? 0.7 : wheelRadiusM;
|
|
172
178
|
efficiency = efficiency === VOID ? 0.976 : efficiency;
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
177
|
-
this.
|
|
179
|
+
this.y1o_1 = crr;
|
|
180
|
+
this.z1o_1 = inertiaFront;
|
|
181
|
+
this.a1p_1 = inertiaRear;
|
|
182
|
+
this.b1p_1 = wheelRadiusM;
|
|
183
|
+
this.c1p_1 = efficiency;
|
|
178
184
|
}
|
|
179
185
|
protoOf(Bike).toString = function () {
|
|
180
|
-
return 'Bike(crr=' + this.
|
|
186
|
+
return 'Bike(crr=' + this.y1o_1 + ', inertiaFront=' + this.z1o_1 + ', inertiaRear=' + this.a1p_1 + ', wheelRadiusM=' + this.b1p_1 + ', efficiency=' + this.c1p_1 + ')';
|
|
181
187
|
};
|
|
182
188
|
protoOf(Bike).hashCode = function () {
|
|
183
|
-
var result = getNumberHashCode(this.
|
|
184
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
185
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
186
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
187
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
189
|
+
var result = getNumberHashCode(this.y1o_1);
|
|
190
|
+
result = imul(result, 31) + getNumberHashCode(this.z1o_1) | 0;
|
|
191
|
+
result = imul(result, 31) + getNumberHashCode(this.a1p_1) | 0;
|
|
192
|
+
result = imul(result, 31) + getNumberHashCode(this.b1p_1) | 0;
|
|
193
|
+
result = imul(result, 31) + getNumberHashCode(this.c1p_1) | 0;
|
|
188
194
|
return result;
|
|
189
195
|
};
|
|
190
196
|
protoOf(Bike).equals = function (other) {
|
|
@@ -192,41 +198,41 @@
|
|
|
192
198
|
return true;
|
|
193
199
|
if (!(other instanceof Bike))
|
|
194
200
|
return false;
|
|
195
|
-
if (!equals(this.
|
|
201
|
+
if (!equals(this.y1o_1, other.y1o_1))
|
|
196
202
|
return false;
|
|
197
|
-
if (!equals(this.
|
|
203
|
+
if (!equals(this.z1o_1, other.z1o_1))
|
|
198
204
|
return false;
|
|
199
|
-
if (!equals(this.
|
|
205
|
+
if (!equals(this.a1p_1, other.a1p_1))
|
|
200
206
|
return false;
|
|
201
|
-
if (!equals(this.
|
|
207
|
+
if (!equals(this.b1p_1, other.b1p_1))
|
|
202
208
|
return false;
|
|
203
|
-
if (!equals(this.
|
|
209
|
+
if (!equals(this.c1p_1, other.c1p_1))
|
|
204
210
|
return false;
|
|
205
211
|
return true;
|
|
206
212
|
};
|
|
207
213
|
function Course(path, cyclist, bike) {
|
|
208
|
-
cyclist = cyclist === VOID ? Companion_getInstance_2().
|
|
209
|
-
bike = bike === VOID ? Companion_getInstance_0().
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
212
|
-
this.
|
|
214
|
+
cyclist = cyclist === VOID ? Companion_getInstance_2().d1p_1 : cyclist;
|
|
215
|
+
bike = bike === VOID ? Companion_getInstance_0().x1o_1 : bike;
|
|
216
|
+
this.e1p_1 = path;
|
|
217
|
+
this.f1p_1 = cyclist;
|
|
218
|
+
this.g1p_1 = bike;
|
|
213
219
|
}
|
|
214
|
-
protoOf(Course).
|
|
220
|
+
protoOf(Course).h1p = function (path, cyclist, bike) {
|
|
215
221
|
return new Course(path, cyclist, bike);
|
|
216
222
|
};
|
|
217
|
-
protoOf(Course).
|
|
218
|
-
path = path === VOID ? this.
|
|
219
|
-
cyclist = cyclist === VOID ? this.
|
|
220
|
-
bike = bike === VOID ? this.
|
|
221
|
-
return $super === VOID ? this.
|
|
223
|
+
protoOf(Course).i1p = function (path, cyclist, bike, $super) {
|
|
224
|
+
path = path === VOID ? this.e1p_1 : path;
|
|
225
|
+
cyclist = cyclist === VOID ? this.f1p_1 : cyclist;
|
|
226
|
+
bike = bike === VOID ? this.g1p_1 : bike;
|
|
227
|
+
return $super === VOID ? this.h1p(path, cyclist, bike) : $super.h1p.call(this, path, cyclist, bike);
|
|
222
228
|
};
|
|
223
229
|
protoOf(Course).toString = function () {
|
|
224
|
-
return 'Course(path=' + toString(this.
|
|
230
|
+
return 'Course(path=' + toString(this.e1p_1) + ', cyclist=' + this.f1p_1.toString() + ', bike=' + this.g1p_1.toString() + ')';
|
|
225
231
|
};
|
|
226
232
|
protoOf(Course).hashCode = function () {
|
|
227
|
-
var result = hashCode(this.
|
|
228
|
-
result = imul(result, 31) + this.
|
|
229
|
-
result = imul(result, 31) + this.
|
|
233
|
+
var result = hashCode(this.e1p_1);
|
|
234
|
+
result = imul(result, 31) + this.f1p_1.hashCode() | 0;
|
|
235
|
+
result = imul(result, 31) + this.g1p_1.hashCode() | 0;
|
|
230
236
|
return result;
|
|
231
237
|
};
|
|
232
238
|
protoOf(Course).equals = function (other) {
|
|
@@ -234,17 +240,17 @@
|
|
|
234
240
|
return true;
|
|
235
241
|
if (!(other instanceof Course))
|
|
236
242
|
return false;
|
|
237
|
-
if (!equals(this.
|
|
243
|
+
if (!equals(this.e1p_1, other.e1p_1))
|
|
238
244
|
return false;
|
|
239
|
-
if (!this.
|
|
245
|
+
if (!this.f1p_1.equals(other.f1p_1))
|
|
240
246
|
return false;
|
|
241
|
-
if (!this.
|
|
247
|
+
if (!this.g1p_1.equals(other.g1p_1))
|
|
242
248
|
return false;
|
|
243
249
|
return true;
|
|
244
250
|
};
|
|
245
251
|
function Companion_0() {
|
|
246
252
|
Companion_instance_0 = this;
|
|
247
|
-
this.
|
|
253
|
+
this.j1p_1 = new PowerProviderConstant(280.0);
|
|
248
254
|
}
|
|
249
255
|
var Companion_instance_0;
|
|
250
256
|
function Companion_getInstance_1() {
|
|
@@ -257,42 +263,42 @@
|
|
|
257
263
|
rhoProvider = rhoProvider === VOID ? RhoProviderDefault_instance : rhoProvider;
|
|
258
264
|
aeroProvider = aeroProvider === VOID ? AeroProviderConstant_instance : aeroProvider;
|
|
259
265
|
windProvider = windProvider === VOID ? WindProviderNone_instance : windProvider;
|
|
260
|
-
cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_1().
|
|
261
|
-
this.
|
|
262
|
-
this.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
266
|
+
cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_1().j1p_1 : cyclistPowerProvider;
|
|
267
|
+
this.k1p_1 = course;
|
|
268
|
+
this.l1p_1 = rhoProvider;
|
|
269
|
+
this.m1p_1 = aeroProvider;
|
|
270
|
+
this.n1p_1 = windProvider;
|
|
271
|
+
this.o1p_1 = cyclistPowerProvider;
|
|
266
272
|
}
|
|
267
|
-
protoOf(CoursePhysics).
|
|
268
|
-
return this.
|
|
273
|
+
protoOf(CoursePhysics).p1p = function () {
|
|
274
|
+
return this.k1p_1.e1p_1;
|
|
269
275
|
};
|
|
270
|
-
protoOf(CoursePhysics).
|
|
271
|
-
return this.
|
|
276
|
+
protoOf(CoursePhysics).q1p = function () {
|
|
277
|
+
return this.k1p_1.f1p_1;
|
|
272
278
|
};
|
|
273
|
-
protoOf(CoursePhysics).
|
|
274
|
-
return this.
|
|
279
|
+
protoOf(CoursePhysics).r1p = function () {
|
|
280
|
+
return this.k1p_1.g1p_1;
|
|
275
281
|
};
|
|
276
|
-
protoOf(CoursePhysics).
|
|
282
|
+
protoOf(CoursePhysics).s1p = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
|
|
277
283
|
return new CoursePhysics(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
|
|
278
284
|
};
|
|
279
|
-
protoOf(CoursePhysics).
|
|
280
|
-
course = course === VOID ? this.
|
|
281
|
-
rhoProvider = rhoProvider === VOID ? this.
|
|
282
|
-
aeroProvider = aeroProvider === VOID ? this.
|
|
283
|
-
windProvider = windProvider === VOID ? this.
|
|
284
|
-
cyclistPowerProvider = cyclistPowerProvider === VOID ? this.
|
|
285
|
-
return $super === VOID ? this.
|
|
285
|
+
protoOf(CoursePhysics).t1p = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider, $super) {
|
|
286
|
+
course = course === VOID ? this.k1p_1 : course;
|
|
287
|
+
rhoProvider = rhoProvider === VOID ? this.l1p_1 : rhoProvider;
|
|
288
|
+
aeroProvider = aeroProvider === VOID ? this.m1p_1 : aeroProvider;
|
|
289
|
+
windProvider = windProvider === VOID ? this.n1p_1 : windProvider;
|
|
290
|
+
cyclistPowerProvider = cyclistPowerProvider === VOID ? this.o1p_1 : cyclistPowerProvider;
|
|
291
|
+
return $super === VOID ? this.s1p(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) : $super.s1p.call(this, course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
|
|
286
292
|
};
|
|
287
293
|
protoOf(CoursePhysics).toString = function () {
|
|
288
|
-
return 'CoursePhysics(course=' + this.
|
|
294
|
+
return 'CoursePhysics(course=' + this.k1p_1.toString() + ', rhoProvider=' + toString(this.l1p_1) + ', aeroProvider=' + toString(this.m1p_1) + ', windProvider=' + toString(this.n1p_1) + ', cyclistPowerProvider=' + toString(this.o1p_1) + ')';
|
|
289
295
|
};
|
|
290
296
|
protoOf(CoursePhysics).hashCode = function () {
|
|
291
|
-
var result = this.
|
|
292
|
-
result = imul(result, 31) + hashCode(this.
|
|
293
|
-
result = imul(result, 31) + hashCode(this.
|
|
294
|
-
result = imul(result, 31) + hashCode(this.
|
|
295
|
-
result = imul(result, 31) + hashCode(this.
|
|
297
|
+
var result = this.k1p_1.hashCode();
|
|
298
|
+
result = imul(result, 31) + hashCode(this.l1p_1) | 0;
|
|
299
|
+
result = imul(result, 31) + hashCode(this.m1p_1) | 0;
|
|
300
|
+
result = imul(result, 31) + hashCode(this.n1p_1) | 0;
|
|
301
|
+
result = imul(result, 31) + hashCode(this.o1p_1) | 0;
|
|
296
302
|
return result;
|
|
297
303
|
};
|
|
298
304
|
protoOf(CoursePhysics).equals = function (other) {
|
|
@@ -300,21 +306,21 @@
|
|
|
300
306
|
return true;
|
|
301
307
|
if (!(other instanceof CoursePhysics))
|
|
302
308
|
return false;
|
|
303
|
-
if (!this.
|
|
309
|
+
if (!this.k1p_1.equals(other.k1p_1))
|
|
304
310
|
return false;
|
|
305
|
-
if (!equals(this.
|
|
311
|
+
if (!equals(this.l1p_1, other.l1p_1))
|
|
306
312
|
return false;
|
|
307
|
-
if (!equals(this.
|
|
313
|
+
if (!equals(this.m1p_1, other.m1p_1))
|
|
308
314
|
return false;
|
|
309
|
-
if (!equals(this.
|
|
315
|
+
if (!equals(this.n1p_1, other.n1p_1))
|
|
310
316
|
return false;
|
|
311
|
-
if (!equals(this.
|
|
317
|
+
if (!equals(this.o1p_1, other.o1p_1))
|
|
312
318
|
return false;
|
|
313
319
|
return true;
|
|
314
320
|
};
|
|
315
321
|
function Companion_1() {
|
|
316
322
|
Companion_instance_1 = this;
|
|
317
|
-
this.
|
|
323
|
+
this.d1p_1 = new Cyclist();
|
|
318
324
|
}
|
|
319
325
|
var Companion_instance_1;
|
|
320
326
|
function Companion_getInstance_2() {
|
|
@@ -330,34 +336,34 @@
|
|
|
330
336
|
frontalAreaM2 = frontalAreaM2 === VOID ? 0.5 : frontalAreaM2;
|
|
331
337
|
maxLeanAngleDeg = maxLeanAngleDeg === VOID ? 35.0 : maxLeanAngleDeg;
|
|
332
338
|
maxSpeedKmH = maxSpeedKmH === VOID ? 100.0 : maxSpeedKmH;
|
|
333
|
-
this.
|
|
334
|
-
this.
|
|
335
|
-
this.
|
|
336
|
-
this.
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
339
|
-
}
|
|
340
|
-
protoOf(Cyclist).
|
|
339
|
+
this.u1p_1 = massKg;
|
|
340
|
+
this.v1p_1 = maxBrakeG;
|
|
341
|
+
this.w1p_1 = cd;
|
|
342
|
+
this.x1p_1 = frontalAreaM2;
|
|
343
|
+
this.y1p_1 = maxLeanAngleDeg;
|
|
344
|
+
this.z1p_1 = maxSpeedKmH;
|
|
345
|
+
}
|
|
346
|
+
protoOf(Cyclist).a1q = function () {
|
|
341
347
|
// Inline function 'kotlin.math.tan' call
|
|
342
|
-
var x = this.
|
|
348
|
+
var x = this.y1p_1 * 3.141592653589793 / 180.0;
|
|
343
349
|
return Math.tan(x);
|
|
344
350
|
};
|
|
345
|
-
protoOf(Cyclist).
|
|
346
|
-
return this.
|
|
351
|
+
protoOf(Cyclist).b1q = function () {
|
|
352
|
+
return this.v1p_1 * 9.8;
|
|
347
353
|
};
|
|
348
|
-
protoOf(Cyclist).
|
|
349
|
-
return this.
|
|
354
|
+
protoOf(Cyclist).c1q = function () {
|
|
355
|
+
return this.z1p_1 / 3.6;
|
|
350
356
|
};
|
|
351
357
|
protoOf(Cyclist).toString = function () {
|
|
352
|
-
return 'Cyclist(massKg=' + this.
|
|
358
|
+
return 'Cyclist(massKg=' + this.u1p_1 + ', maxBrakeG=' + this.v1p_1 + ', cd=' + this.w1p_1 + ', frontalAreaM2=' + this.x1p_1 + ', maxLeanAngleDeg=' + this.y1p_1 + ', maxSpeedKmH=' + this.z1p_1 + ')';
|
|
353
359
|
};
|
|
354
360
|
protoOf(Cyclist).hashCode = function () {
|
|
355
|
-
var result = getNumberHashCode(this.
|
|
356
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
357
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
358
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
359
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
360
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
361
|
+
var result = getNumberHashCode(this.u1p_1);
|
|
362
|
+
result = imul(result, 31) + getNumberHashCode(this.v1p_1) | 0;
|
|
363
|
+
result = imul(result, 31) + getNumberHashCode(this.w1p_1) | 0;
|
|
364
|
+
result = imul(result, 31) + getNumberHashCode(this.x1p_1) | 0;
|
|
365
|
+
result = imul(result, 31) + getNumberHashCode(this.y1p_1) | 0;
|
|
366
|
+
result = imul(result, 31) + getNumberHashCode(this.z1p_1) | 0;
|
|
361
367
|
return result;
|
|
362
368
|
};
|
|
363
369
|
protoOf(Cyclist).equals = function (other) {
|
|
@@ -365,17 +371,17 @@
|
|
|
365
371
|
return true;
|
|
366
372
|
if (!(other instanceof Cyclist))
|
|
367
373
|
return false;
|
|
368
|
-
if (!equals(this.
|
|
374
|
+
if (!equals(this.u1p_1, other.u1p_1))
|
|
369
375
|
return false;
|
|
370
|
-
if (!equals(this.
|
|
376
|
+
if (!equals(this.v1p_1, other.v1p_1))
|
|
371
377
|
return false;
|
|
372
|
-
if (!equals(this.
|
|
378
|
+
if (!equals(this.w1p_1, other.w1p_1))
|
|
373
379
|
return false;
|
|
374
|
-
if (!equals(this.
|
|
380
|
+
if (!equals(this.x1p_1, other.x1p_1))
|
|
375
381
|
return false;
|
|
376
|
-
if (!equals(this.
|
|
382
|
+
if (!equals(this.y1p_1, other.y1p_1))
|
|
377
383
|
return false;
|
|
378
|
-
if (!equals(this.
|
|
384
|
+
if (!equals(this.z1p_1, other.z1p_1))
|
|
379
385
|
return false;
|
|
380
386
|
return true;
|
|
381
387
|
};
|
|
@@ -383,17 +389,17 @@
|
|
|
383
389
|
enabled = enabled === VOID ? true : enabled;
|
|
384
390
|
toleranceM = toleranceM === VOID ? 10.0 : toleranceM;
|
|
385
391
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
386
|
-
this.
|
|
387
|
-
this.
|
|
388
|
-
this.
|
|
392
|
+
this.d1q_1 = enabled;
|
|
393
|
+
this.e1q_1 = toleranceM;
|
|
394
|
+
this.f1q_1 = zExaggeration;
|
|
389
395
|
}
|
|
390
396
|
protoOf(SimplifyPathOptions).toString = function () {
|
|
391
|
-
return 'SimplifyPathOptions(enabled=' + this.
|
|
397
|
+
return 'SimplifyPathOptions(enabled=' + this.d1q_1 + ', toleranceM=' + this.e1q_1 + ', zExaggeration=' + this.f1q_1 + ')';
|
|
392
398
|
};
|
|
393
399
|
protoOf(SimplifyPathOptions).hashCode = function () {
|
|
394
|
-
var result = getBooleanHashCode(this.
|
|
395
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
396
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
400
|
+
var result = getBooleanHashCode(this.d1q_1);
|
|
401
|
+
result = imul(result, 31) + getNumberHashCode(this.e1q_1) | 0;
|
|
402
|
+
result = imul(result, 31) + getNumberHashCode(this.f1q_1) | 0;
|
|
397
403
|
return result;
|
|
398
404
|
};
|
|
399
405
|
protoOf(SimplifyPathOptions).equals = function (other) {
|
|
@@ -401,17 +407,17 @@
|
|
|
401
407
|
return true;
|
|
402
408
|
if (!(other instanceof SimplifyPathOptions))
|
|
403
409
|
return false;
|
|
404
|
-
if (!(this.
|
|
410
|
+
if (!(this.d1q_1 === other.d1q_1))
|
|
405
411
|
return false;
|
|
406
|
-
if (!equals(this.
|
|
412
|
+
if (!equals(this.e1q_1, other.e1q_1))
|
|
407
413
|
return false;
|
|
408
|
-
if (!equals(this.
|
|
414
|
+
if (!equals(this.f1q_1, other.f1q_1))
|
|
409
415
|
return false;
|
|
410
416
|
return true;
|
|
411
417
|
};
|
|
412
418
|
function Companion_2() {
|
|
413
419
|
Companion_instance_2 = this;
|
|
414
|
-
this.
|
|
420
|
+
this.g1q_1 = new EnhanceOptions();
|
|
415
421
|
}
|
|
416
422
|
var Companion_instance_2;
|
|
417
423
|
function Companion_getInstance_3() {
|
|
@@ -426,21 +432,21 @@
|
|
|
426
432
|
virtualizeTrack = virtualizeTrack === VOID ? true : virtualizeTrack;
|
|
427
433
|
computeOnePointPerSecond = computeOnePointPerSecond === VOID ? true : computeOnePointPerSecond;
|
|
428
434
|
simplifyPath = simplifyPath === VOID ? new SimplifyPathOptions() : simplifyPath;
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
432
|
-
this.
|
|
433
|
-
this.
|
|
435
|
+
this.h1q_1 = fixElevation;
|
|
436
|
+
this.i1q_1 = computeMaxSpeeds;
|
|
437
|
+
this.j1q_1 = virtualizeTrack;
|
|
438
|
+
this.k1q_1 = computeOnePointPerSecond;
|
|
439
|
+
this.l1q_1 = simplifyPath;
|
|
434
440
|
}
|
|
435
441
|
protoOf(EnhanceOptions).toString = function () {
|
|
436
|
-
return 'EnhanceOptions(fixElevation=' + this.
|
|
442
|
+
return 'EnhanceOptions(fixElevation=' + this.h1q_1 + ', computeMaxSpeeds=' + this.i1q_1 + ', virtualizeTrack=' + this.j1q_1 + ', computeOnePointPerSecond=' + this.k1q_1 + ', simplifyPath=' + this.l1q_1.toString() + ')';
|
|
437
443
|
};
|
|
438
444
|
protoOf(EnhanceOptions).hashCode = function () {
|
|
439
|
-
var result = getBooleanHashCode(this.
|
|
440
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
441
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
442
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
443
|
-
result = imul(result, 31) + this.
|
|
445
|
+
var result = getBooleanHashCode(this.h1q_1);
|
|
446
|
+
result = imul(result, 31) + getBooleanHashCode(this.i1q_1) | 0;
|
|
447
|
+
result = imul(result, 31) + getBooleanHashCode(this.j1q_1) | 0;
|
|
448
|
+
result = imul(result, 31) + getBooleanHashCode(this.k1q_1) | 0;
|
|
449
|
+
result = imul(result, 31) + this.l1q_1.hashCode() | 0;
|
|
444
450
|
return result;
|
|
445
451
|
};
|
|
446
452
|
protoOf(EnhanceOptions).equals = function (other) {
|
|
@@ -448,100 +454,100 @@
|
|
|
448
454
|
return true;
|
|
449
455
|
if (!(other instanceof EnhanceOptions))
|
|
450
456
|
return false;
|
|
451
|
-
if (!(this.
|
|
457
|
+
if (!(this.h1q_1 === other.h1q_1))
|
|
452
458
|
return false;
|
|
453
|
-
if (!(this.
|
|
459
|
+
if (!(this.i1q_1 === other.i1q_1))
|
|
454
460
|
return false;
|
|
455
|
-
if (!(this.
|
|
461
|
+
if (!(this.j1q_1 === other.j1q_1))
|
|
456
462
|
return false;
|
|
457
|
-
if (!(this.
|
|
463
|
+
if (!(this.k1q_1 === other.k1q_1))
|
|
458
464
|
return false;
|
|
459
|
-
if (!this.
|
|
465
|
+
if (!this.l1q_1.equals(other.l1q_1))
|
|
460
466
|
return false;
|
|
461
467
|
return true;
|
|
462
468
|
};
|
|
463
469
|
function $enhanceCourseCOROUTINE$(_this__u8e3s4, course, options, elevationProvider, resultContinuation) {
|
|
464
470
|
CoroutineImpl.call(this, resultContinuation);
|
|
465
|
-
this.
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
471
|
+
this.u1q_1 = _this__u8e3s4;
|
|
472
|
+
this.v1q_1 = course;
|
|
473
|
+
this.w1q_1 = options;
|
|
474
|
+
this.x1q_1 = elevationProvider;
|
|
469
475
|
}
|
|
470
|
-
protoOf($enhanceCourseCOROUTINE$).
|
|
471
|
-
var suspendResult = this.
|
|
476
|
+
protoOf($enhanceCourseCOROUTINE$).o6 = function () {
|
|
477
|
+
var suspendResult = this.i6_1;
|
|
472
478
|
$sm: do
|
|
473
479
|
try {
|
|
474
|
-
var tmp = this.
|
|
480
|
+
var tmp = this.g6_1;
|
|
475
481
|
switch (tmp) {
|
|
476
482
|
case 0:
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
480
|
-
if (this.
|
|
481
|
-
this.
|
|
482
|
-
suspendResult = ElevationStep_instance.
|
|
483
|
+
this.h6_1 = 3;
|
|
484
|
+
this.y1q_1 = this.v1q_1.p1p();
|
|
485
|
+
this.y1q_1 = PointPerDistance_instance.z1q(this.y1q_1, -1.0, 30.0);
|
|
486
|
+
if (this.w1q_1.h1q_1 && !(this.x1q_1 == null)) {
|
|
487
|
+
this.g6_1 = 1;
|
|
488
|
+
suspendResult = ElevationStep_instance.b1r(this.y1q_1, this.x1q_1, this);
|
|
483
489
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
484
490
|
return suspendResult;
|
|
485
491
|
}
|
|
486
492
|
continue $sm;
|
|
487
493
|
} else {
|
|
488
|
-
this.
|
|
494
|
+
this.g6_1 = 2;
|
|
489
495
|
continue $sm;
|
|
490
496
|
}
|
|
491
497
|
|
|
492
498
|
case 1:
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
499
|
+
this.y1q_1 = suspendResult;
|
|
500
|
+
this.g6_1 = 2;
|
|
495
501
|
continue $sm;
|
|
496
502
|
case 2:
|
|
497
|
-
this.
|
|
498
|
-
this.
|
|
499
|
-
var working = this.
|
|
500
|
-
if (this.
|
|
501
|
-
MaxSpeedComputer_instance.
|
|
503
|
+
this.y1q_1 = PointPerDistance_instance.z1q(this.y1q_1, 1.0, 2.0);
|
|
504
|
+
this.y1q_1 = ElevationStep_instance.c1r(this.y1q_1);
|
|
505
|
+
var working = this.v1q_1.t1p(this.v1q_1.k1p_1.i1p(this.y1q_1));
|
|
506
|
+
if (this.w1q_1.i1q_1 || this.w1q_1.j1q_1) {
|
|
507
|
+
MaxSpeedComputer_instance.i1r(working.k1p_1);
|
|
502
508
|
}
|
|
503
509
|
|
|
504
|
-
if (this.
|
|
505
|
-
this.
|
|
506
|
-
working = working.
|
|
510
|
+
if (this.w1q_1.j1q_1) {
|
|
511
|
+
this.y1q_1 = VirtualizeService_instance.k1r(working);
|
|
512
|
+
working = working.t1p(working.k1p_1.i1p(this.y1q_1));
|
|
507
513
|
}
|
|
508
514
|
|
|
509
|
-
if (this.
|
|
510
|
-
this.
|
|
515
|
+
if (this.w1q_1.k1q_1) {
|
|
516
|
+
this.y1q_1 = PointPerSecond_instance.l1r(this.y1q_1);
|
|
511
517
|
}
|
|
512
518
|
|
|
513
|
-
if (this.
|
|
514
|
-
this.
|
|
519
|
+
if (this.w1q_1.l1q_1.d1q_1) {
|
|
520
|
+
this.y1q_1 = PathSimplifier_instance.m1r(this.y1q_1, this.w1q_1.l1q_1.e1q_1, this.w1q_1.l1q_1.f1q_1);
|
|
515
521
|
}
|
|
516
522
|
|
|
517
|
-
return this.
|
|
523
|
+
return this.y1q_1;
|
|
518
524
|
case 3:
|
|
519
|
-
throw this.
|
|
525
|
+
throw this.j6_1;
|
|
520
526
|
}
|
|
521
527
|
} catch ($p) {
|
|
522
528
|
var e = $p;
|
|
523
|
-
if (this.
|
|
529
|
+
if (this.h6_1 === 3) {
|
|
524
530
|
throw e;
|
|
525
531
|
} else {
|
|
526
|
-
this.
|
|
527
|
-
this.
|
|
532
|
+
this.g6_1 = this.h6_1;
|
|
533
|
+
this.j6_1 = e;
|
|
528
534
|
}
|
|
529
535
|
}
|
|
530
536
|
while (true);
|
|
531
537
|
};
|
|
532
538
|
function Enhancer() {
|
|
533
539
|
}
|
|
534
|
-
protoOf(Enhancer).
|
|
540
|
+
protoOf(Enhancer).n1r = function (path) {
|
|
535
541
|
return new CoursePhysics(new Course(path), RhoProviderEstimate_instance, AeroProviderConstant_instance, WindProviderNone_instance, new PowerProviderConstant(280.0));
|
|
536
542
|
};
|
|
537
|
-
protoOf(Enhancer).
|
|
538
|
-
return this.
|
|
543
|
+
protoOf(Enhancer).o1r = function (path, elevationProvider, options, $completion) {
|
|
544
|
+
return this.p1r(this.n1r(path), options, elevationProvider, $completion);
|
|
539
545
|
};
|
|
540
|
-
protoOf(Enhancer).
|
|
546
|
+
protoOf(Enhancer).p1r = function (course, options, elevationProvider, $completion) {
|
|
541
547
|
var tmp = new $enhanceCourseCOROUTINE$(this, course, options, elevationProvider, $completion);
|
|
542
|
-
tmp.
|
|
543
|
-
tmp.
|
|
544
|
-
return tmp.
|
|
548
|
+
tmp.i6_1 = Unit_instance;
|
|
549
|
+
tmp.j6_1 = null;
|
|
550
|
+
return tmp.o6();
|
|
545
551
|
};
|
|
546
552
|
var Enhancer_instance;
|
|
547
553
|
function Enhancer_getInstance() {
|
|
@@ -549,15 +555,15 @@
|
|
|
549
555
|
}
|
|
550
556
|
function GpxDocument(name, tracks) {
|
|
551
557
|
name = name === VOID ? 'noname' : name;
|
|
552
|
-
this.
|
|
553
|
-
this.
|
|
558
|
+
this.q1r_1 = name;
|
|
559
|
+
this.r1r_1 = tracks;
|
|
554
560
|
}
|
|
555
561
|
protoOf(GpxDocument).toString = function () {
|
|
556
|
-
return 'GpxDocument(name=' + this.
|
|
562
|
+
return 'GpxDocument(name=' + this.q1r_1 + ', tracks=' + toString(this.r1r_1) + ')';
|
|
557
563
|
};
|
|
558
564
|
protoOf(GpxDocument).hashCode = function () {
|
|
559
|
-
var result = getStringHashCode(this.
|
|
560
|
-
result = imul(result, 31) + hashCode(this.
|
|
565
|
+
var result = getStringHashCode(this.q1r_1);
|
|
566
|
+
result = imul(result, 31) + hashCode(this.r1r_1) | 0;
|
|
561
567
|
return result;
|
|
562
568
|
};
|
|
563
569
|
protoOf(GpxDocument).equals = function (other) {
|
|
@@ -565,26 +571,26 @@
|
|
|
565
571
|
return true;
|
|
566
572
|
if (!(other instanceof GpxDocument))
|
|
567
573
|
return false;
|
|
568
|
-
if (!(this.
|
|
574
|
+
if (!(this.q1r_1 === other.q1r_1))
|
|
569
575
|
return false;
|
|
570
|
-
if (!equals(this.
|
|
576
|
+
if (!equals(this.r1r_1, other.r1r_1))
|
|
571
577
|
return false;
|
|
572
578
|
return true;
|
|
573
579
|
};
|
|
574
580
|
function GpxTrack(name, type, points) {
|
|
575
581
|
name = name === VOID ? null : name;
|
|
576
582
|
type = type === VOID ? null : type;
|
|
577
|
-
this.
|
|
578
|
-
this.
|
|
579
|
-
this.
|
|
583
|
+
this.s1r_1 = name;
|
|
584
|
+
this.t1r_1 = type;
|
|
585
|
+
this.u1r_1 = points;
|
|
580
586
|
}
|
|
581
587
|
protoOf(GpxTrack).toString = function () {
|
|
582
|
-
return 'GpxTrack(name=' + this.
|
|
588
|
+
return 'GpxTrack(name=' + this.s1r_1 + ', type=' + this.t1r_1 + ', points=' + toString(this.u1r_1) + ')';
|
|
583
589
|
};
|
|
584
590
|
protoOf(GpxTrack).hashCode = function () {
|
|
585
|
-
var result = this.
|
|
586
|
-
result = imul(result, 31) + (this.
|
|
587
|
-
result = imul(result, 31) + hashCode(this.
|
|
591
|
+
var result = this.s1r_1 == null ? 0 : getStringHashCode(this.s1r_1);
|
|
592
|
+
result = imul(result, 31) + (this.t1r_1 == null ? 0 : getStringHashCode(this.t1r_1)) | 0;
|
|
593
|
+
result = imul(result, 31) + hashCode(this.u1r_1) | 0;
|
|
588
594
|
return result;
|
|
589
595
|
};
|
|
590
596
|
protoOf(GpxTrack).equals = function (other) {
|
|
@@ -592,11 +598,11 @@
|
|
|
592
598
|
return true;
|
|
593
599
|
if (!(other instanceof GpxTrack))
|
|
594
600
|
return false;
|
|
595
|
-
if (!(this.
|
|
601
|
+
if (!(this.s1r_1 == other.s1r_1))
|
|
596
602
|
return false;
|
|
597
|
-
if (!(this.
|
|
603
|
+
if (!(this.t1r_1 == other.t1r_1))
|
|
598
604
|
return false;
|
|
599
|
-
if (!equals(this.
|
|
605
|
+
if (!equals(this.u1r_1, other.u1r_1))
|
|
600
606
|
return false;
|
|
601
607
|
return true;
|
|
602
608
|
};
|
|
@@ -607,27 +613,27 @@
|
|
|
607
613
|
cadence = cadence === VOID ? null : cadence;
|
|
608
614
|
temperatureC = temperatureC === VOID ? null : temperatureC;
|
|
609
615
|
powerW = powerW === VOID ? null : powerW;
|
|
610
|
-
this.
|
|
611
|
-
this.
|
|
612
|
-
this.
|
|
613
|
-
this.
|
|
614
|
-
this.
|
|
615
|
-
this.
|
|
616
|
-
this.
|
|
617
|
-
this.
|
|
616
|
+
this.v1r_1 = latitudeDeg;
|
|
617
|
+
this.w1r_1 = longitudeDeg;
|
|
618
|
+
this.x1r_1 = elevationM;
|
|
619
|
+
this.y1r_1 = timeEpochMs;
|
|
620
|
+
this.z1r_1 = heartRate;
|
|
621
|
+
this.a1s_1 = cadence;
|
|
622
|
+
this.b1s_1 = temperatureC;
|
|
623
|
+
this.c1s_1 = powerW;
|
|
618
624
|
}
|
|
619
625
|
protoOf(GpxTrackPoint).toString = function () {
|
|
620
|
-
return 'GpxTrackPoint(latitudeDeg=' + this.
|
|
626
|
+
return 'GpxTrackPoint(latitudeDeg=' + this.v1r_1 + ', longitudeDeg=' + this.w1r_1 + ', elevationM=' + this.x1r_1 + ', timeEpochMs=' + toString_0(this.y1r_1) + ', heartRate=' + this.z1r_1 + ', cadence=' + this.a1s_1 + ', temperatureC=' + this.b1s_1 + ', powerW=' + this.c1s_1 + ')';
|
|
621
627
|
};
|
|
622
628
|
protoOf(GpxTrackPoint).hashCode = function () {
|
|
623
|
-
var result = getNumberHashCode(this.
|
|
624
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
625
|
-
result = imul(result, 31) + (this.
|
|
626
|
-
result = imul(result, 31) + (this.
|
|
627
|
-
result = imul(result, 31) + (this.
|
|
628
|
-
result = imul(result, 31) + (this.
|
|
629
|
-
result = imul(result, 31) + (this.
|
|
630
|
-
result = imul(result, 31) + (this.
|
|
629
|
+
var result = getNumberHashCode(this.v1r_1);
|
|
630
|
+
result = imul(result, 31) + getNumberHashCode(this.w1r_1) | 0;
|
|
631
|
+
result = imul(result, 31) + (this.x1r_1 == null ? 0 : getNumberHashCode(this.x1r_1)) | 0;
|
|
632
|
+
result = imul(result, 31) + (this.y1r_1 == null ? 0 : this.y1r_1.hashCode()) | 0;
|
|
633
|
+
result = imul(result, 31) + (this.z1r_1 == null ? 0 : this.z1r_1) | 0;
|
|
634
|
+
result = imul(result, 31) + (this.a1s_1 == null ? 0 : this.a1s_1) | 0;
|
|
635
|
+
result = imul(result, 31) + (this.b1s_1 == null ? 0 : getNumberHashCode(this.b1s_1)) | 0;
|
|
636
|
+
result = imul(result, 31) + (this.c1s_1 == null ? 0 : getNumberHashCode(this.c1s_1)) | 0;
|
|
631
637
|
return result;
|
|
632
638
|
};
|
|
633
639
|
protoOf(GpxTrackPoint).equals = function (other) {
|
|
@@ -635,21 +641,21 @@
|
|
|
635
641
|
return true;
|
|
636
642
|
if (!(other instanceof GpxTrackPoint))
|
|
637
643
|
return false;
|
|
638
|
-
if (!equals(this.
|
|
644
|
+
if (!equals(this.v1r_1, other.v1r_1))
|
|
639
645
|
return false;
|
|
640
|
-
if (!equals(this.
|
|
646
|
+
if (!equals(this.w1r_1, other.w1r_1))
|
|
641
647
|
return false;
|
|
642
|
-
if (!equals(this.
|
|
648
|
+
if (!equals(this.x1r_1, other.x1r_1))
|
|
643
649
|
return false;
|
|
644
|
-
if (!equals(this.
|
|
650
|
+
if (!equals(this.y1r_1, other.y1r_1))
|
|
645
651
|
return false;
|
|
646
|
-
if (!(this.
|
|
652
|
+
if (!(this.z1r_1 == other.z1r_1))
|
|
647
653
|
return false;
|
|
648
|
-
if (!(this.
|
|
654
|
+
if (!(this.a1s_1 == other.a1s_1))
|
|
649
655
|
return false;
|
|
650
|
-
if (!equals(this.
|
|
656
|
+
if (!equals(this.b1s_1, other.b1s_1))
|
|
651
657
|
return false;
|
|
652
|
-
if (!equals(this.
|
|
658
|
+
if (!equals(this.c1s_1, other.c1s_1))
|
|
653
659
|
return false;
|
|
654
660
|
return true;
|
|
655
661
|
};
|
|
@@ -658,7 +664,7 @@
|
|
|
658
664
|
type = type === VOID ? 'cycling' : type;
|
|
659
665
|
// Inline function 'kotlin.collections.List' call
|
|
660
666
|
// Inline function 'kotlin.collections.MutableList' call
|
|
661
|
-
var size = _this__u8e3s4.
|
|
667
|
+
var size = _this__u8e3s4.d1s_1;
|
|
662
668
|
var list = ArrayList_init_$Create$(size);
|
|
663
669
|
// Inline function 'kotlin.repeat' call
|
|
664
670
|
var inductionVariable = 0;
|
|
@@ -666,10 +672,10 @@
|
|
|
666
672
|
do {
|
|
667
673
|
var index = inductionVariable;
|
|
668
674
|
inductionVariable = inductionVariable + 1 | 0;
|
|
669
|
-
var tmp = _this__u8e3s4.
|
|
670
|
-
var tmp_0 = _this__u8e3s4.
|
|
675
|
+
var tmp = _this__u8e3s4.f1s(index) * MathConstants_getInstance().yv_1;
|
|
676
|
+
var tmp_0 = _this__u8e3s4.g1s(index) * MathConstants_getInstance().yv_1;
|
|
671
677
|
// Inline function 'kotlin.takeUnless' call
|
|
672
|
-
var this_0 = _this__u8e3s4.
|
|
678
|
+
var this_0 = _this__u8e3s4.h1s(index);
|
|
673
679
|
var tmp_1;
|
|
674
680
|
if (!isNaN_0(this_0)) {
|
|
675
681
|
tmp_1 = this_0;
|
|
@@ -678,7 +684,7 @@
|
|
|
678
684
|
}
|
|
679
685
|
var tmp_2 = tmp_1;
|
|
680
686
|
// Inline function 'kotlin.takeIf' call
|
|
681
|
-
var this_1 = numberToLong(_this__u8e3s4.
|
|
687
|
+
var this_1 = numberToLong(_this__u8e3s4.i1s(index));
|
|
682
688
|
var tmp_3;
|
|
683
689
|
if (compare(this_1, new Long(0, 0)) > 0) {
|
|
684
690
|
tmp_3 = this_1;
|
|
@@ -687,7 +693,7 @@
|
|
|
687
693
|
}
|
|
688
694
|
var tmp_4 = tmp_3;
|
|
689
695
|
// Inline function 'kotlin.takeUnless' call
|
|
690
|
-
var this_2 = _this__u8e3s4.
|
|
696
|
+
var this_2 = _this__u8e3s4.j1s(index);
|
|
691
697
|
var tmp_5;
|
|
692
698
|
if (!(isNaN_0(this_2) || this_2 === 0.0)) {
|
|
693
699
|
tmp_5 = this_2;
|
|
@@ -697,7 +703,7 @@
|
|
|
697
703
|
var tmp0_safe_receiver = tmp_5;
|
|
698
704
|
var tmp_6 = tmp0_safe_receiver == null ? null : roundToInt(tmp0_safe_receiver);
|
|
699
705
|
// Inline function 'kotlin.takeUnless' call
|
|
700
|
-
var this_3 = _this__u8e3s4.
|
|
706
|
+
var this_3 = _this__u8e3s4.k1s(index);
|
|
701
707
|
var tmp_7;
|
|
702
708
|
if (!(isNaN_0(this_3) || this_3 === 0.0)) {
|
|
703
709
|
tmp_7 = this_3;
|
|
@@ -707,7 +713,7 @@
|
|
|
707
713
|
var tmp1_safe_receiver = tmp_7;
|
|
708
714
|
var tmp_8 = tmp1_safe_receiver == null ? null : roundToInt(tmp1_safe_receiver);
|
|
709
715
|
// Inline function 'kotlin.takeUnless' call
|
|
710
|
-
var this_4 = _this__u8e3s4.
|
|
716
|
+
var this_4 = _this__u8e3s4.l1s(index);
|
|
711
717
|
var tmp_9;
|
|
712
718
|
if (!(isNaN_0(this_4) || this_4 === 0.0)) {
|
|
713
719
|
tmp_9 = this_4;
|
|
@@ -716,7 +722,7 @@
|
|
|
716
722
|
}
|
|
717
723
|
var tmp_10 = tmp_9;
|
|
718
724
|
// Inline function 'kotlin.takeUnless' call
|
|
719
|
-
var this_5 = _this__u8e3s4.
|
|
725
|
+
var this_5 = _this__u8e3s4.m1s(index);
|
|
720
726
|
var tmp_11;
|
|
721
727
|
if (!(isNaN_0(this_5) || this_5 === 0.0)) {
|
|
722
728
|
tmp_11 = this_5;
|
|
@@ -725,7 +731,7 @@
|
|
|
725
731
|
}
|
|
726
732
|
var tmp$ret$15 = tmp_11;
|
|
727
733
|
var tmp$ret$4 = new GpxTrackPoint(tmp, tmp_0, tmp_2, tmp_4, tmp_6, tmp_8, tmp_10, tmp$ret$15);
|
|
728
|
-
list.
|
|
734
|
+
list.n(tmp$ret$4);
|
|
729
735
|
}
|
|
730
736
|
while (inductionVariable < size);
|
|
731
737
|
var points = list;
|
|
@@ -737,11 +743,11 @@
|
|
|
737
743
|
return new GpxDocument(name, listOf(toGpxTrack(_this__u8e3s4, trackName)));
|
|
738
744
|
}
|
|
739
745
|
function parseDocument($this, reader) {
|
|
740
|
-
while (reader.
|
|
741
|
-
var ev = reader.
|
|
746
|
+
while (reader.i()) {
|
|
747
|
+
var ev = reader.j();
|
|
742
748
|
if (ev.equals(EventType_START_ELEMENT_getInstance())) {
|
|
743
|
-
if (!(reader.
|
|
744
|
-
throw IllegalArgumentException_init_$Create$('Invalid GPX file: missing gpx root element (found ' + reader.
|
|
749
|
+
if (!(reader.u16() === 'gpx')) {
|
|
750
|
+
throw IllegalArgumentException_init_$Create$('Invalid GPX file: missing gpx root element (found ' + reader.u16() + ')');
|
|
745
751
|
}
|
|
746
752
|
return parseGpxRoot($this, reader);
|
|
747
753
|
}
|
|
@@ -752,18 +758,18 @@
|
|
|
752
758
|
var name = 'noname';
|
|
753
759
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
754
760
|
var tracks = ArrayList_init_$Create$_0();
|
|
755
|
-
while (reader.
|
|
756
|
-
var ev = reader.
|
|
757
|
-
switch (ev.
|
|
761
|
+
while (reader.i()) {
|
|
762
|
+
var ev = reader.j();
|
|
763
|
+
switch (ev.n1_1) {
|
|
758
764
|
case 1:
|
|
759
|
-
switch (reader.
|
|
765
|
+
switch (reader.u16()) {
|
|
760
766
|
case 'metadata':
|
|
761
767
|
var metaName = parseMetadataName($this, reader);
|
|
762
768
|
if (!(metaName == null))
|
|
763
769
|
name = metaName;
|
|
764
770
|
break;
|
|
765
771
|
case 'trk':
|
|
766
|
-
tracks.
|
|
772
|
+
tracks.n(parseTrack($this, reader));
|
|
767
773
|
break;
|
|
768
774
|
default:
|
|
769
775
|
skipElement($this, reader);
|
|
@@ -781,11 +787,11 @@
|
|
|
781
787
|
}
|
|
782
788
|
function parseMetadataName($this, reader) {
|
|
783
789
|
var name = null;
|
|
784
|
-
while (reader.
|
|
785
|
-
var ev = reader.
|
|
786
|
-
switch (ev.
|
|
790
|
+
while (reader.i()) {
|
|
791
|
+
var ev = reader.j();
|
|
792
|
+
switch (ev.n1_1) {
|
|
787
793
|
case 1:
|
|
788
|
-
if (reader.
|
|
794
|
+
if (reader.u16() === 'name' && name == null) {
|
|
789
795
|
// Inline function 'kotlin.text.trim' call
|
|
790
796
|
var this_0 = readElementText($this, reader);
|
|
791
797
|
// Inline function 'kotlin.text.ifEmpty' call
|
|
@@ -816,11 +822,11 @@
|
|
|
816
822
|
var type = null;
|
|
817
823
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
818
824
|
var points = ArrayList_init_$Create$_0();
|
|
819
|
-
while (reader.
|
|
820
|
-
var ev = reader.
|
|
821
|
-
switch (ev.
|
|
825
|
+
while (reader.i()) {
|
|
826
|
+
var ev = reader.j();
|
|
827
|
+
switch (ev.n1_1) {
|
|
822
828
|
case 1:
|
|
823
|
-
switch (reader.
|
|
829
|
+
switch (reader.u16()) {
|
|
824
830
|
case 'name':
|
|
825
831
|
// Inline function 'kotlin.text.trim' call
|
|
826
832
|
|
|
@@ -875,12 +881,12 @@
|
|
|
875
881
|
return new GpxTrack(name, type, points);
|
|
876
882
|
}
|
|
877
883
|
function parseTrackSegment($this, reader, accum) {
|
|
878
|
-
while (reader.
|
|
879
|
-
var ev = reader.
|
|
880
|
-
switch (ev.
|
|
884
|
+
while (reader.i()) {
|
|
885
|
+
var ev = reader.j();
|
|
886
|
+
switch (ev.n1_1) {
|
|
881
887
|
case 1:
|
|
882
|
-
if (reader.
|
|
883
|
-
accum.
|
|
888
|
+
if (reader.u16() === 'trkpt') {
|
|
889
|
+
accum.n(parseTrackPoint($this, reader));
|
|
884
890
|
} else {
|
|
885
891
|
skipElement($this, reader);
|
|
886
892
|
}
|
|
@@ -894,8 +900,8 @@
|
|
|
894
900
|
}
|
|
895
901
|
}
|
|
896
902
|
function parseTrackPoint($this, reader) {
|
|
897
|
-
var latStr = reader.
|
|
898
|
-
var lonStr = reader.
|
|
903
|
+
var latStr = reader.f17(null, 'lat');
|
|
904
|
+
var lonStr = reader.f17(null, 'lon');
|
|
899
905
|
var tmp;
|
|
900
906
|
// Inline function 'kotlin.text.isNullOrBlank' call
|
|
901
907
|
if (latStr == null || isBlank(latStr)) {
|
|
@@ -926,11 +932,11 @@
|
|
|
926
932
|
var elevation = null;
|
|
927
933
|
var timeMs = null;
|
|
928
934
|
var ext = new ExtensionsAccumulator();
|
|
929
|
-
while (reader.
|
|
930
|
-
var ev = reader.
|
|
931
|
-
switch (ev.
|
|
935
|
+
while (reader.i()) {
|
|
936
|
+
var ev = reader.j();
|
|
937
|
+
switch (ev.n1_1) {
|
|
932
938
|
case 1:
|
|
933
|
-
switch (reader.
|
|
939
|
+
switch (reader.u16()) {
|
|
934
940
|
case 'ele':
|
|
935
941
|
// Inline function 'kotlin.text.trim' call
|
|
936
942
|
|
|
@@ -964,19 +970,19 @@
|
|
|
964
970
|
|
|
965
971
|
break;
|
|
966
972
|
case 2:
|
|
967
|
-
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.
|
|
973
|
+
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.n1s_1, ext.o1s_1, ext.p1s_1, ext.q1s_1);
|
|
968
974
|
default:
|
|
969
975
|
break;
|
|
970
976
|
}
|
|
971
977
|
}
|
|
972
|
-
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.
|
|
978
|
+
return new GpxTrackPoint(lat, lon, elevation, timeMs, ext.n1s_1, ext.o1s_1, ext.p1s_1, ext.q1s_1);
|
|
973
979
|
}
|
|
974
980
|
function parseExtensions($this, reader, ext) {
|
|
975
|
-
while (reader.
|
|
976
|
-
var ev = reader.
|
|
977
|
-
switch (ev.
|
|
981
|
+
while (reader.i()) {
|
|
982
|
+
var ev = reader.j();
|
|
983
|
+
switch (ev.n1_1) {
|
|
978
984
|
case 1:
|
|
979
|
-
var ln = reader.
|
|
985
|
+
var ln = reader.u16();
|
|
980
986
|
// Inline function 'kotlin.text.lowercase' call
|
|
981
987
|
|
|
982
988
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -989,8 +995,8 @@
|
|
|
989
995
|
else {
|
|
990
996
|
// Inline function 'kotlin.let' call
|
|
991
997
|
var tmp = ext;
|
|
992
|
-
var tmp0_elvis_lhs = ext.
|
|
993
|
-
tmp.
|
|
998
|
+
var tmp0_elvis_lhs = ext.q1s_1;
|
|
999
|
+
tmp.q1s_1 = tmp0_elvis_lhs == null ? tmp2_safe_receiver : tmp0_elvis_lhs;
|
|
994
1000
|
}
|
|
995
1001
|
|
|
996
1002
|
break;
|
|
@@ -1001,8 +1007,8 @@
|
|
|
1001
1007
|
null;
|
|
1002
1008
|
else {
|
|
1003
1009
|
// Inline function 'kotlin.let' call
|
|
1004
|
-
if (ext.
|
|
1005
|
-
ext.
|
|
1010
|
+
if (ext.n1s_1 == null)
|
|
1011
|
+
ext.n1s_1 = numberToInt(tmp3_safe_receiver);
|
|
1006
1012
|
}
|
|
1007
1013
|
|
|
1008
1014
|
break;
|
|
@@ -1013,8 +1019,8 @@
|
|
|
1013
1019
|
null;
|
|
1014
1020
|
else {
|
|
1015
1021
|
// Inline function 'kotlin.let' call
|
|
1016
|
-
if (ext.
|
|
1017
|
-
ext.
|
|
1022
|
+
if (ext.o1s_1 == null)
|
|
1023
|
+
ext.o1s_1 = numberToInt(tmp4_safe_receiver);
|
|
1018
1024
|
}
|
|
1019
1025
|
|
|
1020
1026
|
break;
|
|
@@ -1027,8 +1033,8 @@
|
|
|
1027
1033
|
else {
|
|
1028
1034
|
// Inline function 'kotlin.let' call
|
|
1029
1035
|
var tmp_0 = ext;
|
|
1030
|
-
var tmp0_elvis_lhs_0 = ext.
|
|
1031
|
-
tmp_0.
|
|
1036
|
+
var tmp0_elvis_lhs_0 = ext.p1s_1;
|
|
1037
|
+
tmp_0.p1s_1 = tmp0_elvis_lhs_0 == null ? tmp5_safe_receiver : tmp0_elvis_lhs_0;
|
|
1032
1038
|
}
|
|
1033
1039
|
|
|
1034
1040
|
break;
|
|
@@ -1047,13 +1053,13 @@
|
|
|
1047
1053
|
}
|
|
1048
1054
|
function readElementText($this, reader) {
|
|
1049
1055
|
var sb = StringBuilder_init_$Create$();
|
|
1050
|
-
while (reader.
|
|
1051
|
-
var ev = reader.
|
|
1052
|
-
switch (ev.
|
|
1056
|
+
while (reader.i()) {
|
|
1057
|
+
var ev = reader.j();
|
|
1058
|
+
switch (ev.n1_1) {
|
|
1053
1059
|
case 4:
|
|
1054
1060
|
case 5:
|
|
1055
1061
|
case 9:
|
|
1056
|
-
sb.
|
|
1062
|
+
sb.u5(reader.z16());
|
|
1057
1063
|
break;
|
|
1058
1064
|
case 1:
|
|
1059
1065
|
skipElement($this, reader);
|
|
@@ -1074,8 +1080,8 @@
|
|
|
1074
1080
|
}
|
|
1075
1081
|
function skipElement($this, reader) {
|
|
1076
1082
|
var depth = 1;
|
|
1077
|
-
while (reader.
|
|
1078
|
-
switch (reader.
|
|
1083
|
+
while (reader.i() && depth > 0) {
|
|
1084
|
+
switch (reader.j().n1_1) {
|
|
1079
1085
|
case 1:
|
|
1080
1086
|
depth = depth + 1 | 0;
|
|
1081
1087
|
break;
|
|
@@ -1090,7 +1096,7 @@
|
|
|
1090
1096
|
function parseTimeIsoToMs($this, text) {
|
|
1091
1097
|
var tmp;
|
|
1092
1098
|
try {
|
|
1093
|
-
tmp = Companion_getInstance().
|
|
1099
|
+
tmp = Companion_getInstance().wc(text).ad();
|
|
1094
1100
|
} catch ($p) {
|
|
1095
1101
|
var tmp_0;
|
|
1096
1102
|
if ($p instanceof IllegalArgumentException) {
|
|
@@ -1113,22 +1119,22 @@
|
|
|
1113
1119
|
cadence = cadence === VOID ? null : cadence;
|
|
1114
1120
|
temperatureC = temperatureC === VOID ? null : temperatureC;
|
|
1115
1121
|
powerW = powerW === VOID ? null : powerW;
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1118
|
-
this.
|
|
1119
|
-
this.
|
|
1122
|
+
this.n1s_1 = heartRate;
|
|
1123
|
+
this.o1s_1 = cadence;
|
|
1124
|
+
this.p1s_1 = temperatureC;
|
|
1125
|
+
this.q1s_1 = powerW;
|
|
1120
1126
|
}
|
|
1121
1127
|
function GpxParser() {
|
|
1122
1128
|
}
|
|
1123
|
-
protoOf(GpxParser).
|
|
1129
|
+
protoOf(GpxParser).r1s = function (xml) {
|
|
1124
1130
|
var tmp;
|
|
1125
1131
|
try {
|
|
1126
|
-
tmp = get_xmlStreaming().
|
|
1132
|
+
tmp = get_xmlStreaming().z17(xml);
|
|
1127
1133
|
} catch ($p) {
|
|
1128
1134
|
var tmp_0;
|
|
1129
1135
|
if ($p instanceof XmlException) {
|
|
1130
1136
|
var e = $p;
|
|
1131
|
-
throw IllegalArgumentException_init_$Create$_0('Invalid GPX XML: ' + e.
|
|
1137
|
+
throw IllegalArgumentException_init_$Create$_0('Invalid GPX XML: ' + e.e(), e);
|
|
1132
1138
|
} else {
|
|
1133
1139
|
throw $p;
|
|
1134
1140
|
}
|
|
@@ -1137,17 +1143,17 @@
|
|
|
1137
1143
|
var tmp_1;
|
|
1138
1144
|
try {
|
|
1139
1145
|
tmp_1 = parseDocument(this, reader);
|
|
1140
|
-
} catch ($
|
|
1146
|
+
} catch ($p_0) {
|
|
1141
1147
|
var tmp_2;
|
|
1142
|
-
if ($
|
|
1143
|
-
var e_0 = $
|
|
1144
|
-
throw IllegalArgumentException_init_$Create$_0('Invalid GPX XML: ' + e_0.
|
|
1148
|
+
if ($p_0 instanceof XmlException) {
|
|
1149
|
+
var e_0 = $p_0;
|
|
1150
|
+
throw IllegalArgumentException_init_$Create$_0('Invalid GPX XML: ' + e_0.e(), e_0);
|
|
1145
1151
|
} else {
|
|
1146
|
-
throw $
|
|
1152
|
+
throw $p_0;
|
|
1147
1153
|
}
|
|
1148
1154
|
}
|
|
1149
1155
|
finally {
|
|
1150
|
-
reader.
|
|
1156
|
+
reader.h17();
|
|
1151
1157
|
}
|
|
1152
1158
|
return tmp_1;
|
|
1153
1159
|
};
|
|
@@ -1156,7 +1162,7 @@
|
|
|
1156
1162
|
return GpxParser_instance;
|
|
1157
1163
|
}
|
|
1158
1164
|
function firstTrackAsPath(_this__u8e3s4) {
|
|
1159
|
-
var tmp0_elvis_lhs = firstOrNull(_this__u8e3s4.
|
|
1165
|
+
var tmp0_elvis_lhs = firstOrNull(_this__u8e3s4.r1r_1);
|
|
1160
1166
|
var tmp;
|
|
1161
1167
|
if (tmp0_elvis_lhs == null) {
|
|
1162
1168
|
// Inline function 'kotlin.error' call
|
|
@@ -1169,182 +1175,182 @@
|
|
|
1169
1175
|
return toPath(track);
|
|
1170
1176
|
}
|
|
1171
1177
|
function toPath(_this__u8e3s4) {
|
|
1172
|
-
var n = _this__u8e3s4.
|
|
1178
|
+
var n = _this__u8e3s4.u1r_1.k();
|
|
1173
1179
|
var path = new Path(n);
|
|
1174
|
-
var iterator = _this__u8e3s4.
|
|
1180
|
+
var iterator = _this__u8e3s4.u1r_1.h();
|
|
1175
1181
|
var index = 0;
|
|
1176
|
-
while (iterator.
|
|
1182
|
+
while (iterator.i()) {
|
|
1177
1183
|
var i = index;
|
|
1178
1184
|
index = index + 1 | 0;
|
|
1179
|
-
var p = iterator.
|
|
1180
|
-
path.
|
|
1181
|
-
path.
|
|
1182
|
-
var tmp0_elvis_lhs = p.
|
|
1183
|
-
path.
|
|
1184
|
-
var tmp1_elvis_lhs = p.
|
|
1185
|
-
path.
|
|
1186
|
-
var tmp2_safe_receiver = p.
|
|
1185
|
+
var p = iterator.j();
|
|
1186
|
+
path.s1s(i, p.v1r_1 * MathConstants_getInstance().xv_1);
|
|
1187
|
+
path.t1s(i, p.w1r_1 * MathConstants_getInstance().xv_1);
|
|
1188
|
+
var tmp0_elvis_lhs = p.x1r_1;
|
|
1189
|
+
path.u1s(i, tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
|
|
1190
|
+
var tmp1_elvis_lhs = p.y1r_1;
|
|
1191
|
+
path.v1s(i, toNumber(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
|
|
1192
|
+
var tmp2_safe_receiver = p.c1s_1;
|
|
1187
1193
|
if (tmp2_safe_receiver == null)
|
|
1188
1194
|
null;
|
|
1189
1195
|
else {
|
|
1190
1196
|
// Inline function 'kotlin.let' call
|
|
1191
|
-
path.
|
|
1197
|
+
path.w1s(i, tmp2_safe_receiver);
|
|
1192
1198
|
}
|
|
1193
|
-
var tmp3_safe_receiver = p.
|
|
1199
|
+
var tmp3_safe_receiver = p.z1r_1;
|
|
1194
1200
|
if (tmp3_safe_receiver == null)
|
|
1195
1201
|
null;
|
|
1196
1202
|
else {
|
|
1197
1203
|
// Inline function 'kotlin.let' call
|
|
1198
|
-
path.
|
|
1204
|
+
path.x1s(i, tmp3_safe_receiver);
|
|
1199
1205
|
}
|
|
1200
|
-
var tmp4_safe_receiver = p.
|
|
1206
|
+
var tmp4_safe_receiver = p.a1s_1;
|
|
1201
1207
|
if (tmp4_safe_receiver == null)
|
|
1202
1208
|
null;
|
|
1203
1209
|
else {
|
|
1204
1210
|
// Inline function 'kotlin.let' call
|
|
1205
|
-
path.
|
|
1211
|
+
path.y1s(i, tmp4_safe_receiver);
|
|
1206
1212
|
}
|
|
1207
|
-
var tmp5_safe_receiver = p.
|
|
1213
|
+
var tmp5_safe_receiver = p.b1s_1;
|
|
1208
1214
|
if (tmp5_safe_receiver == null)
|
|
1209
1215
|
null;
|
|
1210
1216
|
else {
|
|
1211
1217
|
// Inline function 'kotlin.let' call
|
|
1212
|
-
path.
|
|
1218
|
+
path.z1s(i, tmp5_safe_receiver);
|
|
1213
1219
|
}
|
|
1214
1220
|
}
|
|
1215
|
-
path.
|
|
1221
|
+
path.j1t();
|
|
1216
1222
|
return path;
|
|
1217
1223
|
}
|
|
1218
1224
|
function writeDocument($this, w, document) {
|
|
1219
|
-
w.
|
|
1220
|
-
w.
|
|
1221
|
-
w.
|
|
1222
|
-
w.
|
|
1223
|
-
w.
|
|
1224
|
-
w.
|
|
1225
|
-
w.
|
|
1226
|
-
w.
|
|
1227
|
-
w.
|
|
1228
|
-
w.
|
|
1229
|
-
writeMetadata($this, w, document.
|
|
1230
|
-
var _iterator__ex2g4s = document.
|
|
1231
|
-
while (_iterator__ex2g4s.
|
|
1232
|
-
var track = _iterator__ex2g4s.
|
|
1225
|
+
w.z18('', 'http://www.topografix.com/GPX/1/1');
|
|
1226
|
+
w.z18('xsi', 'http://www.w3.org/2001/XMLSchema-instance');
|
|
1227
|
+
w.z18('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
|
|
1228
|
+
w.b19('http://www.topografix.com/GPX/1/1', 'gpx', '');
|
|
1229
|
+
w.d19(null, 'version', null, '1.1');
|
|
1230
|
+
w.d19(null, 'creator', null, '@glandais/vcyclist');
|
|
1231
|
+
w.a19('', 'http://www.topografix.com/GPX/1/1');
|
|
1232
|
+
w.a19('xsi', 'http://www.w3.org/2001/XMLSchema-instance');
|
|
1233
|
+
w.a19('gpxtpx', 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1');
|
|
1234
|
+
w.d19('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation', 'xsi', 'http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd');
|
|
1235
|
+
writeMetadata($this, w, document.q1r_1);
|
|
1236
|
+
var _iterator__ex2g4s = document.r1r_1.h();
|
|
1237
|
+
while (_iterator__ex2g4s.i()) {
|
|
1238
|
+
var track = _iterator__ex2g4s.j();
|
|
1233
1239
|
writeTrack($this, w, track);
|
|
1234
1240
|
}
|
|
1235
|
-
w.
|
|
1241
|
+
w.g19('http://www.topografix.com/GPX/1/1', 'gpx', '');
|
|
1236
1242
|
}
|
|
1237
1243
|
function writeMetadata($this, w, name) {
|
|
1238
|
-
w.
|
|
1244
|
+
w.b19('http://www.topografix.com/GPX/1/1', 'metadata', '');
|
|
1239
1245
|
writeSimpleText($this, w, 'name', name);
|
|
1240
|
-
w.
|
|
1246
|
+
w.g19('http://www.topografix.com/GPX/1/1', 'metadata', '');
|
|
1241
1247
|
}
|
|
1242
1248
|
function writeTrack($this, w, track) {
|
|
1243
|
-
w.
|
|
1244
|
-
var tmp0_safe_receiver = track.
|
|
1249
|
+
w.b19('http://www.topografix.com/GPX/1/1', 'trk', '');
|
|
1250
|
+
var tmp0_safe_receiver = track.s1r_1;
|
|
1245
1251
|
if (tmp0_safe_receiver == null)
|
|
1246
1252
|
null;
|
|
1247
1253
|
else {
|
|
1248
1254
|
// Inline function 'kotlin.let' call
|
|
1249
1255
|
writeSimpleText(GpxWriter_instance, w, 'name', tmp0_safe_receiver);
|
|
1250
1256
|
}
|
|
1251
|
-
var tmp1_safe_receiver = track.
|
|
1257
|
+
var tmp1_safe_receiver = track.t1r_1;
|
|
1252
1258
|
if (tmp1_safe_receiver == null)
|
|
1253
1259
|
null;
|
|
1254
1260
|
else {
|
|
1255
1261
|
// Inline function 'kotlin.let' call
|
|
1256
1262
|
writeSimpleText(GpxWriter_instance, w, 'type', tmp1_safe_receiver);
|
|
1257
1263
|
}
|
|
1258
|
-
w.
|
|
1259
|
-
var _iterator__ex2g4s = track.
|
|
1260
|
-
while (_iterator__ex2g4s.
|
|
1261
|
-
var p = _iterator__ex2g4s.
|
|
1264
|
+
w.b19('http://www.topografix.com/GPX/1/1', 'trkseg', '');
|
|
1265
|
+
var _iterator__ex2g4s = track.u1r_1.h();
|
|
1266
|
+
while (_iterator__ex2g4s.i()) {
|
|
1267
|
+
var p = _iterator__ex2g4s.j();
|
|
1262
1268
|
writeTrackPoint($this, w, p);
|
|
1263
1269
|
}
|
|
1264
|
-
w.
|
|
1265
|
-
w.
|
|
1270
|
+
w.g19('http://www.topografix.com/GPX/1/1', 'trkseg', '');
|
|
1271
|
+
w.g19('http://www.topografix.com/GPX/1/1', 'trk', '');
|
|
1266
1272
|
}
|
|
1267
1273
|
function writeTrackPoint($this, w, p) {
|
|
1268
|
-
w.
|
|
1269
|
-
w.
|
|
1270
|
-
w.
|
|
1271
|
-
var tmp0_safe_receiver = p.
|
|
1274
|
+
w.b19('http://www.topografix.com/GPX/1/1', 'trkpt', '');
|
|
1275
|
+
w.d19(null, 'lat', null, p.v1r_1.toString());
|
|
1276
|
+
w.d19(null, 'lon', null, p.w1r_1.toString());
|
|
1277
|
+
var tmp0_safe_receiver = p.y1r_1;
|
|
1272
1278
|
if (tmp0_safe_receiver == null)
|
|
1273
1279
|
null;
|
|
1274
1280
|
else {
|
|
1275
1281
|
// Inline function 'kotlin.let' call
|
|
1276
|
-
writeSimpleText(GpxWriter_instance, w, 'time', Companion_getInstance().
|
|
1282
|
+
writeSimpleText(GpxWriter_instance, w, 'time', Companion_getInstance().tc(tmp0_safe_receiver).toString());
|
|
1277
1283
|
}
|
|
1278
|
-
var tmp1_safe_receiver = p.
|
|
1284
|
+
var tmp1_safe_receiver = p.x1r_1;
|
|
1279
1285
|
if (tmp1_safe_receiver == null)
|
|
1280
1286
|
null;
|
|
1281
1287
|
else {
|
|
1282
1288
|
// Inline function 'kotlin.let' call
|
|
1283
1289
|
writeSimpleText(GpxWriter_instance, w, 'ele', tmp1_safe_receiver.toString());
|
|
1284
1290
|
}
|
|
1285
|
-
var hasGarminExt = !(p.
|
|
1286
|
-
var hasPower = !(p.
|
|
1291
|
+
var hasGarminExt = !(p.z1r_1 == null) || !(p.a1s_1 == null) || !(p.b1s_1 == null);
|
|
1292
|
+
var hasPower = !(p.c1s_1 == null);
|
|
1287
1293
|
if (hasGarminExt || hasPower) {
|
|
1288
|
-
w.
|
|
1294
|
+
w.b19('http://www.topografix.com/GPX/1/1', 'extensions', '');
|
|
1289
1295
|
if (hasPower) {
|
|
1290
|
-
writeSimpleText($this, w, 'power', p.
|
|
1296
|
+
writeSimpleText($this, w, 'power', p.c1s_1.toString());
|
|
1291
1297
|
}
|
|
1292
1298
|
if (hasGarminExt) {
|
|
1293
|
-
w.
|
|
1294
|
-
var tmp2_safe_receiver = p.
|
|
1299
|
+
w.b19('http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'TrackPointExtension', 'gpxtpx');
|
|
1300
|
+
var tmp2_safe_receiver = p.z1r_1;
|
|
1295
1301
|
if (tmp2_safe_receiver == null)
|
|
1296
1302
|
null;
|
|
1297
1303
|
else {
|
|
1298
1304
|
// Inline function 'kotlin.let' call
|
|
1299
1305
|
writeNamespaced(GpxWriter_instance, w, 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'hr', 'gpxtpx', tmp2_safe_receiver.toString());
|
|
1300
1306
|
}
|
|
1301
|
-
var tmp3_safe_receiver = p.
|
|
1307
|
+
var tmp3_safe_receiver = p.a1s_1;
|
|
1302
1308
|
if (tmp3_safe_receiver == null)
|
|
1303
1309
|
null;
|
|
1304
1310
|
else {
|
|
1305
1311
|
// Inline function 'kotlin.let' call
|
|
1306
1312
|
writeNamespaced(GpxWriter_instance, w, 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'cad', 'gpxtpx', tmp3_safe_receiver.toString());
|
|
1307
1313
|
}
|
|
1308
|
-
var tmp4_safe_receiver = p.
|
|
1314
|
+
var tmp4_safe_receiver = p.b1s_1;
|
|
1309
1315
|
if (tmp4_safe_receiver == null)
|
|
1310
1316
|
null;
|
|
1311
1317
|
else {
|
|
1312
1318
|
// Inline function 'kotlin.let' call
|
|
1313
1319
|
writeNamespaced(GpxWriter_instance, w, 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'atemp', 'gpxtpx', tmp4_safe_receiver.toString());
|
|
1314
1320
|
}
|
|
1315
|
-
w.
|
|
1321
|
+
w.g19('http://www.garmin.com/xmlschemas/TrackPointExtension/v1', 'TrackPointExtension', 'gpxtpx');
|
|
1316
1322
|
}
|
|
1317
|
-
w.
|
|
1323
|
+
w.g19('http://www.topografix.com/GPX/1/1', 'extensions', '');
|
|
1318
1324
|
}
|
|
1319
|
-
w.
|
|
1325
|
+
w.g19('http://www.topografix.com/GPX/1/1', 'trkpt', '');
|
|
1320
1326
|
}
|
|
1321
1327
|
function writeSimpleText($this, w, localName, text) {
|
|
1322
|
-
w.
|
|
1323
|
-
w.
|
|
1324
|
-
w.
|
|
1328
|
+
w.b19('http://www.topografix.com/GPX/1/1', localName, '');
|
|
1329
|
+
w.c19(text);
|
|
1330
|
+
w.g19('http://www.topografix.com/GPX/1/1', localName, '');
|
|
1325
1331
|
}
|
|
1326
1332
|
function writeNamespaced($this, w, namespace, localName, prefix, text) {
|
|
1327
|
-
w.
|
|
1328
|
-
w.
|
|
1329
|
-
w.
|
|
1333
|
+
w.b19(namespace, localName, prefix);
|
|
1334
|
+
w.c19(text);
|
|
1335
|
+
w.g19(namespace, localName, prefix);
|
|
1330
1336
|
}
|
|
1331
1337
|
function GpxWriter() {
|
|
1332
|
-
this.
|
|
1333
|
-
this.
|
|
1334
|
-
this.
|
|
1335
|
-
this.
|
|
1336
|
-
this.
|
|
1337
|
-
this.
|
|
1338
|
-
this.
|
|
1339
|
-
}
|
|
1340
|
-
protoOf(GpxWriter).
|
|
1338
|
+
this.k1t_1 = 'http://www.topografix.com/GPX/1/1';
|
|
1339
|
+
this.l1t_1 = 'http://www.w3.org/2001/XMLSchema-instance';
|
|
1340
|
+
this.m1t_1 = 'http://www.garmin.com/xmlschemas/TrackPointExtension/v1';
|
|
1341
|
+
this.n1t_1 = 'xsi';
|
|
1342
|
+
this.o1t_1 = 'gpxtpx';
|
|
1343
|
+
this.p1t_1 = 'http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd';
|
|
1344
|
+
this.q1t_1 = '@glandais/vcyclist';
|
|
1345
|
+
}
|
|
1346
|
+
protoOf(GpxWriter).r1t = function (document) {
|
|
1341
1347
|
var out = StringBuilder_init_$Create$();
|
|
1342
|
-
out.
|
|
1348
|
+
out.u5('<?xml version="1.0" encoding="UTF-8"?>\n');
|
|
1343
1349
|
var writer = newGenericWriter(get_xmlStreaming(), out, false, XmlDeclMode_None_getInstance());
|
|
1344
1350
|
try {
|
|
1345
1351
|
writeDocument(this, writer, document);
|
|
1346
1352
|
}finally {
|
|
1347
|
-
writer.
|
|
1353
|
+
writer.h17();
|
|
1348
1354
|
}
|
|
1349
1355
|
return out.toString();
|
|
1350
1356
|
};
|
|
@@ -1353,17 +1359,17 @@
|
|
|
1353
1359
|
return GpxWriter_instance;
|
|
1354
1360
|
}
|
|
1355
1361
|
function copyAllSlots($this, source) {
|
|
1356
|
-
var out = new Path(source.
|
|
1362
|
+
var out = new Path(source.d1s_1);
|
|
1357
1363
|
var inductionVariable = 0;
|
|
1358
|
-
var last = source.
|
|
1364
|
+
var last = source.d1s_1;
|
|
1359
1365
|
if (inductionVariable < last)
|
|
1360
1366
|
do {
|
|
1361
1367
|
var i = inductionVariable;
|
|
1362
1368
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1363
|
-
var _iterator__ex2g4s = get_entries().
|
|
1364
|
-
while (_iterator__ex2g4s.
|
|
1365
|
-
var field = _iterator__ex2g4s.
|
|
1366
|
-
out.
|
|
1369
|
+
var _iterator__ex2g4s = get_entries().h();
|
|
1370
|
+
while (_iterator__ex2g4s.i()) {
|
|
1371
|
+
var field = _iterator__ex2g4s.j();
|
|
1372
|
+
out.t1t(i, field, source.s1t(i, field));
|
|
1367
1373
|
}
|
|
1368
1374
|
}
|
|
1369
1375
|
while (inductionVariable < last);
|
|
@@ -1371,33 +1377,33 @@
|
|
|
1371
1377
|
}
|
|
1372
1378
|
function $fixElevationCOROUTINE$(_this__u8e3s4, source, provider, resultContinuation) {
|
|
1373
1379
|
CoroutineImpl.call(this, resultContinuation);
|
|
1374
|
-
this.
|
|
1375
|
-
this.
|
|
1376
|
-
this.
|
|
1380
|
+
this.c1u_1 = _this__u8e3s4;
|
|
1381
|
+
this.d1u_1 = source;
|
|
1382
|
+
this.e1u_1 = provider;
|
|
1377
1383
|
}
|
|
1378
|
-
protoOf($fixElevationCOROUTINE$).
|
|
1379
|
-
var suspendResult = this.
|
|
1384
|
+
protoOf($fixElevationCOROUTINE$).o6 = function () {
|
|
1385
|
+
var suspendResult = this.i6_1;
|
|
1380
1386
|
$sm: do
|
|
1381
1387
|
try {
|
|
1382
|
-
var tmp = this.
|
|
1388
|
+
var tmp = this.g6_1;
|
|
1383
1389
|
switch (tmp) {
|
|
1384
1390
|
case 0:
|
|
1385
|
-
this.
|
|
1386
|
-
if (this.
|
|
1391
|
+
this.h6_1 = 2;
|
|
1392
|
+
if (this.d1u_1.d1s_1 === 0)
|
|
1387
1393
|
return new Path(0);
|
|
1388
|
-
var size = this.
|
|
1394
|
+
var size = this.d1u_1.d1s_1;
|
|
1389
1395
|
var list = ArrayList_init_$Create$(size);
|
|
1390
1396
|
var inductionVariable = 0;
|
|
1391
1397
|
if (inductionVariable < size)
|
|
1392
1398
|
do {
|
|
1393
1399
|
var index = inductionVariable;
|
|
1394
1400
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1395
|
-
list.
|
|
1401
|
+
list.n(new LatLon(this.d1u_1.f1s(index) * MathConstants_getInstance().yv_1, this.d1u_1.g1s(index) * MathConstants_getInstance().yv_1));
|
|
1396
1402
|
}
|
|
1397
1403
|
while (inductionVariable < size);
|
|
1398
1404
|
var coords = list;
|
|
1399
|
-
this.
|
|
1400
|
-
suspendResult = this.
|
|
1405
|
+
this.g6_1 = 1;
|
|
1406
|
+
suspendResult = this.e1u_1.xz(coords, VOID, this);
|
|
1401
1407
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1402
1408
|
return suspendResult;
|
|
1403
1409
|
}
|
|
@@ -1405,47 +1411,47 @@
|
|
|
1405
1411
|
continue $sm;
|
|
1406
1412
|
case 1:
|
|
1407
1413
|
var corrected = suspendResult;
|
|
1408
|
-
var out = copyAllSlots(this.
|
|
1414
|
+
var out = copyAllSlots(this.c1u_1, this.d1u_1);
|
|
1409
1415
|
var inductionVariable_0 = 0;
|
|
1410
|
-
var last = out.
|
|
1416
|
+
var last = out.d1s_1;
|
|
1411
1417
|
if (inductionVariable_0 < last)
|
|
1412
1418
|
do {
|
|
1413
1419
|
var i = inductionVariable_0;
|
|
1414
1420
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1415
|
-
out.
|
|
1421
|
+
out.u1s(i, corrected.l(i).cw());
|
|
1416
1422
|
}
|
|
1417
1423
|
while (inductionVariable_0 < last);
|
|
1418
|
-
out.
|
|
1424
|
+
out.j1t();
|
|
1419
1425
|
return out;
|
|
1420
1426
|
case 2:
|
|
1421
|
-
throw this.
|
|
1427
|
+
throw this.j6_1;
|
|
1422
1428
|
}
|
|
1423
1429
|
} catch ($p) {
|
|
1424
1430
|
var e = $p;
|
|
1425
|
-
if (this.
|
|
1431
|
+
if (this.h6_1 === 2) {
|
|
1426
1432
|
throw e;
|
|
1427
1433
|
} else {
|
|
1428
|
-
this.
|
|
1429
|
-
this.
|
|
1434
|
+
this.g6_1 = this.h6_1;
|
|
1435
|
+
this.j6_1 = e;
|
|
1430
1436
|
}
|
|
1431
1437
|
}
|
|
1432
1438
|
while (true);
|
|
1433
1439
|
};
|
|
1434
1440
|
function ElevationStep() {
|
|
1435
|
-
this.
|
|
1441
|
+
this.a1r_1 = 150.0;
|
|
1436
1442
|
}
|
|
1437
|
-
protoOf(ElevationStep).
|
|
1443
|
+
protoOf(ElevationStep).b1r = function (source, provider, $completion) {
|
|
1438
1444
|
var tmp = new $fixElevationCOROUTINE$(this, source, provider, $completion);
|
|
1439
|
-
tmp.
|
|
1440
|
-
tmp.
|
|
1441
|
-
return tmp.
|
|
1445
|
+
tmp.i6_1 = Unit_instance;
|
|
1446
|
+
tmp.j6_1 = null;
|
|
1447
|
+
return tmp.o6();
|
|
1442
1448
|
};
|
|
1443
|
-
protoOf(ElevationStep).
|
|
1444
|
-
if (source.
|
|
1449
|
+
protoOf(ElevationStep).f1u = function (source, windowM) {
|
|
1450
|
+
if (source.d1s_1 === 0)
|
|
1445
1451
|
return new Path(0);
|
|
1446
1452
|
// Inline function 'kotlin.collections.List' call
|
|
1447
1453
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1448
|
-
var size = source.
|
|
1454
|
+
var size = source.d1s_1;
|
|
1449
1455
|
var list = ArrayList_init_$Create$(size);
|
|
1450
1456
|
// Inline function 'kotlin.repeat' call
|
|
1451
1457
|
var inductionVariable = 0;
|
|
@@ -1453,204 +1459,207 @@
|
|
|
1453
1459
|
do {
|
|
1454
1460
|
var index = inductionVariable;
|
|
1455
1461
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1456
|
-
var tmp$ret$4 = source.
|
|
1457
|
-
list.
|
|
1462
|
+
var tmp$ret$4 = source.g1u(index);
|
|
1463
|
+
list.n(tmp$ret$4);
|
|
1458
1464
|
}
|
|
1459
1465
|
while (inductionVariable < size);
|
|
1460
1466
|
var coords = list;
|
|
1461
|
-
var smoothed = ElevationSmoother_instance.
|
|
1467
|
+
var smoothed = ElevationSmoother_instance.rv(coords, windowM);
|
|
1462
1468
|
var out = copyAllSlots(this, source);
|
|
1463
1469
|
var inductionVariable_0 = 0;
|
|
1464
|
-
var last = out.
|
|
1470
|
+
var last = out.d1s_1;
|
|
1465
1471
|
if (inductionVariable_0 < last)
|
|
1466
1472
|
do {
|
|
1467
1473
|
var i = inductionVariable_0;
|
|
1468
1474
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1469
|
-
out.
|
|
1475
|
+
out.u1s(i, smoothed.l(i).cw());
|
|
1470
1476
|
}
|
|
1471
1477
|
while (inductionVariable_0 < last);
|
|
1472
|
-
out.
|
|
1478
|
+
out.j1t();
|
|
1473
1479
|
return out;
|
|
1474
1480
|
};
|
|
1475
|
-
protoOf(ElevationStep).
|
|
1481
|
+
protoOf(ElevationStep).c1r = function (source, windowM, $super) {
|
|
1476
1482
|
windowM = windowM === VOID ? 150.0 : windowM;
|
|
1477
|
-
return $super === VOID ? this.
|
|
1483
|
+
return $super === VOID ? this.f1u(source, windowM) : $super.f1u.call(this, source, windowM);
|
|
1478
1484
|
};
|
|
1479
1485
|
var ElevationStep_instance;
|
|
1480
1486
|
function ElevationStep_getInstance() {
|
|
1481
1487
|
return ElevationStep_instance;
|
|
1482
1488
|
}
|
|
1483
1489
|
function GeneratedPath(size) {
|
|
1484
|
-
this.
|
|
1490
|
+
this.d1s_1 = size;
|
|
1485
1491
|
// Inline function 'kotlin.require' call
|
|
1486
|
-
if (!(this.
|
|
1487
|
-
var message = 'Negative size: ' + this.
|
|
1492
|
+
if (!(this.d1s_1 >= 0)) {
|
|
1493
|
+
var message = 'Negative size: ' + this.d1s_1;
|
|
1488
1494
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1489
1495
|
}
|
|
1490
|
-
this.
|
|
1496
|
+
this.e1s_1 = new Float64Array(imul(this.d1s_1, 36));
|
|
1491
1497
|
}
|
|
1492
|
-
protoOf(GeneratedPath).
|
|
1493
|
-
return this.
|
|
1498
|
+
protoOf(GeneratedPath).s1t = function (i, field) {
|
|
1499
|
+
return this.e1s_1[imul(i, 36) + field.n1_1 | 0];
|
|
1494
1500
|
};
|
|
1495
|
-
protoOf(GeneratedPath).
|
|
1496
|
-
this.
|
|
1501
|
+
protoOf(GeneratedPath).t1t = function (i, field, v) {
|
|
1502
|
+
this.e1s_1[imul(i, 36) + field.n1_1 | 0] = v;
|
|
1497
1503
|
};
|
|
1498
|
-
protoOf(GeneratedPath).
|
|
1499
|
-
return this.
|
|
1504
|
+
protoOf(GeneratedPath).f1s = function (i) {
|
|
1505
|
+
return this.e1s_1[imul(i, 36) + 0 | 0];
|
|
1500
1506
|
};
|
|
1501
|
-
protoOf(GeneratedPath).
|
|
1502
|
-
this.
|
|
1507
|
+
protoOf(GeneratedPath).s1s = function (i, v) {
|
|
1508
|
+
this.e1s_1[imul(i, 36) + 0 | 0] = v;
|
|
1503
1509
|
};
|
|
1504
|
-
protoOf(GeneratedPath).
|
|
1505
|
-
return this.
|
|
1510
|
+
protoOf(GeneratedPath).g1s = function (i) {
|
|
1511
|
+
return this.e1s_1[imul(i, 36) + 1 | 0];
|
|
1506
1512
|
};
|
|
1507
|
-
protoOf(GeneratedPath).
|
|
1508
|
-
this.
|
|
1513
|
+
protoOf(GeneratedPath).t1s = function (i, v) {
|
|
1514
|
+
this.e1s_1[imul(i, 36) + 1 | 0] = v;
|
|
1509
1515
|
};
|
|
1510
|
-
protoOf(GeneratedPath).
|
|
1511
|
-
return this.
|
|
1516
|
+
protoOf(GeneratedPath).h1u = function (i) {
|
|
1517
|
+
return this.e1s_1[imul(i, 36) + 2 | 0];
|
|
1512
1518
|
};
|
|
1513
|
-
protoOf(GeneratedPath).
|
|
1514
|
-
this.
|
|
1519
|
+
protoOf(GeneratedPath).i1u = function (i, v) {
|
|
1520
|
+
this.e1s_1[imul(i, 36) + 2 | 0] = v;
|
|
1515
1521
|
};
|
|
1516
|
-
protoOf(GeneratedPath).
|
|
1517
|
-
this.
|
|
1522
|
+
protoOf(GeneratedPath).j1u = function (i, v) {
|
|
1523
|
+
this.e1s_1[imul(i, 36) + 3 | 0] = v;
|
|
1518
1524
|
};
|
|
1519
|
-
protoOf(GeneratedPath).
|
|
1520
|
-
return this.
|
|
1525
|
+
protoOf(GeneratedPath).i1s = function (i) {
|
|
1526
|
+
return this.e1s_1[imul(i, 36) + 4 | 0];
|
|
1521
1527
|
};
|
|
1522
|
-
protoOf(GeneratedPath).
|
|
1523
|
-
this.
|
|
1528
|
+
protoOf(GeneratedPath).v1s = function (i, v) {
|
|
1529
|
+
this.e1s_1[imul(i, 36) + 4 | 0] = v;
|
|
1524
1530
|
};
|
|
1525
|
-
protoOf(GeneratedPath).
|
|
1526
|
-
this.
|
|
1531
|
+
protoOf(GeneratedPath).k1u = function (i) {
|
|
1532
|
+
return this.e1s_1[imul(i, 36) + 5 | 0];
|
|
1527
1533
|
};
|
|
1528
|
-
protoOf(GeneratedPath).
|
|
1529
|
-
|
|
1534
|
+
protoOf(GeneratedPath).l1u = function (i, v) {
|
|
1535
|
+
this.e1s_1[imul(i, 36) + 5 | 0] = v;
|
|
1530
1536
|
};
|
|
1531
|
-
protoOf(GeneratedPath).
|
|
1532
|
-
this.
|
|
1537
|
+
protoOf(GeneratedPath).m1u = function (i) {
|
|
1538
|
+
return this.e1s_1[imul(i, 36) + 6 | 0];
|
|
1533
1539
|
};
|
|
1534
|
-
protoOf(GeneratedPath).
|
|
1535
|
-
|
|
1540
|
+
protoOf(GeneratedPath).n1u = function (i, v) {
|
|
1541
|
+
this.e1s_1[imul(i, 36) + 6 | 0] = v;
|
|
1536
1542
|
};
|
|
1537
|
-
protoOf(GeneratedPath).
|
|
1538
|
-
this.
|
|
1543
|
+
protoOf(GeneratedPath).o1u = function (i) {
|
|
1544
|
+
return this.e1s_1[imul(i, 36) + 7 | 0];
|
|
1539
1545
|
};
|
|
1540
|
-
protoOf(GeneratedPath).
|
|
1541
|
-
|
|
1546
|
+
protoOf(GeneratedPath).p1u = function (i, v) {
|
|
1547
|
+
this.e1s_1[imul(i, 36) + 7 | 0] = v;
|
|
1542
1548
|
};
|
|
1543
|
-
protoOf(GeneratedPath).
|
|
1544
|
-
this.
|
|
1549
|
+
protoOf(GeneratedPath).h1s = function (i) {
|
|
1550
|
+
return this.e1s_1[imul(i, 36) + 8 | 0];
|
|
1545
1551
|
};
|
|
1546
|
-
protoOf(GeneratedPath).
|
|
1547
|
-
|
|
1552
|
+
protoOf(GeneratedPath).u1s = function (i, v) {
|
|
1553
|
+
this.e1s_1[imul(i, 36) + 8 | 0] = v;
|
|
1548
1554
|
};
|
|
1549
|
-
protoOf(GeneratedPath).
|
|
1550
|
-
this.
|
|
1555
|
+
protoOf(GeneratedPath).q1u = function (i) {
|
|
1556
|
+
return this.e1s_1[imul(i, 36) + 9 | 0];
|
|
1551
1557
|
};
|
|
1552
|
-
protoOf(GeneratedPath).
|
|
1553
|
-
this.
|
|
1558
|
+
protoOf(GeneratedPath).r1u = function (i, v) {
|
|
1559
|
+
this.e1s_1[imul(i, 36) + 9 | 0] = v;
|
|
1554
1560
|
};
|
|
1555
|
-
protoOf(GeneratedPath).
|
|
1556
|
-
this.
|
|
1561
|
+
protoOf(GeneratedPath).s1u = function (i, v) {
|
|
1562
|
+
this.e1s_1[imul(i, 36) + 10 | 0] = v;
|
|
1557
1563
|
};
|
|
1558
|
-
protoOf(GeneratedPath).
|
|
1559
|
-
this.
|
|
1564
|
+
protoOf(GeneratedPath).t1u = function (i, v) {
|
|
1565
|
+
this.e1s_1[imul(i, 36) + 11 | 0] = v;
|
|
1560
1566
|
};
|
|
1561
|
-
protoOf(GeneratedPath).
|
|
1562
|
-
this.
|
|
1567
|
+
protoOf(GeneratedPath).u1u = function (i, v) {
|
|
1568
|
+
this.e1s_1[imul(i, 36) + 12 | 0] = v;
|
|
1563
1569
|
};
|
|
1564
|
-
protoOf(GeneratedPath).
|
|
1565
|
-
this.
|
|
1570
|
+
protoOf(GeneratedPath).v1u = function (i, v) {
|
|
1571
|
+
this.e1s_1[imul(i, 36) + 13 | 0] = v;
|
|
1566
1572
|
};
|
|
1567
|
-
protoOf(GeneratedPath).
|
|
1568
|
-
this.
|
|
1573
|
+
protoOf(GeneratedPath).w1u = function (i, v) {
|
|
1574
|
+
this.e1s_1[imul(i, 36) + 14 | 0] = v;
|
|
1569
1575
|
};
|
|
1570
|
-
protoOf(GeneratedPath).
|
|
1571
|
-
this.
|
|
1576
|
+
protoOf(GeneratedPath).x1u = function (i, v) {
|
|
1577
|
+
this.e1s_1[imul(i, 36) + 15 | 0] = v;
|
|
1572
1578
|
};
|
|
1573
|
-
protoOf(GeneratedPath).
|
|
1574
|
-
this.
|
|
1579
|
+
protoOf(GeneratedPath).y1u = function (i, v) {
|
|
1580
|
+
this.e1s_1[imul(i, 36) + 16 | 0] = v;
|
|
1575
1581
|
};
|
|
1576
|
-
protoOf(GeneratedPath).
|
|
1577
|
-
|
|
1582
|
+
protoOf(GeneratedPath).z1u = function (i, v) {
|
|
1583
|
+
this.e1s_1[imul(i, 36) + 17 | 0] = v;
|
|
1578
1584
|
};
|
|
1579
|
-
protoOf(GeneratedPath).
|
|
1580
|
-
this.
|
|
1585
|
+
protoOf(GeneratedPath).m1s = function (i) {
|
|
1586
|
+
return this.e1s_1[imul(i, 36) + 18 | 0];
|
|
1581
1587
|
};
|
|
1582
|
-
protoOf(GeneratedPath).
|
|
1583
|
-
this.
|
|
1588
|
+
protoOf(GeneratedPath).w1s = function (i, v) {
|
|
1589
|
+
this.e1s_1[imul(i, 36) + 18 | 0] = v;
|
|
1584
1590
|
};
|
|
1585
|
-
protoOf(GeneratedPath).
|
|
1586
|
-
this.
|
|
1591
|
+
protoOf(GeneratedPath).a1v = function (i, v) {
|
|
1592
|
+
this.e1s_1[imul(i, 36) + 19 | 0] = v;
|
|
1587
1593
|
};
|
|
1588
|
-
protoOf(GeneratedPath).
|
|
1589
|
-
this.
|
|
1594
|
+
protoOf(GeneratedPath).b1v = function (i, v) {
|
|
1595
|
+
this.e1s_1[imul(i, 36) + 20 | 0] = v;
|
|
1590
1596
|
};
|
|
1591
|
-
protoOf(GeneratedPath).
|
|
1592
|
-
this.
|
|
1597
|
+
protoOf(GeneratedPath).c1v = function (i, v) {
|
|
1598
|
+
this.e1s_1[imul(i, 36) + 21 | 0] = v;
|
|
1593
1599
|
};
|
|
1594
|
-
protoOf(GeneratedPath).
|
|
1595
|
-
this.
|
|
1600
|
+
protoOf(GeneratedPath).d1v = function (i, v) {
|
|
1601
|
+
this.e1s_1[imul(i, 36) + 22 | 0] = v;
|
|
1596
1602
|
};
|
|
1597
|
-
protoOf(GeneratedPath).
|
|
1598
|
-
this.
|
|
1603
|
+
protoOf(GeneratedPath).e1v = function (i, v) {
|
|
1604
|
+
this.e1s_1[imul(i, 36) + 23 | 0] = v;
|
|
1599
1605
|
};
|
|
1600
|
-
protoOf(GeneratedPath).
|
|
1601
|
-
this.
|
|
1606
|
+
protoOf(GeneratedPath).f1v = function (i, v) {
|
|
1607
|
+
this.e1s_1[imul(i, 36) + 24 | 0] = v;
|
|
1602
1608
|
};
|
|
1603
|
-
protoOf(GeneratedPath).
|
|
1604
|
-
|
|
1609
|
+
protoOf(GeneratedPath).g1v = function (i, v) {
|
|
1610
|
+
this.e1s_1[imul(i, 36) + 25 | 0] = v;
|
|
1605
1611
|
};
|
|
1606
|
-
protoOf(GeneratedPath).
|
|
1607
|
-
this.
|
|
1612
|
+
protoOf(GeneratedPath).h1v = function (i) {
|
|
1613
|
+
return this.e1s_1[imul(i, 36) + 26 | 0];
|
|
1608
1614
|
};
|
|
1609
|
-
protoOf(GeneratedPath).
|
|
1610
|
-
|
|
1615
|
+
protoOf(GeneratedPath).i1v = function (i, v) {
|
|
1616
|
+
this.e1s_1[imul(i, 36) + 26 | 0] = v;
|
|
1611
1617
|
};
|
|
1612
|
-
protoOf(GeneratedPath).
|
|
1613
|
-
this.
|
|
1618
|
+
protoOf(GeneratedPath).j1v = function (i) {
|
|
1619
|
+
return this.e1s_1[imul(i, 36) + 27 | 0];
|
|
1614
1620
|
};
|
|
1615
|
-
protoOf(GeneratedPath).
|
|
1616
|
-
|
|
1621
|
+
protoOf(GeneratedPath).k1v = function (i, v) {
|
|
1622
|
+
this.e1s_1[imul(i, 36) + 27 | 0] = v;
|
|
1617
1623
|
};
|
|
1618
|
-
protoOf(GeneratedPath).
|
|
1619
|
-
this.
|
|
1624
|
+
protoOf(GeneratedPath).l1v = function (i) {
|
|
1625
|
+
return this.e1s_1[imul(i, 36) + 28 | 0];
|
|
1620
1626
|
};
|
|
1621
|
-
protoOf(GeneratedPath).
|
|
1622
|
-
this.
|
|
1627
|
+
protoOf(GeneratedPath).m1v = function (i, v) {
|
|
1628
|
+
this.e1s_1[imul(i, 36) + 28 | 0] = v;
|
|
1623
1629
|
};
|
|
1624
|
-
protoOf(GeneratedPath).
|
|
1625
|
-
this.
|
|
1630
|
+
protoOf(GeneratedPath).n1v = function (i, v) {
|
|
1631
|
+
this.e1s_1[imul(i, 36) + 29 | 0] = v;
|
|
1626
1632
|
};
|
|
1627
|
-
protoOf(GeneratedPath).
|
|
1628
|
-
|
|
1633
|
+
protoOf(GeneratedPath).o1v = function (i, v) {
|
|
1634
|
+
this.e1s_1[imul(i, 36) + 30 | 0] = v;
|
|
1629
1635
|
};
|
|
1630
|
-
protoOf(GeneratedPath).
|
|
1631
|
-
this.
|
|
1636
|
+
protoOf(GeneratedPath).l1s = function (i) {
|
|
1637
|
+
return this.e1s_1[imul(i, 36) + 31 | 0];
|
|
1632
1638
|
};
|
|
1633
|
-
protoOf(GeneratedPath).
|
|
1634
|
-
this.
|
|
1639
|
+
protoOf(GeneratedPath).z1s = function (i, v) {
|
|
1640
|
+
this.e1s_1[imul(i, 36) + 31 | 0] = v;
|
|
1635
1641
|
};
|
|
1636
|
-
protoOf(GeneratedPath).
|
|
1637
|
-
this.
|
|
1642
|
+
protoOf(GeneratedPath).p1v = function (i, v) {
|
|
1643
|
+
this.e1s_1[imul(i, 36) + 32 | 0] = v;
|
|
1638
1644
|
};
|
|
1639
|
-
protoOf(GeneratedPath).
|
|
1640
|
-
|
|
1645
|
+
protoOf(GeneratedPath).q1v = function (i, v) {
|
|
1646
|
+
this.e1s_1[imul(i, 36) + 33 | 0] = v;
|
|
1641
1647
|
};
|
|
1642
|
-
protoOf(GeneratedPath).
|
|
1643
|
-
this.
|
|
1648
|
+
protoOf(GeneratedPath).j1s = function (i) {
|
|
1649
|
+
return this.e1s_1[imul(i, 36) + 34 | 0];
|
|
1644
1650
|
};
|
|
1645
|
-
protoOf(GeneratedPath).
|
|
1646
|
-
|
|
1651
|
+
protoOf(GeneratedPath).x1s = function (i, v) {
|
|
1652
|
+
this.e1s_1[imul(i, 36) + 34 | 0] = v;
|
|
1647
1653
|
};
|
|
1648
|
-
protoOf(GeneratedPath).
|
|
1649
|
-
this.
|
|
1654
|
+
protoOf(GeneratedPath).k1s = function (i) {
|
|
1655
|
+
return this.e1s_1[imul(i, 36) + 35 | 0];
|
|
1656
|
+
};
|
|
1657
|
+
protoOf(GeneratedPath).y1s = function (i, v) {
|
|
1658
|
+
this.e1s_1[imul(i, 36) + 35 | 0] = v;
|
|
1650
1659
|
};
|
|
1651
1660
|
function Companion_3() {
|
|
1652
1661
|
Companion_instance_3 = this;
|
|
1653
|
-
this.
|
|
1662
|
+
this.r1v_1 = new BoundsRad(0.0, 0.0, 0.0, 0.0);
|
|
1654
1663
|
}
|
|
1655
1664
|
var Companion_instance_3;
|
|
1656
1665
|
function Companion_getInstance_4() {
|
|
@@ -1660,19 +1669,19 @@
|
|
|
1660
1669
|
}
|
|
1661
1670
|
function BoundsRad(minLat, maxLat, minLon, maxLon) {
|
|
1662
1671
|
Companion_getInstance_4();
|
|
1663
|
-
this.
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1666
|
-
this.
|
|
1672
|
+
this.s1v_1 = minLat;
|
|
1673
|
+
this.t1v_1 = maxLat;
|
|
1674
|
+
this.u1v_1 = minLon;
|
|
1675
|
+
this.v1v_1 = maxLon;
|
|
1667
1676
|
}
|
|
1668
1677
|
protoOf(BoundsRad).toString = function () {
|
|
1669
|
-
return 'BoundsRad(minLat=' + this.
|
|
1678
|
+
return 'BoundsRad(minLat=' + this.s1v_1 + ', maxLat=' + this.t1v_1 + ', minLon=' + this.u1v_1 + ', maxLon=' + this.v1v_1 + ')';
|
|
1670
1679
|
};
|
|
1671
1680
|
protoOf(BoundsRad).hashCode = function () {
|
|
1672
|
-
var result = getNumberHashCode(this.
|
|
1673
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1674
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1675
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1681
|
+
var result = getNumberHashCode(this.s1v_1);
|
|
1682
|
+
result = imul(result, 31) + getNumberHashCode(this.t1v_1) | 0;
|
|
1683
|
+
result = imul(result, 31) + getNumberHashCode(this.u1v_1) | 0;
|
|
1684
|
+
result = imul(result, 31) + getNumberHashCode(this.v1v_1) | 0;
|
|
1676
1685
|
return result;
|
|
1677
1686
|
};
|
|
1678
1687
|
protoOf(BoundsRad).equals = function (other) {
|
|
@@ -1680,39 +1689,39 @@
|
|
|
1680
1689
|
return true;
|
|
1681
1690
|
if (!(other instanceof BoundsRad))
|
|
1682
1691
|
return false;
|
|
1683
|
-
if (!equals(this.
|
|
1692
|
+
if (!equals(this.s1v_1, other.s1v_1))
|
|
1684
1693
|
return false;
|
|
1685
|
-
if (!equals(this.
|
|
1694
|
+
if (!equals(this.t1v_1, other.t1v_1))
|
|
1686
1695
|
return false;
|
|
1687
|
-
if (!equals(this.
|
|
1696
|
+
if (!equals(this.u1v_1, other.u1v_1))
|
|
1688
1697
|
return false;
|
|
1689
|
-
if (!equals(this.
|
|
1698
|
+
if (!equals(this.v1v_1, other.v1v_1))
|
|
1690
1699
|
return false;
|
|
1691
1700
|
return true;
|
|
1692
1701
|
};
|
|
1693
1702
|
function copyStatsFrom($this, other) {
|
|
1694
|
-
$this.
|
|
1695
|
-
$this.
|
|
1696
|
-
$this.
|
|
1697
|
-
$this.
|
|
1698
|
-
$this.
|
|
1699
|
-
$this.
|
|
1700
|
-
$this.
|
|
1703
|
+
$this.c1t_1 = other.c1t_1;
|
|
1704
|
+
$this.d1t_1 = other.d1t_1;
|
|
1705
|
+
$this.e1t_1 = other.e1t_1;
|
|
1706
|
+
$this.f1t_1 = other.f1t_1;
|
|
1707
|
+
$this.g1t_1 = other.g1t_1;
|
|
1708
|
+
$this.h1t_1 = other.h1t_1;
|
|
1709
|
+
$this.i1t_1 = other.i1t_1;
|
|
1701
1710
|
}
|
|
1702
1711
|
function resetStats($this) {
|
|
1703
|
-
$this.
|
|
1704
|
-
$this.
|
|
1705
|
-
$this.
|
|
1706
|
-
$this.
|
|
1707
|
-
$this.
|
|
1708
|
-
$this.
|
|
1709
|
-
$this.
|
|
1712
|
+
$this.c1t_1 = 0.0;
|
|
1713
|
+
$this.d1t_1 = 0.0;
|
|
1714
|
+
$this.e1t_1 = 0.0;
|
|
1715
|
+
$this.f1t_1 = 0.0;
|
|
1716
|
+
$this.g1t_1 = 0.0;
|
|
1717
|
+
$this.h1t_1 = 0.0;
|
|
1718
|
+
$this.i1t_1 = Companion_getInstance_4().r1v_1;
|
|
1710
1719
|
}
|
|
1711
1720
|
function computeBearing($this, from, to) {
|
|
1712
|
-
var lat1 = $this.
|
|
1713
|
-
var lon1 = $this.
|
|
1714
|
-
var lat2 = $this.
|
|
1715
|
-
var lon2 = $this.
|
|
1721
|
+
var lat1 = $this.f1s(from);
|
|
1722
|
+
var lon1 = $this.g1s(from);
|
|
1723
|
+
var lat2 = $this.f1s(to);
|
|
1724
|
+
var lon2 = $this.g1s(to);
|
|
1716
1725
|
// Inline function 'kotlin.math.cos' call
|
|
1717
1726
|
var x1 = lon1 * Math.cos(lat1);
|
|
1718
1727
|
var y1 = lat1;
|
|
@@ -1733,32 +1742,32 @@
|
|
|
1733
1742
|
}
|
|
1734
1743
|
function Path(size) {
|
|
1735
1744
|
GeneratedPath.call(this, size);
|
|
1736
|
-
this.
|
|
1737
|
-
this.
|
|
1738
|
-
this.
|
|
1739
|
-
this.
|
|
1740
|
-
this.
|
|
1741
|
-
this.
|
|
1742
|
-
this.
|
|
1743
|
-
}
|
|
1744
|
-
protoOf(Path).
|
|
1745
|
-
return until(0, this.
|
|
1746
|
-
};
|
|
1747
|
-
protoOf(Path).
|
|
1748
|
-
return this.
|
|
1749
|
-
};
|
|
1750
|
-
protoOf(Path).
|
|
1751
|
-
return this.
|
|
1752
|
-
};
|
|
1753
|
-
protoOf(Path).
|
|
1754
|
-
return new LatLonElevation(this.
|
|
1755
|
-
};
|
|
1756
|
-
protoOf(Path).
|
|
1757
|
-
var out = new Path(this.
|
|
1758
|
-
var tmp0 = this.
|
|
1759
|
-
var tmp2 = out.
|
|
1745
|
+
this.c1t_1 = 0.0;
|
|
1746
|
+
this.d1t_1 = 0.0;
|
|
1747
|
+
this.e1t_1 = 0.0;
|
|
1748
|
+
this.f1t_1 = 0.0;
|
|
1749
|
+
this.g1t_1 = 0.0;
|
|
1750
|
+
this.h1t_1 = 0.0;
|
|
1751
|
+
this.i1t_1 = Companion_getInstance_4().r1v_1;
|
|
1752
|
+
}
|
|
1753
|
+
protoOf(Path).w1v = function () {
|
|
1754
|
+
return until(0, this.d1s_1);
|
|
1755
|
+
};
|
|
1756
|
+
protoOf(Path).x1v = function (i) {
|
|
1757
|
+
return this.f1s(i) * MathConstants_getInstance().yv_1;
|
|
1758
|
+
};
|
|
1759
|
+
protoOf(Path).y1v = function (i) {
|
|
1760
|
+
return this.g1s(i) * MathConstants_getInstance().yv_1;
|
|
1761
|
+
};
|
|
1762
|
+
protoOf(Path).g1u = function (i) {
|
|
1763
|
+
return new LatLonElevation(this.x1v(i), this.y1v(i), this.h1s(i));
|
|
1764
|
+
};
|
|
1765
|
+
protoOf(Path).z1v = function () {
|
|
1766
|
+
var out = new Path(this.d1s_1);
|
|
1767
|
+
var tmp0 = this.e1s_1;
|
|
1768
|
+
var tmp2 = out.e1s_1;
|
|
1760
1769
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1761
|
-
var endIndex = this.
|
|
1770
|
+
var endIndex = this.e1s_1.length;
|
|
1762
1771
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1763
1772
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1764
1773
|
var tmp = tmp0;
|
|
@@ -1768,11 +1777,11 @@
|
|
|
1768
1777
|
copyStatsFrom(out, this);
|
|
1769
1778
|
return out;
|
|
1770
1779
|
};
|
|
1771
|
-
protoOf(Path).
|
|
1780
|
+
protoOf(Path).j1t = function () {
|
|
1772
1781
|
resetStats(this);
|
|
1773
|
-
if (this.
|
|
1782
|
+
if (this.d1s_1 === 0)
|
|
1774
1783
|
return Unit_instance;
|
|
1775
|
-
var timeStart = this.
|
|
1784
|
+
var timeStart = this.i1s(0);
|
|
1776
1785
|
var cumDist = 0.0;
|
|
1777
1786
|
var minLat = Infinity;
|
|
1778
1787
|
var maxLat = -Infinity;
|
|
@@ -1783,14 +1792,14 @@
|
|
|
1783
1792
|
var gain = 0.0;
|
|
1784
1793
|
var loss = 0.0;
|
|
1785
1794
|
var inductionVariable = 0;
|
|
1786
|
-
var last = this.
|
|
1795
|
+
var last = this.d1s_1;
|
|
1787
1796
|
if (inductionVariable < last)
|
|
1788
1797
|
do {
|
|
1789
1798
|
var i = inductionVariable;
|
|
1790
1799
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1791
|
-
var lat = this.
|
|
1792
|
-
var lon = this.
|
|
1793
|
-
var ele = this.
|
|
1800
|
+
var lat = this.f1s(i);
|
|
1801
|
+
var lon = this.g1s(i);
|
|
1802
|
+
var ele = this.h1s(i);
|
|
1794
1803
|
// Inline function 'kotlin.math.min' call
|
|
1795
1804
|
var a = minLat;
|
|
1796
1805
|
minLat = Math.min(a, lat);
|
|
@@ -1810,103 +1819,103 @@
|
|
|
1810
1819
|
var a_4 = maxEle;
|
|
1811
1820
|
maxEle = Math.max(a_4, ele);
|
|
1812
1821
|
if (i > 0) {
|
|
1813
|
-
var prevCoord = new LatLon(this.
|
|
1814
|
-
var curCoord = new LatLon(this.
|
|
1815
|
-
cumDist = cumDist + Distance_instance.
|
|
1816
|
-
var dEle = ele - this.
|
|
1822
|
+
var prevCoord = new LatLon(this.x1v(i - 1 | 0), this.y1v(i - 1 | 0));
|
|
1823
|
+
var curCoord = new LatLon(this.x1v(i), this.y1v(i));
|
|
1824
|
+
cumDist = cumDist + Distance_instance.vv(prevCoord, curCoord);
|
|
1825
|
+
var dEle = ele - this.h1s(i - 1 | 0);
|
|
1817
1826
|
if (dEle > 0)
|
|
1818
1827
|
gain = gain + dEle;
|
|
1819
1828
|
else
|
|
1820
1829
|
loss = loss + dEle;
|
|
1821
1830
|
}
|
|
1822
|
-
this.
|
|
1831
|
+
this.i1u(i, cumDist);
|
|
1823
1832
|
}
|
|
1824
1833
|
while (inductionVariable < last);
|
|
1825
|
-
this.
|
|
1826
|
-
this.
|
|
1827
|
-
this.
|
|
1828
|
-
this.
|
|
1829
|
-
this.
|
|
1830
|
-
this.
|
|
1831
|
-
this.
|
|
1834
|
+
this.c1t_1 = cumDist;
|
|
1835
|
+
this.d1t_1 = minEle === Infinity ? 0.0 : minEle;
|
|
1836
|
+
this.e1t_1 = maxEle === -Infinity ? 0.0 : maxEle;
|
|
1837
|
+
this.f1t_1 = gain;
|
|
1838
|
+
this.g1t_1 = loss;
|
|
1839
|
+
this.i1t_1 = new BoundsRad(minLat, maxLat, minLon, maxLon);
|
|
1840
|
+
this.h1t_1 = this.d1s_1 >= 2 ? this.i1s(this.d1s_1 - 1 | 0) - timeStart : 0.0;
|
|
1832
1841
|
var inductionVariable_0 = 0;
|
|
1833
|
-
var last_0 = this.
|
|
1842
|
+
var last_0 = this.d1s_1;
|
|
1834
1843
|
if (inductionVariable_0 < last_0)
|
|
1835
1844
|
$l$loop: do {
|
|
1836
1845
|
var i_0 = inductionVariable_0;
|
|
1837
1846
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1838
|
-
this.
|
|
1839
|
-
if (this.
|
|
1847
|
+
this.l1u(i_0, (this.i1s(i_0) - timeStart) / 1000.0);
|
|
1848
|
+
if (this.d1s_1 <= 1)
|
|
1840
1849
|
continue $l$loop;
|
|
1841
1850
|
// Inline function 'kotlin.math.max' call
|
|
1842
1851
|
var b = i_0 - 1 | 0;
|
|
1843
1852
|
var im1 = Math.max(0, b);
|
|
1844
|
-
var tmp0 = this.
|
|
1853
|
+
var tmp0 = this.d1s_1 - 1 | 0;
|
|
1845
1854
|
// Inline function 'kotlin.math.min' call
|
|
1846
1855
|
var b_0 = i_0 + 1 | 0;
|
|
1847
1856
|
var ip1 = Math.min(tmp0, b_0);
|
|
1848
|
-
this.
|
|
1849
|
-
var dDist = (this.
|
|
1850
|
-
var dEle_0 = (this.
|
|
1857
|
+
this.p1u(i_0, computeBearing(this, im1, ip1));
|
|
1858
|
+
var dDist = (this.h1u(ip1) - this.h1u(im1)) / 2.0;
|
|
1859
|
+
var dEle_0 = (this.h1s(ip1) - this.h1s(im1)) / 2.0;
|
|
1851
1860
|
var grade = dDist === 0.0 ? 0.0 : dEle_0 / dDist;
|
|
1852
|
-
this.
|
|
1853
|
-
var dTime = (this.
|
|
1854
|
-
this.
|
|
1855
|
-
this.
|
|
1856
|
-
this.
|
|
1861
|
+
this.r1u(i_0, grade);
|
|
1862
|
+
var dTime = (this.i1s(ip1) - this.i1s(im1)) / 2000.0;
|
|
1863
|
+
this.j1u(i_0, dDist);
|
|
1864
|
+
this.n1u(i_0, dTime);
|
|
1865
|
+
this.k1v(i_0, dTime === 0.0 ? 0.0 : dDist / dTime);
|
|
1857
1866
|
}
|
|
1858
1867
|
while (inductionVariable_0 < last_0);
|
|
1859
1868
|
};
|
|
1860
1869
|
function PathSimplifier() {
|
|
1861
1870
|
}
|
|
1862
|
-
protoOf(PathSimplifier).
|
|
1863
|
-
if (path.
|
|
1864
|
-
return path.
|
|
1865
|
-
var coords = ArrayList_init_$Create$(path.
|
|
1871
|
+
protoOf(PathSimplifier).m1r = function (path, toleranceM, zExaggeration) {
|
|
1872
|
+
if (path.d1s_1 <= 2)
|
|
1873
|
+
return path.z1v();
|
|
1874
|
+
var coords = ArrayList_init_$Create$(path.d1s_1);
|
|
1866
1875
|
var inductionVariable = 0;
|
|
1867
|
-
var last = path.
|
|
1876
|
+
var last = path.d1s_1;
|
|
1868
1877
|
if (inductionVariable < last)
|
|
1869
1878
|
do {
|
|
1870
1879
|
var i = inductionVariable;
|
|
1871
1880
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1872
1881
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
1873
|
-
var element = new LatLonElevation(path.
|
|
1874
|
-
coords.
|
|
1882
|
+
var element = new LatLonElevation(path.f1s(i) * MathConstants_getInstance().yv_1, path.g1s(i) * MathConstants_getInstance().yv_1, path.h1s(i));
|
|
1883
|
+
coords.n(element);
|
|
1875
1884
|
}
|
|
1876
1885
|
while (inductionVariable < last);
|
|
1877
|
-
var simplified = DouglasPeucker_instance.
|
|
1878
|
-
var retainedIndices = ArrayList_init_$Create$(simplified.
|
|
1886
|
+
var simplified = DouglasPeucker_instance.sv(coords, toleranceM, zExaggeration);
|
|
1887
|
+
var retainedIndices = ArrayList_init_$Create$(simplified.k());
|
|
1879
1888
|
var cursor = 0;
|
|
1880
|
-
var _iterator__ex2g4s = simplified.
|
|
1881
|
-
while (_iterator__ex2g4s.
|
|
1882
|
-
var kept = _iterator__ex2g4s.
|
|
1883
|
-
while (cursor < coords.
|
|
1889
|
+
var _iterator__ex2g4s = simplified.h();
|
|
1890
|
+
while (_iterator__ex2g4s.i()) {
|
|
1891
|
+
var kept = _iterator__ex2g4s.j();
|
|
1892
|
+
while (cursor < coords.k() && !(coords.l(cursor) === kept)) {
|
|
1884
1893
|
cursor = cursor + 1 | 0;
|
|
1885
1894
|
}
|
|
1886
|
-
if (cursor === coords.
|
|
1895
|
+
if (cursor === coords.k()) {
|
|
1887
1896
|
// Inline function 'kotlin.error' call
|
|
1888
1897
|
var message = 'PathSimplifier: retained point not found in source';
|
|
1889
1898
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1890
1899
|
}
|
|
1891
1900
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
1892
1901
|
var element_0 = cursor;
|
|
1893
|
-
retainedIndices.
|
|
1902
|
+
retainedIndices.n(element_0);
|
|
1894
1903
|
cursor = cursor + 1 | 0;
|
|
1895
1904
|
}
|
|
1896
|
-
var out = new Path(retainedIndices.
|
|
1897
|
-
var iterator = retainedIndices.
|
|
1905
|
+
var out = new Path(retainedIndices.k());
|
|
1906
|
+
var iterator = retainedIndices.h();
|
|
1898
1907
|
var index = 0;
|
|
1899
|
-
while (iterator.
|
|
1908
|
+
while (iterator.i()) {
|
|
1900
1909
|
var dstIdx = index;
|
|
1901
1910
|
index = index + 1 | 0;
|
|
1902
|
-
var srcIdx = iterator.
|
|
1903
|
-
var _iterator__ex2g4s_0 = get_entries().
|
|
1904
|
-
while (_iterator__ex2g4s_0.
|
|
1905
|
-
var field = _iterator__ex2g4s_0.
|
|
1906
|
-
out.
|
|
1911
|
+
var srcIdx = iterator.j();
|
|
1912
|
+
var _iterator__ex2g4s_0 = get_entries().h();
|
|
1913
|
+
while (_iterator__ex2g4s_0.i()) {
|
|
1914
|
+
var field = _iterator__ex2g4s_0.j();
|
|
1915
|
+
out.t1t(dstIdx, field, path.s1t(srcIdx, field));
|
|
1907
1916
|
}
|
|
1908
1917
|
}
|
|
1909
|
-
out.
|
|
1918
|
+
out.j1t();
|
|
1910
1919
|
return out;
|
|
1911
1920
|
};
|
|
1912
1921
|
var PathSimplifier_instance;
|
|
@@ -1951,21 +1960,24 @@
|
|
|
1951
1960
|
var PointField_CADENCE_instance;
|
|
1952
1961
|
function Companion_5() {
|
|
1953
1962
|
Companion_instance_5 = this;
|
|
1954
|
-
this.
|
|
1963
|
+
this.a1w_1 = 36;
|
|
1955
1964
|
var tmp = this;
|
|
1956
1965
|
// Inline function 'kotlin.collections.associateBy' call
|
|
1957
1966
|
var this_0 = get_entries();
|
|
1958
1967
|
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
|
|
1959
1968
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
1960
1969
|
var destination = LinkedHashMap_init_$Create$(capacity);
|
|
1961
|
-
var _iterator__ex2g4s = this_0.
|
|
1962
|
-
while (_iterator__ex2g4s.
|
|
1963
|
-
var element = _iterator__ex2g4s.
|
|
1964
|
-
var tmp$ret$2 = element.
|
|
1965
|
-
destination.
|
|
1970
|
+
var _iterator__ex2g4s = this_0.h();
|
|
1971
|
+
while (_iterator__ex2g4s.i()) {
|
|
1972
|
+
var element = _iterator__ex2g4s.j();
|
|
1973
|
+
var tmp$ret$2 = element.e1w_1;
|
|
1974
|
+
destination.a3(tmp$ret$2, element);
|
|
1966
1975
|
}
|
|
1967
|
-
tmp.
|
|
1976
|
+
tmp.b1w_1 = destination;
|
|
1968
1977
|
}
|
|
1978
|
+
protoOf(Companion_5).k1w = function (prop) {
|
|
1979
|
+
return this.b1w_1.j1(prop);
|
|
1980
|
+
};
|
|
1969
1981
|
var Companion_instance_5;
|
|
1970
1982
|
function Companion_getInstance_6() {
|
|
1971
1983
|
PointField_initEntries();
|
|
@@ -2029,12 +2041,12 @@
|
|
|
2029
2041
|
notSelectable = notSelectable === VOID ? false : notSelectable;
|
|
2030
2042
|
anglesInRadians = anglesInRadians === VOID ? false : anglesInRadians;
|
|
2031
2043
|
Enum.call(this, name, ordinal);
|
|
2032
|
-
this.
|
|
2033
|
-
this.
|
|
2034
|
-
this.
|
|
2035
|
-
this.
|
|
2036
|
-
this.
|
|
2037
|
-
this.
|
|
2044
|
+
this.e1w_1 = prop;
|
|
2045
|
+
this.f1w_1 = unit;
|
|
2046
|
+
this.g1w_1 = shortDescription;
|
|
2047
|
+
this.h1w_1 = category;
|
|
2048
|
+
this.i1w_1 = notSelectable;
|
|
2049
|
+
this.j1w_1 = anglesInRadians;
|
|
2038
2050
|
}
|
|
2039
2051
|
function PointField_LATITUDE_getInstance() {
|
|
2040
2052
|
PointField_initEntries();
|
|
@@ -2216,8 +2228,8 @@
|
|
|
2216
2228
|
}
|
|
2217
2229
|
function PointFieldCategory(name, ordinal, id, displayName) {
|
|
2218
2230
|
Enum.call(this, name, ordinal);
|
|
2219
|
-
this.
|
|
2220
|
-
this.
|
|
2231
|
+
this.n1w_1 = id;
|
|
2232
|
+
this.o1w_1 = displayName;
|
|
2221
2233
|
}
|
|
2222
2234
|
function PointFieldCategory_COORDINATES_getInstance() {
|
|
2223
2235
|
PointFieldCategory_initEntries();
|
|
@@ -2276,35 +2288,35 @@
|
|
|
2276
2288
|
return PointFieldCategory_PHYSIOLOGICAL_instance;
|
|
2277
2289
|
}
|
|
2278
2290
|
function Copy(sourceIndex) {
|
|
2279
|
-
this.
|
|
2291
|
+
this.p1w_1 = sourceIndex;
|
|
2280
2292
|
}
|
|
2281
2293
|
protoOf(Copy).toString = function () {
|
|
2282
|
-
return 'Copy(sourceIndex=' + this.
|
|
2294
|
+
return 'Copy(sourceIndex=' + this.p1w_1 + ')';
|
|
2283
2295
|
};
|
|
2284
2296
|
protoOf(Copy).hashCode = function () {
|
|
2285
|
-
return this.
|
|
2297
|
+
return this.p1w_1;
|
|
2286
2298
|
};
|
|
2287
2299
|
protoOf(Copy).equals = function (other) {
|
|
2288
2300
|
if (this === other)
|
|
2289
2301
|
return true;
|
|
2290
2302
|
if (!(other instanceof Copy))
|
|
2291
2303
|
return false;
|
|
2292
|
-
if (!(this.
|
|
2304
|
+
if (!(this.p1w_1 === other.p1w_1))
|
|
2293
2305
|
return false;
|
|
2294
2306
|
return true;
|
|
2295
2307
|
};
|
|
2296
2308
|
function Interpolate(from, to, coef) {
|
|
2297
|
-
this.
|
|
2298
|
-
this.
|
|
2299
|
-
this.
|
|
2309
|
+
this.q1w_1 = from;
|
|
2310
|
+
this.r1w_1 = to;
|
|
2311
|
+
this.s1w_1 = coef;
|
|
2300
2312
|
}
|
|
2301
2313
|
protoOf(Interpolate).toString = function () {
|
|
2302
|
-
return 'Interpolate(from=' + this.
|
|
2314
|
+
return 'Interpolate(from=' + this.q1w_1 + ', to=' + this.r1w_1 + ', coef=' + this.s1w_1 + ')';
|
|
2303
2315
|
};
|
|
2304
2316
|
protoOf(Interpolate).hashCode = function () {
|
|
2305
|
-
var result = this.
|
|
2306
|
-
result = imul(result, 31) + this.
|
|
2307
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2317
|
+
var result = this.q1w_1;
|
|
2318
|
+
result = imul(result, 31) + this.r1w_1 | 0;
|
|
2319
|
+
result = imul(result, 31) + getNumberHashCode(this.s1w_1) | 0;
|
|
2308
2320
|
return result;
|
|
2309
2321
|
};
|
|
2310
2322
|
protoOf(Interpolate).equals = function (other) {
|
|
@@ -2312,35 +2324,35 @@
|
|
|
2312
2324
|
return true;
|
|
2313
2325
|
if (!(other instanceof Interpolate))
|
|
2314
2326
|
return false;
|
|
2315
|
-
if (!(this.
|
|
2327
|
+
if (!(this.q1w_1 === other.q1w_1))
|
|
2316
2328
|
return false;
|
|
2317
|
-
if (!(this.
|
|
2329
|
+
if (!(this.r1w_1 === other.r1w_1))
|
|
2318
2330
|
return false;
|
|
2319
|
-
if (!equals(this.
|
|
2331
|
+
if (!equals(this.s1w_1, other.s1w_1))
|
|
2320
2332
|
return false;
|
|
2321
2333
|
return true;
|
|
2322
2334
|
};
|
|
2323
2335
|
function buildPlan($this, source, minDistanceM, maxDistanceM) {
|
|
2324
|
-
var n = source.
|
|
2336
|
+
var n = source.d1s_1;
|
|
2325
2337
|
var plan = ArrayList_init_$Create$(n);
|
|
2326
2338
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2327
2339
|
var element = new Copy(0);
|
|
2328
|
-
plan.
|
|
2329
|
-
var lastAddedDistance = source.
|
|
2340
|
+
plan.n(element);
|
|
2341
|
+
var lastAddedDistance = source.h1u(0);
|
|
2330
2342
|
var lastAddedIndex = 0;
|
|
2331
2343
|
var inductionVariable = 1;
|
|
2332
2344
|
if (inductionVariable < n)
|
|
2333
2345
|
$l$loop: do {
|
|
2334
2346
|
var i = inductionVariable;
|
|
2335
2347
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2336
|
-
var curDist = source.
|
|
2348
|
+
var curDist = source.h1u(i);
|
|
2337
2349
|
var gap = curDist - lastAddedDistance;
|
|
2338
2350
|
if (gap < minDistanceM)
|
|
2339
2351
|
continue $l$loop;
|
|
2340
2352
|
else if (gap <= maxDistanceM) {
|
|
2341
2353
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2342
2354
|
var element_0 = new Copy(i);
|
|
2343
|
-
plan.
|
|
2355
|
+
plan.n(element_0);
|
|
2344
2356
|
lastAddedDistance = curDist;
|
|
2345
2357
|
lastAddedIndex = i;
|
|
2346
2358
|
} else {
|
|
@@ -2356,20 +2368,20 @@
|
|
|
2356
2368
|
var j = inductionVariable_0;
|
|
2357
2369
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
2358
2370
|
var targetDistance = lastAddedDistance + j * spacing;
|
|
2359
|
-
while (index1 < (i - 1 | 0) && source.
|
|
2371
|
+
while (index1 < (i - 1 | 0) && source.h1u(index1 + 1 | 0) < targetDistance) {
|
|
2360
2372
|
index1 = index1 + 1 | 0;
|
|
2361
2373
|
}
|
|
2362
|
-
var dist1 = source.
|
|
2363
|
-
var dist2 = source.
|
|
2374
|
+
var dist1 = source.h1u(index1);
|
|
2375
|
+
var dist2 = source.h1u(index1 + 1 | 0);
|
|
2364
2376
|
var coef = (targetDistance - dist1) / (dist2 - dist1);
|
|
2365
2377
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2366
2378
|
var element_1 = new Interpolate(index1, index1 + 1 | 0, coef);
|
|
2367
|
-
plan.
|
|
2379
|
+
plan.n(element_1);
|
|
2368
2380
|
}
|
|
2369
2381
|
while (inductionVariable_0 < numSegments);
|
|
2370
2382
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
2371
2383
|
var element_2 = new Copy(i);
|
|
2372
|
-
plan.
|
|
2384
|
+
plan.n(element_2);
|
|
2373
2385
|
lastAddedDistance = curDist;
|
|
2374
2386
|
lastAddedIndex = i;
|
|
2375
2387
|
}
|
|
@@ -2378,60 +2390,60 @@
|
|
|
2378
2390
|
return plan;
|
|
2379
2391
|
}
|
|
2380
2392
|
function materialize($this, source, plan) {
|
|
2381
|
-
var out = new Path(plan.
|
|
2382
|
-
var iterator = plan.
|
|
2393
|
+
var out = new Path(plan.k());
|
|
2394
|
+
var iterator = plan.h();
|
|
2383
2395
|
var index = 0;
|
|
2384
|
-
while (iterator.
|
|
2396
|
+
while (iterator.i()) {
|
|
2385
2397
|
var dstIdx = index;
|
|
2386
2398
|
index = index + 1 | 0;
|
|
2387
|
-
var op = iterator.
|
|
2399
|
+
var op = iterator.j();
|
|
2388
2400
|
if (op instanceof Copy) {
|
|
2389
|
-
copyFields($this, source, op.
|
|
2401
|
+
copyFields($this, source, op.p1w_1, out, dstIdx);
|
|
2390
2402
|
} else {
|
|
2391
2403
|
if (op instanceof Interpolate) {
|
|
2392
|
-
interpolateFields($this, source, op.
|
|
2404
|
+
interpolateFields($this, source, op.q1w_1, op.r1w_1, op.s1w_1, out, dstIdx);
|
|
2393
2405
|
} else {
|
|
2394
2406
|
noWhenBranchMatchedException();
|
|
2395
2407
|
}
|
|
2396
2408
|
}
|
|
2397
2409
|
}
|
|
2398
|
-
out.
|
|
2410
|
+
out.j1t();
|
|
2399
2411
|
return out;
|
|
2400
2412
|
}
|
|
2401
2413
|
function copyFields($this, src, srcIdx, dst, dstIdx) {
|
|
2402
|
-
var _iterator__ex2g4s = get_entries().
|
|
2403
|
-
while (_iterator__ex2g4s.
|
|
2404
|
-
var field = _iterator__ex2g4s.
|
|
2405
|
-
dst.
|
|
2414
|
+
var _iterator__ex2g4s = get_entries().h();
|
|
2415
|
+
while (_iterator__ex2g4s.i()) {
|
|
2416
|
+
var field = _iterator__ex2g4s.j();
|
|
2417
|
+
dst.t1t(dstIdx, field, src.s1t(srcIdx, field));
|
|
2406
2418
|
}
|
|
2407
2419
|
}
|
|
2408
2420
|
function interpolateFields($this, src, i1, i2, coef, dst, dstIdx) {
|
|
2409
|
-
var _iterator__ex2g4s = get_entries().
|
|
2410
|
-
while (_iterator__ex2g4s.
|
|
2411
|
-
var field = _iterator__ex2g4s.
|
|
2412
|
-
var v1 = src.
|
|
2413
|
-
var v2 = src.
|
|
2421
|
+
var _iterator__ex2g4s = get_entries().h();
|
|
2422
|
+
while (_iterator__ex2g4s.i()) {
|
|
2423
|
+
var field = _iterator__ex2g4s.j();
|
|
2424
|
+
var v1 = src.s1t(i1, field);
|
|
2425
|
+
var v2 = src.s1t(i2, field);
|
|
2414
2426
|
var v = isNaN_0(v1) || isNaN_0(v2) ? NaN : v1 + (v2 - v1) * coef;
|
|
2415
|
-
dst.
|
|
2427
|
+
dst.t1t(dstIdx, field, v);
|
|
2416
2428
|
}
|
|
2417
2429
|
}
|
|
2418
2430
|
function PointPerDistance() {
|
|
2419
2431
|
}
|
|
2420
|
-
protoOf(PointPerDistance).
|
|
2421
|
-
return this.
|
|
2432
|
+
protoOf(PointPerDistance).z1q = function (source, minDistanceM, maxDistanceM) {
|
|
2433
|
+
return this.t1w(source, minDistanceM, maxDistanceM);
|
|
2422
2434
|
};
|
|
2423
|
-
protoOf(PointPerDistance).
|
|
2435
|
+
protoOf(PointPerDistance).t1w = function (source, minDistanceM, maxDistanceM) {
|
|
2424
2436
|
// Inline function 'kotlin.require' call
|
|
2425
2437
|
if (!(maxDistanceM > 0.0)) {
|
|
2426
2438
|
var message = 'maxDistanceM must be > 0, got ' + maxDistanceM;
|
|
2427
2439
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2428
2440
|
}
|
|
2429
|
-
if (source.
|
|
2441
|
+
if (source.d1s_1 === 0)
|
|
2430
2442
|
return new Path(0);
|
|
2431
|
-
if (source.
|
|
2443
|
+
if (source.d1s_1 === 1) {
|
|
2432
2444
|
var out = new Path(1);
|
|
2433
2445
|
copyFields(this, source, 0, out, 0);
|
|
2434
|
-
out.
|
|
2446
|
+
out.j1t();
|
|
2435
2447
|
return out;
|
|
2436
2448
|
}
|
|
2437
2449
|
var plan = buildPlan(this, source, minDistanceM, maxDistanceM);
|
|
@@ -2442,35 +2454,35 @@
|
|
|
2442
2454
|
return PointPerDistance_instance;
|
|
2443
2455
|
}
|
|
2444
2456
|
function Copy_0(sourceIndex) {
|
|
2445
|
-
this.
|
|
2457
|
+
this.u1w_1 = sourceIndex;
|
|
2446
2458
|
}
|
|
2447
2459
|
protoOf(Copy_0).toString = function () {
|
|
2448
|
-
return 'Copy(sourceIndex=' + this.
|
|
2460
|
+
return 'Copy(sourceIndex=' + this.u1w_1 + ')';
|
|
2449
2461
|
};
|
|
2450
2462
|
protoOf(Copy_0).hashCode = function () {
|
|
2451
|
-
return this.
|
|
2463
|
+
return this.u1w_1;
|
|
2452
2464
|
};
|
|
2453
2465
|
protoOf(Copy_0).equals = function (other) {
|
|
2454
2466
|
if (this === other)
|
|
2455
2467
|
return true;
|
|
2456
2468
|
if (!(other instanceof Copy_0))
|
|
2457
2469
|
return false;
|
|
2458
|
-
if (!(this.
|
|
2470
|
+
if (!(this.u1w_1 === other.u1w_1))
|
|
2459
2471
|
return false;
|
|
2460
2472
|
return true;
|
|
2461
2473
|
};
|
|
2462
2474
|
function Interpolate_0(from, to, coef) {
|
|
2463
|
-
this.
|
|
2464
|
-
this.
|
|
2465
|
-
this.
|
|
2475
|
+
this.v1w_1 = from;
|
|
2476
|
+
this.w1w_1 = to;
|
|
2477
|
+
this.x1w_1 = coef;
|
|
2466
2478
|
}
|
|
2467
2479
|
protoOf(Interpolate_0).toString = function () {
|
|
2468
|
-
return 'Interpolate(from=' + this.
|
|
2480
|
+
return 'Interpolate(from=' + this.v1w_1 + ', to=' + this.w1w_1 + ', coef=' + this.x1w_1 + ')';
|
|
2469
2481
|
};
|
|
2470
2482
|
protoOf(Interpolate_0).hashCode = function () {
|
|
2471
|
-
var result = this.
|
|
2472
|
-
result = imul(result, 31) + this.
|
|
2473
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2483
|
+
var result = this.v1w_1;
|
|
2484
|
+
result = imul(result, 31) + this.w1w_1 | 0;
|
|
2485
|
+
result = imul(result, 31) + getNumberHashCode(this.x1w_1) | 0;
|
|
2474
2486
|
return result;
|
|
2475
2487
|
};
|
|
2476
2488
|
protoOf(Interpolate_0).equals = function (other) {
|
|
@@ -2478,23 +2490,23 @@
|
|
|
2478
2490
|
return true;
|
|
2479
2491
|
if (!(other instanceof Interpolate_0))
|
|
2480
2492
|
return false;
|
|
2481
|
-
if (!(this.
|
|
2493
|
+
if (!(this.v1w_1 === other.v1w_1))
|
|
2482
2494
|
return false;
|
|
2483
|
-
if (!(this.
|
|
2495
|
+
if (!(this.w1w_1 === other.w1w_1))
|
|
2484
2496
|
return false;
|
|
2485
|
-
if (!equals(this.
|
|
2497
|
+
if (!equals(this.x1w_1, other.x1w_1))
|
|
2486
2498
|
return false;
|
|
2487
2499
|
return true;
|
|
2488
2500
|
};
|
|
2489
2501
|
function buildPlan_0($this, source) {
|
|
2490
2502
|
var plan = LinkedHashMap_init_$Create$_0();
|
|
2491
|
-
var n = source.
|
|
2503
|
+
var n = source.d1s_1;
|
|
2492
2504
|
var inductionVariable = 0;
|
|
2493
2505
|
if (inductionVariable < n)
|
|
2494
2506
|
$l$loop_0: do {
|
|
2495
2507
|
var i = inductionVariable;
|
|
2496
2508
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2497
|
-
var time1 = source.
|
|
2509
|
+
var time1 = source.i1s(i);
|
|
2498
2510
|
// Inline function 'kotlin.math.floor' call
|
|
2499
2511
|
var x = time1 / 1000.0;
|
|
2500
2512
|
var tmp$ret$0 = Math.floor(x);
|
|
@@ -2503,18 +2515,18 @@
|
|
|
2503
2515
|
if (i === 0 && !equalsLong(msInSec1, new Long(0, 0))) {
|
|
2504
2516
|
// Inline function 'kotlin.collections.set' call
|
|
2505
2517
|
var value = new Copy_0(i);
|
|
2506
|
-
plan.
|
|
2518
|
+
plan.a3(epoch1, value);
|
|
2507
2519
|
}
|
|
2508
2520
|
if (i === (n - 1 | 0)) {
|
|
2509
2521
|
if (!equalsLong(msInSec1, new Long(0, 0))) {
|
|
2510
2522
|
var tmp2 = add(epoch1, new Long(1, 0));
|
|
2511
2523
|
// Inline function 'kotlin.collections.set' call
|
|
2512
2524
|
var value_0 = new Copy_0(i);
|
|
2513
|
-
plan.
|
|
2525
|
+
plan.a3(tmp2, value_0);
|
|
2514
2526
|
}
|
|
2515
2527
|
continue $l$loop_0;
|
|
2516
2528
|
}
|
|
2517
|
-
var time2 = source.
|
|
2529
|
+
var time2 = source.i1s(i + 1 | 0);
|
|
2518
2530
|
// Inline function 'kotlin.math.floor' call
|
|
2519
2531
|
var x_0 = time2 / 1000.0;
|
|
2520
2532
|
var tmp$ret$3 = Math.floor(x_0);
|
|
@@ -2533,7 +2545,7 @@
|
|
|
2533
2545
|
var tmp2_0 = e;
|
|
2534
2546
|
// Inline function 'kotlin.collections.set' call
|
|
2535
2547
|
var value_1 = new Interpolate_0(i, i + 1 | 0, coef);
|
|
2536
|
-
plan.
|
|
2548
|
+
plan.a3(tmp2_0, value_1);
|
|
2537
2549
|
var _unary__edvuaz = e;
|
|
2538
2550
|
e = add(_unary__edvuaz, get_ONE());
|
|
2539
2551
|
}
|
|
@@ -2542,15 +2554,15 @@
|
|
|
2542
2554
|
return plan;
|
|
2543
2555
|
}
|
|
2544
2556
|
function materialize_0($this, source, plan) {
|
|
2545
|
-
var sortedEpochs = sorted(plan.
|
|
2546
|
-
var out = new Path(sortedEpochs.
|
|
2547
|
-
var iterator = sortedEpochs.
|
|
2557
|
+
var sortedEpochs = sorted(plan.k1());
|
|
2558
|
+
var out = new Path(sortedEpochs.k());
|
|
2559
|
+
var iterator = sortedEpochs.h();
|
|
2548
2560
|
var index = 0;
|
|
2549
|
-
$l$loop: while (iterator.
|
|
2561
|
+
$l$loop: while (iterator.i()) {
|
|
2550
2562
|
var idx = index;
|
|
2551
2563
|
index = index + 1 | 0;
|
|
2552
|
-
var epoch = iterator.
|
|
2553
|
-
var tmp0_elvis_lhs = plan.
|
|
2564
|
+
var epoch = iterator.j();
|
|
2565
|
+
var tmp0_elvis_lhs = plan.j1(epoch);
|
|
2554
2566
|
var tmp;
|
|
2555
2567
|
if (tmp0_elvis_lhs == null) {
|
|
2556
2568
|
continue $l$loop;
|
|
@@ -2559,40 +2571,40 @@
|
|
|
2559
2571
|
}
|
|
2560
2572
|
var data = tmp;
|
|
2561
2573
|
if (data instanceof Copy_0) {
|
|
2562
|
-
copyFields_0($this, source, data.
|
|
2574
|
+
copyFields_0($this, source, data.u1w_1, out, idx);
|
|
2563
2575
|
} else {
|
|
2564
2576
|
if (data instanceof Interpolate_0) {
|
|
2565
|
-
interpolateFields_0($this, source, data.
|
|
2577
|
+
interpolateFields_0($this, source, data.v1w_1, data.w1w_1, data.x1w_1, out, idx);
|
|
2566
2578
|
} else {
|
|
2567
2579
|
noWhenBranchMatchedException();
|
|
2568
2580
|
}
|
|
2569
2581
|
}
|
|
2570
|
-
out.
|
|
2582
|
+
out.v1s(idx, toNumber(multiply(epoch, new Long(1000, 0))));
|
|
2571
2583
|
}
|
|
2572
|
-
out.
|
|
2584
|
+
out.j1t();
|
|
2573
2585
|
return out;
|
|
2574
2586
|
}
|
|
2575
2587
|
function copyFields_0($this, src, srcIdx, dst, dstIdx) {
|
|
2576
|
-
var _iterator__ex2g4s = get_entries().
|
|
2577
|
-
while (_iterator__ex2g4s.
|
|
2578
|
-
var field = _iterator__ex2g4s.
|
|
2579
|
-
dst.
|
|
2588
|
+
var _iterator__ex2g4s = get_entries().h();
|
|
2589
|
+
while (_iterator__ex2g4s.i()) {
|
|
2590
|
+
var field = _iterator__ex2g4s.j();
|
|
2591
|
+
dst.t1t(dstIdx, field, src.s1t(srcIdx, field));
|
|
2580
2592
|
}
|
|
2581
2593
|
}
|
|
2582
2594
|
function interpolateFields_0($this, src, i1, i2, coef, dst, dstIdx) {
|
|
2583
|
-
var _iterator__ex2g4s = get_entries().
|
|
2584
|
-
while (_iterator__ex2g4s.
|
|
2585
|
-
var field = _iterator__ex2g4s.
|
|
2586
|
-
var v1 = src.
|
|
2587
|
-
var v2 = src.
|
|
2595
|
+
var _iterator__ex2g4s = get_entries().h();
|
|
2596
|
+
while (_iterator__ex2g4s.i()) {
|
|
2597
|
+
var field = _iterator__ex2g4s.j();
|
|
2598
|
+
var v1 = src.s1t(i1, field);
|
|
2599
|
+
var v2 = src.s1t(i2, field);
|
|
2588
2600
|
var v = isNaN_0(v1) || isNaN_0(v2) ? NaN : v1 + (v2 - v1) * coef;
|
|
2589
|
-
dst.
|
|
2601
|
+
dst.t1t(dstIdx, field, v);
|
|
2590
2602
|
}
|
|
2591
2603
|
}
|
|
2592
2604
|
function PointPerSecond() {
|
|
2593
2605
|
}
|
|
2594
|
-
protoOf(PointPerSecond).
|
|
2595
|
-
if (source.
|
|
2606
|
+
protoOf(PointPerSecond).l1r = function (source) {
|
|
2607
|
+
if (source.d1s_1 === 0)
|
|
2596
2608
|
return new Path(0);
|
|
2597
2609
|
var plan = buildPlan_0(this, source);
|
|
2598
2610
|
return materialize_0(this, source, plan);
|
|
@@ -2602,15 +2614,15 @@
|
|
|
2602
2614
|
return PointPerSecond_instance;
|
|
2603
2615
|
}
|
|
2604
2616
|
function computeWithWind($this, path, i, aeroCoef, wind) {
|
|
2605
|
-
var speed = path.
|
|
2606
|
-
var bearing = path.
|
|
2607
|
-
path.
|
|
2608
|
-
path.
|
|
2609
|
-
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.
|
|
2610
|
-
path.
|
|
2617
|
+
var speed = path.j1v(i);
|
|
2618
|
+
var bearing = path.o1u(i);
|
|
2619
|
+
path.p1v(i, wind.y1w_1);
|
|
2620
|
+
path.q1v(i, wind.z1w_1);
|
|
2621
|
+
var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.z1w_1;
|
|
2622
|
+
path.u1u(i, windDirectionAsBearing);
|
|
2611
2623
|
var alpha = windDirectionAsBearing - bearing;
|
|
2612
|
-
path.
|
|
2613
|
-
var v = wind.
|
|
2624
|
+
path.v1u(i, alpha);
|
|
2625
|
+
var v = wind.y1w_1;
|
|
2614
2626
|
// Inline function 'kotlin.math.cos' call
|
|
2615
2627
|
var l1 = speed + v * Math.cos(alpha);
|
|
2616
2628
|
var l2 = l1 * l1;
|
|
@@ -2625,21 +2637,21 @@
|
|
|
2625
2637
|
return tmp_1 * Math.sqrt(l3) * l1 * speed;
|
|
2626
2638
|
}
|
|
2627
2639
|
function AeroPowerProvider() {
|
|
2628
|
-
this.
|
|
2640
|
+
this.a1x_1 = 1.2;
|
|
2629
2641
|
}
|
|
2630
|
-
protoOf(AeroPowerProvider).
|
|
2631
|
-
var aeroCoef = course.
|
|
2632
|
-
path.
|
|
2633
|
-
var wind = course.
|
|
2642
|
+
protoOf(AeroPowerProvider).b1x = function (course, path, pointIndex) {
|
|
2643
|
+
var aeroCoef = course.m1p_1.c1x(course, path, pointIndex);
|
|
2644
|
+
path.t1u(pointIndex, aeroCoef);
|
|
2645
|
+
var wind = course.n1p_1.d1x(course.k1p_1, path, pointIndex);
|
|
2634
2646
|
var tmp;
|
|
2635
|
-
if (wind.
|
|
2636
|
-
var v = path.
|
|
2647
|
+
if (wind.y1w_1 === 0.0) {
|
|
2648
|
+
var v = path.j1v(pointIndex);
|
|
2637
2649
|
tmp = -aeroCoef * v * v * v;
|
|
2638
2650
|
} else {
|
|
2639
2651
|
tmp = computeWithWind(this, path, pointIndex, aeroCoef, wind);
|
|
2640
2652
|
}
|
|
2641
2653
|
var pAir = tmp;
|
|
2642
|
-
path.
|
|
2654
|
+
path.w1u(pointIndex, pAir);
|
|
2643
2655
|
return pAir;
|
|
2644
2656
|
};
|
|
2645
2657
|
var AeroPowerProvider_instance;
|
|
@@ -2648,17 +2660,17 @@
|
|
|
2648
2660
|
}
|
|
2649
2661
|
function AeroProviderConstant() {
|
|
2650
2662
|
}
|
|
2651
|
-
protoOf(AeroProviderConstant).
|
|
2652
|
-
var rho = course.
|
|
2653
|
-
return course.
|
|
2663
|
+
protoOf(AeroProviderConstant).c1x = function (course, path, pointIndex) {
|
|
2664
|
+
var rho = course.l1p_1.e1x(course.k1p_1, path, pointIndex);
|
|
2665
|
+
return course.q1p().w1p_1 * course.q1p().x1p_1 * rho / 2.0;
|
|
2654
2666
|
};
|
|
2655
2667
|
var AeroProviderConstant_instance;
|
|
2656
2668
|
function AeroProviderConstant_getInstance() {
|
|
2657
2669
|
return AeroProviderConstant_instance;
|
|
2658
2670
|
}
|
|
2659
2671
|
function Companion_6() {
|
|
2660
|
-
this.
|
|
2661
|
-
this.
|
|
2672
|
+
this.f1x_1 = 0.05;
|
|
2673
|
+
this.g1x_1 = 3.0;
|
|
2662
2674
|
}
|
|
2663
2675
|
var Companion_instance_6;
|
|
2664
2676
|
function Companion_getInstance_7() {
|
|
@@ -2666,10 +2678,10 @@
|
|
|
2666
2678
|
}
|
|
2667
2679
|
function CyclistPowerProviderBase(useHarmonics, random) {
|
|
2668
2680
|
random = random === VOID ? Default_getInstance() : random;
|
|
2669
|
-
this.
|
|
2681
|
+
this.h1x_1 = useHarmonics;
|
|
2670
2682
|
var tmp = this;
|
|
2671
2683
|
var tmp_0;
|
|
2672
|
-
if (this.
|
|
2684
|
+
if (this.h1x_1) {
|
|
2673
2685
|
// Inline function 'kotlin.collections.List' call
|
|
2674
2686
|
// Inline function 'kotlin.collections.MutableList' call
|
|
2675
2687
|
var list = ArrayList_init_$Create$(20);
|
|
@@ -2679,48 +2691,48 @@
|
|
|
2679
2691
|
do {
|
|
2680
2692
|
var index = inductionVariable;
|
|
2681
2693
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2682
|
-
var tmp$ret$4 = new Harmonic(1.0 + random.
|
|
2683
|
-
list.
|
|
2694
|
+
var tmp$ret$4 = new Harmonic(1.0 + random.qb() * 9.0, random.qb() * 3.141592653589793, random.qb() * 0.01);
|
|
2695
|
+
list.n(tmp$ret$4);
|
|
2684
2696
|
}
|
|
2685
2697
|
while (inductionVariable < 20);
|
|
2686
2698
|
tmp_0 = list;
|
|
2687
2699
|
} else {
|
|
2688
2700
|
tmp_0 = emptyList();
|
|
2689
2701
|
}
|
|
2690
|
-
tmp.
|
|
2691
|
-
}
|
|
2692
|
-
protoOf(CyclistPowerProviderBase).
|
|
2693
|
-
var power = this.
|
|
2694
|
-
path.
|
|
2695
|
-
if (this.
|
|
2696
|
-
var x = path.
|
|
2697
|
-
var _iterator__ex2g4s = this.
|
|
2698
|
-
while (_iterator__ex2g4s.
|
|
2699
|
-
var h = _iterator__ex2g4s.
|
|
2702
|
+
tmp.i1x_1 = tmp_0;
|
|
2703
|
+
}
|
|
2704
|
+
protoOf(CyclistPowerProviderBase).b1x = function (course, path, pointIndex) {
|
|
2705
|
+
var power = this.j1x(course, path, pointIndex);
|
|
2706
|
+
path.a1v(pointIndex, power);
|
|
2707
|
+
if (this.h1x_1) {
|
|
2708
|
+
var x = path.i1s(pointIndex) / 10000.0;
|
|
2709
|
+
var _iterator__ex2g4s = this.i1x_1.h();
|
|
2710
|
+
while (_iterator__ex2g4s.i()) {
|
|
2711
|
+
var h = _iterator__ex2g4s.j();
|
|
2700
2712
|
var tmp = power;
|
|
2701
|
-
var tmp_0 = h.
|
|
2713
|
+
var tmp_0 = h.m1x_1 * power;
|
|
2702
2714
|
// Inline function 'kotlin.math.cos' call
|
|
2703
|
-
var x_0 = h.
|
|
2715
|
+
var x_0 = h.k1x_1 * x - h.l1x_1;
|
|
2704
2716
|
power = tmp + tmp_0 * Math.cos(x_0);
|
|
2705
2717
|
}
|
|
2706
2718
|
}
|
|
2707
|
-
path.
|
|
2708
|
-
var powerNeeded = -PowerComputer_instance.
|
|
2709
|
-
path.
|
|
2719
|
+
path.b1v(pointIndex, power);
|
|
2720
|
+
var powerNeeded = -PowerComputer_instance.n1x(course, path, pointIndex, false);
|
|
2721
|
+
path.c1v(pointIndex, powerNeeded);
|
|
2710
2722
|
return power;
|
|
2711
2723
|
};
|
|
2712
2724
|
function GravPowerProvider() {
|
|
2713
2725
|
}
|
|
2714
|
-
protoOf(GravPowerProvider).
|
|
2715
|
-
var m = course.
|
|
2716
|
-
var grade = path.
|
|
2717
|
-
var speed = path.
|
|
2726
|
+
protoOf(GravPowerProvider).b1x = function (course, path, pointIndex) {
|
|
2727
|
+
var m = course.q1p().u1p_1;
|
|
2728
|
+
var grade = path.q1u(pointIndex);
|
|
2729
|
+
var speed = path.j1v(pointIndex);
|
|
2718
2730
|
var tmp = -m * 9.8 * speed;
|
|
2719
2731
|
// Inline function 'kotlin.math.atan' call
|
|
2720
2732
|
// Inline function 'kotlin.math.sin' call
|
|
2721
2733
|
var x = Math.atan(grade);
|
|
2722
2734
|
var p = tmp * Math.sin(x);
|
|
2723
|
-
path.
|
|
2735
|
+
path.x1u(pointIndex, p);
|
|
2724
2736
|
return p;
|
|
2725
2737
|
};
|
|
2726
2738
|
var GravPowerProvider_instance;
|
|
@@ -2728,17 +2740,17 @@
|
|
|
2728
2740
|
return GravPowerProvider_instance;
|
|
2729
2741
|
}
|
|
2730
2742
|
function Harmonic(freqRadS, phaseRad, amp) {
|
|
2731
|
-
this.
|
|
2732
|
-
this.
|
|
2733
|
-
this.
|
|
2743
|
+
this.k1x_1 = freqRadS;
|
|
2744
|
+
this.l1x_1 = phaseRad;
|
|
2745
|
+
this.m1x_1 = amp;
|
|
2734
2746
|
}
|
|
2735
2747
|
protoOf(Harmonic).toString = function () {
|
|
2736
|
-
return 'Harmonic(freqRadS=' + this.
|
|
2748
|
+
return 'Harmonic(freqRadS=' + this.k1x_1 + ', phaseRad=' + this.l1x_1 + ', amp=' + this.m1x_1 + ')';
|
|
2737
2749
|
};
|
|
2738
2750
|
protoOf(Harmonic).hashCode = function () {
|
|
2739
|
-
var result = getNumberHashCode(this.
|
|
2740
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2741
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2751
|
+
var result = getNumberHashCode(this.k1x_1);
|
|
2752
|
+
result = imul(result, 31) + getNumberHashCode(this.l1x_1) | 0;
|
|
2753
|
+
result = imul(result, 31) + getNumberHashCode(this.m1x_1) | 0;
|
|
2742
2754
|
return result;
|
|
2743
2755
|
};
|
|
2744
2756
|
protoOf(Harmonic).equals = function (other) {
|
|
@@ -2746,39 +2758,39 @@
|
|
|
2746
2758
|
return true;
|
|
2747
2759
|
if (!(other instanceof Harmonic))
|
|
2748
2760
|
return false;
|
|
2749
|
-
if (!equals(this.
|
|
2761
|
+
if (!equals(this.k1x_1, other.k1x_1))
|
|
2750
2762
|
return false;
|
|
2751
|
-
if (!equals(this.
|
|
2763
|
+
if (!equals(this.l1x_1, other.l1x_1))
|
|
2752
2764
|
return false;
|
|
2753
|
-
if (!equals(this.
|
|
2765
|
+
if (!equals(this.m1x_1, other.m1x_1))
|
|
2754
2766
|
return false;
|
|
2755
2767
|
return true;
|
|
2756
2768
|
};
|
|
2757
2769
|
function computeCorneringLimit($this, course, currentIndex, window_0) {
|
|
2758
|
-
var path = course.
|
|
2770
|
+
var path = course.e1p_1;
|
|
2759
2771
|
var radius = computeRadiusWindowed($this, path, currentIndex, window_0);
|
|
2760
2772
|
// Inline function 'kotlin.math.sqrt' call
|
|
2761
|
-
var x = 9.8 * radius * course.
|
|
2773
|
+
var x = 9.8 * radius * course.f1p_1.a1q();
|
|
2762
2774
|
var vMax = Math.sqrt(x);
|
|
2763
2775
|
// Inline function 'kotlin.math.min' call
|
|
2764
|
-
var a = course.
|
|
2776
|
+
var a = course.f1p_1.c1q();
|
|
2765
2777
|
var result = Math.min(a, vMax);
|
|
2766
|
-
path.
|
|
2778
|
+
path.n1v(currentIndex, result);
|
|
2767
2779
|
return result;
|
|
2768
2780
|
}
|
|
2769
2781
|
function computeRadiusWindowed($this, path, i, k) {
|
|
2770
2782
|
// Inline function 'kotlin.math.max' call
|
|
2771
2783
|
var b = i - k | 0;
|
|
2772
2784
|
var mini = Math.max(0, b);
|
|
2773
|
-
var tmp0 = path.
|
|
2785
|
+
var tmp0 = path.d1s_1 - 1 | 0;
|
|
2774
2786
|
// Inline function 'kotlin.math.min' call
|
|
2775
2787
|
var b_0 = i + k | 0;
|
|
2776
2788
|
var maxi = Math.min(tmp0, b_0);
|
|
2777
|
-
var totalBearingChange = $this.
|
|
2778
|
-
var totalDistance = path.
|
|
2789
|
+
var totalBearingChange = $this.o1x(path.o1u(maxi) - path.o1u(mini));
|
|
2790
|
+
var totalDistance = path.h1u(maxi) - path.h1u(mini);
|
|
2779
2791
|
// Inline function 'kotlin.math.abs' call
|
|
2780
2792
|
if (Math.abs(totalBearingChange) < 0.001) {
|
|
2781
|
-
path.
|
|
2793
|
+
path.s1u(i, 200.0);
|
|
2782
2794
|
return 200.0;
|
|
2783
2795
|
}
|
|
2784
2796
|
// Inline function 'kotlin.math.abs' call
|
|
@@ -2787,47 +2799,47 @@
|
|
|
2787
2799
|
// Inline function 'kotlin.math.max' call
|
|
2788
2800
|
var b_1 = Math.min(200.0, raw);
|
|
2789
2801
|
var clamped = Math.max(5.0, b_1);
|
|
2790
|
-
path.
|
|
2802
|
+
path.s1u(i, clamped);
|
|
2791
2803
|
return clamped;
|
|
2792
2804
|
}
|
|
2793
2805
|
function computeBrakingLimit($this, course, currentIndex, nextIndex) {
|
|
2794
|
-
var path = course.
|
|
2795
|
-
var vf = path.
|
|
2796
|
-
var a = course.
|
|
2797
|
-
var d = path.
|
|
2806
|
+
var path = course.e1p_1;
|
|
2807
|
+
var vf = path.l1v(nextIndex);
|
|
2808
|
+
var a = course.f1p_1.b1q();
|
|
2809
|
+
var d = path.h1u(nextIndex) - path.h1u(currentIndex);
|
|
2798
2810
|
// Inline function 'kotlin.math.sqrt' call
|
|
2799
2811
|
var x = vf * vf + 2.0 * a * d;
|
|
2800
2812
|
return Math.sqrt(x);
|
|
2801
2813
|
}
|
|
2802
2814
|
function MaxSpeedComputer() {
|
|
2803
|
-
this.
|
|
2804
|
-
this.
|
|
2805
|
-
this.
|
|
2806
|
-
this.
|
|
2807
|
-
this.
|
|
2808
|
-
}
|
|
2809
|
-
protoOf(MaxSpeedComputer).
|
|
2810
|
-
var path = course.
|
|
2811
|
-
var n = path.
|
|
2815
|
+
this.d1r_1 = 200.0;
|
|
2816
|
+
this.e1r_1 = 5.0;
|
|
2817
|
+
this.f1r_1 = 2.0;
|
|
2818
|
+
this.g1r_1 = 0.001;
|
|
2819
|
+
this.h1r_1 = 10;
|
|
2820
|
+
}
|
|
2821
|
+
protoOf(MaxSpeedComputer).i1r = function (course) {
|
|
2822
|
+
var path = course.e1p_1;
|
|
2823
|
+
var n = path.d1s_1;
|
|
2812
2824
|
var inductionVariable = n - 1 | 0;
|
|
2813
2825
|
if (0 <= inductionVariable)
|
|
2814
2826
|
do {
|
|
2815
2827
|
var i = inductionVariable;
|
|
2816
2828
|
inductionVariable = inductionVariable + -1 | 0;
|
|
2817
2829
|
if (i === (n - 1 | 0)) {
|
|
2818
|
-
path.
|
|
2830
|
+
path.m1v(i, 2.0);
|
|
2819
2831
|
} else {
|
|
2820
2832
|
var cornering = computeCorneringLimit(this, course, i, 10);
|
|
2821
2833
|
var braking = computeBrakingLimit(this, course, i, i + 1 | 0);
|
|
2822
2834
|
// Inline function 'kotlin.math.min' call
|
|
2823
2835
|
var tmp$ret$0 = Math.min(cornering, braking);
|
|
2824
|
-
path.
|
|
2836
|
+
path.m1v(i, tmp$ret$0);
|
|
2825
2837
|
}
|
|
2826
2838
|
}
|
|
2827
2839
|
while (0 <= inductionVariable);
|
|
2828
|
-
path.
|
|
2840
|
+
path.j1t();
|
|
2829
2841
|
};
|
|
2830
|
-
protoOf(MaxSpeedComputer).
|
|
2842
|
+
protoOf(MaxSpeedComputer).o1x = function (angleIn) {
|
|
2831
2843
|
var a = angleIn;
|
|
2832
2844
|
while (a > 3.141592653589793)
|
|
2833
2845
|
a = a - 2.0 * 3.141592653589793;
|
|
@@ -2841,11 +2853,11 @@
|
|
|
2841
2853
|
}
|
|
2842
2854
|
function MuscularPowerProvider() {
|
|
2843
2855
|
}
|
|
2844
|
-
protoOf(MuscularPowerProvider).
|
|
2845
|
-
var muscular = course.
|
|
2846
|
-
path.
|
|
2847
|
-
var wheel = muscular * course.
|
|
2848
|
-
path.
|
|
2856
|
+
protoOf(MuscularPowerProvider).b1x = function (course, path, pointIndex) {
|
|
2857
|
+
var muscular = course.o1p_1.b1x(course, path, pointIndex);
|
|
2858
|
+
path.d1v(pointIndex, muscular);
|
|
2859
|
+
var wheel = muscular * course.r1p().c1p_1;
|
|
2860
|
+
path.e1v(pointIndex, wheel);
|
|
2849
2861
|
return wheel;
|
|
2850
2862
|
};
|
|
2851
2863
|
var MuscularPowerProvider_instance;
|
|
@@ -2858,7 +2870,7 @@
|
|
|
2858
2870
|
var tol = dx / 1.0E7;
|
|
2859
2871
|
while (dt2 - dt1 >= tol) {
|
|
2860
2872
|
var dtMid = (dt1 + dt2) / 2.0;
|
|
2861
|
-
var dxMid = $this.
|
|
2873
|
+
var dxMid = $this.p1x(pSum, equivalentMass, currentSpeed, dtMid);
|
|
2862
2874
|
if (dxMid < dx)
|
|
2863
2875
|
dt1 = dtMid;
|
|
2864
2876
|
else
|
|
@@ -2868,18 +2880,18 @@
|
|
|
2868
2880
|
}
|
|
2869
2881
|
function PowerComputer() {
|
|
2870
2882
|
}
|
|
2871
|
-
protoOf(PowerComputer).
|
|
2883
|
+
protoOf(PowerComputer).n1x = function (course, path, pointIndex, withCyclist) {
|
|
2872
2884
|
var pSum = 0.0;
|
|
2873
|
-
pSum = pSum + WheelBearingsPowerProvider_instance.
|
|
2874
|
-
pSum = pSum + RollingResistancePowerProvider_instance.
|
|
2875
|
-
pSum = pSum + AeroPowerProvider_instance.
|
|
2876
|
-
pSum = pSum + GravPowerProvider_instance.
|
|
2885
|
+
pSum = pSum + WheelBearingsPowerProvider_instance.b1x(course, path, pointIndex);
|
|
2886
|
+
pSum = pSum + RollingResistancePowerProvider_instance.b1x(course, path, pointIndex);
|
|
2887
|
+
pSum = pSum + AeroPowerProvider_instance.b1x(course, path, pointIndex);
|
|
2888
|
+
pSum = pSum + GravPowerProvider_instance.b1x(course, path, pointIndex);
|
|
2877
2889
|
if (withCyclist) {
|
|
2878
|
-
pSum = pSum + MuscularPowerProvider_instance.
|
|
2890
|
+
pSum = pSum + MuscularPowerProvider_instance.b1x(course, path, pointIndex);
|
|
2879
2891
|
}
|
|
2880
2892
|
return pSum;
|
|
2881
2893
|
};
|
|
2882
|
-
protoOf(PowerComputer).
|
|
2894
|
+
protoOf(PowerComputer).p1x = function (pSum, equivalentMass, currentSpeed, dt) {
|
|
2883
2895
|
// Inline function 'kotlin.math.sqrt' call
|
|
2884
2896
|
var x = dt * pSum / (0.5 * equivalentMass) + currentSpeed * currentSpeed;
|
|
2885
2897
|
var tmp0 = Math.sqrt(x);
|
|
@@ -2888,40 +2900,40 @@
|
|
|
2888
2900
|
var newSpeed = Math.max(tmp0, b);
|
|
2889
2901
|
return (currentSpeed + newSpeed) * dt / 2.0;
|
|
2890
2902
|
};
|
|
2891
|
-
protoOf(PowerComputer).
|
|
2903
|
+
protoOf(PowerComputer).q1x = function (equivalentMass, s1, s2, dt) {
|
|
2892
2904
|
return 0.5 * equivalentMass * (s2 * s2 - s1 * s1) / dt;
|
|
2893
2905
|
};
|
|
2894
|
-
protoOf(PowerComputer).
|
|
2906
|
+
protoOf(PowerComputer).r1x = function (pSum, equivalentMass, currentSpeed, dx) {
|
|
2895
2907
|
var dt = 0.1;
|
|
2896
|
-
while (this.
|
|
2908
|
+
while (this.p1x(pSum, equivalentMass, currentSpeed, dt) <= dx) {
|
|
2897
2909
|
dt = dt + 0.1;
|
|
2898
2910
|
}
|
|
2899
2911
|
return getDtInner(this, pSum, equivalentMass, currentSpeed, dx, dt - 0.1, dt);
|
|
2900
2912
|
};
|
|
2901
|
-
protoOf(PowerComputer).
|
|
2913
|
+
protoOf(PowerComputer).s1x = function (course, path, equivalentMass, i) {
|
|
2902
2914
|
if (i === 0) {
|
|
2903
|
-
path.
|
|
2915
|
+
path.i1v(i, 0.0);
|
|
2904
2916
|
return Unit_instance;
|
|
2905
2917
|
}
|
|
2906
|
-
var resistive = this.
|
|
2907
|
-
var s1 = path.
|
|
2908
|
-
var s2 = path.
|
|
2909
|
-
var dtSeconds = path.
|
|
2910
|
-
var totPower = this.
|
|
2911
|
-
path.
|
|
2918
|
+
var resistive = this.n1x(course, path, i - 1 | 0, false);
|
|
2919
|
+
var s1 = path.j1v(i - 1 | 0);
|
|
2920
|
+
var s2 = path.j1v(i);
|
|
2921
|
+
var dtSeconds = path.m1u(i) / 1000.0;
|
|
2922
|
+
var totPower = this.q1x(equivalentMass, s1, s2, dtSeconds);
|
|
2923
|
+
path.f1v(i, totPower);
|
|
2912
2924
|
var powerWheel = totPower - resistive;
|
|
2913
|
-
path.
|
|
2925
|
+
path.g1v(i, powerWheel);
|
|
2914
2926
|
// Inline function 'kotlin.math.max' call
|
|
2915
|
-
var computed = Math.max(0.0, powerWheel) / course.
|
|
2916
|
-
path.
|
|
2927
|
+
var computed = Math.max(0.0, powerWheel) / course.r1p().c1p_1;
|
|
2928
|
+
path.i1v(i, computed);
|
|
2917
2929
|
};
|
|
2918
|
-
protoOf(PowerComputer).
|
|
2919
|
-
var m = course.
|
|
2920
|
-
var totalInertia = course.
|
|
2921
|
-
return m + totalInertia / (course.
|
|
2930
|
+
protoOf(PowerComputer).t1x = function (course) {
|
|
2931
|
+
var m = course.f1p_1.u1p_1;
|
|
2932
|
+
var totalInertia = course.g1p_1.z1o_1 + course.g1p_1.a1p_1;
|
|
2933
|
+
return m + totalInertia / (course.g1p_1.b1p_1 * course.g1p_1.b1p_1);
|
|
2922
2934
|
};
|
|
2923
|
-
protoOf(PowerComputer).
|
|
2924
|
-
return this.
|
|
2935
|
+
protoOf(PowerComputer).u1x = function (course) {
|
|
2936
|
+
return this.t1x(course.k1p_1);
|
|
2925
2937
|
};
|
|
2926
2938
|
var PowerComputer_instance;
|
|
2927
2939
|
function PowerComputer_getInstance() {
|
|
@@ -2931,14 +2943,42 @@
|
|
|
2931
2943
|
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2932
2944
|
random = random === VOID ? Default_getInstance() : random;
|
|
2933
2945
|
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
2934
|
-
this.
|
|
2946
|
+
this.x1x_1 = power;
|
|
2935
2947
|
}
|
|
2936
|
-
protoOf(PowerProviderConstant).
|
|
2937
|
-
return this.
|
|
2948
|
+
protoOf(PowerProviderConstant).j1x = function (course, path, pointIndex) {
|
|
2949
|
+
return this.x1x_1;
|
|
2938
2950
|
};
|
|
2951
|
+
function PowerProviderConstantWithTiring(power, useHarmonics, durationSeconds, random) {
|
|
2952
|
+
useHarmonics = useHarmonics === VOID ? false : useHarmonics;
|
|
2953
|
+
random = random === VOID ? Default_getInstance() : random;
|
|
2954
|
+
CyclistPowerProviderBase.call(this, useHarmonics, random);
|
|
2955
|
+
this.a1y_1 = power;
|
|
2956
|
+
this.b1y_1 = durationSeconds;
|
|
2957
|
+
// Inline function 'kotlin.require' call
|
|
2958
|
+
if (!(this.b1y_1 > 0.0)) {
|
|
2959
|
+
var message = 'durationSeconds must be > 0, got ' + this.b1y_1;
|
|
2960
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
protoOf(PowerProviderConstantWithTiring).j1x = function (course, path, pointIndex) {
|
|
2964
|
+
var elapsedS = path.k1u(pointIndex) / 1000.0;
|
|
2965
|
+
// Inline function 'kotlin.math.max' call
|
|
2966
|
+
var b = 1.0 - 0.6 * elapsedS / this.b1y_1;
|
|
2967
|
+
var c = Math.max(0.5, b);
|
|
2968
|
+
return this.a1y_1 * c;
|
|
2969
|
+
};
|
|
2970
|
+
function PowerProviderFromData() {
|
|
2971
|
+
}
|
|
2972
|
+
protoOf(PowerProviderFromData).b1x = function (course, path, pointIndex) {
|
|
2973
|
+
return path.m1s(pointIndex);
|
|
2974
|
+
};
|
|
2975
|
+
var PowerProviderFromData_instance;
|
|
2976
|
+
function PowerProviderFromData_getInstance() {
|
|
2977
|
+
return PowerProviderFromData_instance;
|
|
2978
|
+
}
|
|
2939
2979
|
function RhoProviderDefault() {
|
|
2940
2980
|
}
|
|
2941
|
-
protoOf(RhoProviderDefault).
|
|
2981
|
+
protoOf(RhoProviderDefault).e1x = function (course, path, pointIndex) {
|
|
2942
2982
|
return 1.225;
|
|
2943
2983
|
};
|
|
2944
2984
|
var RhoProviderDefault_instance;
|
|
@@ -2946,16 +2986,16 @@
|
|
|
2946
2986
|
return RhoProviderDefault_instance;
|
|
2947
2987
|
}
|
|
2948
2988
|
function RhoProviderEstimate() {
|
|
2949
|
-
this.
|
|
2950
|
-
this.
|
|
2951
|
-
this.
|
|
2952
|
-
this.
|
|
2953
|
-
this.
|
|
2954
|
-
}
|
|
2955
|
-
protoOf(RhoProviderEstimate).
|
|
2956
|
-
var providedTemp = path.
|
|
2989
|
+
this.c1y_1 = 101325.0;
|
|
2990
|
+
this.d1y_1 = 288.15;
|
|
2991
|
+
this.e1y_1 = 9.80665;
|
|
2992
|
+
this.f1y_1 = 0.0065;
|
|
2993
|
+
this.g1y_1 = 287.05;
|
|
2994
|
+
}
|
|
2995
|
+
protoOf(RhoProviderEstimate).e1x = function (course, path, pointIndex) {
|
|
2996
|
+
var providedTemp = path.s1t(pointIndex, PointField_TEMPERATURE_getInstance());
|
|
2957
2997
|
var temperatureC = isNaN_0(providedTemp) || providedTemp === 0.0 ? 15.0 : providedTemp;
|
|
2958
|
-
var providedElevation = path.
|
|
2998
|
+
var providedElevation = path.h1s(pointIndex);
|
|
2959
2999
|
var altitude = isNaN_0(providedElevation) ? 0.0 : providedElevation;
|
|
2960
3000
|
var tKelvin = temperatureC + 273.15;
|
|
2961
3001
|
var tmp0 = 1.0 - 0.0065 * altitude / 288.15;
|
|
@@ -2970,17 +3010,17 @@
|
|
|
2970
3010
|
}
|
|
2971
3011
|
function RollingResistancePowerProvider() {
|
|
2972
3012
|
}
|
|
2973
|
-
protoOf(RollingResistancePowerProvider).
|
|
2974
|
-
var m = course.
|
|
2975
|
-
var crr = course.
|
|
2976
|
-
var grade = path.
|
|
2977
|
-
var speed = path.
|
|
3013
|
+
protoOf(RollingResistancePowerProvider).b1x = function (course, path, pointIndex) {
|
|
3014
|
+
var m = course.q1p().u1p_1;
|
|
3015
|
+
var crr = course.r1p().y1o_1;
|
|
3016
|
+
var grade = path.q1u(pointIndex);
|
|
3017
|
+
var speed = path.j1v(pointIndex);
|
|
2978
3018
|
// Inline function 'kotlin.math.atan' call
|
|
2979
3019
|
// Inline function 'kotlin.math.cos' call
|
|
2980
3020
|
var x = Math.atan(grade);
|
|
2981
3021
|
var coef = Math.cos(x);
|
|
2982
3022
|
var p = -coef * m * 9.8 * speed * crr;
|
|
2983
|
-
path.
|
|
3023
|
+
path.y1u(pointIndex, p);
|
|
2984
3024
|
return p;
|
|
2985
3025
|
};
|
|
2986
3026
|
var RollingResistancePowerProvider_instance;
|
|
@@ -2988,18 +3028,18 @@
|
|
|
2988
3028
|
return RollingResistancePowerProvider_instance;
|
|
2989
3029
|
}
|
|
2990
3030
|
function copyAllFields($this, src, i, dst, j) {
|
|
2991
|
-
var _iterator__ex2g4s = get_entries().
|
|
2992
|
-
while (_iterator__ex2g4s.
|
|
2993
|
-
var field = _iterator__ex2g4s.
|
|
2994
|
-
dst.
|
|
3031
|
+
var _iterator__ex2g4s = get_entries().h();
|
|
3032
|
+
while (_iterator__ex2g4s.i()) {
|
|
3033
|
+
var field = _iterator__ex2g4s.j();
|
|
3034
|
+
dst.t1t(j, field, src.s1t(i, field));
|
|
2995
3035
|
}
|
|
2996
3036
|
}
|
|
2997
3037
|
function VirtualizeService() {
|
|
2998
|
-
this.
|
|
3038
|
+
this.j1r_1 = 100000;
|
|
2999
3039
|
}
|
|
3000
|
-
protoOf(VirtualizeService).
|
|
3001
|
-
var input = course.
|
|
3002
|
-
var n = input.
|
|
3040
|
+
protoOf(VirtualizeService).k1r = function (course) {
|
|
3041
|
+
var input = course.p1p();
|
|
3042
|
+
var n = input.d1s_1;
|
|
3003
3043
|
if (n === 0)
|
|
3004
3044
|
return new Path(0);
|
|
3005
3045
|
if (n === 1) {
|
|
@@ -3007,54 +3047,54 @@
|
|
|
3007
3047
|
copyAllFields(this, input, 0, singleton, 0);
|
|
3008
3048
|
return singleton;
|
|
3009
3049
|
}
|
|
3010
|
-
var mEq = PowerComputer_instance.
|
|
3050
|
+
var mEq = PowerComputer_instance.u1x(course);
|
|
3011
3051
|
var out = new Path(n);
|
|
3012
3052
|
copyAllFields(this, input, 0, out, 0);
|
|
3013
3053
|
var speed = 0.5555555555555556;
|
|
3014
3054
|
var startTimeMs = 0.0;
|
|
3015
3055
|
var timeMs = startTimeMs;
|
|
3016
|
-
out.
|
|
3017
|
-
out.
|
|
3018
|
-
out.
|
|
3019
|
-
out.
|
|
3056
|
+
out.v1s(0, timeMs);
|
|
3057
|
+
out.l1u(0, 0.0);
|
|
3058
|
+
out.k1v(0, speed);
|
|
3059
|
+
out.o1v(0, speed);
|
|
3020
3060
|
var i = 1;
|
|
3021
3061
|
var iter = 0;
|
|
3022
3062
|
$l$loop: while (i < n) {
|
|
3023
|
-
var dx = input.
|
|
3024
|
-
var pSum = PowerComputer_instance.
|
|
3025
|
-
var dt = PowerComputer_instance.
|
|
3063
|
+
var dx = input.h1u(i) - input.h1u(i - 1 | 0);
|
|
3064
|
+
var pSum = PowerComputer_instance.n1x(course, out, i - 1 | 0, true);
|
|
3065
|
+
var dt = PowerComputer_instance.r1x(pSum, mEq, speed, dx);
|
|
3026
3066
|
var speedNew = 2.0 * dx / dt - speed;
|
|
3027
3067
|
copyAllFields(this, input, i, out, i);
|
|
3028
|
-
var speedMax = input.
|
|
3068
|
+
var speedMax = input.l1v(i);
|
|
3029
3069
|
if (speedNew > speedMax) {
|
|
3030
3070
|
speedNew = speedMax;
|
|
3031
3071
|
dt = 2.0 * dx / (speedNew + speed);
|
|
3032
3072
|
}
|
|
3033
3073
|
speed = speedNew;
|
|
3034
3074
|
timeMs = timeMs + dt * 1000.0;
|
|
3035
|
-
out.
|
|
3036
|
-
out.
|
|
3037
|
-
out.
|
|
3038
|
-
out.
|
|
3039
|
-
out.
|
|
3040
|
-
out.
|
|
3075
|
+
out.v1s(i, timeMs);
|
|
3076
|
+
out.l1u(i, timeMs - startTimeMs);
|
|
3077
|
+
out.j1u(i, dx);
|
|
3078
|
+
out.n1u(i, dt * 1000.0);
|
|
3079
|
+
out.k1v(i, speed);
|
|
3080
|
+
out.o1v(i, speed);
|
|
3041
3081
|
i = i + 1 | 0;
|
|
3042
3082
|
var _unary__edvuaz = iter;
|
|
3043
3083
|
iter = _unary__edvuaz + 1 | 0;
|
|
3044
3084
|
if (_unary__edvuaz > 100000)
|
|
3045
3085
|
break $l$loop;
|
|
3046
3086
|
}
|
|
3047
|
-
var progression = out.
|
|
3048
|
-
var inductionVariable = progression.
|
|
3049
|
-
var last = progression.
|
|
3087
|
+
var progression = out.w1v();
|
|
3088
|
+
var inductionVariable = progression.bc_1;
|
|
3089
|
+
var last = progression.cc_1;
|
|
3050
3090
|
if (inductionVariable <= last)
|
|
3051
3091
|
do {
|
|
3052
3092
|
var j = inductionVariable;
|
|
3053
3093
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3054
|
-
PowerComputer_instance.
|
|
3094
|
+
PowerComputer_instance.s1x(course, out, mEq, j);
|
|
3055
3095
|
}
|
|
3056
3096
|
while (!(j === last));
|
|
3057
|
-
out.
|
|
3097
|
+
out.j1t();
|
|
3058
3098
|
return out;
|
|
3059
3099
|
};
|
|
3060
3100
|
var VirtualizeService_instance;
|
|
@@ -3063,10 +3103,10 @@
|
|
|
3063
3103
|
}
|
|
3064
3104
|
function WheelBearingsPowerProvider() {
|
|
3065
3105
|
}
|
|
3066
|
-
protoOf(WheelBearingsPowerProvider).
|
|
3067
|
-
var speed = path.
|
|
3106
|
+
protoOf(WheelBearingsPowerProvider).b1x = function (course, path, pointIndex) {
|
|
3107
|
+
var speed = path.j1v(pointIndex);
|
|
3068
3108
|
var p = -speed * (91.0 + 8.7 * speed) / 1000.0;
|
|
3069
|
-
path.
|
|
3109
|
+
path.z1u(pointIndex, p);
|
|
3070
3110
|
return p;
|
|
3071
3111
|
};
|
|
3072
3112
|
var WheelBearingsPowerProvider_instance;
|
|
@@ -3075,7 +3115,7 @@
|
|
|
3075
3115
|
}
|
|
3076
3116
|
function Companion_7() {
|
|
3077
3117
|
Companion_instance_7 = this;
|
|
3078
|
-
this.
|
|
3118
|
+
this.h1y_1 = new Wind(0.0, 0.0);
|
|
3079
3119
|
}
|
|
3080
3120
|
var Companion_instance_7;
|
|
3081
3121
|
function Companion_getInstance_8() {
|
|
@@ -3085,15 +3125,15 @@
|
|
|
3085
3125
|
}
|
|
3086
3126
|
function Wind(speedMS, directionRad) {
|
|
3087
3127
|
Companion_getInstance_8();
|
|
3088
|
-
this.
|
|
3089
|
-
this.
|
|
3128
|
+
this.y1w_1 = speedMS;
|
|
3129
|
+
this.z1w_1 = directionRad;
|
|
3090
3130
|
}
|
|
3091
3131
|
protoOf(Wind).toString = function () {
|
|
3092
|
-
return 'Wind(speedMS=' + this.
|
|
3132
|
+
return 'Wind(speedMS=' + this.y1w_1 + ', directionRad=' + this.z1w_1 + ')';
|
|
3093
3133
|
};
|
|
3094
3134
|
protoOf(Wind).hashCode = function () {
|
|
3095
|
-
var result = getNumberHashCode(this.
|
|
3096
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3135
|
+
var result = getNumberHashCode(this.y1w_1);
|
|
3136
|
+
result = imul(result, 31) + getNumberHashCode(this.z1w_1) | 0;
|
|
3097
3137
|
return result;
|
|
3098
3138
|
};
|
|
3099
3139
|
protoOf(Wind).equals = function (other) {
|
|
@@ -3101,49 +3141,100 @@
|
|
|
3101
3141
|
return true;
|
|
3102
3142
|
if (!(other instanceof Wind))
|
|
3103
3143
|
return false;
|
|
3104
|
-
if (!equals(this.
|
|
3144
|
+
if (!equals(this.y1w_1, other.y1w_1))
|
|
3105
3145
|
return false;
|
|
3106
|
-
if (!equals(this.
|
|
3146
|
+
if (!equals(this.z1w_1, other.z1w_1))
|
|
3107
3147
|
return false;
|
|
3108
3148
|
return true;
|
|
3109
3149
|
};
|
|
3110
3150
|
function WindProviderNone() {
|
|
3111
3151
|
}
|
|
3112
|
-
protoOf(WindProviderNone).
|
|
3113
|
-
return Companion_getInstance_8().
|
|
3152
|
+
protoOf(WindProviderNone).d1x = function (course, path, pointIndex) {
|
|
3153
|
+
return Companion_getInstance_8().h1y_1;
|
|
3114
3154
|
};
|
|
3115
3155
|
var WindProviderNone_instance;
|
|
3116
3156
|
function WindProviderNone_getInstance() {
|
|
3117
3157
|
return WindProviderNone_instance;
|
|
3118
3158
|
}
|
|
3159
|
+
function WindProviderConstant(wind) {
|
|
3160
|
+
this.i1y_1 = wind;
|
|
3161
|
+
}
|
|
3162
|
+
protoOf(WindProviderConstant).d1x = function (course, path, pointIndex) {
|
|
3163
|
+
return this.i1y_1;
|
|
3164
|
+
};
|
|
3119
3165
|
function parseGpx(xml) {
|
|
3120
|
-
return firstTrackAsPath(GpxParser_instance.
|
|
3166
|
+
return firstTrackAsPath(GpxParser_instance.r1s(xml));
|
|
3121
3167
|
}
|
|
3122
3168
|
function pathSize(path) {
|
|
3123
|
-
return path.
|
|
3169
|
+
return path.d1s_1;
|
|
3124
3170
|
}
|
|
3125
3171
|
function pathTotalDistance(path) {
|
|
3126
|
-
return path.
|
|
3172
|
+
return path.c1t_1;
|
|
3127
3173
|
}
|
|
3128
3174
|
function pathDurationMs(path) {
|
|
3129
|
-
return path.
|
|
3175
|
+
return path.h1t_1;
|
|
3130
3176
|
}
|
|
3131
3177
|
function pathElevationGain(path) {
|
|
3132
|
-
return path.
|
|
3178
|
+
return path.f1t_1;
|
|
3133
3179
|
}
|
|
3134
3180
|
function pathElevationLoss(path) {
|
|
3135
|
-
return path.
|
|
3181
|
+
return path.g1t_1;
|
|
3136
3182
|
}
|
|
3137
3183
|
function pointAt(path, i) {
|
|
3138
|
-
return pointObj(path.
|
|
3184
|
+
return pointObj(path.x1v(i), path.y1v(i), path.h1s(i), path.i1s(i), path.j1v(i), path.h1v(i), path.h1u(i), path.q1u(i));
|
|
3139
3185
|
}
|
|
3140
3186
|
function writeGpx(path) {
|
|
3141
|
-
return GpxWriter_instance.
|
|
3187
|
+
return GpxWriter_instance.r1t(toGpxDocument(path, VOID, 'virtualized'));
|
|
3142
3188
|
}
|
|
3143
3189
|
function enhance(path, options) {
|
|
3144
3190
|
var tmp = GlobalScope_instance;
|
|
3145
3191
|
return promise(tmp, VOID, VOID, enhance$slambda_0(options, path, null));
|
|
3146
3192
|
}
|
|
3193
|
+
function enhanceWithCourse(path, cyclist, bike, wind, power, options) {
|
|
3194
|
+
var tmp = GlobalScope_instance;
|
|
3195
|
+
return promise(tmp, VOID, VOID, enhanceWithCourse$slambda_0(options, path, cyclist, bike, wind, power, null));
|
|
3196
|
+
}
|
|
3197
|
+
function getField(path, i, fieldProp) {
|
|
3198
|
+
var tmp0_elvis_lhs = Companion_getInstance_6().k1w(fieldProp);
|
|
3199
|
+
var tmp;
|
|
3200
|
+
if (tmp0_elvis_lhs == null) {
|
|
3201
|
+
// Inline function 'kotlin.error' call
|
|
3202
|
+
var message = 'Unknown PointField prop: ' + fieldProp;
|
|
3203
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3204
|
+
} else {
|
|
3205
|
+
tmp = tmp0_elvis_lhs;
|
|
3206
|
+
}
|
|
3207
|
+
var field = tmp;
|
|
3208
|
+
return path.s1t(i, field);
|
|
3209
|
+
}
|
|
3210
|
+
function fieldDefinitions() {
|
|
3211
|
+
// Inline function 'kotlin.collections.map' call
|
|
3212
|
+
var this_0 = get_entries();
|
|
3213
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
3214
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
3215
|
+
var _iterator__ex2g4s = this_0.h();
|
|
3216
|
+
while (_iterator__ex2g4s.i()) {
|
|
3217
|
+
var item = _iterator__ex2g4s.j();
|
|
3218
|
+
var o = {};
|
|
3219
|
+
o.prop = item.e1w_1;
|
|
3220
|
+
o.unit = item.f1w_1;
|
|
3221
|
+
o.shortDescription = item.g1w_1;
|
|
3222
|
+
o.categoryId = item.h1w_1.n1w_1;
|
|
3223
|
+
o.categoryName = item.h1w_1.o1w_1;
|
|
3224
|
+
o.notSelectable = item.i1w_1;
|
|
3225
|
+
o.anglesInRadians = item.j1w_1;
|
|
3226
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
3227
|
+
destination.n(o);
|
|
3228
|
+
}
|
|
3229
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
3230
|
+
return copyToArray(destination);
|
|
3231
|
+
}
|
|
3232
|
+
function pathLatitudeDeg(path, i) {
|
|
3233
|
+
return path.x1v(i);
|
|
3234
|
+
}
|
|
3235
|
+
function pathLongitudeDeg(path, i) {
|
|
3236
|
+
return path.y1v(i);
|
|
3237
|
+
}
|
|
3147
3238
|
function pointObj(latitudeDeg, longitudeDeg, elevation, timeMs, speed, pComputedPower, distance, grade) {
|
|
3148
3239
|
var o = {};
|
|
3149
3240
|
o.latitudeDeg = latitudeDeg;
|
|
@@ -3178,32 +3269,77 @@
|
|
|
3178
3269
|
function defaultJsOptions() {
|
|
3179
3270
|
return new EnhanceOptions(false, true, true, false, new SimplifyPathOptions(false));
|
|
3180
3271
|
}
|
|
3272
|
+
function toCyclist(_this__u8e3s4) {
|
|
3273
|
+
if (_this__u8e3s4 == null)
|
|
3274
|
+
return new Cyclist();
|
|
3275
|
+
return new Cyclist(_this__u8e3s4.massKg, _this__u8e3s4.maxBrakeG, _this__u8e3s4.cd, _this__u8e3s4.frontalAreaM2, _this__u8e3s4.maxLeanAngleDeg, _this__u8e3s4.maxSpeedKmH);
|
|
3276
|
+
}
|
|
3277
|
+
function toBike(_this__u8e3s4) {
|
|
3278
|
+
if (_this__u8e3s4 == null)
|
|
3279
|
+
return new Bike();
|
|
3280
|
+
return new Bike(_this__u8e3s4.crr, _this__u8e3s4.inertiaFront, _this__u8e3s4.inertiaRear, _this__u8e3s4.wheelRadiusM, _this__u8e3s4.efficiency);
|
|
3281
|
+
}
|
|
3282
|
+
function toWindProvider(_this__u8e3s4) {
|
|
3283
|
+
if (_this__u8e3s4 == null)
|
|
3284
|
+
return WindProviderNone_instance;
|
|
3285
|
+
return new WindProviderConstant(new Wind(_this__u8e3s4.windSpeed, _this__u8e3s4.windDirection * 3.141592653589793 / 180.0));
|
|
3286
|
+
}
|
|
3287
|
+
function toCyclistPowerProvider(_this__u8e3s4) {
|
|
3288
|
+
if (_this__u8e3s4 == null)
|
|
3289
|
+
return new PowerProviderConstant(250.0, false);
|
|
3290
|
+
var tmp;
|
|
3291
|
+
switch (_this__u8e3s4.type) {
|
|
3292
|
+
case 'constant':
|
|
3293
|
+
var tmp1_elvis_lhs = _this__u8e3s4.power;
|
|
3294
|
+
var tmp_0 = tmp1_elvis_lhs == null ? 250.0 : tmp1_elvis_lhs;
|
|
3295
|
+
var tmp2_elvis_lhs = _this__u8e3s4.useHarmonics;
|
|
3296
|
+
tmp = new PowerProviderConstant(tmp_0, tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs);
|
|
3297
|
+
break;
|
|
3298
|
+
case 'constant_tiring':
|
|
3299
|
+
var tmp3_elvis_lhs = _this__u8e3s4.power;
|
|
3300
|
+
var tmp_1 = tmp3_elvis_lhs == null ? 250.0 : tmp3_elvis_lhs;
|
|
3301
|
+
var tmp4_elvis_lhs = _this__u8e3s4.useHarmonics;
|
|
3302
|
+
var tmp_2 = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
|
|
3303
|
+
var tmp5_elvis_lhs = _this__u8e3s4.tiringDuration;
|
|
3304
|
+
tmp = new PowerProviderConstantWithTiring(tmp_1, tmp_2, tmp5_elvis_lhs == null ? 7200.0 : tmp5_elvis_lhs);
|
|
3305
|
+
break;
|
|
3306
|
+
case 'from_data':
|
|
3307
|
+
tmp = PowerProviderFromData_instance;
|
|
3308
|
+
break;
|
|
3309
|
+
default:
|
|
3310
|
+
// Inline function 'kotlin.error' call
|
|
3311
|
+
|
|
3312
|
+
var message = 'Unknown PowerProviderDto.type: ' + _this__u8e3s4.type;
|
|
3313
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3314
|
+
}
|
|
3315
|
+
return tmp;
|
|
3316
|
+
}
|
|
3181
3317
|
function enhance$slambda($options, $path, resultContinuation) {
|
|
3182
|
-
this.
|
|
3183
|
-
this.
|
|
3318
|
+
this.r1y_1 = $options;
|
|
3319
|
+
this.s1y_1 = $path;
|
|
3184
3320
|
CoroutineImpl.call(this, resultContinuation);
|
|
3185
3321
|
}
|
|
3186
|
-
protoOf(enhance$slambda).
|
|
3187
|
-
var tmp = this.
|
|
3188
|
-
tmp.
|
|
3189
|
-
tmp.
|
|
3190
|
-
return tmp.
|
|
3322
|
+
protoOf(enhance$slambda).u1y = function ($this$promise, $completion) {
|
|
3323
|
+
var tmp = this.q10($this$promise, $completion);
|
|
3324
|
+
tmp.i6_1 = Unit_instance;
|
|
3325
|
+
tmp.j6_1 = null;
|
|
3326
|
+
return tmp.o6();
|
|
3191
3327
|
};
|
|
3192
|
-
protoOf(enhance$slambda).
|
|
3193
|
-
return this.
|
|
3328
|
+
protoOf(enhance$slambda).w6 = function (p1, $completion) {
|
|
3329
|
+
return this.u1y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
3194
3330
|
};
|
|
3195
|
-
protoOf(enhance$slambda).
|
|
3196
|
-
var suspendResult = this.
|
|
3331
|
+
protoOf(enhance$slambda).o6 = function () {
|
|
3332
|
+
var suspendResult = this.i6_1;
|
|
3197
3333
|
$sm: do
|
|
3198
3334
|
try {
|
|
3199
|
-
var tmp = this.
|
|
3335
|
+
var tmp = this.g6_1;
|
|
3200
3336
|
switch (tmp) {
|
|
3201
3337
|
case 0:
|
|
3202
|
-
this.
|
|
3203
|
-
var opts = toEnhanceOptions(this.
|
|
3204
|
-
var provider = opts.
|
|
3205
|
-
this.
|
|
3206
|
-
suspendResult = Enhancer_instance.
|
|
3338
|
+
this.h6_1 = 2;
|
|
3339
|
+
var opts = toEnhanceOptions(this.r1y_1);
|
|
3340
|
+
var provider = opts.h1q_1 ? new ElevationProvider() : null;
|
|
3341
|
+
this.g6_1 = 1;
|
|
3342
|
+
suspendResult = Enhancer_instance.o1r(this.s1y_1, provider, opts, this);
|
|
3207
3343
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3208
3344
|
return suspendResult;
|
|
3209
3345
|
}
|
|
@@ -3212,31 +3348,92 @@
|
|
|
3212
3348
|
case 1:
|
|
3213
3349
|
return suspendResult;
|
|
3214
3350
|
case 2:
|
|
3215
|
-
throw this.
|
|
3351
|
+
throw this.j6_1;
|
|
3216
3352
|
}
|
|
3217
3353
|
} catch ($p) {
|
|
3218
3354
|
var e = $p;
|
|
3219
|
-
if (this.
|
|
3355
|
+
if (this.h6_1 === 2) {
|
|
3220
3356
|
throw e;
|
|
3221
3357
|
} else {
|
|
3222
|
-
this.
|
|
3223
|
-
this.
|
|
3358
|
+
this.g6_1 = this.h6_1;
|
|
3359
|
+
this.j6_1 = e;
|
|
3224
3360
|
}
|
|
3225
3361
|
}
|
|
3226
3362
|
while (true);
|
|
3227
3363
|
};
|
|
3228
|
-
protoOf(enhance$slambda).
|
|
3229
|
-
var i = new enhance$slambda(this.
|
|
3230
|
-
i.
|
|
3364
|
+
protoOf(enhance$slambda).q10 = function ($this$promise, completion) {
|
|
3365
|
+
var i = new enhance$slambda(this.r1y_1, this.s1y_1, completion);
|
|
3366
|
+
i.t1y_1 = $this$promise;
|
|
3231
3367
|
return i;
|
|
3232
3368
|
};
|
|
3233
3369
|
function enhance$slambda_0($options, $path, resultContinuation) {
|
|
3234
3370
|
var i = new enhance$slambda($options, $path, resultContinuation);
|
|
3235
|
-
|
|
3236
|
-
return i.
|
|
3237
|
-
};
|
|
3238
|
-
|
|
3239
|
-
|
|
3371
|
+
return constructCallableReference(function ($this$promise, $completion) {
|
|
3372
|
+
return i.u1y($this$promise, $completion);
|
|
3373
|
+
}, 1);
|
|
3374
|
+
}
|
|
3375
|
+
function enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
|
|
3376
|
+
this.d1z_1 = $options;
|
|
3377
|
+
this.e1z_1 = $path;
|
|
3378
|
+
this.f1z_1 = $cyclist;
|
|
3379
|
+
this.g1z_1 = $bike;
|
|
3380
|
+
this.h1z_1 = $wind;
|
|
3381
|
+
this.i1z_1 = $power;
|
|
3382
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3383
|
+
}
|
|
3384
|
+
protoOf(enhanceWithCourse$slambda).u1y = function ($this$promise, $completion) {
|
|
3385
|
+
var tmp = this.q10($this$promise, $completion);
|
|
3386
|
+
tmp.i6_1 = Unit_instance;
|
|
3387
|
+
tmp.j6_1 = null;
|
|
3388
|
+
return tmp.o6();
|
|
3389
|
+
};
|
|
3390
|
+
protoOf(enhanceWithCourse$slambda).w6 = function (p1, $completion) {
|
|
3391
|
+
return this.u1y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
3392
|
+
};
|
|
3393
|
+
protoOf(enhanceWithCourse$slambda).o6 = function () {
|
|
3394
|
+
var suspendResult = this.i6_1;
|
|
3395
|
+
$sm: do
|
|
3396
|
+
try {
|
|
3397
|
+
var tmp = this.g6_1;
|
|
3398
|
+
switch (tmp) {
|
|
3399
|
+
case 0:
|
|
3400
|
+
this.h6_1 = 2;
|
|
3401
|
+
var opts = toEnhanceOptions(this.d1z_1);
|
|
3402
|
+
var provider = opts.h1q_1 ? new ElevationProvider() : null;
|
|
3403
|
+
var course = new CoursePhysics(new Course(this.e1z_1, toCyclist(this.f1z_1), toBike(this.g1z_1)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(this.h1z_1), toCyclistPowerProvider(this.i1z_1));
|
|
3404
|
+
this.g6_1 = 1;
|
|
3405
|
+
suspendResult = Enhancer_instance.p1r(course, opts, provider, this);
|
|
3406
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3407
|
+
return suspendResult;
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
continue $sm;
|
|
3411
|
+
case 1:
|
|
3412
|
+
return suspendResult;
|
|
3413
|
+
case 2:
|
|
3414
|
+
throw this.j6_1;
|
|
3415
|
+
}
|
|
3416
|
+
} catch ($p) {
|
|
3417
|
+
var e = $p;
|
|
3418
|
+
if (this.h6_1 === 2) {
|
|
3419
|
+
throw e;
|
|
3420
|
+
} else {
|
|
3421
|
+
this.g6_1 = this.h6_1;
|
|
3422
|
+
this.j6_1 = e;
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
while (true);
|
|
3426
|
+
};
|
|
3427
|
+
protoOf(enhanceWithCourse$slambda).q10 = function ($this$promise, completion) {
|
|
3428
|
+
var i = new enhanceWithCourse$slambda(this.d1z_1, this.e1z_1, this.f1z_1, this.g1z_1, this.h1z_1, this.i1z_1, completion);
|
|
3429
|
+
i.j1z_1 = $this$promise;
|
|
3430
|
+
return i;
|
|
3431
|
+
};
|
|
3432
|
+
function enhanceWithCourse$slambda_0($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
|
|
3433
|
+
var i = new enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation);
|
|
3434
|
+
return constructCallableReference(function ($this$promise, $completion) {
|
|
3435
|
+
return i.u1y($this$promise, $completion);
|
|
3436
|
+
}, 1);
|
|
3240
3437
|
}
|
|
3241
3438
|
//region block: init
|
|
3242
3439
|
Enhancer_instance = new Enhancer();
|
|
@@ -3254,6 +3451,7 @@
|
|
|
3254
3451
|
MaxSpeedComputer_instance = new MaxSpeedComputer();
|
|
3255
3452
|
MuscularPowerProvider_instance = new MuscularPowerProvider();
|
|
3256
3453
|
PowerComputer_instance = new PowerComputer();
|
|
3454
|
+
PowerProviderFromData_instance = new PowerProviderFromData();
|
|
3257
3455
|
RhoProviderDefault_instance = new RhoProviderDefault();
|
|
3258
3456
|
RhoProviderEstimate_instance = new RhoProviderEstimate();
|
|
3259
3457
|
RollingResistancePowerProvider_instance = new RollingResistancePowerProvider();
|
|
@@ -3276,6 +3474,11 @@
|
|
|
3276
3474
|
engine.pointAt = pointAt;
|
|
3277
3475
|
engine.writeGpx = writeGpx;
|
|
3278
3476
|
engine.enhance = enhance;
|
|
3477
|
+
engine.enhanceWithCourse = enhanceWithCourse;
|
|
3478
|
+
engine.getField = getField;
|
|
3479
|
+
engine.fieldDefinitions = fieldDefinitions;
|
|
3480
|
+
engine.pathLatitudeDeg = pathLatitudeDeg;
|
|
3481
|
+
engine.pathLongitudeDeg = pathLongitudeDeg;
|
|
3279
3482
|
}
|
|
3280
3483
|
$jsExportAll$(_);
|
|
3281
3484
|
kotlin_io_github_glandais_elevation.$jsExportAll$(_);
|