bruce-models 7.1.88 → 7.1.89
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/bruce-models.es5.js +2366 -78
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +2355 -77
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/client-file/client-file-value-map.js +197 -0
- package/dist/lib/client-file/client-file-value-map.js.map +1 -0
- package/dist/lib/client-file/client-file.js +0 -76
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/client-file/value-map-grid.js +298 -0
- package/dist/lib/client-file/value-map-grid.js.map +1 -0
- package/dist/lib/client-file/value-map-metadata.js +362 -0
- package/dist/lib/client-file/value-map-metadata.js.map +1 -0
- package/dist/lib/client-file/value-map-reader.js +1547 -0
- package/dist/lib/client-file/value-map-reader.js.map +1 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/client-file/client-file-value-map.d.ts +186 -0
- package/dist/types/client-file/client-file.d.ts +1 -14
- package/dist/types/client-file/value-map-grid.d.ts +108 -0
- package/dist/types/client-file/value-map-metadata.d.ts +176 -0
- package/dist/types/client-file/value-map-reader.d.ts +520 -0
- package/package.json +1 -1
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValueMapMetadata = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Reading what a published value map declares, without decoding a single pixel.
|
|
6
|
+
*/
|
|
7
|
+
var ValueMapMetadata;
|
|
8
|
+
(function (ValueMapMetadata) {
|
|
9
|
+
// The only shape this library reads. The generations differ enough that a partial reading
|
|
10
|
+
// produces plausible numbers rather than an error, which is why anything else is refused.
|
|
11
|
+
ValueMapMetadata.SUPPORTED_VERSION = 3;
|
|
12
|
+
// Byte references are published only under Tiles, so any other layout carries no readable pixels at all.
|
|
13
|
+
ValueMapMetadata.LAYOUT_TILES = "tiles";
|
|
14
|
+
ValueMapMetadata.LAYOUT_SINGLE = "single";
|
|
15
|
+
// Value in R at 8 bits, or high in R and low in G at 16.
|
|
16
|
+
ValueMapMetadata.FORMAT_U8 = "u8";
|
|
17
|
+
ValueMapMetadata.FORMAT_RG16 = "rg16";
|
|
18
|
+
// A flag in alpha rather than a number, so a mask layer declares no range.
|
|
19
|
+
ValueMapMetadata.FORMAT_MASK = "mask";
|
|
20
|
+
// Declared as a field with one value, so a second mode can be added later without an absent
|
|
21
|
+
// Encoding having to mean anything.
|
|
22
|
+
ValueMapMetadata.ENCODING_ABSOLUTE = "absolute";
|
|
23
|
+
// One raster per entry in Series.Times.
|
|
24
|
+
ValueMapMetadata.LAYER_VALUE = "Value";
|
|
25
|
+
// Per-texel minimum and maximum over the whole series, as statistics rather than as part of
|
|
26
|
+
// the encoding.
|
|
27
|
+
ValueMapMetadata.LAYER_VALUE_MIN = "ValueMin";
|
|
28
|
+
ValueMapMetadata.LAYER_VALUE_MAX = "ValueMax";
|
|
29
|
+
// Texels that held their own minimum for the whole series, flagged in alpha.
|
|
30
|
+
ValueMapMetadata.LAYER_BASELINE = "Baseline";
|
|
31
|
+
// The per-texel correction applied to the source's numbers, on an archive that was transformed.
|
|
32
|
+
ValueMapMetadata.LAYER_VALUE_SHIFT = "ValueShift";
|
|
33
|
+
// A layer's alpha says whether a texel was sampled at all, so a transparent texel means no data
|
|
34
|
+
// rather than a value of zero.
|
|
35
|
+
// Alpha is per layer: masking one layer with another's coverage reports readings no texel holds.
|
|
36
|
+
ValueMapMetadata.NO_DATA = 0;
|
|
37
|
+
// Heights already on the ellipsoid, which are the only ones placeable without a shift.
|
|
38
|
+
ValueMapMetadata.DATUM_ELLIPSOIDAL = "WGS84";
|
|
39
|
+
ValueMapMetadata.DATUMS_ELLIPSOIDAL = ["WGS84", "ellipsoidal"];
|
|
40
|
+
/**
|
|
41
|
+
* The published block on a Client File record, or undefined when it carries none.
|
|
42
|
+
*/
|
|
43
|
+
function Of(file) {
|
|
44
|
+
const generation = file && file.Data ? file.Data.generation : undefined;
|
|
45
|
+
return generation ? generation : undefined;
|
|
46
|
+
}
|
|
47
|
+
ValueMapMetadata.Of = Of;
|
|
48
|
+
/**
|
|
49
|
+
* Whether a record is a value map this library can read.
|
|
50
|
+
*/
|
|
51
|
+
function IsReadable(metadata) {
|
|
52
|
+
return Unreadable(metadata) === null;
|
|
53
|
+
}
|
|
54
|
+
ValueMapMetadata.IsReadable = IsReadable;
|
|
55
|
+
/**
|
|
56
|
+
* Why an archive cannot be read, or null when it can.
|
|
57
|
+
*
|
|
58
|
+
* Returned rather than thrown so a renderer can warn and draw nothing while an analysis caller
|
|
59
|
+
* turns the same sentence into an error. Both then say the same thing.
|
|
60
|
+
*/
|
|
61
|
+
function Unreadable(metadata) {
|
|
62
|
+
if (!metadata) {
|
|
63
|
+
return "This Client File carries no generation block, so it is not a generated value map.";
|
|
64
|
+
}
|
|
65
|
+
const at = metadata.Identity ? metadata.Identity.Generated : undefined;
|
|
66
|
+
const generated = at ? " It was generated " + at + ", so regenerating it is the likely fix." : "";
|
|
67
|
+
if (metadata.Version !== ValueMapMetadata.SUPPORTED_VERSION) {
|
|
68
|
+
const found = metadata.Version != null ? String(metadata.Version) : "unstated";
|
|
69
|
+
return ("This value map is generation " + found + " and this library reads only generation "
|
|
70
|
+
+ ValueMapMetadata.SUPPORTED_VERSION + "." + generated);
|
|
71
|
+
}
|
|
72
|
+
const encoding = metadata.Value ? metadata.Value.Encoding : undefined;
|
|
73
|
+
if (encoding && encoding !== ValueMapMetadata.ENCODING_ABSOLUTE) {
|
|
74
|
+
return ("This value map is encoded as " + encoding + ", and this library reads only "
|
|
75
|
+
+ ValueMapMetadata.ENCODING_ABSOLUTE + "." + generated);
|
|
76
|
+
}
|
|
77
|
+
const layout = metadata.Geometry ? metadata.Geometry.Layout : undefined;
|
|
78
|
+
if (layout !== ValueMapMetadata.LAYOUT_TILES) {
|
|
79
|
+
return ("This value map declares a " + (layout || "missing") + " layout, and generation "
|
|
80
|
+
+ ValueMapMetadata.SUPPORTED_VERSION + " publishes byte references only under Tiles, so there are no"
|
|
81
|
+
+ " pixels to read." + generated);
|
|
82
|
+
}
|
|
83
|
+
if (!(metadata.Tiles || []).length) {
|
|
84
|
+
return ("This value map declares a tiled layout but publishes no tiles, so there are no"
|
|
85
|
+
+ " pixels to read." + generated);
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
ValueMapMetadata.Unreadable = Unreadable;
|
|
90
|
+
/**
|
|
91
|
+
* The tiles coarsest first, which is the order a reader has to composite them in.
|
|
92
|
+
*
|
|
93
|
+
* Tiles overlap and the finer one is the better answer, so assigning coarse first leaves the
|
|
94
|
+
* finest tile holding each texel it covers.
|
|
95
|
+
*/
|
|
96
|
+
function TilesOf(metadata) {
|
|
97
|
+
const tiles = (metadata && metadata.Tiles ? metadata.Tiles : []).slice();
|
|
98
|
+
tiles.sort((left, right) => {
|
|
99
|
+
const byLevel = (left.Level || 0) - (right.Level || 0);
|
|
100
|
+
return byLevel !== 0 ? byLevel : (right.TexelMetres || 0) - (left.TexelMetres || 0);
|
|
101
|
+
});
|
|
102
|
+
return tiles;
|
|
103
|
+
}
|
|
104
|
+
ValueMapMetadata.TilesOf = TilesOf;
|
|
105
|
+
/**
|
|
106
|
+
* One layer's declaration, or undefined when the archive does not carry it.
|
|
107
|
+
*/
|
|
108
|
+
function LayerOf(metadata, name) {
|
|
109
|
+
const layers = metadata && metadata.Layers ? metadata.Layers : [];
|
|
110
|
+
for (const layer of layers) {
|
|
111
|
+
if (layer && layer.Name === name) {
|
|
112
|
+
return layer;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
ValueMapMetadata.LayerOf = LayerOf;
|
|
118
|
+
/**
|
|
119
|
+
* The range one layer was quantised between, or null for a mask and for a layer that is absent.
|
|
120
|
+
*
|
|
121
|
+
* A statistics layer is encoded over the true data range rather than over the frames' own, so
|
|
122
|
+
* reading it with the frame range is a plausible wrong answer.
|
|
123
|
+
*/
|
|
124
|
+
function LayerRange(metadata, name) {
|
|
125
|
+
const layer = LayerOf(metadata, name);
|
|
126
|
+
if (!layer || typeof layer.Min !== "number" || typeof layer.Max !== "number") {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
return { Min: layer.Min, Max: layer.Max };
|
|
130
|
+
}
|
|
131
|
+
ValueMapMetadata.LayerRange = LayerRange;
|
|
132
|
+
/**
|
|
133
|
+
* The values a reading out of this archive falls between, in its delivered units.
|
|
134
|
+
*/
|
|
135
|
+
function ValueRange(metadata) {
|
|
136
|
+
const value = (metadata && metadata.Value) || {};
|
|
137
|
+
return {
|
|
138
|
+
Min: typeof value.Min === "number" ? value.Min : 0,
|
|
139
|
+
Max: typeof value.Max === "number" ? value.Max : 1
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
ValueMapMetadata.ValueRange = ValueRange;
|
|
143
|
+
/**
|
|
144
|
+
* The values the source's own numbers fall between, or null where nothing was transformed.
|
|
145
|
+
*/
|
|
146
|
+
function SourceRange(metadata) {
|
|
147
|
+
const source = (metadata && metadata.ValueSource) || {};
|
|
148
|
+
if (typeof source.Min !== "number" || typeof source.Max !== "number") {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
return { Min: source.Min, Max: source.Max };
|
|
152
|
+
}
|
|
153
|
+
ValueMapMetadata.SourceRange = SourceRange;
|
|
154
|
+
/**
|
|
155
|
+
* What was applied to the source's numbers to get the delivered ones, empty for nothing.
|
|
156
|
+
*/
|
|
157
|
+
function TransformOf(metadata) {
|
|
158
|
+
const source = metadata && metadata.ValueSource;
|
|
159
|
+
return (source && source.Transform) || "";
|
|
160
|
+
}
|
|
161
|
+
ValueMapMetadata.TransformOf = TransformOf;
|
|
162
|
+
/**
|
|
163
|
+
* Whether a delivered reading differs from what the source's own data said.
|
|
164
|
+
*
|
|
165
|
+
* Both halves are needed: the transform names what happened, and the ValueShift layer is the
|
|
166
|
+
* only thing that can undo it per texel.
|
|
167
|
+
*/
|
|
168
|
+
function IsTransformed(metadata) {
|
|
169
|
+
return !!TransformOf(metadata) && !!LayerOf(metadata, ValueMapMetadata.LAYER_VALUE_SHIFT);
|
|
170
|
+
}
|
|
171
|
+
ValueMapMetadata.IsTransformed = IsTransformed;
|
|
172
|
+
/**
|
|
173
|
+
* What a picture should be ramped over where the source suggests one, which is not a bound on the data.
|
|
174
|
+
*/
|
|
175
|
+
function ColorBarRange(metadata) {
|
|
176
|
+
const hints = (metadata && metadata.Hints) || {};
|
|
177
|
+
if (typeof hints.ColorBarMin !== "number" || typeof hints.ColorBarMax !== "number") {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
return { Min: hints.ColorBarMin, Max: hints.ColorBarMax };
|
|
181
|
+
}
|
|
182
|
+
ValueMapMetadata.ColorBarRange = ColorBarRange;
|
|
183
|
+
/**
|
|
184
|
+
* When each frame was sampled. Authoritative, unlike Series.Increment.
|
|
185
|
+
*/
|
|
186
|
+
function TimesOf(metadata) {
|
|
187
|
+
const series = (metadata && metadata.Series) || {};
|
|
188
|
+
return (series.Times || []).slice();
|
|
189
|
+
}
|
|
190
|
+
ValueMapMetadata.TimesOf = TimesOf;
|
|
191
|
+
/**
|
|
192
|
+
* Whether the archive holds every timestep that was asked for.
|
|
193
|
+
*
|
|
194
|
+
* A short archive is otherwise indistinguishable from a short series, and the failure it hides
|
|
195
|
+
* is a skipped timestep in the middle of the event rather than a shorter one.
|
|
196
|
+
*/
|
|
197
|
+
function IsComplete(metadata) {
|
|
198
|
+
const series = (metadata && metadata.Series) || {};
|
|
199
|
+
if (series.Complete != null) {
|
|
200
|
+
return !!series.Complete;
|
|
201
|
+
}
|
|
202
|
+
const written = typeof series.Written === "number" ? series.Written : TimesOf(metadata).length;
|
|
203
|
+
return (series.Requested || 0) === written;
|
|
204
|
+
}
|
|
205
|
+
ValueMapMetadata.IsComplete = IsComplete;
|
|
206
|
+
/**
|
|
207
|
+
* Says so when an archive's heights are not on the ellipsoid they will be drawn against.
|
|
208
|
+
*
|
|
209
|
+
* Returned rather than logged, so the renderer keeps its console warning and an analysis caller
|
|
210
|
+
* can put the same sentence in a report.
|
|
211
|
+
*/
|
|
212
|
+
function UnshiftedWarning(metadata) {
|
|
213
|
+
const source = (metadata && metadata.ValueSource) || {};
|
|
214
|
+
const datum = source.VerticalDatum;
|
|
215
|
+
if (!datum || ValueMapMetadata.DATUMS_ELLIPSOIDAL.indexOf(datum) >= 0 || TransformOf(metadata)) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
const at = metadata && metadata.Identity ? metadata.Identity.Generated : undefined;
|
|
219
|
+
return ("These value map heights are in " + datum + " and report no transform, so they are"
|
|
220
|
+
+ " not ellipsoidal and will be wrong when placed absolutely."
|
|
221
|
+
+
|
|
222
|
+
(at ? " The archive was generated at " + at + " and needs regenerating with the shift"
|
|
223
|
+
+ " applied." : ""));
|
|
224
|
+
}
|
|
225
|
+
ValueMapMetadata.UnshiftedWarning = UnshiftedWarning;
|
|
226
|
+
/**
|
|
227
|
+
* Where one tile's copy of a layer sits in the blob, or null when it holds none.
|
|
228
|
+
*
|
|
229
|
+
* A per-time layer holds one entry per Series.Times element, and a zero length means the tile
|
|
230
|
+
* held nothing at that time, so the indices stay aligned with the series.
|
|
231
|
+
*/
|
|
232
|
+
function BytesOf(tile, name, index) {
|
|
233
|
+
const entry = tile && tile.Layers ? tile.Layers[name] : undefined;
|
|
234
|
+
if (!entry) {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
if (Array.isArray(entry)) {
|
|
238
|
+
if (index == null || index < 0 || index >= entry.length) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
const at = entry[index];
|
|
242
|
+
return at && at.Bytes ? at.Bytes : null;
|
|
243
|
+
}
|
|
244
|
+
return entry.Bytes || null;
|
|
245
|
+
}
|
|
246
|
+
ValueMapMetadata.BytesOf = BytesOf;
|
|
247
|
+
// How far apart two byte ranges can sit and still be worth reading together.
|
|
248
|
+
// A wasted byte is far cheaper than a round trip.
|
|
249
|
+
ValueMapMetadata.MAX_READ_GAP = 131072;
|
|
250
|
+
/**
|
|
251
|
+
* The span of the blob a set of byte ranges covers, or null for an empty set.
|
|
252
|
+
*/
|
|
253
|
+
function SpanOf(ranges) {
|
|
254
|
+
let low = Number.POSITIVE_INFINITY;
|
|
255
|
+
let high = Number.NEGATIVE_INFINITY;
|
|
256
|
+
for (const range of ranges) {
|
|
257
|
+
if (!range || !range.Length) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
low = Math.min(low, range.Offset);
|
|
261
|
+
high = Math.max(high, range.Offset + range.Length);
|
|
262
|
+
}
|
|
263
|
+
return high > low ? { Offset: low, Length: high - low } : null;
|
|
264
|
+
}
|
|
265
|
+
ValueMapMetadata.SpanOf = SpanOf;
|
|
266
|
+
/**
|
|
267
|
+
* The rectangle the archive's raster covers, or null when the block does not place it.
|
|
268
|
+
*/
|
|
269
|
+
function ExtentOf(metadata) {
|
|
270
|
+
const geometry = (metadata && metadata.Geometry) || {};
|
|
271
|
+
if (typeof geometry.West !== "number" || typeof geometry.East !== "number" ||
|
|
272
|
+
typeof geometry.South !== "number" || typeof geometry.North !== "number") {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
return {
|
|
276
|
+
West: geometry.West, East: geometry.East,
|
|
277
|
+
South: geometry.South, North: geometry.North
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
ValueMapMetadata.ExtentOf = ExtentOf;
|
|
281
|
+
/**
|
|
282
|
+
* Whether frames carry a 16 bit value packed across R and G.
|
|
283
|
+
*
|
|
284
|
+
* Worth asking by name: taking R alone from a packed frame yields a plausible surface quantised
|
|
285
|
+
* to 255 steps of the full range rather than an obvious failure.
|
|
286
|
+
*/
|
|
287
|
+
function IsPacked(metadata) {
|
|
288
|
+
const value = (metadata && metadata.Value) || {};
|
|
289
|
+
return value.Format === ValueMapMetadata.FORMAT_RG16;
|
|
290
|
+
}
|
|
291
|
+
ValueMapMetadata.IsPacked = IsPacked;
|
|
292
|
+
/**
|
|
293
|
+
* A value in the attribute's own units as the 0 to 1 position a ramp is indexed by.
|
|
294
|
+
*
|
|
295
|
+
* Stops are authored in real units, since "hide anything under 0.1 m" is the sentence a user
|
|
296
|
+
* actually has, and the archive's published range is what makes that expressible.
|
|
297
|
+
*/
|
|
298
|
+
function Normalise(value, range) {
|
|
299
|
+
const span = range.Max - range.Min;
|
|
300
|
+
if (!(span > 0)) {
|
|
301
|
+
return 0;
|
|
302
|
+
}
|
|
303
|
+
return Math.min(1, Math.max(0, (value - range.Min) / span));
|
|
304
|
+
}
|
|
305
|
+
ValueMapMetadata.Normalise = Normalise;
|
|
306
|
+
/**
|
|
307
|
+
* A 0 to 1 position back in the attribute's own units.
|
|
308
|
+
*/
|
|
309
|
+
function Denormalise(position, range) {
|
|
310
|
+
return range.Min + position * (range.Max - range.Min);
|
|
311
|
+
}
|
|
312
|
+
ValueMapMetadata.Denormalise = Denormalise;
|
|
313
|
+
/**
|
|
314
|
+
* The packed number at one texel, straight out of the channels, whatever the format.
|
|
315
|
+
*/
|
|
316
|
+
function PackedAt(pixels, at, format) {
|
|
317
|
+
return format === ValueMapMetadata.FORMAT_RG16 ? pixels[at] * 256 + pixels[at + 1] : pixels[at];
|
|
318
|
+
}
|
|
319
|
+
ValueMapMetadata.PackedAt = PackedAt;
|
|
320
|
+
/**
|
|
321
|
+
* The 0 to 1 reading at one texel, for a caller indexing a ramp rather than reporting a number.
|
|
322
|
+
*/
|
|
323
|
+
function NormalisedAt(pixels, at, format) {
|
|
324
|
+
return PackedAt(pixels, at, format) / (format === ValueMapMetadata.FORMAT_RG16 ? 65535 : 255);
|
|
325
|
+
}
|
|
326
|
+
ValueMapMetadata.NormalisedAt = NormalisedAt;
|
|
327
|
+
/**
|
|
328
|
+
* The reads that cover a set of byte ranges, adjacent ones merged and distant ones left apart.
|
|
329
|
+
*
|
|
330
|
+
* What stops a caller having to choose between one round trip per entry and one download of
|
|
331
|
+
* everything between the first entry and the last.
|
|
332
|
+
*/
|
|
333
|
+
function PlanReads(ranges, maxGap) {
|
|
334
|
+
const gap = maxGap == null ? ValueMapMetadata.MAX_READ_GAP : maxGap;
|
|
335
|
+
const wanted = ranges
|
|
336
|
+
.filter((at) => at && at.Length > 0)
|
|
337
|
+
.slice()
|
|
338
|
+
.sort((left, right) => left.Offset - right.Offset);
|
|
339
|
+
const reads = [];
|
|
340
|
+
for (const at of wanted) {
|
|
341
|
+
const last = reads[reads.length - 1];
|
|
342
|
+
const end = last ? last.Offset + last.Length : 0;
|
|
343
|
+
if (last && at.Offset - end <= gap) {
|
|
344
|
+
last.Length = Math.max(end, at.Offset + at.Length) - last.Offset;
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
reads.push({ Offset: at.Offset, Length: at.Length });
|
|
348
|
+
}
|
|
349
|
+
return reads;
|
|
350
|
+
}
|
|
351
|
+
ValueMapMetadata.PlanReads = PlanReads;
|
|
352
|
+
/**
|
|
353
|
+
* A packed channel reading as the number it stands for.
|
|
354
|
+
* value = Min + packed / fullScale * (Max - Min), where packed is R at 8 bits and R * 256 + G at 16.
|
|
355
|
+
*/
|
|
356
|
+
function Decode(packed, format, range) {
|
|
357
|
+
const fullScale = format === ValueMapMetadata.FORMAT_RG16 ? 65535 : 255;
|
|
358
|
+
return range.Min + (packed / fullScale) * (range.Max - range.Min);
|
|
359
|
+
}
|
|
360
|
+
ValueMapMetadata.Decode = Decode;
|
|
361
|
+
})(ValueMapMetadata = exports.ValueMapMetadata || (exports.ValueMapMetadata = {}));
|
|
362
|
+
//# sourceMappingURL=value-map-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-map-metadata.js","sourceRoot":"","sources":["../../../src/client-file/value-map-metad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