@gisatcz/deckgl-geolib 2.5.0-dev.3 → 2.5.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -7,6 +7,45 @@ import { getMeshBoundingBox } from '@loaders.gl/schema';
7
7
  import { concatenateTypedArrays } from '@loaders.gl/loader-utils';
8
8
  import { SimpleMeshLayer } from '@deck.gl/mesh-layers';
9
9
 
10
+ let isListenerAttached = false;
11
+ /**
12
+ * Suppresses unhandled AbortErrors from deck.gl tile cancellation.
13
+ *
14
+ * NOTE: The library's main entry point installs this handler automatically
15
+ * when the package is imported via its primary build (for example
16
+ * `import '@gisatcz/deckgl-geolib'`). This default prevents console spam during
17
+ * normal tile cancellation (pan/zoom) for the vast majority of consumers.
18
+ *
19
+ * If you need to control installation manually (for example when importing
20
+ * internals or for custom lifecycle control), import and call the exported
21
+ * function yourself:
22
+ *
23
+ * import { suppressGlobalAbortErrors } from '@gisatcz/deckgl-geolib';
24
+ * suppressGlobalAbortErrors();
25
+ *
26
+ * Warning: This suppresses ALL unhandled AbortErrors (including from your own
27
+ * code). If you need finer control, implement a custom `unhandledrejection`
28
+ * handler instead.
29
+ *
30
+ * The listener is attached only once and only in browser environments,
31
+ * making this function idempotent and safe to call multiple times.
32
+ */
33
+ function suppressGlobalAbortErrors() {
34
+ // Ensure we are in a browser environment and haven't already attached the listener
35
+ if (typeof window !== 'undefined' && !isListenerAttached) {
36
+ window.addEventListener('unhandledrejection', (event) => {
37
+ // Suppress standard AbortErrors from tile cancellation and fetch aborts.
38
+ // These are expected during viewport changes and represent normal control flow,
39
+ // not application errors.
40
+ if (event.reason && event.reason.name === 'AbortError') {
41
+ // Prevent the browser from logging it to the console
42
+ event.preventDefault();
43
+ }
44
+ });
45
+ isListenerAttached = true;
46
+ }
47
+ }
48
+
10
49
  /* eslint-disable no-restricted-globals, no-restricted-syntax */
11
50
  /* global SharedArrayBuffer */
12
51
 
@@ -2957,7 +2996,7 @@ class CustomAggregateError extends Error {
2957
2996
  this.name = 'AggregateError';
2958
2997
  }
2959
2998
  }
2960
- const AggregateError = CustomAggregateError;
2999
+ const AggregateError$1 = CustomAggregateError;
2961
3000
 
2962
3001
  class Block {
2963
3002
  /**
@@ -3088,7 +3127,7 @@ class BlockedSource extends BaseSource {
3088
3127
  const blocks = allBlockIds.map((id) => this.blockCache.get(id) || this.evictedBlocks.get(id));
3089
3128
  const failedBlocks = blocks.filter((i) => !i);
3090
3129
  if (failedBlocks.length) {
3091
- throw new AggregateError(failedBlocks, 'Request failed');
3130
+ throw new AggregateError$1(failedBlocks, 'Request failed');
3092
3131
  }
3093
3132
  // create a final Map, with all required blocks for this request to satisfy
3094
3133
  const requiredBlocks = new Map(zip(allBlockIds, blocks));
@@ -5547,14 +5586,14 @@ function addSkirt(attributes, triangles, skirtHeight, outsideIndices) {
5547
5586
  * @returns {number[][]} - outside edges data
5548
5587
  */
5549
5588
  function getOutsideEdgesFromTriangles(triangles) {
5550
- // Use integer keys instead of strings: min * 70000 + max is collision-free
5551
- // for any grid 257×257 (66,049 vertices < 70,000)
5589
+ // Use BigInt keys to avoid collisions for large meshes.
5590
+ // Pack min and max into a single BigInt key: (min << 32) | max
5552
5591
  const edgeMap = new Map();
5553
5592
  const processEdge = (a, b) => {
5554
5593
  const min = Math.min(a, b);
5555
5594
  const max = Math.max(a, b);
5556
- // Integer key: no string allocation per edge
5557
- const key = min * 70000 + max;
5595
+ // Pack indices into a single BigInt key to avoid string allocation and collisions
5596
+ const key = (BigInt(min) << 32n) | BigInt(max);
5558
5597
  if (edgeMap.has(key)) {
5559
5598
  edgeMap.delete(key); // Interior edge, remove
5560
5599
  }
@@ -6832,113 +6871,137 @@ class CogTiles {
6832
6871
  }
6833
6872
  return exactMatchIndex;
6834
6873
  }
6835
- async getTileFromImage(tileX, tileY, zoom, fetchSize) {
6836
- const imageIndex = this.getImageIndexForZoomLevel(zoom);
6837
- // Cache Promises to share in-flight requests across concurrent tiles at the same overview
6838
- let imagePromise = this.imageCache.get(imageIndex);
6839
- if (!imagePromise) {
6840
- imagePromise = this.cog.getImage(imageIndex);
6841
- this.imageCache.set(imageIndex, imagePromise);
6842
- }
6843
- const targetImage = await imagePromise;
6844
- // --- STEP 1: CALCULATE BOUNDS IN METERS ---
6845
- // 2. Get COG Metadata (image = COG)
6846
- const imageResolution = this.cogResolutionLookup[imageIndex];
6847
- const imageHeight = targetImage.getHeight();
6848
- const imageWidth = targetImage.getWidth();
6849
- const [imgOriginX, imgOriginY] = this.cogOrigin;
6850
- // 3. Define Web Mercator Constants
6851
- // We use the class property tileSize (usually 256) as the ground truth for grid calculations
6852
- const TILE_SIZE = this.tileSize;
6853
- const ORIGIN_X = webMercatorOrigin[0];
6854
- const ORIGIN_Y = webMercatorOrigin[1];
6855
- // 4. Calculate Tile BBox in World Meters
6856
- // This defines where the map expects the tile to be physically located
6857
- const tileGridResolution = (EARTH_CIRCUMFERENCE / TILE_SIZE) / (2 ** zoom);
6858
- const tileMinXMeters = ORIGIN_X + (tileX * TILE_SIZE * tileGridResolution);
6859
- const tileMaxYMeters = ORIGIN_Y - (tileY * TILE_SIZE * tileGridResolution);
6860
- // Note: We don't strictly need MaxX/MinY meters for the start calculation,
6861
- // but they are useful if debugging the full meter footprint.
6862
- // --- STEP 2: CONVERT TO PIXEL COORDINATES ---
6863
- // 5. Calculate precise floating-point start position relative to the image
6864
- const windowMinX = (tileMinXMeters - imgOriginX) / imageResolution;
6865
- const windowMinY = (imgOriginY - tileMaxYMeters) / imageResolution;
6866
- // 6. Snap to Integer Grid (The "Force 256" Fix)
6867
- // We round the start position to align with the nearest pixel.
6868
- const FETCH_SIZE = fetchSize || TILE_SIZE; // Default to 256 if not provided
6869
- const startX = Math.round(windowMinX);
6870
- const startY = Math.round(windowMinY);
6871
- const endX = startX + FETCH_SIZE;
6872
- const endY = startY + FETCH_SIZE;
6873
- // --- STEP 3: CALCULATE INTERSECTION ---
6874
- // 7. Clamp the read window to the actual image dimensions
6875
- // This defines the "Safe" area we can actually read from the file.
6876
- const validReadX = Math.max(0, startX);
6877
- const validReadY = Math.max(0, startY);
6878
- const validReadMaxX = Math.min(imageWidth, endX);
6879
- const validReadMaxY = Math.min(imageHeight, endY);
6880
- const readWidth = validReadMaxX - validReadX;
6881
- const readHeight = validReadMaxY - validReadY;
6882
- // CHECK: If no overlap, return empty
6883
- if (readWidth <= 0 || readHeight <= 0) {
6884
- return [this.createEmptyTile(FETCH_SIZE)];
6885
- }
6886
- // 8. Calculate Offsets (Padding)
6887
- // "missingLeft" is how many blank pixels we need to insert before the image data starts.
6888
- // Logic: If we wanted to read from -50 (startX), but clamped to 0 (validReadX),
6889
- // we are missing the first 50 pixels.
6890
- const missingLeft = validReadX - startX;
6891
- const missingTop = validReadY - startY;
6892
- const window = [validReadX, validReadY, validReadMaxX, validReadMaxY];
6893
- // --- STEP 4: READ AND COMPOSITE ---
6894
- // Case A: Partial Overlap (Padding or Cropping required)
6895
- // If the tile is hanging off the edge, we need to manually reconstruct it.
6896
- // We strictly compare against FETCH_SIZE because that is our target buffer dimension.
6897
- if (missingLeft > 0 || missingTop > 0 || readWidth < FETCH_SIZE || readHeight < FETCH_SIZE) {
6898
- const numChannels = this.options.numOfChannels || 1;
6899
- // Initialize with a TypedArray of the full target size and correct data type
6900
- const validImageData = this.createTileBuffer(this.options.format || 'Float32', FETCH_SIZE, numChannels);
6901
- if (this.options.noDataValue !== undefined) {
6902
- validImageData.fill(this.options.noDataValue);
6903
- }
6904
- // if the valid window is smaller than the tile size, it gets the image size width and height, thus validRasterData.width must be used as below
6905
- const validRasterData = await targetImage.readRasters({ window });
6906
- // Place the valid pixel data into the tile buffer.
6907
- for (let band = 0; band < validRasterData.length; band += 1) {
6908
- // We must reset the buffer for each band, otherwise data from previous band persists in padding areas
6909
- const tileBuffer = this.createTileBuffer(this.options.format || 'Float32', FETCH_SIZE);
6874
+ async getTileFromImage(tileX, tileY, zoom, fetchSize, signal) {
6875
+ // Create a fresh local AbortController for this specific fetch.
6876
+ // We do NOT pass `signal` directly to readRasters because deck.gl may reuse tile
6877
+ // objects whose signal is already aborted (same tile re-requested after viewport change).
6878
+ // An already-aborted signal passed to geotiff.js immediately cancels the fetch,
6879
+ // leaving the tile permanently empty. Instead, we only forward cancellation when
6880
+ // the signal fires WHILE the request is actually in flight.
6881
+ const controller = new AbortController();
6882
+ if (signal && !signal.aborted) {
6883
+ signal.addEventListener('abort', () => controller.abort(), { once: true });
6884
+ }
6885
+ const localSignal = controller.signal;
6886
+ try {
6887
+ const imageIndex = this.getImageIndexForZoomLevel(zoom);
6888
+ // Cache Promises to share in-flight requests across concurrent tiles at the same overview
6889
+ let imagePromise = this.imageCache.get(imageIndex);
6890
+ if (!imagePromise) {
6891
+ imagePromise = this.cog.getImage(imageIndex);
6892
+ this.imageCache.set(imageIndex, imagePromise);
6893
+ }
6894
+ const targetImage = await imagePromise;
6895
+ // --- STEP 1: CALCULATE BOUNDS IN METERS ---
6896
+ // 2. Get COG Metadata (image = COG)
6897
+ const imageResolution = this.cogResolutionLookup[imageIndex];
6898
+ const imageHeight = targetImage.getHeight();
6899
+ const imageWidth = targetImage.getWidth();
6900
+ const [imgOriginX, imgOriginY] = this.cogOrigin;
6901
+ // 3. Define Web Mercator Constants
6902
+ // We use the class property tileSize (usually 256) as the ground truth for grid calculations
6903
+ const TILE_SIZE = this.tileSize;
6904
+ const ORIGIN_X = webMercatorOrigin[0];
6905
+ const ORIGIN_Y = webMercatorOrigin[1];
6906
+ // 4. Calculate Tile BBox in World Meters
6907
+ // This defines where the map expects the tile to be physically located
6908
+ const tileGridResolution = (EARTH_CIRCUMFERENCE / TILE_SIZE) / (2 ** zoom);
6909
+ const tileMinXMeters = ORIGIN_X + (tileX * TILE_SIZE * tileGridResolution);
6910
+ const tileMaxYMeters = ORIGIN_Y - (tileY * TILE_SIZE * tileGridResolution);
6911
+ // Note: We don't strictly need MaxX/MinY meters for the start calculation,
6912
+ // but they are useful if debugging the full meter footprint.
6913
+ // --- STEP 2: CONVERT TO PIXEL COORDINATES ---
6914
+ // 5. Calculate precise floating-point start position relative to the image
6915
+ const windowMinX = (tileMinXMeters - imgOriginX) / imageResolution;
6916
+ const windowMinY = (imgOriginY - tileMaxYMeters) / imageResolution;
6917
+ // 6. Snap to Integer Grid (The "Force 256" Fix)
6918
+ // We round the start position to align with the nearest pixel.
6919
+ const FETCH_SIZE = fetchSize || TILE_SIZE; // Default to 256 if not provided
6920
+ const startX = Math.round(windowMinX);
6921
+ const startY = Math.round(windowMinY);
6922
+ const endX = startX + FETCH_SIZE;
6923
+ const endY = startY + FETCH_SIZE;
6924
+ // --- STEP 3: CALCULATE INTERSECTION ---
6925
+ // 7. Clamp the read window to the actual image dimensions
6926
+ // This defines the "Safe" area we can actually read from the file.
6927
+ const validReadX = Math.max(0, startX);
6928
+ const validReadY = Math.max(0, startY);
6929
+ const validReadMaxX = Math.min(imageWidth, endX);
6930
+ const validReadMaxY = Math.min(imageHeight, endY);
6931
+ const readWidth = validReadMaxX - validReadX;
6932
+ const readHeight = validReadMaxY - validReadY;
6933
+ // CHECK: If no overlap, return empty
6934
+ if (readWidth <= 0 || readHeight <= 0) {
6935
+ return [this.createEmptyTile(FETCH_SIZE)];
6936
+ }
6937
+ // 8. Calculate Offsets (Padding)
6938
+ // "missingLeft" is how many blank pixels we need to insert before the image data starts.
6939
+ // Logic: If we wanted to read from -50 (startX), but clamped to 0 (validReadX),
6940
+ // we are missing the first 50 pixels.
6941
+ const missingLeft = validReadX - startX;
6942
+ const missingTop = validReadY - startY;
6943
+ const window = [validReadX, validReadY, validReadMaxX, validReadMaxY];
6944
+ // --- STEP 4: READ AND COMPOSITE ---
6945
+ // Case A: Partial Overlap (Padding or Cropping required)
6946
+ // If the tile is hanging off the edge, we need to manually reconstruct it.
6947
+ // We strictly compare against FETCH_SIZE because that is our target buffer dimension.
6948
+ if (missingLeft > 0 || missingTop > 0 || readWidth < FETCH_SIZE || readHeight < FETCH_SIZE) {
6949
+ const numChannels = this.options.numOfChannels || 1;
6950
+ // Initialize with a TypedArray of the full target size and correct data type
6951
+ const validImageData = this.createTileBuffer(this.options.format || 'Float32', FETCH_SIZE, numChannels);
6910
6952
  if (this.options.noDataValue !== undefined) {
6911
- tileBuffer.fill(this.options.noDataValue);
6953
+ validImageData.fill(this.options.noDataValue);
6912
6954
  }
6913
- for (let row = 0; row < readHeight; row += 1) {
6914
- const destRow = missingTop + row;
6915
- const destRowOffset = destRow * FETCH_SIZE;
6916
- const srcRowOffset = row * validRasterData.width;
6917
- for (let col = 0; col < readWidth; col += 1) {
6918
- // Compute the destination position in the tile buffer.
6919
- const destCol = missingLeft + col;
6920
- // Bounds Check: Ensure we don't write outside the allocated buffer
6921
- if (destRow < FETCH_SIZE && destCol < FETCH_SIZE) {
6922
- tileBuffer[destRowOffset + destCol] = validRasterData[band][srcRowOffset + col];
6923
- }
6924
- else {
6925
- /* eslint-disable no-console */
6926
- console.log(`error in assigning data to tile buffer: destRow ${destRow}, destCol ${destCol}, FETCH_SIZE ${FETCH_SIZE}`);
6955
+ // if the valid window is smaller than the tile size, it gets the image size width and height, thus validRasterData.width must be used as below
6956
+ const validRasterData = await targetImage.readRasters({ window, signal: localSignal });
6957
+ // Place the valid pixel data into the tile buffer.
6958
+ for (let band = 0; band < validRasterData.length; band += 1) {
6959
+ // We must reset the buffer for each band, otherwise data from previous band persists in padding areas
6960
+ const tileBuffer = this.createTileBuffer(this.options.format || 'Float32', FETCH_SIZE);
6961
+ if (this.options.noDataValue !== undefined) {
6962
+ tileBuffer.fill(this.options.noDataValue);
6963
+ }
6964
+ for (let row = 0; row < readHeight; row += 1) {
6965
+ const destRow = missingTop + row;
6966
+ const destRowOffset = destRow * FETCH_SIZE;
6967
+ const srcRowOffset = row * validRasterData.width;
6968
+ for (let col = 0; col < readWidth; col += 1) {
6969
+ // Compute the destination position in the tile buffer.
6970
+ const destCol = missingLeft + col;
6971
+ // Bounds Check: Ensure we don't write outside the allocated buffer
6972
+ if (destRow < FETCH_SIZE && destCol < FETCH_SIZE) {
6973
+ tileBuffer[destRowOffset + destCol] = validRasterData[band][srcRowOffset + col];
6974
+ }
6975
+ else {
6976
+ /* eslint-disable no-console */
6977
+ console.log(`error in assigning data to tile buffer: destRow ${destRow}, destCol ${destCol}, FETCH_SIZE ${FETCH_SIZE}`);
6978
+ }
6927
6979
  }
6928
6980
  }
6981
+ for (let i = 0; i < tileBuffer.length; i += 1) {
6982
+ validImageData[i * numChannels + band] = tileBuffer[i];
6983
+ }
6929
6984
  }
6930
- for (let i = 0; i < tileBuffer.length; i += 1) {
6931
- validImageData[i * numChannels + band] = tileBuffer[i];
6932
- }
6985
+ return [validImageData];
6933
6986
  }
6934
- return [validImageData];
6987
+ // Case B: Perfect Match (Optimization)
6988
+ // If the read window is exactly 256x256 and aligned, we can read directly interleaved.
6989
+ const tileData = await targetImage.readRasters({ window, interleave: true, signal: localSignal });
6990
+ return [tileData];
6991
+ }
6992
+ catch (error) {
6993
+ // If the signal was aborted (or geotiff.js threw AggregateError wrapping an abort),
6994
+ // re-throw as a standard AbortError so deck.gl handles tile cancellation gracefully
6995
+ // and suppressGlobalAbortErrors() can suppress the unhandled rejection noise.
6996
+ const isAbortRelated = localSignal.aborted
6997
+ || (error instanceof AggregateError && error.errors?.some((e) => e?.name === 'AbortError' || e?.message?.includes('aborted') || e?.message?.includes('abort')))
6998
+ || (error instanceof DOMException && error.name === 'AbortError')
6999
+ || (error instanceof Error && error.message === 'Request was aborted');
7000
+ if (isAbortRelated) {
7001
+ throw new DOMException('Tile request aborted', 'AbortError');
7002
+ }
7003
+ throw error;
6935
7004
  }
6936
- // Case B: Perfect Match (Optimization)
6937
- // If the read window is exactly 256x256 and aligned, we can read directly interleaved.
6938
- // console.log("Perfect aligned read");
6939
- const tileData = await targetImage.readRasters({ window, interleave: true });
6940
- // console.log(`data that starts at the left top corner of the tile ${tileX}, ${tileY}`);
6941
- return [tileData];
6942
7005
  }
6943
7006
  /**
6944
7007
  * Creates a blank tile buffer filled with the "No Data" value.
@@ -6954,7 +7017,7 @@ class CogTiles {
6954
7017
  }
6955
7018
  return tileData;
6956
7019
  }
6957
- async getTile(x, y, z, bounds, meshMaxError) {
7020
+ async getTile(x, y, z, bounds, meshMaxError, signal) {
6958
7021
  let requiredSize = this.tileSize; // Default 256 for image/bitmap
6959
7022
  if (this.options.type === 'terrain') {
6960
7023
  const isKernel = this.options.useSlope || this.options.useHillshade || this.options.useSwissRelief;
@@ -6964,7 +7027,7 @@ class CogTiles {
6964
7027
  // Bitmap layer with relief glaze mode needs kernel padding for slope/hillshade computation
6965
7028
  requiredSize = this.tileSize + 2; // 258 for kernel
6966
7029
  }
6967
- const tileData = await this.getTileFromImage(x, y, z, requiredSize);
7030
+ const tileData = await this.getTileFromImage(x, y, z, requiredSize, signal);
6968
7031
  // Compute true ground cell size in meters from tile indices.
6969
7032
  // Tile y in slippy-map convention → center latitude → Web Mercator distortion correction.
6970
7033
  const latRad = Math.atan(Math.sinh(Math.PI * (1 - 2 * (y + 0.5) / Math.pow(2, z))));
@@ -6988,9 +7051,9 @@ class CogTiles {
6988
7051
  rasters,
6989
7052
  width: tileWidth,
6990
7053
  height: tileHeight,
6991
- bounds,
7054
+ bounds: bounds ?? [0, 0, 0, 0],
6992
7055
  cellSizeMeters,
6993
- }, this.options, meshMaxError);
7056
+ }, this.options, meshMaxError ?? 4.0);
6994
7057
  }
6995
7058
  /**
6996
7059
  * Determines the data type (e.g., "Int32", "Float64") of a GeoTIFF image
@@ -7200,20 +7263,11 @@ class CogBitmapLayer extends CompositeLayer {
7200
7263
  }
7201
7264
  }
7202
7265
  async getTiledBitmapData(tile) {
7203
- try {
7204
- // TODO - pass signal to getTile
7205
- // abort request if signal is aborted
7206
- const tileData = await this.state.bitmapCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z);
7207
- if (tileData && !this.props.pickable) {
7208
- tileData.raw = null;
7209
- }
7210
- return tileData;
7211
- }
7212
- catch (error) {
7213
- // Log the error and rethrow so TileLayer can surface the failure via onTileError
7214
- log.warn(`Failed to load bitmap tile at ${tile.index.z}/${tile.index.x}/${tile.index.y}:`, error)();
7215
- throw error;
7266
+ const resolvedTileData = await this.state.bitmapCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, undefined, undefined, tile.signal);
7267
+ if (resolvedTileData && !this.props.pickable) {
7268
+ resolvedTileData.raw = null;
7216
7269
  }
7270
+ return resolvedTileData;
7217
7271
  }
7218
7272
  renderSubLayers(props) {
7219
7273
  const SubLayerClass = this.getSubLayerClass('image', BitmapLayer);
@@ -7347,7 +7401,6 @@ function urlTemplateToUpdateTrigger(template) {
7347
7401
  }
7348
7402
  // TODO remove elevationDecoder
7349
7403
  // TODO use meshMaxError
7350
- // TODO - pass signal to getTile
7351
7404
  /** Render mesh surfaces from height map images. */
7352
7405
  class CogTerrainLayer extends CompositeLayer {
7353
7406
  static defaultProps = defaultProps;
@@ -7446,13 +7499,11 @@ class CogTerrainLayer extends CompositeLayer {
7446
7499
  topRight = [bbox.right, bbox.top];
7447
7500
  }
7448
7501
  const bounds = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];
7449
- // TODO - pass signal to getTile
7450
- // abort request if signal is aborted
7451
- const terrain = await this.state.terrainCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds, this.props.meshMaxError);
7452
- if (terrain && !this.props.pickable) {
7453
- terrain.raw = null;
7502
+ const resolvedTerrain = await this.state.terrainCogTiles.getTile(tile.index.x, tile.index.y, tile.index.z, bounds, this.props.meshMaxError, tile.signal);
7503
+ if (resolvedTerrain && !this.props.pickable) {
7504
+ resolvedTerrain.raw = null;
7454
7505
  }
7455
- return Promise.all([terrain, null]);
7506
+ return Promise.all([resolvedTerrain, null]);
7456
7507
  }
7457
7508
  renderSubLayers(props) {
7458
7509
  const SubLayerClass = this.getSubLayerClass('mesh', SimpleMeshLayer);
@@ -7561,6 +7612,10 @@ class CogTerrainLayer extends CompositeLayer {
7561
7612
  }
7562
7613
  }
7563
7614
 
7615
+ // src/index.ts
7616
+ // Initialize global error suppression for deck.gl AbortErrors
7617
+ suppressGlobalAbortErrors();
7618
+
7564
7619
  class RawDecoder extends BaseDecoder {
7565
7620
  /** @param {ArrayBuffer} buffer */
7566
7621
  decodeBlock(buffer) {
@@ -7569,8 +7624,8 @@ class RawDecoder extends BaseDecoder {
7569
7624
  }
7570
7625
 
7571
7626
  var raw = /*#__PURE__*/Object.freeze({
7572
- __proto__: null,
7573
- default: RawDecoder
7627
+ __proto__: null,
7628
+ default: RawDecoder
7574
7629
  });
7575
7630
 
7576
7631
  const MIN_BITS = 9;
@@ -7728,8 +7783,8 @@ class LZWDecoder extends BaseDecoder {
7728
7783
  }
7729
7784
 
7730
7785
  var lzw = /*#__PURE__*/Object.freeze({
7731
- __proto__: null,
7732
- default: LZWDecoder
7786
+ __proto__: null,
7787
+ default: LZWDecoder
7733
7788
  });
7734
7789
 
7735
7790
  /* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
@@ -8792,8 +8847,8 @@ class JpegDecoder extends BaseDecoder {
8792
8847
  }
8793
8848
 
8794
8849
  var jpeg = /*#__PURE__*/Object.freeze({
8795
- __proto__: null,
8796
- default: JpegDecoder
8850
+ __proto__: null,
8851
+ default: JpegDecoder
8797
8852
  });
8798
8853
 
8799
8854
  /*============================================================================*/
@@ -12039,8 +12094,8 @@ class DeflateDecoder extends BaseDecoder {
12039
12094
  }
12040
12095
 
12041
12096
  var deflate = /*#__PURE__*/Object.freeze({
12042
- __proto__: null,
12043
- default: DeflateDecoder
12097
+ __proto__: null,
12098
+ default: DeflateDecoder
12044
12099
  });
12045
12100
 
12046
12101
  class PackbitsDecoder extends BaseDecoder {
@@ -12070,8 +12125,8 @@ class PackbitsDecoder extends BaseDecoder {
12070
12125
  }
12071
12126
 
12072
12127
  var packbits = /*#__PURE__*/Object.freeze({
12073
- __proto__: null,
12074
- default: PackbitsDecoder
12128
+ __proto__: null,
12129
+ default: PackbitsDecoder
12075
12130
  });
12076
12131
 
12077
12132
  function getDefaultExportFromCjs (x) {
@@ -14525,9 +14580,9 @@ class LercDecoder extends BaseDecoder {
14525
14580
  }
14526
14581
 
14527
14582
  var lerc = /*#__PURE__*/Object.freeze({
14528
- __proto__: null,
14529
- default: LercDecoder,
14530
- zstd: zstd$2
14583
+ __proto__: null,
14584
+ default: LercDecoder,
14585
+ zstd: zstd$2
14531
14586
  });
14532
14587
 
14533
14588
  /**
@@ -14701,9 +14756,9 @@ class ZstdDecoder extends BaseDecoder {
14701
14756
  }
14702
14757
 
14703
14758
  var zstd$1 = /*#__PURE__*/Object.freeze({
14704
- __proto__: null,
14705
- default: ZstdDecoder,
14706
- zstd: zstd
14759
+ __proto__: null,
14760
+ default: ZstdDecoder,
14761
+ zstd: zstd
14707
14762
  });
14708
14763
 
14709
14764
  /**
@@ -14766,9 +14821,9 @@ class WebImageDecoder extends BaseDecoder {
14766
14821
  }
14767
14822
 
14768
14823
  var webimage = /*#__PURE__*/Object.freeze({
14769
- __proto__: null,
14770
- default: WebImageDecoder
14824
+ __proto__: null,
14825
+ default: WebImageDecoder
14771
14826
  });
14772
14827
 
14773
- export { CogBitmapLayer, CogTerrainLayer, CogTiles, GeoImage };
14828
+ export { CogBitmapLayer, CogTerrainLayer, CogTiles, GeoImage, suppressGlobalAbortErrors };
14774
14829
  //# sourceMappingURL=index.js.map