@deck.gl/carto 9.4.0-alpha.1 → 9.4.0-beta.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.
@@ -7,7 +7,11 @@
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __commonJS = (cb, mod) => function __require() {
10
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ try {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ } catch (e) {
13
+ throw mod = 0, e;
14
+ }
11
15
  };
12
16
  var __copyProps = (to, from, except, desc) => {
13
17
  if (from && typeof from === "object" || typeof from === "function") {
@@ -26,34 +30,28 @@
26
30
  mod
27
31
  ));
28
32
 
29
- // ../../node_modules/earcut/src/earcut.js
33
+ // node_modules/earcut/src/earcut.js
30
34
  var require_earcut = __commonJS({
31
- "../../node_modules/earcut/src/earcut.js"(exports, module) {
35
+ "node_modules/earcut/src/earcut.js"(exports, module) {
32
36
  "use strict";
33
37
  module.exports = earcut2;
34
38
  module.exports.default = earcut2;
35
39
  function earcut2(data, holeIndices, dim) {
36
40
  dim = dim || 2;
37
41
  var hasHoles = holeIndices && holeIndices.length, outerLen = hasHoles ? holeIndices[0] * dim : data.length, outerNode = linkedList(data, 0, outerLen, dim, true), triangles = [];
38
- if (!outerNode || outerNode.next === outerNode.prev)
39
- return triangles;
42
+ if (!outerNode || outerNode.next === outerNode.prev) return triangles;
40
43
  var minX, minY, maxX, maxY, x, y, invSize;
41
- if (hasHoles)
42
- outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
44
+ if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
43
45
  if (data.length > 80 * dim) {
44
46
  minX = maxX = data[0];
45
47
  minY = maxY = data[1];
46
48
  for (var i = dim; i < outerLen; i += dim) {
47
49
  x = data[i];
48
50
  y = data[i + 1];
49
- if (x < minX)
50
- minX = x;
51
- if (y < minY)
52
- minY = y;
53
- if (x > maxX)
54
- maxX = x;
55
- if (y > maxY)
56
- maxY = y;
51
+ if (x < minX) minX = x;
52
+ if (y < minY) minY = y;
53
+ if (x > maxX) maxX = x;
54
+ if (y > maxY) maxY = y;
57
55
  }
58
56
  invSize = Math.max(maxX - minX, maxY - minY);
59
57
  invSize = invSize !== 0 ? 32767 / invSize : 0;
@@ -64,11 +62,9 @@
64
62
  function linkedList(data, start, end, dim, clockwise) {
65
63
  var i, last;
66
64
  if (clockwise === signedArea(data, start, end, dim) > 0) {
67
- for (i = start; i < end; i += dim)
68
- last = insertNode(i, data[i], data[i + 1], last);
65
+ for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);
69
66
  } else {
70
- for (i = end - dim; i >= start; i -= dim)
71
- last = insertNode(i, data[i], data[i + 1], last);
67
+ for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);
72
68
  }
73
69
  if (last && equals(last, last.next)) {
74
70
  removeNode(last);
@@ -77,18 +73,15 @@
77
73
  return last;
78
74
  }
79
75
  function filterPoints(start, end) {
80
- if (!start)
81
- return start;
82
- if (!end)
83
- end = start;
76
+ if (!start) return start;
77
+ if (!end) end = start;
84
78
  var p = start, again;
85
79
  do {
86
80
  again = false;
87
81
  if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
88
82
  removeNode(p);
89
83
  p = end = p.prev;
90
- if (p === p.next)
91
- break;
84
+ if (p === p.next) break;
92
85
  again = true;
93
86
  } else {
94
87
  p = p.next;
@@ -97,10 +90,8 @@
97
90
  return end;
98
91
  }
99
92
  function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
100
- if (!ear)
101
- return;
102
- if (!pass && invSize)
103
- indexCurve(ear, minX, minY, invSize);
93
+ if (!ear) return;
94
+ if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
104
95
  var stop = ear, prev, next;
105
96
  while (ear.prev !== ear.next) {
106
97
  prev = ear.prev;
@@ -130,42 +121,35 @@
130
121
  }
131
122
  function isEar(ear) {
132
123
  var a = ear.prev, b = ear, c = ear.next;
133
- if (area(a, b, c) >= 0)
134
- return false;
124
+ if (area(a, b, c) >= 0) return false;
135
125
  var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
136
126
  var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
137
127
  var p = c.next;
138
128
  while (p !== a) {
139
- if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
140
- return false;
129
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
141
130
  p = p.next;
142
131
  }
143
132
  return true;
144
133
  }
145
134
  function isEarHashed(ear, minX, minY, invSize) {
146
135
  var a = ear.prev, b = ear, c = ear.next;
147
- if (area(a, b, c) >= 0)
148
- return false;
136
+ if (area(a, b, c) >= 0) return false;
149
137
  var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
150
138
  var x0 = ax < bx ? ax < cx ? ax : cx : bx < cx ? bx : cx, y0 = ay < by ? ay < cy ? ay : cy : by < cy ? by : cy, x1 = ax > bx ? ax > cx ? ax : cx : bx > cx ? bx : cx, y1 = ay > by ? ay > cy ? ay : cy : by > cy ? by : cy;
151
139
  var minZ = zOrder(x0, y0, minX, minY, invSize), maxZ = zOrder(x1, y1, minX, minY, invSize);
152
140
  var p = ear.prevZ, n = ear.nextZ;
153
141
  while (p && p.z >= minZ && n && n.z <= maxZ) {
154
- if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
155
- return false;
142
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
156
143
  p = p.prevZ;
157
- if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0)
158
- return false;
144
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
159
145
  n = n.nextZ;
160
146
  }
161
147
  while (p && p.z >= minZ) {
162
- if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0)
163
- return false;
148
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
164
149
  p = p.prevZ;
165
150
  }
166
151
  while (n && n.z <= maxZ) {
167
- if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0)
168
- return false;
152
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
169
153
  n = n.nextZ;
170
154
  }
171
155
  return true;
@@ -210,8 +194,7 @@
210
194
  start = holeIndices[i] * dim;
211
195
  end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
212
196
  list = linkedList(data, start, end, dim, false);
213
- if (list === list.next)
214
- list.steiner = true;
197
+ if (list === list.next) list.steiner = true;
215
198
  queue.push(getLeftmost(list));
216
199
  }
217
200
  queue.sort(compareX);
@@ -240,14 +223,12 @@
240
223
  if (x <= hx && x > qx) {
241
224
  qx = x;
242
225
  m = p.x < p.next.x ? p : p.next;
243
- if (x === hx)
244
- return m;
226
+ if (x === hx) return m;
245
227
  }
246
228
  }
247
229
  p = p.next;
248
230
  } while (p !== outerNode);
249
- if (!m)
250
- return null;
231
+ if (!m) return null;
251
232
  var stop = m, mx = m.x, my = m.y, tanMin = Infinity, tan;
252
233
  p = m;
253
234
  do {
@@ -268,8 +249,7 @@
268
249
  function indexCurve(start, minX, minY, invSize) {
269
250
  var p = start;
270
251
  do {
271
- if (p.z === 0)
272
- p.z = zOrder(p.x, p.y, minX, minY, invSize);
252
+ if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
273
253
  p.prevZ = p.prev;
274
254
  p.nextZ = p.next;
275
255
  p = p.next;
@@ -292,8 +272,7 @@
292
272
  for (i = 0; i < inSize; i++) {
293
273
  pSize++;
294
274
  q = q.nextZ;
295
- if (!q)
296
- break;
275
+ if (!q) break;
297
276
  }
298
277
  qSize = inSize;
299
278
  while (pSize > 0 || qSize > 0 && q) {
@@ -306,10 +285,8 @@
306
285
  q = q.nextZ;
307
286
  qSize--;
308
287
  }
309
- if (tail)
310
- tail.nextZ = e;
311
- else
312
- list = e;
288
+ if (tail) tail.nextZ = e;
289
+ else list = e;
313
290
  e.prevZ = tail;
314
291
  tail = e;
315
292
  }
@@ -336,8 +313,7 @@
336
313
  function getLeftmost(start) {
337
314
  var p = start, leftmost = start;
338
315
  do {
339
- if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y)
340
- leftmost = p;
316
+ if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;
341
317
  p = p.next;
342
318
  } while (p !== start);
343
319
  return leftmost;
@@ -362,16 +338,11 @@
362
338
  var o2 = sign(area(p1, q1, q2));
363
339
  var o3 = sign(area(p2, q2, p1));
364
340
  var o4 = sign(area(p2, q2, q1));
365
- if (o1 !== o2 && o3 !== o4)
366
- return true;
367
- if (o1 === 0 && onSegment(p1, p2, q1))
368
- return true;
369
- if (o2 === 0 && onSegment(p1, q2, q1))
370
- return true;
371
- if (o3 === 0 && onSegment(p2, p1, q2))
372
- return true;
373
- if (o4 === 0 && onSegment(p2, q1, q2))
374
- return true;
341
+ if (o1 !== o2 && o3 !== o4) return true;
342
+ if (o1 === 0 && onSegment(p1, p2, q1)) return true;
343
+ if (o2 === 0 && onSegment(p1, q2, q1)) return true;
344
+ if (o3 === 0 && onSegment(p2, p1, q2)) return true;
345
+ if (o4 === 0 && onSegment(p2, q1, q2)) return true;
375
346
  return false;
376
347
  }
377
348
  function onSegment(p, q, r) {
@@ -383,8 +354,7 @@
383
354
  function intersectsPolygon(a, b) {
384
355
  var p = a;
385
356
  do {
386
- if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b))
387
- return true;
357
+ if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true;
388
358
  p = p.next;
389
359
  } while (p !== a);
390
360
  return false;
@@ -429,10 +399,8 @@
429
399
  function removeNode(p) {
430
400
  p.next.prev = p.prev;
431
401
  p.prev.next = p.next;
432
- if (p.prevZ)
433
- p.prevZ.nextZ = p.nextZ;
434
- if (p.nextZ)
435
- p.nextZ.prevZ = p.prevZ;
402
+ if (p.prevZ) p.prevZ.nextZ = p.nextZ;
403
+ if (p.nextZ) p.nextZ.prevZ = p.prevZ;
436
404
  }
437
405
  function Node(i, x, y) {
438
406
  this.i = i;
@@ -479,8 +447,7 @@
479
447
  var dim = data[0][0].length, result = { vertices: [], holes: [], dimensions: dim }, holeIndex = 0;
480
448
  for (var i = 0; i < data.length; i++) {
481
449
  for (var j = 0; j < data[i].length; j++) {
482
- for (var d = 0; d < dim; d++)
483
- result.vertices.push(data[i][j][d]);
450
+ for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
484
451
  }
485
452
  if (i > 0) {
486
453
  holeIndex += data[i - 1].length;
@@ -2534,8 +2501,7 @@
2534
2501
  var Z_DEFAULT_STRATEGY = 0;
2535
2502
  var Z_DEFLATED = 8;
2536
2503
  function Deflate(options) {
2537
- if (!(this instanceof Deflate))
2538
- return new Deflate(options);
2504
+ if (!(this instanceof Deflate)) return new Deflate(options);
2539
2505
  this.options = utils.assign({
2540
2506
  level: Z_DEFAULT_COMPRESSION,
2541
2507
  method: Z_DEFLATED,
@@ -3600,6 +3566,7 @@
3600
3566
  hold = 0;
3601
3567
  bits = 0;
3602
3568
  state.mode = TIME;
3569
+ /* falls through */
3603
3570
  case TIME:
3604
3571
  while (bits < 32) {
3605
3572
  if (have === 0) {
@@ -3622,6 +3589,7 @@
3622
3589
  hold = 0;
3623
3590
  bits = 0;
3624
3591
  state.mode = OS;
3592
+ /* falls through */
3625
3593
  case OS:
3626
3594
  while (bits < 16) {
3627
3595
  if (have === 0) {
@@ -3643,6 +3611,7 @@
3643
3611
  hold = 0;
3644
3612
  bits = 0;
3645
3613
  state.mode = EXLEN;
3614
+ /* falls through */
3646
3615
  case EXLEN:
3647
3616
  if (state.flags & 1024) {
3648
3617
  while (bits < 16) {
@@ -3668,6 +3637,7 @@
3668
3637
  state.head.extra = null;
3669
3638
  }
3670
3639
  state.mode = EXTRA;
3640
+ /* falls through */
3671
3641
  case EXTRA:
3672
3642
  if (state.flags & 1024) {
3673
3643
  copy = state.length;
@@ -3704,6 +3674,7 @@
3704
3674
  }
3705
3675
  state.length = 0;
3706
3676
  state.mode = NAME;
3677
+ /* falls through */
3707
3678
  case NAME:
3708
3679
  if (state.flags & 2048) {
3709
3680
  if (have === 0) {
@@ -3729,6 +3700,7 @@
3729
3700
  }
3730
3701
  state.length = 0;
3731
3702
  state.mode = COMMENT;
3703
+ /* falls through */
3732
3704
  case COMMENT:
3733
3705
  if (state.flags & 4096) {
3734
3706
  if (have === 0) {
@@ -3753,6 +3725,7 @@
3753
3725
  state.head.comment = null;
3754
3726
  }
3755
3727
  state.mode = HCRC;
3728
+ /* falls through */
3756
3729
  case HCRC:
3757
3730
  if (state.flags & 512) {
3758
3731
  while (bits < 16) {
@@ -3791,6 +3764,7 @@
3791
3764
  hold = 0;
3792
3765
  bits = 0;
3793
3766
  state.mode = DICT;
3767
+ /* falls through */
3794
3768
  case DICT:
3795
3769
  if (state.havedict === 0) {
3796
3770
  strm.next_out = put;
@@ -3803,10 +3777,12 @@
3803
3777
  }
3804
3778
  strm.adler = state.check = 1;
3805
3779
  state.mode = TYPE;
3780
+ /* falls through */
3806
3781
  case TYPE:
3807
3782
  if (flush === Z_BLOCK || flush === Z_TREES) {
3808
3783
  break inf_leave;
3809
3784
  }
3785
+ /* falls through */
3810
3786
  case TYPEDO:
3811
3787
  if (state.last) {
3812
3788
  hold >>>= bits & 7;
@@ -3871,8 +3847,10 @@
3871
3847
  if (flush === Z_TREES) {
3872
3848
  break inf_leave;
3873
3849
  }
3850
+ /* falls through */
3874
3851
  case COPY_:
3875
3852
  state.mode = COPY;
3853
+ /* falls through */
3876
3854
  case COPY:
3877
3855
  copy = state.length;
3878
3856
  if (copy) {
@@ -3920,6 +3898,7 @@
3920
3898
  }
3921
3899
  state.have = 0;
3922
3900
  state.mode = LENLENS;
3901
+ /* falls through */
3923
3902
  case LENLENS:
3924
3903
  while (state.have < state.ncode) {
3925
3904
  while (bits < 3) {
@@ -3949,6 +3928,7 @@
3949
3928
  }
3950
3929
  state.have = 0;
3951
3930
  state.mode = CODELENS;
3931
+ /* falls through */
3952
3932
  case CODELENS:
3953
3933
  while (state.have < state.nlen + state.ndist) {
3954
3934
  for (; ; ) {
@@ -4066,8 +4046,10 @@
4066
4046
  if (flush === Z_TREES) {
4067
4047
  break inf_leave;
4068
4048
  }
4049
+ /* falls through */
4069
4050
  case LEN_:
4070
4051
  state.mode = LEN;
4052
+ /* falls through */
4071
4053
  case LEN:
4072
4054
  if (have >= 6 && left >= 258) {
4073
4055
  strm.next_out = put;
@@ -4149,6 +4131,7 @@
4149
4131
  }
4150
4132
  state.extra = here_op & 15;
4151
4133
  state.mode = LENEXT;
4134
+ /* falls through */
4152
4135
  case LENEXT:
4153
4136
  if (state.extra) {
4154
4137
  n = state.extra;
@@ -4167,6 +4150,7 @@
4167
4150
  }
4168
4151
  state.was = state.length;
4169
4152
  state.mode = DIST;
4153
+ /* falls through */
4170
4154
  case DIST:
4171
4155
  for (; ; ) {
4172
4156
  here = state.distcode[hold & (1 << state.distbits) - 1];
@@ -4217,6 +4201,7 @@
4217
4201
  state.offset = here_val;
4218
4202
  state.extra = here_op & 15;
4219
4203
  state.mode = DISTEXT;
4204
+ /* falls through */
4220
4205
  case DISTEXT:
4221
4206
  if (state.extra) {
4222
4207
  n = state.extra;
@@ -4239,6 +4224,7 @@
4239
4224
  break;
4240
4225
  }
4241
4226
  state.mode = MATCH;
4227
+ /* falls through */
4242
4228
  case MATCH:
4243
4229
  if (left === 0) {
4244
4230
  break inf_leave;
@@ -4315,6 +4301,7 @@
4315
4301
  bits = 0;
4316
4302
  }
4317
4303
  state.mode = LENGTH;
4304
+ /* falls through */
4318
4305
  case LENGTH:
4319
4306
  if (state.wrap && state.flags) {
4320
4307
  while (bits < 32) {
@@ -4334,6 +4321,7 @@
4334
4321
  bits = 0;
4335
4322
  }
4336
4323
  state.mode = DONE;
4324
+ /* falls through */
4337
4325
  case DONE:
4338
4326
  ret = Z_STREAM_END;
4339
4327
  break inf_leave;
@@ -4343,6 +4331,7 @@
4343
4331
  case MEM:
4344
4332
  return Z_MEM_ERROR;
4345
4333
  case SYNC:
4334
+ /* falls through */
4346
4335
  default:
4347
4336
  return Z_STREAM_ERROR;
4348
4337
  }
@@ -4518,8 +4507,7 @@
4518
4507
  var GZheader = require_gzheader();
4519
4508
  var toString = Object.prototype.toString;
4520
4509
  function Inflate(options) {
4521
- if (!(this instanceof Inflate))
4522
- return new Inflate(options);
4510
+ if (!(this instanceof Inflate)) return new Inflate(options);
4523
4511
  this.options = utils.assign({
4524
4512
  chunkSize: 16384,
4525
4513
  windowBits: 0,
@@ -4814,8 +4802,7 @@
4814
4802
  var val = this.readVarint(), tag = val >> 3, startPos = this.pos;
4815
4803
  this.type = val & 7;
4816
4804
  readField(tag, result, this);
4817
- if (this.pos === startPos)
4818
- this.skip(val);
4805
+ if (this.pos === startPos) this.skip(val);
4819
4806
  }
4820
4807
  return result;
4821
4808
  },
@@ -4857,20 +4844,16 @@
4857
4844
  var buf = this.buf, val, b;
4858
4845
  b = buf[this.pos++];
4859
4846
  val = b & 127;
4860
- if (b < 128)
4861
- return val;
4847
+ if (b < 128) return val;
4862
4848
  b = buf[this.pos++];
4863
4849
  val |= (b & 127) << 7;
4864
- if (b < 128)
4865
- return val;
4850
+ if (b < 128) return val;
4866
4851
  b = buf[this.pos++];
4867
4852
  val |= (b & 127) << 14;
4868
- if (b < 128)
4869
- return val;
4853
+ if (b < 128) return val;
4870
4854
  b = buf[this.pos++];
4871
4855
  val |= (b & 127) << 21;
4872
- if (b < 128)
4873
- return val;
4856
+ if (b < 128) return val;
4874
4857
  b = buf[this.pos];
4875
4858
  val |= (b & 15) << 28;
4876
4859
  return readVarintRemainder(val, isSigned, this);
@@ -4901,99 +4884,76 @@
4901
4884
  },
4902
4885
  // verbose for performance reasons; doesn't affect gzipped size
4903
4886
  readPackedVarint: function(arr, isSigned) {
4904
- if (this.type !== Pbf.Bytes)
4905
- return arr.push(this.readVarint(isSigned));
4887
+ if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));
4906
4888
  var end = readPackedEnd(this);
4907
4889
  arr = arr || [];
4908
- while (this.pos < end)
4909
- arr.push(this.readVarint(isSigned));
4890
+ while (this.pos < end) arr.push(this.readVarint(isSigned));
4910
4891
  return arr;
4911
4892
  },
4912
4893
  readPackedSVarint: function(arr) {
4913
- if (this.type !== Pbf.Bytes)
4914
- return arr.push(this.readSVarint());
4894
+ if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());
4915
4895
  var end = readPackedEnd(this);
4916
4896
  arr = arr || [];
4917
- while (this.pos < end)
4918
- arr.push(this.readSVarint());
4897
+ while (this.pos < end) arr.push(this.readSVarint());
4919
4898
  return arr;
4920
4899
  },
4921
4900
  readPackedBoolean: function(arr) {
4922
- if (this.type !== Pbf.Bytes)
4923
- return arr.push(this.readBoolean());
4901
+ if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());
4924
4902
  var end = readPackedEnd(this);
4925
4903
  arr = arr || [];
4926
- while (this.pos < end)
4927
- arr.push(this.readBoolean());
4904
+ while (this.pos < end) arr.push(this.readBoolean());
4928
4905
  return arr;
4929
4906
  },
4930
4907
  readPackedFloat: function(arr) {
4931
- if (this.type !== Pbf.Bytes)
4932
- return arr.push(this.readFloat());
4908
+ if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());
4933
4909
  var end = readPackedEnd(this);
4934
4910
  arr = arr || [];
4935
- while (this.pos < end)
4936
- arr.push(this.readFloat());
4911
+ while (this.pos < end) arr.push(this.readFloat());
4937
4912
  return arr;
4938
4913
  },
4939
4914
  readPackedDouble: function(arr) {
4940
- if (this.type !== Pbf.Bytes)
4941
- return arr.push(this.readDouble());
4915
+ if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());
4942
4916
  var end = readPackedEnd(this);
4943
4917
  arr = arr || [];
4944
- while (this.pos < end)
4945
- arr.push(this.readDouble());
4918
+ while (this.pos < end) arr.push(this.readDouble());
4946
4919
  return arr;
4947
4920
  },
4948
4921
  readPackedFixed32: function(arr) {
4949
- if (this.type !== Pbf.Bytes)
4950
- return arr.push(this.readFixed32());
4922
+ if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());
4951
4923
  var end = readPackedEnd(this);
4952
4924
  arr = arr || [];
4953
- while (this.pos < end)
4954
- arr.push(this.readFixed32());
4925
+ while (this.pos < end) arr.push(this.readFixed32());
4955
4926
  return arr;
4956
4927
  },
4957
4928
  readPackedSFixed32: function(arr) {
4958
- if (this.type !== Pbf.Bytes)
4959
- return arr.push(this.readSFixed32());
4929
+ if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());
4960
4930
  var end = readPackedEnd(this);
4961
4931
  arr = arr || [];
4962
- while (this.pos < end)
4963
- arr.push(this.readSFixed32());
4932
+ while (this.pos < end) arr.push(this.readSFixed32());
4964
4933
  return arr;
4965
4934
  },
4966
4935
  readPackedFixed64: function(arr) {
4967
- if (this.type !== Pbf.Bytes)
4968
- return arr.push(this.readFixed64());
4936
+ if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());
4969
4937
  var end = readPackedEnd(this);
4970
4938
  arr = arr || [];
4971
- while (this.pos < end)
4972
- arr.push(this.readFixed64());
4939
+ while (this.pos < end) arr.push(this.readFixed64());
4973
4940
  return arr;
4974
4941
  },
4975
4942
  readPackedSFixed64: function(arr) {
4976
- if (this.type !== Pbf.Bytes)
4977
- return arr.push(this.readSFixed64());
4943
+ if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());
4978
4944
  var end = readPackedEnd(this);
4979
4945
  arr = arr || [];
4980
- while (this.pos < end)
4981
- arr.push(this.readSFixed64());
4946
+ while (this.pos < end) arr.push(this.readSFixed64());
4982
4947
  return arr;
4983
4948
  },
4984
4949
  skip: function(val) {
4985
4950
  var type = val & 7;
4986
- if (type === Pbf.Varint)
4987
- while (this.buf[this.pos++] > 127) {
4988
- }
4989
- else if (type === Pbf.Bytes)
4990
- this.pos = this.readVarint() + this.pos;
4991
- else if (type === Pbf.Fixed32)
4992
- this.pos += 4;
4993
- else if (type === Pbf.Fixed64)
4994
- this.pos += 8;
4995
- else
4996
- throw new Error("Unimplemented type: " + type);
4951
+ if (type === Pbf.Varint) while (this.buf[this.pos++] > 127) {
4952
+ }
4953
+ else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;
4954
+ else if (type === Pbf.Fixed32) this.pos += 4;
4955
+ else if (type === Pbf.Fixed64) this.pos += 8;
4956
+ else throw new Error("Unimplemented type: " + type);
4997
4957
  },
4998
4958
  // === WRITING =================================================================
4999
4959
  writeTag: function(tag, type) {
@@ -5001,8 +4961,7 @@
5001
4961
  },
5002
4962
  realloc: function(min) {
5003
4963
  var length = this.length || 16;
5004
- while (length < this.pos + min)
5005
- length *= 2;
4964
+ while (length < this.pos + min) length *= 2;
5006
4965
  if (length !== this.length) {
5007
4966
  var buf = new Uint8Array(length);
5008
4967
  buf.set(this.buf);
@@ -5045,14 +5004,11 @@
5045
5004
  }
5046
5005
  this.realloc(4);
5047
5006
  this.buf[this.pos++] = val & 127 | (val > 127 ? 128 : 0);
5048
- if (val <= 127)
5049
- return;
5007
+ if (val <= 127) return;
5050
5008
  this.buf[this.pos++] = (val >>>= 7) & 127 | (val > 127 ? 128 : 0);
5051
- if (val <= 127)
5052
- return;
5009
+ if (val <= 127) return;
5053
5010
  this.buf[this.pos++] = (val >>>= 7) & 127 | (val > 127 ? 128 : 0);
5054
- if (val <= 127)
5055
- return;
5011
+ if (val <= 127) return;
5056
5012
  this.buf[this.pos++] = val >>> 7 & 127;
5057
5013
  },
5058
5014
  writeSVarint: function(val) {
@@ -5068,8 +5024,7 @@
5068
5024
  var startPos = this.pos;
5069
5025
  this.pos = writeUtf8(this.buf, str, this.pos);
5070
5026
  var len = this.pos - startPos;
5071
- if (len >= 128)
5072
- makeRoomForExtraLength(startPos, len, this);
5027
+ if (len >= 128) makeRoomForExtraLength(startPos, len, this);
5073
5028
  this.pos = startPos - 1;
5074
5029
  this.writeVarint(len);
5075
5030
  this.pos += len;
@@ -5088,16 +5043,14 @@
5088
5043
  var len = buffer.length;
5089
5044
  this.writeVarint(len);
5090
5045
  this.realloc(len);
5091
- for (var i = 0; i < len; i++)
5092
- this.buf[this.pos++] = buffer[i];
5046
+ for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];
5093
5047
  },
5094
5048
  writeRawMessage: function(fn, obj) {
5095
5049
  this.pos++;
5096
5050
  var startPos = this.pos;
5097
5051
  fn(obj, this);
5098
5052
  var len = this.pos - startPos;
5099
- if (len >= 128)
5100
- makeRoomForExtraLength(startPos, len, this);
5053
+ if (len >= 128) makeRoomForExtraLength(startPos, len, this);
5101
5054
  this.pos = startPos - 1;
5102
5055
  this.writeVarint(len);
5103
5056
  this.pos += len;
@@ -5107,40 +5060,31 @@
5107
5060
  this.writeRawMessage(fn, obj);
5108
5061
  },
5109
5062
  writePackedVarint: function(tag, arr) {
5110
- if (arr.length)
5111
- this.writeMessage(tag, writePackedVarint, arr);
5063
+ if (arr.length) this.writeMessage(tag, writePackedVarint, arr);
5112
5064
  },
5113
5065
  writePackedSVarint: function(tag, arr) {
5114
- if (arr.length)
5115
- this.writeMessage(tag, writePackedSVarint, arr);
5066
+ if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);
5116
5067
  },
5117
5068
  writePackedBoolean: function(tag, arr) {
5118
- if (arr.length)
5119
- this.writeMessage(tag, writePackedBoolean, arr);
5069
+ if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);
5120
5070
  },
5121
5071
  writePackedFloat: function(tag, arr) {
5122
- if (arr.length)
5123
- this.writeMessage(tag, writePackedFloat, arr);
5072
+ if (arr.length) this.writeMessage(tag, writePackedFloat, arr);
5124
5073
  },
5125
5074
  writePackedDouble: function(tag, arr) {
5126
- if (arr.length)
5127
- this.writeMessage(tag, writePackedDouble, arr);
5075
+ if (arr.length) this.writeMessage(tag, writePackedDouble, arr);
5128
5076
  },
5129
5077
  writePackedFixed32: function(tag, arr) {
5130
- if (arr.length)
5131
- this.writeMessage(tag, writePackedFixed32, arr);
5078
+ if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);
5132
5079
  },
5133
5080
  writePackedSFixed32: function(tag, arr) {
5134
- if (arr.length)
5135
- this.writeMessage(tag, writePackedSFixed32, arr);
5081
+ if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr);
5136
5082
  },
5137
5083
  writePackedFixed64: function(tag, arr) {
5138
- if (arr.length)
5139
- this.writeMessage(tag, writePackedFixed64, arr);
5084
+ if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);
5140
5085
  },
5141
5086
  writePackedSFixed64: function(tag, arr) {
5142
- if (arr.length)
5143
- this.writeMessage(tag, writePackedSFixed64, arr);
5087
+ if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr);
5144
5088
  },
5145
5089
  writeBytesField: function(tag, buffer) {
5146
5090
  this.writeTag(tag, Pbf.Bytes);
@@ -5190,28 +5134,22 @@
5190
5134
  var buf = p.buf, h, b;
5191
5135
  b = buf[p.pos++];
5192
5136
  h = (b & 112) >> 4;
5193
- if (b < 128)
5194
- return toNum(l, h, s);
5137
+ if (b < 128) return toNum(l, h, s);
5195
5138
  b = buf[p.pos++];
5196
5139
  h |= (b & 127) << 3;
5197
- if (b < 128)
5198
- return toNum(l, h, s);
5140
+ if (b < 128) return toNum(l, h, s);
5199
5141
  b = buf[p.pos++];
5200
5142
  h |= (b & 127) << 10;
5201
- if (b < 128)
5202
- return toNum(l, h, s);
5143
+ if (b < 128) return toNum(l, h, s);
5203
5144
  b = buf[p.pos++];
5204
5145
  h |= (b & 127) << 17;
5205
- if (b < 128)
5206
- return toNum(l, h, s);
5146
+ if (b < 128) return toNum(l, h, s);
5207
5147
  b = buf[p.pos++];
5208
5148
  h |= (b & 127) << 24;
5209
- if (b < 128)
5210
- return toNum(l, h, s);
5149
+ if (b < 128) return toNum(l, h, s);
5211
5150
  b = buf[p.pos++];
5212
5151
  h |= (b & 1) << 31;
5213
- if (b < 128)
5214
- return toNum(l, h, s);
5152
+ if (b < 128) return toNum(l, h, s);
5215
5153
  throw new Error("Expected varint not more than 10 bytes");
5216
5154
  }
5217
5155
  function readPackedEnd(pbf) {
@@ -5259,63 +5197,48 @@
5259
5197
  function writeBigVarintHigh(high, pbf) {
5260
5198
  var lsb = (high & 7) << 4;
5261
5199
  pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 128 : 0);
5262
- if (!high)
5263
- return;
5200
+ if (!high) return;
5264
5201
  pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
5265
- if (!high)
5266
- return;
5202
+ if (!high) return;
5267
5203
  pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
5268
- if (!high)
5269
- return;
5204
+ if (!high) return;
5270
5205
  pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
5271
- if (!high)
5272
- return;
5206
+ if (!high) return;
5273
5207
  pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
5274
- if (!high)
5275
- return;
5208
+ if (!high) return;
5276
5209
  pbf.buf[pbf.pos++] = high & 127;
5277
5210
  }
5278
5211
  function makeRoomForExtraLength(startPos, len, pbf) {
5279
5212
  var extraLen = len <= 16383 ? 1 : len <= 2097151 ? 2 : len <= 268435455 ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));
5280
5213
  pbf.realloc(extraLen);
5281
- for (var i = pbf.pos - 1; i >= startPos; i--)
5282
- pbf.buf[i + extraLen] = pbf.buf[i];
5214
+ for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];
5283
5215
  }
5284
5216
  function writePackedVarint(arr, pbf) {
5285
- for (var i = 0; i < arr.length; i++)
5286
- pbf.writeVarint(arr[i]);
5217
+ for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);
5287
5218
  }
5288
5219
  function writePackedSVarint(arr, pbf) {
5289
- for (var i = 0; i < arr.length; i++)
5290
- pbf.writeSVarint(arr[i]);
5220
+ for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);
5291
5221
  }
5292
5222
  function writePackedFloat(arr, pbf) {
5293
- for (var i = 0; i < arr.length; i++)
5294
- pbf.writeFloat(arr[i]);
5223
+ for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);
5295
5224
  }
5296
5225
  function writePackedDouble(arr, pbf) {
5297
- for (var i = 0; i < arr.length; i++)
5298
- pbf.writeDouble(arr[i]);
5226
+ for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);
5299
5227
  }
5300
5228
  function writePackedBoolean(arr, pbf) {
5301
- for (var i = 0; i < arr.length; i++)
5302
- pbf.writeBoolean(arr[i]);
5229
+ for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);
5303
5230
  }
5304
5231
  function writePackedFixed32(arr, pbf) {
5305
- for (var i = 0; i < arr.length; i++)
5306
- pbf.writeFixed32(arr[i]);
5232
+ for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);
5307
5233
  }
5308
5234
  function writePackedSFixed32(arr, pbf) {
5309
- for (var i = 0; i < arr.length; i++)
5310
- pbf.writeSFixed32(arr[i]);
5235
+ for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]);
5311
5236
  }
5312
5237
  function writePackedFixed64(arr, pbf) {
5313
- for (var i = 0; i < arr.length; i++)
5314
- pbf.writeFixed64(arr[i]);
5238
+ for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);
5315
5239
  }
5316
5240
  function writePackedSFixed64(arr, pbf) {
5317
- for (var i = 0; i < arr.length; i++)
5318
- pbf.writeSFixed64(arr[i]);
5241
+ for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]);
5319
5242
  }
5320
5243
  function readUInt32(buf, pos) {
5321
5244
  return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16) + buf[pos + 3] * 16777216;
@@ -5336,8 +5259,7 @@
5336
5259
  var b0 = buf[i];
5337
5260
  var c = null;
5338
5261
  var bytesPerSequence = b0 > 239 ? 4 : b0 > 223 ? 3 : b0 > 191 ? 2 : 1;
5339
- if (i + bytesPerSequence > end)
5340
- break;
5262
+ if (i + bytesPerSequence > end) break;
5341
5263
  var b1, b2, b3;
5342
5264
  if (bytesPerSequence === 1) {
5343
5265
  if (b0 < 128) {
@@ -5951,20 +5873,18 @@
5951
5873
  }
5952
5874
 
5953
5875
  // src/layers/schema/carto-tile.ts
5954
- var KeyValueObjectReader = class {
5876
+ var KeyValueObjectReader = class _KeyValueObjectReader {
5955
5877
  static read(pbf, end) {
5956
- return pbf.readFields(KeyValueObjectReader._readField, { key: "", value: null }, end);
5878
+ return pbf.readFields(_KeyValueObjectReader._readField, { key: "", value: null }, end);
5957
5879
  }
5958
5880
  static _readField(tag, obj, pbf) {
5959
- if (tag === 1)
5960
- obj.key = pbf.readString();
5961
- else if (tag === 2)
5962
- obj.value = pbf.readString();
5881
+ if (tag === 1) obj.key = pbf.readString();
5882
+ else if (tag === 2) obj.value = pbf.readString();
5963
5883
  }
5964
5884
  };
5965
- var PropertiesReader = class {
5885
+ var PropertiesReader = class _PropertiesReader {
5966
5886
  static read(pbf, end) {
5967
- return pbf.readFields(PropertiesReader._readField, {}, end);
5887
+ return pbf.readFields(_PropertiesReader._readField, {}, end);
5968
5888
  }
5969
5889
  static _readField(tag, obj, pbf) {
5970
5890
  if (tag === 1) {
@@ -5973,63 +5893,55 @@
5973
5893
  }
5974
5894
  }
5975
5895
  };
5976
- var DoublesReader = class {
5896
+ var DoublesReader = class _DoublesReader {
5977
5897
  static read(pbf, end) {
5978
- const { value, size } = pbf.readFields(DoublesReader._readField, { value: [], size: 0 }, end);
5898
+ const { value, size } = pbf.readFields(_DoublesReader._readField, { value: [], size: 0 }, end);
5979
5899
  return { value, size };
5980
5900
  }
5981
5901
  static _readField(tag, obj, pbf) {
5982
- if (tag === 1)
5983
- readPackedTypedArray(Float64Array, pbf, obj);
5984
- else if (tag === 2)
5985
- obj.size = pbf.readVarint(true);
5902
+ if (tag === 1) readPackedTypedArray(Float64Array, pbf, obj);
5903
+ else if (tag === 2) obj.size = pbf.readVarint(true);
5986
5904
  }
5987
5905
  };
5988
- var IntsReader = class {
5906
+ var IntsReader = class _IntsReader {
5989
5907
  static read(pbf, end) {
5990
- const { value, size } = pbf.readFields(IntsReader._readField, { value: [], size: 0 }, end);
5908
+ const { value, size } = pbf.readFields(_IntsReader._readField, { value: [], size: 0 }, end);
5991
5909
  return { value: new Uint32Array(value), size };
5992
5910
  }
5993
5911
  static _readField(tag, obj, pbf) {
5994
- if (tag === 1)
5995
- pbf.readPackedVarint(obj.value);
5996
- else if (tag === 2)
5997
- obj.size = pbf.readVarint(true);
5912
+ if (tag === 1) pbf.readPackedVarint(obj.value);
5913
+ else if (tag === 2) obj.size = pbf.readVarint(true);
5998
5914
  }
5999
5915
  };
6000
- var FieldsReader = class {
5916
+ var FieldsReader = class _FieldsReader {
6001
5917
  static read(pbf, end) {
6002
- return pbf.readFields(FieldsReader._readField, { id: 0 }, end);
5918
+ return pbf.readFields(_FieldsReader._readField, { id: 0 }, end);
6003
5919
  }
6004
5920
  static _readField(tag, obj, pbf) {
6005
- if (tag === 1)
6006
- obj.id = pbf.readVarint();
5921
+ if (tag === 1) obj.id = pbf.readVarint();
6007
5922
  }
6008
5923
  };
6009
- var NumericPropReader = class {
5924
+ var NumericPropReader = class _NumericPropReader {
6010
5925
  static read(pbf, end) {
6011
- return pbf.readFields(NumericPropReader._readField, { value: [] }, end);
5926
+ return pbf.readFields(_NumericPropReader._readField, { value: [] }, end);
6012
5927
  }
6013
5928
  static _readField(tag, obj, pbf) {
6014
- if (tag === 1)
6015
- readPackedTypedArray(Float64Array, pbf, obj);
5929
+ if (tag === 1) readPackedTypedArray(Float64Array, pbf, obj);
6016
5930
  }
6017
5931
  };
6018
- var NumericPropKeyValueReader = class {
5932
+ var NumericPropKeyValueReader = class _NumericPropKeyValueReader {
6019
5933
  static read(pbf, end) {
6020
- return pbf.readFields(NumericPropKeyValueReader._readField, { key: "", value: null }, end);
5934
+ return pbf.readFields(_NumericPropKeyValueReader._readField, { key: "", value: null }, end);
6021
5935
  }
6022
5936
  static _readField(tag, obj, pbf) {
6023
- if (tag === 1)
6024
- obj.key = pbf.readString();
6025
- else if (tag === 2)
6026
- obj.value = NumericPropReader.read(pbf, pbf.readVarint() + pbf.pos);
5937
+ if (tag === 1) obj.key = pbf.readString();
5938
+ else if (tag === 2) obj.value = NumericPropReader.read(pbf, pbf.readVarint() + pbf.pos);
6027
5939
  }
6028
5940
  };
6029
- var PointsReader = class {
5941
+ var PointsReader = class _PointsReader {
6030
5942
  static read(pbf, end) {
6031
5943
  return pbf.readFields(
6032
- PointsReader._readField,
5944
+ _PointsReader._readField,
6033
5945
  {
6034
5946
  positions: null,
6035
5947
  globalFeatureIds: null,
@@ -6042,25 +5954,20 @@
6042
5954
  );
6043
5955
  }
6044
5956
  static _readField(tag, obj, pbf) {
6045
- if (tag === 1)
6046
- obj.positions = DoublesReader.read(pbf, pbf.readVarint() + pbf.pos);
6047
- else if (tag === 2)
6048
- obj.globalFeatureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6049
- else if (tag === 3)
6050
- obj.featureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6051
- else if (tag === 4)
6052
- obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
5957
+ if (tag === 1) obj.positions = DoublesReader.read(pbf, pbf.readVarint() + pbf.pos);
5958
+ else if (tag === 2) obj.globalFeatureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
5959
+ else if (tag === 3) obj.featureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
5960
+ else if (tag === 4) obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
6053
5961
  else if (tag === 5) {
6054
5962
  const entry = NumericPropKeyValueReader.read(pbf, pbf.readVarint() + pbf.pos);
6055
5963
  obj.numericProps[entry.key] = entry.value;
6056
- } else if (tag === 6)
6057
- obj.fields.push(FieldsReader.read(pbf, pbf.readVarint() + pbf.pos));
5964
+ } else if (tag === 6) obj.fields.push(FieldsReader.read(pbf, pbf.readVarint() + pbf.pos));
6058
5965
  }
6059
5966
  };
6060
- var LinesReader = class {
5967
+ var LinesReader = class _LinesReader {
6061
5968
  static read(pbf, end) {
6062
5969
  return pbf.readFields(
6063
- LinesReader._readField,
5970
+ _LinesReader._readField,
6064
5971
  {
6065
5972
  positions: null,
6066
5973
  pathIndices: null,
@@ -6074,27 +5981,21 @@
6074
5981
  );
6075
5982
  }
6076
5983
  static _readField(tag, obj, pbf) {
6077
- if (tag === 1)
6078
- obj.positions = DoublesReader.read(pbf, pbf.readVarint() + pbf.pos);
6079
- else if (tag === 2)
6080
- obj.pathIndices = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6081
- else if (tag === 3)
6082
- obj.globalFeatureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6083
- else if (tag === 4)
6084
- obj.featureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6085
- else if (tag === 5)
6086
- obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
5984
+ if (tag === 1) obj.positions = DoublesReader.read(pbf, pbf.readVarint() + pbf.pos);
5985
+ else if (tag === 2) obj.pathIndices = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
5986
+ else if (tag === 3) obj.globalFeatureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
5987
+ else if (tag === 4) obj.featureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
5988
+ else if (tag === 5) obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
6087
5989
  else if (tag === 6) {
6088
5990
  const entry = NumericPropKeyValueReader.read(pbf, pbf.readVarint() + pbf.pos);
6089
5991
  obj.numericProps[entry.key] = entry.value;
6090
- } else if (tag === 7)
6091
- obj.fields.push(FieldsReader.read(pbf, pbf.readVarint() + pbf.pos));
5992
+ } else if (tag === 7) obj.fields.push(FieldsReader.read(pbf, pbf.readVarint() + pbf.pos));
6092
5993
  }
6093
5994
  };
6094
- var PolygonsReader = class {
5995
+ var PolygonsReader = class _PolygonsReader {
6095
5996
  static read(pbf, end) {
6096
5997
  return pbf.readFields(
6097
- PolygonsReader._readField,
5998
+ _PolygonsReader._readField,
6098
5999
  {
6099
6000
  positions: null,
6100
6001
  polygonIndices: null,
@@ -6110,38 +6011,28 @@
6110
6011
  );
6111
6012
  }
6112
6013
  static _readField(tag, obj, pbf) {
6113
- if (tag === 1)
6114
- obj.positions = DoublesReader.read(pbf, pbf.readVarint() + pbf.pos);
6115
- else if (tag === 2)
6116
- obj.polygonIndices = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6117
- else if (tag === 3)
6118
- obj.globalFeatureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6119
- else if (tag === 4)
6120
- obj.featureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6014
+ if (tag === 1) obj.positions = DoublesReader.read(pbf, pbf.readVarint() + pbf.pos);
6015
+ else if (tag === 2) obj.polygonIndices = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6016
+ else if (tag === 3) obj.globalFeatureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6017
+ else if (tag === 4) obj.featureIds = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6121
6018
  else if (tag === 5)
6122
6019
  obj.primitivePolygonIndices = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6123
- else if (tag === 6)
6124
- obj.triangles = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6125
- else if (tag === 7)
6126
- obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
6020
+ else if (tag === 6) obj.triangles = IntsReader.read(pbf, pbf.readVarint() + pbf.pos);
6021
+ else if (tag === 7) obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
6127
6022
  else if (tag === 8) {
6128
6023
  const entry = NumericPropKeyValueReader.read(pbf, pbf.readVarint() + pbf.pos);
6129
6024
  obj.numericProps[entry.key] = entry.value;
6130
- } else if (tag === 9)
6131
- obj.fields.push(FieldsReader.read(pbf, pbf.readVarint() + pbf.pos));
6025
+ } else if (tag === 9) obj.fields.push(FieldsReader.read(pbf, pbf.readVarint() + pbf.pos));
6132
6026
  }
6133
6027
  };
6134
- var TileReader = class {
6028
+ var TileReader = class _TileReader {
6135
6029
  static read(pbf, end) {
6136
- return pbf.readFields(TileReader._readField, { points: null, lines: null, polygons: null }, end);
6030
+ return pbf.readFields(_TileReader._readField, { points: null, lines: null, polygons: null }, end);
6137
6031
  }
6138
6032
  static _readField(tag, obj, pbf) {
6139
- if (tag === 1)
6140
- obj.points = PointsReader.read(pbf, pbf.readVarint() + pbf.pos);
6141
- else if (tag === 2)
6142
- obj.lines = LinesReader.read(pbf, pbf.readVarint() + pbf.pos);
6143
- else if (tag === 3)
6144
- obj.polygons = PolygonsReader.read(pbf, pbf.readVarint() + pbf.pos);
6033
+ if (tag === 1) obj.points = PointsReader.read(pbf, pbf.readVarint() + pbf.pos);
6034
+ else if (tag === 2) obj.lines = LinesReader.read(pbf, pbf.readVarint() + pbf.pos);
6035
+ else if (tag === 3) obj.polygons = PolygonsReader.read(pbf, pbf.readVarint() + pbf.pos);
6145
6036
  }
6146
6037
  };
6147
6038
 
@@ -6167,7 +6058,7 @@
6167
6058
  };
6168
6059
 
6169
6060
  // src/layers/schema/carto-vector-tile-loader.ts
6170
- var VERSION = true ? "9.4.0-alpha.1" : "latest";
6061
+ var VERSION = true ? "9.4.0-beta.1" : "latest";
6171
6062
  var id = "cartoVectorTile";
6172
6063
  var DEFAULT_OPTIONS = {
6173
6064
  cartoVectorTile: {
@@ -6217,8 +6108,7 @@
6217
6108
  polygons.triangles = { value: new Uint32Array(triangles), size: 1 };
6218
6109
  }
6219
6110
  function parseCartoVectorTile(arrayBuffer, options) {
6220
- if (!arrayBuffer)
6221
- return null;
6111
+ if (!arrayBuffer) return null;
6222
6112
  const tile = parsePbf(arrayBuffer, TileReader);
6223
6113
  if (tile.polygons && !tile.polygons.triangles) {
6224
6114
  triangulate(tile.polygons);