@deck.gl/carto 8.9.24 → 8.9.26

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.
Files changed (75) hide show
  1. package/dist/cartoRasterTile-worker.js +1084 -0
  2. package/dist/cartoSpatialTile-worker.js +1469 -0
  3. package/dist/cartoVectorTile-worker.js +1727 -0
  4. package/dist/dist.dev.js +630 -105
  5. package/dist/es5/api/maps-v3-client.js +1 -1
  6. package/dist/es5/api/maps-v3-client.js.map +1 -1
  7. package/dist/es5/layers/carto-tile-layer.js +1 -10
  8. package/dist/es5/layers/carto-tile-layer.js.map +1 -1
  9. package/dist/es5/layers/h3-tile-layer.js +1 -2
  10. package/dist/es5/layers/h3-tile-layer.js.map +1 -1
  11. package/dist/es5/layers/quadbin-tile-layer.js +1 -2
  12. package/dist/es5/layers/quadbin-tile-layer.js.map +1 -1
  13. package/dist/es5/layers/schema/carto-raster-tile-loader.js +13 -4
  14. package/dist/es5/layers/schema/carto-raster-tile-loader.js.map +1 -1
  15. package/dist/es5/layers/schema/carto-spatial-tile-loader.js +14 -8
  16. package/dist/es5/layers/schema/carto-spatial-tile-loader.js.map +1 -1
  17. package/dist/es5/layers/schema/carto-vector-tile-loader.js +64 -4
  18. package/dist/es5/layers/schema/carto-vector-tile-loader.js.map +1 -1
  19. package/dist/es5/utils.js +5 -0
  20. package/dist/es5/utils.js.map +1 -1
  21. package/dist/es5/workers/cartoRasterTile.js +10 -0
  22. package/dist/es5/workers/cartoRasterTile.js.map +1 -0
  23. package/dist/es5/workers/cartoSpatialTile.js +10 -0
  24. package/dist/es5/workers/cartoSpatialTile.js.map +1 -0
  25. package/dist/es5/workers/cartoVectorTile.js +10 -0
  26. package/dist/es5/workers/cartoVectorTile.js.map +1 -0
  27. package/dist/esm/api/maps-v3-client.js +1 -1
  28. package/dist/esm/api/maps-v3-client.js.map +1 -1
  29. package/dist/esm/layers/carto-tile-layer.js +2 -10
  30. package/dist/esm/layers/carto-tile-layer.js.map +1 -1
  31. package/dist/esm/layers/h3-tile-layer.js +1 -2
  32. package/dist/esm/layers/h3-tile-layer.js.map +1 -1
  33. package/dist/esm/layers/quadbin-tile-layer.js +1 -2
  34. package/dist/esm/layers/quadbin-tile-layer.js.map +1 -1
  35. package/dist/esm/layers/schema/carto-raster-tile-loader.js +12 -4
  36. package/dist/esm/layers/schema/carto-raster-tile-loader.js.map +1 -1
  37. package/dist/esm/layers/schema/carto-spatial-tile-loader.js +13 -8
  38. package/dist/esm/layers/schema/carto-spatial-tile-loader.js.map +1 -1
  39. package/dist/esm/layers/schema/carto-vector-tile-loader.js +63 -4
  40. package/dist/esm/layers/schema/carto-vector-tile-loader.js.map +1 -1
  41. package/dist/esm/utils.js +3 -0
  42. package/dist/esm/utils.js.map +1 -1
  43. package/dist/esm/workers/cartoRasterTile.js +4 -0
  44. package/dist/esm/workers/cartoRasterTile.js.map +1 -0
  45. package/dist/esm/workers/cartoSpatialTile.js +4 -0
  46. package/dist/esm/workers/cartoSpatialTile.js.map +1 -0
  47. package/dist/esm/workers/cartoVectorTile.js +4 -0
  48. package/dist/esm/workers/cartoVectorTile.js.map +1 -0
  49. package/dist.min.js +24 -24
  50. package/package.json +5 -3
  51. package/src/api/maps-v3-client.ts +1 -1
  52. package/src/layers/carto-tile-layer.ts +2 -12
  53. package/src/layers/h3-tile-layer.ts +1 -2
  54. package/src/layers/quadbin-tile-layer.ts +1 -2
  55. package/src/layers/schema/carto-raster-tile-loader.ts +26 -6
  56. package/src/layers/schema/carto-spatial-tile-loader.ts +25 -11
  57. package/src/layers/schema/carto-vector-tile-loader.ts +79 -9
  58. package/src/utils.ts +6 -0
  59. package/src/workers/cartoRasterTile.ts +4 -0
  60. package/src/workers/cartoSpatialTile.ts +4 -0
  61. package/src/workers/cartoVectorTile.ts +4 -0
  62. package/typed/layers/carto-tile-layer.d.ts.map +1 -1
  63. package/typed/layers/h3-tile-layer.d.ts.map +1 -1
  64. package/typed/layers/quadbin-tile-layer.d.ts.map +1 -1
  65. package/typed/layers/schema/carto-raster-tile-loader.d.ts.map +1 -1
  66. package/typed/layers/schema/carto-spatial-tile-loader.d.ts.map +1 -1
  67. package/typed/layers/schema/carto-vector-tile-loader.d.ts.map +1 -1
  68. package/typed/utils.d.ts +1 -0
  69. package/typed/utils.d.ts.map +1 -1
  70. package/typed/workers/cartoRasterTile.d.ts +2 -0
  71. package/typed/workers/cartoRasterTile.d.ts.map +1 -0
  72. package/typed/workers/cartoSpatialTile.d.ts +2 -0
  73. package/typed/workers/cartoSpatialTile.d.ts.map +1 -0
  74. package/typed/workers/cartoVectorTile.d.ts +2 -0
  75. package/typed/workers/cartoVectorTile.d.ts.map +1 -0
package/dist/dist.dev.js CHANGED
@@ -3985,7 +3985,7 @@ var __exports__ = (() => {
3985
3985
  if (moment2.version === void 0 && moment2.default) {
3986
3986
  moment2 = moment2.default;
3987
3987
  }
3988
- var VERSION = "0.5.35", zones = {}, links = {}, countries = {}, names = {}, guesses = {}, cachedGuess;
3988
+ var VERSION4 = "0.5.35", zones = {}, links = {}, countries = {}, names = {}, guesses = {}, cachedGuess;
3989
3989
  if (!moment2 || typeof moment2.version !== "string") {
3990
3990
  logError("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
3991
3991
  }
@@ -4361,7 +4361,7 @@ var __exports__ = (() => {
4361
4361
  out.tz(name);
4362
4362
  return out;
4363
4363
  }
4364
- tz.version = VERSION;
4364
+ tz.version = VERSION4;
4365
4365
  tz.dataVersion = "";
4366
4366
  tz._zones = zones;
4367
4367
  tz._links = links;
@@ -5355,6 +5355,473 @@ var __exports__ = (() => {
5355
5355
  }
5356
5356
  });
5357
5357
 
5358
+ // ../../node_modules/earcut/src/earcut.js
5359
+ var require_earcut = __commonJS({
5360
+ "../../node_modules/earcut/src/earcut.js"(exports, module) {
5361
+ "use strict";
5362
+ module.exports = earcut2;
5363
+ module.exports.default = earcut2;
5364
+ function earcut2(data, holeIndices, dim) {
5365
+ dim = dim || 2;
5366
+ var hasHoles = holeIndices && holeIndices.length, outerLen = hasHoles ? holeIndices[0] * dim : data.length, outerNode = linkedList(data, 0, outerLen, dim, true), triangles = [];
5367
+ if (!outerNode || outerNode.next === outerNode.prev)
5368
+ return triangles;
5369
+ var minX, minY, maxX, maxY, x, y, invSize;
5370
+ if (hasHoles)
5371
+ outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
5372
+ if (data.length > 80 * dim) {
5373
+ minX = maxX = data[0];
5374
+ minY = maxY = data[1];
5375
+ for (var i = dim; i < outerLen; i += dim) {
5376
+ x = data[i];
5377
+ y = data[i + 1];
5378
+ if (x < minX)
5379
+ minX = x;
5380
+ if (y < minY)
5381
+ minY = y;
5382
+ if (x > maxX)
5383
+ maxX = x;
5384
+ if (y > maxY)
5385
+ maxY = y;
5386
+ }
5387
+ invSize = Math.max(maxX - minX, maxY - minY);
5388
+ invSize = invSize !== 0 ? 1 / invSize : 0;
5389
+ }
5390
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize);
5391
+ return triangles;
5392
+ }
5393
+ function linkedList(data, start, end, dim, clockwise) {
5394
+ var i, last;
5395
+ if (clockwise === signedArea(data, start, end, dim) > 0) {
5396
+ for (i = start; i < end; i += dim)
5397
+ last = insertNode(i, data[i], data[i + 1], last);
5398
+ } else {
5399
+ for (i = end - dim; i >= start; i -= dim)
5400
+ last = insertNode(i, data[i], data[i + 1], last);
5401
+ }
5402
+ if (last && equals(last, last.next)) {
5403
+ removeNode(last);
5404
+ last = last.next;
5405
+ }
5406
+ return last;
5407
+ }
5408
+ function filterPoints(start, end) {
5409
+ if (!start)
5410
+ return start;
5411
+ if (!end)
5412
+ end = start;
5413
+ var p = start, again;
5414
+ do {
5415
+ again = false;
5416
+ if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
5417
+ removeNode(p);
5418
+ p = end = p.prev;
5419
+ if (p === p.next)
5420
+ break;
5421
+ again = true;
5422
+ } else {
5423
+ p = p.next;
5424
+ }
5425
+ } while (again || p !== end);
5426
+ return end;
5427
+ }
5428
+ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
5429
+ if (!ear)
5430
+ return;
5431
+ if (!pass && invSize)
5432
+ indexCurve(ear, minX, minY, invSize);
5433
+ var stop = ear, prev, next;
5434
+ while (ear.prev !== ear.next) {
5435
+ prev = ear.prev;
5436
+ next = ear.next;
5437
+ if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
5438
+ triangles.push(prev.i / dim);
5439
+ triangles.push(ear.i / dim);
5440
+ triangles.push(next.i / dim);
5441
+ removeNode(ear);
5442
+ ear = next.next;
5443
+ stop = next.next;
5444
+ continue;
5445
+ }
5446
+ ear = next;
5447
+ if (ear === stop) {
5448
+ if (!pass) {
5449
+ earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
5450
+ } else if (pass === 1) {
5451
+ ear = cureLocalIntersections(filterPoints(ear), triangles, dim);
5452
+ earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
5453
+ } else if (pass === 2) {
5454
+ splitEarcut(ear, triangles, dim, minX, minY, invSize);
5455
+ }
5456
+ break;
5457
+ }
5458
+ }
5459
+ }
5460
+ function isEar(ear) {
5461
+ var a = ear.prev, b = ear, c = ear.next;
5462
+ if (area(a, b, c) >= 0)
5463
+ return false;
5464
+ var p = ear.next.next;
5465
+ while (p !== ear.prev) {
5466
+ if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0)
5467
+ return false;
5468
+ p = p.next;
5469
+ }
5470
+ return true;
5471
+ }
5472
+ function isEarHashed(ear, minX, minY, invSize) {
5473
+ var a = ear.prev, b = ear, c = ear.next;
5474
+ if (area(a, b, c) >= 0)
5475
+ return false;
5476
+ var minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x, minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y, maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x, maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y;
5477
+ var minZ = zOrder(minTX, minTY, minX, minY, invSize), maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
5478
+ var p = ear.prevZ, n = ear.nextZ;
5479
+ while (p && p.z >= minZ && n && n.z <= maxZ) {
5480
+ if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0)
5481
+ return false;
5482
+ p = p.prevZ;
5483
+ if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0)
5484
+ return false;
5485
+ n = n.nextZ;
5486
+ }
5487
+ while (p && p.z >= minZ) {
5488
+ if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0)
5489
+ return false;
5490
+ p = p.prevZ;
5491
+ }
5492
+ while (n && n.z <= maxZ) {
5493
+ if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0)
5494
+ return false;
5495
+ n = n.nextZ;
5496
+ }
5497
+ return true;
5498
+ }
5499
+ function cureLocalIntersections(start, triangles, dim) {
5500
+ var p = start;
5501
+ do {
5502
+ var a = p.prev, b = p.next.next;
5503
+ if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
5504
+ triangles.push(a.i / dim);
5505
+ triangles.push(p.i / dim);
5506
+ triangles.push(b.i / dim);
5507
+ removeNode(p);
5508
+ removeNode(p.next);
5509
+ p = start = b;
5510
+ }
5511
+ p = p.next;
5512
+ } while (p !== start);
5513
+ return filterPoints(p);
5514
+ }
5515
+ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
5516
+ var a = start;
5517
+ do {
5518
+ var b = a.next.next;
5519
+ while (b !== a.prev) {
5520
+ if (a.i !== b.i && isValidDiagonal(a, b)) {
5521
+ var c = splitPolygon(a, b);
5522
+ a = filterPoints(a, a.next);
5523
+ c = filterPoints(c, c.next);
5524
+ earcutLinked(a, triangles, dim, minX, minY, invSize);
5525
+ earcutLinked(c, triangles, dim, minX, minY, invSize);
5526
+ return;
5527
+ }
5528
+ b = b.next;
5529
+ }
5530
+ a = a.next;
5531
+ } while (a !== start);
5532
+ }
5533
+ function eliminateHoles(data, holeIndices, outerNode, dim) {
5534
+ var queue = [], i, len, start, end, list;
5535
+ for (i = 0, len = holeIndices.length; i < len; i++) {
5536
+ start = holeIndices[i] * dim;
5537
+ end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
5538
+ list = linkedList(data, start, end, dim, false);
5539
+ if (list === list.next)
5540
+ list.steiner = true;
5541
+ queue.push(getLeftmost(list));
5542
+ }
5543
+ queue.sort(compareX);
5544
+ for (i = 0; i < queue.length; i++) {
5545
+ eliminateHole(queue[i], outerNode);
5546
+ outerNode = filterPoints(outerNode, outerNode.next);
5547
+ }
5548
+ return outerNode;
5549
+ }
5550
+ function compareX(a, b) {
5551
+ return a.x - b.x;
5552
+ }
5553
+ function eliminateHole(hole, outerNode) {
5554
+ outerNode = findHoleBridge(hole, outerNode);
5555
+ if (outerNode) {
5556
+ var b = splitPolygon(outerNode, hole);
5557
+ filterPoints(b, b.next);
5558
+ }
5559
+ }
5560
+ function findHoleBridge(hole, outerNode) {
5561
+ var p = outerNode, hx = hole.x, hy = hole.y, qx = -Infinity, m;
5562
+ do {
5563
+ if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
5564
+ var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
5565
+ if (x <= hx && x > qx) {
5566
+ qx = x;
5567
+ if (x === hx) {
5568
+ if (hy === p.y)
5569
+ return p;
5570
+ if (hy === p.next.y)
5571
+ return p.next;
5572
+ }
5573
+ m = p.x < p.next.x ? p : p.next;
5574
+ }
5575
+ }
5576
+ p = p.next;
5577
+ } while (p !== outerNode);
5578
+ if (!m)
5579
+ return null;
5580
+ if (hx === qx)
5581
+ return m;
5582
+ var stop = m, mx = m.x, my = m.y, tanMin = Infinity, tan;
5583
+ p = m;
5584
+ do {
5585
+ if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
5586
+ tan = Math.abs(hy - p.y) / (hx - p.x);
5587
+ if (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {
5588
+ m = p;
5589
+ tanMin = tan;
5590
+ }
5591
+ }
5592
+ p = p.next;
5593
+ } while (p !== stop);
5594
+ return m;
5595
+ }
5596
+ function sectorContainsSector(m, p) {
5597
+ return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
5598
+ }
5599
+ function indexCurve(start, minX, minY, invSize) {
5600
+ var p = start;
5601
+ do {
5602
+ if (p.z === null)
5603
+ p.z = zOrder(p.x, p.y, minX, minY, invSize);
5604
+ p.prevZ = p.prev;
5605
+ p.nextZ = p.next;
5606
+ p = p.next;
5607
+ } while (p !== start);
5608
+ p.prevZ.nextZ = null;
5609
+ p.prevZ = null;
5610
+ sortLinked(p);
5611
+ }
5612
+ function sortLinked(list) {
5613
+ var i, p, q, e, tail, numMerges, pSize, qSize, inSize = 1;
5614
+ do {
5615
+ p = list;
5616
+ list = null;
5617
+ tail = null;
5618
+ numMerges = 0;
5619
+ while (p) {
5620
+ numMerges++;
5621
+ q = p;
5622
+ pSize = 0;
5623
+ for (i = 0; i < inSize; i++) {
5624
+ pSize++;
5625
+ q = q.nextZ;
5626
+ if (!q)
5627
+ break;
5628
+ }
5629
+ qSize = inSize;
5630
+ while (pSize > 0 || qSize > 0 && q) {
5631
+ if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
5632
+ e = p;
5633
+ p = p.nextZ;
5634
+ pSize--;
5635
+ } else {
5636
+ e = q;
5637
+ q = q.nextZ;
5638
+ qSize--;
5639
+ }
5640
+ if (tail)
5641
+ tail.nextZ = e;
5642
+ else
5643
+ list = e;
5644
+ e.prevZ = tail;
5645
+ tail = e;
5646
+ }
5647
+ p = q;
5648
+ }
5649
+ tail.nextZ = null;
5650
+ inSize *= 2;
5651
+ } while (numMerges > 1);
5652
+ return list;
5653
+ }
5654
+ function zOrder(x, y, minX, minY, invSize) {
5655
+ x = 32767 * (x - minX) * invSize;
5656
+ y = 32767 * (y - minY) * invSize;
5657
+ x = (x | x << 8) & 16711935;
5658
+ x = (x | x << 4) & 252645135;
5659
+ x = (x | x << 2) & 858993459;
5660
+ x = (x | x << 1) & 1431655765;
5661
+ y = (y | y << 8) & 16711935;
5662
+ y = (y | y << 4) & 252645135;
5663
+ y = (y | y << 2) & 858993459;
5664
+ y = (y | y << 1) & 1431655765;
5665
+ return x | y << 1;
5666
+ }
5667
+ function getLeftmost(start) {
5668
+ var p = start, leftmost = start;
5669
+ do {
5670
+ if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y)
5671
+ leftmost = p;
5672
+ p = p.next;
5673
+ } while (p !== start);
5674
+ return leftmost;
5675
+ }
5676
+ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
5677
+ return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
5678
+ }
5679
+ function isValidDiagonal(a, b) {
5680
+ return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && (area(a.prev, a, b.prev) || area(a, b.prev, b)) || equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0);
5681
+ }
5682
+ function area(p, q, r) {
5683
+ return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
5684
+ }
5685
+ function equals(p1, p2) {
5686
+ return p1.x === p2.x && p1.y === p2.y;
5687
+ }
5688
+ function intersects(p1, q1, p2, q2) {
5689
+ var o1 = sign(area(p1, q1, p2));
5690
+ var o2 = sign(area(p1, q1, q2));
5691
+ var o3 = sign(area(p2, q2, p1));
5692
+ var o4 = sign(area(p2, q2, q1));
5693
+ if (o1 !== o2 && o3 !== o4)
5694
+ return true;
5695
+ if (o1 === 0 && onSegment(p1, p2, q1))
5696
+ return true;
5697
+ if (o2 === 0 && onSegment(p1, q2, q1))
5698
+ return true;
5699
+ if (o3 === 0 && onSegment(p2, p1, q2))
5700
+ return true;
5701
+ if (o4 === 0 && onSegment(p2, q1, q2))
5702
+ return true;
5703
+ return false;
5704
+ }
5705
+ function onSegment(p, q, r) {
5706
+ return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
5707
+ }
5708
+ function sign(num) {
5709
+ return num > 0 ? 1 : num < 0 ? -1 : 0;
5710
+ }
5711
+ function intersectsPolygon(a, b) {
5712
+ var p = a;
5713
+ do {
5714
+ 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))
5715
+ return true;
5716
+ p = p.next;
5717
+ } while (p !== a);
5718
+ return false;
5719
+ }
5720
+ function locallyInside(a, b) {
5721
+ return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
5722
+ }
5723
+ function middleInside(a, b) {
5724
+ var p = a, inside = false, px = (a.x + b.x) / 2, py = (a.y + b.y) / 2;
5725
+ do {
5726
+ if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)
5727
+ inside = !inside;
5728
+ p = p.next;
5729
+ } while (p !== a);
5730
+ return inside;
5731
+ }
5732
+ function splitPolygon(a, b) {
5733
+ var a2 = new Node(a.i, a.x, a.y), b2 = new Node(b.i, b.x, b.y), an = a.next, bp = b.prev;
5734
+ a.next = b;
5735
+ b.prev = a;
5736
+ a2.next = an;
5737
+ an.prev = a2;
5738
+ b2.next = a2;
5739
+ a2.prev = b2;
5740
+ bp.next = b2;
5741
+ b2.prev = bp;
5742
+ return b2;
5743
+ }
5744
+ function insertNode(i, x, y, last) {
5745
+ var p = new Node(i, x, y);
5746
+ if (!last) {
5747
+ p.prev = p;
5748
+ p.next = p;
5749
+ } else {
5750
+ p.next = last.next;
5751
+ p.prev = last;
5752
+ last.next.prev = p;
5753
+ last.next = p;
5754
+ }
5755
+ return p;
5756
+ }
5757
+ function removeNode(p) {
5758
+ p.next.prev = p.prev;
5759
+ p.prev.next = p.next;
5760
+ if (p.prevZ)
5761
+ p.prevZ.nextZ = p.nextZ;
5762
+ if (p.nextZ)
5763
+ p.nextZ.prevZ = p.prevZ;
5764
+ }
5765
+ function Node(i, x, y) {
5766
+ this.i = i;
5767
+ this.x = x;
5768
+ this.y = y;
5769
+ this.prev = null;
5770
+ this.next = null;
5771
+ this.z = null;
5772
+ this.prevZ = null;
5773
+ this.nextZ = null;
5774
+ this.steiner = false;
5775
+ }
5776
+ earcut2.deviation = function(data, holeIndices, dim, triangles) {
5777
+ var hasHoles = holeIndices && holeIndices.length;
5778
+ var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
5779
+ var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));
5780
+ if (hasHoles) {
5781
+ for (var i = 0, len = holeIndices.length; i < len; i++) {
5782
+ var start = holeIndices[i] * dim;
5783
+ var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
5784
+ polygonArea -= Math.abs(signedArea(data, start, end, dim));
5785
+ }
5786
+ }
5787
+ var trianglesArea = 0;
5788
+ for (i = 0; i < triangles.length; i += 3) {
5789
+ var a = triangles[i] * dim;
5790
+ var b = triangles[i + 1] * dim;
5791
+ var c = triangles[i + 2] * dim;
5792
+ trianglesArea += Math.abs((data[a] - data[c]) * (data[b + 1] - data[a + 1]) - (data[a] - data[b]) * (data[c + 1] - data[a + 1]));
5793
+ }
5794
+ return polygonArea === 0 && trianglesArea === 0 ? 0 : Math.abs((trianglesArea - polygonArea) / polygonArea);
5795
+ };
5796
+ function signedArea(data, start, end, dim) {
5797
+ var sum = 0;
5798
+ for (var i = start, j = end - dim; i < end; i += dim) {
5799
+ sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
5800
+ j = i;
5801
+ }
5802
+ return sum;
5803
+ }
5804
+ earcut2.flatten = function(data) {
5805
+ var dim = data[0][0].length, result = {
5806
+ vertices: [],
5807
+ holes: [],
5808
+ dimensions: dim
5809
+ }, holeIndex = 0;
5810
+ for (var i = 0; i < data.length; i++) {
5811
+ for (var j = 0; j < data[i].length; j++) {
5812
+ for (var d = 0; d < dim; d++)
5813
+ result.vertices.push(data[i][j][d]);
5814
+ }
5815
+ if (i > 0) {
5816
+ holeIndex += data[i - 1].length;
5817
+ result.holes.push(holeIndex);
5818
+ }
5819
+ }
5820
+ return result;
5821
+ };
5822
+ }
5823
+ });
5824
+
5358
5825
  // ../../node_modules/pbf/node_modules/ieee754/index.js
5359
5826
  var require_ieee754 = __commonJS({
5360
5827
  "../../node_modules/pbf/node_modules/ieee754/index.js"(exports) {
@@ -6330,11 +6797,11 @@ var __exports__ = (() => {
6330
6797
  for (var i = 0; i < tiles2.length; i++) {
6331
6798
  var t = tiles2[i];
6332
6799
  if (t[0] % 2 === 0 && t[1] % 2 === 0) {
6333
- var id2 = toID(t[0] + 1, t[1], z), id3 = toID(t[0], t[1] + 1, z), id4 = toID(t[0] + 1, t[1] + 1, z);
6334
- if (tileHash[id2] && tileHash[id3] && tileHash[id4]) {
6800
+ var id22 = toID(t[0] + 1, t[1], z), id32 = toID(t[0], t[1] + 1, z), id4 = toID(t[0] + 1, t[1] + 1, z);
6801
+ if (tileHash[id22] && tileHash[id32] && tileHash[id4]) {
6335
6802
  tileHash[toID(t[0], t[1], t[2])] = false;
6336
- tileHash[id2] = false;
6337
- tileHash[id3] = false;
6803
+ tileHash[id22] = false;
6804
+ tileHash[id32] = false;
6338
6805
  tileHash[id4] = false;
6339
6806
  var parentTile = [t[0] / 2, t[1] / 2, z - 1];
6340
6807
  if (z - 1 === limits.min_zoom)
@@ -6372,8 +6839,8 @@ var __exports__ = (() => {
6372
6839
  for (i = 0; i < intersections.length; i += 2) {
6373
6840
  y = intersections[i][1];
6374
6841
  for (var x = intersections[i][0] + 1; x < intersections[i + 1][0]; x++) {
6375
- var id = toID(x, y, zoom);
6376
- if (!tileHash[id]) {
6842
+ var id4 = toID(x, y, zoom);
6843
+ if (!tileHash[id4]) {
6377
6844
  tileArray.push([x, y, zoom]);
6378
6845
  }
6379
6846
  }
@@ -6424,8 +6891,8 @@ var __exports__ = (() => {
6424
6891
  var dim = 2 * (1 << z);
6425
6892
  return (dim * y + x) * 32 + z;
6426
6893
  }
6427
- function fromID(id) {
6428
- var z = id % 32, dim = 2 * (1 << z), xy = (id - z) / 32, x = xy % dim, y = (xy - x) / dim % dim;
6894
+ function fromID(id4) {
6895
+ var z = id4 % 32, dim = 2 * (1 << z), xy = (id4 - z) / 32, x = xy % dim, y = (xy - x) / dim % dim;
6429
6896
  return [x, y, z];
6430
6897
  }
6431
6898
  }
@@ -11467,7 +11934,10 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
11467
11934
  var import_geo_layers7 = __toESM(require_geo_layers());
11468
11935
 
11469
11936
  // src/layers/carto-tile-layer.ts
11470
- var import_core = __toESM(require_core2());
11937
+ var import_core2 = __toESM(require_core2());
11938
+
11939
+ // src/layers/schema/carto-vector-tile-loader.ts
11940
+ var import_earcut = __toESM(require_earcut());
11471
11941
 
11472
11942
  // src/layers/schema/fast-pbf.ts
11473
11943
  function readPackedTypedArray(TypedArray, pbf, obj) {
@@ -11703,24 +12173,100 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
11703
12173
  return tile;
11704
12174
  }
11705
12175
 
12176
+ // src/utils.ts
12177
+ var import_core = __toESM(require_core());
12178
+ function assert(condition, message) {
12179
+ import_core.log.assert(condition, message);
12180
+ }
12181
+ function createBinaryProxy(data, index) {
12182
+ const {
12183
+ properties,
12184
+ numericProps
12185
+ } = data;
12186
+ return new Proxy(properties[index] || {}, {
12187
+ get(target, property, receiver) {
12188
+ if (property in numericProps) {
12189
+ return numericProps[property].value[index];
12190
+ }
12191
+ return target[property];
12192
+ },
12193
+ has(target, property) {
12194
+ return property in numericProps || property in target;
12195
+ }
12196
+ });
12197
+ }
12198
+ function getWorkerUrl(id4, version) {
12199
+ return `https://unpkg.com/@deck.gl/carto@${version}/dist/${id4}-worker.js`;
12200
+ }
12201
+
11706
12202
  // src/layers/schema/carto-vector-tile-loader.ts
12203
+ var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
12204
+ var id = "cartoVectorTile";
12205
+ var DEFAULT_OPTIONS = {
12206
+ cartoVectorTile: {
12207
+ workerUrl: getWorkerUrl(id, VERSION)
12208
+ }
12209
+ };
11707
12210
  var CartoVectorTileLoader = {
11708
12211
  name: "CARTO Vector Tile",
11709
- version: "1",
11710
- id: "cartoVectorTile",
12212
+ version: VERSION,
12213
+ id,
11711
12214
  module: "carto",
11712
12215
  extensions: ["pbf"],
11713
12216
  mimeTypes: ["application/vnd.carto-vector-tile"],
11714
12217
  category: "geometry",
11715
- worker: false,
11716
12218
  parse: async (arrayBuffer, options) => parseCartoVectorTile(arrayBuffer, options),
11717
12219
  parseSync: parseCartoVectorTile,
11718
- options: {}
12220
+ worker: true,
12221
+ options: DEFAULT_OPTIONS
11719
12222
  };
12223
+ function triangulatePolygon(polygons, target, {
12224
+ startPosition,
12225
+ endPosition,
12226
+ indices
12227
+ }) {
12228
+ const coordLength = polygons.positions.size;
12229
+ const start = startPosition * coordLength;
12230
+ const end = endPosition * coordLength;
12231
+ const polygonPositions = polygons.positions.value.subarray(start, end);
12232
+ const holes = indices.slice(1).map((n) => n - startPosition);
12233
+ const triangles = (0, import_earcut.default)(polygonPositions, holes, coordLength);
12234
+ for (let t = 0, tl = triangles.length; t < tl; ++t) {
12235
+ target.push(startPosition + triangles[t]);
12236
+ }
12237
+ }
12238
+ function triangulate(polygons) {
12239
+ const {
12240
+ polygonIndices,
12241
+ positions,
12242
+ primitivePolygonIndices
12243
+ } = polygons;
12244
+ const triangles = [];
12245
+ let rangeStart = 0;
12246
+ for (let i = 0; i < polygonIndices.value.length - 1; i++) {
12247
+ const startPosition = polygonIndices.value[i];
12248
+ const endPosition = polygonIndices.value[i + 1];
12249
+ const rangeEnd = primitivePolygonIndices.value.indexOf(endPosition);
12250
+ const indices = primitivePolygonIndices.value.subarray(rangeStart, rangeEnd);
12251
+ rangeStart = rangeEnd;
12252
+ triangulatePolygon(polygons, triangles, {
12253
+ startPosition,
12254
+ endPosition,
12255
+ indices
12256
+ });
12257
+ }
12258
+ polygons.triangles = {
12259
+ value: new Uint32Array(triangles),
12260
+ size: 1
12261
+ };
12262
+ }
11720
12263
  function parseCartoVectorTile(arrayBuffer, options) {
11721
12264
  if (!arrayBuffer)
11722
12265
  return null;
11723
12266
  const tile = parsePbf(arrayBuffer, TileReader);
12267
+ if (tile.polygons && !tile.polygons.triangles) {
12268
+ triangulate(tile.polygons);
12269
+ }
11724
12270
  return tile;
11725
12271
  }
11726
12272
  var carto_vector_tile_loader_default = CartoVectorTileLoader;
@@ -11944,7 +12490,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
11944
12490
  }
11945
12491
 
11946
12492
  // src/layers/carto-tile-layer.ts
11947
- (0, import_core.registerLoaders)([carto_vector_tile_loader_default]);
12493
+ (0, import_core2.registerLoaders)([carto_vector_tile_loader_default]);
11948
12494
  var defaultTileFormat = TILE_FORMATS.BINARY;
11949
12495
  var defaultProps = {
11950
12496
  ...import_geo_layers.MVTLayer.defaultProps,
@@ -11963,20 +12509,13 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
11963
12509
  if (!url) {
11964
12510
  return Promise.reject("Invalid URL");
11965
12511
  }
11966
- let loadOptions = this.getLoadOptions();
12512
+ const loadOptions = this.getLoadOptions();
11967
12513
  const {
11968
- fetch: fetch2,
11969
- formatTiles
12514
+ fetch: fetch2
11970
12515
  } = this.props;
11971
12516
  const {
11972
12517
  signal
11973
12518
  } = tile;
11974
- if (formatTiles === TILE_FORMATS.BINARY) {
11975
- loadOptions = {
11976
- ...loadOptions,
11977
- mimeType: "application/vnd.carto-vector-tile"
11978
- };
11979
- }
11980
12519
  return fetch2(url, {
11981
12520
  propName: "data",
11982
12521
  layer: this,
@@ -12021,7 +12560,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12021
12560
  __publicField(CartoTileLayer, "defaultProps", defaultProps);
12022
12561
 
12023
12562
  // src/layers/h3-tile-layer.ts
12024
- var import_core3 = __toESM(require_core());
12563
+ var import_core4 = __toESM(require_core());
12025
12564
  var import_geo_layers4 = __toESM(require_geo_layers());
12026
12565
 
12027
12566
  // src/layers/h3-tileset-2d.ts
@@ -12131,7 +12670,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12131
12670
  };
12132
12671
 
12133
12672
  // src/layers/spatial-index-tile-layer.ts
12134
- var import_core2 = __toESM(require_core2());
12673
+ var import_core3 = __toESM(require_core2());
12135
12674
 
12136
12675
  // src/layers/schema/carto-raster-tile.ts
12137
12676
  var ARRAY_TYPES = {
@@ -12188,18 +12727,25 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12188
12727
  };
12189
12728
 
12190
12729
  // src/layers/schema/carto-raster-tile-loader.ts
12730
+ var VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
12731
+ var id2 = "cartoRasterTile";
12732
+ var DEFAULT_OPTIONS2 = {
12733
+ cartoRasterTile: {
12734
+ workerUrl: getWorkerUrl(id2, VERSION2)
12735
+ }
12736
+ };
12191
12737
  var CartoRasterTileLoader = {
12192
12738
  name: "CARTO Raster Tile",
12193
- version: "1",
12194
- id: "cartoRasterTile",
12739
+ version: VERSION2,
12740
+ id: id2,
12195
12741
  module: "carto",
12196
12742
  extensions: ["pbf"],
12197
12743
  mimeTypes: ["application/vnd.carto-raster-tile"],
12198
12744
  category: "geometry",
12199
- worker: false,
12200
12745
  parse: async (arrayBuffer, options) => parseCartoRasterTile(arrayBuffer, options),
12201
12746
  parseSync: parseCartoRasterTile,
12202
- options: {}
12747
+ worker: true,
12748
+ options: DEFAULT_OPTIONS2
12203
12749
  };
12204
12750
  function parseCartoRasterTile(arrayBuffer, options) {
12205
12751
  if (!arrayBuffer)
@@ -12346,7 +12892,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12346
12892
  const count = cells.indices.value.length;
12347
12893
  const spatial = [];
12348
12894
  for (let i = 0; i < count; i++) {
12349
- const id = scheme === "h3" ? bigIntToHex(cells.indices.value[i]) : cells.indices.value[i];
12895
+ const id4 = scheme === "h3" ? bigIntToHex(cells.indices.value[i]) : cells.indices.value[i];
12350
12896
  const properties = {
12351
12897
  ...cells.properties[i]
12352
12898
  };
@@ -12354,7 +12900,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12354
12900
  properties[key] = cells.numericProps[key].value[i];
12355
12901
  }
12356
12902
  spatial.push({
12357
- id,
12903
+ id: id4,
12358
12904
  properties
12359
12905
  });
12360
12906
  }
@@ -12362,22 +12908,26 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12362
12908
  }
12363
12909
 
12364
12910
  // src/layers/schema/carto-spatial-tile-loader.ts
12911
+ var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
12912
+ var id3 = "cartoSpatialTile";
12913
+ var DEFAULT_OPTIONS3 = {
12914
+ cartoSpatialTile: {
12915
+ scheme: "quadbin",
12916
+ workerUrl: getWorkerUrl(id3, VERSION3)
12917
+ }
12918
+ };
12365
12919
  var CartoSpatialTileLoader = {
12366
12920
  name: "CARTO Spatial Tile",
12367
- version: "1",
12368
- id: "cartoSpatialTile",
12921
+ version: VERSION3,
12922
+ id: id3,
12369
12923
  module: "carto",
12370
12924
  extensions: ["pbf"],
12371
12925
  mimeTypes: ["application/vnd.carto-spatial-tile"],
12372
12926
  category: "geometry",
12373
- worker: false,
12374
12927
  parse: async (arrayBuffer, options) => parseCartoSpatialTile(arrayBuffer, options),
12375
12928
  parseSync: parseCartoSpatialTile,
12376
- options: {
12377
- cartoSpatialTile: {
12378
- scheme: "quadbin"
12379
- }
12380
- }
12929
+ worker: true,
12930
+ options: DEFAULT_OPTIONS3
12381
12931
  };
12382
12932
  function parseCartoSpatialTile(arrayBuffer, options) {
12383
12933
  if (!arrayBuffer)
@@ -12397,7 +12947,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12397
12947
 
12398
12948
  // src/layers/spatial-index-tile-layer.ts
12399
12949
  var import_geo_layers3 = __toESM(require_geo_layers());
12400
- (0, import_core2.registerLoaders)([carto_raster_tile_loader_default, carto_spatial_tile_loader_default]);
12950
+ (0, import_core3.registerLoaders)([carto_raster_tile_loader_default, carto_spatial_tile_loader_default]);
12401
12951
  function isFeatureIdDefined(value) {
12402
12952
  return value !== void 0 && value !== null && value !== "";
12403
12953
  }
@@ -12496,7 +13046,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12496
13046
  var defaultProps3 = {
12497
13047
  aggregationResLevel: 4
12498
13048
  };
12499
- var H3TileLayer = class extends import_core3.CompositeLayer {
13049
+ var H3TileLayer = class extends import_core4.CompositeLayer {
12500
13050
  initializeState() {
12501
13051
  import_geo_layers4.H3HexagonLayer._checkH3Lib();
12502
13052
  this.setState({
@@ -12549,8 +13099,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12549
13099
  ...this.getLoadOptions(),
12550
13100
  cartoSpatialTile: {
12551
13101
  scheme: "h3"
12552
- },
12553
- mimeType: "application/vnd.carto-spatial-tile"
13102
+ }
12554
13103
  }
12555
13104
  })];
12556
13105
  }
@@ -12559,7 +13108,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12559
13108
  __publicField(H3TileLayer, "defaultProps", defaultProps3);
12560
13109
 
12561
13110
  // src/layers/quadbin-tile-layer.ts
12562
- var import_core4 = __toESM(require_core());
13111
+ var import_core5 = __toESM(require_core());
12563
13112
 
12564
13113
  // src/layers/quadbin-layer.ts
12565
13114
  var import_geo_layers5 = __toESM(require_geo_layers());
@@ -12680,7 +13229,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12680
13229
  var defaultProps5 = {
12681
13230
  aggregationResLevel: 6
12682
13231
  };
12683
- var QuadbinTileLayer = class extends import_core4.CompositeLayer {
13232
+ var QuadbinTileLayer = class extends import_core5.CompositeLayer {
12684
13233
  initializeState() {
12685
13234
  this.setState({
12686
13235
  data: null,
@@ -12718,8 +13267,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
12718
13267
  ...this.getLoadOptions(),
12719
13268
  cartoSpatialTile: {
12720
13269
  scheme: "quadbin"
12721
- },
12722
- mimeType: "application/vnd.carto-spatial-tile"
13270
+ }
12723
13271
  }
12724
13272
  })];
12725
13273
  }
@@ -12833,29 +13381,6 @@ void main(void) {
12833
13381
  }
12834
13382
  `;
12835
13383
 
12836
- // src/utils.ts
12837
- var import_core5 = __toESM(require_core());
12838
- function assert2(condition, message) {
12839
- import_core5.log.assert(condition, message);
12840
- }
12841
- function createBinaryProxy(data, index) {
12842
- const {
12843
- properties,
12844
- numericProps
12845
- } = data;
12846
- return new Proxy(properties[index] || {}, {
12847
- get(target, property, receiver) {
12848
- if (property in numericProps) {
12849
- return numericProps[property].value[index];
12850
- }
12851
- return target[property];
12852
- },
12853
- has(target, property) {
12854
- return property in numericProps || property in target;
12855
- }
12856
- });
12857
- }
12858
-
12859
13384
  // src/layers/raster-layer.ts
12860
13385
  var defaultProps6 = {
12861
13386
  ...import_layers2.ColumnLayer.defaultProps,
@@ -12916,7 +13441,7 @@ void main(void) {
12916
13441
  blockWidth,
12917
13442
  blockHeight
12918
13443
  } = data;
12919
- assert2(blockWidth === blockHeight, `blockWidth (${blockWidth}) must equal blockHeight (${blockHeight})`);
13444
+ assert(blockWidth === blockHeight, `blockWidth (${blockWidth}) must equal blockHeight (${blockHeight})`);
12920
13445
  const [xOffset, yOffset, scale] = quadbinToOffset(tileIndex);
12921
13446
  const offset = [xOffset, yOffset, scale / blockWidth];
12922
13447
  const CellLayer = this.getSubLayerClass("column", RasterColumnLayer);
@@ -13187,7 +13712,7 @@ void main(void) {
13187
13712
  }
13188
13713
  };
13189
13714
  const layer = layerTypeDefs[type];
13190
- assert2(layer, `Unsupported layer type: ${type}`);
13715
+ assert(layer, `Unsupported layer type: ${type}`);
13191
13716
  return {
13192
13717
  ...layer,
13193
13718
  propMap: mergePropMaps(basePropMap, layer.propMap),
@@ -13552,7 +14077,7 @@ void main(void) {
13552
14077
  }
13553
14078
  return backgroundPadding;
13554
14079
  }
13555
- renderTextLayer(id, {
14080
+ renderTextLayer(id4, {
13556
14081
  updateTriggers: updateTriggersOverride = {},
13557
14082
  ...props
13558
14083
  }) {
@@ -13573,7 +14098,7 @@ void main(void) {
13573
14098
  updateTriggers
13574
14099
  } = this.props;
13575
14100
  return new EnhancedTextLayer(this.getSubLayerProps({
13576
- id,
14101
+ id: id4,
13577
14102
  data,
13578
14103
  characterSet,
13579
14104
  fontFamily,
@@ -13649,7 +14174,7 @@ void main(void) {
13649
14174
  datasets,
13650
14175
  token
13651
14176
  } = json;
13652
- assert2(keplerMapConfig.version === "v1", "Only support Kepler v1");
14177
+ assert(keplerMapConfig.version === "v1", "Only support Kepler v1");
13653
14178
  const {
13654
14179
  mapState,
13655
14180
  mapStyle
@@ -13669,7 +14194,7 @@ void main(void) {
13669
14194
  mapStyle,
13670
14195
  token,
13671
14196
  layers: layers.reverse().map(({
13672
- id,
14197
+ id: id4,
13673
14198
  type,
13674
14199
  config,
13675
14200
  visualChannels
@@ -13679,11 +14204,11 @@ void main(void) {
13679
14204
  dataId
13680
14205
  } = config;
13681
14206
  const dataset = datasets.find((d) => d.id === dataId);
13682
- assert2(dataset, `No dataset matching dataId: ${dataId}`);
14207
+ assert(dataset, `No dataset matching dataId: ${dataId}`);
13683
14208
  const {
13684
14209
  data
13685
14210
  } = dataset;
13686
- assert2(data, `No data loaded for dataId: ${dataId}`);
14211
+ assert(data, `No data loaded for dataId: ${dataId}`);
13687
14212
  const {
13688
14213
  Layer,
13689
14214
  propMap,
@@ -13691,12 +14216,12 @@ void main(void) {
13691
14216
  } = getLayer(type, config, dataset);
13692
14217
  const styleProps = createStyleProps(config, propMap);
13693
14218
  return new Layer({
13694
- id,
14219
+ id: id4,
13695
14220
  data,
13696
14221
  ...defaultProps10,
13697
14222
  ...createInteractionProps(interactionConfig),
13698
14223
  ...styleProps,
13699
- ...createChannelProps(id, type, config, visualChannels, data),
14224
+ ...createChannelProps(id4, type, config, visualChannels, data),
13700
14225
  ...createParametersProp(layerBlending, styleProps.parameters || {}),
13701
14226
  ...createLoadOptions(token)
13702
14227
  });
@@ -13761,7 +14286,7 @@ void main(void) {
13761
14286
  result.highlightColor = config.visConfig.enable3d ? [255, 255, 255, 60] : [252, 242, 26, 255];
13762
14287
  return result;
13763
14288
  }
13764
- function createChannelProps(id, type, config, visualChannels, data) {
14289
+ function createChannelProps(id4, type, config, visualChannels, data) {
13765
14290
  const {
13766
14291
  colorField,
13767
14292
  colorScale,
@@ -13914,7 +14439,7 @@ void main(void) {
13914
14439
  }
13915
14440
  if (textLabel && textLabel.length && textLabel[0].field) {
13916
14441
  const [mainLabel, secondaryLabel] = textLabel;
13917
- const collisionGroup = id;
14442
+ const collisionGroup = id4;
13918
14443
  ({
13919
14444
  alignment: result.getTextAlignmentBaseline,
13920
14445
  anchor: result.getTextAnchor,
@@ -13977,7 +14502,7 @@ void main(void) {
13977
14502
  var import_core10 = __toESM(require_core());
13978
14503
  var MAX_GET_LENGTH = 8192;
13979
14504
  var DEFAULT_CLIENT = "deck-gl-carto";
13980
- var V3_MINOR_VERSION = "3.1";
14505
+ var V3_MINOR_VERSION = "3.2";
13981
14506
  async function request2({
13982
14507
  method,
13983
14508
  url,
@@ -14174,20 +14699,20 @@ void main(void) {
14174
14699
  aggregationExp,
14175
14700
  aggregationResLevel
14176
14701
  }) {
14177
- assert2(connection, "Must define connection");
14178
- assert2(type, "Must define a type");
14179
- assert2(source, "Must define a source");
14180
- assert2(credentials2.apiVersion === API_VERSIONS.V3, "Method only available for v3");
14181
- assert2(credentials2.apiBaseUrl, "Must define apiBaseUrl");
14182
- assert2(credentials2.accessToken, "Must define an accessToken");
14702
+ assert(connection, "Must define connection");
14703
+ assert(type, "Must define a type");
14704
+ assert(source, "Must define a source");
14705
+ assert(credentials2.apiVersion === API_VERSIONS.V3, "Method only available for v3");
14706
+ assert(credentials2.apiBaseUrl, "Must define apiBaseUrl");
14707
+ assert(credentials2.accessToken, "Must define an accessToken");
14183
14708
  if (columns) {
14184
- assert2(COLUMNS_SUPPORT.includes(type), `The columns parameter is not supported by type ${type}`);
14709
+ assert(COLUMNS_SUPPORT.includes(type), `The columns parameter is not supported by type ${type}`);
14185
14710
  }
14186
14711
  if (geoColumn) {
14187
- assert2(GEO_COLUMN_SUPPORT.includes(type), `The geoColumn parameter is not supported by type ${type}`);
14712
+ assert(GEO_COLUMN_SUPPORT.includes(type), `The geoColumn parameter is not supported by type ${type}`);
14188
14713
  } else {
14189
- assert2(!aggregationExp, "Have aggregationExp, but geoColumn parameter is missing");
14190
- assert2(!aggregationResLevel, "Have aggregationResLevel, but geoColumn parameter is missing");
14714
+ assert(!aggregationExp, "Have aggregationExp, but geoColumn parameter is missing");
14715
+ assert(!aggregationResLevel, "Have aggregationResLevel, but geoColumn parameter is missing");
14191
14716
  }
14192
14717
  }
14193
14718
  async function fetchLayerData({
@@ -14295,7 +14820,7 @@ void main(void) {
14295
14820
  if (format2) {
14296
14821
  mapFormat = format2;
14297
14822
  url = getUrlFromMetadata(metadata, format2);
14298
- assert2(url, `Format ${format2} not available`);
14823
+ assert(url, `Format ${format2} not available`);
14299
14824
  } else {
14300
14825
  const prioritizedFormats = [FORMATS.GEOJSON, FORMATS.JSON, FORMATS.NDJSON, FORMATS.TILEJSON];
14301
14826
  for (const f of prioritizedFormats) {
@@ -14305,7 +14830,7 @@ void main(void) {
14305
14830
  break;
14306
14831
  }
14307
14832
  }
14308
- assert2(url && mapFormat, "Unsupported data formats received from backend.");
14833
+ assert(url && mapFormat, "Unsupported data formats received from backend.");
14309
14834
  }
14310
14835
  if (format2 === FORMATS.TILEJSON && formatTiles) {
14311
14836
  import_core10.log.assert(Object.values(TILE_FORMATS).includes(formatTiles), `Invalid value for formatTiles: ${formatTiles}. Use value from TILE_FORMATS`);
@@ -14481,16 +15006,16 @@ void main(void) {
14481
15006
  const {
14482
15007
  accessToken
14483
15008
  } = localCreds;
14484
- assert2(cartoMapId, 'Must define CARTO map id: fetchMap({cartoMapId: "XXXX-XXXX-XXXX"})');
14485
- assert2(localCreds.apiVersion === API_VERSIONS.V3, "Method only available for v3");
14486
- assert2(localCreds.apiBaseUrl, "Must define apiBaseUrl");
15009
+ assert(cartoMapId, 'Must define CARTO map id: fetchMap({cartoMapId: "XXXX-XXXX-XXXX"})');
15010
+ assert(localCreds.apiVersion === API_VERSIONS.V3, "Method only available for v3");
15011
+ assert(localCreds.apiBaseUrl, "Must define apiBaseUrl");
14487
15012
  if (!localCreds.mapsUrl) {
14488
15013
  localCreds.mapsUrl = buildMapsUrlFromBase(localCreds.apiBaseUrl);
14489
15014
  }
14490
15015
  if (autoRefresh || onNewData) {
14491
- assert2(onNewData, "Must define `onNewData` when using autoRefresh");
14492
- assert2(typeof onNewData === "function", "`onNewData` must be a function");
14493
- assert2(typeof autoRefresh === "number" && autoRefresh > 0, "`autoRefresh` must be a positive number");
15016
+ assert(onNewData, "Must define `onNewData` when using autoRefresh");
15017
+ assert(typeof onNewData === "function", "`onNewData` must be a function");
15018
+ assert(typeof autoRefresh === "number" && autoRefresh > 0, "`autoRefresh` must be a positive number");
14494
15019
  }
14495
15020
  const url = `${localCreds.mapsUrl}/public/${cartoMapId}`;
14496
15021
  const errorContext = {
@@ -14699,7 +15224,7 @@ void main(void) {
14699
15224
  }
14700
15225
  }
14701
15226
  _getSubLayerAndProps() {
14702
- assert2(this.state);
15227
+ assert(this.state);
14703
15228
  const {
14704
15229
  data,
14705
15230
  apiVersion
@@ -14723,7 +15248,7 @@ void main(void) {
14723
15248
  return [layerFromTileDataset(props.formatTiles, data.scheme, props.type), props];
14724
15249
  }
14725
15250
  renderLayers() {
14726
- assert2(this.state);
15251
+ assert(this.state);
14727
15252
  const {
14728
15253
  apiVersion,
14729
15254
  data