@developmentseed/deck.gl-raster 0.5.0 → 0.6.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.
Files changed (74) hide show
  1. package/dist/gpu-modules/color/index.d.ts +5 -5
  2. package/dist/gpu-modules/color/index.d.ts.map +1 -1
  3. package/dist/gpu-modules/color/index.js +5 -5
  4. package/dist/gpu-modules/color/index.js.map +1 -1
  5. package/dist/gpu-modules/colormap-names.d.ts +128 -0
  6. package/dist/gpu-modules/colormap-names.d.ts.map +1 -0
  7. package/dist/gpu-modules/colormap-names.js +127 -0
  8. package/dist/gpu-modules/colormap-names.js.map +1 -0
  9. package/dist/gpu-modules/colormap.d.ts +30 -4
  10. package/dist/gpu-modules/colormap.d.ts.map +1 -1
  11. package/dist/gpu-modules/colormap.js +25 -5
  12. package/dist/gpu-modules/colormap.js.map +1 -1
  13. package/dist/gpu-modules/colormaps.png +0 -0
  14. package/dist/gpu-modules/create-colormap-texture.d.ts +16 -0
  15. package/dist/gpu-modules/create-colormap-texture.d.ts.map +1 -0
  16. package/dist/gpu-modules/create-colormap-texture.js +41 -0
  17. package/dist/gpu-modules/create-colormap-texture.js.map +1 -0
  18. package/dist/gpu-modules/decode-colormap-sprite.d.ts +25 -0
  19. package/dist/gpu-modules/decode-colormap-sprite.d.ts.map +1 -0
  20. package/dist/gpu-modules/decode-colormap-sprite.js +51 -0
  21. package/dist/gpu-modules/decode-colormap-sprite.js.map +1 -0
  22. package/dist/gpu-modules/index.d.ts +11 -6
  23. package/dist/gpu-modules/index.d.ts.map +1 -1
  24. package/dist/gpu-modules/index.js +8 -5
  25. package/dist/gpu-modules/index.js.map +1 -1
  26. package/dist/index.d.ts +4 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +2 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/layer-utils.d.ts +1 -1
  31. package/dist/layer-utils.d.ts.map +1 -1
  32. package/dist/raster-layer.d.ts +1 -1
  33. package/dist/raster-layer.d.ts.map +1 -1
  34. package/dist/raster-layer.js +1 -1
  35. package/dist/raster-layer.js.map +1 -1
  36. package/dist/raster-tile-layer/constants.d.ts +11 -0
  37. package/dist/raster-tile-layer/constants.d.ts.map +1 -0
  38. package/dist/raster-tile-layer/constants.js +11 -0
  39. package/dist/raster-tile-layer/constants.js.map +1 -0
  40. package/dist/raster-tile-layer/index.d.ts +2 -0
  41. package/dist/raster-tile-layer/index.d.ts.map +1 -0
  42. package/dist/raster-tile-layer/index.js +2 -0
  43. package/dist/raster-tile-layer/index.js.map +1 -0
  44. package/dist/raster-tile-layer/raster-tile-layer.d.ts +154 -0
  45. package/dist/raster-tile-layer/raster-tile-layer.d.ts.map +1 -0
  46. package/dist/raster-tile-layer/raster-tile-layer.js +175 -0
  47. package/dist/raster-tile-layer/raster-tile-layer.js.map +1 -0
  48. package/dist/raster-tileset/affine-tileset-level.d.ts +56 -0
  49. package/dist/raster-tileset/affine-tileset-level.d.ts.map +1 -0
  50. package/dist/raster-tileset/affine-tileset-level.js +101 -0
  51. package/dist/raster-tileset/affine-tileset-level.js.map +1 -0
  52. package/dist/raster-tileset/affine-tileset.d.ts +34 -0
  53. package/dist/raster-tileset/affine-tileset.d.ts.map +1 -0
  54. package/dist/raster-tileset/affine-tileset.js +26 -0
  55. package/dist/raster-tileset/affine-tileset.js.map +1 -0
  56. package/dist/raster-tileset/index.d.ts +4 -0
  57. package/dist/raster-tileset/index.d.ts.map +1 -1
  58. package/dist/raster-tileset/index.js +2 -0
  59. package/dist/raster-tileset/index.js.map +1 -1
  60. package/dist/raster-tileset/raster-tile-traversal.d.ts +22 -0
  61. package/dist/raster-tileset/raster-tile-traversal.d.ts.map +1 -1
  62. package/dist/raster-tileset/raster-tile-traversal.js +76 -15
  63. package/dist/raster-tileset/raster-tile-traversal.js.map +1 -1
  64. package/dist/raster-tileset/raster-tileset-2d.d.ts +14 -6
  65. package/dist/raster-tileset/raster-tileset-2d.d.ts.map +1 -1
  66. package/dist/raster-tileset/raster-tileset-2d.js +32 -7
  67. package/dist/raster-tileset/raster-tileset-2d.js.map +1 -1
  68. package/dist/raster-tileset/tile-matrix-set.d.ts +7 -3
  69. package/dist/raster-tileset/tile-matrix-set.d.ts.map +1 -1
  70. package/dist/raster-tileset/tile-matrix-set.js +20 -2
  71. package/dist/raster-tileset/tile-matrix-set.js.map +1 -1
  72. package/dist/raster-tileset/tileset-interface.d.ts +28 -0
  73. package/dist/raster-tileset/tileset-interface.d.ts.map +1 -1
  74. package/package.json +14 -13
@@ -1,6 +1,6 @@
1
- export { BlackIsZero } from "./black-is-zero";
2
- export { cieLabToRGB } from "./cielab";
3
- export { CMYKToRGB } from "./cmyk";
4
- export { WhiteIsZero } from "./white-is-zero";
5
- export { YCbCrToRGB } from "./ycbcr";
1
+ export { BlackIsZero } from "./black-is-zero.js";
2
+ export { cieLabToRGB } from "./cielab.js";
3
+ export { CMYKToRGB } from "./cmyk.js";
4
+ export { WhiteIsZero } from "./white-is-zero.js";
5
+ export { YCbCrToRGB } from "./ycbcr.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gpu-modules/color/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gpu-modules/color/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
- export { BlackIsZero } from "./black-is-zero";
2
- export { cieLabToRGB } from "./cielab";
3
- export { CMYKToRGB } from "./cmyk";
4
- export { WhiteIsZero } from "./white-is-zero";
5
- export { YCbCrToRGB } from "./ycbcr";
1
+ export { BlackIsZero } from "./black-is-zero.js";
2
+ export { cieLabToRGB } from "./cielab.js";
3
+ export { CMYKToRGB } from "./cmyk.js";
4
+ export { WhiteIsZero } from "./white-is-zero.js";
5
+ export { YCbCrToRGB } from "./ycbcr.js";
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gpu-modules/color/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gpu-modules/color/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Mapping from matplotlib / rio-tiler colormap name to its layer index in
3
+ * the shipped `colormaps.png` sprite. Pass values from this object as the
4
+ * `colormapIndex` prop of the {@link Colormap} shader module:
5
+ *
6
+ * ```ts
7
+ * { module: Colormap, props: {
8
+ * colormapTexture,
9
+ * colormapIndex: COLORMAP_INDEX.viridis,
10
+ * } }
11
+ * ```
12
+ *
13
+ * Names are sorted alphabetically. Reversed variants (`_r` suffix) are not
14
+ * listed separately — use the module's `reversed` uniform to flip a
15
+ * colormap at render time instead of binding a distinct layer.
16
+ */
17
+ export declare const COLORMAP_INDEX: {
18
+ readonly accent: 0;
19
+ readonly afmhot: 1;
20
+ readonly algae: 2;
21
+ readonly amp: 3;
22
+ readonly autumn: 4;
23
+ readonly balance: 5;
24
+ readonly binary: 6;
25
+ readonly blues: 7;
26
+ readonly bone: 8;
27
+ readonly brbg: 9;
28
+ readonly brg: 10;
29
+ readonly bugn: 11;
30
+ readonly bupu: 12;
31
+ readonly bwr: 13;
32
+ readonly cfastie: 14;
33
+ readonly cividis: 15;
34
+ readonly cmrmap: 16;
35
+ readonly cool: 17;
36
+ readonly coolwarm: 18;
37
+ readonly copper: 19;
38
+ readonly cubehelix: 20;
39
+ readonly curl: 21;
40
+ readonly dark2: 22;
41
+ readonly deep: 23;
42
+ readonly delta: 24;
43
+ readonly dense: 25;
44
+ readonly diff: 26;
45
+ readonly flag: 27;
46
+ readonly gist_earth: 28;
47
+ readonly gist_gray: 29;
48
+ readonly gist_heat: 30;
49
+ readonly gist_ncar: 31;
50
+ readonly gist_rainbow: 32;
51
+ readonly gist_stern: 33;
52
+ readonly gist_yarg: 34;
53
+ readonly gnbu: 35;
54
+ readonly gnuplot: 36;
55
+ readonly gnuplot2: 37;
56
+ readonly gray: 38;
57
+ readonly greens: 39;
58
+ readonly greys: 40;
59
+ readonly haline: 41;
60
+ readonly hot: 42;
61
+ readonly hsv: 43;
62
+ readonly ice: 44;
63
+ readonly inferno: 45;
64
+ readonly jet: 46;
65
+ readonly magma: 47;
66
+ readonly matter: 48;
67
+ readonly nipy_spectral: 49;
68
+ readonly ocean: 50;
69
+ readonly oranges: 51;
70
+ readonly orrd: 52;
71
+ readonly oxy: 53;
72
+ readonly paired: 54;
73
+ readonly pastel1: 55;
74
+ readonly pastel2: 56;
75
+ readonly phase: 57;
76
+ readonly pink: 58;
77
+ readonly piyg: 59;
78
+ readonly plasma: 60;
79
+ readonly prgn: 61;
80
+ readonly prism: 62;
81
+ readonly pubu: 63;
82
+ readonly pubugn: 64;
83
+ readonly puor: 65;
84
+ readonly purd: 66;
85
+ readonly purples: 67;
86
+ readonly rain: 68;
87
+ readonly rainbow: 69;
88
+ readonly rdbu: 70;
89
+ readonly rdgy: 71;
90
+ readonly rdpu: 72;
91
+ readonly rdylbu: 73;
92
+ readonly rdylgn: 74;
93
+ readonly reds: 75;
94
+ readonly rplumbo: 76;
95
+ readonly schwarzwald: 77;
96
+ readonly seismic: 78;
97
+ readonly set1: 79;
98
+ readonly set2: 80;
99
+ readonly set3: 81;
100
+ readonly solar: 82;
101
+ readonly spectral: 83;
102
+ readonly speed: 84;
103
+ readonly spring: 85;
104
+ readonly summer: 86;
105
+ readonly tab10: 87;
106
+ readonly tab20: 88;
107
+ readonly tab20b: 89;
108
+ readonly tab20c: 90;
109
+ readonly tarn: 91;
110
+ readonly tempo: 92;
111
+ readonly terrain: 93;
112
+ readonly thermal: 94;
113
+ readonly topo: 95;
114
+ readonly turbid: 96;
115
+ readonly turbo: 97;
116
+ readonly twilight: 98;
117
+ readonly twilight_shifted: 99;
118
+ readonly viridis: 100;
119
+ readonly winter: 101;
120
+ readonly wistia: 102;
121
+ readonly ylgn: 103;
122
+ readonly ylgnbu: 104;
123
+ readonly ylorbr: 105;
124
+ readonly ylorrd: 106;
125
+ };
126
+ /** Name of any colormap in the shipped sprite; a key of {@link COLORMAP_INDEX}. */
127
+ export type ColormapName = keyof typeof COLORMAP_INDEX;
128
+ //# sourceMappingURL=colormap-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colormap-names.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/colormap-names.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GjB,CAAC;AAEX,mFAAmF;AACnF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAC"}
@@ -0,0 +1,127 @@
1
+ // Generated by scripts/generate_colormaps.py. Do not edit by hand.
2
+ /**
3
+ * Mapping from matplotlib / rio-tiler colormap name to its layer index in
4
+ * the shipped `colormaps.png` sprite. Pass values from this object as the
5
+ * `colormapIndex` prop of the {@link Colormap} shader module:
6
+ *
7
+ * ```ts
8
+ * { module: Colormap, props: {
9
+ * colormapTexture,
10
+ * colormapIndex: COLORMAP_INDEX.viridis,
11
+ * } }
12
+ * ```
13
+ *
14
+ * Names are sorted alphabetically. Reversed variants (`_r` suffix) are not
15
+ * listed separately — use the module's `reversed` uniform to flip a
16
+ * colormap at render time instead of binding a distinct layer.
17
+ */
18
+ export const COLORMAP_INDEX = {
19
+ accent: 0,
20
+ afmhot: 1,
21
+ algae: 2,
22
+ amp: 3,
23
+ autumn: 4,
24
+ balance: 5,
25
+ binary: 6,
26
+ blues: 7,
27
+ bone: 8,
28
+ brbg: 9,
29
+ brg: 10,
30
+ bugn: 11,
31
+ bupu: 12,
32
+ bwr: 13,
33
+ cfastie: 14,
34
+ cividis: 15,
35
+ cmrmap: 16,
36
+ cool: 17,
37
+ coolwarm: 18,
38
+ copper: 19,
39
+ cubehelix: 20,
40
+ curl: 21,
41
+ dark2: 22,
42
+ deep: 23,
43
+ delta: 24,
44
+ dense: 25,
45
+ diff: 26,
46
+ flag: 27,
47
+ gist_earth: 28,
48
+ gist_gray: 29,
49
+ gist_heat: 30,
50
+ gist_ncar: 31,
51
+ gist_rainbow: 32,
52
+ gist_stern: 33,
53
+ gist_yarg: 34,
54
+ gnbu: 35,
55
+ gnuplot: 36,
56
+ gnuplot2: 37,
57
+ gray: 38,
58
+ greens: 39,
59
+ greys: 40,
60
+ haline: 41,
61
+ hot: 42,
62
+ hsv: 43,
63
+ ice: 44,
64
+ inferno: 45,
65
+ jet: 46,
66
+ magma: 47,
67
+ matter: 48,
68
+ nipy_spectral: 49,
69
+ ocean: 50,
70
+ oranges: 51,
71
+ orrd: 52,
72
+ oxy: 53,
73
+ paired: 54,
74
+ pastel1: 55,
75
+ pastel2: 56,
76
+ phase: 57,
77
+ pink: 58,
78
+ piyg: 59,
79
+ plasma: 60,
80
+ prgn: 61,
81
+ prism: 62,
82
+ pubu: 63,
83
+ pubugn: 64,
84
+ puor: 65,
85
+ purd: 66,
86
+ purples: 67,
87
+ rain: 68,
88
+ rainbow: 69,
89
+ rdbu: 70,
90
+ rdgy: 71,
91
+ rdpu: 72,
92
+ rdylbu: 73,
93
+ rdylgn: 74,
94
+ reds: 75,
95
+ rplumbo: 76,
96
+ schwarzwald: 77,
97
+ seismic: 78,
98
+ set1: 79,
99
+ set2: 80,
100
+ set3: 81,
101
+ solar: 82,
102
+ spectral: 83,
103
+ speed: 84,
104
+ spring: 85,
105
+ summer: 86,
106
+ tab10: 87,
107
+ tab20: 88,
108
+ tab20b: 89,
109
+ tab20c: 90,
110
+ tarn: 91,
111
+ tempo: 92,
112
+ terrain: 93,
113
+ thermal: 94,
114
+ topo: 95,
115
+ turbid: 96,
116
+ turbo: 97,
117
+ twilight: 98,
118
+ twilight_shifted: 99,
119
+ viridis: 100,
120
+ winter: 101,
121
+ wistia: 102,
122
+ ylgn: 103,
123
+ ylgnbu: 104,
124
+ ylorbr: 105,
125
+ ylorrd: 106,
126
+ };
127
+ //# sourceMappingURL=colormap-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colormap-names.js","sourceRoot":"","sources":["../../src/gpu-modules/colormap-names.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE;;;;;;;;;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AG;IACX,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;CACH,CAAC"}
@@ -1,19 +1,45 @@
1
1
  import type { Texture } from "@luma.gl/core";
2
+ /** Props for the {@link Colormap} shader module. */
2
3
  export type ColormapProps = {
4
+ /**
5
+ * The colormap sprite as a 2D array texture. Each layer of the array is
6
+ * one 256×1 RGBA8 colormap. Build from the shipped `colormaps.png` with
7
+ * `decodeColormapSprite` + `createColormapTexture`, or bring your own.
8
+ *
9
+ * Note this must be a Texture2DArray, not a Texture2D.
10
+ */
3
11
  colormapTexture: Texture;
12
+ /**
13
+ * Which layer of `colormapTexture` to sample. Pass values from the
14
+ * generated `COLORMAP_INDEX` for the shipped sprite, or any valid layer
15
+ * index for a custom sprite. Defaults to `0`.
16
+ */
17
+ colormapIndex?: number;
18
+ /**
19
+ * When true, samples the colormap in reverse — equivalent to matplotlib's
20
+ * `_r` suffix (e.g. `viridis_r`). Defaults to false.
21
+ */
22
+ reversed?: boolean;
4
23
  };
5
24
  /**
6
- * A shader module that injects a unorm texture and uses a sampler2D to assign
7
- * to a color.
25
+ * A shader module that injects a 2D-array colormap texture and samples one
26
+ * layer per fragment, indexed by `colormapIndex`.
8
27
  */
9
28
  export declare const Colormap: {
10
29
  readonly name: "colormap";
30
+ readonly fs: "uniform colormapUniforms {\n int colormapIndex;\n float reversed;\n} colormap;\n";
11
31
  readonly inject: {
12
- readonly "fs:#decl": "uniform sampler2D colormapTexture;";
13
- readonly "fs:DECKGL_FILTER_COLOR": "\n color = texture(colormapTexture, vec2(color.r, 0.));\n ";
32
+ readonly "fs:#decl": "precision highp sampler2DArray;\nuniform sampler2DArray colormapTexture;\n";
33
+ readonly "fs:DECKGL_FILTER_COLOR": "\n float idx = mix(color.r, 1.0 - color.r, colormap.reversed);\n color = texture(\n colormapTexture,\n vec3(idx, 0.5, float(colormap.colormapIndex))\n );\n ";
34
+ };
35
+ readonly uniformTypes: {
36
+ readonly colormapIndex: "i32";
37
+ readonly reversed: "f32";
14
38
  };
15
39
  readonly getUniforms: (props: Partial<ColormapProps>) => {
16
40
  colormapTexture: Texture | undefined;
41
+ colormapIndex: number;
42
+ reversed: boolean;
17
43
  };
18
44
  };
19
45
  //# sourceMappingURL=colormap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colormap.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/colormap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;kCAQE,OAAO,CAAC,aAAa,CAAC;;;CAKG,CAAC"}
1
+ {"version":3,"file":"colormap.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/colormap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,oDAAoD;AACpD,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;;OAMG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;kCAyBE,OAAO,CAAC,aAAa,CAAC;;;;;CAOG,CAAC"}
@@ -1,18 +1,38 @@
1
+ const MODULE_NAME = "colormap";
1
2
  /**
2
- * A shader module that injects a unorm texture and uses a sampler2D to assign
3
- * to a color.
3
+ * A shader module that injects a 2D-array colormap texture and samples one
4
+ * layer per fragment, indexed by `colormapIndex`.
4
5
  */
5
6
  export const Colormap = {
6
- name: "colormap",
7
+ name: MODULE_NAME,
8
+ fs: `\
9
+ uniform ${MODULE_NAME}Uniforms {
10
+ int colormapIndex;
11
+ float reversed;
12
+ } ${MODULE_NAME};
13
+ `,
7
14
  inject: {
8
- "fs:#decl": `uniform sampler2D colormapTexture;`,
15
+ "fs:#decl": `\
16
+ precision highp sampler2DArray;
17
+ uniform sampler2DArray colormapTexture;
18
+ `,
9
19
  "fs:DECKGL_FILTER_COLOR": /* glsl */ `
10
- color = texture(colormapTexture, vec2(color.r, 0.));
20
+ float idx = mix(color.r, 1.0 - color.r, ${MODULE_NAME}.reversed);
21
+ color = texture(
22
+ colormapTexture,
23
+ vec3(idx, 0.5, float(${MODULE_NAME}.colormapIndex))
24
+ );
11
25
  `,
12
26
  },
27
+ uniformTypes: {
28
+ colormapIndex: "i32",
29
+ reversed: "f32",
30
+ },
13
31
  getUniforms: (props) => {
14
32
  return {
15
33
  colormapTexture: props.colormapTexture,
34
+ colormapIndex: props.colormapIndex ?? 0,
35
+ reversed: props.reversed ?? false,
16
36
  };
17
37
  },
18
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"colormap.js","sourceRoot":"","sources":["../../src/gpu-modules/colormap.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE;QACN,UAAU,EAAE,oCAAoC;QAChD,wBAAwB,EAAE,UAAU,CAAC;;KAEpC;KACF;IACD,WAAW,EAAE,CAAC,KAA6B,EAAE,EAAE;QAC7C,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC;IACJ,CAAC;CAC6C,CAAC"}
1
+ {"version":3,"file":"colormap.js","sourceRoot":"","sources":["../../src/gpu-modules/colormap.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,GAAG,UAAU,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE;UACI,WAAW;;;IAGjB,WAAW;CACd;IACC,MAAM,EAAE;QACN,UAAU,EAAE;;;CAGf;QACG,wBAAwB,EAAE,UAAU,CAAC;gDACO,WAAW;;;+BAG5B,WAAW;;KAErC;KACF;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,WAAW,EAAE,CAAC,KAA6B,EAAE,EAAE;QAC7C,OAAO;YACL,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,aAAa,EAAE,KAAK,CAAC,aAAa,IAAI,CAAC;YACvC,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK;SAClC,CAAC;IACJ,CAAC;CAC6C,CAAC"}
Binary file
@@ -0,0 +1,16 @@
1
+ import type { Device, Texture } from "@luma.gl/core";
2
+ /**
3
+ * Upload a decoded colormap sprite to the GPU as a 2D array texture.
4
+ *
5
+ * The image must be exactly 256 pixels wide; each row becomes one layer
6
+ * of the returned `Texture` (`dimension: "2d-array"`, `format:
7
+ * "rgba8unorm"`). Use the result as the `colormapTexture` prop of the
8
+ * `Colormap` shader module.
9
+ *
10
+ * Synchronous — pair with `decodeColormapSprite` when you have a URL or
11
+ * raw bytes rather than an already-decoded `ImageData`.
12
+ *
13
+ * @throws when `imageData.width` is not 256.
14
+ */
15
+ export declare function createColormapTexture(device: Device, imageData: ImageData): Texture;
16
+ //# sourceMappingURL=create-colormap-texture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-colormap-texture.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/create-colormap-texture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GACnB,OAAO,CAgCT"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Upload a decoded colormap sprite to the GPU as a 2D array texture.
3
+ *
4
+ * The image must be exactly 256 pixels wide; each row becomes one layer
5
+ * of the returned `Texture` (`dimension: "2d-array"`, `format:
6
+ * "rgba8unorm"`). Use the result as the `colormapTexture` prop of the
7
+ * `Colormap` shader module.
8
+ *
9
+ * Synchronous — pair with `decodeColormapSprite` when you have a URL or
10
+ * raw bytes rather than an already-decoded `ImageData`.
11
+ *
12
+ * @throws when `imageData.width` is not 256.
13
+ */
14
+ export function createColormapTexture(device, imageData) {
15
+ if (imageData.width !== 256) {
16
+ throw new Error(`Expected a 256-pixel-wide colormap sprite, got width ${imageData.width}.`);
17
+ }
18
+ // ImageData row-major layout (RGBA row 0, RGBA row 1, …) matches luma.gl's
19
+ // 2D-array upload layout (layer-major). Each layer is one image row and
20
+ // exactly one texel tall, so no re-packing is needed.
21
+ const bytes = new Uint8Array(imageData.data.buffer, imageData.data.byteOffset, imageData.data.byteLength);
22
+ return device.createTexture({
23
+ dimension: "2d-array",
24
+ format: "rgba8unorm",
25
+ width: 256,
26
+ height: 1,
27
+ depth: imageData.height,
28
+ data: bytes,
29
+ mipLevels: 1,
30
+ sampler: {
31
+ minFilter: "linear",
32
+ magFilter: "linear",
33
+ // Clamp in every axis so an out-of-range colormapIndex yields an
34
+ // edge color rather than wrapping to an unrelated colormap.
35
+ addressModeU: "clamp-to-edge",
36
+ addressModeV: "clamp-to-edge",
37
+ addressModeW: "clamp-to-edge",
38
+ },
39
+ });
40
+ }
41
+ //# sourceMappingURL=create-colormap-texture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-colormap-texture.js","sourceRoot":"","sources":["../../src/gpu-modules/create-colormap-texture.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAc,EACd,SAAoB;IAEpB,IAAI,SAAS,CAAC,KAAK,KAAK,GAAG,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,wDAAwD,SAAS,CAAC,KAAK,GAAG,CAC3E,CAAC;IACJ,CAAC;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,sDAAsD;IACtD,MAAM,KAAK,GAAG,IAAI,UAAU,CAC1B,SAAS,CAAC,IAAI,CAAC,MAAM,EACrB,SAAS,CAAC,IAAI,CAAC,UAAU,EACzB,SAAS,CAAC,IAAI,CAAC,UAAU,CAC1B,CAAC;IACF,OAAO,MAAM,CAAC,aAAa,CAAC;QAC1B,SAAS,EAAE,UAAU;QACrB,MAAM,EAAE,YAAY;QACpB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,SAAS,CAAC,MAAM;QACvB,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,CAAC;QACZ,OAAO,EAAE;YACP,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,QAAQ;YACnB,iEAAiE;YACjE,4DAA4D;YAC5D,YAAY,EAAE,eAAe;YAC7B,YAAY,EAAE,eAAe;YAC7B,YAAY,EAAE,eAAe;SAC9B;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,25 @@
1
+ /** Any source that {@link decodeColormapSprite} can normalize into an `ImageData`. */
2
+ export type ColormapSpriteSource = ArrayBuffer | Uint8Array | ImageBitmap;
3
+ /**
4
+ * Decode a colormap sprite image into `ImageData`. Does not require a GPU
5
+ * `Device`, so it can run during app startup in parallel with the
6
+ * device-creation path; pair with `createColormapTexture` once the device
7
+ * is available.
8
+ *
9
+ * Supported source forms:
10
+ * - `ArrayBuffer` / `Uint8Array`: wrapped in a `Blob` and decoded via
11
+ * `createImageBitmap`.
12
+ * - `ImageBitmap`: drawn into an `OffscreenCanvas` to extract pixels.
13
+ *
14
+ * To decode from a URL, fetch the bytes first:
15
+ *
16
+ * ```ts
17
+ * const bytes = await (await fetch(colormapsUrl)).arrayBuffer();
18
+ * const imageData = await decodeColormapSprite(bytes);
19
+ * ```
20
+ *
21
+ * Avoiding a `string` overload here keeps the helper from having to
22
+ * disambiguate URL / base64 / data-URL inputs.
23
+ */
24
+ export declare function decodeColormapSprite(source: ColormapSpriteSource): Promise<ImageData>;
25
+ //# sourceMappingURL=decode-colormap-sprite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-colormap-sprite.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/decode-colormap-sprite.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,SAAS,CAAC,CAOpB"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Decode a colormap sprite image into `ImageData`. Does not require a GPU
3
+ * `Device`, so it can run during app startup in parallel with the
4
+ * device-creation path; pair with `createColormapTexture` once the device
5
+ * is available.
6
+ *
7
+ * Supported source forms:
8
+ * - `ArrayBuffer` / `Uint8Array`: wrapped in a `Blob` and decoded via
9
+ * `createImageBitmap`.
10
+ * - `ImageBitmap`: drawn into an `OffscreenCanvas` to extract pixels.
11
+ *
12
+ * To decode from a URL, fetch the bytes first:
13
+ *
14
+ * ```ts
15
+ * const bytes = await (await fetch(colormapsUrl)).arrayBuffer();
16
+ * const imageData = await decodeColormapSprite(bytes);
17
+ * ```
18
+ *
19
+ * Avoiding a `string` overload here keeps the helper from having to
20
+ * disambiguate URL / base64 / data-URL inputs.
21
+ */
22
+ export async function decodeColormapSprite(source) {
23
+ const bitmap = await sourceToImageBitmap(source);
24
+ try {
25
+ return bitmapToImageData(bitmap);
26
+ }
27
+ finally {
28
+ bitmap.close();
29
+ }
30
+ }
31
+ async function sourceToImageBitmap(source) {
32
+ if (source instanceof ImageBitmap) {
33
+ return source;
34
+ }
35
+ // `BlobPart` is strict about `Uint8Array<ArrayBufferLike>` vs
36
+ // `Uint8Array<ArrayBuffer>` in TS 5+. At runtime both an `ArrayBuffer`
37
+ // and any `Uint8Array` are valid blob inputs; the cast sidesteps the
38
+ // overly-narrow typing.
39
+ const blob = new Blob([source]);
40
+ return createImageBitmap(blob);
41
+ }
42
+ function bitmapToImageData(bitmap) {
43
+ const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
44
+ const ctx = canvas.getContext("2d");
45
+ if (!ctx) {
46
+ throw new Error("Failed to obtain 2D context for decoding the colormap sprite.");
47
+ }
48
+ ctx.drawImage(bitmap, 0, 0);
49
+ return ctx.getImageData(0, 0, bitmap.width, bitmap.height);
50
+ }
51
+ //# sourceMappingURL=decode-colormap-sprite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode-colormap-sprite.js","sourceRoot":"","sources":["../../src/gpu-modules/decode-colormap-sprite.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAA4B;IAE5B,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACjD,IAAI,CAAC;QACH,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;AACH,CAAC;AAED,KAAK,UAAU,mBAAmB,CAChC,MAA4B;IAE5B,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,8DAA8D;IAC9D,uEAAuE;IACvE,qEAAqE;IACrE,wBAAwB;IACxB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAkB,CAAC,CAAC,CAAC;IAC5C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAmB;IAC5C,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAChE,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;IACJ,CAAC;IACD,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7D,CAAC"}
@@ -1,13 +1,18 @@
1
- export { BlackIsZero, CMYKToRGB, cieLabToRGB, WhiteIsZero, YCbCrToRGB, } from "./color";
2
- export { Colormap } from "./colormap";
1
+ export { BlackIsZero, CMYKToRGB, cieLabToRGB, WhiteIsZero, YCbCrToRGB, } from "./color/index.js";
2
+ export type { ColormapProps } from "./colormap.js";
3
+ export { Colormap } from "./colormap.js";
4
+ export { COLORMAP_INDEX, type ColormapName, } from "./colormap-names.js";
3
5
  export type { CompositeBandsProps } from "./composite-bands.js";
4
6
  export { buildCompositeBandsProps, CompositeBands, } from "./composite-bands.js";
5
- export { CreateTexture } from "./create-texture";
7
+ export { createColormapTexture } from "./create-colormap-texture.js";
8
+ export { CreateTexture } from "./create-texture.js";
6
9
  export type { CutlineBboxProps } from "./cutline-bbox.js";
7
10
  export { CutlineBbox, lngLatToMercator } from "./cutline-bbox.js";
8
- export { FilterNoDataVal } from "./filter-nodata";
11
+ export type { ColormapSpriteSource } from "./decode-colormap-sprite.js";
12
+ export { decodeColormapSprite } from "./decode-colormap-sprite.js";
13
+ export { FilterNoDataVal } from "./filter-nodata.js";
9
14
  export type { LinearRescaleProps } from "./linear-rescale.js";
10
15
  export { LinearRescale } from "./linear-rescale.js";
11
- export { MaskTexture } from "./mask-texture";
12
- export type { RasterModule } from "./types";
16
+ export { MaskTexture } from "./mask-texture.js";
17
+ export type { RasterModule } from "./types.js";
13
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gpu-modules/index.ts"],"names":[],"mappings":"AAAA,OA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YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -1,9 +1,12 @@
1
- export { BlackIsZero, CMYKToRGB, cieLabToRGB, WhiteIsZero, YCbCrToRGB, } from "./color";
2
- export { Colormap } from "./colormap";
1
+ export { BlackIsZero, CMYKToRGB, cieLabToRGB, WhiteIsZero, YCbCrToRGB, } from "./color/index.js";
2
+ export { Colormap } from "./colormap.js";
3
+ export { COLORMAP_INDEX, } from "./colormap-names.js";
3
4
  export { buildCompositeBandsProps, CompositeBands, } from "./composite-bands.js";
4
- export { CreateTexture } from "./create-texture";
5
+ export { createColormapTexture } from "./create-colormap-texture.js";
6
+ export { CreateTexture } from "./create-texture.js";
5
7
  export { CutlineBbox, lngLatToMercator } from "./cutline-bbox.js";
6
- export { FilterNoDataVal } from "./filter-nodata";
8
+ export { decodeColormapSprite } from "./decode-colormap-sprite.js";
9
+ export { FilterNoDataVal } from "./filter-nodata.js";
7
10
  export { LinearRescale } from "./linear-rescale.js";
8
- export { MaskTexture } from "./mask-texture";
11
+ export { MaskTexture } from "./mask-texture.js";
9
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gpu-modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,GACX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gpu-modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,cAAc,GAEf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,wBAAwB,EACxB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export type { MultiTilesetDescriptor, SecondaryTileIndex, SecondaryTileResolutio
4
4
  export { createMultiTilesetDescriptor, resolveSecondaryTiles, selectSecondaryLevel, tilesetLevelsEqual, } from "./multi-raster-tileset/index.js";
5
5
  export type { RasterLayerProps, RenderTileResult } from "./raster-layer.js";
6
6
  export { RasterLayer } from "./raster-layer.js";
7
- export type { Bounds, CornerBounds, Corners, ProjectionFunction, TileMetadata, TilesetDescriptor, TilesetLevel, } from "./raster-tileset/index.js";
8
- export { RasterTileset2D, TileMatrixSetAdaptor, } from "./raster-tileset/index.js";
7
+ export type { GetTileDataOptions, MinimalTileData, RasterTileLayerProps, } from "./raster-tile-layer/index.js";
8
+ export { RasterTileLayer } from "./raster-tile-layer/index.js";
9
+ export type { AffineTilesetLevelOptions, AffineTilesetOptions, Bounds, CornerBounds, Corners, ProjectionFunction, TileMetadata, TilesetDescriptor, TilesetLevel, } from "./raster-tileset/index.js";
10
+ export { AffineTileset, AffineTilesetLevel, RasterTileset2D, TileMatrixSetAdaptor, } from "./raster-tileset/index.js";
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,IAAI,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACrF,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,GACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EACV,MAAM,EACN,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,iBAAiB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