exifreader 4.18.0 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -12
- package/dist/exif-reader.js +1 -1
- package/dist/exif-reader.js.map +1 -1
- package/exif-reader.d.ts +30 -2
- package/package.json +3 -3
- package/src/constants.js +2 -1
- package/src/exif-reader.js +16 -0
- package/src/gif-file-tags.js +116 -0
- package/src/image-header-gif.js +23 -0
- package/src/image-header.js +5 -0
- package/webpack.config.js +3 -2
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@ ExifReader
|
|
|
3
3
|
|
|
4
4
|
ExifReader is a JavaScript library that parses image files and extracts the
|
|
5
5
|
metadata. It can also extract an embedded thumbnail. It can be used either in a
|
|
6
|
-
browser or from Node. Supports JPEG, TIFF, PNG, HEIC, and
|
|
7
|
-
IPTC, XMP, ICC, and MPF metadata (depending on file type).
|
|
6
|
+
browser or from Node. Supports JPEG, TIFF, PNG, HEIC, WebP, and GIF files with
|
|
7
|
+
Exif, IPTC, XMP, ICC, and MPF metadata (depending on file type).
|
|
8
8
|
|
|
9
9
|
ExifReader is highly and easily configurable and the resulting bundle can be as
|
|
10
10
|
small as **~4 KiB** (gzipped) if you're only interested in a few tags (e.g. date
|
|
@@ -18,17 +18,19 @@ You can try it out on the
|
|
|
18
18
|
|
|
19
19
|
**Support table**
|
|
20
20
|
|
|
21
|
-
| File type | Exif | IPTC | XMP | ICC | MPF | Photoshop | Thumbnail |
|
|
22
|
-
|
|
|
23
|
-
| JPEG | **yes** | **yes** | **yes** | **yes** | **yes** | **some*** | **yes** |
|
|
24
|
-
| TIFF | **yes** | **yes** | **yes** | **yes** | ??? | ??? | no |
|
|
25
|
-
| PNG | **yes** | no | **yes** | no | ??? | ??? | no |
|
|
26
|
-
| HEIC/HEIF | **yes** | no | no | **yes** | ??? | ??? | no |
|
|
27
|
-
| WebP | **yes** | no | **yes** | **yes** | ??? | ??? | **yes** |
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
| File type | Exif | IPTC | XMP | ICC | MPF | Photoshop | Thumbnail | Image details |
|
|
22
|
+
| ----------|---------|---------|---------|---------|---------|---------------|-----------|---------------|
|
|
23
|
+
| JPEG | **yes** | **yes** | **yes** | **yes** | **yes** | **some*** | **yes** | **yes** |
|
|
24
|
+
| TIFF | **yes** | **yes** | **yes** | **yes** | ??? | ??? | no | no |
|
|
25
|
+
| PNG | **yes** | no | **yes** | no | ??? | ??? | no | **yes** |
|
|
26
|
+
| HEIC/HEIF | **yes** | no | no | **yes** | ??? | ??? | no | no |
|
|
27
|
+
| WebP | **yes** | no | **yes** | **yes** | ??? | ??? | **yes** | **yes** |
|
|
28
|
+
| GIF | no | no | no | no | no | no | no | **yes** |
|
|
29
|
+
|
|
30
|
+
- `Image details` = image width, height, etc. read from image header.
|
|
31
|
+
- `???` = may be supported in any file type using Exif but it has only been tested
|
|
30
32
|
on JPEGs.
|
|
31
|
-
-
|
|
33
|
+
- `*` = A draft implementation of Photoshop tags have been added with
|
|
32
34
|
`ClippingPathName` and `PathInformation` currently supported. Photoshop tags
|
|
33
35
|
are very different from other tags and need a lot of extra code so they have
|
|
34
36
|
deliberately not been fully implemented. File an issue if there is something
|
|
@@ -412,6 +414,7 @@ Possible modules to include or exclude:
|
|
|
412
414
|
| `png` | PNG images. |
|
|
413
415
|
| `heic` | HEIC/HEIF images. |
|
|
414
416
|
| `webp` | WebP images. |
|
|
417
|
+
| `gif` | GIF images. |
|
|
415
418
|
| `file` | JPEG file details: image width, height etc. |
|
|
416
419
|
| `jfif` | JFIF details in JPEG files: resolution, thumbnail etc. |
|
|
417
420
|
| `png_file` | PNG file details: image width, height etc. |
|
|
@@ -516,6 +519,9 @@ Changelog
|
|
|
516
519
|
|
|
517
520
|
A selection of notable changes.
|
|
518
521
|
|
|
522
|
+
- **December 2023**:
|
|
523
|
+
- Add support for extracting Photoshop paths.
|
|
524
|
+
- Add basic support for GIF images (image dimensions, bit depths).
|
|
519
525
|
- **December 2022**:
|
|
520
526
|
- Add option `length` to only read the first `length` bytes of the file.
|
|
521
527
|
- **October 2021**:
|
package/dist/exif-reader.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ExifReader=t():e.ExifReader=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:1,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},t={};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}e.r(t),e.d(t,{default:function(){return Dr},errors:function(){return xr},load:function(){return Lr},loadView:function(){return Rr}});var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==n(e)||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(t))throw Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}var t,r;return t=e,(r=[{key:"getUint8",value:function(e){return this.buffer.readUInt8(e)}},{key:"getUint16",value:function(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}},{key:"getUint32",value:function(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}},{key:"getInt32",value:function(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}])&&function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||0,i.configurable=1,"value"in i&&(i.writable=1),Object.defineProperty(e,(o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(i.key),"symbol"===n(o)?o:o+""),i)}var o}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:0}),e}();function i(e,t,n){try{return new DataView(e,t,n)}catch(i){return new r(e,t,n)}}function o(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return c(r)}function a(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),c(r)}function u(e,t){var n=e.getUint8(t);return[n,o(e,t+1,n)]}function c(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function f(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function s(e,t,n){var r=0;Object.defineProperty(e,t,{get:function(){return r||(r=1,Object.defineProperty(e,t,{configurable:1,enumerable:1,value:n.apply(e),writable:1})),e[t]},configurable:1,enumerable:1})}function l(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function d(e,t){return Array(t+1).join(e)}var p={USE_FILE:1,USE_JFIF:1,USE_PNG_FILE:1,USE_EXIF:1,USE_IPTC:1,USE_XMP:1,USE_ICC:1,USE_MPF:1,USE_PHOTOSHOP:1,USE_THUMBNAIL:1,USE_TIFF:1,USE_JPEG:1,USE_PNG:1,USE_HEIC:1,USE_WEBP:1};function m(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function g(e){if(e.length>=8){var t=m(e.slice(0,8));if("ASCII\0\0\0"===t)return m(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function v(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var h=18761,y=19789,S={BIG_ENDIAN:y,LITTLE_ENDIAN:h,getByteOrder:function(e,t){if(e.getUint16(t)===h)return h;if(e.getUint16(t)===y)return y;throw Error("Illegal byte order value. Faulty image.")}},b=2,I=65496,C=2,A=4,U=2,P=2,E=10,w=18,T=33,F=79,O=18,M=8,D="ICC_PROFILE\0",x=A+D.length,L=x+1,N="MPF\0",R=65472,k=65474,G=65476,B=65499,j=65501,_=65498,z=65504,H=65505,W=65506,V=65517,X=65519,J=65534,Y=65535,q="JFIF",K="Exif",$="http://ns.adobe.com/xap/1.0/\0",Z="http://ns.adobe.com/xmp/extension/\0",Q="Photoshop 3.0";function ee(e,t){return e.getUint16(t)===R}function te(e,t){return e.getUint16(t)===k}function ne(e,t){var n=D.length;return e.getUint16(t)===W&&o(e,t+A,n)===D}function re(e,t){var n=N.length;return e.getUint16(t)===W&&o(e,t+A,n)===N}function ie(e,t){var n=K.length;return e.getUint16(t)===z&&o(e,t+A,n)===q&&0===e.getUint8(t+A+n)}function oe(e,t){var n=K.length;return e.getUint16(t)===H&&o(e,t+A,n)===K&&0===e.getUint8(t+A+n)}function ae(e,t){return e.getUint16(t)===H&&function(e,t){var n=$.length;return o(e,t+A,n)===$}(e,t)}function ue(e,t){return e.getUint16(t)===H&&function(e,t){var n=Z.length;return o(e,t+A,n)===Z}(e,t)}function ce(e,t){return{dataOffset:e+T,length:t-(T-U)}}function fe(e,t){return{dataOffset:e+F,length:t-(F-U)}}function se(e,t){var n=Q.length;return e.getUint16(t)===V&&o(e,t+A,n)===Q&&0===e.getUint8(t+A+n)}function le(e,t){var n=e.getUint16(t);return n>=z&&n<=X||n===J||n===R||n===k||n===G||n===B||n===j||n===_}function de(e,t){return e.getUint16(t)===Y}var pe="PNG\r\n\n",me=4,ge=4,ve=0,he=me,ye=me+ge,Se="XML:com.adobe.xmp\0",be="iTXt",Ie="pHYs",Ce="tIME",Ae="eXIf";function Ue(e,t){return"IHDR"===o(e,t+he,ge)}function Pe(e,t){return"iTXt"===o(e,t+he,ge)&&o(e,t+ye,Se.length)===Se}function Ee(e,t){var n=o(e,t+he,ge);return"tEXt"===n||"iTXt"===n}function we(e,t){return o(e,t+he,ge)===Ae}function Te(e,t){var n=[Ie,Ce],r=o(e,t+he,ge);return n.includes(r)}function Fe(e,t){t+=ye+Se.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Oe(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?e.byteLength-t:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?e.getUint32(t+12):n}var Me={parseAppMarkers:function(e){if(p.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===S.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)}(e))return De(p.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(p.USE_JPEG&&function(e){return!!e&&e.byteLength>=b&&e.getUint16(0)===I}(e))return De(function(e){for(var t,n,r,i,o,a,u,c,f,s=C;s+A+5<=e.byteLength;){if(p.USE_FILE&&ee(e,s))n=s+U;else if(p.USE_FILE&&te(e,s))r=s+U;else if(p.USE_JFIF&&ie(e,s))t=e.getUint16(s+U),i=s+P;else if(p.USE_EXIF&&oe(e,s))t=e.getUint16(s+U),o=s+E;else if(p.USE_XMP&&ae(e,s))u||(u=[]),t=e.getUint16(s+U),u.push(ce(s,t));else if(p.USE_XMP&&ue(e,s))u||(u=[]),t=e.getUint16(s+U),u.push(fe(s,t));else if(p.USE_IPTC&&se(e,s))t=e.getUint16(s+U),a=s+w;else if(p.USE_ICC&&ne(e,s)){t=e.getUint16(s+U);var l=s+O,d=t-(O-U),m=e.getUint8(s+x),g=e.getUint8(s+L);c||(c=[]),c.push({offset:l,length:d,chunkNumber:m,chunksTotal:g})}else if(p.USE_MPF&&re(e,s))t=e.getUint16(s+U),f=s+M;else{if(!le(e,s)){if(de(e,s)){s++;continue}break}t=e.getUint16(s+U)}s+=U+t}return{hasAppMarkers:s>C,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:c,mpfDataOffset:f}}(e),"jpeg","JPEG");if(p.USE_PNG&&function(e){return!!e&&o(e,0,pe.length)===pe}(e))return De(function(e){for(var t={hasAppMarkers:0},n=pe.length;n+me+ge<=e.byteLength;){if(p.USE_PNG_FILE&&Ue(e,n))t.hasAppMarkers=1,t.pngHeaderOffset=n+ye;else if(p.USE_XMP&&Pe(e,n)){var r=Fe(e,n);void 0!==r&&(t.hasAppMarkers=1,t.xmpChunks=[{dataOffset:r,length:e.getUint32(n+ve)-(r-(n+ye))}])}else if(Ee(e,n)){t.hasAppMarkers=1;var i=o(e,n+he,ge);t.pngTextChunks||(t.pngTextChunks=[]),t.pngTextChunks.push({length:e.getUint32(n+ve),type:i,offset:n+ye})}else we(e,n)?(t.hasAppMarkers=1,t.tiffHeaderOffset=n+ye):Te(e,n)&&(t.hasAppMarkers=1,t.pngChunkOffsets||(t.pngChunkOffsets=[]),t.pngChunkOffsets.push(n+ve));n+=e.getUint32(n+ve)+me+ge+4}return t}(e),"png","PNG");if(p.USE_HEIC&&function(e){if(!e)return 0;var t=o(e,8,4);return"ftyp"===o(e,4,4)&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t)}(e))return De(function(e){if(p.USE_EXIF||p.USE_ICC){var t=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Oe(e,t);if(n>=8&&"meta"===o(e,t+4,4))return{offset:t,length:n};t+=n}return{offset:void 0,length:0}}(e),n=t.offset,r=t.length;if(void 0===n)return{hasAppMarkers:0};var i=Math.min(n+r,e.byteLength),a=function(e,t,n){for(var r={ilocOffset:void 0,exifItemOffset:void 0,colrOffset:void 0};t+4<=n&&(!r.ilocOffset||!r.exifItemOffset||!r.colrOffset);){var i=o(e,t,4);p.USE_EXIF&&"iloc"===i?r.ilocOffset=t:p.USE_EXIF&&"Exif"===i?r.exifItemOffset=t+-4:p.USE_ICC&&"colr"===i&&(r.colrOffset=t+-4),t++}return r}(e,n,i),u=a.exifItemOffset,c=a.ilocOffset,f=a.colrOffset,s=function(e,t,n,r){if(n&&t&&!(t+2>r)){var i=e.getUint16(t);for(n+=12;n+16<=r;){if(e.getUint16(n)===i){var o=e.getUint32(n+8);if(o+4<=e.byteLength)return o+(e.getUint32(o)+4)}n+=16}}}(e,u,c,i),l=function(e,t,n){if(t&&!(t+12>n)){var r=o(e,t+8,4);if("prof"===r||"rICC"===r)return[{offset:t+12,length:Oe(e,t)-12,chunkNumber:1,chunksTotal:1}]}}(e,f,i);return{hasAppMarkers:void 0!==s||void 0!==l,tiffHeaderOffset:s,iccChunks:l}}return{hasAppMarkers:0}}(e),"heic","HEIC");if(p.USE_WEBP&&function(e){return!!e&&"RIFF"===o(e,0,4)&&"WEBP"===o(e,8,4)}(e))return De(function(e){for(var t,n,r,i,a=12,u=0;a+8<e.byteLength;){var c=o(e,a,4),f=e.getUint32(a+4,1);p.USE_EXIF&&"EXIF"===c?(u=1,t="Exif\0\0"===o(e,a+8,6)?a+8+6:a+8):p.USE_XMP&&"XMP "===c?(u=1,n=[{dataOffset:a+8,length:f}]):p.USE_ICC&&"ICCP"===c?(u=1,r=[{offset:a+8,length:f,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(u=1,i=a+8),a+=8+(f%2==0?f:f+1)}return{hasAppMarkers:u,tiffHeaderOffset:t,xmpChunks:n,iccChunks:r,vp8xChunkOffset:i}}(e),"webp","WebP");throw Error("Invalid image format")}};function De(e,t,n){return f({},e,{fileType:{value:t,description:n}})}var xe={ApertureValue:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},ColorSpace:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"},ComponentsConfiguration:function(e){return e.map((function(e){return 49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0})).join("")},Contrast:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},CustomRendered:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"},ExposureMode:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"},ExposureProgram:function(e){return 0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown"},ExposureTime:function(e){return e[0]>=e[1]?"".concat(Math.round(e[0]/e[1])):0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])},FNumber:function(e){return"f/".concat(e[0]/e[1])},FocalLength:function(e){return e[0]/e[1]+" mm"},FocalPlaneResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},LightSource:function(e){return 1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 – 7100K)":13===e?"Day white fluorescent (N 4600 – 5400K)":14===e?"Cool white fluorescent (W 3900 – 4500K)":15===e?"White fluorescent (WW 3200 – 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown"},MeteringMode:function(e){return 1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown"},ResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},Saturation:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"},SceneCaptureType:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"},Sharpness:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},ShutterSpeedValue:function(e){var t=Math.pow(2,e[0]/e[1]);return t<=1?"".concat(Math.round(1/t)):"1/".concat(Math.round(t))},WhiteBalance:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"},XResolution:function(e){return""+Math.round(e[0]/e[1])},YResolution:function(e){return""+Math.round(e[0]/e[1])}},Le={11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown"}},255:{name:"OldSubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown"}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return{1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown"}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return{1:"Normal",2:"Reversed"}[e]||"Unknown"}},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:function(e){return 1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"}},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:xe.XResolution},283:{name:"YResolution",description:xe.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:function(e){return""+Math.round(e[0]/e[1])}},287:{name:"YPosition",description:function(e){return""+Math.round(e[0]/e[1])}},290:{name:"GrayResponseUnit",description:function(e){return{1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown"}},296:{name:"ResolutionUnit",description:xe.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},319:{name:"PrimaryChromaticities",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return{1:"CMYK",2:"Not CMYK"}[e]||"Unknown"}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return{0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown"}},339:{name:"SampleFormat",description:function(e){var t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((function(e){return t[e]||"Unknown"})).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join("/")}},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:{name:"ReferenceBlackWhite",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join(", ")}},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:function(e){return e.join("; ")}},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",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",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:function(e){return{0:"Unsafe",1:"Safe"}[e]||"Unknown"}},50778:{name:"CalibrationIlluminant1",description:xe.LightSource},50779:{name:"CalibrationIlluminant2",description:xe.LightSource},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:{name:"ProfileEmbedPolicy",description:function(e){return{0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown"}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return{1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown"}},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:{name:"ProfileHueSatMapEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51108:{name:"ProfileLookTableEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return{0:"Auto",1:"None"}[e]||"Unknown"}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ke,Ge={0:{name:"GPSVersionID",description:function(e){return 2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"}},1:{name:"GPSLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:v},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:v},5:{name:"GPSAltitudeRef",description:function(e){return 0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"}},6:{name:"GPSAltitude",description:function(e){return e[0]/e[1]+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map((function(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return Re(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Re(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0]/n[1];return/^\d(\.|$)/.test("".concat(r))?"0".concat(r):r})).join(":")}},8:"GPSSatellites",9:{name:"GPSStatus",description:function(e){var t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:function(e){var t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},21:{name:"GPSDestLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},23:{name:"GPSDestBearingRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:g},28:{name:"GPSAreaInformation",description:g},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},Be={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return m(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},je={45056:{name:"MPFVersion",description:function(e){return m(e)}},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function ze(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==_e(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==_e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===_e(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var He=f({},Le,{33434:{name:"ExposureTime",description:xe.ExposureTime},33437:{name:"FNumber",description:xe.FNumber},34850:{name:"ExposureProgram",description:xe.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:function(e){return{1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown"}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:function(e){return m(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:xe.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:xe.ShutterSpeedValue},37378:{name:"ApertureValue",description:xe.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},37382:{name:"SubjectDistance",description:function(e){return e[0]/e[1]+" m"}},37383:{name:"MeteringMode",description:xe.MeteringMode},37384:{name:"LightSource",description:xe.LightSource},37385:{name:"Flash",description:function(e){return 0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"}},37386:{name:"FocalLength",description:xe.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return{C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown"}},37395:"ImageHistory",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: ".concat(e[0],", Y: ").concat(e[1]):3===e.length?"Circle; X: ".concat(e[0],", Y: ").concat(e[1],", diameter: ").concat(e[2]):4===e.length?"Rectangle; X: ".concat(e[0],", Y: ").concat(e[1],", width: ").concat(e[2],", height: ").concat(e[3]):"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:g},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:function(e){return e[0]/e[1]+" °C"}},37889:{name:"Humidity",description:function(e){return e[0]/e[1]+" %"}},37890:{name:"Pressure",description:function(e){return e[0]/e[1]+" hPa"}},37891:{name:"WaterDepth",description:function(e){return e[0]/e[1]+" m"}},37892:{name:"Acceleration",description:function(e){return e[0]/e[1]+" mGal"}},37893:{name:"CameraElevationAngle",description:function(e){return e[0]/e[1]+" °"}},40960:{name:"FlashpixVersion",description:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}},40961:{name:"ColorSpace",description:xe.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:function(){return"[Raw SFR table data]"}},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:xe.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:function(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return Ne(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],i=n[1];return"X: ".concat(r,", Y: ").concat(i)}},41493:"ExposureIndex",41495:{name:"SensingMethod",description:function(e){return 1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"}},41728:{name:"FileSource",description:function(e){return 3===e?"DSC":"Unknown"}},41729:{name:"SceneType",description:function(e){return 1===e?"A directly photographed image":"Unknown"}},41730:{name:"CFAPattern",description:function(){return"[Raw CFA pattern table data]"}},41985:{name:"CustomRendered",description:xe.CustomRendered},41986:{name:"ExposureMode",description:xe.ExposureMode},41987:{name:"WhiteBalance",description:xe.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:function(e){return 0===e?"Unknown":e}},41990:{name:"SceneCaptureType",description:xe.SceneCaptureType},41991:{name:"GainControl",description:function(e){return 0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"}},41992:{name:"Contrast",description:xe.Contrast},41993:{name:"Saturation",description:xe.Saturation},41994:{name:"Sharpness",description:xe.Sharpness},41995:{name:"DeviceSettingDescription",description:function(){return"[Raw device settings table data]"}},41996:{name:"SubjectDistanceRange",description:function(e){return 1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"}},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:function(e){var t="".concat(e[0][0]/e[0][1],"-").concat(e[1][0]/e[1][1]," mm");return 0===e[3][1]?"".concat(t," f/?"):"".concat(t," f/").concat(1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1])))}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return{1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown"}},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",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"}),We="0th",Ve="exif",Xe="interoperability",Je=(ze(ke={},We,He),ze(ke,"1st",Le),ze(ke,Ve,He),ze(ke,"gps",Ge),ze(ke,Xe,Be),ze(ke,"mpf",p.USE_MPF?je:{}),ke),Ye={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},qe={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Ke={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:$e,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===S.LITTLE_ENDIAN)},getLongAt:Ze,getRationalAt:function(e,t,n){return[Ze(e,t,n),Ze(e,t+4,n)]},getUndefinedAt:function(e,t){return $e(e,t)},getSlongAt:Qe,getSrationalAt:function(e,t,n){return[Qe(e,t,n),Qe(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return Ze(e,t,n)},typeSizes:Ye,tagTypes:qe,getTypeSize:function(e){if(void 0===qe[e])throw Error("No such type found.");return Ye[qe[e]]}};function $e(e,t){return e.getUint8(t)}function Ze(e,t,n){return e.getUint32(t,n===S.LITTLE_ENDIAN)}function Qe(e,t,n){return e.getInt32(t,n===S.LITTLE_ENDIAN)}var et={1:Ke.getByteAt,2:Ke.getAsciiAt,3:Ke.getShortAt,4:Ke.getLongAt,5:Ke.getRationalAt,7:Ke.getUndefinedAt,9:Ke.getSlongAt,10:Ke.getSrationalAt,13:Ke.getIfdPointerAt};function tt(e,t,n){return t+Ke.getLongAt(e,t+4,n)}function nt(e,t,n,r,i,o){var a=Ke.getTypeSize("SHORT"),u={},c=function(e,t,n){return t+Ke.getTypeSize("SHORT")<=e.byteLength?Ke.getShortAt(e,t,n):0}(e,r,i);r+=a;for(var f=0;f<c&&!(r+12>e.byteLength);f++){var s=rt(e,t,n,r,i,o);void 0!==s&&(u[s.name]={id:s.id,value:s.value,description:s.description}),r+=12}if(p.USE_THUMBNAIL&&r<e.byteLength-Ke.getTypeSize("LONG")){var l=Ke.getLongAt(e,r,i);0!==l&&t===We&&(u.Thumbnail=nt(e,"1st",n,n+l,i,1))}return u}function rt(e,t,n,r,i,o){var a,u=Ke.getTypeSize("SHORT"),c=u+Ke.getTypeSize("SHORT"),f=c+Ke.getTypeSize("LONG"),s=Ke.getShortAt(e,r,i),l=Ke.getShortAt(e,r+u,i),d=Ke.getLongAt(e,r+c,i);if(void 0!==Ke.typeSizes[l]&&(o||void 0!==Je[t][s])){if(function(e,t){return Ke.typeSizes[e]*t<=Ke.getTypeSize("LONG")}(l,d))a=it(e,r+f,l,d,i);else{var p=Ke.getLongAt(e,r+f,i);a=function(e,t,n,r,i){return t+n+Ke.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)?it(e,n+p,l,d,i,33723===s):"<faulty value>"}l===Ke.tagTypes.ASCII&&(a=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(a=function(e){for(var t=[],n=0,r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(a)));var m="undefined-".concat(s),g=a;if(void 0!==Je[t][s])if(void 0!==Je[t][s].name&&void 0!==Je[t][s].description){m=Je[t][s].name;try{g=Je[t][s].description(a)}catch(e){g=ot(a)}}else l===Ke.tagTypes.RATIONAL||l===Ke.tagTypes.SRATIONAL?(m=Je[t][s],g=""+a[0]/a[1]):(m=Je[t][s],g=ot(a));return{id:s,name:m,value:a,description:g}}}function it(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=Ke.typeSizes[n],n=Ke.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(et[n](e,t,i)),t+=Ke.typeSizes[n];return n===Ke.tagTypes.ASCII?o=Ke.getAsciiValue(o):1===o.length&&(o=o[0]),o}function ot(e){return e instanceof Array?e.join(", "):e}var at="Exif IFD Pointer",ut="GPS Info IFD Pointer",ct="Interoperability IFD Pointer",ft={read:function(e,t,n){var r=S.getByteOrder(e,t),i=function(e,t,n,r){return nt(e,We,t,tt(e,t,n),n,r)}(e,t,r,n);return function(e,t,n,r,i){return void 0!==e[ct]?f(e,nt(t,Xe,n,n+e[ct].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[ut]?f(e,nt(t,"gps",n,n+e[ut].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[at]?f(e,nt(t,Ve,n,n+e[at].value,r,i)):e}(i,e,t,r,n),e,t,r,n),e,t,r,n)}},st={read:function(e,t,n){var r=S.getByteOrder(e,t);return function(e,t,n,r){if(!n.MPEntry)return n;for(var i=[],o=0;o<Math.ceil(n.MPEntry.value.length/lt);o++){i[o]={};var a=dt(n.MPEntry.value,o*lt,Ke.getTypeSize("LONG"),r);i[o].ImageFlags=pt(a),i[o].ImageFormat=mt(a),i[o].ImageType=gt(a);var u=dt(n.MPEntry.value,o*lt+4,Ke.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var c=vt(o,n.MPEntry,r,t);i[o].ImageOffset={value:c,description:""+c};var f=dt(n.MPEntry.value,o*lt+12,Ke.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:f,description:""+f};var d=dt(n.MPEntry.value,o*lt+14,Ke.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:d,description:""+d},i[o].image=e.buffer.slice(c,c+u),s(i[o],"base64",(function(){return l(this.image)}))}return n.Images=i,n}(e,t,nt(e,"mpf",t,tt(e,t,r),r,n),r)}},lt=16;function dt(e,t,n,r){if(r===S.LITTLE_ENDIAN){for(var i=0,o=0;o<n;o++)i+=e[t+o]<<8*o;return i}for(var a=0,u=0;u<n;u++)a+=e[t+u]<<8*(n-1-u);return a}function pt(e){var t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function mt(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function gt(e){var t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function vt(e,t,n,r){return function(e){return 0===e}(e)?0:dt(t.value,e*lt+8,Ke.getTypeSize("LONG"),n)+r}var ht={read:function(e,t){var n=function(e,t){return Ke.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=Ke.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":yt(e,t,n),"Image Height":St(e,t,n),"Image Width":bt(e,t,n),"Color Components":r,Subsampling:r&&It(e,t,r.value,n)}}};function yt(e,t,n){if(!(3>n)){var r=Ke.getByteAt(e,t+2);return{value:r,description:""+r}}}function St(e,t,n){if(!(5>n)){var r=Ke.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function bt(e,t,n){if(!(7>n)){var r=Ke.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function It(e,t,n,r){if(!(8+3*n>r)){for(var i=[],o=0;o<n;o++){var a=t+8+3*o;i.push([Ke.getByteAt(e,a),Ke.getByteAt(e,a+1),Ke.getByteAt(e,a+2)])}return{value:i,description:i.length>1?Ct(i)+At(i):""}}}function Ct(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function At(e){var t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var Ut={read:function(e,t){var n=function(e,t){return Ke.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=Ke.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=Ke.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":Pt(e,t,n),"Resolution Unit":Et(e,t,n),XResolution:Tt(e,t,n),YResolution:Ft(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){var a=function(e,t,n,r){if(!(0===n||16+n>r))return{value:e.buffer.slice(t+16,t+16+n),description:"<24-bit RGB pixel data>"}}(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(var u in o)void 0===o[u]&&delete o[u];return o}};function Pt(e,t,n){if(!(9>n)){var r=Ke.getByteAt(e,t+7),i=Ke.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function Et(e,t,n){if(!(10>n)){var r=Ke.getByteAt(e,t+9);return{value:r,description:wt(r)}}}function wt(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function Tt(e,t,n){if(!(12>n)){var r=Ke.getShortAt(e,t+10);return{value:r,description:""+r}}}function Ft(e,t,n){if(!(14>n)){var r=Ke.getShortAt(e,t+12);return{value:r,description:""+r}}}var Ot={iptc:{256:{name:"Model Version",description:function(e){return""+((e[0]<<8)+e[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(e){return""+((e[0]<<8)+e[1])}},278:{name:"File Format Version",description:function(e){return""+((e[0]<<8)+e[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Mt},336:{name:"Time Sent",description:Dt},346:{name:"Coded Character Set",description:xt,encoding_name:xt},356:"UNO",376:{name:"ARM Identifier",description:function(e){return""+((e[0]<<8)+e[1])}},378:{name:"ARM Version",description:function(e){return""+((e[0]<<8)+e[1])}},512:{name:"Record Version",description:function(e){return""+((e[0]<<8)+e[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===m(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=m(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=m(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:Mt},572:{name:"Time Created",description:Dt},574:{name:"Digital Creation Date",description:Mt},575:{name:"Digital Creation Time",description:Dt},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=m(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=m(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=m(e),n=t.charAt(0),r=t.charAt(1),i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt(m(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(m(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=m(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:function(e){return 2===e.length?"ObjectData Preview File Format":"Record 2 destination"},description:function(e){if(2===e.length){var t=(e[0]<<8)+e[1];return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":"Unknown format ".concat(t)}return m(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,t){var n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=m(e);if(t["ObjectData Preview File Format"]){var i=m(t["ObjectData Preview File Format"].value);if(n[i]&&n[i][r])return n[i][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:function(e){return e[0].toString()}},1812:{name:"Max Subfile Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function Mt(e){var t=m(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function Dt(e){var t=m(e),n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function xt(e){var t=m(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}var Lt={decode:function(e,t){var n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((function(e){return String.fromCharCode(e)})).join(""))},TAG_HEADER_SIZE:5},Nt=5,Rt={read:function(e,t,n){try{if(Array.isArray(e))return jt(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);var r=function(e,t){for(;t+12<=e.byteLength;){var n=kt(e,t);if(Gt(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+Bt(n)}throw Error("No IPTC NAA resource block.")}(e,t);return jt(e,r.naaBlock,r.dataOffset,n)}catch(e){return{}}}};function kt(e,t){if(943868237!==e.getUint32(t,0))throw Error("Not an IPTC resource block.");return{type:e.getUint16(t+4),size:e.getUint16(t+10)}}function Gt(e){return 1028===e.type}function Bt(e){return e.size%2!=0?1:0}function jt(e,t,n,r){for(var i={},o=void 0,a=n+t.size;n<a&&n<e.byteLength;){var u=_t(e,n,i,o,r),c=u.tag,f=u.tagSize;if(null===c)break;c&&("encoding"in c&&(o=c.encoding),void 0===i[c.name]||void 0===c.repeatable?i[c.name]={id:c.id,value:c.value,description:c.description}:(i[c.name]instanceof Array||(i[c.name]=[{id:i[c.name].id,value:i[c.name].value,description:i[c.name].description}]),i[c.name].push({id:c.id,value:c.value,description:c.description}))),n+=Nt+f}return i}function _t(e,t,n,r,i){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var o=e.getUint16(t+1),a=e.getUint16(t+3);if(!i&&!Ot.iptc[o])return{tag:void 0,tagSize:a};var u=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+Nt,a),c={id:o,name:zt(Ot.iptc[o],o,u),value:u,description:Ht(Ot.iptc[o],u,n,r)};return function(e){return Ot.iptc[e]&&Ot.iptc[e].repeatable}(o)&&(c.repeatable=1),function(e){return Ot.iptc[e]&&void 0!==Ot.iptc[e].encoding_name}(o)&&(c.encoding=Ot.iptc[o].encoding_name(u)),{tag:c,tagSize:a}}function zt(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:"undefined-".concat(t)}function Ht(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?Lt.decode(r,t):t}function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Vt={"tiff:Orientation":function(e){return"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e},"tiff:ResolutionUnit":function(e){return xe.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return Xt(xe.XResolution,e)},"tiff:YResolution":function(e){return Xt(xe.YResolution,e)},"exif:ApertureValue":function(e){return Xt(xe.ApertureValue,e)},"exif:GPSLatitude":Yt,"exif:GPSLongitude":Yt,"exif:FNumber":function(e){return Xt(xe.FNumber,e)},"exif:FocalLength":function(e){return Xt(xe.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return xe.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return xe.ColorSpace(function(e){return"0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)}(e))},"exif:ComponentsConfiguration":function(e,t){if(/^\d, \d, \d, \d$/.test(t)){var n=t.split(", ").map((function(e){return e.charCodeAt(0)}));return xe.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return xe.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return xe.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return xe.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return xe.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return Jt(e)?xe.ExposureTime(e.split("/").map((function(e){return parseInt(e,10)}))):e},"exif:MeteringMode":function(e){return xe.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return xe.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return xe.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return xe.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return Xt(xe.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return xe.WhiteBalance(parseInt(e,10))}};function Xt(e,t){return Jt(t)?e(t.split("/")):t}function Jt(e){return/^-?\d+\/-?\d+$/.test(e)}function Yt(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e.split(","))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return Wt(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],i=n[1];if(void 0!==r&&void 0!==i){var o=parseFloat(r),a=parseFloat(i),u=i.charAt(i.length-1);if(!Number.isNaN(o)&&!Number.isNaN(a))return""+(o+a/60)+u}return e}function qt(e){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(e)}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $t,Zt={read:function(e,t){var n={};if("string"==typeof e)return en(n,e),n;var r,i=(r=function(e,t){if(0===t.length)return[];var n=[Qt(e,t.slice(0,1))];return t.length>1&&n.push(Qt(e,t.slice(1))),n}(e,t),2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(r)||function(e,t){if(e){if("string"==typeof e)return Kt(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kt(e,2):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1],u=en(n,o);if(a){var c=en(n,a);u||c||(delete n._raw,en(n,Qt(e,t)))}return n}};function Qt(e,t){for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=0;o<t.length;o++){var a=t[o],u=e.buffer.slice(a.dataOffset,a.dataOffset+a.length);r.set(new Uint8Array(u),i),i+=a.length}return new DataView(r.buffer)}function en(e,t){try{var n=function(e){var t=function(){if("undefined"!=typeof DOMParser)return new DOMParser;try{return new(require("@xmldom/xmldom").DOMParser)({errorHandler:{error:function(){throw Error("Faulty XML")}}})}catch(e){return}}();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var n="string"==typeof e?e:o(e,0,e.byteLength),r=t.parseFromString(n.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1"),"application/xml");if("parsererror"===r.documentElement.nodeName)throw Error(r.documentElement.textContent);return{doc:r,raw:n}}(t),r=n.doc,i=n.raw;return e._raw=(e._raw||"")+i,f(e,on(nn(tn(r),1))),1}catch(e){return 0}}function tn(e){for(var t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return tn(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw Error()}function nn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(t=r).length&&"#text"===t[0].nodeName?n?{}:function(e){return e.nodeValue}(r[0]):function(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:rn(e),value:nn(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}(r)}function rn(e){for(var t={},n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}function on(e){var t={};if("string"==typeof e)return e;for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]),r.forEach((function(e){f(t,an(e.attributes)),"object"===qt(e.value)&&f(t,dn(e.value))}))}return t}function an(e){var t={};for(var n in e)try{un(n)&&(t[fn(n)]={value:e[n],attributes:{},description:sn(e[n],n)})}catch(e){}return t}function un(e){return"rdf:parseType"!==e&&!cn(e)}function cn(e){return"xmlns"===e.split(":")[0]}function fn(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e)){var n=function(e){return e.map((function(e){return void 0!==e.value?sn(e.value):sn(e)})).join(", ")}(e);return t&&"function"==typeof Vt[t]?Vt[t](e,n):n}if("object"===qt(e))return function(e){var t=[];for(var n in e)t.push("".concat(ln(n),": ").concat(sn(e[n].value)));return t.join("; ")}(e);try{return t&&"function"==typeof Vt[t]?Vt[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function ln(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function dn(e){var t={};for(var n in e)try{cn(n)||(t[fn(n)]=pn(e[n],n))}catch(e){}return t}function pn(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Cn(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:mn(e)?gn(e,t):hn(e)?yn(e,t):Sn(e)?bn(e,t):function(e){return void 0!==In(e.value)}(e)?function(e,t){var n=In(e.value).value["rdf:li"],r=vn(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return mn(e)?gn(e):hn(e)?yn(e).value:Sn(e)?bn(e).value:Cn(e)}(e))})),{value:i,attributes:r,description:sn(i,t)}}(e,t):Cn(e,t)}function mn(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function gn(e,t){var n=vn(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),f(n,vn(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||cn(n)||(t[fn(n)]=e.value[n].value);return t}(e));var r=function(e){return An(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:sn(r,t)}}function vn(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||cn(n)||(t[fn(n)]=e.attributes[n]);return t}function hn(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function yn(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(f(n.value,an(e.value["rdf:Description"].attributes)),f(n.attributes,vn(e)),e=e.value["rdf:Description"]),f(n.value,dn(e.value)),n.description=sn(n.value,t),n}function Sn(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function bn(e,t){var n=an(e.attributes);return{value:n,attributes:{},description:sn(n,t)}}function In(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Cn(e,t){var n=An(e)||on(e.value);return{value:n,attributes:vn(e),description:sn(n,t)}}function An(e){return e.attributes&&e.attributes["rdf:resource"]}function Un(e){return Un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(e)}function Pn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Un(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Un(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===Un(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function En(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wn={2e3:{name:"PathInformation",description:function(e){for(var t={},n=[],r=0;r<e.byteLength;r+=26){var i=Ke.getShortAt(e,r);Tn[i]&&(t[i]||(t[i]=Tn[i].description),n.push({type:i,path:Tn[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description:function(e){return(t=u(e,0),2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return En(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?En(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];var t}}},Tn=(Pn($t={},0,{description:"Closed subpath length",path:function(e,t){return[Ke.getShortAt(e,t)]}}),Pn($t,1,{description:"Closed subpath Bezier knot, linked",path:Fn}),Pn($t,2,{description:"Closed subpath Bezier knot, unlinked",path:Fn}),Pn($t,3,{description:"Open subpath length",path:function(e,t){return[Ke.getShortAt(e,t)]}}),Pn($t,4,{description:"Open subpath Bezier knot, linked",path:Fn}),Pn($t,5,{description:"Open subpath Bezier knot, unlinked",path:Fn}),Pn($t,6,{description:"Path fill rule",path:function(){return[]}}),Pn($t,8,{description:"Initial fill rule",path:function(e,t){return[Ke.getShortAt(e,t)]}}),Pn($t,7,{description:"Clipboard",path:function(e,t){return[[Mn(e,t,8),Mn(e,t+4,8),Mn(e,t+8,8),Mn(e,t+12,8)],Mn(e,t+16,8)]}}),$t);function Fn(e,t){for(var n=[],r=0;r<24;r+=8)n.push(On(e,t+r));return n}function On(e,t){var n=Mn(e,t,8);return[Mn(e,t+4,8),n]}function Mn(e,t,n){var r,i=Ke.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(d("1",32-n),2);return o*function(e,t){return parseInt(e.replace(".",""),2)/Math.pow(2,(e.split(".")[1]||"").length)}(a.toString(2)+"."+(d("0",32-n-(r=u.toString(2)).length)+r))}function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xn={read:function(e,t){for(var n=i(new Uint8Array(e).buffer),r={},a=0;a<e.length;){var u=o(n,a,kn);a+=kn;var c=Ke.getShortAt(n,a),f=Gn(n,a+=Nn),s=f.tagName;a+=f.tagNameSize;var l=Ke.getLongAt(n,a);if(a+=Rn,u===Ln){var d=i(n.buffer,a,l),p={id:c,value:o(d,0,l)};if(wn[c]){try{p.description=wn[c].description(d)}catch(e){p.description="<no description formatter>"}r[s||wn[c].name]=p}else t&&(r["undefined-".concat(c)]=p)}a+=l+l%2}return r}},Ln="8BIM",Nn=2,Rn=4,kn=Ln.length;function Gn(e,t){var n,r=(2,function(e){if(Array.isArray(e))return e}(n=u(e,t))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(n)||function(e,t){if(e){if("string"==typeof e)return Dn(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dn(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0];return{tagName:r[1],tagNameSize:1+i+(i%2==0?1:0)}}var Bn={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},jn={4:{name:"Preferred CMM type",value:function(e,t){return o(e,t,4)},description:function(e){return null!==e?_n(e):""}},8:{name:"Profile Version",value:function(e,t){return e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(e,t){return o(e,t,4)},description:function(e){switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:function(e,t){return o(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return o(e,t,4)}},24:{name:"ICC Profile Date",value:function(e,t){return function(e,t){var n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),o=e.getUint16(t+6),a=e.getUint16(t+8),u=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,o,a,u))}(e,t).toISOString()}},36:{name:"ICC Signature",value:function(e,t){return n=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(n));var n}},40:{name:"Primary Platform",value:function(e,t){return o(e,t,4)},description:function(e){return _n(e)}},48:{name:"Device Manufacturer",value:function(e,t){return o(e,t,4)},description:function(e){return _n(e)}},52:{name:"Device Model Number",value:function(e,t){return o(e,t,4)}},64:{name:"Rendering Intent",value:function(e,t){return e.getUint32(t)},description:function(e){switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:function(e,t){return o(e,t,4)}}};function _n(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var zn={read:function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,u=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),c=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var o=u.slice(n.offset,n.offset+n.length),a=new Uint8Array(o);r.set(a,i),i+=a.length},f=1;f<=t.length;f++)c(f);return function(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.length<Hn)throw Error("ICC profile too short");for(var r={},i=Object.keys(jn),u=0;u<i.length;u++){var c=i[u],f=jn[c],s=f.value(e,parseInt(c,10)),l=s;f.description&&(l=f.description(s)),r[f.name]={value:s,description:l}}if(Zn(t.slice(36,40))!==Vn)throw Error("ICC profile: missing signature");if(function(e){return e.length<Wn+4}(t))return r;for(var d=e.getUint32(128),p=132,m=0;m<d;m++){if($n(t,p))return r;var g=o(e,p,4),v=e.getUint32(p+4),h=e.getUint32(p+8);if(v>t.length)return r;var y=o(e,v,4);if(y===Xn){var S=e.getUint32(v+8);if(S>h)return r;Qn(r,g,Zn(t.slice(v+12,v+S+11)))}else if(y===Jn){for(var b=e.getUint32(v+8),I=e.getUint32(v+12),C=v+16,A=[],U=0;U<b;U++){var P=o(e,C+0,2),E=o(e,C+2,2),w=e.getUint32(C+4),T=e.getUint32(C+8),F=a(e,v+T,w);A.push({languageCode:P,countryCode:E,text:F}),C+=I}if(1===b)Qn(r,g,A[0].text);else{for(var O={},M=0;M<A.length;M++)O["".concat(A[M].languageCode,"-").concat(A[M].countryCode)]=A[M].text;Qn(r,g,O)}}else y===Yn?Qn(r,g,Zn(t.slice(v+8,v+h-7))):y===qn&&Qn(r,g,Zn(t.slice(v+8,v+12)));p+=12}return r}(new DataView(r.buffer))}catch(e){return{}}}},Hn=84,Wn=128,Vn="acsp",Xn="desc",Jn="mluc",Yn="text",qn="sig ",Kn=12;function $n(e,t){return e.length<t+Kn}function Zn(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function Qn(e,t,n){Bn[t]?e[Bn[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var er={read:function(e,t){return{"Image Width":tr(e,t),"Image Height":nr(e,t),"Bit Depth":rr(e,t),"Color Type":ir(e,t),Compression:or(e,t),Filter:ar(e,t),Interlace:ur(e,t)}}};function tr(e,t){if(!(t+0+4>e.byteLength)){var n=Ke.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function nr(e,t){if(!(t+4+4>e.byteLength)){var n=Ke.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function rr(e,t){if(!(t+8+1>e.byteLength)){var n=Ke.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function ir(e,t){if(!(t+9+1>e.byteLength)){var n=Ke.getByteAt(e,t+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}}function or(e,t){if(!(t+10+1>e.byteLength)){var n=Ke.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function ar(e,t){if(!(t+11+1>e.byteLength)){var n=Ke.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function ur(e,t){if(!(t+12+1>e.byteLength)){var n=Ke.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}var cr={read:function(e,t){return t.reduce((function(t,n){var r=n.offset,i=n.length,o=n.type,a=function(e,t,n,r){for(var i=[],o=[],a=[],u=[],f=fr,s=0;s<n&&t+s<e.byteLength;s++){if(f===sr){if(0!==e.getUint8(t+s))return{};s+=mr,f=gr(r,f)}var l=e.getUint8(t+s);0===l?f=gr(r,f):f===fr?i.push(l):f===lr?o.push(l):f===dr?a.push(l):u.push(l)}var d=c(u);return{name:vr(r,o,i),value:d,description:r===be?Lt.decode("UTF-8",u):d}}(e,r,i,o),u=a.name,f=a.value,s=a.description;return u&&(t[u]={value:f,description:s}),t}),{})}},fr="STATE_KEYWORD",sr="STATE_COMPRESSION",lr="STATE_LANG",dr="STATE_TRANSLATED_KEYWORD",pr="STATE_TEXT",mr=2;function gr(e,t){return t===fr&&e===be?sr:t===sr?lr:t===lr?dr:pr}function vr(e,t,n){var r=c(n);if("tEXt"===e||0===t.length)return r;var i=c(t);return"".concat(r," (").concat(i,")")}var hr={read:function(e,t){for(var n={},r=0;r<t.length;r++){var i=Ke.getLongAt(e,t[r]+ve),a=o(e,t[r]+he,ge);a===Ie?(n["Pixels Per Unit X"]=yr(e,t[r],i),n["Pixels Per Unit Y"]=Sr(e,t[r],i),n["Pixel Units"]=br(e,t[r],i)):a===Ce&&(n["Modify Date"]=Ir(e,t[r],i))}return n}};function yr(e,t,n){if(Cr(e,t,n,0,4)){var r=Ke.getLongAt(e,t+ye+0);return{value:r,description:""+r}}}function Sr(e,t,n){if(Cr(e,t,n,4,4)){var r=Ke.getLongAt(e,t+ye+4);return{value:r,description:""+r}}}function br(e,t,n){if(Cr(e,t,n,8,1)){var r=Ke.getByteAt(e,t+ye+8);return{value:r,description:1===r?"meters":"Unknown"}}}function Ir(e,t,n){if(Cr(e,t,n,0,7)){var r=Ke.getShortAt(e,t+ye),i=Ke.getByteAt(e,t+ye+2),o=Ke.getByteAt(e,t+ye+3),a=Ke.getByteAt(e,t+ye+4),u=Ke.getByteAt(e,t+ye+5),c=Ke.getByteAt(e,t+ye+6);return{value:[r,i,o,a,u,c],description:"".concat(Ar(r,4),"-").concat(Ar(i,2),"-").concat(Ar(o,2)," ").concat(Ar(a,2),":").concat(Ar(u,2),":").concat(Ar(c,2))}}}function Cr(e,t,n,r,i){return r+i<=n&&t+ye+r+i<=e.byteLength}function Ar(e,t){return"".concat("0".repeat(t-(""+e).length)).concat(e)}var Ur={read:function(e,t){var n={},r=Ke.getByteAt(e,t);return n.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.ImageWidth=wr(e,t+Pr),n.ImageHeight=wr(e,t+Er),n}},Pr=4,Er=7;function wr(e,t){var n=Ke.getByteAt(e,t)+256*Ke.getByteAt(e,t+1)+65536*Ke.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Tr=[6,7,99],Fr={get:function(e,t,n){if((i=t)&&(void 0===i.Compression||Tr.includes(i.Compression.value))&&i.JPEGInterchangeFormat&&i.JPEGInterchangeFormat.value&&i.JPEGInterchangeFormatLength&&i.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),s(t,"base64",(function(){return l(this.image)}))}var i;return t}};function Or(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}Or.prototype=Error();var Mr={MetadataMissingError:Or},Dr={load:Lr,loadView:Rr,errors:Mr},xr=Mr;function Lr(e,t){return function(e){return"string"==typeof e}(e)?function(e,t){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length,n={method:"GET"};return Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-".concat(t-1)}),fetch(e,n).then((function(e){return e.arrayBuffer()}))}(e,t):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-".concat(t-1)});var o=function(e){return/^https:\/\//.test(e)?require("https").get:require("http").get}(e);o(e,i,(function(e){if(e.statusCode>=200&&e.statusCode<=299){var t=[];e.on("data",(function(e){return t.push(Buffer.from(e))})),e.on("error",(function(e){return r(e)})),e.on("end",(function(){return n(Buffer.concat(t))}))}else r("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage)),e.resume()})).on("error",(function(e){return r(e)}))}))}(e,t):function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e)?Promise.resolve(function(e){var t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(function(e){return e.charCodeAt(0)})).buffer;if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}var n=decodeURIComponent(t);return"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(function(e){return e.charCodeAt(0)})).buffer}(e)):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i=function(){try{return require("fs")}catch(e){return}}();i.open(e,(function(o,a){o?r(o):i.stat(e,(function(o,u){if(o)r(o);else{var c=Math.min(u.size,void 0!==t?t:u.size),f=Buffer.alloc(c),s={buffer:f,length:c};i.read(a,s,(function(t){t?r(t):i.close(a,(function(t){t&&console.warn("Could not close file ".concat(e,":"),t),n(f)}))}))}}))}))}))}(e,t)}(e,t).then((function(e){return Nr(e,t)})):function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e)?(n=e,new Promise((function(e,t){var r=new FileReader;r.onload=function(t){return e(t.target.result)},r.onerror=function(){return t(r.error)},r.readAsArrayBuffer(n)}))).then((function(e){return Nr(e,t)})):Nr(e,t);var n}function Nr(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),Rr(function(e){try{return new DataView(e)}catch(t){return new r(e)}}(e),t)}function Rr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,includeUnknown:0},n=t.expanded,r=void 0===n?0:n,i=t.includeUnknown,o=void 0===i?0:i,a=0,u={},s=Me.parseAppMarkers(e),l=s.fileType,d=s.fileDataOffset,m=s.jfifDataOffset,g=s.tiffHeaderOffset,h=s.iptcDataOffset,y=s.xmpChunks,S=s.iccChunks,b=s.mpfDataOffset,I=s.pngHeaderOffset,C=s.pngTextChunks,A=s.pngChunkOffsets,U=s.vp8xChunkOffset;if(p.USE_JPEG&&p.USE_FILE&&function(e){return void 0!==e}(d)){a=1;var P=ht.read(e,d);r?u.file=P:u=f({},u,P)}if(p.USE_JPEG&&p.USE_JFIF&&function(e){return void 0!==e}(m)){a=1;var E=Ut.read(e,m);r?u.jfif=E:u=f({},u,E)}if(p.USE_EXIF&&function(e){return void 0!==e}(g)){a=1;var w=ft.read(e,g,o);if(w.Thumbnail&&(u.Thumbnail=w.Thumbnail,delete w.Thumbnail),r?(u.exif=w,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=v(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=v(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(u)):u=f({},u,w),p.USE_TIFF&&p.USE_IPTC&&w["IPTC-NAA"]&&!kr(h)){var T=Rt.read(w["IPTC-NAA"].value,0,o);r?u.iptc=T:u=f({},u,T)}if(p.USE_TIFF&&p.USE_XMP&&w.ApplicationNotes&&!Gr(y)){var F=Zt.read(c(w.ApplicationNotes.value));r?u.xmp=F:(delete F._raw,u=f({},u,F))}if(p.USE_PHOTOSHOP&&w.ImageSourceData){var O=xn.read(w.PhotoshopSettings.value,o);r?u.photoshop=O:u=f({},u,O)}if(p.USE_TIFF&&p.USE_ICC&&w.ICC_Profile&&!Br(S)){var M=zn.read(w.ICC_Profile.value,[{offset:0,length:w.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);r?u.icc=M:u=f({},u,M)}}if(p.USE_JPEG&&p.USE_IPTC&&kr(h)){a=1;var D=Rt.read(e,h,o);r?u.iptc=D:u=f({},u,D)}if(p.USE_XMP&&Gr(y)){a=1;var x=Zt.read(e,y);r?u.xmp=x:(delete x._raw,u=f({},u,x))}if((p.USE_JPEG||p.USE_WEBP)&&p.USE_ICC&&Br(S)){a=1;var L=zn.read(e,S);r?u.icc=L:u=f({},u,L)}if(p.USE_MPF&&function(e){return void 0!==e}(b)){a=1;var N=st.read(e,b,o);r?u.mpf=N:u=f({},u,N)}if(p.USE_PNG&&p.USE_PNG_FILE&&void 0!==I){a=1;var R=er.read(e,I);r?(u.png=u.png?f({},u.png,R):R,u.pngFile=R):u=f({},u,R)}if(p.USE_PNG&&function(e){return void 0!==e}(C)){a=1;var k=cr.read(e,C);r?(u.png=u.png?f({},u.png,k):k,u.pngText=k):u=f({},u,k)}if(p.USE_PNG&&function(e){return void 0!==e}(A)){a=1;var G=hr.read(e,A);r?u.png=u.png?f({},u.png,G):G:u=f({},u,G)}if(p.USE_WEBP&&function(e){return void 0!==e}(U)){a=1;var B=Ur.read(e,U);r?u.riff=u.riff?f({},u.riff,B):B:u=f({},u,B)}var j=(p.USE_JPEG||p.USE_WEBP)&&p.USE_EXIF&&p.USE_THUMBNAIL&&Fr.get(e,u.Thumbnail,g);if(j?(a=1,u.Thumbnail=j):delete u.Thumbnail,l&&(r?(u.file||(u.file={}),u.file.FileType=l):u.FileType=l),!a)throw new Mr.MetadataMissingError;return u}function kr(e){return void 0!==e}function Gr(e){return Array.isArray(e)&&e.length>0}function Br(e){return Array.isArray(e)&&e.length>0}return t}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ExifReader=t():e.ExifReader=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:1,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},t={};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}e.r(t),e.d(t,{default:function(){return jr},errors:function(){return zr},load:function(){return Hr},loadView:function(){return Vr}});var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==n(e)||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(t))throw Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}var t,r;return t=e,(r=[{key:"getUint8",value:function(e){return this.buffer.readUInt8(e)}},{key:"getUint16",value:function(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}},{key:"getUint32",value:function(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}},{key:"getInt32",value:function(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}])&&function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||0,i.configurable=1,"value"in i&&(i.writable=1),Object.defineProperty(e,(o=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(i.key),"symbol"===n(o)?o:o+""),i)}var o}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:0}),e}();function i(e,t,n){try{return new DataView(e,t,n)}catch(i){return new r(e,t,n)}}function o(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return c(r)}function a(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),c(r)}function u(e,t){var n=e.getUint8(t);return[n,o(e,t+1,n)]}function c(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function f(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function s(e,t,n){var r=0;Object.defineProperty(e,t,{get:function(){return r||(r=1,Object.defineProperty(e,t,{configurable:1,enumerable:1,value:n.apply(e),writable:1})),e[t]},configurable:1,enumerable:1})}function l(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function d(e,t){return Array(t+1).join(e)}var p={USE_FILE:1,USE_JFIF:1,USE_PNG_FILE:1,USE_EXIF:1,USE_IPTC:1,USE_XMP:1,USE_ICC:1,USE_MPF:1,USE_PHOTOSHOP:1,USE_THUMBNAIL:1,USE_TIFF:1,USE_JPEG:1,USE_PNG:1,USE_HEIC:1,USE_WEBP:1,USE_GIF:1};function m(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function g(e){if(e.length>=8){var t=m(e.slice(0,8));if("ASCII\0\0\0"===t)return m(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function v(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var h=18761,y=19789,S={BIG_ENDIAN:y,LITTLE_ENDIAN:h,getByteOrder:function(e,t){if(e.getUint16(t)===h)return h;if(e.getUint16(t)===y)return y;throw Error("Illegal byte order value. Faulty image.")}},b=2,I=65496,C=2,A=4,U=2,P=2,E=10,w=18,T=33,F=79,O=18,M=8,D="ICC_PROFILE\0",L=A+D.length,x=L+1,N="MPF\0",R=65472,k=65474,G=65476,B=65499,_=65501,j=65498,z=65504,H=65505,W=65506,V=65517,X=65519,J=65534,Y=65535,q="JFIF",K="Exif",$="http://ns.adobe.com/xap/1.0/\0",Z="http://ns.adobe.com/xmp/extension/\0",Q="Photoshop 3.0";function ee(e,t){return e.getUint16(t)===R}function te(e,t){return e.getUint16(t)===k}function ne(e,t){var n=D.length;return e.getUint16(t)===W&&o(e,t+A,n)===D}function re(e,t){var n=N.length;return e.getUint16(t)===W&&o(e,t+A,n)===N}function ie(e,t){var n=K.length;return e.getUint16(t)===z&&o(e,t+A,n)===q&&0===e.getUint8(t+A+n)}function oe(e,t){var n=K.length;return e.getUint16(t)===H&&o(e,t+A,n)===K&&0===e.getUint8(t+A+n)}function ae(e,t){return e.getUint16(t)===H&&function(e,t){var n=$.length;return o(e,t+A,n)===$}(e,t)}function ue(e,t){return e.getUint16(t)===H&&function(e,t){var n=Z.length;return o(e,t+A,n)===Z}(e,t)}function ce(e,t){return{dataOffset:e+T,length:t-(T-U)}}function fe(e,t){return{dataOffset:e+F,length:t-(F-U)}}function se(e,t){var n=Q.length;return e.getUint16(t)===V&&o(e,t+A,n)===Q&&0===e.getUint8(t+A+n)}function le(e,t){var n=e.getUint16(t);return n>=z&&n<=X||n===J||n===R||n===k||n===G||n===B||n===_||n===j}function de(e,t){return e.getUint16(t)===Y}var pe="PNG\r\n\n",me=4,ge=4,ve=0,he=me,ye=me+ge,Se="XML:com.adobe.xmp\0",be="iTXt",Ie="pHYs",Ce="tIME",Ae="eXIf";function Ue(e,t){return"IHDR"===o(e,t+he,ge)}function Pe(e,t){return"iTXt"===o(e,t+he,ge)&&o(e,t+ye,Se.length)===Se}function Ee(e,t){var n=o(e,t+he,ge);return"tEXt"===n||"iTXt"===n}function we(e,t){return o(e,t+he,ge)===Ae}function Te(e,t){var n=[Ie,Ce],r=o(e,t+he,ge);return n.includes(r)}function Fe(e,t){t+=ye+Se.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Oe(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?e.byteLength-t:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?e.getUint32(t+12):n}var Me=6,De=["GIF87a","GIF89a"],Le={parseAppMarkers:function(e){if(p.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===S.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)}(e))return xe(p.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(p.USE_JPEG&&function(e){return!!e&&e.byteLength>=b&&e.getUint16(0)===I}(e))return xe(function(e){for(var t,n,r,i,o,a,u,c,f,s=C;s+A+5<=e.byteLength;){if(p.USE_FILE&&ee(e,s))n=s+U;else if(p.USE_FILE&&te(e,s))r=s+U;else if(p.USE_JFIF&&ie(e,s))t=e.getUint16(s+U),i=s+P;else if(p.USE_EXIF&&oe(e,s))t=e.getUint16(s+U),o=s+E;else if(p.USE_XMP&&ae(e,s))u||(u=[]),t=e.getUint16(s+U),u.push(ce(s,t));else if(p.USE_XMP&&ue(e,s))u||(u=[]),t=e.getUint16(s+U),u.push(fe(s,t));else if(p.USE_IPTC&&se(e,s))t=e.getUint16(s+U),a=s+w;else if(p.USE_ICC&&ne(e,s)){t=e.getUint16(s+U);var l=s+O,d=t-(O-U),m=e.getUint8(s+L),g=e.getUint8(s+x);c||(c=[]),c.push({offset:l,length:d,chunkNumber:m,chunksTotal:g})}else if(p.USE_MPF&&re(e,s))t=e.getUint16(s+U),f=s+M;else{if(!le(e,s)){if(de(e,s)){s++;continue}break}t=e.getUint16(s+U)}s+=U+t}return{hasAppMarkers:s>C,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:c,mpfDataOffset:f}}(e),"jpeg","JPEG");if(p.USE_PNG&&function(e){return!!e&&o(e,0,pe.length)===pe}(e))return xe(function(e){for(var t={hasAppMarkers:0},n=pe.length;n+me+ge<=e.byteLength;){if(p.USE_PNG_FILE&&Ue(e,n))t.hasAppMarkers=1,t.pngHeaderOffset=n+ye;else if(p.USE_XMP&&Pe(e,n)){var r=Fe(e,n);void 0!==r&&(t.hasAppMarkers=1,t.xmpChunks=[{dataOffset:r,length:e.getUint32(n+ve)-(r-(n+ye))}])}else if(Ee(e,n)){t.hasAppMarkers=1;var i=o(e,n+he,ge);t.pngTextChunks||(t.pngTextChunks=[]),t.pngTextChunks.push({length:e.getUint32(n+ve),type:i,offset:n+ye})}else we(e,n)?(t.hasAppMarkers=1,t.tiffHeaderOffset=n+ye):Te(e,n)&&(t.hasAppMarkers=1,t.pngChunkOffsets||(t.pngChunkOffsets=[]),t.pngChunkOffsets.push(n+ve));n+=e.getUint32(n+ve)+me+ge+4}return t}(e),"png","PNG");if(p.USE_HEIC&&function(e){if(!e)return 0;var t=o(e,8,4);return"ftyp"===o(e,4,4)&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t)}(e))return xe(function(e){if(p.USE_EXIF||p.USE_ICC){var t=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Oe(e,t);if(n>=8&&"meta"===o(e,t+4,4))return{offset:t,length:n};t+=n}return{offset:void 0,length:0}}(e),n=t.offset,r=t.length;if(void 0===n)return{hasAppMarkers:0};var i=Math.min(n+r,e.byteLength),a=function(e,t,n){for(var r={ilocOffset:void 0,exifItemOffset:void 0,colrOffset:void 0};t+4<=n&&(!r.ilocOffset||!r.exifItemOffset||!r.colrOffset);){var i=o(e,t,4);p.USE_EXIF&&"iloc"===i?r.ilocOffset=t:p.USE_EXIF&&"Exif"===i?r.exifItemOffset=t+-4:p.USE_ICC&&"colr"===i&&(r.colrOffset=t+-4),t++}return r}(e,n,i),u=a.exifItemOffset,c=a.ilocOffset,f=a.colrOffset,s=function(e,t,n,r){if(n&&t&&!(t+2>r)){var i=e.getUint16(t);for(n+=12;n+16<=r;){if(e.getUint16(n)===i){var o=e.getUint32(n+8);if(o+4<=e.byteLength)return o+(e.getUint32(o)+4)}n+=16}}}(e,u,c,i),l=function(e,t,n){if(t&&!(t+12>n)){var r=o(e,t+8,4);if("prof"===r||"rICC"===r)return[{offset:t+12,length:Oe(e,t)-12,chunkNumber:1,chunksTotal:1}]}}(e,f,i);return{hasAppMarkers:void 0!==s||void 0!==l,tiffHeaderOffset:s,iccChunks:l}}return{hasAppMarkers:0}}(e),"heic","HEIC");if(p.USE_WEBP&&function(e){return!!e&&"RIFF"===o(e,0,4)&&"WEBP"===o(e,8,4)}(e))return xe(function(e){for(var t,n,r,i,a=12,u=0;a+8<e.byteLength;){var c=o(e,a,4),f=e.getUint32(a+4,1);p.USE_EXIF&&"EXIF"===c?(u=1,t="Exif\0\0"===o(e,a+8,6)?a+8+6:a+8):p.USE_XMP&&"XMP "===c?(u=1,n=[{dataOffset:a+8,length:f}]):p.USE_ICC&&"ICCP"===c?(u=1,r=[{offset:a+8,length:f,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(u=1,i=a+8),a+=8+(f%2==0?f:f+1)}return{hasAppMarkers:u,tiffHeaderOffset:t,xmpChunks:n,iccChunks:r,vp8xChunkOffset:i}}(e),"webp","WebP");if(p.USE_GIF&&function(e){return!!e&&De.includes(o(e,0,Me))}(e))return xe({gifHeaderOffset:0},"gif","GIF");throw Error("Invalid image format")}};function xe(e,t,n){return f({},e,{fileType:{value:t,description:n}})}var Ne={ApertureValue:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},ColorSpace:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"},ComponentsConfiguration:function(e){return e.map((function(e){return 49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0})).join("")},Contrast:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},CustomRendered:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"},ExposureMode:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"},ExposureProgram:function(e){return 0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown"},ExposureTime:function(e){return e[0]>=e[1]?"".concat(Math.round(e[0]/e[1])):0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])},FNumber:function(e){return"f/".concat(e[0]/e[1])},FocalLength:function(e){return e[0]/e[1]+" mm"},FocalPlaneResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},LightSource:function(e){return 1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 – 7100K)":13===e?"Day white fluorescent (N 4600 – 5400K)":14===e?"Cool white fluorescent (W 3900 – 4500K)":15===e?"White fluorescent (WW 3200 – 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown"},MeteringMode:function(e){return 1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown"},ResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},Saturation:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"},SceneCaptureType:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"},Sharpness:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},ShutterSpeedValue:function(e){var t=Math.pow(2,e[0]/e[1]);return t<=1?"".concat(Math.round(1/t)):"1/".concat(Math.round(t))},WhiteBalance:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"},XResolution:function(e){return""+Math.round(e[0]/e[1])},YResolution:function(e){return""+Math.round(e[0]/e[1])}},Re={11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown"}},255:{name:"OldSubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown"}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return{1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown"}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return{1:"Normal",2:"Reversed"}[e]||"Unknown"}},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:function(e){return 1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"}},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:Ne.XResolution},283:{name:"YResolution",description:Ne.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:function(e){return""+Math.round(e[0]/e[1])}},287:{name:"YPosition",description:function(e){return""+Math.round(e[0]/e[1])}},290:{name:"GrayResponseUnit",description:function(e){return{1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown"}},296:{name:"ResolutionUnit",description:Ne.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},319:{name:"PrimaryChromaticities",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return{1:"CMYK",2:"Not CMYK"}[e]||"Unknown"}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return{0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown"}},339:{name:"SampleFormat",description:function(e){var t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((function(e){return t[e]||"Unknown"})).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join("/")}},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:{name:"ReferenceBlackWhite",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join(", ")}},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:function(e){return e.join("; ")}},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",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",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:function(e){return{0:"Unsafe",1:"Safe"}[e]||"Unknown"}},50778:{name:"CalibrationIlluminant1",description:Ne.LightSource},50779:{name:"CalibrationIlluminant2",description:Ne.LightSource},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:{name:"ProfileEmbedPolicy",description:function(e){return{0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown"}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return{1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown"}},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:{name:"ProfileHueSatMapEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51108:{name:"ProfileLookTableEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return{0:"Auto",1:"None"}[e]||"Unknown"}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Be,_e={0:{name:"GPSVersionID",description:function(e){return 2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"}},1:{name:"GPSLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:v},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:v},5:{name:"GPSAltitudeRef",description:function(e){return 0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"}},6:{name:"GPSAltitude",description:function(e){return e[0]/e[1]+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map((function(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return Ge(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0]/n[1];return/^\d(\.|$)/.test("".concat(r))?"0".concat(r):r})).join(":")}},8:"GPSSatellites",9:{name:"GPSStatus",description:function(e){var t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:function(e){var t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},21:{name:"GPSDestLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},23:{name:"GPSDestBearingRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:g},28:{name:"GPSAreaInformation",description:g},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},je={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return m(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},ze={45056:{name:"MPFVersion",description:function(e){return m(e)}},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function We(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==He(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===He(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var Ve=f({},Re,{33434:{name:"ExposureTime",description:Ne.ExposureTime},33437:{name:"FNumber",description:Ne.FNumber},34850:{name:"ExposureProgram",description:Ne.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:function(e){return{1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown"}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:function(e){return m(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Ne.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Ne.ShutterSpeedValue},37378:{name:"ApertureValue",description:Ne.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},37382:{name:"SubjectDistance",description:function(e){return e[0]/e[1]+" m"}},37383:{name:"MeteringMode",description:Ne.MeteringMode},37384:{name:"LightSource",description:Ne.LightSource},37385:{name:"Flash",description:function(e){return 0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"}},37386:{name:"FocalLength",description:Ne.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return{C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown"}},37395:"ImageHistory",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: ".concat(e[0],", Y: ").concat(e[1]):3===e.length?"Circle; X: ".concat(e[0],", Y: ").concat(e[1],", diameter: ").concat(e[2]):4===e.length?"Rectangle; X: ".concat(e[0],", Y: ").concat(e[1],", width: ").concat(e[2],", height: ").concat(e[3]):"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:g},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:function(e){return e[0]/e[1]+" °C"}},37889:{name:"Humidity",description:function(e){return e[0]/e[1]+" %"}},37890:{name:"Pressure",description:function(e){return e[0]/e[1]+" hPa"}},37891:{name:"WaterDepth",description:function(e){return e[0]/e[1]+" m"}},37892:{name:"Acceleration",description:function(e){return e[0]/e[1]+" mGal"}},37893:{name:"CameraElevationAngle",description:function(e){return e[0]/e[1]+" °"}},40960:{name:"FlashpixVersion",description:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}},40961:{name:"ColorSpace",description:Ne.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:function(){return"[Raw SFR table data]"}},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:Ne.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:function(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return ke(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],i=n[1];return"X: ".concat(r,", Y: ").concat(i)}},41493:"ExposureIndex",41495:{name:"SensingMethod",description:function(e){return 1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"}},41728:{name:"FileSource",description:function(e){return 3===e?"DSC":"Unknown"}},41729:{name:"SceneType",description:function(e){return 1===e?"A directly photographed image":"Unknown"}},41730:{name:"CFAPattern",description:function(){return"[Raw CFA pattern table data]"}},41985:{name:"CustomRendered",description:Ne.CustomRendered},41986:{name:"ExposureMode",description:Ne.ExposureMode},41987:{name:"WhiteBalance",description:Ne.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:function(e){return 0===e?"Unknown":e}},41990:{name:"SceneCaptureType",description:Ne.SceneCaptureType},41991:{name:"GainControl",description:function(e){return 0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"}},41992:{name:"Contrast",description:Ne.Contrast},41993:{name:"Saturation",description:Ne.Saturation},41994:{name:"Sharpness",description:Ne.Sharpness},41995:{name:"DeviceSettingDescription",description:function(){return"[Raw device settings table data]"}},41996:{name:"SubjectDistanceRange",description:function(e){return 1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"}},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:function(e){var t="".concat(e[0][0]/e[0][1],"-").concat(e[1][0]/e[1][1]," mm");return 0===e[3][1]?"".concat(t," f/?"):"".concat(t," f/").concat(1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1])))}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return{1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown"}},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",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"}),Xe="0th",Je="exif",Ye="interoperability",qe=(We(Be={},Xe,Ve),We(Be,"1st",Re),We(Be,Je,Ve),We(Be,"gps",_e),We(Be,Ye,je),We(Be,"mpf",p.USE_MPF?ze:{}),Be),Ke={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},$e={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Ze={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:Qe,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===S.LITTLE_ENDIAN)},getLongAt:et,getRationalAt:function(e,t,n){return[et(e,t,n),et(e,t+4,n)]},getUndefinedAt:function(e,t){return Qe(e,t)},getSlongAt:tt,getSrationalAt:function(e,t,n){return[tt(e,t,n),tt(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return et(e,t,n)},typeSizes:Ke,tagTypes:$e,getTypeSize:function(e){if(void 0===$e[e])throw Error("No such type found.");return Ke[$e[e]]}};function Qe(e,t){return e.getUint8(t)}function et(e,t,n){return e.getUint32(t,n===S.LITTLE_ENDIAN)}function tt(e,t,n){return e.getInt32(t,n===S.LITTLE_ENDIAN)}var nt={1:Ze.getByteAt,2:Ze.getAsciiAt,3:Ze.getShortAt,4:Ze.getLongAt,5:Ze.getRationalAt,7:Ze.getUndefinedAt,9:Ze.getSlongAt,10:Ze.getSrationalAt,13:Ze.getIfdPointerAt};function rt(e,t,n){return t+Ze.getLongAt(e,t+4,n)}function it(e,t,n,r,i,o){var a=Ze.getTypeSize("SHORT"),u={},c=function(e,t,n){return t+Ze.getTypeSize("SHORT")<=e.byteLength?Ze.getShortAt(e,t,n):0}(e,r,i);r+=a;for(var f=0;f<c&&!(r+12>e.byteLength);f++){var s=ot(e,t,n,r,i,o);void 0!==s&&(u[s.name]={id:s.id,value:s.value,description:s.description}),r+=12}if(p.USE_THUMBNAIL&&r<e.byteLength-Ze.getTypeSize("LONG")){var l=Ze.getLongAt(e,r,i);0!==l&&t===Xe&&(u.Thumbnail=it(e,"1st",n,n+l,i,1))}return u}function ot(e,t,n,r,i,o){var a,u=Ze.getTypeSize("SHORT"),c=u+Ze.getTypeSize("SHORT"),f=c+Ze.getTypeSize("LONG"),s=Ze.getShortAt(e,r,i),l=Ze.getShortAt(e,r+u,i),d=Ze.getLongAt(e,r+c,i);if(void 0!==Ze.typeSizes[l]&&(o||void 0!==qe[t][s])){if(function(e,t){return Ze.typeSizes[e]*t<=Ze.getTypeSize("LONG")}(l,d))a=at(e,r+f,l,d,i);else{var p=Ze.getLongAt(e,r+f,i);a=function(e,t,n,r,i){return t+n+Ze.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)?at(e,n+p,l,d,i,33723===s):"<faulty value>"}l===Ze.tagTypes.ASCII&&(a=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(a=function(e){for(var t=[],n=0,r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(a)));var m="undefined-".concat(s),g=a;if(void 0!==qe[t][s])if(void 0!==qe[t][s].name&&void 0!==qe[t][s].description){m=qe[t][s].name;try{g=qe[t][s].description(a)}catch(e){g=ut(a)}}else l===Ze.tagTypes.RATIONAL||l===Ze.tagTypes.SRATIONAL?(m=qe[t][s],g=""+a[0]/a[1]):(m=qe[t][s],g=ut(a));return{id:s,name:m,value:a,description:g}}}function at(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=Ze.typeSizes[n],n=Ze.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(nt[n](e,t,i)),t+=Ze.typeSizes[n];return n===Ze.tagTypes.ASCII?o=Ze.getAsciiValue(o):1===o.length&&(o=o[0]),o}function ut(e){return e instanceof Array?e.join(", "):e}var ct="Exif IFD Pointer",ft="GPS Info IFD Pointer",st="Interoperability IFD Pointer",lt={read:function(e,t,n){var r=S.getByteOrder(e,t),i=function(e,t,n,r){return it(e,Xe,t,rt(e,t,n),n,r)}(e,t,r,n);return function(e,t,n,r,i){return void 0!==e[st]?f(e,it(t,Ye,n,n+e[st].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[ft]?f(e,it(t,"gps",n,n+e[ft].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[ct]?f(e,it(t,Je,n,n+e[ct].value,r,i)):e}(i,e,t,r,n),e,t,r,n),e,t,r,n)}},dt={read:function(e,t,n){var r=S.getByteOrder(e,t);return function(e,t,n,r){if(!n.MPEntry)return n;for(var i=[],o=0;o<Math.ceil(n.MPEntry.value.length/pt);o++){i[o]={};var a=mt(n.MPEntry.value,o*pt,Ze.getTypeSize("LONG"),r);i[o].ImageFlags=gt(a),i[o].ImageFormat=vt(a),i[o].ImageType=ht(a);var u=mt(n.MPEntry.value,o*pt+4,Ze.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var c=yt(o,n.MPEntry,r,t);i[o].ImageOffset={value:c,description:""+c};var f=mt(n.MPEntry.value,o*pt+12,Ze.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:f,description:""+f};var d=mt(n.MPEntry.value,o*pt+14,Ze.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:d,description:""+d},i[o].image=e.buffer.slice(c,c+u),s(i[o],"base64",(function(){return l(this.image)}))}return n.Images=i,n}(e,t,it(e,"mpf",t,rt(e,t,r),r,n),r)}},pt=16;function mt(e,t,n,r){if(r===S.LITTLE_ENDIAN){for(var i=0,o=0;o<n;o++)i+=e[t+o]<<8*o;return i}for(var a=0,u=0;u<n;u++)a+=e[t+u]<<8*(n-1-u);return a}function gt(e){var t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function vt(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function ht(e){var t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function yt(e,t,n,r){return function(e){return 0===e}(e)?0:mt(t.value,e*pt+8,Ze.getTypeSize("LONG"),n)+r}var St={read:function(e,t){var n=function(e,t){return Ze.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=Ze.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":bt(e,t,n),"Image Height":It(e,t,n),"Image Width":Ct(e,t,n),"Color Components":r,Subsampling:r&&At(e,t,r.value,n)}}};function bt(e,t,n){if(!(3>n)){var r=Ze.getByteAt(e,t+2);return{value:r,description:""+r}}}function It(e,t,n){if(!(5>n)){var r=Ze.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function Ct(e,t,n){if(!(7>n)){var r=Ze.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function At(e,t,n,r){if(!(8+3*n>r)){for(var i=[],o=0;o<n;o++){var a=t+8+3*o;i.push([Ze.getByteAt(e,a),Ze.getByteAt(e,a+1),Ze.getByteAt(e,a+2)])}return{value:i,description:i.length>1?Ut(i)+Pt(i):""}}}function Ut(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function Pt(e){var t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var Et={read:function(e,t){var n=function(e,t){return Ze.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=Ze.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=Ze.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":wt(e,t,n),"Resolution Unit":Tt(e,t,n),XResolution:Ot(e,t,n),YResolution:Mt(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){var a=function(e,t,n,r){if(!(0===n||16+n>r))return{value:e.buffer.slice(t+16,t+16+n),description:"<24-bit RGB pixel data>"}}(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(var u in o)void 0===o[u]&&delete o[u];return o}};function wt(e,t,n){if(!(9>n)){var r=Ze.getByteAt(e,t+7),i=Ze.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function Tt(e,t,n){if(!(10>n)){var r=Ze.getByteAt(e,t+9);return{value:r,description:Ft(r)}}}function Ft(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function Ot(e,t,n){if(!(12>n)){var r=Ze.getShortAt(e,t+10);return{value:r,description:""+r}}}function Mt(e,t,n){if(!(14>n)){var r=Ze.getShortAt(e,t+12);return{value:r,description:""+r}}}var Dt={iptc:{256:{name:"Model Version",description:function(e){return""+((e[0]<<8)+e[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(e){return""+((e[0]<<8)+e[1])}},278:{name:"File Format Version",description:function(e){return""+((e[0]<<8)+e[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Lt},336:{name:"Time Sent",description:xt},346:{name:"Coded Character Set",description:Nt,encoding_name:Nt},356:"UNO",376:{name:"ARM Identifier",description:function(e){return""+((e[0]<<8)+e[1])}},378:{name:"ARM Version",description:function(e){return""+((e[0]<<8)+e[1])}},512:{name:"Record Version",description:function(e){return""+((e[0]<<8)+e[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===m(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=m(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=m(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:Lt},572:{name:"Time Created",description:xt},574:{name:"Digital Creation Date",description:Lt},575:{name:"Digital Creation Time",description:xt},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=m(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=m(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=m(e),n=t.charAt(0),r=t.charAt(1),i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt(m(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(m(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=m(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:function(e){return 2===e.length?"ObjectData Preview File Format":"Record 2 destination"},description:function(e){if(2===e.length){var t=(e[0]<<8)+e[1];return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":"Unknown format ".concat(t)}return m(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,t){var n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=m(e);if(t["ObjectData Preview File Format"]){var i=m(t["ObjectData Preview File Format"].value);if(n[i]&&n[i][r])return n[i][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:function(e){return e[0].toString()}},1812:{name:"Max Subfile Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function Lt(e){var t=m(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function xt(e){var t=m(e),n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function Nt(e){var t=m(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}var Rt={decode:function(e,t){var n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((function(e){return String.fromCharCode(e)})).join(""))},TAG_HEADER_SIZE:5},kt=5,Gt={read:function(e,t,n){try{if(Array.isArray(e))return zt(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);var r=function(e,t){for(;t+12<=e.byteLength;){var n=Bt(e,t);if(_t(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+jt(n)}throw Error("No IPTC NAA resource block.")}(e,t);return zt(e,r.naaBlock,r.dataOffset,n)}catch(e){return{}}}};function Bt(e,t){if(943868237!==e.getUint32(t,0))throw Error("Not an IPTC resource block.");return{type:e.getUint16(t+4),size:e.getUint16(t+10)}}function _t(e){return 1028===e.type}function jt(e){return e.size%2!=0?1:0}function zt(e,t,n,r){for(var i={},o=void 0,a=n+t.size;n<a&&n<e.byteLength;){var u=Ht(e,n,i,o,r),c=u.tag,f=u.tagSize;if(null===c)break;c&&("encoding"in c&&(o=c.encoding),void 0===i[c.name]||void 0===c.repeatable?i[c.name]={id:c.id,value:c.value,description:c.description}:(i[c.name]instanceof Array||(i[c.name]=[{id:i[c.name].id,value:i[c.name].value,description:i[c.name].description}]),i[c.name].push({id:c.id,value:c.value,description:c.description}))),n+=kt+f}return i}function Ht(e,t,n,r,i){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var o=e.getUint16(t+1),a=e.getUint16(t+3);if(!i&&!Dt.iptc[o])return{tag:void 0,tagSize:a};var u=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+kt,a),c={id:o,name:Wt(Dt.iptc[o],o,u),value:u,description:Vt(Dt.iptc[o],u,n,r)};return function(e){return Dt.iptc[e]&&Dt.iptc[e].repeatable}(o)&&(c.repeatable=1),function(e){return Dt.iptc[e]&&void 0!==Dt.iptc[e].encoding_name}(o)&&(c.encoding=Dt.iptc[o].encoding_name(u)),{tag:c,tagSize:a}}function Wt(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:"undefined-".concat(t)}function Vt(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?Rt.decode(r,t):t}function Xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Jt={"tiff:Orientation":function(e){return"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e},"tiff:ResolutionUnit":function(e){return Ne.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return Yt(Ne.XResolution,e)},"tiff:YResolution":function(e){return Yt(Ne.YResolution,e)},"exif:ApertureValue":function(e){return Yt(Ne.ApertureValue,e)},"exif:GPSLatitude":Kt,"exif:GPSLongitude":Kt,"exif:FNumber":function(e){return Yt(Ne.FNumber,e)},"exif:FocalLength":function(e){return Yt(Ne.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return Ne.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return Ne.ColorSpace(function(e){return"0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)}(e))},"exif:ComponentsConfiguration":function(e,t){if(/^\d, \d, \d, \d$/.test(t)){var n=t.split(", ").map((function(e){return e.charCodeAt(0)}));return Ne.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return Ne.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return Ne.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return Ne.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return Ne.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return qt(e)?Ne.ExposureTime(e.split("/").map((function(e){return parseInt(e,10)}))):e},"exif:MeteringMode":function(e){return Ne.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return Ne.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return Ne.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return Ne.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return Yt(Ne.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return Ne.WhiteBalance(parseInt(e,10))}};function Yt(e,t){return qt(t)?e(t.split("/")):t}function qt(e){return/^-?\d+\/-?\d+$/.test(e)}function Kt(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e.split(","))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return Xt(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xt(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],i=n[1];if(void 0!==r&&void 0!==i){var o=parseFloat(r),a=parseFloat(i),u=i.charAt(i.length-1);if(!Number.isNaN(o)&&!Number.isNaN(a))return""+(o+a/60)+u}return e}function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Qt,en={read:function(e,t){var n={};if("string"==typeof e)return nn(n,e),n;var r,i=(r=function(e,t){if(0===t.length)return[];var n=[tn(e,t.slice(0,1))];return t.length>1&&n.push(tn(e,t.slice(1))),n}(e,t),2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(r)||function(e,t){if(e){if("string"==typeof e)return Zt(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(e,2):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1],u=nn(n,o);if(a){var c=nn(n,a);u||c||(delete n._raw,nn(n,tn(e,t)))}return n}};function tn(e,t){for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=0;o<t.length;o++){var a=t[o],u=e.buffer.slice(a.dataOffset,a.dataOffset+a.length);r.set(new Uint8Array(u),i),i+=a.length}return new DataView(r.buffer)}function nn(e,t){try{var n=function(e){var t=function(){if("undefined"!=typeof DOMParser)return new DOMParser;try{return new(require("@xmldom/xmldom").DOMParser)({errorHandler:{error:function(){throw Error("Faulty XML")}}})}catch(e){return}}();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var n="string"==typeof e?e:o(e,0,e.byteLength),r=t.parseFromString(n.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1"),"application/xml");if("parsererror"===r.documentElement.nodeName)throw Error(r.documentElement.textContent);return{doc:r,raw:n}}(t),r=n.doc,i=n.raw;return e._raw=(e._raw||"")+i,f(e,un(on(rn(r),1))),1}catch(e){return 0}}function rn(e){for(var t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return rn(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw Error()}function on(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(t=r).length&&"#text"===t[0].nodeName?n?{}:function(e){return e.nodeValue}(r[0]):function(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:an(e),value:on(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}(r)}function an(e){for(var t={},n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}function un(e){var t={};if("string"==typeof e)return e;for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]),r.forEach((function(e){f(t,cn(e.attributes)),"object"===$t(e.value)&&f(t,mn(e.value))}))}return t}function cn(e){var t={};for(var n in e)try{fn(n)&&(t[ln(n)]={value:e[n],attributes:{},description:dn(e[n],n)})}catch(e){}return t}function fn(e){return"rdf:parseType"!==e&&!sn(e)}function sn(e){return"xmlns"===e.split(":")[0]}function ln(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e)){var n=function(e){return e.map((function(e){return void 0!==e.value?dn(e.value):dn(e)})).join(", ")}(e);return t&&"function"==typeof Jt[t]?Jt[t](e,n):n}if("object"===$t(e))return function(e){var t=[];for(var n in e)t.push("".concat(pn(n),": ").concat(dn(e[n].value)));return t.join("; ")}(e);try{return t&&"function"==typeof Jt[t]?Jt[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function pn(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function mn(e){var t={};for(var n in e)try{sn(n)||(t[ln(n)]=gn(e[n],n))}catch(e){}return t}function gn(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Un(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:vn(e)?hn(e,t):Sn(e)?bn(e,t):In(e)?Cn(e,t):function(e){return void 0!==An(e.value)}(e)?function(e,t){var n=An(e.value).value["rdf:li"],r=yn(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return vn(e)?hn(e):Sn(e)?bn(e).value:In(e)?Cn(e).value:Un(e)}(e))})),{value:i,attributes:r,description:dn(i,t)}}(e,t):Un(e,t)}function vn(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function hn(e,t){var n=yn(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),f(n,yn(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||sn(n)||(t[ln(n)]=e.value[n].value);return t}(e));var r=function(e){return Pn(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:dn(r,t)}}function yn(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||sn(n)||(t[ln(n)]=e.attributes[n]);return t}function Sn(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function bn(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(f(n.value,cn(e.value["rdf:Description"].attributes)),f(n.attributes,yn(e)),e=e.value["rdf:Description"]),f(n.value,mn(e.value)),n.description=dn(n.value,t),n}function In(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function Cn(e,t){var n=cn(e.attributes);return{value:n,attributes:{},description:dn(n,t)}}function An(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Un(e,t){var n=Pn(e)||un(e.value);return{value:n,attributes:yn(e),description:dn(n,t)}}function Pn(e){return e.attributes&&e.attributes["rdf:resource"]}function En(e){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},En(e)}function wn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==En(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==En(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===En(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Fn={2e3:{name:"PathInformation",description:function(e){for(var t={},n=[],r=0;r<e.byteLength;r+=26){var i=Ze.getShortAt(e,r);On[i]&&(t[i]||(t[i]=On[i].description),n.push({type:i,path:On[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description:function(e){return(t=u(e,0),2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(t)||function(e,t){if(e){if("string"==typeof e)return Tn(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tn(e,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];var t}}},On=(wn(Qt={},0,{description:"Closed subpath length",path:function(e,t){return[Ze.getShortAt(e,t)]}}),wn(Qt,1,{description:"Closed subpath Bezier knot, linked",path:Mn}),wn(Qt,2,{description:"Closed subpath Bezier knot, unlinked",path:Mn}),wn(Qt,3,{description:"Open subpath length",path:function(e,t){return[Ze.getShortAt(e,t)]}}),wn(Qt,4,{description:"Open subpath Bezier knot, linked",path:Mn}),wn(Qt,5,{description:"Open subpath Bezier knot, unlinked",path:Mn}),wn(Qt,6,{description:"Path fill rule",path:function(){return[]}}),wn(Qt,8,{description:"Initial fill rule",path:function(e,t){return[Ze.getShortAt(e,t)]}}),wn(Qt,7,{description:"Clipboard",path:function(e,t){return[[Ln(e,t,8),Ln(e,t+4,8),Ln(e,t+8,8),Ln(e,t+12,8)],Ln(e,t+16,8)]}}),Qt);function Mn(e,t){for(var n=[],r=0;r<24;r+=8)n.push(Dn(e,t+r));return n}function Dn(e,t){var n=Ln(e,t,8);return[Ln(e,t+4,8),n]}function Ln(e,t,n){var r,i=Ze.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(d("1",32-n),2);return o*function(e,t){return parseInt(e.replace(".",""),2)/Math.pow(2,(e.split(".")[1]||"").length)}(a.toString(2)+"."+(d("0",32-n-(r=u.toString(2)).length)+r))}function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Nn={read:function(e,t){for(var n=i(new Uint8Array(e).buffer),r={},a=0;a<e.length;){var u=o(n,a,Bn);a+=Bn;var c=Ze.getShortAt(n,a),f=_n(n,a+=kn),s=f.tagName;a+=f.tagNameSize;var l=Ze.getLongAt(n,a);if(a+=Gn,u===Rn){var d=i(n.buffer,a,l),p={id:c,value:o(d,0,l)};if(Fn[c]){try{p.description=Fn[c].description(d)}catch(e){p.description="<no description formatter>"}r[s||Fn[c].name]=p}else t&&(r["undefined-".concat(c)]=p)}a+=l+l%2}return r}},Rn="8BIM",kn=2,Gn=4,Bn=Rn.length;function _n(e,t){var n,r=(2,function(e){if(Array.isArray(e))return e}(n=u(e,t))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],c=1,f=0;try{for(o=(n=n.call(e)).next,0;!(c=(r=o.call(n)).done)&&(u.push(r.value),2!==u.length);c=1);}catch(e){f=1,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}(n)||function(e,t){if(e){if("string"==typeof e)return xn(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xn(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0];return{tagName:r[1],tagNameSize:1+i+(i%2==0?1:0)}}var jn={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},zn={4:{name:"Preferred CMM type",value:function(e,t){return o(e,t,4)},description:function(e){return null!==e?Hn(e):""}},8:{name:"Profile Version",value:function(e,t){return e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(e,t){return o(e,t,4)},description:function(e){switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:function(e,t){return o(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return o(e,t,4)}},24:{name:"ICC Profile Date",value:function(e,t){return function(e,t){var n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),o=e.getUint16(t+6),a=e.getUint16(t+8),u=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,o,a,u))}(e,t).toISOString()}},36:{name:"ICC Signature",value:function(e,t){return n=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(n));var n}},40:{name:"Primary Platform",value:function(e,t){return o(e,t,4)},description:function(e){return Hn(e)}},48:{name:"Device Manufacturer",value:function(e,t){return o(e,t,4)},description:function(e){return Hn(e)}},52:{name:"Device Model Number",value:function(e,t){return o(e,t,4)}},64:{name:"Rendering Intent",value:function(e,t){return e.getUint32(t)},description:function(e){switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:function(e,t){return o(e,t,4)}}};function Hn(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var Wn={read:function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,u=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),c=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var o=u.slice(n.offset,n.offset+n.length),a=new Uint8Array(o);r.set(a,i),i+=a.length},f=1;f<=t.length;f++)c(f);return function(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.length<Vn)throw Error("ICC profile too short");for(var r={},i=Object.keys(zn),u=0;u<i.length;u++){var c=i[u],f=zn[c],s=f.value(e,parseInt(c,10)),l=s;f.description&&(l=f.description(s)),r[f.name]={value:s,description:l}}if(er(t.slice(36,40))!==Jn)throw Error("ICC profile: missing signature");if(function(e){return e.length<Xn+4}(t))return r;for(var d=e.getUint32(128),p=132,m=0;m<d;m++){if(Qn(t,p))return r;var g=o(e,p,4),v=e.getUint32(p+4),h=e.getUint32(p+8);if(v>t.length)return r;var y=o(e,v,4);if(y===Yn){var S=e.getUint32(v+8);if(S>h)return r;tr(r,g,er(t.slice(v+12,v+S+11)))}else if(y===qn){for(var b=e.getUint32(v+8),I=e.getUint32(v+12),C=v+16,A=[],U=0;U<b;U++){var P=o(e,C+0,2),E=o(e,C+2,2),w=e.getUint32(C+4),T=e.getUint32(C+8),F=a(e,v+T,w);A.push({languageCode:P,countryCode:E,text:F}),C+=I}if(1===b)tr(r,g,A[0].text);else{for(var O={},M=0;M<A.length;M++)O["".concat(A[M].languageCode,"-").concat(A[M].countryCode)]=A[M].text;tr(r,g,O)}}else y===Kn?tr(r,g,er(t.slice(v+8,v+h-7))):y===$n&&tr(r,g,er(t.slice(v+8,v+12)));p+=12}return r}(new DataView(r.buffer))}catch(e){return{}}}},Vn=84,Xn=128,Jn="acsp",Yn="desc",qn="mluc",Kn="text",$n="sig ",Zn=12;function Qn(e,t){return e.length<t+Zn}function er(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function tr(e,t,n){jn[t]?e[jn[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var nr={read:function(e,t){return{"Image Width":rr(e,t),"Image Height":ir(e,t),"Bit Depth":or(e,t),"Color Type":ar(e,t),Compression:ur(e,t),Filter:cr(e,t),Interlace:fr(e,t)}}};function rr(e,t){if(!(t+0+4>e.byteLength)){var n=Ze.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function ir(e,t){if(!(t+4+4>e.byteLength)){var n=Ze.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function or(e,t){if(!(t+8+1>e.byteLength)){var n=Ze.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function ar(e,t){if(!(t+9+1>e.byteLength)){var n=Ze.getByteAt(e,t+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}}function ur(e,t){if(!(t+10+1>e.byteLength)){var n=Ze.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function cr(e,t){if(!(t+11+1>e.byteLength)){var n=Ze.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function fr(e,t){if(!(t+12+1>e.byteLength)){var n=Ze.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}var sr={read:function(e,t){return t.reduce((function(t,n){var r=n.offset,i=n.length,o=n.type,a=function(e,t,n,r){for(var i=[],o=[],a=[],u=[],f=lr,s=0;s<n&&t+s<e.byteLength;s++){if(f===dr){if(0!==e.getUint8(t+s))return{};s+=vr,f=hr(r,f)}var l=e.getUint8(t+s);0===l?f=hr(r,f):f===lr?i.push(l):f===pr?o.push(l):f===mr?a.push(l):u.push(l)}var d=c(u);return{name:yr(r,o,i),value:d,description:r===be?Rt.decode("UTF-8",u):d}}(e,r,i,o),u=a.name,f=a.value,s=a.description;return u&&(t[u]={value:f,description:s}),t}),{})}},lr="STATE_KEYWORD",dr="STATE_COMPRESSION",pr="STATE_LANG",mr="STATE_TRANSLATED_KEYWORD",gr="STATE_TEXT",vr=2;function hr(e,t){return t===lr&&e===be?dr:t===dr?pr:t===pr?mr:gr}function yr(e,t,n){var r=c(n);if("tEXt"===e||0===t.length)return r;var i=c(t);return"".concat(r," (").concat(i,")")}var Sr={read:function(e,t){for(var n={},r=0;r<t.length;r++){var i=Ze.getLongAt(e,t[r]+ve),a=o(e,t[r]+he,ge);a===Ie?(n["Pixels Per Unit X"]=br(e,t[r],i),n["Pixels Per Unit Y"]=Ir(e,t[r],i),n["Pixel Units"]=Cr(e,t[r],i)):a===Ce&&(n["Modify Date"]=Ar(e,t[r],i))}return n}};function br(e,t,n){if(Ur(e,t,n,0,4)){var r=Ze.getLongAt(e,t+ye+0);return{value:r,description:""+r}}}function Ir(e,t,n){if(Ur(e,t,n,4,4)){var r=Ze.getLongAt(e,t+ye+4);return{value:r,description:""+r}}}function Cr(e,t,n){if(Ur(e,t,n,8,1)){var r=Ze.getByteAt(e,t+ye+8);return{value:r,description:1===r?"meters":"Unknown"}}}function Ar(e,t,n){if(Ur(e,t,n,0,7)){var r=Ze.getShortAt(e,t+ye),i=Ze.getByteAt(e,t+ye+2),o=Ze.getByteAt(e,t+ye+3),a=Ze.getByteAt(e,t+ye+4),u=Ze.getByteAt(e,t+ye+5),c=Ze.getByteAt(e,t+ye+6);return{value:[r,i,o,a,u,c],description:"".concat(Pr(r,4),"-").concat(Pr(i,2),"-").concat(Pr(o,2)," ").concat(Pr(a,2),":").concat(Pr(u,2),":").concat(Pr(c,2))}}}function Ur(e,t,n,r,i){return r+i<=n&&t+ye+r+i<=e.byteLength}function Pr(e,t){return"".concat("0".repeat(t-(""+e).length)).concat(e)}var Er={read:function(e,t){var n={},r=Ze.getByteAt(e,t);return n.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.ImageWidth=Fr(e,t+wr),n.ImageHeight=Fr(e,t+Tr),n}},wr=4,Tr=7;function Fr(e,t){var n=Ze.getByteAt(e,t)+256*Ze.getByteAt(e,t+1)+65536*Ze.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Or={read:function(e){return{"GIF Version":Mr(e),"Image Width":Dr(e),"Image Height":Lr(e),"Global Color Map":xr(e),"Bits Per Pixel":Rr(e),"Color Resolution Depth":Nr(e)}}};function Mr(e){if(!(6>e.byteLength)){var t=o(e,3,3);return{value:t,description:t}}}function Dr(e){if(!(8>e.byteLength)){var t=e.getUint16(6,1);return{value:t,description:"".concat(t,"px")}}}function Lr(e){if(!(10>e.byteLength)){var t=e.getUint16(8,1);return{value:t,description:"".concat(t,"px")}}}function xr(e){if(!(11>e.byteLength)){var t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}}function Nr(e){if(!(11>e.byteLength)){var t=1+((112&e.getUint8(10))>>>4);return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}function Rr(e){if(!(11>e.byteLength)){var t=1+(7&e.getUint8(10));return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}var kr=[6,7,99],Gr={get:function(e,t,n){if((i=t)&&(void 0===i.Compression||kr.includes(i.Compression.value))&&i.JPEGInterchangeFormat&&i.JPEGInterchangeFormat.value&&i.JPEGInterchangeFormatLength&&i.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),s(t,"base64",(function(){return l(this.image)}))}var i;return t}};function Br(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}Br.prototype=Error();var _r={MetadataMissingError:Br},jr={load:Hr,loadView:Vr,errors:_r},zr=_r;function Hr(e,t){return function(e){return"string"==typeof e}(e)?function(e,t){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length,n={method:"GET"};return Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-".concat(t-1)}),fetch(e,n).then((function(e){return e.arrayBuffer()}))}(e,t):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-".concat(t-1)});var o=function(e){return/^https:\/\//.test(e)?require("https").get:require("http").get}(e);o(e,i,(function(e){if(e.statusCode>=200&&e.statusCode<=299){var t=[];e.on("data",(function(e){return t.push(Buffer.from(e))})),e.on("error",(function(e){return r(e)})),e.on("end",(function(){return n(Buffer.concat(t))}))}else r("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage)),e.resume()})).on("error",(function(e){return r(e)}))}))}(e,t):function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e)?Promise.resolve(function(e){var t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(function(e){return e.charCodeAt(0)})).buffer;if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}var n=decodeURIComponent(t);return"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(function(e){return e.charCodeAt(0)})).buffer}(e)):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i=function(){try{return require("fs")}catch(e){return}}();i.open(e,(function(o,a){o?r(o):i.stat(e,(function(o,u){if(o)r(o);else{var c=Math.min(u.size,void 0!==t?t:u.size),f=Buffer.alloc(c),s={buffer:f,length:c};i.read(a,s,(function(t){t?r(t):i.close(a,(function(t){t&&console.warn("Could not close file ".concat(e,":"),t),n(f)}))}))}}))}))}))}(e,t)}(e,t).then((function(e){return Wr(e,t)})):function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e)?(n=e,new Promise((function(e,t){var r=new FileReader;r.onload=function(t){return e(t.target.result)},r.onerror=function(){return t(r.error)},r.readAsArrayBuffer(n)}))).then((function(e){return Wr(e,t)})):Wr(e,t);var n}function Wr(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),Vr(function(e){try{return new DataView(e)}catch(t){return new r(e)}}(e),t)}function Vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,includeUnknown:0},n=t.expanded,r=void 0===n?0:n,i=t.includeUnknown,o=void 0===i?0:i,a=0,u={},s=Le.parseAppMarkers(e),l=s.fileType,d=s.fileDataOffset,m=s.jfifDataOffset,g=s.tiffHeaderOffset,h=s.iptcDataOffset,y=s.xmpChunks,S=s.iccChunks,b=s.mpfDataOffset,I=s.pngHeaderOffset,C=s.pngTextChunks,A=s.pngChunkOffsets,U=s.vp8xChunkOffset,P=s.gifHeaderOffset;if(p.USE_JPEG&&p.USE_FILE&&function(e){return void 0!==e}(d)){a=1;var E=St.read(e,d);r?u.file=E:u=f({},u,E)}if(p.USE_JPEG&&p.USE_JFIF&&function(e){return void 0!==e}(m)){a=1;var w=Et.read(e,m);r?u.jfif=w:u=f({},u,w)}if(p.USE_EXIF&&function(e){return void 0!==e}(g)){a=1;var T=lt.read(e,g,o);if(T.Thumbnail&&(u.Thumbnail=T.Thumbnail,delete T.Thumbnail),r?(u.exif=T,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=v(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=v(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(u)):u=f({},u,T),p.USE_TIFF&&p.USE_IPTC&&T["IPTC-NAA"]&&!Xr(h)){var F=Gt.read(T["IPTC-NAA"].value,0,o);r?u.iptc=F:u=f({},u,F)}if(p.USE_TIFF&&p.USE_XMP&&T.ApplicationNotes&&!Jr(y)){var O=en.read(c(T.ApplicationNotes.value));r?u.xmp=O:(delete O._raw,u=f({},u,O))}if(p.USE_PHOTOSHOP&&T.ImageSourceData){var M=Nn.read(T.PhotoshopSettings.value,o);r?u.photoshop=M:u=f({},u,M)}if(p.USE_TIFF&&p.USE_ICC&&T.ICC_Profile&&!Yr(S)){var D=Wn.read(T.ICC_Profile.value,[{offset:0,length:T.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);r?u.icc=D:u=f({},u,D)}}if(p.USE_JPEG&&p.USE_IPTC&&Xr(h)){a=1;var L=Gt.read(e,h,o);r?u.iptc=L:u=f({},u,L)}if(p.USE_XMP&&Jr(y)){a=1;var x=en.read(e,y);r?u.xmp=x:(delete x._raw,u=f({},u,x))}if((p.USE_JPEG||p.USE_WEBP)&&p.USE_ICC&&Yr(S)){a=1;var N=Wn.read(e,S);r?u.icc=N:u=f({},u,N)}if(p.USE_MPF&&function(e){return void 0!==e}(b)){a=1;var R=dt.read(e,b,o);r?u.mpf=R:u=f({},u,R)}if(p.USE_PNG&&p.USE_PNG_FILE&&void 0!==I){a=1;var k=nr.read(e,I);r?(u.png=u.png?f({},u.png,k):k,u.pngFile=k):u=f({},u,k)}if(p.USE_PNG&&function(e){return void 0!==e}(C)){a=1;var G=sr.read(e,C);r?(u.png=u.png?f({},u.png,G):G,u.pngText=G):u=f({},u,G)}if(p.USE_PNG&&function(e){return void 0!==e}(A)){a=1;var B=Sr.read(e,A);r?u.png=u.png?f({},u.png,B):B:u=f({},u,B)}if(p.USE_WEBP&&function(e){return void 0!==e}(U)){a=1;var _=Er.read(e,U);r?u.riff=u.riff?f({},u.riff,_):_:u=f({},u,_)}if(p.USE_GIF&&function(e){return void 0!==e}(P)){a=1;var j=Or.read(e,P);r?u.gif=u.gif?f({},u.gif,j):j:u=f({},u,j)}var z=(p.USE_JPEG||p.USE_WEBP)&&p.USE_EXIF&&p.USE_THUMBNAIL&&Gr.get(e,u.Thumbnail,g);if(z?(a=1,u.Thumbnail=z):delete u.Thumbnail,l&&(r?(u.file||(u.file={}),u.file.FileType=l):u.FileType=l),!a)throw new _r.MetadataMissingError;return u}function Xr(e){return void 0!==e}function Jr(e){return Array.isArray(e)&&e.length>0}function Yr(e){return Array.isArray(e)&&e.length>0}return t}()}));
|
|
2
2
|
//# sourceMappingURL=exif-reader.js.map
|