exifreader 4.21.1 → 4.22.0

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 CHANGED
@@ -21,13 +21,15 @@ You can try it out on the
21
21
  | File type | Exif | IPTC | XMP | ICC | MPF | Photoshop | Thumbnail | Image details |
22
22
  | ----------|---------|---------|---------|---------|---------|---------------|-----------|---------------|
23
23
  | JPEG | **yes** | **yes** | **yes** | **yes** | **yes** | **some*** | **yes** | **yes** |
24
- | TIFF | **yes** | **yes** | **yes** | **yes** | ??? | ??? | no | no |
24
+ | TIFF | **yes** | **yes** | **yes** | **yes** | ??? | ??? | N/A | N/A |
25
25
  | PNG | **yes** | **yes** | **yes** | **yes** | ??? | ??? | no | **yes** |
26
- | HEIC/HEIF | **yes** | no | no | **yes** | ??? | ??? | no | no |
26
+ | HEIC/HEIF | **yes** | no | **yes** | **yes** | ??? | ??? | no | no |
27
+ | AVIF | **yes** | no | **yes** | **yes** | ??? | ??? | no | no |
27
28
  | WebP | **yes** | no | **yes** | **yes** | ??? | ??? | **yes** | **yes** |
28
- | GIF | no | no | no | no | no | no | no | **yes** |
29
+ | GIF | N/A | N/A | N/A | N/A | N/A | N/A | N/A | **yes** |
29
30
 
30
31
  - `Image details` = image width, height, etc. read from image header.
32
+ - `N/A` = The feature is not applicable to this file type.
31
33
  - `???` = may be supported in any file type using Exif but it has only been tested
32
34
  on JPEGs.
33
35
  - `*` = A draft implementation of Photoshop tags have been added with
@@ -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 ui},errors:function(){return ci},load:function(){return fi},loadView:function(){return li}});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=void 0,m=0;function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string";if(t===m&&"function"==typeof DecompressionStream){var r=new DecompressionStream("deflate"),i=new Blob([e]).stream().pipeThrough(r);return"dataview"===n?new Response(i).arrayBuffer().then((function(e){return new DataView(e)})):new Response(i).text()}return void 0!==t?Promise.reject("Unknown compression method ".concat(t,".")):e}var v={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 h(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function y(e){if(e.length>=8){var t=h(e.slice(0,8));if("ASCII\0\0\0"===t)return h(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 S(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var b=18761,I=19789,C={BIG_ENDIAN:I,LITTLE_ENDIAN:b,getByteOrder:function(e,t){if(e.getUint16(t)===b)return b;if(e.getUint16(t)===I)return I;throw Error("Illegal byte order value. Faulty image.")}},U=2,A=65496,P=2,E=4,w=2,T=2,F=10,O=18,M=33,D=79,x=18,L=8,N="ICC_PROFILE\0",k=E+N.length,R=k+1,G="MPF\0",B=65472,_=65474,j=65476,z=65499,V=65501,H=65498,W=65504,X=65505,J=65506,Y=65517,q=65519,K=65534,$=65535,Z="JFIF",Q="Exif",ee="http://ns.adobe.com/xap/1.0/\0",te="http://ns.adobe.com/xmp/extension/\0",ne="Photoshop 3.0";function re(e,t){return e.getUint16(t)===B}function ie(e,t){return e.getUint16(t)===_}function oe(e,t){var n=N.length;return e.getUint16(t)===J&&o(e,t+E,n)===N}function ae(e,t){var n=G.length;return e.getUint16(t)===J&&o(e,t+E,n)===G}function ue(e,t){var n=Z.length;return e.getUint16(t)===W&&o(e,t+E,n)===Z&&0===e.getUint8(t+E+n)}function ce(e,t){var n=Q.length;return e.getUint16(t)===X&&o(e,t+E,n)===Q&&0===e.getUint8(t+E+n)}function fe(e,t){return e.getUint16(t)===X&&function(e,t){var n=ee.length;return o(e,t+E,n)===ee}(e,t)}function se(e,t){return e.getUint16(t)===X&&function(e,t){var n=te.length;return o(e,t+E,n)===te}(e,t)}function le(e,t){return{dataOffset:e+M,length:t-(M-w)}}function de(e,t){return{dataOffset:e+D,length:t-(D-w)}}function pe(e,t){var n=ne.length;return e.getUint16(t)===Y&&o(e,t+E,n)===ne&&0===e.getUint8(t+E+n)}function me(e,t){var n=e.getUint16(t);return n>=W&&n<=q||n===K||n===B||n===_||n===j||n===z||n===V||n===H}function ge(e,t){return e.getUint16(t)===$}var ve="‰PNG\r\n\n",he=4,ye=4,Se=0,be=he,Ie=he+ye,Ce="XML:com.adobe.xmp\0",Ue="tEXt",Ae="iTXt",Pe="zTXt",Ee="pHYs",we="tIME",Te="eXIf",Fe="iCCP";function Oe(e,t){return"IHDR"===o(e,t+be,ye)}function Me(e,t){return o(e,t+be,ye)===Ae&&o(e,t+Ie,Ce.length)===Ce}function De(e,t,n){var r=o(e,t+be,ye);return r===Ue||r===Ae||r===Pe&&n}function xe(e,t){return o(e,t+be,ye)===Te}function Le(e,t){return o(e,t+be,ye)===Fe}function Ne(e,t){var n=[Ee,we],r=o(e,t+be,ye);return n.includes(r)}function ke(e,t){t+=Ie+Ce.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Re(e,t){var n=function(e,t){for(var n=[],r=0;t+r<e.byteLength;){var i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return c(n)}(e,t);return t+=n.length+1,{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function Ge(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 Be=6,_e=["GIF87a","GIF89a"],je={parseAppMarkers:function(e,t){if(v.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===C.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)}(e))return ze(v.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(v.USE_JPEG&&function(e){return!!e&&e.byteLength>=U&&e.getUint16(0)===A}(e))return ze(function(e){for(var t,n,r,i,o,a,u,c,f,s=P;s+E+5<=e.byteLength;){if(v.USE_FILE&&re(e,s))t=e.getUint16(s+w),n=s+w;else if(v.USE_FILE&&ie(e,s))t=e.getUint16(s+w),r=s+w;else if(v.USE_JFIF&&ue(e,s))t=e.getUint16(s+w),i=s+T;else if(v.USE_EXIF&&ce(e,s))t=e.getUint16(s+w),o=s+F;else if(v.USE_XMP&&fe(e,s))u||(u=[]),t=e.getUint16(s+w),u.push(le(s,t));else if(v.USE_XMP&&se(e,s))u||(u=[]),t=e.getUint16(s+w),u.push(de(s,t));else if(v.USE_IPTC&&pe(e,s))t=e.getUint16(s+w),a=s+O;else if(v.USE_ICC&&oe(e,s)){t=e.getUint16(s+w);var l=s+x,d=t-(x-w),p=e.getUint8(s+k),m=e.getUint8(s+R);c||(c=[]),c.push({offset:l,length:d,chunkNumber:p,chunksTotal:m})}else if(v.USE_MPF&&ae(e,s))t=e.getUint16(s+w),f=s+L;else{if(!me(e,s)){if(ge(e,s)){s++;continue}break}t=e.getUint16(s+w)}s+=w+t}return{hasAppMarkers:s>P,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:c,mpfDataOffset:f}}(e),"jpeg","JPEG");if(v.USE_PNG&&function(e){return!!e&&o(e,0,ve.length)===ve}(e))return ze(function(e,t){for(var n={hasAppMarkers:0},r=ve.length;r+he+ye<=e.byteLength;){if(v.USE_PNG_FILE&&Oe(e,r))n.hasAppMarkers=1,n.pngHeaderOffset=r+Ie;else if(v.USE_XMP&&Me(e,r)){var i=ke(e,r);void 0!==i&&(n.hasAppMarkers=1,n.xmpChunks=[{dataOffset:i,length:e.getUint32(r+Se)-(i-(r+Ie))}])}else if(De(e,r,t)){n.hasAppMarkers=1;var a=o(e,r+be,ye);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+Se),type:a,offset:r+Ie})}else if(xe(e,r))n.hasAppMarkers=1,n.tiffHeaderOffset=r+Ie;else if(v.USE_ICC&&t&&Le(e,r)){n.hasAppMarkers=1;var u=e.getUint32(r+Se),c=r+Ie,f=Re(e,c),s=f.profileName,l=f.compressionMethod,d=f.compressedProfileOffset;n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:d,length:u-(d-c),chunkNumber:1,chunksTotal:1,profileName:s,compressionMethod:l})}else Ne(e,r)&&(n.hasAppMarkers=1,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+Se));r+=e.getUint32(r+Se)+he+ye+4}return n}(e,t),"png","PNG");if(v.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 ze(function(e){if(v.USE_EXIF||v.USE_ICC){var t=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Ge(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);v.USE_EXIF&&"iloc"===i?r.ilocOffset=t:v.USE_EXIF&&"Exif"===i?r.exifItemOffset=t+-4:v.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:Ge(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(v.USE_WEBP&&function(e){return!!e&&"RIFF"===o(e,0,4)&&"WEBP"===o(e,8,4)}(e))return ze(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);v.USE_EXIF&&"EXIF"===c?(u=1,t="Exif\0\0"===o(e,a+8,6)?a+8+6:a+8):v.USE_XMP&&"XMP "===c?(u=1,n=[{dataOffset:a+8,length:f}]):v.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(v.USE_GIF&&function(e){return!!e&&_e.includes(o(e,0,Be))}(e))return ze({gifHeaderOffset:0},"gif","GIF");throw Error("Invalid image format")}};function ze(e,t,n){return f({},e,{fileType:{value:t,description:n}})}var Ve={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){if(e[0]/e[1]>.25){var t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 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])}},He={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:Ve.XResolution},283:{name:"YResolution",description:Ve.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:Ve.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:Ve.LightSource},50779:{name:"CalibrationIlluminant2",description:Ve.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 We(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 Xe(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 Je,Ye={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:S},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:S},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 Xe(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)?Xe(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:y},28:{name:"GPSAreaInformation",description:y},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},qe={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return h(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Ke={45056:{name:"MPFVersion",description:function(e){return h(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 Qe=f({},He,{33434:{name:"ExposureTime",description:Ve.ExposureTime},33437:{name:"FNumber",description:Ve.FNumber},34850:{name:"ExposureProgram",description:Ve.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 h(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:Ve.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:Ve.ShutterSpeedValue},37378:{name:"ApertureValue",description:Ve.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:Ve.MeteringMode},37384:{name:"LightSource",description:Ve.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:Ve.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:y},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:Ve.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:Ve.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 We(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)?We(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:Ve.CustomRendered},41986:{name:"ExposureMode",description:Ve.ExposureMode},41987:{name:"WhiteBalance",description:Ve.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:Ve.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:Ve.Contrast},41993:{name:"Saturation",description:Ve.Saturation},41994:{name:"Sharpness",description:Ve.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"}),et="0th",tt="exif",nt="interoperability",rt=(Ze(Je={},et,Qe),Ze(Je,"1st",He),Ze(Je,tt,Qe),Ze(Je,"gps",Ye),Ze(Je,nt,qe),Ze(Je,"mpf",v.USE_MPF?Ke:{}),Je),it={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},ot={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},at={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:ut,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===C.LITTLE_ENDIAN)},getLongAt:ct,getRationalAt:function(e,t,n){return[ct(e,t,n),ct(e,t+4,n)]},getUndefinedAt:function(e,t){return ut(e,t)},getSlongAt:ft,getSrationalAt:function(e,t,n){return[ft(e,t,n),ft(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return ct(e,t,n)},typeSizes:it,tagTypes:ot,getTypeSize:function(e){if(void 0===ot[e])throw Error("No such type found.");return it[ot[e]]}};function ut(e,t){return e.getUint8(t)}function ct(e,t,n){return e.getUint32(t,n===C.LITTLE_ENDIAN)}function ft(e,t,n){return e.getInt32(t,n===C.LITTLE_ENDIAN)}var st={1:at.getByteAt,2:at.getAsciiAt,3:at.getShortAt,4:at.getLongAt,5:at.getRationalAt,7:at.getUndefinedAt,9:at.getSlongAt,10:at.getSrationalAt,13:at.getIfdPointerAt};function lt(e,t,n){return t+at.getLongAt(e,t+4,n)}function dt(e,t,n,r,i,o){var a=at.getTypeSize("SHORT"),u={},c=function(e,t,n){return t+at.getTypeSize("SHORT")<=e.byteLength?at.getShortAt(e,t,n):0}(e,r,i);r+=a;for(var f=0;f<c&&!(r+12>e.byteLength);f++){var s=pt(e,t,n,r,i,o);void 0!==s&&(u[s.name]={id:s.id,value:s.value,description:s.description}),r+=12}if(v.USE_THUMBNAIL&&r<e.byteLength-at.getTypeSize("LONG")){var l=at.getLongAt(e,r,i);0!==l&&t===et&&(u.Thumbnail=dt(e,"1st",n,n+l,i,1))}return u}function pt(e,t,n,r,i,o){var a,u=at.getTypeSize("SHORT"),c=u+at.getTypeSize("SHORT"),f=c+at.getTypeSize("LONG"),s=at.getShortAt(e,r,i),l=at.getShortAt(e,r+u,i),d=at.getLongAt(e,r+c,i);if(void 0!==at.typeSizes[l]&&(o||void 0!==rt[t][s])){if(function(e,t){return at.typeSizes[e]*t<=at.getTypeSize("LONG")}(l,d))a=mt(e,r+f,l,d,i);else{var p=at.getLongAt(e,r+f,i);a=function(e,t,n,r,i){return t+n+at.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)?mt(e,n+p,l,d,i,33723===s):"<faulty value>"}l===at.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!==rt[t][s])if(void 0!==rt[t][s].name&&void 0!==rt[t][s].description){m=rt[t][s].name;try{g=rt[t][s].description(a)}catch(e){g=gt(a)}}else l===at.tagTypes.RATIONAL||l===at.tagTypes.SRATIONAL?(m=rt[t][s],g=""+a[0]/a[1]):(m=rt[t][s],g=gt(a));return{id:s,name:m,value:a,description:g}}}function mt(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=at.typeSizes[n],n=at.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(st[n](e,t,i)),t+=at.typeSizes[n];return n===at.tagTypes.ASCII?o=at.getAsciiValue(o):1===o.length&&(o=o[0]),o}function gt(e){return e instanceof Array?e.join(", "):e}var vt="Exif IFD Pointer",ht="GPS Info IFD Pointer",yt="Interoperability IFD Pointer",St={read:function(e,t,n){var r=C.getByteOrder(e,t),i=function(e,t,n,r){return dt(e,et,t,lt(e,t,n),n,r)}(e,t,r,n);return function(e,t,n,r,i){return void 0!==e[yt]?f(e,dt(t,nt,n,n+e[yt].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[ht]?f(e,dt(t,"gps",n,n+e[ht].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[vt]?f(e,dt(t,tt,n,n+e[vt].value,r,i)):e}(i,e,t,r,n),e,t,r,n),e,t,r,n)}},bt={read:function(e,t,n){var r=C.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/It);o++){i[o]={};var a=Ct(n.MPEntry.value,o*It,at.getTypeSize("LONG"),r);i[o].ImageFlags=Ut(a),i[o].ImageFormat=At(a),i[o].ImageType=Pt(a);var u=Ct(n.MPEntry.value,o*It+4,at.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var c=Et(o,n.MPEntry,r,t);i[o].ImageOffset={value:c,description:""+c};var f=Ct(n.MPEntry.value,o*It+12,at.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:f,description:""+f};var d=Ct(n.MPEntry.value,o*It+14,at.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,dt(e,"mpf",t,lt(e,t,r),r,n),r)}},It=16;function Ct(e,t,n,r){if(r===C.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 Ut(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 At(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function Pt(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 Et(e,t,n,r){return function(e){return 0===e}(e)?0:Ct(t.value,e*It+8,at.getTypeSize("LONG"),n)+r}var wt={read:function(e,t){var n=function(e,t){return at.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=at.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":Tt(e,t,n),"Image Height":Ft(e,t,n),"Image Width":Ot(e,t,n),"Color Components":r,Subsampling:r&&Mt(e,t,r.value,n)}}};function Tt(e,t,n){if(!(3>n)){var r=at.getByteAt(e,t+2);return{value:r,description:""+r}}}function Ft(e,t,n){if(!(5>n)){var r=at.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function Ot(e,t,n){if(!(7>n)){var r=at.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function Mt(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([at.getByteAt(e,a),at.getByteAt(e,a+1),at.getByteAt(e,a+2)])}return{value:i,description:i.length>1?Dt(i)+xt(i):""}}}function Dt(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function xt(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 Lt={read:function(e,t){var n=function(e,t){return at.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=at.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=at.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":Nt(e,t,n),"Resolution Unit":kt(e,t,n),XResolution:Gt(e,t,n),YResolution:Bt(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 Nt(e,t,n){if(!(9>n)){var r=at.getByteAt(e,t+7),i=at.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function kt(e,t,n){if(!(10>n)){var r=at.getByteAt(e,t+9);return{value:r,description:Rt(r)}}}function Rt(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function Gt(e,t,n){if(!(12>n)){var r=at.getShortAt(e,t+10);return{value:r,description:""+r}}}function Bt(e,t,n){if(!(14>n)){var r=at.getShortAt(e,t+12);return{value:r,description:""+r}}}var _t={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:jt},336:{name:"Time Sent",description:zt},346:{name:"Coded Character Set",description:Vt,encoding_name:Vt},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"===h(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=h(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=h(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:jt},572:{name:"Time Created",description:zt},574:{name:"Digital Creation Date",description:jt},575:{name:"Digital Creation Time",description:zt},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=h(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=h(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=h(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(h(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(h(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=h(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 h(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=h(e);if(t["ObjectData Preview File Format"]){var i=h(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 jt(e){var t=h(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function zt(e){var t=h(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 Vt(e){var t=h(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 Ht={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(t instanceof DataView?t.buffer: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},Wt=5,Xt={read:function(e,t,n){try{if(Array.isArray(e))return Kt(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);var r=function(e,t){for(;t+12<=e.byteLength;){var n=Jt(e,t);if(Yt(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+qt(n)}throw Error("No IPTC NAA resource block.")}(e,t);return Kt(e,r.naaBlock,r.dataOffset,n)}catch(e){return{}}}};function Jt(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 Yt(e){return 1028===e.type}function qt(e){return e.size%2!=0?1:0}function Kt(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+=Wt+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&&!_t.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+Wt,a),c={id:o,name:Zt(_t.iptc[o],o,u),value:u,description:Qt(_t.iptc[o],u,n,r)};return function(e){return _t.iptc[e]&&_t.iptc[e].repeatable}(o)&&(c.repeatable=1),function(e){return _t.iptc[e]&&void 0!==_t.iptc[e].encoding_name}(o)&&(c.encoding=_t.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 Qt(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)?Ht.decode(r,t):t}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 tn={"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 Ve.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return nn(Ve.XResolution,e)},"tiff:YResolution":function(e){return nn(Ve.YResolution,e)},"exif:ApertureValue":function(e){return nn(Ve.ApertureValue,e)},"exif:GPSLatitude":on,"exif:GPSLongitude":on,"exif:FNumber":function(e){return nn(Ve.FNumber,e)},"exif:FocalLength":function(e){return nn(Ve.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return Ve.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return Ve.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 Ve.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return Ve.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return Ve.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return Ve.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return Ve.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return rn(e)?Ve.ExposureTime(e.split("/").map((function(e){return parseInt(e,10)}))):e},"exif:MeteringMode":function(e){return Ve.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return Ve.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return Ve.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return Ve.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return nn(Ve.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return Ve.WhiteBalance(parseInt(e,10))}};function nn(e,t){return rn(t)?e(t.split("/")):t}function rn(e){return/^-?\d+\/-?\d+$/.test(e)}function on(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 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.")}()),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 an(e){return an="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},an(e)}function un(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 cn,fn={read:function(e,t){var n={};if("string"==typeof e)return ln(n,e),n;var r,i=(r=function(e,t){if(0===t.length)return[];var n=[sn(e,t.slice(0,1))];return t.length>1&&n.push(sn(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 un(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)?un(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=ln(n,o);if(a){var c=ln(n,a);u||c||(delete n._raw,ln(n,sn(e,t)))}return n}};function sn(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 ln(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,gn(pn(dn(r),1))),1}catch(e){return 0}}function dn(e){for(var t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return dn(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw Error()}function pn(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:mn(e),value:pn(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 mn(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 gn(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,vn(e.attributes)),"object"===an(e.value)&&f(t,Cn(e.value))}))}return t}function vn(e){var t={};for(var n in e)try{hn(n)&&(t[Sn(n)]={value:e[n],attributes:{},description:bn(e[n],n)})}catch(e){}return t}function hn(e){return"rdf:parseType"!==e&&!yn(e)}function yn(e){return"xmlns"===e.split(":")[0]}function Sn(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function bn(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?bn(e.value):bn(e)})).join(", ")}(e);return t&&"function"==typeof tn[t]?tn[t](e,n):n}if("object"===an(e))return function(e){var t=[];for(var n in e)t.push("".concat(In(n),": ").concat(bn(e[n].value)));return t.join("; ")}(e);try{return t&&"function"==typeof tn[t]?tn[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function In(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 Cn(e){var t={};for(var n in e)try{yn(n)||(t[Sn(n)]=Un(e[n],n))}catch(e){}return t}function Un(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Dn(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:""}:An(e)?Pn(e,t):wn(e)?Tn(e,t):Fn(e)?On(e,t):function(e){return void 0!==Mn(e.value)}(e)?function(e,t){var n=Mn(e.value).value["rdf:li"],r=En(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return An(e)?Pn(e):wn(e)?Tn(e).value:Fn(e)?On(e).value:Dn(e)}(e))})),{value:i,attributes:r,description:bn(i,t)}}(e,t):Dn(e,t)}function An(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 Pn(e,t){var n=En(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),f(n,En(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||yn(n)||(t[Sn(n)]=e.value[n].value);return t}(e));var r=function(e){return xn(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:bn(r,t)}}function En(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||yn(n)||(t[Sn(n)]=e.attributes[n]);return t}function wn(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Tn(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(f(n.value,vn(e.value["rdf:Description"].attributes)),f(n.attributes,En(e)),e=e.value["rdf:Description"]),f(n.value,Cn(e.value)),n.description=bn(n.value,t),n}function Fn(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function On(e,t){var n=vn(e.attributes);return{value:n,attributes:{},description:bn(n,t)}}function Mn(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Dn(e,t){var n=xn(e)||gn(e.value);return{value:n,attributes:En(e),description:bn(n,t)}}function xn(e){return e.attributes&&e.attributes["rdf:resource"]}function Ln(e){return Ln="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},Ln(e)}function Nn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ln(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Ln(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===Ln(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function kn(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 Rn={2e3:{name:"PathInformation",description:function(e){for(var t={},n=[],r=0;r<e.byteLength;r+=26){var i=at.getShortAt(e,r);Gn[i]&&(t[i]||(t[i]=Gn[i].description),n.push({type:i,path:Gn[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 kn(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)?kn(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}}},Gn=(Nn(cn={},0,{description:"Closed subpath length",path:function(e,t){return[at.getShortAt(e,t)]}}),Nn(cn,1,{description:"Closed subpath Bezier knot, linked",path:Bn}),Nn(cn,2,{description:"Closed subpath Bezier knot, unlinked",path:Bn}),Nn(cn,3,{description:"Open subpath length",path:function(e,t){return[at.getShortAt(e,t)]}}),Nn(cn,4,{description:"Open subpath Bezier knot, linked",path:Bn}),Nn(cn,5,{description:"Open subpath Bezier knot, unlinked",path:Bn}),Nn(cn,6,{description:"Path fill rule",path:function(){return[]}}),Nn(cn,8,{description:"Initial fill rule",path:function(e,t){return[at.getShortAt(e,t)]}}),Nn(cn,7,{description:"Clipboard",path:function(e,t){return[[jn(e,t,8),jn(e,t+4,8),jn(e,t+8,8),jn(e,t+12,8)],jn(e,t+16,8)]}}),cn);function Bn(e,t){for(var n=[],r=0;r<24;r+=8)n.push(_n(e,t+r));return n}function _n(e,t){var n=jn(e,t,8);return[jn(e,t+4,8),n]}function jn(e,t,n){var r,i=at.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 zn(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 Vn={read:function(e,t){for(var n=i(new Uint8Array(e).buffer),r={},a=0;a<e.length;){var u=o(n,a,Jn);a+=Jn;var c=at.getShortAt(n,a),f=Yn(n,a+=Wn),s=f.tagName;a+=f.tagNameSize;var l=at.getLongAt(n,a);if(a+=Xn,u===Hn){var d=i(n.buffer,a,l),p={id:c,value:o(d,0,l)};if(Rn[c]){try{p.description=Rn[c].description(d)}catch(e){p.description="<no description formatter>"}r[s||Rn[c].name]=p}else t&&(r["undefined-".concat(c)]=p)}a+=l+l%2}return r}},Hn="8BIM",Wn=2,Xn=4,Jn=Hn.length;function Yn(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 zn(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)?zn(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 qn={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"}},Kn={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,n){return n&&t[0].compressionMethod!==p?function(e,t){return t[0].compressionMethod!==m?{}:g(new DataView(e.buffer.slice(t[0].offset,t[0].offset+t[0].length)),t[0].compressionMethod,"dataview").then(cr).catch((function(){return{}}))}(e,t):function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),a=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var a=o.slice(n.offset,n.offset+n.length),u=new Uint8Array(a);r.set(u,i),i+=u.length},u=1;u<=t.length;u++)a(u);return cr(new DataView(r.buffer))}catch(e){return{}}}(e,t)}},Qn=84,er=128,tr="acsp",nr="desc",rr="mluc",ir="text",or="sig ",ar=12;function ur(e,t){return e.length<t+ar}function cr(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.length<Qn)throw Error("ICC profile too short");for(var r={},i=Object.keys(Kn),u=0;u<i.length;u++){var c=i[u],f=Kn[c],s=f.value(e,parseInt(c,10)),l=s;f.description&&(l=f.description(s)),r[f.name]={value:s,description:l}}if(fr(t.slice(36,40))!==tr)throw Error("ICC profile: missing signature");if(function(e){return e.length<er+4}(t))return r;for(var d=e.getUint32(128),p=132,m=0;m<d;m++){if(ur(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===nr){var S=e.getUint32(v+8);if(S>h)return r;sr(r,g,fr(t.slice(v+12,v+S+11)))}else if(y===rr){for(var b=e.getUint32(v+8),I=e.getUint32(v+12),C=v+16,U=[],A=0;A<b;A++){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);U.push({languageCode:P,countryCode:E,text:F}),C+=I}if(1===b)sr(r,g,U[0].text);else{for(var O={},M=0;M<U.length;M++)O["".concat(U[M].languageCode,"-").concat(U[M].countryCode)]=U[M].text;sr(r,g,O)}}else y===ir?sr(r,g,fr(t.slice(v+8,v+h-7))):y===or&&sr(r,g,fr(t.slice(v+8,v+12)));p+=12}return r}function fr(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function sr(e,t,n){qn[t]?e[qn[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var lr={read:function(e,t){return{"Image Width":dr(e,t),"Image Height":pr(e,t),"Bit Depth":mr(e,t),"Color Type":gr(e,t),Compression:vr(e,t),Filter:hr(e,t),Interlace:yr(e,t)}}};function dr(e,t){if(!(t+0+4>e.byteLength)){var n=at.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function pr(e,t){if(!(t+4+4>e.byteLength)){var n=at.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function mr(e,t){if(!(t+8+1>e.byteLength)){var n=at.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function gr(e,t){if(!(t+9+1>e.byteLength)){var n=at.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 vr(e,t){if(!(t+10+1>e.byteLength)){var n=at.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function hr(e,t){if(!(t+11+1>e.byteLength)){var n=at.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function yr(e,t){if(!(t+12+1>e.byteLength)){var n=at.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function Sr(e){return Sr="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},Sr(e)}function br(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Sr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Sr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===Sr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var Ir={read:function(e,t,n,r){for(var i={},o=[],a=0;a<t.length;a++){var u=t[a],c=Or(e,u.offset,u.length,u.type,n);if(c instanceof Promise)o.push(c.then((function(e){var t=e.name,n=e.value,i=e.description;try{if(v.USE_EXIF&&kr(t,n))return{__exif:St.read(Gr(n),Fr,r)};if(v.USE_IPTC&&Rr(t,n))return{__iptc:Xt.read(Gr(n),0,r)};if(t)return br({},t,{value:n,description:i})}catch(e){}return{}})));else{var f=c.name,s=c.value,l=c.description;f&&(i[f]={value:s,description:l})}}return{readTags:i,readTagsPromise:o.length>0?Promise.all(o):void 0}}},Cr="STATE_KEYWORD",Ur="STATE_COMPRESSION",Ar="STATE_LANG",Pr="STATE_TRANSLATED_KEYWORD",Er="STATE_TEXT",wr=1,Tr=1,Fr=6;function Or(e,t,n,r,i){for(var o,a=[],u=[],c=[],f=Cr,s=p,l=0;l<n&&t+l<e.byteLength;l++)if(f!==Ur){if(f===Er){o=new DataView(e.buffer.slice(t+l,t+n));break}var d=e.getUint8(t+l);0===d?f=Dr(r,f):f===Cr?a.push(d):f===Ar?u.push(d):f===Pr&&c.push(d)}else s=Mr({type:r,dataView:e,offset:t+l}),r===Ae&&(l+=wr),f=Dr(r,f);if(s!==p&&!i)return{};var m=g(o,s);return m instanceof Promise?m.then((function(e){return xr(e,r,u,a)})).catch((function(){return xr("<text using unknown compression>".split(""),r,u,a)})):xr(m,r,u,a)}function Mr(e){var t=e.type,n=e.dataView,r=e.offset;if(t===Ae){if(n.getUint8(r)===Tr)return n.getUint8(r+1)}else if(t===Pe)return n.getUint8(r);return p}function Dr(e,t){return t===Cr&&[Ae,Pe].includes(e)?Ur:t===Ur?e===Ae?Ar:Er:t===Ar?Pr:Er}function xr(e,t,n,r){var i=function(e){return e instanceof DataView?o(e,0,e.byteLength):e}(e);return{name:Lr(t,n,r),value:i,description:t===Ae?Nr(e):i}}function Lr(e,t,n){var r=c(n);if(e===Ue||0===t.length)return r;var i=c(t);return"".concat(r," (").concat(i,")")}function Nr(e){return Ht.decode("UTF-8",e)}function kr(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function Rr(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function Gr(e){return function(e){for(var t=new DataView(new ArrayBuffer(e.length/2)),n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}var Br={read:function(e,t){for(var n={},r=0;r<t.length;r++){var i=at.getLongAt(e,t[r]+Se),a=o(e,t[r]+be,ye);a===Ee?(n["Pixels Per Unit X"]=_r(e,t[r],i),n["Pixels Per Unit Y"]=jr(e,t[r],i),n["Pixel Units"]=zr(e,t[r],i)):a===we&&(n["Modify Date"]=Vr(e,t[r],i))}return n}};function _r(e,t,n){if(Hr(e,t,n,0,4)){var r=at.getLongAt(e,t+Ie+0);return{value:r,description:""+r}}}function jr(e,t,n){if(Hr(e,t,n,4,4)){var r=at.getLongAt(e,t+Ie+4);return{value:r,description:""+r}}}function zr(e,t,n){if(Hr(e,t,n,8,1)){var r=at.getByteAt(e,t+Ie+8);return{value:r,description:1===r?"meters":"Unknown"}}}function Vr(e,t,n){if(Hr(e,t,n,0,7)){var r=at.getShortAt(e,t+Ie),i=at.getByteAt(e,t+Ie+2),o=at.getByteAt(e,t+Ie+3),a=at.getByteAt(e,t+Ie+4),u=at.getByteAt(e,t+Ie+5),c=at.getByteAt(e,t+Ie+6);return{value:[r,i,o,a,u,c],description:"".concat(Wr(r,4),"-").concat(Wr(i,2),"-").concat(Wr(o,2)," ").concat(Wr(a,2),":").concat(Wr(u,2),":").concat(Wr(c,2))}}}function Hr(e,t,n,r,i){return r+i<=n&&t+Ie+r+i<=e.byteLength}function Wr(e,t){return"".concat("0".repeat(t-(""+e).length)).concat(e)}var Xr={read:function(e,t){var n={},r=at.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=qr(e,t+Jr),n.ImageHeight=qr(e,t+Yr),n}},Jr=4,Yr=7;function qr(e,t){var n=at.getByteAt(e,t)+256*at.getByteAt(e,t+1)+65536*at.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Kr={read:function(e){return{"GIF Version":$r(e),"Image Width":Zr(e),"Image Height":Qr(e),"Global Color Map":ei(e),"Bits Per Pixel":ni(e),"Color Resolution Depth":ti(e)}}};function $r(e){if(!(6>e.byteLength)){var t=o(e,3,3);return{value:t,description:t}}}function Zr(e){if(!(8>e.byteLength)){var t=e.getUint16(6,1);return{value:t,description:"".concat(t,"px")}}}function Qr(e){if(!(10>e.byteLength)){var t=e.getUint16(8,1);return{value:t,description:"".concat(t,"px")}}}function ei(e){if(!(11>e.byteLength)){var t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}}function ti(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 ni(e){if(!(11>e.byteLength)){var t=1+(7&e.getUint8(10));return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}var ri=[6,7,99],ii={get:function(e,t,n){if((i=t)&&(void 0===i.Compression||ri.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 oi(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}oi.prototype=Error();var ai={MetadataMissingError:oi},ui={load:fi,loadView:li,errors:ai},ci=ai;function fi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return"string"==typeof e}(e)?(n.async=1,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,n).then((function(e){return si(e,n)}))):function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e)?(n.async=1,(t=e,new Promise((function(e,n){var r=new FileReader;r.onload=function(t){return e(t.target.result)},r.onerror=function(){return n(r.error)},r.readAsArrayBuffer(t)}))).then((function(e){return si(e,n)}))):si(e,n)}function si(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),li(function(e){try{return new DataView(e)}catch(t){return new r(e)}}(e),t)}function li(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,async:0,includeUnknown:0},n=t.expanded,r=void 0===n?0:n,i=t.async,o=void 0===i?0:i,a=t.includeUnknown,u=void 0===a?0:a,s=0,l={},d=[],p=je.parseAppMarkers(e,o),m=p.fileType,g=p.fileDataOffset,h=p.jfifDataOffset,y=p.tiffHeaderOffset,b=p.iptcDataOffset,I=p.xmpChunks,C=p.iccChunks,U=p.mpfDataOffset,A=p.pngHeaderOffset,P=p.pngTextChunks,E=p.pngChunkOffsets,w=p.vp8xChunkOffset,T=p.gifHeaderOffset;if(v.USE_JPEG&&v.USE_FILE&&function(e){return void 0!==e}(g)){s=1;var F=wt.read(e,g);r?l.file=F:l=f({},l,F)}if(v.USE_JPEG&&v.USE_JFIF&&function(e){return void 0!==e}(h)){s=1;var O=Lt.read(e,h);r?l.jfif=O:l=f({},l,O)}if(v.USE_EXIF&&function(e){return void 0!==e}(y)){s=1;var M=St.read(e,y,u);if(M.Thumbnail&&(l.Thumbnail=M.Thumbnail,delete M.Thumbnail),r?(l.exif=M,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=S(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=S(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){}}}(l)):l=f({},l,M),v.USE_TIFF&&v.USE_IPTC&&M["IPTC-NAA"]&&!di(b)){var D=Xt.read(M["IPTC-NAA"].value,0,u);r?l.iptc=D:l=f({},l,D)}if(v.USE_TIFF&&v.USE_XMP&&M.ApplicationNotes&&!pi(I)){var x=fn.read(c(M.ApplicationNotes.value));r?l.xmp=x:(delete x._raw,l=f({},l,x))}if(v.USE_PHOTOSHOP&&M.ImageSourceData){var L=Vn.read(M.PhotoshopSettings.value,u);r?l.photoshop=L:l=f({},l,L)}if(v.USE_TIFF&&v.USE_ICC&&M.ICC_Profile&&!mi(C)){var N=Zn.read(M.ICC_Profile.value,[{offset:0,length:M.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);r?l.icc=N:l=f({},l,N)}}if(v.USE_JPEG&&v.USE_IPTC&&di(b)){s=1;var k=Xt.read(e,b,u);r?l.iptc=k:l=f({},l,k)}if(v.USE_XMP&&pi(I)){s=1;var R=fn.read(e,I);r?l.xmp=R:(delete R._raw,l=f({},l,R))}if((v.USE_JPEG||v.USE_WEBP)&&v.USE_ICC&&mi(C)){s=1;var G=Zn.read(e,C,o);G instanceof Promise?d.push(G.then(Y)):Y(G)}if(v.USE_MPF&&function(e){return void 0!==e}(U)){s=1;var B=bt.read(e,U,u);r?l.mpf=B:l=f({},l,B)}if(v.USE_PNG&&v.USE_PNG_FILE&&void 0!==A){s=1;var _=lr.read(e,A);r?(l.png=l.png?f({},l.png,_):_,l.pngFile=_):l=f({},l,_)}if(v.USE_PNG&&function(e){return void 0!==e}(P)){s=1;var j=Ir.read(e,P,o,u),z=j.readTags,V=j.readTagsPromise;q(z),V&&d.push(V.then((function(e){return e.forEach(q)})))}if(v.USE_PNG&&function(e){return void 0!==e}(E)){s=1;var H=Br.read(e,E);r?l.png=l.png?f({},l.png,H):H:l=f({},l,H)}if(v.USE_WEBP&&function(e){return void 0!==e}(w)){s=1;var W=Xr.read(e,w);r?l.riff=l.riff?f({},l.riff,W):W:l=f({},l,W)}if(v.USE_GIF&&function(e){return void 0!==e}(T)){s=1;var X=Kr.read(e,T);r?l.gif=l.gif?f({},l.gif,X):X:l=f({},l,X)}var J=(v.USE_JPEG||v.USE_WEBP)&&v.USE_EXIF&&v.USE_THUMBNAIL&&ii.get(e,l.Thumbnail,y);if(J?(s=1,l.Thumbnail=J):delete l.Thumbnail,m&&(r?(l.file||(l.file={}),l.file.FileType=m):l.FileType=m),!s)throw new ai.MetadataMissingError;return o?Promise.all(d).then((function(){return l})):l;function Y(e){r?l.icc=e:l=f({},l,e)}function q(e){if(r){for(var t=0,n=["exif","iptc"];t<n.length;t++){var i=n[t],o="__".concat(i);e[o]&&(l[i]=l[i]?f({},l.exif,e[o]):e[o],delete e[o])}l.png=l.png?f({},l.png,e):e,l.pngText=l.pngText?f({},l.png,e):e}else l=f({},l,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e)}}function di(e){return void 0!==e}function pi(e){return Array.isArray(e)&&e.length>0}function mi(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 Pi},errors:function(){return Ei},load:function(){return wi},loadView:function(){return xi}});var r=function(){return e=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},(t=[{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}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:0}),e;var e,t}();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 f(r)}function a(e,t){for(var n=[],r=0;t+r<e.byteLength;){var i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return f(n)}function u(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(),f(r)}function c(e,t){var n=e.getUint8(t);return[n,o(e,t+1,n)]}function f(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function s(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function l(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 d(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 p(e,t){return Array(t+1).join(e)}var m=void 0,g=0;function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string";if(t===g&&"function"==typeof DecompressionStream){var r=new DecompressionStream("deflate"),i=new Blob([e]).stream().pipeThrough(r);return"dataview"===n?new Response(i).arrayBuffer().then((function(e){return new DataView(e)})):new Response(i).text()}return void 0!==t?Promise.reject("Unknown compression method ".concat(t,".")):e}var v={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_AVIF:1,USE_WEBP:1,USE_GIF:1};function y(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function S(e){if(e.length>=8){var t=y(e.slice(0,8));if("ASCII\0\0\0"===t)return y(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 b(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var I=18761,C=19789,U={BIG_ENDIAN:C,LITTLE_ENDIAN:I,getByteOrder:function(e,t){if(e.getUint16(t)===I)return I;if(e.getUint16(t)===C)return C;throw Error("Illegal byte order value. Faulty image.")}},A=2,P=65496,E=2,w=4,T=2,x=2,F=10,O=18,M=33,D=79,L=18,N=8,k="ICC_PROFILE\0",R=w+k.length,B=R+1,G="MPF\0",_=65472,j=65474,z=65476,V=65499,H=65501,W=65498,X=65504,J=65505,Y=65506,q=65517,K=65519,$=65534,Z=65535,Q="JFIF",ee="Exif",te="http://ns.adobe.com/xap/1.0/\0",ne="http://ns.adobe.com/xmp/extension/\0",re="Photoshop 3.0";function ie(e,t){return e.getUint16(t)===_}function oe(e,t){return e.getUint16(t)===j}function ae(e,t){var n=k.length;return e.getUint16(t)===Y&&o(e,t+w,n)===k}function ue(e,t){var n=G.length;return e.getUint16(t)===Y&&o(e,t+w,n)===G}function ce(e,t){var n=Q.length;return e.getUint16(t)===X&&o(e,t+w,n)===Q&&0===e.getUint8(t+w+n)}function fe(e,t){var n=ee.length;return e.getUint16(t)===J&&o(e,t+w,n)===ee&&0===e.getUint8(t+w+n)}function se(e,t){return e.getUint16(t)===J&&function(e,t){var n=te.length;return o(e,t+w,n)===te}(e,t)}function le(e,t){return e.getUint16(t)===J&&function(e,t){var n=ne.length;return o(e,t+w,n)===ne}(e,t)}function de(e,t){return{dataOffset:e+M,length:t-(M-T)}}function pe(e,t){return{dataOffset:e+D,length:t-(D-T)}}function me(e,t){var n=re.length;return e.getUint16(t)===q&&o(e,t+w,n)===re&&0===e.getUint8(t+w+n)}function ge(e,t){var n=e.getUint16(t);return n>=X&&n<=K||n===$||n===_||n===j||n===z||n===V||n===H||n===W}function he(e,t){return e.getUint16(t)===Z}var ve="‰PNG\r\n\n",ye=4,Se=4,be=0,Ie=ye,Ce=ye+Se,Ue="XML:com.adobe.xmp\0",Ae="tEXt",Pe="iTXt",Ee="zTXt",we="pHYs",Te="tIME",xe="eXIf",Fe="iCCP";function Oe(e,t){return"IHDR"===o(e,t+Ie,Se)}function Me(e,t){return o(e,t+Ie,Se)===Pe&&o(e,t+Ce,Ue.length)===Ue}function De(e,t,n){var r=o(e,t+Ie,Se);return r===Ae||r===Pe||r===Ee&&n}function Le(e,t){return o(e,t+Ie,Se)===xe}function Ne(e,t){return o(e,t+Ie,Se)===Fe}function ke(e,t){var n=[we,Te],r=o(e,t+Ie,Se);return n.includes(r)}function Re(e,t){t+=Ce+Ue.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Be(e,t){var n=a(e,t);return t+=n.length+1,{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function Ge(e,t,n,r,i,o,a,u){if(void 0===u)return[];for(var c=[],f=n.items,s=0;s<u;s++){var l={extents:[]};l.itemId=_e(e,f,t),f+=r.item.itemId,l.constructionMethod=1===t||2===t?15&e.getUint16(f):void 0,f+=r.item.constructionMethod,l.dataReferenceIndex=e.getUint16(f),f+=r.item.dataReferenceIndex,l.baseOffset=ze(e,f,r.item.baseOffset),f+=r.item.baseOffset,l.extentCount=e.getUint16(f),f+=r.item.extentCount;for(var d=0;d<l.extentCount;d++){var p={};p.extentIndex=je(e,t,f,a),f+=r.item.extent.extentIndex,p.extentOffset=ze(e,f,i),f+=r.item.extent.extentOffset,p.extentLength=ze(e,f,o),f+=r.item.extent.extentLength,l.extents.push(p)}c.push(l)}return c}function _e(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function je(e,t,n,r){if((1===t||2===t)&&r>0)return ze(e,n,r)}function ze(e,t,n){return 4===n?e.getUint32(t):8===n?function(e,t){return e.getUint32(t+4)}(e,t):0}var Ve=1718909296,He=1768977008,We=1835365473,Xe=1768714083,Je=1768517222,Ye=1768842853,qe=1768973167,Ke=1668246642,$e=1165519206,Ze=1835625829,Qe=1970432288;function et(e,t){var n=function(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?{length:e.byteLength-t,contentOffset:t+4+4}:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?{length:e.getUint32(t+12),contentOffset:t+4+4+8}:{length:n,contentOffset:t+4+4}}(e,t),r=n.length,i=n.contentOffset;if(!(r<8)){var u=e.getUint32(t+4);if(u===Ve)return function(e,t,n){return{type:"ftyp",majorBrand:o(e,t,4),length:n}}(e,i,r);if(u===He)return function(e,t,n,r){return{type:"iprp",subBoxes:it(e,n,r-(n-t)),length:r}}(e,t,i,r);if(u===qe)return function(e,t,n,r){return{type:"ipco",properties:it(e,n,r-(n-t)),length:r}}(e,t,i,r);if(u===Ke)return function(e,t,n){return{type:"colr",icc:rt(e,t),length:n}}(e,i,r);var c=e.getUint8(i);return u===We?function(e,t,n,r){return{type:"meta",subBoxes:it(e,n+3,r-(n+3-t)),length:r}}(e,t,i+1,r):u===Xe?function(e,t,n,r){var i=function(e,t){var n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};e<2?(n.itemCount=2,n.item.itemId=2):2===e&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===e||2===e?2:0;var r={offsetSize:t,lengthSize:t,baseOffsetSize:t+1,indexSize:t+1};return r.itemCount=t+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}(t,n+3),o=i.offsets,a=i.sizes,u=e.getUint8(o.offsetSize)>>4;a.item.extent.extentOffset=u;var c=15&e.getUint8(o.lengthSize);a.item.extent.extentLength=c;var f=e.getUint8(o.baseOffsetSize)>>4;a.item.baseOffset=f;var s=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t)}(e,o.indexSize,t);a.item.extent.extentIndex=void 0!==s?s:0;var l=function(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}(e,o.itemCount,t);return{type:"iloc",items:Ge(e,t,o,a,u,c,s,l),length:r}}(e,c,i+1,r):u===Je?function(e,t,n,r,i){var o=function(e,t){var n={entryCount:t+3},r={};return r.entryCount=0===e?2:4,n.itemInfos=n.entryCount+r.entryCount,{offsets:n}}(n,r),a=o.offsets;return{type:"iinf",itemInfos:it(e,a.itemInfos,i-(a.itemInfos-t)),length:i}}(e,t,c,i+1,r):u===Ye?function(e,t,n,r,i){r+=3;var o={type:"infe",length:i};return 0!==n&&1!==n||(o.itemId=e.getUint16(r),r+=2,o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemName=a(e,r),r+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=e.getUint16(r),r+=2):3===n&&(o.itemId=e.getUint32(r),r+=4),o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemType=e.getUint32(r),r+=4,o.itemName=a(e,r),r+=o.itemName.length+1,o.itemType===Ze?(o.contentType=a(e,r),t+i>(r+=o.contentType.length+1)&&(o.contentEncoding=a(e,r),r+=o.contentEncoding.length+1)):o.itemType===Qe&&(o.itemUri=a(e,r),r+=o.itemUri.length+1)),o}(e,t,c,i+1,r):{type:void 0,length:r}}}function tt(e){if(v.USE_EXIF||v.USE_XMP||v.USE_ICC){var t={},n=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=et(e,t);if(void 0===n)break;if("meta"===n.type)return n;t+=n.length}}(e);return n?(v.USE_EXIF&&(t.tiffHeaderOffset=function(e,t){try{var n=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===$e}))}(t).itemId;return function(e,t){return t+4+e.getUint32(t)}(e,nt(t,n).extents[0].extentOffset)}catch(e){return}}(e,n)),v.USE_XMP&&(t.xmpChunks=function(e){try{var t=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===Ze&&"application/rdf+xml"===e.contentType}))}(e).itemId,n=nt(e,t).extents[0];return[{dataOffset:n.extentOffset,length:n.extentLength}]}catch(e){return}}(n)),v.USE_ICC&&(t.iccChunks=function(e){try{var t=e.subBoxes.find((function(e){return"iprp"===e.type})).subBoxes.find((function(e){return"ipco"===e.type})).properties.find((function(e){return"colr"===e.type})).icc;if(t)return[t]}catch(e){}}(n)),t.hasAppMarkers=void 0!==t.tiffHeaderOffset||void 0!==t.xmpChunks||void 0!==t.iccChunks,t):{hasAppMarkers:0}}return{}}function nt(e,t){return e.subBoxes.find((function(e){return"iloc"===e.type})).items.find((function(e){return e.itemId===t}))}function rt(e,t){var n=o(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function it(e,t,n){for(var r=[$e,Ze],i=[],o=t;o<t+n;){var a=et(e,o);if(void 0===a)break;void 0===a.type||void 0!==a.itemType&&-1===r.indexOf(a.itemType)||i.push(a),o+=a.length}return i}var ot=6,at=["GIF87a","GIF89a"],ut={parseAppMarkers:function(e,t){if(v.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===U.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)}(e))return ct(v.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(v.USE_JPEG&&function(e){return!!e&&e.byteLength>=A&&e.getUint16(0)===P}(e))return ct(function(e){for(var t,n,r,i,o,a,u,c,f,s=E;s+w+5<=e.byteLength;){if(v.USE_FILE&&ie(e,s))t=e.getUint16(s+T),n=s+T;else if(v.USE_FILE&&oe(e,s))t=e.getUint16(s+T),r=s+T;else if(v.USE_JFIF&&ce(e,s))t=e.getUint16(s+T),i=s+x;else if(v.USE_EXIF&&fe(e,s))t=e.getUint16(s+T),o=s+F;else if(v.USE_XMP&&se(e,s))u||(u=[]),t=e.getUint16(s+T),u.push(de(s,t));else if(v.USE_XMP&&le(e,s))u||(u=[]),t=e.getUint16(s+T),u.push(pe(s,t));else if(v.USE_IPTC&&me(e,s))t=e.getUint16(s+T),a=s+O;else if(v.USE_ICC&&ae(e,s)){t=e.getUint16(s+T);var l=s+L,d=t-(L-T),p=e.getUint8(s+R),m=e.getUint8(s+B);c||(c=[]),c.push({offset:l,length:d,chunkNumber:p,chunksTotal:m})}else if(v.USE_MPF&&ue(e,s))t=e.getUint16(s+T),f=s+N;else{if(!ge(e,s)){if(he(e,s)){s++;continue}break}t=e.getUint16(s+T)}s+=T+t}return{hasAppMarkers:s>E,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:c,mpfDataOffset:f}}(e),"jpeg","JPEG");if(v.USE_PNG&&function(e){return!!e&&o(e,0,ve.length)===ve}(e))return ct(function(e,t){for(var n={hasAppMarkers:0},r=ve.length;r+ye+Se<=e.byteLength;){if(v.USE_PNG_FILE&&Oe(e,r))n.hasAppMarkers=1,n.pngHeaderOffset=r+Ce;else if(v.USE_XMP&&Me(e,r)){var i=Re(e,r);void 0!==i&&(n.hasAppMarkers=1,n.xmpChunks=[{dataOffset:i,length:e.getUint32(r+be)-(i-(r+Ce))}])}else if(De(e,r,t)){n.hasAppMarkers=1;var a=o(e,r+Ie,Se);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+be),type:a,offset:r+Ce})}else if(Le(e,r))n.hasAppMarkers=1,n.tiffHeaderOffset=r+Ce;else if(v.USE_ICC&&t&&Ne(e,r)){n.hasAppMarkers=1;var u=e.getUint32(r+be),c=r+Ce,f=Be(e,c),s=f.profileName,l=f.compressionMethod,d=f.compressedProfileOffset;n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:d,length:u-(d-c),chunkNumber:1,chunksTotal:1,profileName:s,compressionMethod:l})}else ke(e,r)&&(n.hasAppMarkers=1,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+be));r+=e.getUint32(r+be)+ye+Se+4}return n}(e,t),"png","PNG");if(v.USE_HEIC&&function(e){if(!e)return 0;try{var t=et(e,0);return t&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t.majorBrand)}catch(e){return 0}}(e))return ct(function(e){return tt(e)}(e),"heic","HEIC");if(v.USE_AVIF&&function(e){if(!e)return 0;try{var t=et(e,0);return t&&"avif"===t.majorBrand}catch(e){return 0}}(e))return ct(function(e){return tt(e)}(e),"avif","AVIF");if(v.USE_WEBP&&function(e){return!!e&&"RIFF"===o(e,0,4)&&"WEBP"===o(e,8,4)}(e))return ct(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);v.USE_EXIF&&"EXIF"===c?(u=1,t="Exif\0\0"===o(e,a+8,6)?a+8+6:a+8):v.USE_XMP&&"XMP "===c?(u=1,n=[{dataOffset:a+8,length:f}]):v.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(v.USE_GIF&&function(e){return!!e&&at.includes(o(e,0,ot))}(e))return ct({gifHeaderOffset:0},"gif","GIF");throw Error("Invalid image format")}};function ct(e,t,n){return s({},e,{fileType:{value:t,description:n}})}var ft={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){if(e[0]/e[1]>.25){var t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 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])}},st={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:ft.XResolution},283:{name:"YResolution",description:ft.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:ft.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:ft.LightSource},50779:{name:"CalibrationIlluminant2",description:ft.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 lt(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 dt(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 pt={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:b},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:b},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 dt(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)?dt(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:S},28:{name:"GPSAreaInformation",description:S},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},mt={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return y(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},gt={45056:{name:"MPFVersion",description:function(e){return y(e)}},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};function ht(e){return ht="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},ht(e)}function vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==ht(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===ht(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var yt=s({},st,{33434:{name:"ExposureTime",description:ft.ExposureTime},33437:{name:"FNumber",description:ft.FNumber},34850:{name:"ExposureProgram",description:ft.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 y(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:ft.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:ft.ShutterSpeedValue},37378:{name:"ApertureValue",description:ft.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:ft.MeteringMode},37384:{name:"LightSource",description:ft.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:ft.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:S},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:ft.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:ft.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 lt(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)?lt(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:ft.CustomRendered},41986:{name:"ExposureMode",description:ft.ExposureMode},41987:{name:"WhiteBalance",description:ft.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:ft.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:ft.Contrast},41993:{name:"Saturation",description:ft.Saturation},41994:{name:"Sharpness",description:ft.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"}),St="0th",bt="exif",It="interoperability",Ct=vt(vt(vt(vt(vt(vt({},St,yt),"1st",st),bt,yt),"gps",pt),It,mt),"mpf",v.USE_MPF?gt:{}),Ut={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},At={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Pt={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:Et,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===U.LITTLE_ENDIAN)},getLongAt:wt,getRationalAt:function(e,t,n){return[wt(e,t,n),wt(e,t+4,n)]},getUndefinedAt:function(e,t){return Et(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 wt(e,t,n)},typeSizes:Ut,tagTypes:At,getTypeSize:function(e){if(void 0===At[e])throw Error("No such type found.");return Ut[At[e]]}};function Et(e,t){return e.getUint8(t)}function wt(e,t,n){return e.getUint32(t,n===U.LITTLE_ENDIAN)}function Tt(e,t,n){return e.getInt32(t,n===U.LITTLE_ENDIAN)}var xt={1:Pt.getByteAt,2:Pt.getAsciiAt,3:Pt.getShortAt,4:Pt.getLongAt,5:Pt.getRationalAt,7:Pt.getUndefinedAt,9:Pt.getSlongAt,10:Pt.getSrationalAt,13:Pt.getIfdPointerAt};function Ft(e,t,n){return t+Pt.getLongAt(e,t+4,n)}function Ot(e,t,n,r,i,o){var a=Pt.getTypeSize("SHORT"),u={},c=function(e,t,n){return t+Pt.getTypeSize("SHORT")<=e.byteLength?Pt.getShortAt(e,t,n):0}(e,r,i);r+=a;for(var f=0;f<c&&!(r+12>e.byteLength);f++){var s=Mt(e,t,n,r,i,o);void 0!==s&&(u[s.name]={id:s.id,value:s.value,description:s.description}),r+=12}if(v.USE_THUMBNAIL&&r<e.byteLength-Pt.getTypeSize("LONG")){var l=Pt.getLongAt(e,r,i);0!==l&&t===St&&(u.Thumbnail=Ot(e,"1st",n,n+l,i,1))}return u}function Mt(e,t,n,r,i,o){var a,u=Pt.getTypeSize("SHORT"),c=u+Pt.getTypeSize("SHORT"),f=c+Pt.getTypeSize("LONG"),s=Pt.getShortAt(e,r,i),l=Pt.getShortAt(e,r+u,i),d=Pt.getLongAt(e,r+c,i);if(void 0!==Pt.typeSizes[l]&&(o||void 0!==Ct[t][s])){if(function(e,t){return Pt.typeSizes[e]*t<=Pt.getTypeSize("LONG")}(l,d))a=Dt(e,r+f,l,d,i);else{var p=Pt.getLongAt(e,r+f,i);a=function(e,t,n,r,i){return t+n+Pt.typeSizes[r]*i<=e.byteLength}(e,n,p,l,d)?Dt(e,n+p,l,d,i,33723===s):"<faulty value>"}l===Pt.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!==Ct[t][s])if(void 0!==Ct[t][s].name&&void 0!==Ct[t][s].description){m=Ct[t][s].name;try{g=Ct[t][s].description(a)}catch(e){g=Lt(a)}}else l===Pt.tagTypes.RATIONAL||l===Pt.tagTypes.SRATIONAL?(m=Ct[t][s],g=""+a[0]/a[1]):(m=Ct[t][s],g=Lt(a));return{id:s,name:m,value:a,description:g}}}function Dt(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=Pt.typeSizes[n],n=Pt.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(xt[n](e,t,i)),t+=Pt.typeSizes[n];return n===Pt.tagTypes.ASCII?o=Pt.getAsciiValue(o):1===o.length&&(o=o[0]),o}function Lt(e){return e instanceof Array?e.join(", "):e}var Nt="Exif IFD Pointer",kt="GPS Info IFD Pointer",Rt="Interoperability IFD Pointer",Bt={read:function(e,t,n){var r=U.getByteOrder(e,t),i=function(e,t,n,r){return Ot(e,St,t,Ft(e,t,n),n,r)}(e,t,r,n);return function(e,t,n,r,i){return void 0!==e[Rt]?s(e,Ot(t,It,n,n+e[Rt].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[kt]?s(e,Ot(t,"gps",n,n+e[kt].value,r,i)):e}(i=function(e,t,n,r,i){return void 0!==e[Nt]?s(e,Ot(t,bt,n,n+e[Nt].value,r,i)):e}(i,e,t,r,n),e,t,r,n),e,t,r,n)}},Gt={read:function(e,t,n){var r=U.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/_t);o++){i[o]={};var a=jt(n.MPEntry.value,o*_t,Pt.getTypeSize("LONG"),r);i[o].ImageFlags=zt(a),i[o].ImageFormat=Vt(a),i[o].ImageType=Ht(a);var u=jt(n.MPEntry.value,o*_t+4,Pt.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var c=Wt(o,n.MPEntry,r,t);i[o].ImageOffset={value:c,description:""+c};var f=jt(n.MPEntry.value,o*_t+12,Pt.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:f,description:""+f};var s=jt(n.MPEntry.value,o*_t+14,Pt.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:s,description:""+s},i[o].image=e.buffer.slice(c,c+u),l(i[o],"base64",(function(){return d(this.image)}))}return n.Images=i,n}(e,t,Ot(e,"mpf",t,Ft(e,t,r),r,n),r)}},_t=16;function jt(e,t,n,r){if(r===U.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 zt(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 Wt(e,t,n,r){return function(e){return 0===e}(e)?0:jt(t.value,e*_t+8,Pt.getTypeSize("LONG"),n)+r}var Xt={read:function(e,t){var n=function(e,t){return Pt.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=Pt.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":Jt(e,t,n),"Image Height":Yt(e,t,n),"Image Width":qt(e,t,n),"Color Components":r,Subsampling:r&&Kt(e,t,r.value,n)}}};function Jt(e,t,n){if(!(3>n)){var r=Pt.getByteAt(e,t+2);return{value:r,description:""+r}}}function Yt(e,t,n){if(!(5>n)){var r=Pt.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function qt(e,t,n){if(!(7>n)){var r=Pt.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function Kt(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([Pt.getByteAt(e,a),Pt.getByteAt(e,a+1),Pt.getByteAt(e,a+2)])}return{value:i,description:i.length>1?$t(i)+Zt(i):""}}}function $t(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function Zt(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 Qt={read:function(e,t){var n=function(e,t){return Pt.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=Pt.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=Pt.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":en(e,t,n),"Resolution Unit":tn(e,t,n),XResolution:rn(e,t,n),YResolution:on(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 en(e,t,n){if(!(9>n)){var r=Pt.getByteAt(e,t+7),i=Pt.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function tn(e,t,n){if(!(10>n)){var r=Pt.getByteAt(e,t+9);return{value:r,description:nn(r)}}}function nn(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function rn(e,t,n){if(!(12>n)){var r=Pt.getShortAt(e,t+10);return{value:r,description:""+r}}}function on(e,t,n){if(!(14>n)){var r=Pt.getShortAt(e,t+12);return{value:r,description:""+r}}}var an={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:un},336:{name:"Time Sent",description:cn},346:{name:"Coded Character Set",description:fn,encoding_name:fn},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"===y(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=y(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=y(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:un},572:{name:"Time Created",description:cn},574:{name:"Digital Creation Date",description:un},575:{name:"Digital Creation Time",description:cn},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=y(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=y(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=y(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(y(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(y(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=y(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 y(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=y(e);if(t["ObjectData Preview File Format"]){var i=y(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 un(e){var t=y(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function cn(e){var t=y(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 fn(e){var t=y(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 sn={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(t instanceof DataView?t.buffer: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},ln=5,dn={read:function(e,t,n){try{if(Array.isArray(e))return hn(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);var r=function(e,t){for(;t+12<=e.byteLength;){var n=pn(e,t);if(mn(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+gn(n)}throw Error("No IPTC NAA resource block.")}(e,t);return hn(e,r.naaBlock,r.dataOffset,n)}catch(e){return{}}}};function pn(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 mn(e){return 1028===e.type}function gn(e){return e.size%2!=0?1:0}function hn(e,t,n,r){for(var i={},o=void 0,a=n+t.size;n<a&&n<e.byteLength;){var u=vn(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+=ln+f}return i}function vn(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&&!an.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+ln,a),c={id:o,name:yn(an.iptc[o],o,u),value:u,description:Sn(an.iptc[o],u,n,r)};return function(e){return an.iptc[e]&&an.iptc[e].repeatable}(o)&&(c.repeatable=1),function(e){return an.iptc[e]&&void 0!==an.iptc[e].encoding_name}(o)&&(c.encoding=an.iptc[o].encoding_name(u)),{tag:c,tagSize:a}}function yn(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 Sn(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)?sn.decode(r,t):t}function bn(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 In={"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 ft.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return Cn(ft.XResolution,e)},"tiff:YResolution":function(e){return Cn(ft.YResolution,e)},"exif:ApertureValue":function(e){return Cn(ft.ApertureValue,e)},"exif:GPSLatitude":An,"exif:GPSLongitude":An,"exif:FNumber":function(e){return Cn(ft.FNumber,e)},"exif:FocalLength":function(e){return Cn(ft.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return ft.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return ft.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 ft.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return ft.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return ft.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return ft.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return ft.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return Un(e)?ft.ExposureTime(e.split("/").map((function(e){return parseInt(e,10)}))):e},"exif:MeteringMode":function(e){return ft.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return ft.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return ft.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return ft.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return Cn(ft.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return ft.WhiteBalance(parseInt(e,10))}};function Cn(e,t){return Un(t)?e(t.split("/")):t}function Un(e){return/^-?\d+\/-?\d+$/.test(e)}function An(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 bn(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)?bn(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 Pn(e){return Pn="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},Pn(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={read:function(e,t){var n={};if("string"==typeof e)return xn(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 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}}(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=xn(n,o);if(a){var c=xn(n,a);u||c||(delete n._raw,xn(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 xn(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,s(e,Dn(On(Fn(r),1))),1}catch(e){return 0}}function Fn(e){for(var t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return Fn(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:Mn(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 Mn(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 Dn(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){s(t,Ln(e.attributes)),"object"===Pn(e.value)&&s(t,_n(e.value))}))}return t}function Ln(e){var t={};for(var n in e)try{Nn(n)&&(t[Rn(n)]={value:e[n],attributes:{},description:Bn(e[n],n)})}catch(e){}return t}function Nn(e){return"rdf:parseType"!==e&&!kn(e)}function kn(e){return"xmlns"===e.split(":")[0]}function Rn(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function Bn(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?Bn(e.value):Bn(e)})).join(", ")}(e);return t&&"function"==typeof In[t]?In[t](e,n):n}if("object"===Pn(e))return function(e){var t=[];for(var n in e)t.push("".concat(Gn(n),": ").concat(Bn(e[n].value)));return t.join("; ")}(e);try{return t&&"function"==typeof In[t]?In[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function Gn(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 _n(e){var t={};for(var n in e)try{kn(n)||(t[Rn(n)]=jn(e[n],n))}catch(e){}return t}function jn(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Kn(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:""}:zn(e)?Vn(e,t):Wn(e)?Xn(e,t):Jn(e)?Yn(e,t):function(e){return void 0!==qn(e.value)}(e)?function(e,t){var n=qn(e.value).value["rdf:li"],r=Hn(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return zn(e)?Vn(e):Wn(e)?Xn(e).value:Jn(e)?Yn(e).value:Kn(e)}(e))})),{value:i,attributes:r,description:Bn(i,t)}}(e,t):Kn(e,t)}function zn(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 Vn(e,t){var n=Hn(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),s(n,Hn(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||kn(n)||(t[Rn(n)]=e.value[n].value);return t}(e));var r=function(e){return $n(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:Bn(r,t)}}function Hn(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||kn(n)||(t[Rn(n)]=e.attributes[n]);return t}function Wn(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Xn(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(s(n.value,Ln(e.value["rdf:Description"].attributes)),s(n.attributes,Hn(e)),e=e.value["rdf:Description"]),s(n.value,_n(e.value)),n.description=Bn(n.value,t),n}function Jn(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function Yn(e,t){var n=Ln(e.attributes);return{value:n,attributes:{},description:Bn(n,t)}}function qn(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Kn(e,t){var n=$n(e)||Dn(e.value);return{value:n,attributes:Hn(e),description:Bn(n,t)}}function $n(e){return e.attributes&&e.attributes["rdf:resource"]}function Zn(e){return Zn="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},Zn(e)}function Qn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Zn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===Zn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function er(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 tr={2e3:{name:"PathInformation",description:function(e){for(var t={},n=[],r=0;r<e.byteLength;r+=26){var i=Pt.getShortAt(e,r);nr[i]&&(t[i]||(t[i]=nr[i].description),n.push({type:i,path:nr[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description:function(e){return(t=c(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 er(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)?er(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}}},nr=Qn(Qn(Qn(Qn(Qn(Qn(Qn(Qn(Qn({},0,{description:"Closed subpath length",path:function(e,t){return[Pt.getShortAt(e,t)]}}),1,{description:"Closed subpath Bezier knot, linked",path:rr}),2,{description:"Closed subpath Bezier knot, unlinked",path:rr}),3,{description:"Open subpath length",path:function(e,t){return[Pt.getShortAt(e,t)]}}),4,{description:"Open subpath Bezier knot, linked",path:rr}),5,{description:"Open subpath Bezier knot, unlinked",path:rr}),6,{description:"Path fill rule",path:function(){return[]}}),8,{description:"Initial fill rule",path:function(e,t){return[Pt.getShortAt(e,t)]}}),7,{description:"Clipboard",path:function(e,t){return[[or(e,t,8),or(e,t+4,8),or(e,t+8,8),or(e,t+12,8)],or(e,t+16,8)]}});function rr(e,t){for(var n=[],r=0;r<24;r+=8)n.push(ir(e,t+r));return n}function ir(e,t){var n=or(e,t,8);return[or(e,t+4,8),n]}function or(e,t,n){var r,i=Pt.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(p("1",32-n),2);return o*function(e,t){return parseInt(e.replace(".",""),2)/Math.pow(2,(e.split(".")[1]||"").length)}(a.toString(2)+"."+(p("0",32-n-(r=u.toString(2)).length)+r))}function ar(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 ur={read:function(e,t){for(var n=i(new Uint8Array(e).buffer),r={},a=0;a<e.length;){var u=o(n,a,lr);a+=lr;var c=Pt.getShortAt(n,a),f=dr(n,a+=fr),s=f.tagName;a+=f.tagNameSize;var l=Pt.getLongAt(n,a);if(a+=sr,u===cr){var d=i(n.buffer,a,l),p={id:c,value:o(d,0,l)};if(tr[c]){try{p.description=tr[c].description(d)}catch(e){p.description="<no description formatter>"}r[s||tr[c].name]=p}else t&&(r["undefined-".concat(c)]=p)}a+=l+l%2}return r}},cr="8BIM",fr=2,sr=4,lr=cr.length;function dr(e,t){var n,r=(2,function(e){if(Array.isArray(e))return e}(n=c(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 ar(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)?ar(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 pr={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"}},mr={4:{name:"Preferred CMM type",value:function(e,t){return o(e,t,4)},description:function(e){return null!==e?gr(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 gr(e)}},48:{name:"Device Manufacturer",value:function(e,t){return o(e,t,4)},description:function(e){return gr(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 gr(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 hr={read:function(e,t,n){return n&&t[0].compressionMethod!==m?function(e,t){return t[0].compressionMethod!==g?{}:h(new DataView(e.buffer.slice(t[0].offset,t[0].offset+t[0].length)),t[0].compressionMethod,"dataview").then(Er).catch((function(){return{}}))}(e,t):function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),a=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var a=o.slice(n.offset,n.offset+n.length),u=new Uint8Array(a);r.set(u,i),i+=u.length},u=1;u<=t.length;u++)a(u);return Er(new DataView(r.buffer))}catch(e){return{}}}(e,t)}},vr=84,yr=128,Sr="acsp",br="desc",Ir="mluc",Cr="text",Ur="sig ",Ar=12;function Pr(e,t){return e.length<t+Ar}function Er(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.length<vr)throw Error("ICC profile too short");for(var r={},i=Object.keys(mr),a=0;a<i.length;a++){var c=i[a],f=mr[c],s=f.value(e,parseInt(c,10)),l=s;f.description&&(l=f.description(s)),r[f.name]={value:s,description:l}}if(wr(t.slice(36,40))!==Sr)throw Error("ICC profile: missing signature");if(function(e){return e.length<yr+4}(t))return r;for(var d=e.getUint32(128),p=132,m=0;m<d;m++){if(Pr(t,p))return r;var g=o(e,p,4),h=e.getUint32(p+4),v=e.getUint32(p+8);if(h>t.length)return r;var y=o(e,h,4);if(y===br){var S=e.getUint32(h+8);if(S>v)return r;Tr(r,g,wr(t.slice(h+12,h+S+11)))}else if(y===Ir){for(var b=e.getUint32(h+8),I=e.getUint32(h+12),C=h+16,U=[],A=0;A<b;A++){var P=o(e,C+0,2),E=o(e,C+2,2),w=e.getUint32(C+4),T=e.getUint32(C+8),x=u(e,h+T,w);U.push({languageCode:P,countryCode:E,text:x}),C+=I}if(1===b)Tr(r,g,U[0].text);else{for(var F={},O=0;O<U.length;O++)F["".concat(U[O].languageCode,"-").concat(U[O].countryCode)]=U[O].text;Tr(r,g,F)}}else y===Cr?Tr(r,g,wr(t.slice(h+8,h+v-7))):y===Ur&&Tr(r,g,wr(t.slice(h+8,h+12)));p+=12}return r}function wr(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function Tr(e,t,n){pr[t]?e[pr[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var xr={read:function(e,t){return{"Image Width":Fr(e,t),"Image Height":Or(e,t),"Bit Depth":Mr(e,t),"Color Type":Dr(e,t),Compression:Lr(e,t),Filter:Nr(e,t),Interlace:kr(e,t)}}};function Fr(e,t){if(!(t+0+4>e.byteLength)){var n=Pt.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function Or(e,t){if(!(t+4+4>e.byteLength)){var n=Pt.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function Mr(e,t){if(!(t+8+1>e.byteLength)){var n=Pt.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function Dr(e,t){if(!(t+9+1>e.byteLength)){var n=Pt.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 Lr(e,t){if(!(t+10+1>e.byteLength)){var n=Pt.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function Nr(e,t){if(!(t+11+1>e.byteLength)){var n=Pt.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function kr(e,t){if(!(t+12+1>e.byteLength)){var n=Pt.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function Rr(e){return Rr="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},Rr(e)}function Br(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Rr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"===Rr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var Gr={read:function(e,t,n,r){for(var i={},o=[],a=0;a<t.length;a++){var u=t[a],c=Yr(e,u.offset,u.length,u.type,n);if(c instanceof Promise)o.push(c.then((function(e){var t=e.name,n=e.value,i=e.description;try{if(v.USE_EXIF&&ei(t,n))return{__exif:Bt.read(ni(n),Jr,r)};if(v.USE_IPTC&&ti(t,n))return{__iptc:dn.read(ni(n),0,r)};if(t)return Br({},t,{value:n,description:i})}catch(e){}return{}})));else{var f=c.name,s=c.value,l=c.description;f&&(i[f]={value:s,description:l})}}return{readTags:i,readTagsPromise:o.length>0?Promise.all(o):void 0}}},_r="STATE_KEYWORD",jr="STATE_COMPRESSION",zr="STATE_LANG",Vr="STATE_TRANSLATED_KEYWORD",Hr="STATE_TEXT",Wr=1,Xr=1,Jr=6;function Yr(e,t,n,r,i){for(var o,a=[],u=[],c=[],f=_r,s=m,l=0;l<n&&t+l<e.byteLength;l++)if(f!==jr){if(f===Hr){o=new DataView(e.buffer.slice(t+l,t+n));break}var d=e.getUint8(t+l);0===d?f=Kr(r,f):f===_r?a.push(d):f===zr?u.push(d):f===Vr&&c.push(d)}else s=qr({type:r,dataView:e,offset:t+l}),r===Pe&&(l+=Wr),f=Kr(r,f);if(s!==m&&!i)return{};var p=h(o,s);return p instanceof Promise?p.then((function(e){return $r(e,r,u,a)})).catch((function(){return $r("<text using unknown compression>".split(""),r,u,a)})):$r(p,r,u,a)}function qr(e){var t=e.type,n=e.dataView,r=e.offset;if(t===Pe){if(n.getUint8(r)===Xr)return n.getUint8(r+1)}else if(t===Ee)return n.getUint8(r);return m}function Kr(e,t){return t===_r&&[Pe,Ee].includes(e)?jr:t===jr?e===Pe?zr:Hr:t===zr?Vr:Hr}function $r(e,t,n,r){var i=function(e){return e instanceof DataView?o(e,0,e.byteLength):e}(e);return{name:Zr(t,n,r),value:i,description:t===Pe?Qr(e):i}}function Zr(e,t,n){var r=f(n);if(e===Ae||0===t.length)return r;var i=f(t);return"".concat(r," (").concat(i,")")}function Qr(e){return sn.decode("UTF-8",e)}function ei(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function ti(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function ni(e){return function(e){for(var t=new DataView(new ArrayBuffer(e.length/2)),n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}var ri={read:function(e,t){for(var n={},r=0;r<t.length;r++){var i=Pt.getLongAt(e,t[r]+be),a=o(e,t[r]+Ie,Se);a===we?(n["Pixels Per Unit X"]=ii(e,t[r],i),n["Pixels Per Unit Y"]=oi(e,t[r],i),n["Pixel Units"]=ai(e,t[r],i)):a===Te&&(n["Modify Date"]=ui(e,t[r],i))}return n}};function ii(e,t,n){if(ci(e,t,n,0,4)){var r=Pt.getLongAt(e,t+Ce+0);return{value:r,description:""+r}}}function oi(e,t,n){if(ci(e,t,n,4,4)){var r=Pt.getLongAt(e,t+Ce+4);return{value:r,description:""+r}}}function ai(e,t,n){if(ci(e,t,n,8,1)){var r=Pt.getByteAt(e,t+Ce+8);return{value:r,description:1===r?"meters":"Unknown"}}}function ui(e,t,n){if(ci(e,t,n,0,7)){var r=Pt.getShortAt(e,t+Ce),i=Pt.getByteAt(e,t+Ce+2),o=Pt.getByteAt(e,t+Ce+3),a=Pt.getByteAt(e,t+Ce+4),u=Pt.getByteAt(e,t+Ce+5),c=Pt.getByteAt(e,t+Ce+6);return{value:[r,i,o,a,u,c],description:"".concat(fi(r,4),"-").concat(fi(i,2),"-").concat(fi(o,2)," ").concat(fi(a,2),":").concat(fi(u,2),":").concat(fi(c,2))}}}function ci(e,t,n,r,i){return r+i<=n&&t+Ce+r+i<=e.byteLength}function fi(e,t){return"".concat("0".repeat(t-(""+e).length)).concat(e)}var si={read:function(e,t){var n={},r=Pt.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=pi(e,t+li),n.ImageHeight=pi(e,t+di),n}},li=4,di=7;function pi(e,t){var n=Pt.getByteAt(e,t)+256*Pt.getByteAt(e,t+1)+65536*Pt.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var mi={read:function(e){return{"GIF Version":gi(e),"Image Width":hi(e),"Image Height":vi(e),"Global Color Map":yi(e),"Bits Per Pixel":bi(e),"Color Resolution Depth":Si(e)}}};function gi(e){if(!(6>e.byteLength)){var t=o(e,3,3);return{value:t,description:t}}}function hi(e){if(!(8>e.byteLength)){var t=e.getUint16(6,1);return{value:t,description:"".concat(t,"px")}}}function vi(e){if(!(10>e.byteLength)){var t=e.getUint16(8,1);return{value:t,description:"".concat(t,"px")}}}function yi(e){if(!(11>e.byteLength)){var t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}}function Si(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 bi(e){if(!(11>e.byteLength)){var t=1+(7&e.getUint8(10));return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}var Ii=[6,7,99],Ci={get:function(e,t,n){if((i=t)&&(void 0===i.Compression||Ii.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),l(t,"base64",(function(){return d(this.image)}))}var i;return t}};function Ui(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}Ui.prototype=Error();var Ai={MetadataMissingError:Ui},Pi={load:wi,loadView:xi,errors:Ai},Ei=Ai;function wi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return"string"==typeof e}(e)?(n.async=1,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,n).then((function(e){return Ti(e,n)}))):function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e)?(n.async=1,(t=e,new Promise((function(e,n){var r=new FileReader;r.onload=function(t){return e(t.target.result)},r.onerror=function(){return n(r.error)},r.readAsArrayBuffer(t)}))).then((function(e){return Ti(e,n)}))):Ti(e,n)}function Ti(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),xi(function(e){try{return new DataView(e)}catch(t){return new r(e)}}(e),t)}function xi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,async:0,includeUnknown:0},n=t.expanded,r=void 0===n?0:n,i=t.async,o=void 0===i?0:i,a=t.includeUnknown,u=void 0===a?0:a,c=0,l={},d=[],p=ut.parseAppMarkers(e,o),m=p.fileType,g=p.fileDataOffset,h=p.jfifDataOffset,y=p.tiffHeaderOffset,S=p.iptcDataOffset,I=p.xmpChunks,C=p.iccChunks,U=p.mpfDataOffset,A=p.pngHeaderOffset,P=p.pngTextChunks,E=p.pngChunkOffsets,w=p.vp8xChunkOffset,T=p.gifHeaderOffset;if(v.USE_JPEG&&v.USE_FILE&&function(e){return void 0!==e}(g)){c=1;var x=Xt.read(e,g);r?l.file=x:l=s({},l,x)}if(v.USE_JPEG&&v.USE_JFIF&&function(e){return void 0!==e}(h)){c=1;var F=Qt.read(e,h);r?l.jfif=F:l=s({},l,F)}if(v.USE_EXIF&&function(e){return void 0!==e}(y)){c=1;var O=Bt.read(e,y,u);if(O.Thumbnail&&(l.Thumbnail=O.Thumbnail,delete O.Thumbnail),r?(l.exif=O,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=b(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=b(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){}}}(l)):l=s({},l,O),v.USE_TIFF&&v.USE_IPTC&&O["IPTC-NAA"]&&!Fi(S)){var M=dn.read(O["IPTC-NAA"].value,0,u);r?l.iptc=M:l=s({},l,M)}if(v.USE_TIFF&&v.USE_XMP&&O.ApplicationNotes&&!Oi(I)){var D=wn.read(f(O.ApplicationNotes.value));r?l.xmp=D:(delete D._raw,l=s({},l,D))}if(v.USE_PHOTOSHOP&&O.ImageSourceData){var L=ur.read(O.PhotoshopSettings.value,u);r?l.photoshop=L:l=s({},l,L)}if(v.USE_TIFF&&v.USE_ICC&&O.ICC_Profile&&!Mi(C)){var N=hr.read(O.ICC_Profile.value,[{offset:0,length:O.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);r?l.icc=N:l=s({},l,N)}}if(v.USE_JPEG&&v.USE_IPTC&&Fi(S)){c=1;var k=dn.read(e,S,u);r?l.iptc=k:l=s({},l,k)}if(v.USE_XMP&&Oi(I)){c=1;var R=wn.read(e,I);r?l.xmp=R:(delete R._raw,l=s({},l,R))}if((v.USE_JPEG||v.USE_WEBP)&&v.USE_ICC&&Mi(C)){c=1;var B=hr.read(e,C,o);B instanceof Promise?d.push(B.then(Y)):Y(B)}if(v.USE_MPF&&function(e){return void 0!==e}(U)){c=1;var G=Gt.read(e,U,u);r?l.mpf=G:l=s({},l,G)}if(v.USE_PNG&&v.USE_PNG_FILE&&void 0!==A){c=1;var _=xr.read(e,A);r?(l.png=l.png?s({},l.png,_):_,l.pngFile=_):l=s({},l,_)}if(v.USE_PNG&&function(e){return void 0!==e}(P)){c=1;var j=Gr.read(e,P,o,u),z=j.readTags,V=j.readTagsPromise;q(z),V&&d.push(V.then((function(e){return e.forEach(q)})))}if(v.USE_PNG&&function(e){return void 0!==e}(E)){c=1;var H=ri.read(e,E);r?l.png=l.png?s({},l.png,H):H:l=s({},l,H)}if(v.USE_WEBP&&function(e){return void 0!==e}(w)){c=1;var W=si.read(e,w);r?l.riff=l.riff?s({},l.riff,W):W:l=s({},l,W)}if(v.USE_GIF&&function(e){return void 0!==e}(T)){c=1;var X=mi.read(e,T);r?l.gif=l.gif?s({},l.gif,X):X:l=s({},l,X)}var J=(v.USE_JPEG||v.USE_WEBP)&&v.USE_EXIF&&v.USE_THUMBNAIL&&Ci.get(e,l.Thumbnail,y);if(J?(c=1,l.Thumbnail=J):delete l.Thumbnail,m&&(r?(l.file||(l.file={}),l.file.FileType=m):l.FileType=m,c=1),!c)throw new Ai.MetadataMissingError;return o?Promise.all(d).then((function(){return l})):l;function Y(e){r?l.icc=e:l=s({},l,e)}function q(e){if(r){for(var t=0,n=["exif","iptc"];t<n.length;t++){var i=n[t],o="__".concat(i);e[o]&&(l[i]=l[i]?s({},l.exif,e[o]):e[o],delete e[o])}l.png=l.png?s({},l.png,e):e,l.pngText=l.pngText?s({},l.png,e):e}else l=s({},l,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e)}}function Fi(e){return void 0!==e}function Oi(e){return Array.isArray(e)&&e.length>0}function Mi(e){return Array.isArray(e)&&e.length>0}return t}()}));
2
2
  //# sourceMappingURL=exif-reader.js.map