New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

exifreader

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exifreader - npm Package Compare versions

Comparing version 3.10.0 to 3.11.0

2

dist/exif-reader.js

@@ -1,2 +0,2 @@

!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(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:0,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=1,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:1,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:1,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(module,__webpack_exports__,__webpack_require__){"use strict";function get(){if("undefined"!=typeof DOMParser)return DOMParser;try{return eval("require")("xmldom").DOMParser}catch(e){return}}__webpack_exports__.a={get:get}},function(e,t,n){"use strict";function r(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return o(r)}function i(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return o(r)}function o(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function a(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function u(e){return(u="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)}n.r(t),n.d(t,"errors",(function(){return at})),n.d(t,"load",(function(){return ut})),n.d(t,"loadView",(function(){return st}));var c=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"!==u(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;return(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 n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||0,r.configurable=1,"value"in r&&(r.writable=1),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function f(e,t){return 65472===e.getUint16(t)}function s(e,t){return 65474===e.getUint16(t)}function d(e,t){return 65506===e.getUint16(t)&&"ICC_PROFILE\0"===r(e,t+4,12)}function l(e,t){return 65505===e.getUint16(t)&&"Exif"===r(e,t+4,4)&&0===e.getUint8(t+4+4)}function p(e,t){return 65505===e.getUint16(t)&&function(e,t){return"http://ns.adobe.com/xap/1.0/\0"===r(e,t+4,29)}(e,t)}function m(e,t){return 65505===e.getUint16(t)&&function(e,t){return"http://ns.adobe.com/xmp/extension/\0"===r(e,t+4,35)}(e,t)}function g(e,t){return{dataOffset:e+33,length:t-31}}function h(e,t){return{dataOffset:e+79,length:t-77}}function v(e,t){return 65517===e.getUint16(t)&&"Photoshop 3.0"===r(e,t+4,13)&&0===e.getUint8(t+4+13)}function y(e,t){var n=e.getUint16(t);return n>=65504&&n<=65519||65534===n||65472===n||65474===n||65476===n||65499===n||65501===n||65498===n}function S(e,t){return"IHDR"===r(e,t+4,4)}function b(e,t){return"iTXt"===r(e,t+4,4)&&"XML:com.adobe.xmp\0"===r(e,t+8,18)}function C(e,t){t+=28;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function A(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 I=function(e){if(function(e){return e.byteLength>=4&&function(e){var t=18761===e.getUint16(0);return 42===e.getUint16(2,t)}(e)}(e))return{hasAppMarkers:1,tiffHeaderOffset:0};if(function(e){return e.byteLength>=2&&65496===e.getUint16(0)}(e))return function(e){for(var t,n,r,i,o,a,u,c=2;c+4+5<=e.byteLength;){if(f(e,c))n=c+2;else if(s(e,c))r=c+2;else if(l(e,c))t=e.getUint16(c+2),i=c+10;else if(p(e,c))a||(a=[]),t=e.getUint16(c+2),a.push(g(c,t));else if(m(e,c))a||(a=[]),t=e.getUint16(c+2),a.push(h(c,t));else if(v(e,c))t=e.getUint16(c+2),o=c+18;else if(d(e,c)){var S=c+18,b=(t=e.getUint16(c+2))-16,C=e.getUint8(c+16),A=e.getUint8(c+17);u||(u=[]),u.push({offset:S,length:b,chunkNumber:C,chunksTotal:A})}else{if(!y(e,c))break;t=e.getUint16(c+2)}c+=2+t}return{hasAppMarkers:c>2,fileDataOffset:n||r,tiffHeaderOffset:i,iptcDataOffset:o,xmpChunks:a,iccChunks:u}}(e);if(function(e){return"‰PNG\r\n\n"===r(e,0,8)}(e))return function(e){for(var t={hasAppMarkers:0},n=8;n+4+4<=e.byteLength;){if(S(e,n))t.hasAppMarkers=1,t.pngHeaderOffset=n+8;else if(b(e,n)){var r=C(e,n);void 0!==r&&(t.hasAppMarkers=1,t.xmpChunks=[{dataOffset:r,length:e.getUint32(n+0)-(r-(n+8))}])}n+=e.getUint32(n+0)+4+4+4}return t}(e);if(function(e){var t=r(e,8,4);return"ftyp"===r(e,4,4)&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t)}(e))return function(e){var t=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=A(e,t);if(n>=8&&"meta"===r(e,t+4,4))return{offset:t,length:n};t+=n}return{offset:void 0,length:0}}(e),n=t.offset,i=t.length;if(void 0===n)return{hasAppMarkers:0};var o=Math.min(n+i,e.byteLength),a=function(e,t,n){for(var i={exifItemOffset:void 0,ilocOffset:void 0};t+4<=n&&(!i.exifItemOffset||!i.ilocOffset);)"Exif"===r(e,t,4)?i.exifItemOffset=t+-4:"iloc"===r(e,t,4)&&(i.ilocOffset=t),t++;return i}(e,n,o),u=a.exifItemOffset,c=a.ilocOffset;if(void 0===u||void 0===c)return{hasAppMarkers:0};var f=function(e,t,n,r){if(!(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,o);return{hasAppMarkers:void 0!==f,tiffHeaderOffset:f}}(e);if(function(e){return"RIFF"===r(e,0,4)&&"WEBP"===r(e,8,4)}(e))return function(e){for(var t,n,i,o=12,a=0;o+8<e.byteLength;){var u=r(e,o,4),c=e.getUint32(o+4,1);"EXIF"===u?(a=1,t=o+8):"XMP "===u?(a=1,n=[{dataOffset:o+8,length:c}]):"ICCP"===u&&(a=1,i=[{offset:o+8,length:c,chunkNumber:1,chunksTotal:1}]),o+=8+(c%2==0?c:c+1)}return{hasAppMarkers:a,tiffHeaderOffset:t,xmpChunks:n,iccChunks:i}}(e);throw Error("Invalid image format")},P={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},U={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},w={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:D,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,18761===n)},getLongAt:O,getRationalAt:function(e,t,n){return[O(e,t,n),O(e,t+4,n)]},getUndefinedAt:function(e,t){return D(e,t)},getSlongAt:T,getSrationalAt:function(e,t,n){return[T(e,t,n),T(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return O(e,t,n)},typeSizes:P,tagTypes:U,getTypeSize:function(e){if(void 0===U[e])throw Error("No such type found.");return P[U[e]]}};function D(e,t){return e.getUint8(t)}function O(e,t,n){return e.getUint32(t,18761===n)}function T(e,t,n){return e.getInt32(t,18761===n)}var M={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"}};function F(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function k(e){if(e.length>=8){var t=F(e.slice(0,8));if("ASCII\0\0\0"===t)return F(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 x(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 R(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 L={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:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},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){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=1,i=0,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),2!==n.length);r=1);}catch(e){i=1,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t)||function(e,t){if(e){if("string"==typeof e)return R(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(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:k},28:{name:"GPSAreaInformation",description:k},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},N={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return F(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},E=a({},{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:function(e){return""+Math.round(e[0]/e[1])}},283:{name:"YResolution",description:function(e){return""+Math.round(e[0]/e[1])}},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:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},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:M.LightSource},50779:{name:"CalibrationIlluminant2",description:M.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"},{33434:{name:"ExposureTime",description:function(e){return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])}},33437:{name:"FNumber",description:function(e){return"f/".concat(e[0]/e[1])}},34850:{name:"ExposureProgram",description: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"}},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 F(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description: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("")}},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:function(e){return"1/".concat(Math.round(Math.pow(2,e[0]/e[1])))}},37378:{name:"ApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},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: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"}},37384:{name:"LightSource",description:M.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:function(e){return e[0]/e[1]+" mm"}},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:k},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",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:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"}},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:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},41492:{name:"SubjectLocation",description:function(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=1,i=0,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),2!==n.length);r=1);}catch(e){i=1,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t)||function(e,t){if(e){if("string"==typeof e)return x(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(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:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"}},41986:{name:"ExposureMode",description:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"}},41987:{name:"WhiteBalance",description:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"}},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:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"}},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:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"}},41993:{name:"Saturation",description:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"}},41994:{name:"Sharpness",description:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"}},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"}),G={"0th":E,exif:E,gps:L,interoperability:N},j={1:w.getByteAt,2:w.getAsciiAt,3:w.getShortAt,4:w.getLongAt,5:w.getRationalAt,7:w.getUndefinedAt,9:w.getSlongAt,10:w.getSrationalAt,13:w.getIfdPointerAt},B=function(e,t){var n=function(e,t){if(18761===e.getUint16(t))return 18761;if(19789===e.getUint16(t))return 19789;throw Error("Illegal byte order value. Faulty image.")}(e,t),r=function(e,t,n){return z(e,"0th",t,function(e,t,n){return t+w.getLongAt(e,t+4,n)}(e,t,n),n)}(e,t,n);return function(e,t,n,r){return void 0!==e["Interoperability IFD Pointer"]?a(e,z(t,"interoperability",n,n+e["Interoperability IFD Pointer"].value,r)):e}(r=function(e,t,n,r){return void 0!==e["GPS Info IFD Pointer"]?a(e,z(t,"gps",n,n+e["GPS Info IFD Pointer"].value,r)):e}(r=function(e,t,n,r){return void 0!==e["Exif IFD Pointer"]?a(e,z(t,"exif",n,n+e["Exif IFD Pointer"].value,r)):e}(r,e,t,n),e,t,n),e,t,n)};function z(e,t,n,r,i){var o=w.getTypeSize("SHORT"),a={},u=function(e,t,n){return t+w.getTypeSize("SHORT")<=e.byteLength?w.getShortAt(e,t,n):0}(e,r,i);r+=o;for(var c=0;c<u&&!(r+12>e.byteLength);c++){var f=W(e,t,n,r,i);void 0!==f&&(a[f.name]={id:f.id,value:f.value,description:f.description}),r+=12}if(r<e.byteLength-w.getTypeSize("LONG")){var s=w.getLongAt(e,r,i);0!==s&&(a.Thumbnail=z(e,t,n,n+s,i))}return a}function W(e,t,n,r,i){var o,a=w.getTypeSize("SHORT"),u=a+w.getTypeSize("SHORT"),c=u+w.getTypeSize("LONG"),f=w.getShortAt(e,r,i),s=w.getShortAt(e,r+a,i),d=w.getLongAt(e,r+u,i);if(void 0!==w.typeSizes[s]){if(function(e,t){return w.typeSizes[e]*t<=w.getTypeSize("LONG")}(s,d))o=H(e,r+c,s,d,i);else{var l=w.getLongAt(e,r+c,i);o=function(e,t,n,r,i){return t+n+w.typeSizes[r]*i<=e.byteLength}(e,n,l,s,d)?H(e,n+l,s,d,i,33723===f):"<faulty value>"}s===w.tagTypes.ASCII&&(o=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(o=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}(o)));var p="undefined-".concat(f),m=o;if(void 0!==G[t][f])if(void 0!==G[t][f].name&&void 0!==G[t][f].description){p=G[t][f].name;try{m=G[t][f].description(o)}catch(e){m=V(o)}}else s===w.tagTypes.RATIONAL||s===w.tagTypes.SRATIONAL?(p=G[t][f],m=""+o[0]/o[1]):(p=G[t][f],m=V(o));return{id:f,name:p,value:o,description:m}}}function H(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=[];o&&(r*=w.typeSizes[n],n=w.tagTypes.BYTE);for(var u=0;u<r;u++)a.push(j[n](e,t,i)),t+=w.typeSizes[n];return n===w.tagTypes.ASCII?a=w.getAsciiValue(a):1===a.length&&(a=a[0]),a}function V(e){return e instanceof Array?e.join(", "):e}var _=function(e,t){var n=function(e,t){return w.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=w.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":X(e,t,n),"Image Height":Y(e,t,n),"Image Width":K(e,t,n),"Color Components":r,Subsampling:r&&q(e,t,r.value,n)}};function X(e,t,n){if(!(3>n)){var r=w.getByteAt(e,t+2);return{value:r,description:""+r}}}function Y(e,t,n){if(!(5>n)){var r=w.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function K(e,t,n){if(!(7>n)){var r=w.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function q(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([w.getByteAt(e,a),w.getByteAt(e,a+1),w.getByteAt(e,a+2)])}return{value:i,description:i.length>1?J(i)+$(i):""}}}function J(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function $(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 Q={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:Z},336:{name:"Time Sent",description:ee},346:{name:"Coded Character Set",description:te,encoding_name:te},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"===F(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=F(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=F(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:Z},572:{name:"Time Created",description:ee},574:{name:"Digital Creation Date",description:Z},575:{name:"Digital Creation Time",description:ee},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=F(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=F(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=F(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(F(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(F(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=F(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 F(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=F(e);if(t["ObjectData Preview File Format"]){var i=F(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 Z(e){var t=F(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function ee(e){var t=F(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 te(e){var t=F(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 ne=function(e,t){var n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((function(e){return String.fromCharCode(e)})).join(""))},re=function(e,t){try{if(Array.isArray(e))return ue(new DataView(Uint8Array.from(e).buffer),{size:e.length},0);var n=function(e,t){for(;t+12<=e.byteLength;){var n=ie(e,t);if(oe(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+ae(n)}throw Error("No IPTC NAA resource block.")}(e,t);return ue(e,n.naaBlock,n.dataOffset)}catch(e){return{}}};function ie(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 oe(e){return 1028===e.type}function ae(e){return e.size%2!=0?1:0}function ue(e,t,n){for(var r={},i=void 0,o=n+t.size;n<o&&n<e.byteLength;){var a=ce(e,n,r,i),u=a.tag,c=a.tagSize;if(null===u)break;"encoding"in u&&(i=u.encoding),void 0===r[u.name]||void 0===u.repeatable?r[u.name]={id:u.id,value:u.value,description:u.description}:(r[u.name]instanceof Array||(r[u.name]=[{id:r[u.name].id,value:r[u.name].value,description:r[u.name].description}]),r[u.name].push({id:u.id,value:u.value,description:u.description})),n+=5+c}return r}function ce(e,t,n,r){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var i=e.getUint16(t+1),o=e.getUint16(t+3),a=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,o),u={id:i,name:fe(Q.iptc[i],i,a),value:a,description:se(Q.iptc[i],a,n,r)};return function(e){return Q.iptc[e]&&Q.iptc[e].repeatable}(i)&&(u.repeatable=1),function(e){return Q.iptc[e]&&void 0!==Q.iptc[e].encoding_name}(i)&&(u.encoding=Q.iptc[i].encoding_name(a)),{tag:u,tagSize:o}}function fe(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 se(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)?ne(r,t):t}function de(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 le={"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},"exif:GPSLatitude":pe,"exif:GPSLongitude":pe};function pe(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e.split(","))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=1,i=0,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),2!==n.length);r=1);}catch(e){i=1,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t)||function(e,t){if(e){if("string"==typeof e)return de(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(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}var me=n(0);function ge(e){return(ge="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)}var he=function(e,t){return"string"==typeof e?ye({},e):function(e,t){if(0===t.length)return[];var n=[ve(e,t.slice(0,1))];return t.length>1&&n.push(ve(e,t.slice(1))),n}(e,t).reduce(ye,{})};function ve(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 ye(e,t){try{return a(e,Ue(Se(function e(t){for(var n=0;n<t.childNodes.length;n++){if("x:xmpmeta"===t.childNodes[n].tagName)return e(t.childNodes[n]);if("rdf:RDF"===t.childNodes[n].tagName)return t.childNodes[n]}throw Error()}(function(e){var t=me.a.get();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var n=new t,i="string"==typeof e?e:r(e,0,e.byteLength),o=n.parseFromString(i.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1"),"application/xml");if("parsererror"===o.documentElement.nodeName)throw Error(o.documentElement.textContent);return o}(t)),1)))}catch(t){return e}}function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=be(e);return Ce(n)?t?{}:Ae(n[0]):Ie(n)}function be(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}function Ce(e){return 1===e.length&&"#text"===e[0].nodeName}function Ae(e){return e.nodeValue}function Ie(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:Pe(e),value:Se(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}function Pe(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 Ue(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){a(t,we(e.attributes)),"object"===ge(e.value)&&a(t,Re(e.value))}))}return t}function we(e){var t={};for(var n in e)De(n)&&(t[Te(n)]={value:e[n],attributes:{},description:Me(e[n],n)});return t}function De(e){return"rdf:parseType"!==e&&!Oe(e)}function Oe(e){return"xmlns"===e.split(":")[0]}function Te(e){return e.split(":")[1]}function Me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e))return Fe(e);if("object"===ge(e))return ke(e);try{return t&&"function"==typeof le[t]?le[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function Fe(e){return e.map((function(e){return void 0!==e.value?Me(e.value):Me(e)})).join(", ")}function ke(e){var t=[];for(var n in e)t.push("".concat(xe(n),": ").concat(e[n].value));return t.join("; ")}function xe(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 Re(e){var t={};for(var n in e)Oe(n)||(t[Te(n)]=Le(e[n],n));return t}function Le(e,t){return Ne(e)?Ee(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}(e)?function(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(a(n.value,we(e.value["rdf:Description"].attributes)),a(n.attributes,Ge(e)),e=e.value["rdf:Description"]),a(n.value,Re(e.value)),n.description=Me(n.value,t),n}(e,t):function(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["rdf:resource"]}(e)?function(e,t){var n=we(e.attributes);return{value:n,attributes:{},description:Me(n,t)}}(e,t):function(e){return void 0!==je(e.value)}(e)?function(e,t){var n=je(e.value).value["rdf:li"],r=Ge(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return Ne(e)?Ee(e):function(e){return"Resource"===e.attributes["rdf:parseType"]}(e)?Re(e.value):{value:e.value,attributes:Ge(e),description:Me(e.value)}}(e))})),{value:i,attributes:r,description:Me(i,t)}}(e,t):function(e,t){var n=Be(e)||Ue(e.value);return{value:n,attributes:Ge(e),description:Me(n,t)}}(e,t)}function Ne(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 Ee(e,t){var n=Ge(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),a(n,Ge(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||Oe(n)||(t[Te(n)]=e.value[n].value);return t}(e));var r=function(e){return Be(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:Me(r,t)}}function Ge(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||Oe(n)||(t[Te(n)]=e.attributes[n]);return t}function je(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Be(e){return e.attributes&&e.attributes["rdf:resource"]}var ze={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"}},We={4:{name:"Preferred CMM type",value:function(e,t){return r(e,t,4)},description:function(e){return null!==e?He(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 r(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 r(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return r(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 r(e,t,4)},description:function(e){return He(e)}},48:{name:"Device Manufacturer",value:function(e,t){return r(e,t,4)},description:function(e){return He(e)}},52:{name:"Device Model Number",value:function(e,t){return r(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 r(e,t,4)}}};function He(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 Ve=function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),o=new Uint8Array(n),a=0,u=e.buffer,c=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var r=u.slice(n.offset,n.offset+n.length),i=new Uint8Array(r);o.set(i,a),a+=i.length},f=1;f<=t.length;f++)c(f);return function(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.length<84)throw Error("ICC profile too short");for(var o={},a=Object.keys(We),u=0;u<a.length;u++){var c=a[u],f=We[c],s=f.value(e,parseInt(c,10)),d=s;f.description&&(d=f.description(s)),o[f.name]={value:s,description:d}}if("acsp"!==Xe(t.slice(36,40)))throw Error("ICC profile: missing signature");if(function(e){return e.length<132}(t))return o;for(var l=e.getUint32(128),p=132,m=0;m<l;m++){if(_e(t,p))return o;var g=r(e,p,4),h=e.getUint32(p+4),v=e.getUint32(p+8);if(h>t.length)return o;var y=r(e,h,4);if("desc"===y){var S=e.getUint32(h+8);if(S>v)return o;Ye(o,g,Xe(t.slice(h+12,h+S+11)))}else if("mluc"===y){for(var b=e.getUint32(h+8),C=e.getUint32(h+12),A=h+16,I=[],P=0;P<b;P++){var U=r(e,A+0,2),w=r(e,A+2,2),D=e.getUint32(A+4),O=e.getUint32(A+8),T=i(e,h+O,D);I.push({languageCode:U,countryCode:w,text:T}),A+=C}if(1===b)Ye(o,g,I[0].text);else{for(var M={},F=0;F<I.length;F++)M["".concat(I[F].languageCode,"-").concat(I[F].countryCode)]=I[F].text;Ye(o,g,M)}}else"text"===y?Ye(o,g,Xe(t.slice(h+8,h+v-7))):"sig "===y&&Ye(o,g,Xe(t.slice(h+8,h+12)));p+=12}return o}(new DataView(o.buffer))}catch(e){return{}}};function _e(e,t){return e.length<t+12}function Xe(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function Ye(e,t,n){ze[t]?e[ze[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var Ke=function(e,t){return{"Image Width":qe(e,t),"Image Height":Je(e,t),"Bit Depth":$e(e,t),"Color Type":Qe(e,t),Compression:Ze(e,t),Filter:et(e,t),Interlace:tt(e,t)}};function qe(e,t){if(!(t+0+4>e.byteLength)){var n=w.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function Je(e,t){if(!(t+4+4>e.byteLength)){var n=w.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function $e(e,t){if(!(t+8+1>e.byteLength)){var n=w.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function Qe(e,t){if(!(t+9+1>e.byteLength)){var n=w.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 Ze(e,t){if(!(t+10+1>e.byteLength)){var n=w.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function et(e,t){if(!(t+11+1>e.byteLength)){var n=w.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function tt(e,t){if(!(t+12+1>e.byteLength)){var n=w.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function nt(e){return(nt="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)}var rt=function(e,t,n){if((u=t)&&(void 0===u.Compression||6===u.Compression.value)&&u.JPEGInterchangeFormat&&u.JPEGInterchangeFormat.value&&u.JPEGInterchangeFormatLength&&u.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),o=function(){return e=this.image,"undefined"!=typeof btoa?btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?void 0!==nt(Buffer.from)?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0;var e},a=0,Object.defineProperty(i=t,"base64",{get:function(){return a||(a=1,Object.defineProperty(i,"base64",{configurable:1,enumerable:1,value:o.apply(i),writable:1})),i.base64},configurable:1,enumerable:1})}var i,o,a,u;return t};function it(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}it.prototype=Error();var ot={MetadataMissingError:it},at=(t.default={load:ut,loadView:st,errors:ot},ot);function ut(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0};return ct(e)&&(e=new Uint8Array(e).buffer),st(ft(e),t)}function ct(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}function ft(e){try{return new DataView(e)}catch(t){return new c(e)}}function st(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0},n=0,r={},i=I(e),u=i.fileDataOffset,c=i.tiffHeaderOffset,f=i.iptcDataOffset,s=i.xmpChunks,d=i.iccChunks,l=i.pngHeaderOffset;if(dt(u)){n=1;var p=_(e,u);t.expanded?r.file=p:r=a({},r,p)}if(lt(c)){n=1;var m=B(e,c);if(m.Thumbnail&&(r.Thumbnail=m.Thumbnail,delete m.Thumbnail),t.expanded?r.exif=m:r=a({},r,m),m["IPTC-NAA"]&&!pt(f)){var g=re(m["IPTC-NAA"].value,0);t.expanded?r.iptc=g:r=a({},r,g)}if(m.ApplicationNotes&&!mt(s)){var h=he(o(m.ApplicationNotes.value));t.expanded?r.xmp=h:r=a({},r,h)}}if(pt(f)){n=1;var v=re(e,f);t.expanded?r.iptc=v:r=a({},r,v)}if(mt(s)){n=1;var y=he(e,s);t.expanded?r.xmp=y:r=a({},r,y)}if(gt(d)){n=1;var S=Ve(e,d);t.expanded?r.icc=S:r=a({},r,S)}if(ht(l)){n=1;var b=Ke(e,l);t.expanded?r.pngFile=b:r=a({},r,b)}var C=rt(e,r.Thumbnail,c);if(C?(r.Thumbnail=C,n=1):delete r.Thumbnail,!n)throw new ot.MetadataMissingError;return r}function dt(e){return void 0!==e}function lt(e){return void 0!==e}function pt(e){return void 0!==e}function mt(e){return Array.isArray(e)&&e.length>0}function gt(e){return Array.isArray(e)&&e.length>0}function ht(e){return void 0!==e}}])}));
!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(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:0,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=1,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:1,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:1,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(module,__webpack_exports__,__webpack_require__){"use strict";function get(){if("undefined"!=typeof DOMParser)return DOMParser;try{return eval("require")("xmldom").DOMParser}catch(e){return}}__webpack_exports__.a={get:get}},function(e,t,n){"use strict";function r(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return o(r)}function i(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return o(r)}function o(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function a(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function u(e){return(u="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)}n.r(t),n.d(t,"errors",(function(){return ut})),n.d(t,"load",(function(){return ct})),n.d(t,"loadView",(function(){return dt}));var c=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"!==u(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;return(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 n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||0,r.configurable=1,"value"in r&&(r.writable=1),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function f(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function s(e){if(e.length>=8){var t=f(e.slice(0,8));if("ASCII\0\0\0"===t)return f(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 d(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}function l(e,t){return 65472===e.getUint16(t)}function p(e,t){return 65474===e.getUint16(t)}function m(e,t){return 65506===e.getUint16(t)&&"ICC_PROFILE\0"===r(e,t+4,12)}function g(e,t){return 65505===e.getUint16(t)&&"Exif"===r(e,t+4,4)&&0===e.getUint8(t+4+4)}function h(e,t){return 65505===e.getUint16(t)&&function(e,t){return"http://ns.adobe.com/xap/1.0/\0"===r(e,t+4,29)}(e,t)}function v(e,t){return 65505===e.getUint16(t)&&function(e,t){return"http://ns.adobe.com/xmp/extension/\0"===r(e,t+4,35)}(e,t)}function y(e,t){return{dataOffset:e+33,length:t-31}}function S(e,t){return{dataOffset:e+79,length:t-77}}function b(e,t){return 65517===e.getUint16(t)&&"Photoshop 3.0"===r(e,t+4,13)&&0===e.getUint8(t+4+13)}function C(e,t){var n=e.getUint16(t);return n>=65504&&n<=65519||65534===n||65472===n||65474===n||65476===n||65499===n||65501===n||65498===n}function A(e,t){return"IHDR"===r(e,t+4,4)}function I(e,t){return"iTXt"===r(e,t+4,4)&&"XML:com.adobe.xmp\0"===r(e,t+8,18)}function P(e,t){t+=28;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function U(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 w=function(e){if(function(e){return e.byteLength>=4&&function(e){var t=18761===e.getUint16(0);return 42===e.getUint16(2,t)}(e)}(e))return{hasAppMarkers:1,tiffHeaderOffset:0};if(function(e){return e.byteLength>=2&&65496===e.getUint16(0)}(e))return function(e){for(var t,n,r,i,o,a,u,c=2;c+4+5<=e.byteLength;){if(l(e,c))n=c+2;else if(p(e,c))r=c+2;else if(g(e,c))t=e.getUint16(c+2),i=c+10;else if(h(e,c))a||(a=[]),t=e.getUint16(c+2),a.push(y(c,t));else if(v(e,c))a||(a=[]),t=e.getUint16(c+2),a.push(S(c,t));else if(b(e,c))t=e.getUint16(c+2),o=c+18;else if(m(e,c)){var f=c+18,s=(t=e.getUint16(c+2))-16,d=e.getUint8(c+16),A=e.getUint8(c+17);u||(u=[]),u.push({offset:f,length:s,chunkNumber:d,chunksTotal:A})}else{if(!C(e,c))break;t=e.getUint16(c+2)}c+=2+t}return{hasAppMarkers:c>2,fileDataOffset:n||r,tiffHeaderOffset:i,iptcDataOffset:o,xmpChunks:a,iccChunks:u}}(e);if(function(e){return"‰PNG\r\n\n"===r(e,0,8)}(e))return function(e){for(var t={hasAppMarkers:0},n=8;n+4+4<=e.byteLength;){if(A(e,n))t.hasAppMarkers=1,t.pngHeaderOffset=n+8;else if(I(e,n)){var r=P(e,n);void 0!==r&&(t.hasAppMarkers=1,t.xmpChunks=[{dataOffset:r,length:e.getUint32(n+0)-(r-(n+8))}])}n+=e.getUint32(n+0)+4+4+4}return t}(e);if(function(e){var t=r(e,8,4);return"ftyp"===r(e,4,4)&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t)}(e))return function(e){var t=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=U(e,t);if(n>=8&&"meta"===r(e,t+4,4))return{offset:t,length:n};t+=n}return{offset:void 0,length:0}}(e),n=t.offset,i=t.length;if(void 0===n)return{hasAppMarkers:0};var o=Math.min(n+i,e.byteLength),a=function(e,t,n){for(var i={ilocOffset:void 0,exifItemOffset:void 0,colrOffset:void 0};t+4<=n&&(!i.ilocOffset||!i.exifItemOffset||!i.colrOffset);){var o=r(e,t,4);"iloc"===o?i.ilocOffset=t:"Exif"===o?i.exifItemOffset=t+-4:"colr"===o&&(i.colrOffset=t+-4),t++}return i}(e,n,o),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,o),d=function(e,t,n){if(t&&!(t+12>n)){var i=r(e,t+8,4);if("prof"===i||"rICC"===i)return[{offset:t+12,length:U(e,t)-12,chunkNumber:1,chunksTotal:1}]}}(e,f,o);return{hasAppMarkers:void 0!==s||void 0!==d,tiffHeaderOffset:s,iccChunks:d}}(e);if(function(e){return"RIFF"===r(e,0,4)&&"WEBP"===r(e,8,4)}(e))return function(e){for(var t,n,i,o=12,a=0;o+8<e.byteLength;){var u=r(e,o,4),c=e.getUint32(o+4,1);"EXIF"===u?(a=1,t=o+8):"XMP "===u?(a=1,n=[{dataOffset:o+8,length:c}]):"ICCP"===u&&(a=1,i=[{offset:o+8,length:c,chunkNumber:1,chunksTotal:1}]),o+=8+(c%2==0?c:c+1)}return{hasAppMarkers:a,tiffHeaderOffset:t,xmpChunks:n,iccChunks:i}}(e);throw Error("Invalid image format")},D={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},O={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},T={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:x,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,18761===n)},getLongAt:k,getRationalAt:function(e,t,n){return[k(e,t,n),k(e,t+4,n)]},getUndefinedAt:function(e,t){return x(e,t)},getSlongAt:M,getSrationalAt:function(e,t,n){return[M(e,t,n),M(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return k(e,t,n)},typeSizes:D,tagTypes:O,getTypeSize:function(e){if(void 0===O[e])throw Error("No such type found.");return D[O[e]]}};function x(e,t){return e.getUint8(t)}function k(e,t,n){return e.getUint32(t,18761===n)}function M(e,t,n){return e.getInt32(t,18761===n)}var L={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"}};function F(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 R(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 N={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:d},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:d},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){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=1,i=0,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),2!==n.length);r=1);}catch(e){i=1,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t)||function(e,t){if(e){if("string"==typeof e)return R(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(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"},E={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return f(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},G=a({},{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:function(e){return""+Math.round(e[0]/e[1])}},283:{name:"YResolution",description:function(e){return""+Math.round(e[0]/e[1])}},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:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},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:L.LightSource},50779:{name:"CalibrationIlluminant2",description:L.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"},{33434:{name:"ExposureTime",description:function(e){return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])}},33437:{name:"FNumber",description:function(e){return"f/".concat(e[0]/e[1])}},34850:{name:"ExposureProgram",description: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"}},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 f(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description: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("")}},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:function(e){return"1/".concat(Math.round(Math.pow(2,e[0]/e[1])))}},37378:{name:"ApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},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: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"}},37384:{name:"LightSource",description:L.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:function(e){return e[0]/e[1]+" mm"}},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",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:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"}},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:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},41492:{name:"SubjectLocation",description:function(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=1,i=0,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),2!==n.length);r=1);}catch(e){i=1,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t)||function(e,t){if(e){if("string"==typeof e)return F(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(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:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"}},41986:{name:"ExposureMode",description:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"}},41987:{name:"WhiteBalance",description:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"}},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:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"}},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:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"}},41993:{name:"Saturation",description:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"}},41994:{name:"Sharpness",description:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"}},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"}),j={"0th":G,exif:G,gps:N,interoperability:E},B={1:T.getByteAt,2:T.getAsciiAt,3:T.getShortAt,4:T.getLongAt,5:T.getRationalAt,7:T.getUndefinedAt,9:T.getSlongAt,10:T.getSrationalAt,13:T.getIfdPointerAt},z=function(e,t){var n=function(e,t){if(18761===e.getUint16(t))return 18761;if(19789===e.getUint16(t))return 19789;throw Error("Illegal byte order value. Faulty image.")}(e,t),r=function(e,t,n){return W(e,"0th",t,function(e,t,n){return t+T.getLongAt(e,t+4,n)}(e,t,n),n)}(e,t,n);return function(e,t,n,r){return void 0!==e["Interoperability IFD Pointer"]?a(e,W(t,"interoperability",n,n+e["Interoperability IFD Pointer"].value,r)):e}(r=function(e,t,n,r){return void 0!==e["GPS Info IFD Pointer"]?a(e,W(t,"gps",n,n+e["GPS Info IFD Pointer"].value,r)):e}(r=function(e,t,n,r){return void 0!==e["Exif IFD Pointer"]?a(e,W(t,"exif",n,n+e["Exif IFD Pointer"].value,r)):e}(r,e,t,n),e,t,n),e,t,n)};function W(e,t,n,r,i){var o=T.getTypeSize("SHORT"),a={},u=function(e,t,n){return t+T.getTypeSize("SHORT")<=e.byteLength?T.getShortAt(e,t,n):0}(e,r,i);r+=o;for(var c=0;c<u&&!(r+12>e.byteLength);c++){var f=V(e,t,n,r,i);void 0!==f&&(a[f.name]={id:f.id,value:f.value,description:f.description}),r+=12}if(r<e.byteLength-T.getTypeSize("LONG")){var s=T.getLongAt(e,r,i);0!==s&&(a.Thumbnail=W(e,t,n,n+s,i))}return a}function V(e,t,n,r,i){var o,a=T.getTypeSize("SHORT"),u=a+T.getTypeSize("SHORT"),c=u+T.getTypeSize("LONG"),f=T.getShortAt(e,r,i),s=T.getShortAt(e,r+a,i),d=T.getLongAt(e,r+u,i);if(void 0!==T.typeSizes[s]){if(function(e,t){return T.typeSizes[e]*t<=T.getTypeSize("LONG")}(s,d))o=H(e,r+c,s,d,i);else{var l=T.getLongAt(e,r+c,i);o=function(e,t,n,r,i){return t+n+T.typeSizes[r]*i<=e.byteLength}(e,n,l,s,d)?H(e,n+l,s,d,i,33723===f):"<faulty value>"}s===T.tagTypes.ASCII&&(o=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(o=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}(o)));var p="undefined-".concat(f),m=o;if(void 0!==j[t][f])if(void 0!==j[t][f].name&&void 0!==j[t][f].description){p=j[t][f].name;try{m=j[t][f].description(o)}catch(e){m=_(o)}}else s===T.tagTypes.RATIONAL||s===T.tagTypes.SRATIONAL?(p=j[t][f],m=""+o[0]/o[1]):(p=j[t][f],m=_(o));return{id:f,name:p,value:o,description:m}}}function H(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=[];o&&(r*=T.typeSizes[n],n=T.tagTypes.BYTE);for(var u=0;u<r;u++)a.push(B[n](e,t,i)),t+=T.typeSizes[n];return n===T.tagTypes.ASCII?a=T.getAsciiValue(a):1===a.length&&(a=a[0]),a}function _(e){return e instanceof Array?e.join(", "):e}var X=function(e,t){var n=function(e,t){return T.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=T.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":Y(e,t,n),"Image Height":K(e,t,n),"Image Width":q(e,t,n),"Color Components":r,Subsampling:r&&J(e,t,r.value,n)}};function Y(e,t,n){if(!(3>n)){var r=T.getByteAt(e,t+2);return{value:r,description:""+r}}}function K(e,t,n){if(!(5>n)){var r=T.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function q(e,t,n){if(!(7>n)){var r=T.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function J(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([T.getByteAt(e,a),T.getByteAt(e,a+1),T.getByteAt(e,a+2)])}return{value:i,description:i.length>1?$(i)+Q(i):""}}}function $(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function Q(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 Z={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:ee},336:{name:"Time Sent",description:te},346:{name:"Coded Character Set",description:ne,encoding_name:ne},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"===f(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=f(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=f(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:ee},572:{name:"Time Created",description:te},574:{name:"Digital Creation Date",description:ee},575:{name:"Digital Creation Time",description:te},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=f(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=f(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=f(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(f(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(f(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=f(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 f(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=f(e);if(t["ObjectData Preview File Format"]){var i=f(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 ee(e){var t=f(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function te(e){var t=f(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 ne(e){var t=f(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 re=function(e,t){var n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((function(e){return String.fromCharCode(e)})).join(""))},ie=function(e,t){try{if(Array.isArray(e))return ce(new DataView(Uint8Array.from(e).buffer),{size:e.length},0);var n=function(e,t){for(;t+12<=e.byteLength;){var n=oe(e,t);if(ae(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+ue(n)}throw Error("No IPTC NAA resource block.")}(e,t);return ce(e,n.naaBlock,n.dataOffset)}catch(e){return{}}};function oe(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 ae(e){return 1028===e.type}function ue(e){return e.size%2!=0?1:0}function ce(e,t,n){for(var r={},i=void 0,o=n+t.size;n<o&&n<e.byteLength;){var a=fe(e,n,r,i),u=a.tag,c=a.tagSize;if(null===u)break;"encoding"in u&&(i=u.encoding),void 0===r[u.name]||void 0===u.repeatable?r[u.name]={id:u.id,value:u.value,description:u.description}:(r[u.name]instanceof Array||(r[u.name]=[{id:r[u.name].id,value:r[u.name].value,description:r[u.name].description}]),r[u.name].push({id:u.id,value:u.value,description:u.description})),n+=5+c}return r}function fe(e,t,n,r){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var i=e.getUint16(t+1),o=e.getUint16(t+3),a=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,o),u={id:i,name:se(Z.iptc[i],i,a),value:a,description:de(Z.iptc[i],a,n,r)};return function(e){return Z.iptc[e]&&Z.iptc[e].repeatable}(i)&&(u.repeatable=1),function(e){return Z.iptc[e]&&void 0!==Z.iptc[e].encoding_name}(i)&&(u.encoding=Z.iptc[i].encoding_name(a)),{tag:u,tagSize:o}}function se(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 de(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)?re(r,t):t}function le(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 pe={"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},"exif:GPSLatitude":me,"exif:GPSLongitude":me};function me(e){var t,n=(2,function(e){if(Array.isArray(e))return e}(t=e.split(","))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=1,i=0,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),2!==n.length);r=1);}catch(e){i=1,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t)||function(e,t){if(e){if("string"==typeof e)return le(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(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}var ge=n(0);function he(e){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ve=function(e,t){return"string"==typeof e?Se({},e):function(e,t){if(0===t.length)return[];var n=[ye(e,t.slice(0,1))];return t.length>1&&n.push(ye(e,t.slice(1))),n}(e,t).reduce(Se,{})};function ye(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 Se(e,t){try{return a(e,we(be(function e(t){for(var n=0;n<t.childNodes.length;n++){if("x:xmpmeta"===t.childNodes[n].tagName)return e(t.childNodes[n]);if("rdf:RDF"===t.childNodes[n].tagName)return t.childNodes[n]}throw Error()}(function(e){var t=ge.a.get();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var n=new t,i="string"==typeof e?e:r(e,0,e.byteLength),o=n.parseFromString(i.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1"),"application/xml");if("parsererror"===o.documentElement.nodeName)throw Error(o.documentElement.textContent);return o}(t)),1)))}catch(t){return e}}function be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Ce(e);return Ae(n)?t?{}:Ie(n[0]):Pe(n)}function Ce(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}function Ae(e){return 1===e.length&&"#text"===e[0].nodeName}function Ie(e){return e.nodeValue}function Pe(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:Ue(e),value:be(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}function Ue(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 we(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){a(t,De(e.attributes)),"object"===he(e.value)&&a(t,Re(e.value))}))}return t}function De(e){var t={};for(var n in e)Oe(n)&&(t[xe(n)]={value:e[n],attributes:{},description:ke(e[n],n)});return t}function Oe(e){return"rdf:parseType"!==e&&!Te(e)}function Te(e){return"xmlns"===e.split(":")[0]}function xe(e){return e.split(":")[1]}function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e))return Me(e);if("object"===he(e))return Le(e);try{return t&&"function"==typeof pe[t]?pe[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function Me(e){return e.map((function(e){return void 0!==e.value?ke(e.value):ke(e)})).join(", ")}function Le(e){var t=[];for(var n in e)t.push("".concat(Fe(n),": ").concat(e[n].value));return t.join("; ")}function Fe(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 Re(e){var t={};for(var n in e)Te(n)||(t[xe(n)]=Ne(e[n],n));return t}function Ne(e,t){return Ee(e)?Ge(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}(e)?function(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(a(n.value,De(e.value["rdf:Description"].attributes)),a(n.attributes,je(e)),e=e.value["rdf:Description"]),a(n.value,Re(e.value)),n.description=ke(n.value,t),n}(e,t):function(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["rdf:resource"]}(e)?function(e,t){var n=De(e.attributes);return{value:n,attributes:{},description:ke(n,t)}}(e,t):function(e){return void 0!==Be(e.value)}(e)?function(e,t){var n=Be(e.value).value["rdf:li"],r=je(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return Ee(e)?Ge(e):function(e){return"Resource"===e.attributes["rdf:parseType"]}(e)?Re(e.value):{value:e.value,attributes:je(e),description:ke(e.value)}}(e))})),{value:i,attributes:r,description:ke(i,t)}}(e,t):function(e,t){var n=ze(e)||we(e.value);return{value:n,attributes:je(e),description:ke(n,t)}}(e,t)}function Ee(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 Ge(e,t){var n=je(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),a(n,je(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||Te(n)||(t[xe(n)]=e.value[n].value);return t}(e));var r=function(e){return ze(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:ke(r,t)}}function je(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||Te(n)||(t[xe(n)]=e.attributes[n]);return t}function Be(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function ze(e){return e.attributes&&e.attributes["rdf:resource"]}var We={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"}},Ve={4:{name:"Preferred CMM type",value:function(e,t){return r(e,t,4)},description:function(e){return null!==e?He(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 r(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 r(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return r(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 r(e,t,4)},description:function(e){return He(e)}},48:{name:"Device Manufacturer",value:function(e,t){return r(e,t,4)},description:function(e){return He(e)}},52:{name:"Device Model Number",value:function(e,t){return r(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 r(e,t,4)}}};function He(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 _e=function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),o=new Uint8Array(n),a=0,u=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),c=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var r=u.slice(n.offset,n.offset+n.length),i=new Uint8Array(r);o.set(i,a),a+=i.length},f=1;f<=t.length;f++)c(f);return function(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.length<84)throw Error("ICC profile too short");for(var o={},a=Object.keys(Ve),u=0;u<a.length;u++){var c=a[u],f=Ve[c],s=f.value(e,parseInt(c,10)),d=s;f.description&&(d=f.description(s)),o[f.name]={value:s,description:d}}if("acsp"!==Ye(t.slice(36,40)))throw Error("ICC profile: missing signature");if(function(e){return e.length<132}(t))return o;for(var l=e.getUint32(128),p=132,m=0;m<l;m++){if(Xe(t,p))return o;var g=r(e,p,4),h=e.getUint32(p+4),v=e.getUint32(p+8);if(h>t.length)return o;var y=r(e,h,4);if("desc"===y){var S=e.getUint32(h+8);if(S>v)return o;Ke(o,g,Ye(t.slice(h+12,h+S+11)))}else if("mluc"===y){for(var b=e.getUint32(h+8),C=e.getUint32(h+12),A=h+16,I=[],P=0;P<b;P++){var U=r(e,A+0,2),w=r(e,A+2,2),D=e.getUint32(A+4),O=e.getUint32(A+8),T=i(e,h+O,D);I.push({languageCode:U,countryCode:w,text:T}),A+=C}if(1===b)Ke(o,g,I[0].text);else{for(var x={},k=0;k<I.length;k++)x["".concat(I[k].languageCode,"-").concat(I[k].countryCode)]=I[k].text;Ke(o,g,x)}}else"text"===y?Ke(o,g,Ye(t.slice(h+8,h+v-7))):"sig "===y&&Ke(o,g,Ye(t.slice(h+8,h+12)));p+=12}return o}(new DataView(o.buffer))}catch(e){return{}}};function Xe(e,t){return e.length<t+12}function Ye(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function Ke(e,t,n){We[t]?e[We[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var qe=function(e,t){return{"Image Width":Je(e,t),"Image Height":$e(e,t),"Bit Depth":Qe(e,t),"Color Type":Ze(e,t),Compression:et(e,t),Filter:tt(e,t),Interlace:nt(e,t)}};function Je(e,t){if(!(t+0+4>e.byteLength)){var n=T.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function $e(e,t){if(!(t+4+4>e.byteLength)){var n=T.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function Qe(e,t){if(!(t+8+1>e.byteLength)){var n=T.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function Ze(e,t){if(!(t+9+1>e.byteLength)){var n=T.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 et(e,t){if(!(t+10+1>e.byteLength)){var n=T.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function tt(e,t){if(!(t+11+1>e.byteLength)){var n=T.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function nt(e,t){if(!(t+12+1>e.byteLength)){var n=T.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function rt(e){return(rt="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)}var it=function(e,t,n){if((u=t)&&(void 0===u.Compression||6===u.Compression.value)&&u.JPEGInterchangeFormat&&u.JPEGInterchangeFormat.value&&u.JPEGInterchangeFormatLength&&u.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),o=function(){return e=this.image,"undefined"!=typeof btoa?btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?void 0!==rt(Buffer.from)?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0;var e},a=0,Object.defineProperty(i=t,"base64",{get:function(){return a||(a=1,Object.defineProperty(i,"base64",{configurable:1,enumerable:1,value:o.apply(i),writable:1})),i.base64},configurable:1,enumerable:1})}var i,o,a,u;return t};function ot(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}ot.prototype=Error();var at={MetadataMissingError:ot},ut=(t.default={load:ct,loadView:dt,errors:at},at);function ct(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0};return ft(e)&&(e=new Uint8Array(e).buffer),dt(st(e),t)}function ft(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}function st(e){try{return new DataView(e)}catch(t){return new c(e)}}function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0},n=0,r={},i=w(e),u=i.fileDataOffset,c=i.tiffHeaderOffset,f=i.iptcDataOffset,s=i.xmpChunks,d=i.iccChunks,l=i.pngHeaderOffset;if(lt(u)){n=1;var p=X(e,u);t.expanded?r.file=p:r=a({},r,p)}if(pt(c)){n=1;var m=z(e,c);if(m.Thumbnail&&(r.Thumbnail=m.Thumbnail,delete m.Thumbnail),t.expanded?(r.exif=m,mt(r)):r=a({},r,m),m["IPTC-NAA"]&&!gt(f)){var g=ie(m["IPTC-NAA"].value,0);t.expanded?r.iptc=g:r=a({},r,g)}if(m.ApplicationNotes&&!ht(s)){var h=ve(o(m.ApplicationNotes.value));t.expanded?r.xmp=h:r=a({},r,h)}if(m.ICC_Profile&&!vt(d)){var v=_e(m.ICC_Profile.value,[{offset:0,length:m.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t.expanded?r.icc=v:r=a({},r,v)}}if(gt(f)){n=1;var y=ie(e,f);t.expanded?r.iptc=y:r=a({},r,y)}if(ht(s)){n=1;var S=ve(e,s);t.expanded?r.xmp=S:r=a({},r,S)}if(vt(d)){n=1;var b=_e(e,d);t.expanded?r.icc=b:r=a({},r,b)}if(yt(l)){n=1;var C=qe(e,l);t.expanded?r.pngFile=C:r=a({},r,C)}var A=it(e,r.Thumbnail,c);if(A?(n=1,r.Thumbnail=A):delete r.Thumbnail,!n)throw new at.MetadataMissingError;return r}function lt(e){return void 0!==e}function pt(e){return void 0!==e}function mt(e){e.exif&&(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef&&(e.gps=e.gps||{},e.gps.Latitude=d(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)),e.exif.GPSLongitude&&e.exif.GPSLongitudeRef&&(e.gps=e.gps||{},e.gps.Longitude=d(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)),e.exif.GPSAltitude&&e.exif.GPSAltitudeRef&&(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)))}function gt(e){return void 0!==e}function ht(e){return Array.isArray(e)&&e.length>0}function vt(e){return Array.isArray(e)&&e.length>0}function yt(e){return void 0!==e}}])}));
//# sourceMappingURL=exif-reader.js.map
{
"name": "exifreader",
"version": "3.10.0",
"version": "3.11.0",
"description": "Library that parses Exif metadata in images.",

@@ -62,3 +62,3 @@ "author": "Mattias Wallander <mattias@wallander.eu>",

"test:e2e": "cypress run",
"test:all": "npm-run-all lint test test:e2e test:build test:build:custom",
"test:all": "npm-run-all lint coverage test:e2e test:build test:build:custom",
"postinstall": "node bin/build.js --only-with-config"

@@ -69,4 +69,4 @@ },

"statements": 95,
"branches": 89,
"functions": 97,
"branches": 94,
"functions": 98,
"lines": 96,

@@ -73,0 +73,0 @@ "reporter": [

@@ -25,5 +25,5 @@ ExifReader

| JPEG | **yes** | **yes** | **yes** | **yes** | **yes** |
| TIFF | **yes** | **yes** | **yes** | no | no |
| TIFF | **yes** | **yes** | **yes** | **yes** | no |
| PNG | no | no | **yes** | no | no |
| HEIC/HEIF | **yes** | no | no | no | no |
| HEIC/HEIF | **yes** | no | no | **yes** | no |
| WebP | **yes** | no | **yes** | **yes** | **yes** |

@@ -133,5 +133,14 @@

`fileBuffer` must be an `ArrayBuffer` or a `SharedArrayBuffer` for
browsers, or a `Buffer` for Node. See [examples folder](examples/) for more
directions on how to get the file contents in different environments.
browsers, or a `Buffer` for Node. See the
[examples site](https://mattiasw.github.io/ExifReader/) for more directions on
how to get the file contents in different environments.
### GPS
If `expanded: true` is specified in the options, there will be a `gps` group.
This group currently contains `Latitude`, `Longitude`, and `Altitude` which will
be negative for values that are south of the equator, west of the IRM, or below
sealevel. These are often more convenient values for regular use. For some
elaboration or if you need the original values, see [Notes](#notes) below.
### Using the thumbnail

@@ -161,3 +170,4 @@

See [examples/](examples/) directory for more details.
See the [examples site](https://mattiasw.github.io/ExifReader/) for more
details.

@@ -249,3 +259,3 @@ ### Configure a custom build

| `png_file` | PNG file details: image width, height etc. |
| `exif` | Regular Exif tags. If excluded, will also exclude `thumbnail`. For TIFF files, excluding this will also exclude IPTC and XMP. |
| `exif` | Regular Exif tags. If excluded, will also exclude `thumbnail`. For TIFF files, excluding this will also exclude IPTC, XMP, and ICC. |
| `iptc` | IPTC tags. |

@@ -267,3 +277,4 @@ | `xmp` | XMP tags. |

latter specifies if it's above sea level (positive) or below sea level
(negative).
(negative). If you don't want to calculate the final values yourself, see
[the section on GPS](#gps) for pre-calculated ones.
- Some XMP tags have processed values as descriptions. That means that e.g. an

@@ -296,4 +307,4 @@ `Orientation` value of `3` will have `Rotate 180` in the `description`

Full HTML example pages and a Node.js example are located in the
[examples/](examples/) directory.
Full HTML example pages and a Node.js example are located on the
[examples site](https://mattiasw.github.io/ExifReader/).

@@ -305,3 +316,5 @@ Tips

will load a lot of files and storing the tags. It can be really large for
some manufacturers. See the examples folder to see how you can do that.
some manufacturers. See the
[examples site](https://mattiasw.github.io/ExifReader/) to see how you can
do that.
- In some cases it can make sense to only load the beginning of the image

@@ -364,2 +377,3 @@ file. It's unfortunately not possible to know how big the meta data will be

- Add support for WebP images.
- Add support for ICC tags in TIFF images.
- **April 2020**:

@@ -366,0 +380,0 @@ - Add support for IPTC and XMP tags in TIFF images.

@@ -14,2 +14,3 @@ /**

import {getStringValueFromArray} from './utils.js';
import {getCalculatedGpsValue} from './tag-names-utils.js';
import ImageHeader from './image-header.js';

@@ -84,2 +85,3 @@ import Tags from './tags.js';

tags.exif = readTags;
addGpsGroup(tags);
} else {

@@ -106,2 +108,19 @@ tags = objectAssign({}, tags, readTags);

}
if (Constants.USE_TIFF && Constants.USE_ICC && readTags['ICC_Profile'] && !hasIccData(iccChunks)) {
const readIccTags = IccTags.read(
readTags['ICC_Profile'].value,
[{
offset: 0,
length: readTags['ICC_Profile'].value.length,
chunkNumber: 1,
chunksTotal: 1
}]
);
if (options.expanded) {
tags.icc = readIccTags;
} else {
tags = objectAssign({}, tags, readIccTags);
}
}
}

@@ -154,4 +173,4 @@

if (thumbnail) {
foundMetaData = true;
tags.Thumbnail = thumbnail;
foundMetaData = true;
} else {

@@ -176,2 +195,30 @@ delete tags.Thumbnail;

function addGpsGroup(tags) {
if (tags.exif) {
if (tags.exif.GPSLatitude && tags.exif.GPSLatitudeRef) {
tags.gps = tags.gps || {};
tags.gps.Latitude = getCalculatedGpsValue(tags.exif.GPSLatitude.value);
if (tags.exif.GPSLatitudeRef.value.join('') === 'S') {
tags.gps.Latitude = -tags.gps.Latitude;
}
}
if (tags.exif.GPSLongitude && tags.exif.GPSLongitudeRef) {
tags.gps = tags.gps || {};
tags.gps.Longitude = getCalculatedGpsValue(tags.exif.GPSLongitude.value);
if (tags.exif.GPSLongitudeRef.value.join('') === 'W') {
tags.gps.Longitude = -tags.gps.Longitude;
}
}
if (tags.exif.GPSAltitude && tags.exif.GPSAltitudeRef) {
tags.gps = tags.gps || {};
tags.gps.Altitude = tags.exif.GPSAltitude.value[0] / tags.exif.GPSAltitude.value[1];
if (tags.exif.GPSAltitudeRef.value === 1) {
tags.gps.Altitude = -tags.gps.Altitude;
}
}
}
}
function hasIptcData(iptcDataOffset) {

@@ -178,0 +225,0 @@ return iptcDataOffset !== undefined;

@@ -30,3 +30,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

let offset = 0;
const buffer = dataView.buffer;
const buffer = getBuffer(dataView);

@@ -52,2 +52,9 @@ for (let chunkNumber = 1; chunkNumber <= iccData.length; chunkNumber++) {

function getBuffer(dataView) {
if (Array.isArray(dataView)) {
return (new DataView(Uint8Array.from(dataView).buffer)).buffer;
}
return dataView.buffer;
}
function iccDoesNotHaveTagCount(buffer) {

@@ -54,0 +61,0 @@ return buffer.length < (ICC_TAG_COUNT_OFFSET + 4);

@@ -26,3 +26,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

function findHeicOffsets(dataView) {
if (Constants.USE_EXIF) {
if (Constants.USE_EXIF || Constants.USE_ICC) {
const {offset: metaOffset, length: metaLength} = findMetaAtom(dataView);

@@ -34,11 +34,10 @@ if (metaOffset === undefined) {

const metaEndOffset = Math.min(metaOffset + metaLength, dataView.byteLength);
const {exifItemOffset, ilocOffset} = findExifItemAndIloc(dataView, metaOffset, metaEndOffset);
if ((exifItemOffset === undefined) || (ilocOffset === undefined)) {
return {hasAppMarkers: false};
}
const {exifItemOffset, ilocOffset, colrOffset} = findMetaItems(dataView, metaOffset, metaEndOffset);
const exifOffset = findExifOffset(dataView, exifItemOffset, ilocOffset, metaEndOffset);
const iccChunks = findIccChunks(dataView, colrOffset, metaEndOffset);
return {
hasAppMarkers: exifOffset !== undefined,
tiffHeaderOffset: exifOffset
hasAppMarkers: (exifOffset !== undefined) || (iccChunks !== undefined),
tiffHeaderOffset: exifOffset,
iccChunks
};

@@ -110,16 +109,20 @@ }

function findExifItemAndIloc(dataView, offset, metaEndOffset) {
function findMetaItems(dataView, offset, metaEndOffset) {
const STRING_SIZE = 4;
const EXIF_ITEM_INDEX_REL_OFFSET = -4;
const ITEM_INDEX_REL_OFFSET = -4;
const offsets = {
ilocOffset: undefined,
exifItemOffset: undefined,
ilocOffset: undefined
colrOffset: undefined
};
while ((offset + STRING_SIZE <= metaEndOffset)
&& (!offsets.exifItemOffset || !offsets.ilocOffset)) {
if (getStringFromDataView(dataView, offset, STRING_SIZE) === 'Exif') {
offsets.exifItemOffset = offset + EXIF_ITEM_INDEX_REL_OFFSET;
} else if (getStringFromDataView(dataView, offset, STRING_SIZE) === 'iloc') {
&& (!offsets.ilocOffset || !offsets.exifItemOffset || !offsets.colrOffset)) {
const itemName = getStringFromDataView(dataView, offset, STRING_SIZE);
if (Constants.USE_EXIF && (itemName === 'iloc')) {
offsets.ilocOffset = offset;
} else if (Constants.USE_EXIF && (itemName === 'Exif')) {
offsets.exifItemOffset = offset + ITEM_INDEX_REL_OFFSET;
} else if (Constants.USE_ICC && (itemName === 'colr')) {
offsets.colrOffset = offset + ITEM_INDEX_REL_OFFSET;
}

@@ -141,3 +144,3 @@

if (exifItemOffset + EXIF_ITEM_OFFSET_SIZE > metaEndOffset) {
if (!offset || !exifItemOffset || (exifItemOffset + EXIF_ITEM_OFFSET_SIZE > metaEndOffset)) {
return undefined;

@@ -164,1 +167,23 @@ }

}
function findIccChunks(dataView, offset, metaEndOffset) {
const ITEM_TYPE_OFFSET = 8;
const ITEM_TYPE_SIZE = 4;
const ITEM_CONTENT_OFFSET = 12;
if (!offset || (offset + ITEM_CONTENT_OFFSET > metaEndOffset)) {
return undefined;
}
const colorType = getStringFromDataView(dataView, offset + ITEM_TYPE_OFFSET, ITEM_TYPE_SIZE);
if ((colorType !== 'prof') && (colorType !== 'rICC')) {
return undefined;
}
return [{
offset: offset + ITEM_CONTENT_OFFSET,
length: getAtomLength(dataView, offset) - ITEM_CONTENT_OFFSET,
chunkNumber: 1,
chunksTotal: 1
}];
}

@@ -5,3 +5,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

import {getEncodedString} from './tag-names-utils.js';
import {getEncodedString, getCalculatedGpsValue} from './tag-names-utils.js';

@@ -32,5 +32,3 @@ export default {

'name': 'GPSLatitude',
'description': (value) => {
return (value[0][0] / value[0][1]) + (value[1][0] / value[1][1]) / 60 + (value[2][0] / value[2][1]) / 3600;
}
'description': getCalculatedGpsValue
},

@@ -51,5 +49,3 @@ 0x0003: {

'name': 'GPSLongitude',
'description': (value) => {
return (value[0][0] / value[0][1]) + (value[1][0] / value[1][1]) / 60 + (value[2][0] / value[2][1]) / 3600;
}
'description': getCalculatedGpsValue
},

@@ -56,0 +52,0 @@ 0x0005: {

@@ -26,1 +26,5 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

}
export function getCalculatedGpsValue(value) {
return (value[0][0] / value[0][1]) + (value[1][0] / value[1][1]) / 60 + (value[2][0] / value[2][1]) / 3600;
}

@@ -74,3 +74,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

{
test: /\/(exif-reader|image-header-?(tiff|jpeg|png|heic)?)\.js$/,
test: /\/(exif-reader|image-header-?(tiff|jpeg|png|heic|webp)?)\.js$/,
loader: 'string-replace-loader',

@@ -100,3 +100,4 @@ options: {

'png',
'heic'
'heic',
'webp'
];

@@ -145,2 +146,5 @@

}
if (packageJson.include.icc) {
packageJson.include.exif.push('ICC_Profile');
}
}

@@ -147,0 +151,0 @@ return {include: packageJson.include};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc