@nika-js/onlymap 0.5.3 → 0.5.7

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 (38) hide show
  1. package/README.md +20 -7
  2. package/THIRD-PARTY-LICENSES.md +120 -0
  3. package/dist/{Arrow.dom-BNjbQ9jb.js → Arrow.dom-BFGShwSA.js} +854 -1427
  4. package/dist/{LercDecode.es-S6KKhkuA.js → LercDecode.es-Bp2rG98n.js} +1 -1
  5. package/dist/{basemap-BSCq9hHZ.js → basemap-CfOA0HWY.js} +1 -1
  6. package/dist/builder-CqJZRFaq.js +580 -0
  7. package/dist/data-layer.d.ts +4 -0
  8. package/dist/date-format.d.ts +18 -0
  9. package/dist/flatgeobuf-Cx0IwxhV.js +6332 -0
  10. package/dist/full.esm-Cl_Dig1y.js +1467 -0
  11. package/dist/geoparquet-kW7KUrwB.js +35 -0
  12. package/dist/geoparquet.d.ts +33 -0
  13. package/dist/image-overlay.d.ts +83 -0
  14. package/dist/{index-BCgjJcZn.js → index-BLy1eTWe.js} +1 -1
  15. package/dist/index-BYbMtNVH.js +2301 -0
  16. package/dist/{index-BoAq5XsU.js → index-CUKgoX_E.js} +13291 -12728
  17. package/dist/index-CgPV7QlM.js +4019 -0
  18. package/dist/{index-D1swbykc.js → index-CnY_rdB8.js} +1 -1
  19. package/dist/{index-DfNGlG_k.js → index-MRS7UAHr.js} +1 -1
  20. package/dist/{index-BTcRCrfX.js → index-wZ6n6ggy.js} +2 -2
  21. package/dist/index.d.ts +5 -1
  22. package/dist/ir-snapshot.d.ts +3 -1
  23. package/dist/ir.d.ts +18 -0
  24. package/dist/layer-registry.d.ts +2 -0
  25. package/dist/{lerc-n0GaWEmL.js → lerc-DWbkmLYR.js} +2 -2
  26. package/dist/onlymap.standalone.js +59664 -44945
  27. package/dist/onlymapjs.js +76 -74
  28. package/dist/{raster-DO-Ex2Lb.js → raster-5jEwGISN.js} +2 -2
  29. package/dist/validation.d.ts +1 -1
  30. package/dist/version.d.ts +1 -1
  31. package/docs/3d-assets.md +1 -1
  32. package/docs/image-overlays.md +75 -0
  33. package/llms.txt +7 -4
  34. package/onlymapjs.html-data.json +147 -86
  35. package/package.json +5 -1
  36. package/skills/onlymapjs/SKILL.md +4 -1
  37. package/skills/onlymapjs/references/syntax.md +120 -19
  38. package/skills/onlymapjs/references/testing.md +11 -2
@@ -0,0 +1,1467 @@
1
+ var ne = typeof self < "u" ? self : global;
2
+ const Y = typeof navigator < "u", ht = Y && typeof HTMLImageElement > "u", Z = !(typeof global > "u" || typeof process > "u" || !process.versions || !process.versions.node), re = ne.Buffer, $ = ne.BigInt, ae = !!re, ut = (s) => s;
3
+ function ee(s, e = ut) {
4
+ if (Z) try {
5
+ return typeof require == "function" ? Promise.resolve(e(require(s))) : import(
6
+ /* webpackIgnore: true */
7
+ s
8
+ ).then(e);
9
+ } catch {
10
+ console.warn(`Couldn't load ${s}`);
11
+ }
12
+ }
13
+ let Ie = ne.fetch;
14
+ const ft = (s) => Ie = s;
15
+ if (!ne.fetch) {
16
+ const s = ee("http", ((i) => i)), e = ee("https", ((i) => i)), t = (i, { headers: n } = {}) => new Promise((async (r, a) => {
17
+ let { port: o, hostname: l, pathname: u, protocol: f, search: c } = new URL(i);
18
+ const y = { method: "GET", hostname: l, path: encodeURI(u) + c, headers: n };
19
+ o !== "" && (y.port = Number(o));
20
+ const T = (f === "https:" ? await e : await s).request(y, ((A) => {
21
+ if (A.statusCode === 301 || A.statusCode === 302) {
22
+ let ue = new URL(A.headers.location, i).toString();
23
+ return t(ue, { headers: n }).then(r).catch(a);
24
+ }
25
+ r({ status: A.statusCode, arrayBuffer: () => new Promise(((ue) => {
26
+ let ve = [];
27
+ A.on("data", ((lt) => ve.push(lt))), A.on("end", (() => ue(Buffer.concat(ve))));
28
+ })) });
29
+ }));
30
+ T.on("error", a), T.end();
31
+ }));
32
+ ft(t);
33
+ }
34
+ function h(s, e, t) {
35
+ return e in s ? Object.defineProperty(s, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : s[e] = t, s;
36
+ }
37
+ const te = (s) => $e(s) ? void 0 : s, ct = (s) => s !== void 0;
38
+ function $e(s) {
39
+ return s === void 0 || (s instanceof Map ? s.size === 0 : Object.values(s).filter(ct).length === 0);
40
+ }
41
+ function m(s) {
42
+ let e = new Error(s);
43
+ throw delete e.stack, e;
44
+ }
45
+ function U(s) {
46
+ return (s = (function(e) {
47
+ for (; e.endsWith("\0"); ) e = e.slice(0, -1);
48
+ return e;
49
+ })(s).trim()) === "" ? void 0 : s;
50
+ }
51
+ function Se(s) {
52
+ let e = (function(t) {
53
+ let i = 0;
54
+ return t.ifd0.enabled && (i += 1024), t.exif.enabled && (i += 2048), t.makerNote && (i += 2048), t.userComment && (i += 1024), t.gps.enabled && (i += 512), t.interop.enabled && (i += 100), t.ifd1.enabled && (i += 1024), i + 2048;
55
+ })(s);
56
+ return s.jfif.enabled && (e += 50), s.xmp.enabled && (e += 2e4), s.iptc.enabled && (e += 14e3), s.icc.enabled && (e += 6e3), e;
57
+ }
58
+ const ye = (s) => String.fromCharCode.apply(null, s), Me = typeof TextDecoder < "u" ? new TextDecoder("utf-8") : void 0;
59
+ function Je(s) {
60
+ return Me ? Me.decode(s) : ae ? Buffer.from(s).toString("utf8") : decodeURIComponent(escape(ye(s)));
61
+ }
62
+ class b {
63
+ static from(e, t) {
64
+ return e instanceof this && e.le === t ? e : new b(e, void 0, void 0, t);
65
+ }
66
+ constructor(e, t = 0, i, n) {
67
+ if (typeof n == "boolean" && (this.le = n), Array.isArray(e) && (e = new Uint8Array(e)), e === 0) this.byteOffset = 0, this.byteLength = 0;
68
+ else if (e instanceof ArrayBuffer) {
69
+ i === void 0 && (i = e.byteLength - t);
70
+ let r = new DataView(e, t, i);
71
+ this._swapDataView(r);
72
+ } else if (e instanceof Uint8Array || e instanceof DataView || e instanceof b) {
73
+ i === void 0 && (i = e.byteLength - t), (t += e.byteOffset) + i > e.byteOffset + e.byteLength && m("Creating view outside of available memory in ArrayBuffer");
74
+ let r = new DataView(e.buffer, t, i);
75
+ this._swapDataView(r);
76
+ } else if (typeof e == "number") {
77
+ let r = new DataView(new ArrayBuffer(e));
78
+ this._swapDataView(r);
79
+ } else m("Invalid input argument for BufferView: " + e);
80
+ }
81
+ _swapArrayBuffer(e) {
82
+ this._swapDataView(new DataView(e));
83
+ }
84
+ _swapBuffer(e) {
85
+ this._swapDataView(new DataView(e.buffer, e.byteOffset, e.byteLength));
86
+ }
87
+ _swapDataView(e) {
88
+ this.dataView = e, this.buffer = e.buffer, this.byteOffset = e.byteOffset, this.byteLength = e.byteLength;
89
+ }
90
+ _lengthToEnd(e) {
91
+ return this.byteLength - e;
92
+ }
93
+ set(e, t, i = b) {
94
+ return e instanceof DataView || e instanceof b ? e = new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : e instanceof ArrayBuffer && (e = new Uint8Array(e)), e instanceof Uint8Array || m("BufferView.set(): Invalid data argument."), this.toUint8().set(e, t), new i(this, t, e.byteLength);
95
+ }
96
+ subarray(e, t) {
97
+ return t = t || this._lengthToEnd(e), new b(this, e, t);
98
+ }
99
+ toUint8() {
100
+ return new Uint8Array(this.buffer, this.byteOffset, this.byteLength);
101
+ }
102
+ getUint8Array(e, t) {
103
+ return new Uint8Array(this.buffer, this.byteOffset + e, t);
104
+ }
105
+ getString(e = 0, t = this.byteLength) {
106
+ return Je(this.getUint8Array(e, t));
107
+ }
108
+ getLatin1String(e = 0, t = this.byteLength) {
109
+ let i = this.getUint8Array(e, t);
110
+ return ye(i);
111
+ }
112
+ getUnicodeString(e = 0, t = this.byteLength) {
113
+ const i = [];
114
+ for (let n = 0; n < t && e + n < this.byteLength; n += 2) i.push(this.getUint16(e + n));
115
+ return ye(i);
116
+ }
117
+ getInt8(e) {
118
+ return this.dataView.getInt8(e);
119
+ }
120
+ getUint8(e) {
121
+ return this.dataView.getUint8(e);
122
+ }
123
+ getInt16(e, t = this.le) {
124
+ return this.dataView.getInt16(e, t);
125
+ }
126
+ getInt32(e, t = this.le) {
127
+ return this.dataView.getInt32(e, t);
128
+ }
129
+ getUint16(e, t = this.le) {
130
+ return this.dataView.getUint16(e, t);
131
+ }
132
+ getUint32(e, t = this.le) {
133
+ return this.dataView.getUint32(e, t);
134
+ }
135
+ getFloat32(e, t = this.le) {
136
+ return this.dataView.getFloat32(e, t);
137
+ }
138
+ getFloat64(e, t = this.le) {
139
+ return this.dataView.getFloat64(e, t);
140
+ }
141
+ getFloat(e, t = this.le) {
142
+ return this.dataView.getFloat32(e, t);
143
+ }
144
+ getDouble(e, t = this.le) {
145
+ return this.dataView.getFloat64(e, t);
146
+ }
147
+ getUintBytes(e, t, i) {
148
+ switch (t) {
149
+ case 1:
150
+ return this.getUint8(e, i);
151
+ case 2:
152
+ return this.getUint16(e, i);
153
+ case 4:
154
+ return this.getUint32(e, i);
155
+ case 8:
156
+ return this.getUint64 && this.getUint64(e, i);
157
+ }
158
+ }
159
+ getUint(e, t, i) {
160
+ switch (t) {
161
+ case 8:
162
+ return this.getUint8(e, i);
163
+ case 16:
164
+ return this.getUint16(e, i);
165
+ case 32:
166
+ return this.getUint32(e, i);
167
+ case 64:
168
+ return this.getUint64 && this.getUint64(e, i);
169
+ }
170
+ }
171
+ toString(e) {
172
+ return this.dataView.toString(e, this.constructor.name);
173
+ }
174
+ ensureChunk() {
175
+ }
176
+ }
177
+ function Ce(s, e) {
178
+ m(`${s} '${e}' was not loaded, try using full build of exifr.`);
179
+ }
180
+ class ke extends Map {
181
+ constructor(e) {
182
+ super(), this.kind = e;
183
+ }
184
+ get(e, t) {
185
+ return this.has(e) || Ce(this.kind, e), t && (e in t || (function(i, n) {
186
+ m(`Unknown ${i} '${n}'.`);
187
+ })(this.kind, e), t[e].enabled || Ce(this.kind, e)), super.get(e);
188
+ }
189
+ keyList() {
190
+ return Array.from(this.keys());
191
+ }
192
+ }
193
+ var k = new ke("file parser"), g = new ke("segment parser"), w = new ke("file reader");
194
+ function dt(s, e) {
195
+ return typeof s == "string" ? Re(s, e) : Y && !ht && s instanceof HTMLImageElement ? Re(s.src, e) : s instanceof Uint8Array || s instanceof ArrayBuffer || s instanceof DataView ? new b(s) : Y && s instanceof Blob ? be(s, e, "blob", N) : void m("Invalid input argument");
196
+ }
197
+ function Re(s, e) {
198
+ return (t = s).startsWith("data:") || t.length > 1e4 ? Pe(s, e, "base64") : Z && s.includes("://") ? be(s, e, "url", E) : Z ? Pe(s, e, "fs") : Y ? be(s, e, "url", E) : void m("Invalid input argument");
199
+ var t;
200
+ }
201
+ async function be(s, e, t, i) {
202
+ return w.has(t) ? Pe(s, e, t) : i ? (async function(n, r) {
203
+ let a = await r(n);
204
+ return new b(a);
205
+ })(s, i) : void m(`Parser ${t} is not loaded`);
206
+ }
207
+ async function Pe(s, e, t) {
208
+ let i = new (w.get(t))(s, e);
209
+ return await i.read(), i;
210
+ }
211
+ const E = (s) => Ie(s).then(((e) => e.arrayBuffer())), N = (s) => new Promise(((e, t) => {
212
+ let i = new FileReader();
213
+ i.onloadend = () => e(i.result || new ArrayBuffer()), i.onerror = t, i.readAsArrayBuffer(s);
214
+ }));
215
+ class pt extends Map {
216
+ get tagKeys() {
217
+ return this.allKeys || (this.allKeys = Array.from(this.keys())), this.allKeys;
218
+ }
219
+ get tagValues() {
220
+ return this.allValues || (this.allValues = Array.from(this.values())), this.allValues;
221
+ }
222
+ }
223
+ function p(s, e, t) {
224
+ let i = new pt();
225
+ for (let [n, r] of t) i.set(n, r);
226
+ if (Array.isArray(e)) for (let n of e) s.set(n, i);
227
+ else s.set(e, i);
228
+ return i;
229
+ }
230
+ function G(s, e, t) {
231
+ let i, n = s.get(e);
232
+ for (i of t) n.set(i[0], i[1]);
233
+ }
234
+ const S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map(), O = ["chunked", "firstChunkSize", "firstChunkSizeNode", "firstChunkSizeBrowser", "chunkSize", "chunkLimit"], j = ["jfif", "xmp", "icc", "iptc", "ihdr"], V = ["tiff", ...j], d = ["ifd0", "ifd1", "exif", "gps", "interop"], x = [...V, ...d], v = ["makerNote", "userComment"], W = ["translateKeys", "translateValues", "reviveValues", "multiSegment"], M = [...W, "sanitize", "mergeOutput", "silentErrors"];
235
+ class qe {
236
+ get translate() {
237
+ return this.translateKeys || this.translateValues || this.reviveValues;
238
+ }
239
+ }
240
+ class K extends qe {
241
+ get needed() {
242
+ return this.enabled || this.deps.size > 0;
243
+ }
244
+ constructor(e, t, i, n) {
245
+ if (super(), h(this, "enabled", !1), h(this, "skip", /* @__PURE__ */ new Set()), h(this, "pick", /* @__PURE__ */ new Set()), h(this, "deps", /* @__PURE__ */ new Set()), h(this, "translateKeys", !1), h(this, "translateValues", !1), h(this, "reviveValues", !1), this.key = e, this.enabled = t, this.parse = this.enabled, this.applyInheritables(n), this.canBeFiltered = d.includes(e), this.canBeFiltered && (this.dict = S.get(e)), i !== void 0) if (Array.isArray(i)) this.parse = this.enabled = !0, this.canBeFiltered && i.length > 0 && this.translateTagSet(i, this.pick);
246
+ else if (typeof i == "object") {
247
+ if (this.enabled = !0, this.parse = i.parse !== !1, this.canBeFiltered) {
248
+ let { pick: r, skip: a } = i;
249
+ r && r.length > 0 && this.translateTagSet(r, this.pick), a && a.length > 0 && this.translateTagSet(a, this.skip);
250
+ }
251
+ this.applyInheritables(i);
252
+ } else i === !0 || i === !1 ? this.parse = this.enabled = i : m(`Invalid options argument: ${i}`);
253
+ }
254
+ applyInheritables(e) {
255
+ let t, i;
256
+ for (t of W) i = e[t], i !== void 0 && (this[t] = i);
257
+ }
258
+ translateTagSet(e, t) {
259
+ if (this.dict) {
260
+ let i, n, { tagKeys: r, tagValues: a } = this.dict;
261
+ for (i of e) typeof i == "string" ? (n = a.indexOf(i), n === -1 && (n = r.indexOf(Number(i))), n !== -1 && t.add(Number(r[n]))) : t.add(i);
262
+ } else for (let i of e) t.add(i);
263
+ }
264
+ finalizeFilters() {
265
+ !this.enabled && this.deps.size > 0 ? (this.enabled = !0, ie(this.pick, this.deps)) : this.enabled && this.pick.size > 0 && ie(this.pick, this.deps);
266
+ }
267
+ }
268
+ var C = { jfif: !1, tiff: !0, xmp: !1, icc: !1, iptc: !1, ifd0: !0, ifd1: !1, exif: !0, gps: !0, interop: !1, ihdr: void 0, makerNote: !1, userComment: !1, multiSegment: !1, skip: [], pick: [], translateKeys: !0, translateValues: !0, reviveValues: !0, sanitize: !0, mergeOutput: !0, silentErrors: !0, chunked: !0, firstChunkSize: void 0, firstChunkSizeNode: 512, firstChunkSizeBrowser: 65536, chunkSize: 65536, chunkLimit: 5 }, Le = /* @__PURE__ */ new Map();
269
+ class z extends qe {
270
+ static useCached(e) {
271
+ let t = Le.get(e);
272
+ return t !== void 0 || (t = new this(e), Le.set(e, t)), t;
273
+ }
274
+ constructor(e) {
275
+ super(), e === !0 ? this.setupFromTrue() : e === void 0 ? this.setupFromUndefined() : Array.isArray(e) ? this.setupFromArray(e) : typeof e == "object" ? this.setupFromObject(e) : m(`Invalid options argument ${e}`), this.firstChunkSize === void 0 && (this.firstChunkSize = Y ? this.firstChunkSizeBrowser : this.firstChunkSizeNode), this.mergeOutput && (this.ifd1.enabled = !1), this.filterNestedSegmentTags(), this.traverseTiffDependencyTree(), this.checkLoadedPlugins();
276
+ }
277
+ setupFromUndefined() {
278
+ let e;
279
+ for (e of O) this[e] = C[e];
280
+ for (e of M) this[e] = C[e];
281
+ for (e of v) this[e] = C[e];
282
+ for (e of x) this[e] = new K(e, C[e], void 0, this);
283
+ }
284
+ setupFromTrue() {
285
+ let e;
286
+ for (e of O) this[e] = C[e];
287
+ for (e of M) this[e] = C[e];
288
+ for (e of v) this[e] = !0;
289
+ for (e of x) this[e] = new K(e, !0, void 0, this);
290
+ }
291
+ setupFromArray(e) {
292
+ let t;
293
+ for (t of O) this[t] = C[t];
294
+ for (t of M) this[t] = C[t];
295
+ for (t of v) this[t] = C[t];
296
+ for (t of x) this[t] = new K(t, !1, void 0, this);
297
+ this.setupGlobalFilters(e, void 0, d);
298
+ }
299
+ setupFromObject(e) {
300
+ let t;
301
+ for (t of (d.ifd0 = d.ifd0 || d.image, d.ifd1 = d.ifd1 || d.thumbnail, Object.assign(this, e), O)) this[t] = fe(e[t], C[t]);
302
+ for (t of M) this[t] = fe(e[t], C[t]);
303
+ for (t of v) this[t] = fe(e[t], C[t]);
304
+ for (t of V) this[t] = new K(t, C[t], e[t], this);
305
+ for (t of d) this[t] = new K(t, C[t], e[t], this.tiff);
306
+ this.setupGlobalFilters(e.pick, e.skip, d, x), e.tiff === !0 ? this.batchEnableWithBool(d, !0) : e.tiff === !1 ? this.batchEnableWithUserValue(d, e) : Array.isArray(e.tiff) ? this.setupGlobalFilters(e.tiff, void 0, d) : typeof e.tiff == "object" && this.setupGlobalFilters(e.tiff.pick, e.tiff.skip, d);
307
+ }
308
+ batchEnableWithBool(e, t) {
309
+ for (let i of e) this[i].enabled = t;
310
+ }
311
+ batchEnableWithUserValue(e, t) {
312
+ for (let i of e) {
313
+ let n = t[i];
314
+ this[i].enabled = n !== !1 && n !== void 0;
315
+ }
316
+ }
317
+ setupGlobalFilters(e, t, i, n = i) {
318
+ if (e && e.length) {
319
+ for (let a of n) this[a].enabled = !1;
320
+ let r = Ue(e, i);
321
+ for (let [a, o] of r) ie(this[a].pick, o), this[a].enabled = !0;
322
+ } else if (t && t.length) {
323
+ let r = Ue(t, i);
324
+ for (let [a, o] of r) ie(this[a].skip, o);
325
+ }
326
+ }
327
+ filterNestedSegmentTags() {
328
+ let { ifd0: e, exif: t, xmp: i, iptc: n, icc: r } = this;
329
+ this.makerNote ? t.deps.add(37500) : t.skip.add(37500), this.userComment ? t.deps.add(37510) : t.skip.add(37510), i.enabled || e.skip.add(700), n.enabled || e.skip.add(33723), r.enabled || e.skip.add(34675);
330
+ }
331
+ traverseTiffDependencyTree() {
332
+ let { ifd0: e, exif: t, gps: i, interop: n } = this;
333
+ n.needed && (t.deps.add(40965), e.deps.add(40965)), t.needed && e.deps.add(34665), i.needed && e.deps.add(34853), this.tiff.enabled = d.some(((r) => this[r].enabled === !0)) || this.makerNote || this.userComment;
334
+ for (let r of d) this[r].finalizeFilters();
335
+ }
336
+ get onlyTiff() {
337
+ return !j.map(((e) => this[e].enabled)).some(((e) => e === !0)) && this.tiff.enabled;
338
+ }
339
+ checkLoadedPlugins() {
340
+ for (let e of V) this[e].enabled && !g.has(e) && Ce("segment parser", e);
341
+ }
342
+ }
343
+ function Ue(s, e) {
344
+ let t, i, n, r, a = [];
345
+ for (n of e) {
346
+ for (r of (t = S.get(n), i = [], t)) (s.includes(r[0]) || s.includes(r[1])) && i.push(r[0]);
347
+ i.length && a.push([n, i]);
348
+ }
349
+ return a;
350
+ }
351
+ function fe(s, e) {
352
+ return s !== void 0 ? s : e !== void 0 ? e : void 0;
353
+ }
354
+ function ie(s, e) {
355
+ for (let t of e) s.add(t);
356
+ }
357
+ h(z, "default", C);
358
+ class L {
359
+ constructor(e) {
360
+ h(this, "parsers", {}), h(this, "output", {}), h(this, "errors", []), h(this, "pushToErrors", ((t) => this.errors.push(t))), this.options = z.useCached(e);
361
+ }
362
+ async read(e) {
363
+ this.file = await dt(e, this.options);
364
+ }
365
+ setup() {
366
+ if (this.fileParser) return;
367
+ let { file: e } = this, t = e.getUint16(0);
368
+ for (let [i, n] of k) if (n.canHandle(e, t)) return this.fileParser = new n(this.options, this.file, this.parsers), e[i] = !0;
369
+ this.file.close && this.file.close(), m("Unknown file format");
370
+ }
371
+ async parse() {
372
+ let { output: e, errors: t } = this;
373
+ return this.setup(), this.options.silentErrors ? (await this.executeParsers().catch(this.pushToErrors), t.push(...this.fileParser.errors)) : await this.executeParsers(), this.file.close && this.file.close(), this.options.silentErrors && t.length > 0 && (e.errors = t), te(e);
374
+ }
375
+ async executeParsers() {
376
+ let { output: e } = this;
377
+ await this.fileParser.parse();
378
+ let t = Object.values(this.parsers).map((async (i) => {
379
+ let n = await i.parse();
380
+ i.assignToOutput(e, n);
381
+ }));
382
+ this.options.silentErrors && (t = t.map(((i) => i.catch(this.pushToErrors)))), await Promise.all(t);
383
+ }
384
+ async extractThumbnail() {
385
+ this.setup();
386
+ let { options: e, file: t } = this, i = g.get("tiff", e);
387
+ var n;
388
+ if (t.tiff ? n = { start: 0, type: "tiff" } : t.jpeg && (n = await this.fileParser.getOrFindSegment("tiff")), n === void 0) return;
389
+ let r = await this.fileParser.ensureSegmentChunk(n), a = this.parsers.tiff = new i(r, e, t), o = await a.extractThumbnail();
390
+ return t.close && t.close(), o;
391
+ }
392
+ }
393
+ async function oe(s, e) {
394
+ let t = new L(e);
395
+ return await t.read(s), t.parse();
396
+ }
397
+ var gt = Object.freeze({ __proto__: null, parse: oe, Exifr: L, fileParsers: k, segmentParsers: g, fileReaders: w, tagKeys: S, tagValues: I, tagRevivers: R, createDictionary: p, extendDictionary: G, fetchUrlAsArrayBuffer: E, readBlobAsArrayBuffer: N, chunkedProps: O, otherSegments: j, segments: V, tiffBlocks: d, segmentsAndBlocks: x, tiffExtractables: v, inheritables: W, allFormatters: M, Options: z });
398
+ class le {
399
+ constructor(e, t, i) {
400
+ h(this, "errors", []), h(this, "ensureSegmentChunk", (async (n) => {
401
+ let r = n.start, a = n.size || 65536;
402
+ if (this.file.chunked) if (this.file.available(r, a)) n.chunk = this.file.subarray(r, a);
403
+ else try {
404
+ n.chunk = await this.file.readChunk(r, a);
405
+ } catch (o) {
406
+ m(`Couldn't read segment: ${JSON.stringify(n)}. ${o.message}`);
407
+ }
408
+ else this.file.byteLength > r + a ? n.chunk = this.file.subarray(r, a) : n.size === void 0 ? n.chunk = this.file.subarray(r) : m("Segment unreachable: " + JSON.stringify(n));
409
+ return n.chunk;
410
+ })), this.extendOptions && this.extendOptions(e), this.options = e, this.file = t, this.parsers = i;
411
+ }
412
+ injectSegment(e, t) {
413
+ this.options[e].enabled && this.createParser(e, t);
414
+ }
415
+ createParser(e, t) {
416
+ let i = new (g.get(e))(t, this.options, this.file);
417
+ return this.parsers[e] = i;
418
+ }
419
+ createParsers(e) {
420
+ for (let t of e) {
421
+ let { type: i, chunk: n } = t, r = this.options[i];
422
+ if (r && r.enabled) {
423
+ let a = this.parsers[i];
424
+ a && a.append || a || this.createParser(i, n);
425
+ }
426
+ }
427
+ }
428
+ async readSegments(e) {
429
+ let t = e.map(this.ensureSegmentChunk);
430
+ await Promise.all(t);
431
+ }
432
+ }
433
+ class P {
434
+ static findPosition(e, t) {
435
+ let i = e.getUint16(t + 2) + 2, n = typeof this.headerLength == "function" ? this.headerLength(e, t, i) : this.headerLength, r = t + n, a = i - n;
436
+ return { offset: t, length: i, headerLength: n, start: r, size: a, end: r + a };
437
+ }
438
+ static parse(e, t = {}) {
439
+ return new this(e, new z({ [this.type]: t }), e).parse();
440
+ }
441
+ normalizeInput(e) {
442
+ return e instanceof b ? e : new b(e);
443
+ }
444
+ constructor(e, t = {}, i) {
445
+ h(this, "errors", []), h(this, "raw", /* @__PURE__ */ new Map()), h(this, "handleError", ((n) => {
446
+ if (!this.options.silentErrors) throw n;
447
+ this.errors.push(n.message);
448
+ })), this.chunk = this.normalizeInput(e), this.file = i, this.type = this.constructor.type, this.globalOptions = this.options = t, this.localOptions = t[this.type], this.canTranslate = this.localOptions && this.localOptions.translate;
449
+ }
450
+ translate() {
451
+ this.canTranslate && (this.translated = this.translateBlock(this.raw, this.type));
452
+ }
453
+ get output() {
454
+ return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0;
455
+ }
456
+ translateBlock(e, t) {
457
+ let i = R.get(t), n = I.get(t), r = S.get(t), a = this.options[t], o = a.reviveValues && !!i, l = a.translateValues && !!n, u = a.translateKeys && !!r, f = {};
458
+ for (let [c, y] of e) o && i.has(c) ? y = i.get(c)(y) : l && n.has(c) && (y = this.translateValue(y, n.get(c))), u && r.has(c) && (c = r.get(c) || c), f[c] = y;
459
+ return f;
460
+ }
461
+ translateValue(e, t) {
462
+ return t[e] || t.DEFAULT || e;
463
+ }
464
+ assignToOutput(e, t) {
465
+ this.assignObjectToOutput(e, this.constructor.type, t);
466
+ }
467
+ assignObjectToOutput(e, t, i) {
468
+ if (this.globalOptions.mergeOutput) return Object.assign(e, i);
469
+ e[t] ? Object.assign(e[t], i) : e[t] = i;
470
+ }
471
+ }
472
+ h(P, "headerLength", 4), h(P, "type", void 0), h(P, "multiSegment", !1), h(P, "canHandle", (() => !1));
473
+ function mt(s) {
474
+ return s === 192 || s === 194 || s === 196 || s === 219 || s === 221 || s === 218 || s === 254;
475
+ }
476
+ function St(s) {
477
+ return s >= 224 && s <= 239;
478
+ }
479
+ function yt(s, e, t) {
480
+ for (let [i, n] of g) if (n.canHandle(s, e, t)) return i;
481
+ }
482
+ class Fe extends le {
483
+ constructor(...e) {
484
+ super(...e), h(this, "appSegments", []), h(this, "jpegSegments", []), h(this, "unknownSegments", []);
485
+ }
486
+ static canHandle(e, t) {
487
+ return t === 65496;
488
+ }
489
+ async parse() {
490
+ await this.findAppSegments(), await this.readSegments(this.appSegments), this.mergeMultiSegments(), this.createParsers(this.mergedAppSegments || this.appSegments);
491
+ }
492
+ setupSegmentFinderArgs(e) {
493
+ e === !0 ? (this.findAll = !0, this.wanted = new Set(g.keyList())) : (e = e === void 0 ? g.keyList().filter(((t) => this.options[t].enabled)) : e.filter(((t) => this.options[t].enabled && g.has(t))), this.findAll = !1, this.remaining = new Set(e), this.wanted = new Set(e)), this.unfinishedMultiSegment = !1;
494
+ }
495
+ async findAppSegments(e = 0, t) {
496
+ this.setupSegmentFinderArgs(t);
497
+ let { file: i, findAll: n, wanted: r, remaining: a } = this;
498
+ if (!n && this.file.chunked && (n = Array.from(r).some(((o) => {
499
+ let l = g.get(o), u = this.options[o];
500
+ return l.multiSegment && u.multiSegment;
501
+ })), n && await this.file.readWhole()), e = this.findAppSegmentsInRange(e, i.byteLength), !this.options.onlyTiff && i.chunked) {
502
+ let o = !1;
503
+ for (; a.size > 0 && !o && (i.canReadNextChunk || this.unfinishedMultiSegment); ) {
504
+ let { nextChunkOffset: l } = i, u = this.appSegments.some(((f) => !this.file.available(f.offset || f.start, f.length || f.size)));
505
+ if (o = e > l && !u ? !await i.readNextChunk(e) : !await i.readNextChunk(l), (e = this.findAppSegmentsInRange(e, i.byteLength)) === void 0) return;
506
+ }
507
+ }
508
+ }
509
+ findAppSegmentsInRange(e, t) {
510
+ t -= 2;
511
+ let i, n, r, a, o, l, { file: u, findAll: f, wanted: c, remaining: y, options: T } = this;
512
+ for (; e < t; e++) if (u.getUint8(e) === 255) {
513
+ if (i = u.getUint8(e + 1), St(i)) {
514
+ if (n = u.getUint16(e + 2), r = yt(u, e, n), r && c.has(r) && (a = g.get(r), o = a.findPosition(u, e), l = T[r], o.type = r, this.appSegments.push(o), !f && (a.multiSegment && l.multiSegment ? (this.unfinishedMultiSegment = o.chunkNumber < o.chunkCount, this.unfinishedMultiSegment || y.delete(r)) : y.delete(r), y.size === 0))) break;
515
+ T.recordUnknownSegments && (o = P.findPosition(u, e), o.marker = i, this.unknownSegments.push(o)), e += n + 1;
516
+ } else if (mt(i)) {
517
+ if (n = u.getUint16(e + 2), i === 218 && T.stopAfterSos !== !1) return;
518
+ T.recordJpegSegments && this.jpegSegments.push({ offset: e, length: n, marker: i }), e += n + 1;
519
+ }
520
+ }
521
+ return e;
522
+ }
523
+ mergeMultiSegments() {
524
+ if (!this.appSegments.some(((t) => t.multiSegment))) return;
525
+ let e = (function(t, i) {
526
+ let n, r, a, o = /* @__PURE__ */ new Map();
527
+ for (let l = 0; l < t.length; l++) n = t[l], r = n[i], o.has(r) ? a = o.get(r) : o.set(r, a = []), a.push(n);
528
+ return Array.from(o);
529
+ })(this.appSegments, "type");
530
+ this.mergedAppSegments = e.map((([t, i]) => {
531
+ let n = g.get(t, this.options);
532
+ return n.handleMultiSegments ? { type: t, chunk: n.handleMultiSegments(i) } : i[0];
533
+ }));
534
+ }
535
+ getSegment(e) {
536
+ return this.appSegments.find(((t) => t.type === e));
537
+ }
538
+ async getOrFindSegment(e) {
539
+ let t = this.getSegment(e);
540
+ return t === void 0 && (await this.findAppSegments(0, [e]), t = this.getSegment(e)), t;
541
+ }
542
+ }
543
+ h(Fe, "type", "jpeg"), k.set("jpeg", Fe);
544
+ const Ct = [void 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4];
545
+ class bt extends P {
546
+ parseHeader() {
547
+ var e = this.chunk.getUint16();
548
+ e === 18761 ? this.le = !0 : e === 19789 && (this.le = !1), this.chunk.le = this.le, this.headerParsed = !0;
549
+ }
550
+ parseTags(e, t, i = /* @__PURE__ */ new Map()) {
551
+ let { pick: n, skip: r } = this.options[t];
552
+ n = new Set(n);
553
+ let a = n.size > 0, o = r.size === 0, l = this.chunk.getUint16(e);
554
+ e += 2;
555
+ for (let u = 0; u < l; u++) {
556
+ let f = this.chunk.getUint16(e);
557
+ if (a) {
558
+ if (n.has(f) && (i.set(f, this.parseTag(e, f, t)), n.delete(f), n.size === 0)) break;
559
+ } else !o && r.has(f) || i.set(f, this.parseTag(e, f, t));
560
+ e += 12;
561
+ }
562
+ return i;
563
+ }
564
+ parseTag(e, t, i) {
565
+ let { chunk: n } = this, r = n.getUint16(e + 2), a = n.getUint32(e + 4), o = Ct[r];
566
+ if (o * a <= 4 ? e += 8 : e = n.getUint32(e + 8), (r < 1 || r > 13) && m(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${r}, offset ${e}`), e > n.byteLength && m(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${r}, offset ${e} is outside of chunk size ${n.byteLength}`), r === 1) return n.getUint8Array(e, a);
567
+ if (r === 2) return U(n.getString(e, a));
568
+ if (r === 7) return n.getUint8Array(e, a);
569
+ if (a === 1) return this.parseTagValue(r, e);
570
+ {
571
+ let l = new ((function(f) {
572
+ switch (f) {
573
+ case 1:
574
+ return Uint8Array;
575
+ case 3:
576
+ return Uint16Array;
577
+ case 4:
578
+ return Uint32Array;
579
+ case 5:
580
+ return Array;
581
+ case 6:
582
+ return Int8Array;
583
+ case 8:
584
+ return Int16Array;
585
+ case 9:
586
+ return Int32Array;
587
+ case 10:
588
+ return Array;
589
+ case 11:
590
+ return Float32Array;
591
+ case 12:
592
+ return Float64Array;
593
+ default:
594
+ return Array;
595
+ }
596
+ })(r))(a), u = o;
597
+ for (let f = 0; f < a; f++) l[f] = this.parseTagValue(r, e), e += u;
598
+ return l;
599
+ }
600
+ }
601
+ parseTagValue(e, t) {
602
+ let { chunk: i } = this;
603
+ switch (e) {
604
+ case 1:
605
+ return i.getUint8(t);
606
+ case 3:
607
+ return i.getUint16(t);
608
+ case 4:
609
+ return i.getUint32(t);
610
+ case 5:
611
+ return i.getUint32(t) / i.getUint32(t + 4);
612
+ case 6:
613
+ return i.getInt8(t);
614
+ case 8:
615
+ return i.getInt16(t);
616
+ case 9:
617
+ return i.getInt32(t);
618
+ case 10:
619
+ return i.getInt32(t) / i.getInt32(t + 4);
620
+ case 11:
621
+ return i.getFloat(t);
622
+ case 12:
623
+ return i.getDouble(t);
624
+ case 13:
625
+ return i.getUint32(t);
626
+ default:
627
+ m(`Invalid tiff type ${e}`);
628
+ }
629
+ }
630
+ }
631
+ class ce extends bt {
632
+ static canHandle(e, t) {
633
+ return e.getUint8(t + 1) === 225 && e.getUint32(t + 4) === 1165519206 && e.getUint16(t + 8) === 0;
634
+ }
635
+ async parse() {
636
+ this.parseHeader();
637
+ let { options: e } = this;
638
+ return e.ifd0.enabled && await this.parseIfd0Block(), e.exif.enabled && await this.safeParse("parseExifBlock"), e.gps.enabled && await this.safeParse("parseGpsBlock"), e.interop.enabled && await this.safeParse("parseInteropBlock"), e.ifd1.enabled && await this.safeParse("parseThumbnailBlock"), this.createOutput();
639
+ }
640
+ safeParse(e) {
641
+ let t = this[e]();
642
+ return t.catch !== void 0 && (t = t.catch(this.handleError)), t;
643
+ }
644
+ findIfd0Offset() {
645
+ this.ifd0Offset === void 0 && (this.ifd0Offset = this.chunk.getUint32(4));
646
+ }
647
+ findIfd1Offset() {
648
+ if (this.ifd1Offset === void 0) {
649
+ this.findIfd0Offset();
650
+ let e = this.chunk.getUint16(this.ifd0Offset), t = this.ifd0Offset + 2 + 12 * e;
651
+ this.ifd1Offset = this.chunk.getUint32(t);
652
+ }
653
+ }
654
+ parseBlock(e, t) {
655
+ let i = /* @__PURE__ */ new Map();
656
+ return this[t] = i, this.parseTags(e, t, i), i;
657
+ }
658
+ async parseIfd0Block() {
659
+ if (this.ifd0) return;
660
+ let { file: e } = this;
661
+ this.findIfd0Offset(), this.ifd0Offset < 8 && m("Malformed EXIF data"), !e.chunked && this.ifd0Offset > e.byteLength && m(`IFD0 offset points to outside of file.
662
+ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`), e.tiff && await e.ensureChunk(this.ifd0Offset, Se(this.options));
663
+ let t = this.parseBlock(this.ifd0Offset, "ifd0");
664
+ return t.size !== 0 ? (this.exifOffset = t.get(34665), this.interopOffset = t.get(40965), this.gpsOffset = t.get(34853), this.xmp = t.get(700), this.iptc = t.get(33723), this.icc = t.get(34675), this.options.sanitize && (t.delete(34665), t.delete(40965), t.delete(34853), t.delete(700), t.delete(33723), t.delete(34675)), t) : void 0;
665
+ }
666
+ async parseExifBlock() {
667
+ if (this.exif || (this.ifd0 || await this.parseIfd0Block(), this.exifOffset === void 0)) return;
668
+ this.file.tiff && await this.file.ensureChunk(this.exifOffset, Se(this.options));
669
+ let e = this.parseBlock(this.exifOffset, "exif");
670
+ return this.interopOffset || (this.interopOffset = e.get(40965)), this.makerNote = e.get(37500), this.userComment = e.get(37510), this.options.sanitize && (e.delete(40965), e.delete(37500), e.delete(37510)), this.unpack(e, 41728), this.unpack(e, 41729), e;
671
+ }
672
+ unpack(e, t) {
673
+ let i = e.get(t);
674
+ i && i.length === 1 && e.set(t, i[0]);
675
+ }
676
+ async parseGpsBlock() {
677
+ if (this.gps || (this.ifd0 || await this.parseIfd0Block(), this.gpsOffset === void 0)) return;
678
+ let e = this.parseBlock(this.gpsOffset, "gps");
679
+ return e && e.has(2) && e.has(4) && (e.set("latitude", Be(...e.get(2), e.get(1))), e.set("longitude", Be(...e.get(4), e.get(3)))), e;
680
+ }
681
+ async parseInteropBlock() {
682
+ if (!this.interop && (this.ifd0 || await this.parseIfd0Block(), this.interopOffset !== void 0 || this.exif || await this.parseExifBlock(), this.interopOffset !== void 0)) return this.parseBlock(this.interopOffset, "interop");
683
+ }
684
+ async parseThumbnailBlock(e = !1) {
685
+ if (!this.ifd1 && !this.ifd1Parsed && (!this.options.mergeOutput || e)) return this.findIfd1Offset(), this.ifd1Offset > 0 && (this.parseBlock(this.ifd1Offset, "ifd1"), this.ifd1Parsed = !0), this.ifd1;
686
+ }
687
+ async extractThumbnail() {
688
+ if (this.headerParsed || this.parseHeader(), this.ifd1Parsed || await this.parseThumbnailBlock(!0), this.ifd1 === void 0) return;
689
+ let e = this.ifd1.get(513), t = this.ifd1.get(514);
690
+ return this.chunk.getUint8Array(e, t);
691
+ }
692
+ get image() {
693
+ return this.ifd0;
694
+ }
695
+ get thumbnail() {
696
+ return this.ifd1;
697
+ }
698
+ createOutput() {
699
+ let e, t, i, n = {};
700
+ for (t of d) if (e = this[t], !$e(e)) if (i = this.canTranslate ? this.translateBlock(e, t) : Object.fromEntries(e), this.options.mergeOutput) {
701
+ if (t === "ifd1") continue;
702
+ Object.assign(n, i);
703
+ } else n[t] = i;
704
+ return this.makerNote && (n.makerNote = this.makerNote), this.userComment && (n.userComment = this.userComment), n;
705
+ }
706
+ assignToOutput(e, t) {
707
+ if (this.globalOptions.mergeOutput) Object.assign(e, t);
708
+ else for (let [i, n] of Object.entries(t)) this.assignObjectToOutput(e, i, n);
709
+ }
710
+ }
711
+ function Be(s, e, t, i) {
712
+ var n = s + e / 60 + t / 3600;
713
+ return i !== "S" && i !== "W" || (n *= -1), n;
714
+ }
715
+ h(ce, "type", "tiff"), h(ce, "headerLength", 10), g.set("tiff", ce);
716
+ var Pt = Object.freeze({ __proto__: null, default: gt, Exifr: L, fileParsers: k, segmentParsers: g, fileReaders: w, tagKeys: S, tagValues: I, tagRevivers: R, createDictionary: p, extendDictionary: G, fetchUrlAsArrayBuffer: E, readBlobAsArrayBuffer: N, chunkedProps: O, otherSegments: j, segments: V, tiffBlocks: d, segmentsAndBlocks: x, tiffExtractables: v, inheritables: W, allFormatters: M, Options: z, parse: oe });
717
+ const we = { ifd0: !1, ifd1: !1, exif: !1, gps: !1, interop: !1, sanitize: !1, reviveValues: !0, translateKeys: !1, translateValues: !1, mergeOutput: !1 }, Te = Object.assign({}, we, { firstChunkSize: 4e4, gps: [1, 2, 3, 4] });
718
+ async function Qe(s) {
719
+ let e = new L(Te);
720
+ await e.read(s);
721
+ let t = await e.parse();
722
+ if (t && t.gps) {
723
+ let { latitude: i, longitude: n } = t.gps;
724
+ return { latitude: i, longitude: n };
725
+ }
726
+ }
727
+ const Ae = Object.assign({}, we, { tiff: !1, ifd1: !0, mergeOutput: !1 });
728
+ async function Ze(s) {
729
+ let e = new L(Ae);
730
+ await e.read(s);
731
+ let t = await e.extractThumbnail();
732
+ return t && ae ? re.from(t) : t;
733
+ }
734
+ async function et(s) {
735
+ let e = await this.thumbnail(s);
736
+ if (e !== void 0) {
737
+ let t = new Blob([e]);
738
+ return URL.createObjectURL(t);
739
+ }
740
+ }
741
+ const De = Object.assign({}, we, { firstChunkSize: 4e4, ifd0: [274] });
742
+ async function Oe(s) {
743
+ let e = new L(De);
744
+ await e.read(s);
745
+ let t = await e.parse();
746
+ if (t && t.ifd0) return t.ifd0[274];
747
+ }
748
+ const xe = Object.freeze({ 1: { dimensionSwapped: !1, scaleX: 1, scaleY: 1, deg: 0, rad: 0 }, 2: { dimensionSwapped: !1, scaleX: -1, scaleY: 1, deg: 0, rad: 0 }, 3: { dimensionSwapped: !1, scaleX: 1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 4: { dimensionSwapped: !1, scaleX: -1, scaleY: 1, deg: 180, rad: 180 * Math.PI / 180 }, 5: { dimensionSwapped: !0, scaleX: 1, scaleY: -1, deg: 90, rad: 90 * Math.PI / 180 }, 6: { dimensionSwapped: !0, scaleX: 1, scaleY: 1, deg: 90, rad: 90 * Math.PI / 180 }, 7: { dimensionSwapped: !0, scaleX: 1, scaleY: -1, deg: 270, rad: 270 * Math.PI / 180 }, 8: { dimensionSwapped: !0, scaleX: 1, scaleY: 1, deg: 270, rad: 270 * Math.PI / 180 } });
749
+ let F = !0, B = !0;
750
+ if (typeof navigator == "object") {
751
+ let s = navigator.userAgent;
752
+ if (s.includes("iPad") || s.includes("iPhone")) {
753
+ let e = s.match(/OS (\d+)_(\d+)/);
754
+ if (e) {
755
+ let [, t, i] = e;
756
+ F = Number(t) + 0.1 * Number(i) < 13.4, B = !1;
757
+ }
758
+ } else if (s.includes("OS X 10")) {
759
+ let [, e] = s.match(/OS X 10[_.](\d+)/);
760
+ F = B = Number(e) < 15;
761
+ }
762
+ if (s.includes("Chrome/")) {
763
+ let [, e] = s.match(/Chrome\/(\d+)/);
764
+ F = B = Number(e) < 81;
765
+ } else if (s.includes("Firefox/")) {
766
+ let [, e] = s.match(/Firefox\/(\d+)/);
767
+ F = B = Number(e) < 77;
768
+ }
769
+ }
770
+ async function tt(s) {
771
+ let e = await Oe(s);
772
+ return Object.assign({ canvas: F, css: B }, xe[e]);
773
+ }
774
+ class It extends b {
775
+ constructor(...e) {
776
+ super(...e), h(this, "ranges", new kt()), this.byteLength !== 0 && this.ranges.add(0, this.byteLength);
777
+ }
778
+ _tryExtend(e, t, i) {
779
+ if (e === 0 && this.byteLength === 0 && i) {
780
+ let n = new DataView(i.buffer || i, i.byteOffset, i.byteLength);
781
+ this._swapDataView(n);
782
+ } else {
783
+ let n = e + t;
784
+ if (n > this.byteLength) {
785
+ let { dataView: r } = this._extend(n);
786
+ this._swapDataView(r);
787
+ }
788
+ }
789
+ }
790
+ _extend(e) {
791
+ let t;
792
+ t = ae ? re.allocUnsafe(e) : new Uint8Array(e);
793
+ let i = new DataView(t.buffer, t.byteOffset, t.byteLength);
794
+ return t.set(new Uint8Array(this.buffer, this.byteOffset, this.byteLength), 0), { uintView: t, dataView: i };
795
+ }
796
+ subarray(e, t, i = !1) {
797
+ return t = t || this._lengthToEnd(e), i && this._tryExtend(e, t), this.ranges.add(e, t), super.subarray(e, t);
798
+ }
799
+ set(e, t, i = !1) {
800
+ i && this._tryExtend(t, e.byteLength, e);
801
+ let n = super.set(e, t);
802
+ return this.ranges.add(t, n.byteLength), n;
803
+ }
804
+ async ensureChunk(e, t) {
805
+ this.chunked && (this.ranges.available(e, t) || await this.readChunk(e, t));
806
+ }
807
+ available(e, t) {
808
+ return this.ranges.available(e, t);
809
+ }
810
+ }
811
+ class kt {
812
+ constructor() {
813
+ h(this, "list", []);
814
+ }
815
+ get length() {
816
+ return this.list.length;
817
+ }
818
+ add(e, t, i = 0) {
819
+ let n = e + t, r = this.list.filter(((a) => Ee(e, a.offset, n) || Ee(e, a.end, n)));
820
+ if (r.length > 0) {
821
+ e = Math.min(e, ...r.map(((o) => o.offset))), n = Math.max(n, ...r.map(((o) => o.end))), t = n - e;
822
+ let a = r.shift();
823
+ a.offset = e, a.length = t, a.end = n, this.list = this.list.filter(((o) => !r.includes(o)));
824
+ } else this.list.push({ offset: e, length: t, end: n });
825
+ }
826
+ available(e, t) {
827
+ let i = e + t;
828
+ return this.list.some(((n) => n.offset <= e && i <= n.end));
829
+ }
830
+ }
831
+ function Ee(s, e, t) {
832
+ return s <= e && e <= t;
833
+ }
834
+ class he extends It {
835
+ constructor(e, t) {
836
+ super(0), h(this, "chunksRead", 0), this.input = e, this.options = t;
837
+ }
838
+ async readWhole() {
839
+ this.chunked = !1, await this.readChunk(this.nextChunkOffset);
840
+ }
841
+ async readChunked() {
842
+ this.chunked = !0, await this.readChunk(0, this.options.firstChunkSize);
843
+ }
844
+ async readNextChunk(e = this.nextChunkOffset) {
845
+ if (this.fullyRead) return this.chunksRead++, !1;
846
+ let t = this.options.chunkSize, i = await this.readChunk(e, t);
847
+ return !!i && i.byteLength === t;
848
+ }
849
+ async readChunk(e, t) {
850
+ if (this.chunksRead++, (t = this.safeWrapAddress(e, t)) !== 0) return this._readChunk(e, t);
851
+ }
852
+ safeWrapAddress(e, t) {
853
+ return this.size !== void 0 && e + t > this.size ? Math.max(0, this.size - e) : t;
854
+ }
855
+ get nextChunkOffset() {
856
+ if (this.ranges.list.length !== 0) return this.ranges.list[0].length;
857
+ }
858
+ get canReadNextChunk() {
859
+ return this.chunksRead < this.options.chunkLimit;
860
+ }
861
+ get fullyRead() {
862
+ return this.size !== void 0 && this.nextChunkOffset === this.size;
863
+ }
864
+ read() {
865
+ return this.options.chunked ? this.readChunked() : this.readWhole();
866
+ }
867
+ close() {
868
+ }
869
+ }
870
+ w.set("blob", class extends he {
871
+ async readWhole() {
872
+ this.chunked = !1;
873
+ let s = await N(this.input);
874
+ this._swapArrayBuffer(s);
875
+ }
876
+ readChunked() {
877
+ return this.chunked = !0, this.size = this.input.size, super.readChunked();
878
+ }
879
+ async _readChunk(s, e) {
880
+ let t = e ? s + e : void 0, i = this.input.slice(s, t), n = await N(i);
881
+ return this.set(n, s, !0);
882
+ }
883
+ });
884
+ var wt = Object.freeze({ __proto__: null, default: Pt, Exifr: L, fileParsers: k, segmentParsers: g, fileReaders: w, tagKeys: S, tagValues: I, tagRevivers: R, createDictionary: p, extendDictionary: G, fetchUrlAsArrayBuffer: E, readBlobAsArrayBuffer: N, chunkedProps: O, otherSegments: j, segments: V, tiffBlocks: d, segmentsAndBlocks: x, tiffExtractables: v, inheritables: W, allFormatters: M, Options: z, parse: oe, gpsOnlyOptions: Te, gps: Qe, thumbnailOnlyOptions: Ae, thumbnail: Ze, thumbnailUrl: et, orientationOnlyOptions: De, orientation: Oe, rotations: xe, get rotateCanvas() {
885
+ return F;
886
+ }, get rotateCss() {
887
+ return B;
888
+ }, rotation: tt });
889
+ w.set("url", class extends he {
890
+ async readWhole() {
891
+ this.chunked = !1;
892
+ let s = await E(this.input);
893
+ s instanceof ArrayBuffer ? this._swapArrayBuffer(s) : s instanceof Uint8Array && this._swapBuffer(s);
894
+ }
895
+ async _readChunk(s, e) {
896
+ let t = e ? s + e - 1 : void 0, i = this.options.httpHeaders || {};
897
+ (s || t) && (i.range = `bytes=${[s, t].join("-")}`);
898
+ let n = await Ie(this.input, { headers: i }), r = await n.arrayBuffer(), a = r.byteLength;
899
+ if (n.status !== 416) return a !== e && (this.size = s + a), this.set(r, s, !0);
900
+ }
901
+ });
902
+ b.prototype.getUint64 = function(s) {
903
+ let e = this.getUint32(s), t = this.getUint32(s + 4);
904
+ return e < 1048575 ? e << 32 | t : typeof $ !== void 0 ? (console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."), $(e) << $(32) | $(t)) : void m("Trying to read 64b value but JS can only handle 53b numbers.");
905
+ };
906
+ class Tt extends le {
907
+ parseBoxes(e = 0) {
908
+ let t = [];
909
+ for (; e < this.file.byteLength - 4; ) {
910
+ let i = this.parseBoxHead(e);
911
+ if (t.push(i), i.length === 0) break;
912
+ e += i.length;
913
+ }
914
+ return t;
915
+ }
916
+ parseSubBoxes(e) {
917
+ e.boxes = this.parseBoxes(e.start);
918
+ }
919
+ findBox(e, t) {
920
+ return e.boxes === void 0 && this.parseSubBoxes(e), e.boxes.find(((i) => i.kind === t));
921
+ }
922
+ parseBoxHead(e) {
923
+ let t = this.file.getUint32(e), i = this.file.getString(e + 4, 4), n = e + 8;
924
+ return t === 1 && (t = this.file.getUint64(e + 8), n += 8), { offset: e, length: t, kind: i, start: n };
925
+ }
926
+ parseBoxFullHead(e) {
927
+ if (e.version !== void 0) return;
928
+ let t = this.file.getUint32(e.start);
929
+ e.version = t >> 24, e.start += 4;
930
+ }
931
+ }
932
+ class it extends Tt {
933
+ static canHandle(e, t) {
934
+ if (t !== 0) return !1;
935
+ let i = e.getUint16(2);
936
+ if (i > 50) return !1;
937
+ let n = 16, r = [];
938
+ for (; n < i; ) r.push(e.getString(n, 4)), n += 4;
939
+ return r.includes(this.type);
940
+ }
941
+ async parse() {
942
+ let e = this.file.getUint32(0), t = this.parseBoxHead(e);
943
+ for (; t.kind !== "meta"; ) e += t.length, await this.file.ensureChunk(e, 16), t = this.parseBoxHead(e);
944
+ await this.file.ensureChunk(t.offset, t.length), this.parseBoxFullHead(t), this.parseSubBoxes(t), this.options.icc.enabled && await this.findIcc(t), this.options.tiff.enabled && await this.findExif(t);
945
+ }
946
+ async registerSegment(e, t, i) {
947
+ await this.file.ensureChunk(t, i);
948
+ let n = this.file.subarray(t, i);
949
+ this.createParser(e, n);
950
+ }
951
+ async findIcc(e) {
952
+ let t = this.findBox(e, "iprp");
953
+ if (t === void 0) return;
954
+ let i = this.findBox(t, "ipco");
955
+ if (i === void 0) return;
956
+ let n = this.findBox(i, "colr");
957
+ n !== void 0 && await this.registerSegment("icc", n.offset + 12, n.length);
958
+ }
959
+ async findExif(e) {
960
+ let t = this.findBox(e, "iinf");
961
+ if (t === void 0) return;
962
+ let i = this.findBox(e, "iloc");
963
+ if (i === void 0) return;
964
+ let n = this.findExifLocIdInIinf(t), r = this.findExtentInIloc(i, n);
965
+ if (r === void 0) return;
966
+ let [a, o] = r;
967
+ await this.file.ensureChunk(a, o);
968
+ let l = 4 + this.file.getUint32(a);
969
+ a += l, o -= l, await this.registerSegment("tiff", a, o);
970
+ }
971
+ findExifLocIdInIinf(e) {
972
+ this.parseBoxFullHead(e);
973
+ let t, i, n, r, a = e.start, o = this.file.getUint16(a);
974
+ for (a += 2; o--; ) {
975
+ if (t = this.parseBoxHead(a), this.parseBoxFullHead(t), i = t.start, t.version >= 2 && (n = t.version === 3 ? 4 : 2, r = this.file.getString(i + n + 2, 4), r === "Exif")) return this.file.getUintBytes(i, n);
976
+ a += t.length;
977
+ }
978
+ }
979
+ get8bits(e) {
980
+ let t = this.file.getUint8(e);
981
+ return [t >> 4, 15 & t];
982
+ }
983
+ findExtentInIloc(e, t) {
984
+ this.parseBoxFullHead(e);
985
+ let i = e.start, [n, r] = this.get8bits(i++), [a, o] = this.get8bits(i++), l = e.version === 2 ? 4 : 2, u = e.version === 1 || e.version === 2 ? 2 : 0, f = o + n + r, c = e.version === 2 ? 4 : 2, y = this.file.getUintBytes(i, c);
986
+ for (i += c; y--; ) {
987
+ let T = this.file.getUintBytes(i, l);
988
+ i += l + u + 2 + a;
989
+ let A = this.file.getUint16(i);
990
+ if (i += 2, T === t) return A > 1 && console.warn(`ILOC box has more than one extent but we're only processing one
991
+ Please create an issue at https://github.com/MikeKovarik/exifr with this file`), [this.file.getUintBytes(i + o, n), this.file.getUintBytes(i + o + n, r)];
992
+ i += A * f;
993
+ }
994
+ }
995
+ }
996
+ class st extends it {
997
+ }
998
+ h(st, "type", "heic");
999
+ class Ne extends it {
1000
+ }
1001
+ h(Ne, "type", "avif"), k.set("heic", st), k.set("avif", Ne), p(S, ["ifd0", "ifd1"], [[256, "ImageWidth"], [257, "ImageHeight"], [258, "BitsPerSample"], [259, "Compression"], [262, "PhotometricInterpretation"], [270, "ImageDescription"], [271, "Make"], [272, "Model"], [273, "StripOffsets"], [274, "Orientation"], [277, "SamplesPerPixel"], [278, "RowsPerStrip"], [279, "StripByteCounts"], [282, "XResolution"], [283, "YResolution"], [284, "PlanarConfiguration"], [296, "ResolutionUnit"], [301, "TransferFunction"], [305, "Software"], [306, "ModifyDate"], [315, "Artist"], [316, "HostComputer"], [317, "Predictor"], [318, "WhitePoint"], [319, "PrimaryChromaticities"], [513, "ThumbnailOffset"], [514, "ThumbnailLength"], [529, "YCbCrCoefficients"], [530, "YCbCrSubSampling"], [531, "YCbCrPositioning"], [532, "ReferenceBlackWhite"], [700, "ApplicationNotes"], [33432, "Copyright"], [33723, "IPTC"], [34665, "ExifIFD"], [34675, "ICC"], [34853, "GpsIFD"], [330, "SubIFD"], [40965, "InteropIFD"], [40091, "XPTitle"], [40092, "XPComment"], [40093, "XPAuthor"], [40094, "XPKeywords"], [40095, "XPSubject"]]), p(S, "exif", [[33434, "ExposureTime"], [33437, "FNumber"], [34850, "ExposureProgram"], [34852, "SpectralSensitivity"], [34855, "ISO"], [34858, "TimeZoneOffset"], [34859, "SelfTimerMode"], [34864, "SensitivityType"], [34865, "StandardOutputSensitivity"], [34866, "RecommendedExposureIndex"], [34867, "ISOSpeed"], [34868, "ISOSpeedLatitudeyyy"], [34869, "ISOSpeedLatitudezzz"], [36864, "ExifVersion"], [36867, "DateTimeOriginal"], [36868, "CreateDate"], [36873, "GooglePlusUploadCode"], [36880, "OffsetTime"], [36881, "OffsetTimeOriginal"], [36882, "OffsetTimeDigitized"], [37121, "ComponentsConfiguration"], [37122, "CompressedBitsPerPixel"], [37377, "ShutterSpeedValue"], [37378, "ApertureValue"], [37379, "BrightnessValue"], [37380, "ExposureCompensation"], [37381, "MaxApertureValue"], [37382, "SubjectDistance"], [37383, "MeteringMode"], [37384, "LightSource"], [37385, "Flash"], [37386, "FocalLength"], [37393, "ImageNumber"], [37394, "SecurityClassification"], [37395, "ImageHistory"], [37396, "SubjectArea"], [37500, "MakerNote"], [37510, "UserComment"], [37520, "SubSecTime"], [37521, "SubSecTimeOriginal"], [37522, "SubSecTimeDigitized"], [37888, "AmbientTemperature"], [37889, "Humidity"], [37890, "Pressure"], [37891, "WaterDepth"], [37892, "Acceleration"], [37893, "CameraElevationAngle"], [40960, "FlashpixVersion"], [40961, "ColorSpace"], [40962, "ExifImageWidth"], [40963, "ExifImageHeight"], [40964, "RelatedSoundFile"], [41483, "FlashEnergy"], [41486, "FocalPlaneXResolution"], [41487, "FocalPlaneYResolution"], [41488, "FocalPlaneResolutionUnit"], [41492, "SubjectLocation"], [41493, "ExposureIndex"], [41495, "SensingMethod"], [41728, "FileSource"], [41729, "SceneType"], [41730, "CFAPattern"], [41985, "CustomRendered"], [41986, "ExposureMode"], [41987, "WhiteBalance"], [41988, "DigitalZoomRatio"], [41989, "FocalLengthIn35mmFormat"], [41990, "SceneCaptureType"], [41991, "GainControl"], [41992, "Contrast"], [41993, "Saturation"], [41994, "Sharpness"], [41996, "SubjectDistanceRange"], [42016, "ImageUniqueID"], [42032, "OwnerName"], [42033, "SerialNumber"], [42034, "LensInfo"], [42035, "LensMake"], [42036, "LensModel"], [42037, "LensSerialNumber"], [42080, "CompositeImage"], [42081, "CompositeImageCount"], [42082, "CompositeImageExposureTimes"], [42240, "Gamma"], [59932, "Padding"], [59933, "OffsetSchema"], [65e3, "OwnerName"], [65001, "SerialNumber"], [65002, "Lens"], [65100, "RawFile"], [65101, "Converter"], [65102, "WhiteBalance"], [65105, "Exposure"], [65106, "Shadows"], [65107, "Brightness"], [65108, "Contrast"], [65109, "Saturation"], [65110, "Sharpness"], [65111, "Smoothness"], [65112, "MoireFilter"], [40965, "InteropIFD"]]), p(S, "gps", [[0, "GPSVersionID"], [1, "GPSLatitudeRef"], [2, "GPSLatitude"], [3, "GPSLongitudeRef"], [4, "GPSLongitude"], [5, "GPSAltitudeRef"], [6, "GPSAltitude"], [7, "GPSTimeStamp"], [8, "GPSSatellites"], [9, "GPSStatus"], [10, "GPSMeasureMode"], [11, "GPSDOP"], [12, "GPSSpeedRef"], [13, "GPSSpeed"], [14, "GPSTrackRef"], [15, "GPSTrack"], [16, "GPSImgDirectionRef"], [17, "GPSImgDirection"], [18, "GPSMapDatum"], [19, "GPSDestLatitudeRef"], [20, "GPSDestLatitude"], [21, "GPSDestLongitudeRef"], [22, "GPSDestLongitude"], [23, "GPSDestBearingRef"], [24, "GPSDestBearing"], [25, "GPSDestDistanceRef"], [26, "GPSDestDistance"], [27, "GPSProcessingMethod"], [28, "GPSAreaInformation"], [29, "GPSDateStamp"], [30, "GPSDifferential"], [31, "GPSHPositioningError"]]), p(I, ["ifd0", "ifd1"], [[274, { 1: "Horizontal (normal)", 2: "Mirror horizontal", 3: "Rotate 180", 4: "Mirror vertical", 5: "Mirror horizontal and rotate 270 CW", 6: "Rotate 90 CW", 7: "Mirror horizontal and rotate 90 CW", 8: "Rotate 270 CW" }], [296, { 1: "None", 2: "inches", 3: "cm" }]]);
1002
+ let _ = p(I, "exif", [[34850, { 0: "Not defined", 1: "Manual", 2: "Normal program", 3: "Aperture priority", 4: "Shutter priority", 5: "Creative program", 6: "Action program", 7: "Portrait mode", 8: "Landscape mode" }], [37121, { 0: "-", 1: "Y", 2: "Cb", 3: "Cr", 4: "R", 5: "G", 6: "B" }], [37383, { 0: "Unknown", 1: "Average", 2: "CenterWeightedAverage", 3: "Spot", 4: "MultiSpot", 5: "Pattern", 6: "Partial", 255: "Other" }], [37384, { 0: "Unknown", 1: "Daylight", 2: "Fluorescent", 3: "Tungsten (incandescent light)", 4: "Flash", 9: "Fine weather", 10: "Cloudy weather", 11: "Shade", 12: "Daylight fluorescent (D 5700 - 7100K)", 13: "Day white fluorescent (N 4600 - 5400K)", 14: "Cool white fluorescent (W 3900 - 4500K)", 15: "White fluorescent (WW 3200 - 3700K)", 17: "Standard light A", 18: "Standard light B", 19: "Standard light C", 20: "D55", 21: "D65", 22: "D75", 23: "D50", 24: "ISO studio tungsten", 255: "Other" }], [37385, { 0: "Flash did not fire", 1: "Flash fired", 5: "Strobe return light not detected", 7: "Strobe return light detected", 9: "Flash fired, compulsory flash mode", 13: "Flash fired, compulsory flash mode, return light not detected", 15: "Flash fired, compulsory flash mode, return light detected", 16: "Flash did not fire, compulsory flash mode", 24: "Flash did not fire, auto mode", 25: "Flash fired, auto mode", 29: "Flash fired, auto mode, return light not detected", 31: "Flash fired, auto mode, return light detected", 32: "No flash function", 65: "Flash fired, red-eye reduction mode", 69: "Flash fired, red-eye reduction mode, return light not detected", 71: "Flash fired, red-eye reduction mode, return light detected", 73: "Flash fired, compulsory flash mode, red-eye reduction mode", 77: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", 79: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", 89: "Flash fired, auto mode, red-eye reduction mode", 93: "Flash fired, auto mode, return light not detected, red-eye reduction mode", 95: "Flash fired, auto mode, return light detected, red-eye reduction mode" }], [41495, { 1: "Not defined", 2: "One-chip color area sensor", 3: "Two-chip color area sensor", 4: "Three-chip color area sensor", 5: "Color sequential area sensor", 7: "Trilinear sensor", 8: "Color sequential linear sensor" }], [41728, { 1: "Film Scanner", 2: "Reflection Print Scanner", 3: "Digital Camera" }], [41729, { 1: "Directly photographed" }], [41985, { 0: "Normal", 1: "Custom", 2: "HDR (no original saved)", 3: "HDR (original saved)", 4: "Original (for HDR)", 6: "Panorama", 7: "Portrait HDR", 8: "Portrait" }], [41986, { 0: "Auto", 1: "Manual", 2: "Auto bracket" }], [41987, { 0: "Auto", 1: "Manual" }], [41990, { 0: "Standard", 1: "Landscape", 2: "Portrait", 3: "Night", 4: "Other" }], [41991, { 0: "None", 1: "Low gain up", 2: "High gain up", 3: "Low gain down", 4: "High gain down" }], [41996, { 0: "Unknown", 1: "Macro", 2: "Close", 3: "Distant" }], [42080, { 0: "Unknown", 1: "Not a Composite Image", 2: "General Composite Image", 3: "Composite Image Captured While Shooting" }]]);
1003
+ const Ge = { 1: "No absolute unit of measurement", 2: "Inch", 3: "Centimeter" };
1004
+ _.set(37392, Ge), _.set(41488, Ge);
1005
+ const de = { 0: "Normal", 1: "Low", 2: "High" };
1006
+ function Ve(s) {
1007
+ return typeof s == "object" && s.length !== void 0 ? s[0] : s;
1008
+ }
1009
+ function ze(s) {
1010
+ let e = Array.from(s).slice(1);
1011
+ return e[1] > 15 && (e = e.map(((t) => String.fromCharCode(t)))), e[2] !== "0" && e[2] !== 0 || e.pop(), e.join(".");
1012
+ }
1013
+ function pe(s) {
1014
+ if (typeof s == "string") {
1015
+ var [e, t, i, n, r, a] = s.trim().split(/[-: ]/g).map(Number), o = new Date(e, t - 1, i);
1016
+ return Number.isNaN(n) || Number.isNaN(r) || Number.isNaN(a) || (o.setHours(n), o.setMinutes(r), o.setSeconds(a)), Number.isNaN(+o) ? s : o;
1017
+ }
1018
+ }
1019
+ function X(s) {
1020
+ if (typeof s == "string") return s;
1021
+ let e = [];
1022
+ if (s[1] === 0 && s[s.length - 1] === 0) for (let t = 0; t < s.length; t += 2) e.push(He(s[t + 1], s[t]));
1023
+ else for (let t = 0; t < s.length; t += 2) e.push(He(s[t], s[t + 1]));
1024
+ return U(String.fromCodePoint(...e));
1025
+ }
1026
+ function He(s, e) {
1027
+ return s << 8 | e;
1028
+ }
1029
+ _.set(41992, de), _.set(41993, de), _.set(41994, de), p(R, ["ifd0", "ifd1"], [[50827, function(s) {
1030
+ return typeof s != "string" ? Je(s) : s;
1031
+ }], [306, pe], [40091, X], [40092, X], [40093, X], [40094, X], [40095, X]]), p(R, "exif", [[40960, ze], [36864, ze], [36867, pe], [36868, pe], [40962, Ve], [40963, Ve]]), p(R, "gps", [[0, (s) => Array.from(s).join(".")], [7, (s) => Array.from(s).join(":")]]);
1032
+ class ge extends P {
1033
+ static canHandle(e, t) {
1034
+ return e.getUint8(t + 1) === 225 && e.getUint32(t + 4) === 1752462448 && e.getString(t + 4, 20) === "http://ns.adobe.com/";
1035
+ }
1036
+ static headerLength(e, t) {
1037
+ return e.getString(t + 4, 34) === "http://ns.adobe.com/xmp/extension/" ? 79 : 33;
1038
+ }
1039
+ static findPosition(e, t) {
1040
+ let i = super.findPosition(e, t);
1041
+ return i.multiSegment = i.extended = i.headerLength === 79, i.multiSegment ? (i.chunkCount = e.getUint8(t + 72), i.chunkNumber = e.getUint8(t + 76), e.getUint8(t + 77) !== 0 && i.chunkNumber++) : (i.chunkCount = 1 / 0, i.chunkNumber = -1), i;
1042
+ }
1043
+ static handleMultiSegments(e) {
1044
+ return e.map(((t) => t.chunk.getString())).join("");
1045
+ }
1046
+ normalizeInput(e) {
1047
+ return typeof e == "string" ? e : b.from(e).getString();
1048
+ }
1049
+ parse(e = this.chunk) {
1050
+ if (!this.localOptions.parse) return e;
1051
+ e = (function(r) {
1052
+ let a = {}, o = {};
1053
+ for (let l of ot) a[l] = [], o[l] = 0;
1054
+ return r.replace(xt, ((l, u, f) => {
1055
+ if (u === "<") {
1056
+ let c = ++o[f];
1057
+ return a[f].push(c), `${l}#${c}`;
1058
+ }
1059
+ return `${l}#${a[f].pop()}`;
1060
+ }));
1061
+ })(e);
1062
+ let t = H.findAll(e, "rdf", "Description");
1063
+ t.length === 0 && t.push(new H("rdf", "Description", void 0, e));
1064
+ let i, n = {};
1065
+ for (let r of t) for (let a of r.properties) i = Ot(a.ns, n), nt(a, i);
1066
+ return (function(r) {
1067
+ let a;
1068
+ for (let o in r) a = r[o] = te(r[o]), a === void 0 && delete r[o];
1069
+ return te(r);
1070
+ })(n);
1071
+ }
1072
+ assignToOutput(e, t) {
1073
+ if (this.localOptions.parse) for (let [i, n] of Object.entries(t)) switch (i) {
1074
+ case "tiff":
1075
+ this.assignObjectToOutput(e, "ifd0", n);
1076
+ break;
1077
+ case "exif":
1078
+ this.assignObjectToOutput(e, "exif", n);
1079
+ break;
1080
+ case "xmlns":
1081
+ break;
1082
+ default:
1083
+ this.assignObjectToOutput(e, i, n);
1084
+ }
1085
+ else e.xmp = t;
1086
+ }
1087
+ }
1088
+ h(ge, "type", "xmp"), h(ge, "multiSegment", !0), g.set("xmp", ge);
1089
+ class se {
1090
+ static findAll(e) {
1091
+ return rt(e, /([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(se.unpackMatch);
1092
+ }
1093
+ static unpackMatch(e) {
1094
+ let t = e[1], i = e[2], n = e[3].slice(1, -1);
1095
+ return n = at(n), new se(t, i, n);
1096
+ }
1097
+ constructor(e, t, i) {
1098
+ this.ns = e, this.name = t, this.value = i;
1099
+ }
1100
+ serialize() {
1101
+ return this.value;
1102
+ }
1103
+ }
1104
+ class H {
1105
+ static findAll(e, t, i) {
1106
+ if (t !== void 0 || i !== void 0) {
1107
+ t = t || "[\\w\\d-]+", i = i || "[\\w\\d-]+";
1108
+ var n = new RegExp(`<(${t}):(${i})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`, "gm");
1109
+ } else n = /<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;
1110
+ return rt(e, n).map(H.unpackMatch);
1111
+ }
1112
+ static unpackMatch(e) {
1113
+ let t = e[1], i = e[2], n = e[4], r = e[8];
1114
+ return new H(t, i, n, r);
1115
+ }
1116
+ constructor(e, t, i, n) {
1117
+ this.ns = e, this.name = t, this.attrString = i, this.innerXml = n, this.attrs = se.findAll(i), this.children = H.findAll(n), this.value = this.children.length === 0 ? at(n) : void 0, this.properties = [...this.attrs, ...this.children];
1118
+ }
1119
+ get isPrimitive() {
1120
+ return this.value !== void 0 && this.attrs.length === 0 && this.children.length === 0;
1121
+ }
1122
+ get isListContainer() {
1123
+ return this.children.length === 1 && this.children[0].isList;
1124
+ }
1125
+ get isList() {
1126
+ let { ns: e, name: t } = this;
1127
+ return e === "rdf" && (t === "Seq" || t === "Bag" || t === "Alt");
1128
+ }
1129
+ get isListItem() {
1130
+ return this.ns === "rdf" && this.name === "li";
1131
+ }
1132
+ serialize() {
1133
+ if (this.properties.length === 0 && this.value === void 0) return;
1134
+ if (this.isPrimitive) return this.value;
1135
+ if (this.isListContainer) return this.children[0].serialize();
1136
+ if (this.isList) return Dt(this.children.map(At));
1137
+ if (this.isListItem && this.children.length === 1 && this.attrs.length === 0) return this.children[0].serialize();
1138
+ let e = {};
1139
+ for (let t of this.properties) nt(t, e);
1140
+ return this.value !== void 0 && (e.value = this.value), te(e);
1141
+ }
1142
+ }
1143
+ function nt(s, e) {
1144
+ let t = s.serialize();
1145
+ t !== void 0 && (e[s.name] = t);
1146
+ }
1147
+ var At = (s) => s.serialize(), Dt = (s) => s.length === 1 ? s[0] : s, Ot = (s, e) => e[s] ? e[s] : e[s] = {};
1148
+ function rt(s, e) {
1149
+ let t, i = [];
1150
+ if (!s) return i;
1151
+ for (; (t = e.exec(s)) !== null; ) i.push(t);
1152
+ return i;
1153
+ }
1154
+ function at(s) {
1155
+ if ((function(i) {
1156
+ return i == null || i === "null" || i === "undefined" || i === "" || i.trim() === "";
1157
+ })(s)) return;
1158
+ let e = Number(s);
1159
+ if (!Number.isNaN(e)) return e;
1160
+ let t = s.toLowerCase();
1161
+ return t === "true" || t !== "false" && s.trim();
1162
+ }
1163
+ const ot = ["rdf:li", "rdf:Seq", "rdf:Bag", "rdf:Alt", "rdf:Description"], xt = new RegExp(`(<|\\/)(${ot.join("|")})`, "g");
1164
+ var Lt = Object.freeze({ __proto__: null, default: wt, Exifr: L, fileParsers: k, segmentParsers: g, fileReaders: w, tagKeys: S, tagValues: I, tagRevivers: R, createDictionary: p, extendDictionary: G, fetchUrlAsArrayBuffer: E, readBlobAsArrayBuffer: N, chunkedProps: O, otherSegments: j, segments: V, tiffBlocks: d, segmentsAndBlocks: x, tiffExtractables: v, inheritables: W, allFormatters: M, Options: z, parse: oe, gpsOnlyOptions: Te, gps: Qe, thumbnailOnlyOptions: Ae, thumbnail: Ze, thumbnailUrl: et, orientationOnlyOptions: De, orientation: Oe, rotations: xe, get rotateCanvas() {
1165
+ return F;
1166
+ }, get rotateCss() {
1167
+ return B;
1168
+ }, rotation: tt });
1169
+ let je = ee("fs", ((s) => s.promises));
1170
+ w.set("fs", class extends he {
1171
+ async readWhole() {
1172
+ this.chunked = !1, this.fs = await je;
1173
+ let s = await this.fs.readFile(this.input);
1174
+ this._swapBuffer(s);
1175
+ }
1176
+ async readChunked() {
1177
+ this.chunked = !0, this.fs = await je, await this.open(), await this.readChunk(0, this.options.firstChunkSize);
1178
+ }
1179
+ async open() {
1180
+ this.fh === void 0 && (this.fh = await this.fs.open(this.input, "r"), this.size = (await this.fh.stat(this.input)).size);
1181
+ }
1182
+ async _readChunk(s, e) {
1183
+ this.fh === void 0 && await this.open(), s + e > this.size && (e = this.size - s);
1184
+ var t = this.subarray(s, e, !0);
1185
+ return await this.fh.read(t.dataView, 0, e, s), t;
1186
+ }
1187
+ async close() {
1188
+ if (this.fh) {
1189
+ let s = this.fh;
1190
+ this.fh = void 0, await s.close();
1191
+ }
1192
+ }
1193
+ });
1194
+ w.set("base64", class extends he {
1195
+ constructor(...s) {
1196
+ super(...s), this.input = this.input.replace(/^data:([^;]+);base64,/gim, ""), this.size = this.input.length / 4 * 3, this.input.endsWith("==") ? this.size -= 2 : this.input.endsWith("=") && (this.size -= 1);
1197
+ }
1198
+ async _readChunk(s, e) {
1199
+ let t, i, n = this.input;
1200
+ s === void 0 ? (s = 0, t = 0, i = 0) : (t = 4 * Math.floor(s / 3), i = s - t / 4 * 3), e === void 0 && (e = this.size);
1201
+ let r = s + e, a = t + 4 * Math.ceil(r / 3);
1202
+ n = n.slice(t, a);
1203
+ let o = Math.min(e, this.size - s);
1204
+ if (ae) {
1205
+ let l = re.from(n, "base64").slice(i, i + o);
1206
+ return this.set(l, s, !0);
1207
+ }
1208
+ {
1209
+ let l = this.subarray(s, o, !0), u = atob(n), f = l.toUint8();
1210
+ for (let c = 0; c < o; c++) f[c] = u.charCodeAt(i + c);
1211
+ return l;
1212
+ }
1213
+ }
1214
+ });
1215
+ class We extends le {
1216
+ static canHandle(e, t) {
1217
+ return t === 18761 || t === 19789;
1218
+ }
1219
+ extendOptions(e) {
1220
+ let { ifd0: t, xmp: i, iptc: n, icc: r } = e;
1221
+ i.enabled && t.deps.add(700), n.enabled && t.deps.add(33723), r.enabled && t.deps.add(34675), t.finalizeFilters();
1222
+ }
1223
+ async parse() {
1224
+ let { tiff: e, xmp: t, iptc: i, icc: n } = this.options;
1225
+ if (e.enabled || t.enabled || i.enabled || n.enabled) {
1226
+ let r = Math.max(Se(this.options), this.options.chunkSize);
1227
+ await this.file.ensureChunk(0, r), this.createParser("tiff", this.file), this.parsers.tiff.parseHeader(), await this.parsers.tiff.parseIfd0Block(), this.adaptTiffPropAsSegment("xmp"), this.adaptTiffPropAsSegment("iptc"), this.adaptTiffPropAsSegment("icc");
1228
+ }
1229
+ }
1230
+ adaptTiffPropAsSegment(e) {
1231
+ if (this.parsers.tiff[e]) {
1232
+ let t = this.parsers.tiff[e];
1233
+ this.injectSegment(e, t);
1234
+ }
1235
+ }
1236
+ }
1237
+ h(We, "type", "tiff"), k.set("tiff", We);
1238
+ let vt = ee("zlib");
1239
+ const Mt = ["ihdr", "iccp", "text", "itxt", "exif"];
1240
+ class Ke extends le {
1241
+ constructor(...e) {
1242
+ super(...e), h(this, "catchError", ((t) => this.errors.push(t))), h(this, "metaChunks", []), h(this, "unknownChunks", []);
1243
+ }
1244
+ static canHandle(e, t) {
1245
+ return t === 35152 && e.getUint32(0) === 2303741511 && e.getUint32(4) === 218765834;
1246
+ }
1247
+ async parse() {
1248
+ let { file: e } = this;
1249
+ await this.findPngChunksInRange(8, e.byteLength), await this.readSegments(this.metaChunks), this.findIhdr(), this.parseTextChunks(), await this.findExif().catch(this.catchError), await this.findXmp().catch(this.catchError), await this.findIcc().catch(this.catchError);
1250
+ }
1251
+ async findPngChunksInRange(e, t) {
1252
+ let { file: i } = this;
1253
+ for (; e < t; ) {
1254
+ let n = i.getUint32(e), r = i.getUint32(e + 4), a = i.getString(e + 4, 4).toLowerCase(), o = n + 4 + 4 + 4, l = { type: a, offset: e, length: o, start: e + 4 + 4, size: n, marker: r };
1255
+ Mt.includes(a) ? this.metaChunks.push(l) : this.unknownChunks.push(l), e += o;
1256
+ }
1257
+ }
1258
+ parseTextChunks() {
1259
+ let e = this.metaChunks.filter(((t) => t.type === "text"));
1260
+ for (let t of e) {
1261
+ let [i, n] = this.file.getString(t.start, t.size).split("\0");
1262
+ this.injectKeyValToIhdr(i, n);
1263
+ }
1264
+ }
1265
+ injectKeyValToIhdr(e, t) {
1266
+ let i = this.parsers.ihdr;
1267
+ i && i.raw.set(e, t);
1268
+ }
1269
+ findIhdr() {
1270
+ let e = this.metaChunks.find(((t) => t.type === "ihdr"));
1271
+ e && this.options.ihdr.enabled !== !1 && this.createParser("ihdr", e.chunk);
1272
+ }
1273
+ async findExif() {
1274
+ let e = this.metaChunks.find(((t) => t.type === "exif"));
1275
+ e && this.injectSegment("tiff", e.chunk);
1276
+ }
1277
+ async findXmp() {
1278
+ let e = this.metaChunks.filter(((t) => t.type === "itxt"));
1279
+ for (let t of e)
1280
+ t.chunk.getString(0, 17) === "XML:com.adobe.xmp" && this.injectSegment("xmp", t.chunk);
1281
+ }
1282
+ async findIcc() {
1283
+ let e = this.metaChunks.find(((o) => o.type === "iccp"));
1284
+ if (!e) return;
1285
+ let { chunk: t } = e, i = t.getUint8Array(0, 81), n = 0;
1286
+ for (; n < 80 && i[n] !== 0; ) n++;
1287
+ let r = n + 2, a = t.getString(0, n);
1288
+ if (this.injectKeyValToIhdr("ProfileName", a), Z) {
1289
+ let o = await vt, l = t.getUint8Array(r);
1290
+ l = o.inflateSync(l), this.injectSegment("icc", l);
1291
+ }
1292
+ }
1293
+ }
1294
+ h(Ke, "type", "png"), k.set("png", Ke), p(S, "interop", [[1, "InteropIndex"], [2, "InteropVersion"], [4096, "RelatedImageFileFormat"], [4097, "RelatedImageWidth"], [4098, "RelatedImageHeight"]]), G(S, "ifd0", [[11, "ProcessingSoftware"], [254, "SubfileType"], [255, "OldSubfileType"], [263, "Thresholding"], [264, "CellWidth"], [265, "CellLength"], [266, "FillOrder"], [269, "DocumentName"], [280, "MinSampleValue"], [281, "MaxSampleValue"], [285, "PageName"], [286, "XPosition"], [287, "YPosition"], [290, "GrayResponseUnit"], [297, "PageNumber"], [321, "HalftoneHints"], [322, "TileWidth"], [323, "TileLength"], [332, "InkSet"], [337, "TargetPrinter"], [18246, "Rating"], [18249, "RatingPercent"], [33550, "PixelScale"], [34264, "ModelTransform"], [34377, "PhotoshopSettings"], [50706, "DNGVersion"], [50707, "DNGBackwardVersion"], [50708, "UniqueCameraModel"], [50709, "LocalizedCameraModel"], [50736, "DNGLensInfo"], [50739, "ShadowScale"], [50740, "DNGPrivateData"], [33920, "IntergraphMatrix"], [33922, "ModelTiePoint"], [34118, "SEMInfo"], [34735, "GeoTiffDirectory"], [34736, "GeoTiffDoubleParams"], [34737, "GeoTiffAsciiParams"], [50341, "PrintIM"], [50721, "ColorMatrix1"], [50722, "ColorMatrix2"], [50723, "CameraCalibration1"], [50724, "CameraCalibration2"], [50725, "ReductionMatrix1"], [50726, "ReductionMatrix2"], [50727, "AnalogBalance"], [50728, "AsShotNeutral"], [50729, "AsShotWhiteXY"], [50730, "BaselineExposure"], [50731, "BaselineNoise"], [50732, "BaselineSharpness"], [50734, "LinearResponseLimit"], [50735, "CameraSerialNumber"], [50741, "MakerNoteSafety"], [50778, "CalibrationIlluminant1"], [50779, "CalibrationIlluminant2"], [50781, "RawDataUniqueID"], [50827, "OriginalRawFileName"], [50828, "OriginalRawFileData"], [50831, "AsShotICCProfile"], [50832, "AsShotPreProfileMatrix"], [50833, "CurrentICCProfile"], [50834, "CurrentPreProfileMatrix"], [50879, "ColorimetricReference"], [50885, "SRawType"], [50898, "PanasonicTitle"], [50899, "PanasonicTitle2"], [50931, "CameraCalibrationSig"], [50932, "ProfileCalibrationSig"], [50933, "ProfileIFD"], [50934, "AsShotProfileName"], [50936, "ProfileName"], [50937, "ProfileHueSatMapDims"], [50938, "ProfileHueSatMapData1"], [50939, "ProfileHueSatMapData2"], [50940, "ProfileToneCurve"], [50941, "ProfileEmbedPolicy"], [50942, "ProfileCopyright"], [50964, "ForwardMatrix1"], [50965, "ForwardMatrix2"], [50966, "PreviewApplicationName"], [50967, "PreviewApplicationVersion"], [50968, "PreviewSettingsName"], [50969, "PreviewSettingsDigest"], [50970, "PreviewColorSpace"], [50971, "PreviewDateTime"], [50972, "RawImageDigest"], [50973, "OriginalRawFileDigest"], [50981, "ProfileLookTableDims"], [50982, "ProfileLookTableData"], [51043, "TimeCodes"], [51044, "FrameRate"], [51058, "TStop"], [51081, "ReelName"], [51089, "OriginalDefaultFinalSize"], [51090, "OriginalBestQualitySize"], [51091, "OriginalDefaultCropSize"], [51105, "CameraLabel"], [51107, "ProfileHueSatMapEncoding"], [51108, "ProfileLookTableEncoding"], [51109, "BaselineExposureOffset"], [51110, "DefaultBlackRender"], [51111, "NewRawImageDigest"], [51112, "RawToPreviewGain"]]);
1295
+ let Xe = [[273, "StripOffsets"], [279, "StripByteCounts"], [288, "FreeOffsets"], [289, "FreeByteCounts"], [291, "GrayResponseCurve"], [292, "T4Options"], [293, "T6Options"], [300, "ColorResponseUnit"], [320, "ColorMap"], [324, "TileOffsets"], [325, "TileByteCounts"], [326, "BadFaxLines"], [327, "CleanFaxData"], [328, "ConsecutiveBadFaxLines"], [330, "SubIFD"], [333, "InkNames"], [334, "NumberofInks"], [336, "DotRange"], [338, "ExtraSamples"], [339, "SampleFormat"], [340, "SMinSampleValue"], [341, "SMaxSampleValue"], [342, "TransferRange"], [343, "ClipPath"], [344, "XClipPathUnits"], [345, "YClipPathUnits"], [346, "Indexed"], [347, "JPEGTables"], [351, "OPIProxy"], [400, "GlobalParametersIFD"], [401, "ProfileType"], [402, "FaxProfile"], [403, "CodingMethods"], [404, "VersionYear"], [405, "ModeNumber"], [433, "Decode"], [434, "DefaultImageColor"], [435, "T82Options"], [437, "JPEGTables"], [512, "JPEGProc"], [515, "JPEGRestartInterval"], [517, "JPEGLosslessPredictors"], [518, "JPEGPointTransforms"], [519, "JPEGQTables"], [520, "JPEGDCTables"], [521, "JPEGACTables"], [559, "StripRowCounts"], [999, "USPTOMiscellaneous"], [18247, "XP_DIP_XML"], [18248, "StitchInfo"], [28672, "SonyRawFileType"], [28688, "SonyToneCurve"], [28721, "VignettingCorrection"], [28722, "VignettingCorrParams"], [28724, "ChromaticAberrationCorrection"], [28725, "ChromaticAberrationCorrParams"], [28726, "DistortionCorrection"], [28727, "DistortionCorrParams"], [29895, "SonyCropTopLeft"], [29896, "SonyCropSize"], [32781, "ImageID"], [32931, "WangTag1"], [32932, "WangAnnotation"], [32933, "WangTag3"], [32934, "WangTag4"], [32953, "ImageReferencePoints"], [32954, "RegionXformTackPoint"], [32955, "WarpQuadrilateral"], [32956, "AffineTransformMat"], [32995, "Matteing"], [32996, "DataType"], [32997, "ImageDepth"], [32998, "TileDepth"], [33300, "ImageFullWidth"], [33301, "ImageFullHeight"], [33302, "TextureFormat"], [33303, "WrapModes"], [33304, "FovCot"], [33305, "MatrixWorldToScreen"], [33306, "MatrixWorldToCamera"], [33405, "Model2"], [33421, "CFARepeatPatternDim"], [33422, "CFAPattern2"], [33423, "BatteryLevel"], [33424, "KodakIFD"], [33445, "MDFileTag"], [33446, "MDScalePixel"], [33447, "MDColorTable"], [33448, "MDLabName"], [33449, "MDSampleInfo"], [33450, "MDPrepDate"], [33451, "MDPrepTime"], [33452, "MDFileUnits"], [33589, "AdventScale"], [33590, "AdventRevision"], [33628, "UIC1Tag"], [33629, "UIC2Tag"], [33630, "UIC3Tag"], [33631, "UIC4Tag"], [33918, "IntergraphPacketData"], [33919, "IntergraphFlagRegisters"], [33921, "INGRReserved"], [34016, "Site"], [34017, "ColorSequence"], [34018, "IT8Header"], [34019, "RasterPadding"], [34020, "BitsPerRunLength"], [34021, "BitsPerExtendedRunLength"], [34022, "ColorTable"], [34023, "ImageColorIndicator"], [34024, "BackgroundColorIndicator"], [34025, "ImageColorValue"], [34026, "BackgroundColorValue"], [34027, "PixelIntensityRange"], [34028, "TransparencyIndicator"], [34029, "ColorCharacterization"], [34030, "HCUsage"], [34031, "TrapIndicator"], [34032, "CMYKEquivalent"], [34152, "AFCP_IPTC"], [34232, "PixelMagicJBIGOptions"], [34263, "JPLCartoIFD"], [34306, "WB_GRGBLevels"], [34310, "LeafData"], [34687, "TIFF_FXExtensions"], [34688, "MultiProfiles"], [34689, "SharedData"], [34690, "T88Options"], [34732, "ImageLayer"], [34750, "JBIGOptions"], [34856, "Opto-ElectricConvFactor"], [34857, "Interlace"], [34908, "FaxRecvParams"], [34909, "FaxSubAddress"], [34910, "FaxRecvTime"], [34929, "FedexEDR"], [34954, "LeafSubIFD"], [37387, "FlashEnergy"], [37388, "SpatialFrequencyResponse"], [37389, "Noise"], [37390, "FocalPlaneXResolution"], [37391, "FocalPlaneYResolution"], [37392, "FocalPlaneResolutionUnit"], [37397, "ExposureIndex"], [37398, "TIFF-EPStandardID"], [37399, "SensingMethod"], [37434, "CIP3DataFile"], [37435, "CIP3Sheet"], [37436, "CIP3Side"], [37439, "StoNits"], [37679, "MSDocumentText"], [37680, "MSPropertySetStorage"], [37681, "MSDocumentTextPosition"], [37724, "ImageSourceData"], [40965, "InteropIFD"], [40976, "SamsungRawPointersOffset"], [40977, "SamsungRawPointersLength"], [41217, "SamsungRawByteOrder"], [41218, "SamsungRawUnknown"], [41484, "SpatialFrequencyResponse"], [41485, "Noise"], [41489, "ImageNumber"], [41490, "SecurityClassification"], [41491, "ImageHistory"], [41494, "TIFF-EPStandardID"], [41995, "DeviceSettingDescription"], [42112, "GDALMetadata"], [42113, "GDALNoData"], [44992, "ExpandSoftware"], [44993, "ExpandLens"], [44994, "ExpandFilm"], [44995, "ExpandFilterLens"], [44996, "ExpandScanner"], [44997, "ExpandFlashLamp"], [46275, "HasselbladRawImage"], [48129, "PixelFormat"], [48130, "Transformation"], [48131, "Uncompressed"], [48132, "ImageType"], [48256, "ImageWidth"], [48257, "ImageHeight"], [48258, "WidthResolution"], [48259, "HeightResolution"], [48320, "ImageOffset"], [48321, "ImageByteCount"], [48322, "AlphaOffset"], [48323, "AlphaByteCount"], [48324, "ImageDataDiscard"], [48325, "AlphaDataDiscard"], [50215, "OceScanjobDesc"], [50216, "OceApplicationSelector"], [50217, "OceIDNumber"], [50218, "OceImageLogic"], [50255, "Annotations"], [50459, "HasselbladExif"], [50547, "OriginalFileName"], [50560, "USPTOOriginalContentType"], [50656, "CR2CFAPattern"], [50710, "CFAPlaneColor"], [50711, "CFALayout"], [50712, "LinearizationTable"], [50713, "BlackLevelRepeatDim"], [50714, "BlackLevel"], [50715, "BlackLevelDeltaH"], [50716, "BlackLevelDeltaV"], [50717, "WhiteLevel"], [50718, "DefaultScale"], [50719, "DefaultCropOrigin"], [50720, "DefaultCropSize"], [50733, "BayerGreenSplit"], [50737, "ChromaBlurRadius"], [50738, "AntiAliasStrength"], [50752, "RawImageSegmentation"], [50780, "BestQualityScale"], [50784, "AliasLayerMetadata"], [50829, "ActiveArea"], [50830, "MaskedAreas"], [50935, "NoiseReductionApplied"], [50974, "SubTileBlockSize"], [50975, "RowInterleaveFactor"], [51008, "OpcodeList1"], [51009, "OpcodeList2"], [51022, "OpcodeList3"], [51041, "NoiseProfile"], [51114, "CacheVersion"], [51125, "DefaultUserCrop"], [51157, "NikonNEFInfo"], [65024, "KdcIFD"]];
1296
+ G(S, "ifd0", Xe), G(S, "exif", Xe), p(I, "gps", [[23, { M: "Magnetic North", T: "True North" }], [25, { K: "Kilometers", M: "Miles", N: "Nautical Miles" }]]);
1297
+ class me extends P {
1298
+ static canHandle(e, t) {
1299
+ return e.getUint8(t + 1) === 224 && e.getUint32(t + 4) === 1246120262 && e.getUint8(t + 8) === 0;
1300
+ }
1301
+ parse() {
1302
+ return this.parseTags(), this.translate(), this.output;
1303
+ }
1304
+ parseTags() {
1305
+ this.raw = /* @__PURE__ */ new Map([[0, this.chunk.getUint16(0)], [2, this.chunk.getUint8(2)], [3, this.chunk.getUint16(3)], [5, this.chunk.getUint16(5)], [7, this.chunk.getUint8(7)], [8, this.chunk.getUint8(8)]]);
1306
+ }
1307
+ }
1308
+ h(me, "type", "jfif"), h(me, "headerLength", 9), g.set("jfif", me), p(S, "jfif", [[0, "JFIFVersion"], [2, "ResolutionUnit"], [3, "XResolution"], [5, "YResolution"], [7, "ThumbnailWidth"], [8, "ThumbnailHeight"]]);
1309
+ class _e extends P {
1310
+ parse() {
1311
+ return this.parseTags(), this.translate(), this.output;
1312
+ }
1313
+ parseTags() {
1314
+ this.raw = new Map([[0, this.chunk.getUint32(0)], [4, this.chunk.getUint32(4)], [8, this.chunk.getUint8(8)], [9, this.chunk.getUint8(9)], [10, this.chunk.getUint8(10)], [11, this.chunk.getUint8(11)], [12, this.chunk.getUint8(12)], ...Array.from(this.raw)]);
1315
+ }
1316
+ }
1317
+ h(_e, "type", "ihdr"), g.set("ihdr", _e), p(S, "ihdr", [[0, "ImageWidth"], [4, "ImageHeight"], [8, "BitDepth"], [9, "ColorType"], [10, "Compression"], [11, "Filter"], [12, "Interlace"]]), p(I, "ihdr", [[9, { 0: "Grayscale", 2: "RGB", 3: "Palette", 4: "Grayscale with Alpha", 6: "RGB with Alpha", DEFAULT: "Unknown" }], [10, { 0: "Deflate/Inflate", DEFAULT: "Unknown" }], [11, { 0: "Adaptive", DEFAULT: "Unknown" }], [12, { 0: "Noninterlaced", 1: "Adam7 Interlace", DEFAULT: "Unknown" }]]);
1318
+ class Q extends P {
1319
+ static canHandle(e, t) {
1320
+ return e.getUint8(t + 1) === 226 && e.getUint32(t + 4) === 1229144927;
1321
+ }
1322
+ static findPosition(e, t) {
1323
+ let i = super.findPosition(e, t);
1324
+ return i.chunkNumber = e.getUint8(t + 16), i.chunkCount = e.getUint8(t + 17), i.multiSegment = i.chunkCount > 1, i;
1325
+ }
1326
+ static handleMultiSegments(e) {
1327
+ return (function(t) {
1328
+ let i = (function(n) {
1329
+ let r = n[0].constructor, a = 0;
1330
+ for (let u of n) a += u.length;
1331
+ let o = new r(a), l = 0;
1332
+ for (let u of n) o.set(u, l), l += u.length;
1333
+ return o;
1334
+ })(t.map(((n) => n.chunk.toUint8())));
1335
+ return new b(i);
1336
+ })(e);
1337
+ }
1338
+ parse() {
1339
+ return this.raw = /* @__PURE__ */ new Map(), this.parseHeader(), this.parseTags(), this.translate(), this.output;
1340
+ }
1341
+ parseHeader() {
1342
+ let { raw: e } = this;
1343
+ this.chunk.byteLength < 84 && m("ICC header is too short");
1344
+ for (let [t, i] of Object.entries(Rt)) {
1345
+ t = parseInt(t, 10);
1346
+ let n = i(this.chunk, t);
1347
+ n !== "\0\0\0\0" && e.set(t, n);
1348
+ }
1349
+ }
1350
+ parseTags() {
1351
+ let e, t, i, n, r, { raw: a } = this, o = this.chunk.getUint32(128), l = 132, u = this.chunk.byteLength;
1352
+ for (; o--; ) {
1353
+ if (e = this.chunk.getString(l, 4), t = this.chunk.getUint32(l + 4), i = this.chunk.getUint32(l + 8), n = this.chunk.getString(t, 4), t + i > u) return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");
1354
+ r = this.parseTag(n, t, i), r !== void 0 && r !== "\0\0\0\0" && a.set(e, r), l += 12;
1355
+ }
1356
+ }
1357
+ parseTag(e, t, i) {
1358
+ switch (e) {
1359
+ case "desc":
1360
+ return this.parseDesc(t);
1361
+ case "mluc":
1362
+ return this.parseMluc(t);
1363
+ case "text":
1364
+ return this.parseText(t, i);
1365
+ case "sig ":
1366
+ return this.parseSig(t);
1367
+ }
1368
+ if (!(t + i > this.chunk.byteLength)) return this.chunk.getUint8Array(t, i);
1369
+ }
1370
+ parseDesc(e) {
1371
+ let t = this.chunk.getUint32(e + 8) - 1;
1372
+ return U(this.chunk.getString(e + 12, t));
1373
+ }
1374
+ parseText(e, t) {
1375
+ return U(this.chunk.getString(e + 8, t - 8));
1376
+ }
1377
+ parseSig(e) {
1378
+ return U(this.chunk.getString(e + 8, 4));
1379
+ }
1380
+ parseMluc(e) {
1381
+ let { chunk: t } = this, i = t.getUint32(e + 8), n = t.getUint32(e + 12), r = e + 16, a = [];
1382
+ for (let o = 0; o < i; o++) {
1383
+ let l = t.getString(r + 0, 2), u = t.getString(r + 2, 2), f = t.getUint32(r + 4), c = t.getUint32(r + 8) + e, y = U(t.getUnicodeString(c, f));
1384
+ a.push({ lang: l, country: u, text: y }), r += n;
1385
+ }
1386
+ return i === 1 ? a[0].text : a;
1387
+ }
1388
+ translateValue(e, t) {
1389
+ return typeof e == "string" ? t[e] || t[e.toLowerCase()] || e : t[e] || e;
1390
+ }
1391
+ }
1392
+ h(Q, "type", "icc"), h(Q, "multiSegment", !0), h(Q, "headerLength", 18);
1393
+ const Rt = { 4: D, 8: function(s, e) {
1394
+ return [s.getUint8(e), s.getUint8(e + 1) >> 4, s.getUint8(e + 1) % 16].map(((t) => t.toString(10))).join(".");
1395
+ }, 12: D, 16: D, 20: D, 24: function(s, e) {
1396
+ const t = s.getUint16(e), i = s.getUint16(e + 2) - 1, n = s.getUint16(e + 4), r = s.getUint16(e + 6), a = s.getUint16(e + 8), o = s.getUint16(e + 10);
1397
+ return new Date(Date.UTC(t, i, n, r, a, o));
1398
+ }, 36: D, 40: D, 48: D, 52: D, 64: (s, e) => s.getUint32(e), 80: D };
1399
+ function D(s, e) {
1400
+ return U(s.getString(e, 4));
1401
+ }
1402
+ g.set("icc", Q), p(S, "icc", [[4, "ProfileCMMType"], [8, "ProfileVersion"], [12, "ProfileClass"], [16, "ColorSpaceData"], [20, "ProfileConnectionSpace"], [24, "ProfileDateTime"], [36, "ProfileFileSignature"], [40, "PrimaryPlatform"], [44, "CMMFlags"], [48, "DeviceManufacturer"], [52, "DeviceModel"], [56, "DeviceAttributes"], [64, "RenderingIntent"], [68, "ConnectionSpaceIlluminant"], [80, "ProfileCreator"], [84, "ProfileID"], ["Header", "ProfileHeader"], ["MS00", "WCSProfiles"], ["bTRC", "BlueTRC"], ["bXYZ", "BlueMatrixColumn"], ["bfd", "UCRBG"], ["bkpt", "MediaBlackPoint"], ["calt", "CalibrationDateTime"], ["chad", "ChromaticAdaptation"], ["chrm", "Chromaticity"], ["ciis", "ColorimetricIntentImageState"], ["clot", "ColorantTableOut"], ["clro", "ColorantOrder"], ["clrt", "ColorantTable"], ["cprt", "ProfileCopyright"], ["crdi", "CRDInfo"], ["desc", "ProfileDescription"], ["devs", "DeviceSettings"], ["dmdd", "DeviceModelDesc"], ["dmnd", "DeviceMfgDesc"], ["dscm", "ProfileDescriptionML"], ["fpce", "FocalPlaneColorimetryEstimates"], ["gTRC", "GreenTRC"], ["gXYZ", "GreenMatrixColumn"], ["gamt", "Gamut"], ["kTRC", "GrayTRC"], ["lumi", "Luminance"], ["meas", "Measurement"], ["meta", "Metadata"], ["mmod", "MakeAndModel"], ["ncl2", "NamedColor2"], ["ncol", "NamedColor"], ["ndin", "NativeDisplayInfo"], ["pre0", "Preview0"], ["pre1", "Preview1"], ["pre2", "Preview2"], ["ps2i", "PS2RenderingIntent"], ["ps2s", "PostScript2CSA"], ["psd0", "PostScript2CRD0"], ["psd1", "PostScript2CRD1"], ["psd2", "PostScript2CRD2"], ["psd3", "PostScript2CRD3"], ["pseq", "ProfileSequenceDesc"], ["psid", "ProfileSequenceIdentifier"], ["psvm", "PS2CRDVMSize"], ["rTRC", "RedTRC"], ["rXYZ", "RedMatrixColumn"], ["resp", "OutputResponse"], ["rhoc", "ReflectionHardcopyOrigColorimetry"], ["rig0", "PerceptualRenderingIntentGamut"], ["rig2", "SaturationRenderingIntentGamut"], ["rpoc", "ReflectionPrintOutputColorimetry"], ["sape", "SceneAppearanceEstimates"], ["scoe", "SceneColorimetryEstimates"], ["scrd", "ScreeningDesc"], ["scrn", "Screening"], ["targ", "CharTarget"], ["tech", "Technology"], ["vcgt", "VideoCardGamma"], ["view", "ViewingConditions"], ["vued", "ViewingCondDesc"], ["wtpt", "MediaWhitePoint"]]);
1403
+ const J = { "4d2p": "Erdt Systems", AAMA: "Aamazing Technologies", ACER: "Acer", ACLT: "Acolyte Color Research", ACTI: "Actix Sytems", ADAR: "Adara Technology", ADBE: "Adobe", ADI: "ADI Systems", AGFA: "Agfa Graphics", ALMD: "Alps Electric", ALPS: "Alps Electric", ALWN: "Alwan Color Expertise", AMTI: "Amiable Technologies", AOC: "AOC International", APAG: "Apago", APPL: "Apple Computer", AST: "AST", "AT&T": "AT&T", BAEL: "BARBIERI electronic", BRCO: "Barco NV", BRKP: "Breakpoint", BROT: "Brother", BULL: "Bull", BUS: "Bus Computer Systems", "C-IT": "C-Itoh", CAMR: "Intel", CANO: "Canon", CARR: "Carroll Touch", CASI: "Casio", CBUS: "Colorbus PL", CEL: "Crossfield", CELx: "Crossfield", CGS: "CGS Publishing Technologies International", CHM: "Rochester Robotics", CIGL: "Colour Imaging Group, London", CITI: "Citizen", CL00: "Candela", CLIQ: "Color IQ", CMCO: "Chromaco", CMiX: "CHROMiX", COLO: "Colorgraphic Communications", COMP: "Compaq", COMp: "Compeq/Focus Technology", CONR: "Conrac Display Products", CORD: "Cordata Technologies", CPQ: "Compaq", CPRO: "ColorPro", CRN: "Cornerstone", CTX: "CTX International", CVIS: "ColorVision", CWC: "Fujitsu Laboratories", DARI: "Darius Technology", DATA: "Dataproducts", DCP: "Dry Creek Photo", DCRC: "Digital Contents Resource Center, Chung-Ang University", DELL: "Dell Computer", DIC: "Dainippon Ink and Chemicals", DICO: "Diconix", DIGI: "Digital", "DL&C": "Digital Light & Color", DPLG: "Doppelganger", DS: "Dainippon Screen", DSOL: "DOOSOL", DUPN: "DuPont", EPSO: "Epson", ESKO: "Esko-Graphics", ETRI: "Electronics and Telecommunications Research Institute", EVER: "Everex Systems", EXAC: "ExactCODE", Eizo: "Eizo", FALC: "Falco Data Products", FF: "Fuji Photo Film", FFEI: "FujiFilm Electronic Imaging", FNRD: "Fnord Software", FORA: "Fora", FORE: "Forefront Technology", FP: "Fujitsu", FPA: "WayTech Development", FUJI: "Fujitsu", FX: "Fuji Xerox", GCC: "GCC Technologies", GGSL: "Global Graphics Software", GMB: "Gretagmacbeth", GMG: "GMG", GOLD: "GoldStar Technology", GOOG: "Google", GPRT: "Giantprint", GTMB: "Gretagmacbeth", GVC: "WayTech Development", GW2K: "Sony", HCI: "HCI", HDM: "Heidelberger Druckmaschinen", HERM: "Hermes", HITA: "Hitachi America", HP: "Hewlett-Packard", HTC: "Hitachi", HiTi: "HiTi Digital", IBM: "IBM", IDNT: "Scitex", IEC: "Hewlett-Packard", IIYA: "Iiyama North America", IKEG: "Ikegami Electronics", IMAG: "Image Systems", IMI: "Ingram Micro", INTC: "Intel", INTL: "N/A (INTL)", INTR: "Intra Electronics", IOCO: "Iocomm International Technology", IPS: "InfoPrint Solutions Company", IRIS: "Scitex", ISL: "Ichikawa Soft Laboratory", ITNL: "N/A (ITNL)", IVM: "IVM", IWAT: "Iwatsu Electric", Idnt: "Scitex", Inca: "Inca Digital Printers", Iris: "Scitex", JPEG: "Joint Photographic Experts Group", JSFT: "Jetsoft Development", JVC: "JVC Information Products", KART: "Scitex", KFC: "KFC Computek Components", KLH: "KLH Computers", KMHD: "Konica Minolta", KNCA: "Konica", KODA: "Kodak", KYOC: "Kyocera", Kart: "Scitex", LCAG: "Leica", LCCD: "Leeds Colour", LDAK: "Left Dakota", LEAD: "Leading Technology", LEXM: "Lexmark International", LINK: "Link Computer", LINO: "Linotronic", LITE: "Lite-On", Leaf: "Leaf", Lino: "Linotronic", MAGC: "Mag Computronic", MAGI: "MAG Innovision", MANN: "Mannesmann", MICN: "Micron Technology", MICR: "Microtek", MICV: "Microvitec", MINO: "Minolta", MITS: "Mitsubishi Electronics America", MITs: "Mitsuba", MNLT: "Minolta", MODG: "Modgraph", MONI: "Monitronix", MONS: "Monaco Systems", MORS: "Morse Technology", MOTI: "Motive Systems", MSFT: "Microsoft", MUTO: "MUTOH INDUSTRIES", Mits: "Mitsubishi Electric", NANA: "NANAO", NEC: "NEC", NEXP: "NexPress Solutions", NISS: "Nissei Sangyo America", NKON: "Nikon", NONE: "none", OCE: "Oce Technologies", OCEC: "OceColor", OKI: "Oki", OKID: "Okidata", OKIP: "Okidata", OLIV: "Olivetti", OLYM: "Olympus", ONYX: "Onyx Graphics", OPTI: "Optiquest", PACK: "Packard Bell", PANA: "Matsushita Electric Industrial", PANT: "Pantone", PBN: "Packard Bell", PFU: "PFU", PHIL: "Philips Consumer Electronics", PNTX: "HOYA", POne: "Phase One A/S", PREM: "Premier Computer Innovations", PRIN: "Princeton Graphic Systems", PRIP: "Princeton Publishing Labs", QLUX: "Hong Kong", QMS: "QMS", QPCD: "QPcard AB", QUAD: "QuadLaser", QUME: "Qume", RADI: "Radius", RDDx: "Integrated Color Solutions", RDG: "Roland DG", REDM: "REDMS Group", RELI: "Relisys", RGMS: "Rolf Gierling Multitools", RICO: "Ricoh", RNLD: "Edmund Ronald", ROYA: "Royal", RPC: "Ricoh Printing Systems", RTL: "Royal Information Electronics", SAMP: "Sampo", SAMS: "Samsung", SANT: "Jaime Santana Pomares", SCIT: "Scitex", SCRN: "Dainippon Screen", SDP: "Scitex", SEC: "Samsung", SEIK: "Seiko Instruments", SEIk: "Seikosha", SGUY: "ScanGuy.com", SHAR: "Sharp Laboratories", SICC: "International Color Consortium", SONY: "Sony", SPCL: "SpectraCal", STAR: "Star", STC: "Sampo Technology", Scit: "Scitex", Sdp: "Scitex", Sony: "Sony", TALO: "Talon Technology", TAND: "Tandy", TATU: "Tatung", TAXA: "TAXAN America", TDS: "Tokyo Denshi Sekei", TECO: "TECO Information Systems", TEGR: "Tegra", TEKT: "Tektronix", TI: "Texas Instruments", TMKR: "TypeMaker", TOSB: "Toshiba", TOSH: "Toshiba", TOTK: "TOTOKU ELECTRIC", TRIU: "Triumph", TSBT: "Toshiba", TTX: "TTX Computer Products", TVM: "TVM Professional Monitor", TW: "TW Casper", ULSX: "Ulead Systems", UNIS: "Unisys", UTZF: "Utz Fehlau & Sohn", VARI: "Varityper", VIEW: "Viewsonic", VISL: "Visual communication", VIVO: "Vivo Mobile Communication", WANG: "Wang", WLBR: "Wilbur Imaging", WTG2: "Ware To Go", WYSE: "WYSE Technology", XERX: "Xerox", XRIT: "X-Rite", ZRAN: "Zoran", Zebr: "Zebra Technologies", appl: "Apple Computer", bICC: "basICColor", berg: "bergdesign", ceyd: "Integrated Color Solutions", clsp: "MacDermid ColorSpan", ds: "Dainippon Screen", dupn: "DuPont", ffei: "FujiFilm Electronic Imaging", flux: "FluxData", iris: "Scitex", kart: "Scitex", lcms: "Little CMS", lino: "Linotronic", none: "none", ob4d: "Erdt Systems", obic: "Medigraph", quby: "Qubyx Sarl", scit: "Scitex", scrn: "Dainippon Screen", sdp: "Scitex", siwi: "SIWI GRAFIKA", yxym: "YxyMaster" }, Ye = { scnr: "Scanner", mntr: "Monitor", prtr: "Printer", link: "Device Link", abst: "Abstract", spac: "Color Space Conversion Profile", nmcl: "Named Color", cenc: "ColorEncodingSpace profile", mid: "MultiplexIdentification profile", mlnk: "MultiplexLink profile", mvis: "MultiplexVisualization profile", nkpf: "Nikon Input Device Profile (NON-STANDARD!)" };
1404
+ p(I, "icc", [[4, J], [12, Ye], [40, Object.assign({}, J, Ye)], [48, J], [80, J], [64, { 0: "Perceptual", 1: "Relative Colorimetric", 2: "Saturation", 3: "Absolute Colorimetric" }], ["tech", { amd: "Active Matrix Display", crt: "Cathode Ray Tube Display", kpcd: "Photo CD", pmd: "Passive Matrix Display", dcam: "Digital Camera", dcpj: "Digital Cinema Projector", dmpc: "Digital Motion Picture Camera", dsub: "Dye Sublimation Printer", epho: "Electrophotographic Printer", esta: "Electrostatic Printer", flex: "Flexography", fprn: "Film Writer", fscn: "Film Scanner", grav: "Gravure", ijet: "Ink Jet Printer", imgs: "Photo Image Setter", mpfr: "Motion Picture Film Recorder", mpfs: "Motion Picture Film Scanner", offs: "Offset Lithography", pjtv: "Projection Television", rpho: "Photographic Paper Printer", rscn: "Reflective Scanner", silk: "Silkscreen", twax: "Thermal Wax Printer", vidc: "Video Camera", vidm: "Video Monitor" }]]);
1405
+ class q extends P {
1406
+ static canHandle(e, t, i) {
1407
+ return e.getUint8(t + 1) === 237 && e.getString(t + 4, 9) === "Photoshop" && this.containsIptc8bim(e, t, i) !== void 0;
1408
+ }
1409
+ static headerLength(e, t, i) {
1410
+ let n, r = this.containsIptc8bim(e, t, i);
1411
+ if (r !== void 0) return n = e.getUint8(t + r + 7), n % 2 != 0 && (n += 1), n === 0 && (n = 4), r + 8 + n;
1412
+ }
1413
+ static containsIptc8bim(e, t, i) {
1414
+ for (let n = 0; n < i; n++) if (this.isIptcSegmentHead(e, t + n)) return n;
1415
+ }
1416
+ static isIptcSegmentHead(e, t) {
1417
+ return e.getUint8(t) === 56 && e.getUint32(t) === 943868237 && e.getUint16(t + 4) === 1028;
1418
+ }
1419
+ parse() {
1420
+ let { raw: e } = this, t = this.chunk.byteLength - 1, i = !1;
1421
+ for (let n = 0; n < t; n++) if (this.chunk.getUint8(n) === 28 && this.chunk.getUint8(n + 1) === 2) {
1422
+ i = !0;
1423
+ let r = this.chunk.getUint16(n + 3), a = this.chunk.getUint8(n + 2), o = this.chunk.getLatin1String(n + 5, r);
1424
+ e.set(a, this.pluralizeValue(e.get(a), o)), n += 4 + r;
1425
+ } else if (i) break;
1426
+ return this.translate(), this.output;
1427
+ }
1428
+ pluralizeValue(e, t) {
1429
+ return e !== void 0 ? e instanceof Array ? (e.push(t), e) : [e, t] : t;
1430
+ }
1431
+ }
1432
+ h(q, "type", "iptc"), h(q, "translateValues", !1), h(q, "reviveValues", !1), g.set("iptc", q), p(S, "iptc", [[0, "ApplicationRecordVersion"], [3, "ObjectTypeReference"], [4, "ObjectAttributeReference"], [5, "ObjectName"], [7, "EditStatus"], [8, "EditorialUpdate"], [10, "Urgency"], [12, "SubjectReference"], [15, "Category"], [20, "SupplementalCategories"], [22, "FixtureIdentifier"], [25, "Keywords"], [26, "ContentLocationCode"], [27, "ContentLocationName"], [30, "ReleaseDate"], [35, "ReleaseTime"], [37, "ExpirationDate"], [38, "ExpirationTime"], [40, "SpecialInstructions"], [42, "ActionAdvised"], [45, "ReferenceService"], [47, "ReferenceDate"], [50, "ReferenceNumber"], [55, "DateCreated"], [60, "TimeCreated"], [62, "DigitalCreationDate"], [63, "DigitalCreationTime"], [65, "OriginatingProgram"], [70, "ProgramVersion"], [75, "ObjectCycle"], [80, "Byline"], [85, "BylineTitle"], [90, "City"], [92, "Sublocation"], [95, "State"], [100, "CountryCode"], [101, "Country"], [103, "OriginalTransmissionReference"], [105, "Headline"], [110, "Credit"], [115, "Source"], [116, "CopyrightNotice"], [118, "Contact"], [120, "Caption"], [121, "LocalCaption"], [122, "Writer"], [125, "RasterizedCaption"], [130, "ImageType"], [131, "ImageOrientation"], [135, "LanguageIdentifier"], [150, "AudioType"], [151, "AudioSamplingRate"], [152, "AudioSamplingResolution"], [153, "AudioDuration"], [154, "AudioOutcue"], [184, "JobID"], [185, "MasterDocumentID"], [186, "ShortDocumentID"], [187, "UniqueDocumentID"], [188, "OwnerID"], [200, "ObjectPreviewFileFormat"], [201, "ObjectPreviewFileVersion"], [202, "ObjectPreviewData"], [221, "Prefs"], [225, "ClassifyState"], [228, "SimilarityIndex"], [230, "DocumentNotes"], [231, "DocumentHistory"], [232, "ExifCameraInfo"], [255, "CatalogSets"]]), p(I, "iptc", [[10, { 0: "0 (reserved)", 1: "1 (most urgent)", 2: "2", 3: "3", 4: "4", 5: "5 (normal urgency)", 6: "6", 7: "7", 8: "8 (least urgent)", 9: "9 (user-defined priority)" }], [75, { a: "Morning", b: "Both Morning and Evening", p: "Evening" }], [131, { L: "Landscape", P: "Portrait", S: "Square" }]]);
1433
+ export {
1434
+ L as Exifr,
1435
+ z as Options,
1436
+ M as allFormatters,
1437
+ O as chunkedProps,
1438
+ p as createDictionary,
1439
+ Lt as default,
1440
+ G as extendDictionary,
1441
+ E as fetchUrlAsArrayBuffer,
1442
+ k as fileParsers,
1443
+ w as fileReaders,
1444
+ Qe as gps,
1445
+ Te as gpsOnlyOptions,
1446
+ W as inheritables,
1447
+ Oe as orientation,
1448
+ De as orientationOnlyOptions,
1449
+ j as otherSegments,
1450
+ oe as parse,
1451
+ N as readBlobAsArrayBuffer,
1452
+ F as rotateCanvas,
1453
+ B as rotateCss,
1454
+ tt as rotation,
1455
+ xe as rotations,
1456
+ g as segmentParsers,
1457
+ V as segments,
1458
+ x as segmentsAndBlocks,
1459
+ S as tagKeys,
1460
+ R as tagRevivers,
1461
+ I as tagValues,
1462
+ Ze as thumbnail,
1463
+ Ae as thumbnailOnlyOptions,
1464
+ et as thumbnailUrl,
1465
+ d as tiffBlocks,
1466
+ v as tiffExtractables
1467
+ };