@glandais/vcyclist-engine 1.0.0 → 1.1.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.
@@ -12,12 +12,12 @@
12
12
  }(function (_, kotlin_kotlin) {
13
13
  'use strict';
14
14
  //region block: imports
15
- var protoOf = kotlin_kotlin.$_$.e5;
15
+ var protoOf = kotlin_kotlin.$_$.f5;
16
16
  var defineProp = kotlin_kotlin.$_$.l4;
17
17
  var initMetadataForClass = kotlin_kotlin.$_$.s4;
18
18
  var initMetadataForObject = kotlin_kotlin.$_$.y4;
19
19
  var VOID = kotlin_kotlin.$_$.a;
20
- var toString = kotlin_kotlin.$_$.z6;
20
+ var toString = kotlin_kotlin.$_$.b7;
21
21
  var equalsLong = kotlin_kotlin.$_$.w3;
22
22
  var get_ONE = kotlin_kotlin.$_$.r3;
23
23
  var add = kotlin_kotlin.$_$.s3;
@@ -17,12 +17,12 @@
17
17
  //region block: imports
18
18
  var imul = Math.imul;
19
19
  var Unit_instance = kotlin_kotlin.$_$.g;
20
- var protoOf = kotlin_kotlin.$_$.e5;
20
+ var protoOf = kotlin_kotlin.$_$.f5;
21
21
  var Element = kotlin_kotlin.$_$.k3;
22
22
  var Continuation = kotlin_kotlin.$_$.g3;
23
23
  var initMetadataForClass = kotlin_kotlin.$_$.s4;
24
24
  var VOID = kotlin_kotlin.$_$.a;
25
- var toString = kotlin_kotlin.$_$.g5;
25
+ var toString = kotlin_kotlin.$_$.h5;
26
26
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
27
27
  var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.q3;
28
28
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i;
@@ -40,9 +40,9 @@
40
40
  var initMetadataForInterface = kotlin_kotlin.$_$.w4;
41
41
  var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.i1;
42
42
  var isInterface = kotlin_kotlin.$_$.a5;
43
- var THROW_CCE = kotlin_kotlin.$_$.o6;
43
+ var THROW_CCE = kotlin_kotlin.$_$.q6;
44
44
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a1;
45
- var toString_0 = kotlin_kotlin.$_$.z6;
45
+ var toString_0 = kotlin_kotlin.$_$.b7;
46
46
  var initMetadataForObject = kotlin_kotlin.$_$.y4;
47
47
  var hashCode = kotlin_kotlin.$_$.r4;
48
48
  var equals = kotlin_kotlin.$_$.m4;
@@ -50,7 +50,7 @@
50
50
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
51
51
  var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.p1;
52
52
  var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.q1;
53
- var createFailure = kotlin_kotlin.$_$.s6;
53
+ var createFailure = kotlin_kotlin.$_$.u6;
54
54
  var AbstractCoroutineContextKey = kotlin_kotlin.$_$.c3;
55
55
  var Key_instance = kotlin_kotlin.$_$.b;
56
56
  var AbstractCoroutineContextElement = kotlin_kotlin.$_$.b3;
@@ -58,19 +58,19 @@
58
58
  var minusKey = kotlin_kotlin.$_$.e3;
59
59
  var ContinuationInterceptor = kotlin_kotlin.$_$.f3;
60
60
  var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.h1;
61
- var addSuppressed = kotlin_kotlin.$_$.r6;
62
- var Enum = kotlin_kotlin.$_$.g6;
61
+ var addSuppressed = kotlin_kotlin.$_$.t6;
62
+ var Enum = kotlin_kotlin.$_$.i6;
63
63
  var startCoroutine = kotlin_kotlin.$_$.n3;
64
- var noWhenBranchMatchedException = kotlin_kotlin.$_$.w6;
65
- var Long = kotlin_kotlin.$_$.k6;
64
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.y6;
65
+ var Long = kotlin_kotlin.$_$.m6;
66
66
  var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.h;
67
67
  var compare = kotlin_kotlin.$_$.t3;
68
68
  var add = kotlin_kotlin.$_$.s3;
69
69
  var subtract = kotlin_kotlin.$_$.b4;
70
- var RuntimeException = kotlin_kotlin.$_$.n6;
70
+ var RuntimeException = kotlin_kotlin.$_$.p6;
71
71
  var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.g1;
72
72
  var captureStack = kotlin_kotlin.$_$.f4;
73
- var Error_0 = kotlin_kotlin.$_$.h6;
73
+ var Error_0 = kotlin_kotlin.$_$.j6;
74
74
  var Error_init_$Init$ = kotlin_kotlin.$_$.t;
75
75
  var CancellationException = kotlin_kotlin.$_$.w2;
76
76
  var ArrayList = kotlin_kotlin.$_$.v1;
@@ -81,32 +81,32 @@
81
81
  var minusKey_0 = kotlin_kotlin.$_$.j3;
82
82
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.s;
83
83
  var anyToString = kotlin_kotlin.$_$.d4;
84
- var UnsupportedOperationException = kotlin_kotlin.$_$.q6;
85
- var ensureNotNull = kotlin_kotlin.$_$.t6;
84
+ var UnsupportedOperationException = kotlin_kotlin.$_$.s6;
85
+ var ensureNotNull = kotlin_kotlin.$_$.v6;
86
86
  var fromInt = kotlin_kotlin.$_$.x3;
87
- var Exception = kotlin_kotlin.$_$.i6;
87
+ var Exception = kotlin_kotlin.$_$.k6;
88
88
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.y;
89
89
  var Exception_init_$Init$ = kotlin_kotlin.$_$.x;
90
90
  var defineProp = kotlin_kotlin.$_$.l4;
91
91
  var convertToInt = kotlin_kotlin.$_$.u3;
92
- var toLongOrNull = kotlin_kotlin.$_$.b6;
92
+ var toLongOrNull = kotlin_kotlin.$_$.d6;
93
93
  var startCoroutineUninterceptedOrReturnNonGeneratorVersion = kotlin_kotlin.$_$.a3;
94
- var Unit = kotlin_kotlin.$_$.p6;
94
+ var Unit = kotlin_kotlin.$_$.r6;
95
95
  var divide = kotlin_kotlin.$_$.v3;
96
96
  var modulo = kotlin_kotlin.$_$.y3;
97
97
  var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
98
98
  var atomicfu$AtomicRefArray$ofNulls = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.a;
99
- var getKClassFromExpression = kotlin_kotlin.$_$.p5;
99
+ var getKClassFromExpression = kotlin_kotlin.$_$.q5;
100
100
  var Exception_init_$Create$ = kotlin_kotlin.$_$.w;
101
101
  var CancellationException_init_$Init$ = kotlin_kotlin.$_$.q;
102
102
  var getStringHashCode = kotlin_kotlin.$_$.q4;
103
103
  var HashSet_init_$Create$ = kotlin_kotlin.$_$.l;
104
104
  var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.f1;
105
105
  var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.o;
106
- var stackTraceToString = kotlin_kotlin.$_$.x6;
106
+ var stackTraceToString = kotlin_kotlin.$_$.z6;
107
107
  var removeFirstOrNull = kotlin_kotlin.$_$.s2;
108
- var KtList = kotlin_kotlin.$_$.x1;
109
108
  var Collection = kotlin_kotlin.$_$.w1;
109
+ var KtList = kotlin_kotlin.$_$.x1;
110
110
  //endregion
111
111
  //region block: pre-declaration
112
112
  initMetadataForInterface(ParentJob, 'ParentJob', VOID, VOID, [Element], [0]);
@@ -182,7 +182,7 @@
182
182
  initMetadataForClass(SemaphoreSegment, 'SemaphoreSegment', VOID, Segment);
183
183
  initMetadataForClass(SetTimeoutBasedDispatcher, 'SetTimeoutBasedDispatcher', VOID, CoroutineDispatcher, VOID, [1]);
184
184
  initMetadataForObject(NodeDispatcher, 'NodeDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]);
185
- initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [KtList, Collection]);
185
+ initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [Collection, KtList]);
186
186
  initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue);
187
187
  initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue);
188
188
  initMetadataForObject(Dispatchers, 'Dispatchers');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glandais/vcyclist-engine",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "main": "vcyclist-engine.js",
5
5
  "types": "vcyclist-engine.d.ts",
6
6
  "devDependencies": {
@@ -13,7 +13,8 @@
13
13
  "source-map-support": "0.5.21"
14
14
  },
15
15
  "dependencies": {
16
- "@js-joda/core": "3.2.0"
16
+ "@js-joda/core": "3.2.0",
17
+ "@jsquash/webp": "1.4.0"
17
18
  },
18
19
  "peerDependencies": {},
19
20
  "optionalDependencies": {},
@@ -18,7 +18,7 @@
18
18
  var imul = Math.imul;
19
19
  var hypot = Math.hypot;
20
20
  var VOID = kotlin_kotlin.$_$.a;
21
- var protoOf = kotlin_kotlin.$_$.e5;
21
+ var protoOf = kotlin_kotlin.$_$.f5;
22
22
  var getNumberHashCode = kotlin_kotlin.$_$.o4;
23
23
  var getBooleanHashCode = kotlin_kotlin.$_$.n4;
24
24
  var equals = kotlin_kotlin.$_$.m4;
@@ -27,7 +27,7 @@
27
27
  var toNumber = kotlin_kotlin.$_$.c4;
28
28
  var CoroutineImpl = kotlin_kotlin.$_$.m3;
29
29
  var Unit_instance = kotlin_kotlin.$_$.g;
30
- var THROW_CCE = kotlin_kotlin.$_$.o6;
30
+ var THROW_CCE = kotlin_kotlin.$_$.q6;
31
31
  var MutableEntry = kotlin_kotlin.$_$.z1;
32
32
  var isInterface = kotlin_kotlin.$_$.a5;
33
33
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.x2;
@@ -38,17 +38,17 @@
38
38
  var toList = kotlin_kotlin.$_$.v2;
39
39
  var KtList = kotlin_kotlin.$_$.x1;
40
40
  var initMetadataForCoroutine = kotlin_kotlin.$_$.u4;
41
- var toString = kotlin_kotlin.$_$.g5;
41
+ var toString = kotlin_kotlin.$_$.h5;
42
42
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.y;
43
43
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i;
44
44
  var listOf = kotlin_kotlin.$_$.q2;
45
- var numberToInt = kotlin_kotlin.$_$.c5;
45
+ var numberToInt = kotlin_kotlin.$_$.d5;
46
46
  var initMetadataForObject = kotlin_kotlin.$_$.y4;
47
47
  var toList_0 = kotlin_kotlin.$_$.u2;
48
48
  var get_lastIndex = kotlin_kotlin.$_$.o2;
49
49
  var checkBuilderCapacity = kotlin_kotlin.$_$.b2;
50
50
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.b1;
51
- var coerceIn = kotlin_kotlin.$_$.m5;
51
+ var coerceIn = kotlin_kotlin.$_$.n5;
52
52
  var initMetadataForFunctionReference = kotlin_kotlin.$_$.v4;
53
53
  var getStringHashCode = kotlin_kotlin.$_$.q4;
54
54
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
@@ -62,16 +62,20 @@
62
62
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
63
63
  var contentEquals = kotlin_kotlin.$_$.d2;
64
64
  var contentHashCode = kotlin_kotlin.$_$.e2;
65
- var objectCreate = kotlin_kotlin.$_$.d5;
66
- var round = kotlin_kotlin.$_$.i5;
65
+ var objectCreate = kotlin_kotlin.$_$.e5;
66
+ var round = kotlin_kotlin.$_$.j5;
67
67
  var initMetadataForCompanion = kotlin_kotlin.$_$.t4;
68
- var isNaN_0 = kotlin_kotlin.$_$.u6;
69
- var replace = kotlin_kotlin.$_$.w5;
70
- var coerceIn_0 = kotlin_kotlin.$_$.l5;
68
+ var isNaN_0 = kotlin_kotlin.$_$.w6;
69
+ var replace = kotlin_kotlin.$_$.y5;
70
+ var coerceIn_0 = kotlin_kotlin.$_$.m5;
71
71
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
72
72
  var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
73
+ var KProperty0 = kotlin_kotlin.$_$.r5;
74
+ var getPropertyCallableRef = kotlin_kotlin.$_$.p4;
73
75
  var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
74
76
  var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.a1;
77
+ var isNumber = kotlin_kotlin.$_$.b5;
78
+ var lazy = kotlin_kotlin.$_$.x6;
75
79
  //endregion
76
80
  //region block: pre-declaration
77
81
  initMetadataForClass(SmoothingOptions, 'SmoothingOptions', SmoothingOptions);
@@ -117,6 +121,9 @@
117
121
  initMetadataForLambda(getElevation$slambda, CoroutineImpl, VOID, [1]);
118
122
  initMetadataForLambda(getElevationsAlong$slambda, CoroutineImpl, VOID, [1]);
119
123
  initMetadataForCoroutine($fetchAndDecodeTileCOROUTINE$, CoroutineImpl);
124
+ initMetadataForCoroutine($decodeNodeCOROUTINE$, CoroutineImpl);
125
+ initMetadataForCoroutine($decodeBrowserCOROUTINE$, CoroutineImpl);
126
+ initMetadataForCoroutine($decodeWebpNodeCOROUTINE$, CoroutineImpl);
120
127
  //endregion
121
128
  function SmoothingOptions(windowSize, enabled) {
122
129
  windowSize = windowSize === VOID ? 50.0 : windowSize;
@@ -2237,21 +2244,139 @@
2237
2244
  l.$arity = 1;
2238
2245
  return l;
2239
2246
  }
2247
+ function get_isNode() {
2248
+ _init_properties_TileFetcher_js_kt__7a2f1e();
2249
+ return isNode;
2250
+ }
2251
+ var isNode;
2252
+ function get_nodeWebpDecoderPromise() {
2253
+ _init_properties_TileFetcher_js_kt__7a2f1e();
2254
+ var tmp0 = nodeWebpDecoderPromise$delegate;
2255
+ var tmp = KProperty0;
2256
+ // Inline function 'kotlin.getValue' call
2257
+ getPropertyCallableRef('nodeWebpDecoderPromise', 0, tmp, _get_nodeWebpDecoderPromise_$ref_s562t(), null);
2258
+ return tmp0.f1();
2259
+ }
2260
+ var nodeWebpDecoderPromise$delegate;
2240
2261
  function fetchAndDecodeTile(url, $completion) {
2241
2262
  var tmp = new $fetchAndDecodeTileCOROUTINE$(url, $completion);
2242
2263
  tmp.w5_1 = Unit_instance;
2243
2264
  tmp.x5_1 = null;
2244
2265
  return tmp.c6();
2245
2266
  }
2246
- function fetchUrl(url) {
2267
+ function decodeNode(url, $completion) {
2268
+ var tmp = new $decodeNodeCOROUTINE$(url, $completion);
2269
+ tmp.w5_1 = Unit_instance;
2270
+ tmp.x5_1 = null;
2271
+ return tmp.c6();
2272
+ }
2273
+ function decodeBrowser(url, $completion) {
2274
+ var tmp = new $decodeBrowserCOROUTINE$(url, $completion);
2275
+ tmp.w5_1 = Unit_instance;
2276
+ tmp.x5_1 = null;
2277
+ return tmp.c6();
2278
+ }
2279
+ function fetchUrlNode(url) {
2280
+ _init_properties_TileFetcher_js_kt__7a2f1e();
2281
+ // Inline function 'kotlin.js.unsafeCast' call
2282
+ return globalThis.fetch(url);
2283
+ }
2284
+ function responseArrayBuffer(res) {
2285
+ _init_properties_TileFetcher_js_kt__7a2f1e();
2286
+ // Inline function 'kotlin.js.unsafeCast' call
2287
+ return res.arrayBuffer();
2288
+ }
2289
+ function decodeWebpNode(buffer, $completion) {
2290
+ var tmp = new $decodeWebpNodeCOROUTINE$(buffer, $completion);
2291
+ tmp.w5_1 = Unit_instance;
2292
+ tmp.x5_1 = null;
2293
+ return tmp.c6();
2294
+ }
2295
+ function fetchUrlBrowser(url) {
2296
+ _init_properties_TileFetcher_js_kt__7a2f1e();
2247
2297
  // Inline function 'kotlin.js.unsafeCast' call
2248
2298
  return fetch(url);
2249
2299
  }
2300
+ function nodeWebpDecoderPromise$delegate$lambda() {
2301
+ _init_properties_TileFetcher_js_kt__7a2f1e();
2302
+ // Inline function 'kotlin.js.unsafeCast' call
2303
+ return function () {
2304
+ var path = eval('require')('path');
2305
+ var fs = eval('require')('fs');
2306
+ var req = eval('require');
2307
+ var decodeMod = req('@jsquash/webp/decode.js');
2308
+ var wasmDir = path.dirname(req.resolve('@jsquash/webp/decode.js'));
2309
+ var wasmPath = path.join(wasmDir, 'codec/dec/webp_dec.wasm');
2310
+ var wasmBytes = fs.readFileSync(wasmPath);
2311
+ return WebAssembly.compile(wasmBytes).then(function (wasmModule) {
2312
+ return decodeMod.init(wasmModule).then(function () {
2313
+ return decodeMod.default;
2314
+ });
2315
+ });
2316
+ }();
2317
+ }
2318
+ function _get_nodeWebpDecoderPromise_$ref_s562t() {
2319
+ return function () {
2320
+ return get_nodeWebpDecoderPromise();
2321
+ };
2322
+ }
2250
2323
  function $fetchAndDecodeTileCOROUTINE$(url, resultContinuation) {
2251
2324
  CoroutineImpl.call(this, resultContinuation);
2252
2325
  this.y13_1 = url;
2253
2326
  }
2254
2327
  protoOf($fetchAndDecodeTileCOROUTINE$).c6 = function () {
2328
+ var suspendResult = this.w5_1;
2329
+ $sm: do
2330
+ try {
2331
+ var tmp = this.u5_1;
2332
+ switch (tmp) {
2333
+ case 0:
2334
+ this.v5_1 = 4;
2335
+ if (get_isNode()) {
2336
+ this.u5_1 = 2;
2337
+ suspendResult = decodeNode(this.y13_1, this);
2338
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2339
+ return suspendResult;
2340
+ }
2341
+ continue $sm;
2342
+ } else {
2343
+ this.u5_1 = 1;
2344
+ suspendResult = decodeBrowser(this.y13_1, this);
2345
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2346
+ return suspendResult;
2347
+ }
2348
+ continue $sm;
2349
+ }
2350
+
2351
+ case 1:
2352
+ this.z13_1 = suspendResult;
2353
+ this.u5_1 = 3;
2354
+ continue $sm;
2355
+ case 2:
2356
+ this.z13_1 = suspendResult;
2357
+ this.u5_1 = 3;
2358
+ continue $sm;
2359
+ case 3:
2360
+ return this.z13_1;
2361
+ case 4:
2362
+ throw this.x5_1;
2363
+ }
2364
+ } catch ($p) {
2365
+ var e = $p;
2366
+ if (this.v5_1 === 4) {
2367
+ throw e;
2368
+ } else {
2369
+ this.u5_1 = this.v5_1;
2370
+ this.x5_1 = e;
2371
+ }
2372
+ }
2373
+ while (true);
2374
+ };
2375
+ function $decodeNodeCOROUTINE$(url, resultContinuation) {
2376
+ CoroutineImpl.call(this, resultContinuation);
2377
+ this.i14_1 = url;
2378
+ }
2379
+ protoOf($decodeNodeCOROUTINE$).c6 = function () {
2255
2380
  var suspendResult = this.w5_1;
2256
2381
  $sm: do
2257
2382
  try {
@@ -2260,7 +2385,7 @@
2260
2385
  case 0:
2261
2386
  this.v5_1 = 4;
2262
2387
  this.u5_1 = 1;
2263
- suspendResult = await_0(fetchUrl(this.y13_1), this);
2388
+ suspendResult = await_0(fetchUrlNode(this.i14_1), this);
2264
2389
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2265
2390
  return suspendResult;
2266
2391
  }
@@ -2269,7 +2394,77 @@
2269
2394
  case 1:
2270
2395
  var res = suspendResult;
2271
2396
  if (!res.ok) {
2272
- var message = 'Tile fetch failed for ' + this.y13_1 + ': HTTP ' + res.status;
2397
+ var message = 'Tile fetch failed for ' + this.i14_1 + ': HTTP ' + res.status;
2398
+ throw IllegalStateException_init_$Create$_0(toString(message));
2399
+ }
2400
+
2401
+ this.u5_1 = 2;
2402
+ suspendResult = await_0(responseArrayBuffer(res), this);
2403
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2404
+ return suspendResult;
2405
+ }
2406
+
2407
+ continue $sm;
2408
+ case 2:
2409
+ var ab = suspendResult;
2410
+ this.u5_1 = 3;
2411
+ suspendResult = decodeWebpNode(ab, this);
2412
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2413
+ return suspendResult;
2414
+ }
2415
+
2416
+ continue $sm;
2417
+ case 3:
2418
+ var image = suspendResult;
2419
+ var tmp_0 = image.width;
2420
+ var width = numberToInt(isNumber(tmp_0) ? tmp_0 : THROW_CCE());
2421
+ var tmp_1 = image.height;
2422
+ var height = numberToInt(isNumber(tmp_1) ? tmp_1 : THROW_CCE());
2423
+ var src = image.data;
2424
+ var tmp_2 = src.buffer;
2425
+ var tmp_3 = src.byteOffset;
2426
+ var tmp_4 = numberToInt(isNumber(tmp_3) ? tmp_3 : THROW_CCE());
2427
+ var tmp_5 = src.byteLength;
2428
+ var int8 = new Int8Array(tmp_2, tmp_4, numberToInt(isNumber(tmp_5) ? tmp_5 : THROW_CCE()));
2429
+ var rgba = int8;
2430
+ return new RawTile(width, height, rgba);
2431
+ case 4:
2432
+ throw this.x5_1;
2433
+ }
2434
+ } catch ($p) {
2435
+ var e = $p;
2436
+ if (this.v5_1 === 4) {
2437
+ throw e;
2438
+ } else {
2439
+ this.u5_1 = this.v5_1;
2440
+ this.x5_1 = e;
2441
+ }
2442
+ }
2443
+ while (true);
2444
+ };
2445
+ function $decodeBrowserCOROUTINE$(url, resultContinuation) {
2446
+ CoroutineImpl.call(this, resultContinuation);
2447
+ this.r14_1 = url;
2448
+ }
2449
+ protoOf($decodeBrowserCOROUTINE$).c6 = function () {
2450
+ var suspendResult = this.w5_1;
2451
+ $sm: do
2452
+ try {
2453
+ var tmp = this.u5_1;
2454
+ switch (tmp) {
2455
+ case 0:
2456
+ this.v5_1 = 4;
2457
+ this.u5_1 = 1;
2458
+ suspendResult = await_0(fetchUrlBrowser(this.r14_1), this);
2459
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2460
+ return suspendResult;
2461
+ }
2462
+
2463
+ continue $sm;
2464
+ case 1:
2465
+ var res = suspendResult;
2466
+ if (!res.ok) {
2467
+ var message = 'Tile fetch failed for ' + this.r14_1 + ': HTTP ' + res.status;
2273
2468
  throw IllegalStateException_init_$Create$_0(toString(message));
2274
2469
  }
2275
2470
 
@@ -2338,6 +2533,60 @@
2338
2533
  }
2339
2534
  while (true);
2340
2535
  };
2536
+ function $decodeWebpNodeCOROUTINE$(buffer, resultContinuation) {
2537
+ CoroutineImpl.call(this, resultContinuation);
2538
+ this.a15_1 = buffer;
2539
+ }
2540
+ protoOf($decodeWebpNodeCOROUTINE$).c6 = function () {
2541
+ var suspendResult = this.w5_1;
2542
+ $sm: do
2543
+ try {
2544
+ var tmp = this.u5_1;
2545
+ switch (tmp) {
2546
+ case 0:
2547
+ this.v5_1 = 3;
2548
+ this.u5_1 = 1;
2549
+ suspendResult = await_0(get_nodeWebpDecoderPromise(), this);
2550
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2551
+ return suspendResult;
2552
+ }
2553
+
2554
+ continue $sm;
2555
+ case 1:
2556
+ var decode = suspendResult;
2557
+ var resultPromise = decode(this.a15_1);
2558
+ this.u5_1 = 2;
2559
+ suspendResult = await_0(resultPromise, this);
2560
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2561
+ return suspendResult;
2562
+ }
2563
+
2564
+ continue $sm;
2565
+ case 2:
2566
+ return suspendResult;
2567
+ case 3:
2568
+ throw this.x5_1;
2569
+ }
2570
+ } catch ($p) {
2571
+ var e = $p;
2572
+ if (this.v5_1 === 3) {
2573
+ throw e;
2574
+ } else {
2575
+ this.u5_1 = this.v5_1;
2576
+ this.x5_1 = e;
2577
+ }
2578
+ }
2579
+ while (true);
2580
+ };
2581
+ var properties_initialized_TileFetcher_js_kt_apmrwg;
2582
+ function _init_properties_TileFetcher_js_kt__7a2f1e() {
2583
+ if (!properties_initialized_TileFetcher_js_kt_apmrwg) {
2584
+ properties_initialized_TileFetcher_js_kt_apmrwg = true;
2585
+ var tmp = typeof window === 'undefined' && typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
2586
+ isNode = (!(tmp == null) ? typeof tmp === 'boolean' : false) ? tmp : THROW_CCE();
2587
+ nodeWebpDecoderPromise$delegate = lazy(nodeWebpDecoderPromise$delegate$lambda);
2588
+ }
2589
+ }
2341
2590
  //region block: init
2342
2591
  Distance_instance = new Distance();
2343
2592
  DouglasPeucker_instance = new DouglasPeucker();
@@ -2364,8 +2613,9 @@
2364
2613
  _.$_$.b = DouglasPeucker_instance;
2365
2614
  _.$_$.c = ElevationSmoother_instance;
2366
2615
  _.$_$.d = MathConstants_getInstance;
2367
- _.$_$.e = LatLonElevation;
2368
- _.$_$.f = LatLon;
2616
+ _.$_$.e = ElevationProvider;
2617
+ _.$_$.f = LatLonElevation;
2618
+ _.$_$.g = LatLon;
2369
2619
  //endregion
2370
2620
  return _;
2371
2621
  }));