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 2.9.0 to 2.10.0

dist/exif-reader.js2

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:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},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:!0,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=21)}([function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e){return e.map(function(e){return String.fromCharCode(e)}).join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.getStringValue=t,e.getEncodedString=function(e){if(e.length>=8){var n=t(e.slice(0,8));if("ASCII\0\0\0"===n)return t(e.slice(8));if("JIS\0\0\0\0\0"===n)return"[JIS encoded text]";if("UNICODE\0"===n)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===n)return"[Undefined encoding]"}return"Undefined"},e.getCharacterArray=function(e){return e.split("").map(function(e){return e.charCodeAt(0)})}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(2)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(t),r={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8},i={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10};function o(e,t){return e.getUint8(t)}function a(e,t,r){return e.getUint32(t,r===n.default.LITTLE_ENDIAN)}function u(e,t,r){return e.getInt32(t,r===n.default.LITTLE_ENDIAN)}e.default={getAsciiValue:function(e){return e.map(function(e){return String.fromCharCode(e)})},getByteAt:o,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,r){return e.getUint16(t,r===n.default.LITTLE_ENDIAN)},getLongAt:a,getRationalAt:function(e,t,n){return a(e,t,n)/a(e,t+4,n)},getUndefinedAt:function(e,t){return o(e,t)},getSlongAt:u,getSrationalAt:function(e,t,n){return u(e,t,n)/u(e,t+4,n)},typeSizes:r,tagTypes:i,getTypeSize:function(e){if(void 0===i[e])throw new Error("No such type found.");return r[i[e]]}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=18761,n=19789;e.default={BIG_ENDIAN:n,LITTLE_ENDIAN:t,getByteOrder:function(e,r){if(e.getUint16(r)===t)return t;if(e.getUint16(r)===n)return n;throw new Error("Illegal byte order value. Faulty image.")}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getStringFromDataView=function(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i,!1));return function(e){return e.map(function(e){return String.fromCharCode(e)})}(r).join("")}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}Object.defineProperty(e,"__esModule",{value:!0}),t.prototype=new Error,e.default={MetadataMissingError:t}})?r.apply(t,i):r)||(e.exports=o)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[exports],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=function(exports){"use strict";function get(){if("undefined"!=typeof DOMParser)return DOMParser;try{return eval("require")("xmldom").DOMParser}catch(e){return}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={get:get}})?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function n(e){var n=e.split(","),r=t(n,2),i=r[0],o=r[1];if(void 0!==i&&void 0!==o){var a=parseFloat(i),u=parseFloat(o),c=o.charAt(o.length-1);if(!Number.isNaN(a)&&!Number.isNaN(u))return""+(a+u/60)+c}return e}e.default={"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":n,"exif:GPSLongitude":n}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(3),n(6),n(5)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n),o=a(r);function a(e){return e&&e.__esModule?e:{default:e}}var 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};function c(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return function(e){return 1===e.length&&"#text"===e[0].nodeName}(n)?t?{}:function(e){return e.nodeValue}(n[0]):function(e){var t={};return e.forEach(function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:function(e){for(var t={},n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}(e),value:c(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}(n)}function d(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){Object.assign(t,f(e.attributes)),"object"===u(e.value)&&Object.assign(t,v(e.value))})}return t}function f(e){var t={};for(var n in e)s(n)&&(t[p(n)]={value:e[n],attributes:{},description:g(e[n],n)});return t}function s(e){return"rdf:parseType"!==e&&!l(e)}function l(e){return"xmlns"===e.split(":")[0]}function p(e){return e.split(":")[1]}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e))return function(e){return e.map(function(e){return void 0!==e.value?g(e.value):g(e)}).join(", ")}(e);if("object"===(void 0===e?"undefined":u(e)))return function(e){var t=[];for(var n in e)t.push(m(n)+": "+e[n].value);return t.join("; ")}(e);try{return t&&"function"==typeof i.default[t]?i.default[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function m(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 v(e){var t={};for(var n in e)l(n)||(t[p(n)]=y(e[n],n));return t}function y(e,t){return h(e)?S(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"]&&(Object.assign(n.value,f(e.value["rdf:Description"].attributes)),Object.assign(n.attributes,b(e)),e=e.value["rdf:Description"]),Object.assign(n.value,v(e.value)),n.description=g(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=f(e.attributes);return{value:n,attributes:{},description:g(n,t)}}(e,t):function(e){return void 0!==A(e.value)}(e)?function(e,t){var n=A(e.value).value["rdf:li"],r=b(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach(function(e){i.push(function(e){return h(e)?S(e):function(e){return"Resource"===e.attributes["rdf:parseType"]}(e)?v(e.value):{value:e.value,attributes:b(e),description:g(e.value)}}(e))}),{value:i,attributes:r,description:g(i,t)}}(e,t):function(e,t){var n=P(e)||d(e.value);return{value:n,attributes:b(e),description:g(n,t)}}(e,t)}function h(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 S(e,t){var n=b(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),Object.assign(n,b(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||l(n)||(t[p(n)]=e.value[n].value);return t}(e));var r=function(e){return P(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:g(r,t)}}function b(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||l(n)||(t[p(n)]=e.attributes[n]);return t}function A(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function P(e){return e.attributes&&e.attributes["rdf:resource"]}e.default={read:function(e,n,r){try{var i=function(e,n,r){var i=o.default.get();if(!i)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;var a=new i,u=(0,t.getStringFromDataView)(e,n,r),c=a.parseFromString(u,"application/xml");if("parsererror"===c.documentElement.nodeName)throw new Error(c.documentElement.textContent);return c}(e,n,r),a=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 new Error}(i);return d(c(a,!0))}catch(e){return{}}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(8)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(t);e.default={decode:function(e,t){var r=n.default.get();if(void 0!==r&&void 0!==e)try{return new r(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map(function(e){return String.fromCharCode(e)}).join(""))},TAG_HEADER_SIZE:5}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(0)],void 0===(o="function"==typeof(r=function(e,t){"use strict";function n(e){var n=(0,t.getStringValue)(e);return n.length>=8?n.substr(0,4)+"-"+n.substr(4,2)+"-"+n.substr(6,2):n}function r(e){var n=(0,t.getStringValue)(e),r=n;return n.length>=6&&(r=n.substr(0,2)+":"+n.substr(2,2)+":"+n.substr(4,2),11===n.length&&(r+=n.substr(6,1)+n.substr(7,2)+":"+n.substr(9,2))),r}function i(e){var n=(0,t.getStringValue)(e);return"%G"===n?"UTF-8":"%5"===n?"Windows-1252":"%/G"===n?"UTF-8 Level 1":"%/H"===n?"UTF-8 Level 2":"%/I"===n?"UTF-8 Level 3":"/A"===n?"ISO-8859-1":"/B"===n?"ISO-8859-2":"/C"===n?"ISO-8859-3":"/D"===n?"ISO-8859-4":"/@"===n?"ISO-8859-5":"/G"===n?"ISO-8859-6":"/F"===n?"ISO-8859-7":"/H"===n?"ISO-8859-8":"Unknown"}Object.defineProperty(e,"__esModule",{value:!0}),e.default={iptc:{256:{name:"Model Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:function(e){return((e[0]<<8)+e[1]).toString()}},278:{name:"File Format Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:n},336:{name:"Time Sent",description:r},346:{name:"Coded Character Set",description:i,encoding_name:i},356:"UNO",376:{name:"ARM Identifier",description:function(e){return((e[0]<<8)+e[1]).toString()}},378:{name:"ARM Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},512:{name:"Record Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===(0,t.getStringValue)(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:function(e){var n=(0,t.getStringValue)(e).split(":");return n[2]+(n[3]?"/"+n[3]:"")+(n[4]?"/"+n[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var n=(0,t.getStringValue)(e);return"01"===n?"Object Kill":"02"===n?"Object Replace":"03"===n?"Object Append":"04"===n?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:n},572:{name:"Time Created",description:r},574:{name:"Digital Creation Date",description:n},575:{name:"Digital Creation Time",description:r},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var n=(0,t.getStringValue)(e);return"a"===n?"morning":"p"===n?"evening":"b"===n?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},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:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var n=(0,t.getStringValue)(e);return"P"===n?"Portrait":"L"===n?"Landscape":"S"===n?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var n=(0,t.getStringValue)(e),r=n.charAt(0),i=n.charAt(1),o="";return"1"===r?o+="Mono":"2"===r&&(o+="Stereo"),"A"===i?o+=", actuality":"C"===i?o+=", question and answer session":"M"===i?o+=", music, transmitted by itself":"Q"===i?o+=", response to a question":"R"===i?o+=", raw sound":"S"===i?o+=", scener":"V"===i?o+=", voicer":"W"===i&&(o+=", wrap"),""!==o?o:n}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt((0,t.getStringValue)(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var n=parseInt((0,t.getStringValue)(e),10);return n+(1===n?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var n=(0,t.getStringValue)(e);return n.length>=6?n.substr(0,2)+":"+n.substr(2,2)+":"+n.substr(4,2):n}},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 n=(e[0]<<8)+e[1];return 0===n?"No ObjectData":1===n?"IPTC-NAA Digital Newsphoto Parameter Record":2===n?"IPTC7901 Recommended Message Format":3===n?"Tagged Image File Format (Adobe/Aldus Image data)":4===n?"Illustrator (Adobe Graphics data)":5===n?"AppleSingle (Apple Computer Inc)":6===n?"NAA 89-3 (ANPA 1312)":7===n?"MacBinary II":8===n?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===n?"United Press International ANPA 1312 variant":10===n?"United Press International Down-Load Message":11===n?"JPEG File Interchange (JFIF)":12===n?"Photo-CD Image-Pac (Eastman Kodak)":13===n?"Microsoft Bit Mapped Graphics File [*.BMP]":14===n?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===n?"Audio plus Moving Video [*.AVI] (Microsoft)":16===n?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===n?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===n?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===n?"RIFF Wave (Microsoft Corporation)":20===n?"Freehand (Macromedia/Aldus)":21===n?'Hypertext Markup Language "HTML" (The Internet Society)':22===n?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===n?"MPEG 2 Audio Layer 3, ISO/IEC":24===n?"Portable Document File (*.PDF) Adobe":25===n?"News Industry Text Format (NITF)":26===n?"Tape Archive (*.TAR)":27===n?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===n?"Ritzaus Bureau NITF version (RBNITF DTD)":29===n?"Corel Draw [*.CDR]":"Unknown format "+n}return(0,t.getStringValue)(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,n){var r={"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"}},i=(0,t.getStringValue)(e);if(n["ObjectData Preview File Format"]){var o=(0,t.getStringValue)(n["ObjectData Preview File Format"].value);if(r[o]&&r[o][i])return r[o][i]}return i}},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()}}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(10),n(9)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(t),i=o(n);function o(e){return e&&e.__esModule?e:{default:e}}var a=943868237,u=4,c=u+8,d=1028,f=5;function s(e,t){if(e.getUint32(t,!1)!==a)throw new Error("Not an IPTC resource block.");return{type:e.getUint16(t+u,!1),size:e.getUint16(t+10,!1)}}function l(e){return e.type===d}function p(e){return e.size%2!=0?1:0}function g(e,t,n,o){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var a=e.getUint16(t+1,!1),u=e.getUint16(t+3,!1),c=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+f,u),d={id:a,name:function(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-"+t}(r.default.iptc[a],a,c),value:c,description:function(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)?i.default.decode(r,t):t}(r.default.iptc[a],c,n,o)};return function(e){return r.default.iptc[e]&&r.default.iptc[e].repeatable}(a)&&(d.repeatable=!0),function(e){return r.default.iptc[e]&&void 0!==r.default.iptc[e].encoding_name}(a)&&(d.encoding=r.default.iptc[a].encoding_name(c)),{tag:d,tagSize:u}}e.default={read:function(e,t){try{var n=function(e,t){for(;t+c<=e.byteLength;){var n=s(e,t);if(l(n))return{naaBlock:n,dataOffset:t};t+=c+n.size+p(n)}throw new Error("No IPTC NAA resource block.")}(e,t),r=n.naaBlock,i=n.dataOffset;return function(e,t,n){for(var r={},i=void 0,o=(n+=c)+t.size;n<o&&n<e.byteLength;){var a=g(e,n,r,i),u=a.tag,d=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+=f+d}return r}(e,r,i)}catch(e){return{}}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(1)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(t);function r(e,t,r,i){var o=3*r;if(!(8+o>i)){for(var a=[],u=0;u<r;u++){var c=t+8+3*u;a.push([n.default.getByteAt(e,c),n.default.getByteAt(e,c+1),n.default.getByteAt(e,c+2)])}return{value:a,description:a.length>1?function(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map(function(e){return t[e[0]]}).join("")}(a)+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]]}(a):""}}}e.default={read:function(e,t){var i=function(e,t){return n.default.getShortAt(e,t)}(e,t),o=function(e,t,r){if(!(8>r)){var i=n.default.getByteAt(e,t+7);return{value:i,description:""+i}}}(e,t,i);return{"Bits Per Sample":function(e,t,r){if(!(3>r)){var i=n.default.getByteAt(e,t+2);return{value:i,description:""+i}}}(e,t,i),"Image Height":function(e,t,r){if(!(5>r)){var i=n.default.getShortAt(e,t+3);return{value:i,description:i+"px"}}}(e,t,i),"Image Width":function(e,t,r){if(!(7>r)){var i=n.default.getShortAt(e,t+5);return{value:i,description:i+"px"}}}(e,t,i),"Color Components":o,Subsampling:o&&r(e,t,o.value,i)}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={1:"InteroperabilityIndex"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(0)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={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]+e[1]/60+e[2]/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]+e[1]/60+e[2]/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+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map(function(e){return 1===(""+e).length?"0"+e:e}).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]+e[1]/60+e[2]/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]+e[1]/60+e[2]/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:t.getEncodedString},28:{name:"GPSAreaInformation",description:t.getEncodedString},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(0)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.default={33434:"ExposureTime",33437:"FNumber",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":"Unknown"}},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},36864:{name:"ExifVersion",description:function(e){return(0,t.getStringValue)(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",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:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBiasValue",37381:"MaxApertureValue",37382:"SubjectDistance",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: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"}},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:"FocalLength",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: "+e[0]+", Y: "+e[1]:3===e.length?"Circle; X: "+e[0]+", Y: "+e[1]+", diameter: "+e[2]:4===e.length?"Rectangle; X: "+e[0]+", Y: "+e[1]+", width: "+e[2]+", height: "+e[3]:"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:t.getEncodedString},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",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(e,2),r=t[0],i=t[1];return"X: "+r+", Y: "+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?"Digital zoom was not used":e}},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"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",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",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:{name:"ResolutionUnit",description:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",317:{name:"Predictor",description:function(e){return 1===e?"None":2===e?"Horizontal differencing":""+e}},318:"WhitePoint",319:"PrimaryChromaticities",338:{name:"ExtraSamples",description:function(e){return 0===e?"Unspecified ":1===e?"Associated Alpha":2===e?"Unassociated Alpha":""+e}},339:{name:"SampleFormat",description:function(e){return e.map(function(e){return 1===e?"Unsigned":2===e?"Signed":3===e?"Float":4===e?"Undefined":5===e?"Complex int":6===e?"Complex float":""+e}).join(", ")}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:"ReferenceBlackWhite",33432:{name:"Copyright",description:function(e){return e.join("; ")}},34665:"Exif IFD Pointer",34853:"GPS Info IFD Pointer"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(16),n(15),n(14),n(13)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=d(t),a=d(n),u=d(r),c=d(i);function d(e){return e&&e.__esModule?e:{default:e}}e.default={"0th":o.default,exif:a.default,gps:u.default,interoperability:c.default}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(2),n(1),n(17)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=u(t),o=u(n),a=u(r);function u(e){return e&&e.__esModule?e:{default:e}}var c="Exif IFD Pointer",d="GPS Info IFD Pointer",f="Interoperability IFD Pointer",s={1:o.default.getByteAt,2:o.default.getAsciiAt,3:o.default.getShortAt,4:o.default.getLongAt,5:o.default.getRationalAt,7:o.default.getUndefinedAt,9:o.default.getSlongAt,10:o.default.getSrationalAt};function l(e,t,n){return p(e,"0th",t,function(e,t,n){return t+o.default.getLongAt(e,t+4,n)}(e,t,n),n)}function p(e,t,n,r,i){var a=o.default.getTypeSize("SHORT"),u={},c=o.default.getShortAt(e,r,i);r+=a;for(var d=0;d<c;d++){var f=g(e,t,n,r,i);void 0!==f&&(u[f.name]={id:f.id,value:f.value,description:f.description}),r+=12}return u}function g(e,t,n,r,i){var u=o.default.getTypeSize("SHORT"),c=u+o.default.getTypeSize("SHORT"),d=c+o.default.getTypeSize("LONG"),f=o.default.getShortAt(e,r,i),s=o.default.getShortAt(e,r+u,i),l=o.default.getLongAt(e,r+c,i),p=void 0;if(void 0!==o.default.typeSizes[s]){if(function(e,t){return o.default.typeSizes[e]*t<=o.default.getTypeSize("LONG")}(s,l))p=m(e,r+d,s,l,i);else{var g=o.default.getLongAt(e,r+d,i);p=function(e,t,n,r,i){return t+n+o.default.typeSizes[r]*i<=e.byteLength}(e,n,g,s,l)?m(e,n+g,s,l,i):"<faulty value>"}if(s===o.default.tagTypes.ASCII&&(p=function(e){try{return e.map(function(e){return decodeURIComponent(escape(e))})}catch(t){return e}}(p=function(e){var t=[],n=0,r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value;"\0"!==c?(void 0===t[n]&&(t[n]=""),t[n]+=c):n++}}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return t}(p))),void 0!==a.default[t][f]){var y=void 0,h=void 0;if(void 0!==a.default[t][f].name&&void 0!==a.default[t][f].description){y=a.default[t][f].name;try{h=a.default[t][f].description(p)}catch(e){h=v(p)}}else y=a.default[t][f],h=v(p);return{id:f,name:y,value:p,description:h}}return{id:f,name:"undefined-"+f,value:p,description:p}}}function m(e,t,n,r,i){for(var a=[],u=0;u<r;u++)a.push(s[n](e,t,i)),t+=o.default.typeSizes[n];return n===o.default.tagTypes.ASCII?a=o.default.getAsciiValue(a):1===a.length&&(a=a[0]),a}function v(e){return e instanceof Array?e.join(", "):e}e.default={read:function(e,t){var n=i.default.getByteOrder(e,t),r=l(e,t,n);return r=function(e,t,n,r){return void 0!==e[f]?Object.assign(e,p(t,"interoperability",n,n+e[f].value,r)):e}(r=function(e,t,n,r){return void 0!==e[d]?Object.assign(e,p(t,"gps",n,n+e[d].value,r)):e}(r=function(e,t,n,r){return void 0!==e[c]?Object.assign(e,p(t,"exif",n,n+e[c].value,r)):e}(r,e,t,n),e,t,n),e,t,n)}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(3)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=4,r=2,i=42,o=2,a=0,u=65496,c=2,d=18761,f=4,s=2,l=10,p=18,g=33,m=65472,v=65474,y=65476,h=65499,S=65501,b=65498,A=65504,P=65505,_=65517,C=65519,I=65534,D="Exif",w="http://ns.adobe.com/xap/1.0/",E="Photoshop 3.0";function O(e){return e.byteLength>=n&&function(e){var t=e.getUint16(0)===d;return e.getUint16(o,t)===i}(e)}function F(e,t){return e.getUint16(t,!1)===m}function U(e,t){return e.getUint16(t,!1)===v}function M(e,n){var r=D.length;return e.getUint16(n,!1)===P&&(0,t.getStringFromDataView)(e,n+f,r)===D&&0===e.getUint8(n+f+r,!1)}function x(e,n){var r=w.length;return e.getUint16(n,!1)===P&&(0,t.getStringFromDataView)(e,n+f,r)===w&&0===e.getUint8(n+f+r,!1)}function T(e,n){var r=E.length;return e.getUint16(n,!1)===_&&(0,t.getStringFromDataView)(e,n+f,r)===E&&0===e.getUint8(n+f+r,!1)}function N(e,t){var n=e.getUint16(t,!1);return n>=A&&n<=C||n===I||n===m||n===v||n===y||n===h||n===S||n===b}e.default={parseAppMarkers:function(e){var t=c,n=void 0,i=void 0,o=void 0,d=void 0,m=void 0,v=void 0,y=void 0;if(O(e))return{hasAppMarkers:!0,tiffHeaderOffset:a};if(!function(e){return e.byteLength>=r&&e.getUint16(0,!1)===u}(e))throw new Error("Invalid image format");for(;t+f+5<=e.byteLength;){if(F(e,t))i=t+s;else if(U(e,t))o=t+s;else if(M(e,t))n=e.getUint16(t+s,!1),d=t+l;else if(x(e,t))n=e.getUint16(t+s,!1),v=t+g,y=n-(g-s);else if(T(e,t))n=e.getUint16(t+s,!1),m=t+p;else{if(!N(e,t))break;n=e.getUint16(t+s,!1)}t+=s+n}return{hasAppMarkers:t>c,fileDataOffset:i||o,tiffHeaderOffset:d,iptcDataOffset:m,xmpDataOffset:v,xmpFieldLength:y}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function e(n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==(void 0===e?"undefined":t(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}(n))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=n,this.byteLength=this.buffer.length}return n(e,[{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)}}]),e}();e.default=r})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(20),n(19),n(18),n(12),n(11),n(7),n(4)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errors=void 0,e.load=v,e.loadView=y;var c=m(t),d=m(n),f=m(r),s=m(i),l=m(o),p=m(a),g=m(u);function m(e){return e&&e.__esModule?e:{default:e}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1};return y(function(e){try{return new DataView(e)}catch(t){return new c.default(e)}}(e),t)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1},n=!1,r={},i=d.default.parseAppMarkers(e),o=i.fileDataOffset,a=i.tiffHeaderOffset,u=i.iptcDataOffset,c=i.xmpDataOffset,m=i.xmpFieldLength;if(function(e){return void 0!==e}(o)){n=!0;var v=s.default.read(e,o);t.expanded?r.file=v:r=Object.assign({},r,v)}if(function(e){return void 0!==e}(a)){n=!0;var y=f.default.read(e,a);t.expanded?r.exif=y:r=Object.assign({},r,y)}if(function(e){return void 0!==e}(u)){n=!0;var h=l.default.read(e,u);t.expanded?r.iptc=h:r=Object.assign({},r,h)}if(function(e){return void 0!==e}(c)){n=!0;var S=p.default.read(e,c,m);t.expanded?r.xmp=S:r=Object.assign({},r,S)}if(!n)throw new g.default.MetadataMissingError;return r}e.default={load:v,loadView:y,errors:g.default},e.errors=g.default})?r.apply(t,i):r)||(e.exports=o)}])});
!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:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},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:!0,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=4)}([function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e){return e.map((function(e){return String.fromCharCode(e)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.getStringFromDataView=function(e,n,r){for(var i=[],o=0;o<r&&n+o<e.byteLength;o++)i.push(e.getUint8(n+o,!1));return t(i).join("")},e.getUnicodeStringFromDataView=function(e,n,r){for(var i=[],o=0;o<r&&n+o<e.byteLength;o+=2)i.push(e.getUint16(n+o));return t(i).join("")}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}Object.defineProperty(e,"__esModule",{value:!0}),e.getStringValue=t,e.getEncodedString=function(e){if(e.length>=8){var n=t(e.slice(0,8));if("ASCII\0\0\0"===n)return t(e.slice(8));if("JIS\0\0\0\0\0"===n)return"[JIS encoded text]";if("UNICODE\0"===n)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===n)return"[Undefined encoding]"}return"Undefined"},e.getCharacterArray=function(e){return e.split("").map((function(e){return e.charCodeAt(0)}))}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=18761,n=19789;e.default={BIG_ENDIAN:n,LITTLE_ENDIAN:t,getByteOrder:function(e,r){if(e.getUint16(r)===t)return t;if(e.getUint16(r)===n)return n;throw new Error("Illegal byte order value. Faulty image.")}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(2)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r=(n=t)&&n.__esModule?n:{default:n},i={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8},o={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10};function a(e,t){return e.getUint8(t)}function u(e,t,n){return e.getUint32(t,n===r.default.LITTLE_ENDIAN)}function c(e,t,n){return e.getInt32(t,n===r.default.LITTLE_ENDIAN)}e.default={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:a,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===r.default.LITTLE_ENDIAN)},getLongAt:u,getRationalAt:function(e,t,n){return u(e,t,n)/u(e,t+4,n)},getUndefinedAt:function(e,t){return a(e,t)},getSlongAt:c,getSrationalAt:function(e,t,n){return c(e,t,n)/c(e,t+4,n)},typeSizes:i,tagTypes:o,getTypeSize:function(e){if(void 0===o[e])throw new Error("No such type found.");return i[o[e]]}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(5),n(6),n(7),n(13),n(14),n(18),n(21),n(23)],void 0===(o="function"==typeof(r=function(e,t,n,r,i,o,a,u,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errors=void 0,e.load=h,e.loadView=S;var f=y(t),d=y(n),s=y(r),l=y(i),p=y(o),g=y(a),v=y(u),m=y(c);function y(e){return e&&e.__esModule?e:{default:e}}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1};return S(function(e){try{return new DataView(e)}catch(t){return new f.default(e)}}(e),t)}function S(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1},r=!1,i={},o=d.default.parseAppMarkers(e),a=o.fileDataOffset,u=o.tiffHeaderOffset,c=o.iptcDataOffset,f=o.xmpDataOffset,y=o.xmpFieldLength,h=o.iccChunks;if(function(e){return void 0!==e}(a)){r=!0;var S=l.default.read(e,a);n.expanded?i.file=S:i=Object.assign({},i,S)}if(function(e){return void 0!==e}(u)){r=!0;var b=s.default.read(e,u);n.expanded?i.exif=b:i=Object.assign({},i,b)}if(function(e){return void 0!==e}(c)){r=!0;var C=p.default.read(e,c);n.expanded?i.iptc=C:i=Object.assign({},i,C)}if(function(e){return void 0!==e}(f)){r=!0;var A=g.default.read(e,f,y);n.expanded?i.xmp=A:i=Object.assign({},i,A)}if(t=h,Array.isArray(t)&&t.length>0){r=!0;var D=v.default.read(e,h);n.expanded?i.icc=D:i=Object.assign({},i,D)}if(!r)throw new m.default.MetadataMissingError;return i}e.default={load:h,loadView:S,errors:m.default},e.errors=m.default})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function e(n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==(void 0===e?"undefined":t(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}(n))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=n,this.byteLength=this.buffer.length}return n(e,[{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)}}]),e}();e.default=r})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(0)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=4,r=2,i=42,o=2,a=0,u=65496,c=2,f=18761,d=4,s=2,l=10,p=18,g=33,v=18,m="ICC_PROFILE\0",y=d+m.length,h=y+1,S=65472,b=65474,C=65476,A=65499,D=65501,w=65498,I=65504,P=65505,_=65506,U=65517,F=65519,O=65534,E="Exif",M="http://ns.adobe.com/xap/1.0/",x="Photoshop 3.0";function T(e,t){return e.getUint16(t,!1)===S}function j(e,t){return e.getUint16(t,!1)===b}function N(e,n){var r=m.length;return e.getUint16(n,!1)===_&&(0,t.getStringFromDataView)(e,n+d,r)===m}function R(e,n){var r=E.length;return e.getUint16(n,!1)===P&&(0,t.getStringFromDataView)(e,n+d,r)===E&&0===e.getUint8(n+d+r,!1)}function k(e,n){var r=M.length;return e.getUint16(n,!1)===P&&(0,t.getStringFromDataView)(e,n+d,r)===M&&0===e.getUint8(n+d+r,!1)}function L(e,n){var r=x.length;return e.getUint16(n,!1)===U&&(0,t.getStringFromDataView)(e,n+d,r)===x&&0===e.getUint8(n+d+r,!1)}function V(e,t){var n=e.getUint16(t,!1);return n>=I&&n<=F||n===O||n===S||n===b||n===C||n===A||n===D||n===w}e.default={parseAppMarkers:function(e){var t=c,m=void 0,S=void 0,b=void 0,C=void 0,A=void 0,D=void 0,w=void 0,I=void 0;if(function(e){return e.byteLength>=n&&function(e){var t=e.getUint16(0)===f;return e.getUint16(o,t)===i}(e)}(e))return{hasAppMarkers:!0,tiffHeaderOffset:a};if(!function(e){return e.byteLength>=r&&e.getUint16(0,!1)===u}(e))throw new Error("Invalid image format");for(;t+d+5<=e.byteLength;){if(T(e,t))S=t+s;else if(j(e,t))b=t+s;else if(R(e,t))m=e.getUint16(t+s,!1),C=t+l;else if(k(e,t))m=e.getUint16(t+s,!1),D=t+g,w=m-(g-s);else if(L(e,t))m=e.getUint16(t+s,!1),A=t+p;else if(N(e,t)){m=e.getUint16(t+s,!1);var P=t+v,_=m-(v-s),U=e.getUint8(t+y,!1),F=e.getUint8(t+h,!1);I||(I=[]),I.push({offset:P,length:_,chunkNumber:U,chunksTotal:F})}else{if(!V(e,t))break;m=e.getUint16(t+s,!1)}t+=s+m}return{hasAppMarkers:t>c,fileDataOffset:S||b,tiffHeaderOffset:C,iptcDataOffset:A,xmpDataOffset:D,xmpFieldLength:w,iccChunks:I}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(2),n(3),n(8)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=u(t),o=u(n),a=u(r);function u(e){return e&&e.__esModule?e:{default:e}}var c="Exif IFD Pointer",f="GPS Info IFD Pointer",d="Interoperability IFD Pointer",s={1:o.default.getByteAt,2:o.default.getAsciiAt,3:o.default.getShortAt,4:o.default.getLongAt,5:o.default.getRationalAt,7:o.default.getUndefinedAt,9:o.default.getSlongAt,10:o.default.getSrationalAt};function l(e,t,n,r,i){var a=o.default.getTypeSize("SHORT"),u={},c=o.default.getShortAt(e,r,i);r+=a;for(var f=0;f<c;f++){var d=p(e,t,n,r,i);void 0!==d&&(u[d.name]={id:d.id,value:d.value,description:d.description}),r+=12}return u}function p(e,t,n,r,i){var u=o.default.getTypeSize("SHORT"),c=u+o.default.getTypeSize("SHORT"),f=c+o.default.getTypeSize("LONG"),d=o.default.getShortAt(e,r,i),s=o.default.getShortAt(e,r+u,i),l=o.default.getLongAt(e,r+c,i),p=void 0;if(void 0!==o.default.typeSizes[s]){if(function(e,t){return o.default.typeSizes[e]*t<=o.default.getTypeSize("LONG")}(s,l))p=g(e,r+f,s,l,i);else{var m=o.default.getLongAt(e,r+f,i);p=function(e,t,n,r,i){return t+n+o.default.typeSizes[r]*i<=e.byteLength}(e,n,m,s,l)?g(e,n+m,s,l,i):"<faulty value>"}if(s===o.default.tagTypes.ASCII&&(p=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(p=function(e){var t=[],n=0,r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value;"\0"!==c?(void 0===t[n]&&(t[n]=""),t[n]+=c):n++}}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return t}(p))),void 0!==a.default[t][d]){var y=void 0,h=void 0;if(void 0!==a.default[t][d].name&&void 0!==a.default[t][d].description){y=a.default[t][d].name;try{h=a.default[t][d].description(p)}catch(e){h=v(p)}}else y=a.default[t][d],h=v(p);return{id:d,name:y,value:p,description:h}}return{id:d,name:"undefined-"+d,value:p,description:p}}}function g(e,t,n,r,i){for(var a=[],u=0;u<r;u++)a.push(s[n](e,t,i)),t+=o.default.typeSizes[n];return n===o.default.tagTypes.ASCII?a=o.default.getAsciiValue(a):1===a.length&&(a=a[0]),a}function v(e){return e instanceof Array?e.join(", "):e}e.default={read:function(e,t){var n=i.default.getByteOrder(e,t),r=function(e,t,n){return l(e,"0th",t,function(e,t,n){return t+o.default.getLongAt(e,t+4,n)}(e,t,n),n)}(e,t,n);return r=function(e,t,n,r){return void 0!==e[d]?Object.assign(e,l(t,"interoperability",n,n+e[d].value,r)):e}(r=function(e,t,n,r){return void 0!==e[f]?Object.assign(e,l(t,"gps",n,n+e[f].value,r)):e}(r=function(e,t,n,r){return void 0!==e[c]?Object.assign(e,l(t,"exif",n,n+e[c].value,r)):e}(r,e,t,n),e,t,n),e,t,n)}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(9),n(10),n(11),n(12)],void 0===(o="function"==typeof(r=function(e,t,n,r,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=f(t),a=f(n),u=f(r),c=f(i);function f(e){return e&&e.__esModule?e:{default:e}}e.default={"0th":o.default,exif:a.default,gps:u.default,interoperability:c.default}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",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",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:{name:"ResolutionUnit",description:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",318:"WhitePoint",319:"PrimaryChromaticities",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:"ReferenceBlackWhite",33432:{name:"Copyright",description:function(e){return e.join("; ")}},34665:"Exif IFD Pointer",34853:"GPS Info IFD Pointer"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(1)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.default={33434:"ExposureTime",33437:"FNumber",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":"Unknown"}},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},36864:{name:"ExifVersion",description:function(e){return(0,t.getStringValue)(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",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:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBiasValue",37381:"MaxApertureValue",37382:"SubjectDistance",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: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"}},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:"FocalLength",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: "+e[0]+", Y: "+e[1]:3===e.length?"Circle; X: "+e[0]+", Y: "+e[1]+", diameter: "+e[2]:4===e.length?"Rectangle; X: "+e[0]+", Y: "+e[1]+", width: "+e[2]+", height: "+e[3]:"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:t.getEncodedString},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",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(e,2);return"X: "+t[0]+", Y: "+t[1]}},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?"Digital zoom was not used":e}},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"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(1)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={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]+e[1]/60+e[2]/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]+e[1]/60+e[2]/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+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map((function(e){return 1===(""+e).length?"0"+e:e})).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]+e[1]/60+e[2]/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]+e[1]/60+e[2]/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:t.getEncodedString},28:{name:"GPSAreaInformation",description:t.getEncodedString},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={1:"InteroperabilityIndex"}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(3)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r=(n=t)&&n.__esModule?n:{default:n};function i(e,t,n){if(!(3>n)){var i=r.default.getByteAt(e,t+2);return{value:i,description:""+i}}}function o(e,t,n){if(!(5>n)){var i=r.default.getShortAt(e,t+3);return{value:i,description:i+"px"}}}function a(e,t,n){if(!(7>n)){var i=r.default.getShortAt(e,t+5);return{value:i,description:i+"px"}}}function u(e,t,n,i){if(!(8+3*n>i)){for(var o=[],a=0;a<n;a++){var u=t+8+3*a;o.push([r.default.getByteAt(e,u),r.default.getByteAt(e,u+1),r.default.getByteAt(e,u+2)])}return{value:o,description:o.length>1?c(o)+f(o):""}}}function c(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function f(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]]}e.default={read:function(e,t){var n=function(e,t){return r.default.getShortAt(e,t)}(e,t),c=function(e,t,n){if(!(8>n)){var i=r.default.getByteAt(e,t+7);return{value:i,description:""+i}}}(e,t,n);return{"Bits Per Sample":i(e,t,n),"Image Height":o(e,t,n),"Image Width":a(e,t,n),"Color Components":c,Subsampling:c&&u(e,t,c.value,n)}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(15),n(16)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(t),i=o(n);function o(e){return e&&e.__esModule?e:{default:e}}var a=943868237,u=4,c=u+8,f=1028,d=5;function s(e,t){if(e.getUint32(t,!1)!==a)throw new Error("Not an IPTC resource block.");return{type:e.getUint16(t+u,!1),size:e.getUint16(t+10,!1)}}function l(e){return e.type===f}function p(e){return e.size%2!=0?1:0}function g(e,t,n,i){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var o=e.getUint16(t+1,!1),a=e.getUint16(t+3,!1),u=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+d,a),c={id:o,name:v(r.default.iptc[o],o,u),value:u,description:m(r.default.iptc[o],u,n,i)};return function(e){return r.default.iptc[e]&&r.default.iptc[e].repeatable}(o)&&(c.repeatable=!0),function(e){return r.default.iptc[e]&&void 0!==r.default.iptc[e].encoding_name}(o)&&(c.encoding=r.default.iptc[o].encoding_name(u)),{tag:c,tagSize:a}}function v(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-"+t}function m(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)?i.default.decode(r,t):t}e.default={read:function(e,t){try{var n=function(e,t){for(;t+c<=e.byteLength;){var n=s(e,t);if(l(n))return{naaBlock:n,dataOffset:t};t+=c+n.size+p(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return function(e,t,n){for(var r={},i=void 0,o=(n+=c)+t.size;n<o&&n<e.byteLength;){var a=g(e,n,r,i),u=a.tag,f=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+=d+f}return r}(e,n.naaBlock,n.dataOffset)}catch(e){return{}}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(1)],void 0===(o="function"==typeof(r=function(e,t){"use strict";function n(e){var n=(0,t.getStringValue)(e);return n.length>=8?n.substr(0,4)+"-"+n.substr(4,2)+"-"+n.substr(6,2):n}function r(e){var n=(0,t.getStringValue)(e),r=n;return n.length>=6&&(r=n.substr(0,2)+":"+n.substr(2,2)+":"+n.substr(4,2),11===n.length&&(r+=n.substr(6,1)+n.substr(7,2)+":"+n.substr(9,2))),r}function i(e){var n=(0,t.getStringValue)(e);return"%G"===n?"UTF-8":"%5"===n?"Windows-1252":"%/G"===n?"UTF-8 Level 1":"%/H"===n?"UTF-8 Level 2":"%/I"===n?"UTF-8 Level 3":"/A"===n?"ISO-8859-1":"/B"===n?"ISO-8859-2":"/C"===n?"ISO-8859-3":"/D"===n?"ISO-8859-4":"/@"===n?"ISO-8859-5":"/G"===n?"ISO-8859-6":"/F"===n?"ISO-8859-7":"/H"===n?"ISO-8859-8":"Unknown"}Object.defineProperty(e,"__esModule",{value:!0}),e.default={iptc:{256:{name:"Model Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:function(e){return((e[0]<<8)+e[1]).toString()}},278:{name:"File Format Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:n},336:{name:"Time Sent",description:r},346:{name:"Coded Character Set",description:i,encoding_name:i},356:"UNO",376:{name:"ARM Identifier",description:function(e){return((e[0]<<8)+e[1]).toString()}},378:{name:"ARM Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},512:{name:"Record Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===(0,t.getStringValue)(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:function(e){var n=(0,t.getStringValue)(e).split(":");return n[2]+(n[3]?"/"+n[3]:"")+(n[4]?"/"+n[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var n=(0,t.getStringValue)(e);return"01"===n?"Object Kill":"02"===n?"Object Replace":"03"===n?"Object Append":"04"===n?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:n},572:{name:"Time Created",description:r},574:{name:"Digital Creation Date",description:n},575:{name:"Digital Creation Time",description:r},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var n=(0,t.getStringValue)(e);return"a"===n?"morning":"p"===n?"evening":"b"===n?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},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:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var n=(0,t.getStringValue)(e);return"P"===n?"Portrait":"L"===n?"Landscape":"S"===n?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var n=(0,t.getStringValue)(e),r=n.charAt(0),i=n.charAt(1),o="";return"1"===r?o+="Mono":"2"===r&&(o+="Stereo"),"A"===i?o+=", actuality":"C"===i?o+=", question and answer session":"M"===i?o+=", music, transmitted by itself":"Q"===i?o+=", response to a question":"R"===i?o+=", raw sound":"S"===i?o+=", scener":"V"===i?o+=", voicer":"W"===i&&(o+=", wrap"),""!==o?o:n}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt((0,t.getStringValue)(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var n=parseInt((0,t.getStringValue)(e),10);return n+(1===n?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var n=(0,t.getStringValue)(e);return n.length>=6?n.substr(0,2)+":"+n.substr(2,2)+":"+n.substr(4,2):n}},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 n=(e[0]<<8)+e[1];return 0===n?"No ObjectData":1===n?"IPTC-NAA Digital Newsphoto Parameter Record":2===n?"IPTC7901 Recommended Message Format":3===n?"Tagged Image File Format (Adobe/Aldus Image data)":4===n?"Illustrator (Adobe Graphics data)":5===n?"AppleSingle (Apple Computer Inc)":6===n?"NAA 89-3 (ANPA 1312)":7===n?"MacBinary II":8===n?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===n?"United Press International ANPA 1312 variant":10===n?"United Press International Down-Load Message":11===n?"JPEG File Interchange (JFIF)":12===n?"Photo-CD Image-Pac (Eastman Kodak)":13===n?"Microsoft Bit Mapped Graphics File [*.BMP]":14===n?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===n?"Audio plus Moving Video [*.AVI] (Microsoft)":16===n?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===n?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===n?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===n?"RIFF Wave (Microsoft Corporation)":20===n?"Freehand (Macromedia/Aldus)":21===n?'Hypertext Markup Language "HTML" (The Internet Society)':22===n?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===n?"MPEG 2 Audio Layer 3, ISO/IEC":24===n?"Portable Document File (*.PDF) Adobe":25===n?"News Industry Text Format (NITF)":26===n?"Tape Archive (*.TAR)":27===n?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===n?"Ritzaus Bureau NITF version (RBNITF DTD)":29===n?"Corel Draw [*.CDR]":"Unknown format "+n}return(0,t.getStringValue)(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,n){var r={"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"}},i=(0,t.getStringValue)(e);if(n["ObjectData Preview File Format"]){var o=(0,t.getStringValue)(n["ObjectData Preview File Format"].value);if(r[o]&&r[o][i])return r[o][i]}return i}},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()}}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(17)],void 0===(o="function"==typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r=(n=t)&&n.__esModule?n:{default:n};e.default={decode:function(e,t){var n=r.default.get();if(void 0!==n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((function(e){return String.fromCharCode(e)})).join(""))},TAG_HEADER_SIZE:5}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(0),n(19),n(20)],void 0===(o="function"==typeof(r=function(e,t,n,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n),o=a(r);function a(e){return e&&e.__esModule?e:{default:e}}var 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};function c(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(t=r).length&&"#text"===t[0].nodeName?n?{}:function(e){return e.nodeValue}(r[0]):function(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:f(e),value:c(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}(r)}function f(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 d(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){Object.assign(t,s(e.attributes)),"object"===u(e.value)&&Object.assign(t,y(e.value))}))}return t}function s(e){var t={};for(var n in e)l(n)&&(t[g(n)]={value:e[n],attributes:{},description:v(e[n],n)});return t}function l(e){return"rdf:parseType"!==e&&!p(e)}function p(e){return"xmlns"===e.split(":")[0]}function g(e){return e.split(":")[1]}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e))return function(e){return e.map((function(e){return void 0!==e.value?v(e.value):v(e)})).join(", ")}(e);if("object"===(void 0===e?"undefined":u(e)))return function(e){var t=[];for(var n in e)t.push(m(n)+": "+e[n].value);return t.join("; ")}(e);try{return t&&"function"==typeof i.default[t]?i.default[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function m(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 y(e){var t={};for(var n in e)p(n)||(t[g(n)]=h(e[n],n));return t}function h(e,t){return S(e)?b(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"]&&(Object.assign(n.value,s(e.value["rdf:Description"].attributes)),Object.assign(n.attributes,C(e)),e=e.value["rdf:Description"]),Object.assign(n.value,y(e.value)),n.description=v(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=s(e.attributes);return{value:n,attributes:{},description:v(n,t)}}(e,t):function(e){return void 0!==A(e.value)}(e)?function(e,t){var n=A(e.value).value["rdf:li"],r=C(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return S(e)?b(e):"Resource"===e.attributes["rdf:parseType"]?y(e.value):{value:e.value,attributes:C(e),description:v(e.value)}}(e))})),{value:i,attributes:r,description:v(i,t)}}(e,t):function(e,t){var n=D(e)||d(e.value);return{value:n,attributes:C(e),description:v(n,t)}}(e,t)}function S(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 b(e,t){var n=C(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),Object.assign(n,C(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||p(n)||(t[g(n)]=e.value[n].value);return t}(e));var r=function(e){return D(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:v(r,t)}}function C(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||p(n)||(t[g(n)]=e.attributes[n]);return t}function A(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function D(e){return e.attributes&&e.attributes["rdf:resource"]}e.default={read:function(e,n,r){try{return d(c(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 new Error}(function(e,n,r){var i=o.default.get();if(!i)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;var a=new i,u=(0,t.getStringFromDataView)(e,n,r),c=a.parseFromString(u,"application/xml");if("parsererror"===c.documentElement.nodeName)throw new Error(c.documentElement.textContent);return c}(e,n,r)),!0))}catch(e){return{}}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function n(e){var n=e.split(","),r=t(n,2),i=r[0],o=r[1];if(void 0!==i&&void 0!==o){var a=parseFloat(i),u=parseFloat(o),c=o.charAt(o.length-1);if(!Number.isNaN(a)&&!Number.isNaN(u))return""+(a+u/60)+c}return e}e.default={"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":n,"exif:GPSLongitude":n}})?r.apply(t,i):r)||(e.exports=o)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;factory=function(exports){"use strict";function get(){if("undefined"!=typeof DOMParser)return DOMParser;try{return eval("require")("xmldom").DOMParser}catch(e){return}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={get:get}},__WEBPACK_AMD_DEFINE_ARRAY__=[exports],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(e,t,n){var r,i,o;i=[t,n(22),n(0)],void 0===(o="function"==typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseTags=l,e.default={read:function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=e.buffer,a=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw new Error("ICC chunk "+e+" not found");var a=o.slice(n.offset,n.offset+n.length),u=new Uint8Array(a);r.set(u,i),i+=u.length},u=1;u<=t.length;u++)a(u);return l(new DataView(r.buffer))}catch(e){return{}}}};var r=84,i=128,o="acsp",a="desc",u="mluc",c="text",f="sig ",d=12;function s(e,t){return e.length<t+d}function l(e){var d=e.buffer,l=e.getUint32();if(e.byteLength!==l)throw new Error("ICC profile length not matching");if(e.length<r)throw new Error("ICC profile too short");var v={},m=!0,y=!1,h=void 0;try{for(var S,b=Object.keys(t.iccProfile)[Symbol.iterator]();!(m=(S=b.next()).done);m=!0){var C=S.value,A=t.iccProfile[C],D=A.value(e,parseInt(C,10)),w=D;A.description&&(w=A.description(D)),v[A.name]={value:D,description:w}}}catch(e){y=!0,h=e}finally{try{!m&&b.return&&b.return()}finally{if(y)throw h}}if(p(d.slice(36,40))!==o)throw new Error("ICC profile: missing signature");if(function(e){return e.length<i+4}(d))return v;for(var I=e.getUint32(128),P=132,_=0;_<I;_++){if(s(d,P))return v;var U=(0,n.getStringFromDataView)(e,P,4),F=e.getUint32(P+4),O=e.getUint32(P+8);if(F>d.length)return v;var E=(0,n.getStringFromDataView)(e,F,4);if(E===a){var M=e.getUint32(F+8);if(M>O)return v;g(v,U,p(d.slice(F+12,F+M+11)))}else if(E===u){for(var x=e.getUint32(F+8),T=e.getUint32(F+12),j=F+16,N=[],R=0;R<x;R++){var k=(0,n.getStringFromDataView)(e,j+0,2),L=(0,n.getStringFromDataView)(e,j+2,2),V=e.getUint32(j+4),G=e.getUint32(j+8),B=(0,n.getUnicodeStringFromDataView)(e,F+G,V);N.push({languageCode:k,countryCode:L,text:B}),j+=T}if(1===x)g(v,U,N[0].text);else{for(var W={},z=0;z<N.length;z++)W[N[z].languageCode+"-"+N[z].countryCode]=N[z].text;g(v,U,W)}}else E===c?g(v,U,p(d.slice(F+8,F+O-7))):E===f&&g(v,U,p(d.slice(F+8,F+12)));P+=12}return v}function p(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function g(e,n,r){t.iccTags[n]?e[t.iccTags[n].name]={value:r,description:r}:e[n]={value:r,description:r}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t,n(0)],void 0===(o="function"==typeof(r=function(e,t){"use strict";function n(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}Object.defineProperty(e,"__esModule",{value:!0}),e.iccProfile=e.iccTags=void 0,e.iccTags={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"}},e.iccProfile={4:{name:"Preferred CMM type",value:function(e,n){return(0,t.getStringFromDataView)(e,n,4)},description:function(e){return null!==e?n(e):""}},8:{name:"Profile Version",value:function(e,t){return e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(e,n){return(0,t.getStringFromDataView)(e,n,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,n){return(0,t.getStringFromDataView)(e,n,4)}},20:{name:"Connection Space",value:function(e,n){return(0,t.getStringFromDataView)(e,n,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,n){return(0,t.getStringFromDataView)(e,n,4)},description:function(e){return n(e)}},48:{name:"Device Manufacturer",value:function(e,n){return(0,t.getStringFromDataView)(e,n,4)},description:function(e){return n(e)}},52:{name:"Device Model Number",value:function(e,n){return(0,t.getStringFromDataView)(e,n,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,n){return(0,t.getStringFromDataView)(e,n,4)}}}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){var r,i,o;i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";function t(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}Object.defineProperty(e,"__esModule",{value:!0}),t.prototype=new Error,e.default={MetadataMissingError:t}})?r.apply(t,i):r)||(e.exports=o)}])}));
//# sourceMappingURL=exif-reader.js.map

@@ -18,2 +18,7 @@ /// <reference types="node" />

interface ValueTag {
description: string,
value: String
}
interface StringArrayTag {

@@ -40,11 +45,12 @@ id: number,

iptc?: Tags,
xmp?: XmpTags
xmp?: XmpTags,
icc?: IccTags
}
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer): Tags & XmpTags;
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer): Tags & XmpTags & IccTags;
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded: true}): ExpandedTags;
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded?: false}): Tags & XmpTags;
export function loadView(data: DataView): Tags & XmpTags;
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded?: false}): Tags & XmpTags & IccTags;
export function loadView(data: DataView): Tags & XmpTags & IccTags;
export function loadView(data: DataView, options: {expanded: true}): ExpandedTags;
export function loadView(data: DataView, options: {expanded?: false}): Tags & XmpTags;
export function loadView(data: DataView, options: {expanded?: false}): Tags & XmpTags & IccTags;

@@ -269,1 +275,5 @@ export namespace errors {

}
interface IccTags {
[name: string]: ValueTag;
}
{
"name": "exifreader",
"version": "2.9.0",
"version": "2.10.0",
"description": "Library that parses Exif metadata in images.",

@@ -5,0 +5,0 @@ "author": "Mattias Wallander <mattias@wallander.eu>",

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

import XmpTags from './xmp-tags';
import IccTags from './icc-tags';
import exifErrors from './errors';

@@ -43,3 +44,3 @@

const {fileDataOffset, tiffHeaderOffset, iptcDataOffset, xmpDataOffset, xmpFieldLength} = ImageHeader.parseAppMarkers(dataView);
const {fileDataOffset, tiffHeaderOffset, iptcDataOffset, xmpDataOffset, xmpFieldLength, iccChunks} = ImageHeader.parseAppMarkers(dataView);

@@ -82,2 +83,11 @@ if (hasFileData(fileDataOffset)) {

}
if (hasIccData(iccChunks)) {
foundMetaData = true;
const readTags = IccTags.read(dataView, iccChunks);
if (options.expanded) {
tags.icc = readTags;
} else {
tags = Object.assign({}, tags, readTags);
}
}
if (!foundMetaData) {

@@ -105,1 +115,5 @@ throw new exifErrors.MetadataMissingError();

}
function hasIccData(iccDataOffsets) {
return Array.isArray(iccDataOffsets) && iccDataOffsets.length > 0;
}

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

const XMP_DATA_OFFSET = 33; // From start of APP1 marker.
const APP2_ICC_DATA_OFFSET = 18; // From start of APP2 marker including marker and chunk/chunk total numbers
const APP2_ICC_IDENTIFIER = 'ICC_PROFILE\0';
const ICC_CHUNK_NUMBER_OFFSET = APP_ID_OFFSET + APP2_ICC_IDENTIFIER.length;
const ICC_TOTAL_CHUNKS_OFFSET = ICC_CHUNK_NUMBER_OFFSET + 1;
const SOF0_MARKER = 0xffc0;

@@ -31,5 +36,7 @@ const SOF2_MARKER = 0xffc2;

const APP1_MARKER = 0xffe1;
const APP2_MARKER = 0xffe2;
const APP13_MARKER = 0xffed;
const APP15_MARKER = 0xffef;
const COMMENT_MARKER = 0xfffe;
const APP1_EXIF_IDENTIFIER = 'Exif';

@@ -52,2 +59,3 @@ const APP1_XMP_IDENTIFIER = 'http://ns.adobe.com/xap/1.0/';

let xmpFieldLength;
let iccChunks;

@@ -80,2 +88,13 @@ if (isTiffFile(dataView)) {

iptcDataOffset = appMarkerPosition + IPTC_DATA_OFFSET;
} else if (isApp2ICCMarker(dataView, appMarkerPosition)) {
fieldLength = dataView.getUint16(appMarkerPosition + APP_MARKER_SIZE, false);
const iccDataOffset = appMarkerPosition + APP2_ICC_DATA_OFFSET;
const iccDataLength = fieldLength - (APP2_ICC_DATA_OFFSET - APP_MARKER_SIZE);
const iccChunkNumber = dataView.getUint8(appMarkerPosition + ICC_CHUNK_NUMBER_OFFSET, false);
const iccChunksTotal = dataView.getUint8(appMarkerPosition + ICC_TOTAL_CHUNKS_OFFSET, false);
if (!iccChunks) {
iccChunks = [];
}
iccChunks.push({offset: iccDataOffset, length: iccDataLength, chunkNumber: iccChunkNumber, chunksTotal: iccChunksTotal});
} else if (isAppMarker(dataView, appMarkerPosition)) {

@@ -95,3 +114,4 @@ fieldLength = dataView.getUint16(appMarkerPosition + APP_MARKER_SIZE, false);

xmpDataOffset,
xmpFieldLength
xmpFieldLength,
iccChunks
};

@@ -121,2 +141,9 @@ }

function isApp2ICCMarker(dataView, appMarkerPosition) {
const markerIdLength = APP2_ICC_IDENTIFIER.length;
return (dataView.getUint16(appMarkerPosition, false) === APP2_MARKER)
&& (getStringFromDataView(dataView, appMarkerPosition + APP_ID_OFFSET, markerIdLength) === APP2_ICC_IDENTIFIER);
}
function isApp1ExifMarker(dataView, appMarkerPosition) {

@@ -123,0 +150,0 @@ const markerIdLength = APP1_EXIF_IDENTIFIER.length;

@@ -10,7 +10,15 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

}
return getAsciiValue(chars).join('');
return getStringValueFromArray(chars).join('');
}
function getAsciiValue(charArray) {
export function getUnicodeStringFromDataView(dataView, offset, length) {
const chars = [];
for (let i = 0; i < length && offset + i < dataView.byteLength; i += 2) {
chars.push(dataView.getUint16(offset + i));
}
return getStringValueFromArray(chars).join('');
}
function getStringValueFromArray(charArray) {
return charArray.map((charCode) => String.fromCharCode(charCode));
}

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