{"version":3,"file":"piexif.js","sources":["../src/constants.ts","../src/exceptions.ts","../src/utils.ts","../src/helper.ts","../src/index.ts"],"sourcesContent":["interface ITypes {\n [key: string]:number\n}\n\nexport const Types:ITypes = {\n Byte: 1,\n Ascii: 2,\n Short: 3,\n Long: 4,\n Rational: 5,\n Undefined: 7,\n SLong: 9,\n SRational: 10\n};\n\ninterface ITypeNums {\n [key: number]:string\n}\n\nexport const TypeNums:ITypeNums = {\n 1: 'Byte',\n 2: 'Ascii',\n 3: 'Short',\n 4: 'Long',\n 5: 'Rational',\n 7: 'Undefined',\n 9: 'SLong',\n 10: 'SRational'\n};\n\n\nexport const Tags: any = {\n 'Image': {\n 11: {\n 'name': 'ProcessingSoftware',\n 'type': Types.Ascii\n },\n 254: {\n 'name': 'NewSubfileType',\n 'type': Types.Long\n },\n 255: {\n 'name': 'SubfileType',\n 'type': Types.Short\n },\n 256: {\n 'name': 'ImageWidth',\n 'type': Types.Long\n },\n 257: {\n 'name': 'ImageLength',\n 'type': Types.Long\n },\n 258: {\n 'name': 'BitsPerSample',\n 'type': Types.Short\n },\n 259: {\n 'name': 'Compression',\n 'type': Types.Short\n },\n 262: {\n 'name': 'PhotometricInterpretation',\n 'type': Types.Short\n },\n 263: {\n 'name': 'Threshholding',\n 'type': Types.Short\n },\n 264: {\n 'name': 'CellWidth',\n 'type': Types.Short\n },\n 265: {\n 'name': 'CellLength',\n 'type': Types.Short\n },\n 266: {\n 'name': 'FillOrder',\n 'type': Types.Short\n },\n 269: {\n 'name': 'DocumentName',\n 'type': Types.Ascii\n },\n 270: {\n 'name': 'ImageDescription',\n 'type': Types.Ascii\n },\n 271: {\n 'name': 'Make',\n 'type': Types.Ascii\n },\n 272: {\n 'name': 'Model',\n 'type': Types.Ascii\n },\n 273: {\n 'name': 'StripOffsets',\n 'type': Types.Long\n },\n 274: {\n 'name': 'Orientation',\n 'type': Types.Short\n },\n 277: {\n 'name': 'SamplesPerPixel',\n 'type': Types.Short\n },\n 278: {\n 'name': 'RowsPerStrip',\n 'type': Types.Long\n },\n 279: {\n 'name': 'StripByteCounts',\n 'type': Types.Long\n },\n 282: {\n 'name': 'XResolution',\n 'type': Types.Rational\n },\n 283: {\n 'name': 'YResolution',\n 'type': Types.Rational\n },\n 284: {\n 'name': 'PlanarConfiguration',\n 'type': Types.Short\n },\n 290: {\n 'name': 'GrayResponseUnit',\n 'type': Types.Short\n },\n 291: {\n 'name': 'GrayResponseCurve',\n 'type': Types.Short\n },\n 292: {\n 'name': 'T4Options',\n 'type': Types.Long\n },\n 293: {\n 'name': 'T6Options',\n 'type': Types.Long\n },\n 296: {\n 'name': 'ResolutionUnit',\n 'type': Types.Short\n },\n 301: {\n 'name': 'TransferFunction',\n 'type': Types.Short\n },\n 305: {\n 'name': 'Software',\n 'type': Types.Ascii\n },\n 306: {\n 'name': 'DateTime',\n 'type': Types.Ascii\n },\n 315: {\n 'name': 'Artist',\n 'type': Types.Ascii\n },\n 316: {\n 'name': 'HostComputer',\n 'type': Types.Ascii\n },\n 317: {\n 'name': 'Predictor',\n 'type': Types.Short\n },\n 318: {\n 'name': 'WhitePoint',\n 'type': Types.Rational\n },\n 319: {\n 'name': 'PrimaryChromaticities',\n 'type': Types.Rational\n },\n 320: {\n 'name': 'ColorMap',\n 'type': Types.Short\n },\n 321: {\n 'name': 'HalftoneHints',\n 'type': Types.Short\n },\n 322: {\n 'name': 'TileWidth',\n 'type': Types.Short\n },\n 323: {\n 'name': 'TileLength',\n 'type': Types.Short\n },\n 324: {\n 'name': 'TileOffsets',\n 'type': Types.Short\n },\n 325: {\n 'name': 'TileByteCounts',\n 'type': Types.Short\n },\n 330: {\n 'name': 'SubIFDs',\n 'type': Types.Long\n },\n 332: {\n 'name': 'InkSet',\n 'type': Types.Short\n },\n 333: {\n 'name': 'InkNames',\n 'type': Types.Ascii\n },\n 334: {\n 'name': 'NumberOfInks',\n 'type': Types.Short\n },\n 336: {\n 'name': 'DotRange',\n 'type': Types.Byte\n },\n 337: {\n 'name': 'TargetPrinter',\n 'type': Types.Ascii\n },\n 338: {\n 'name': 'ExtraSamples',\n 'type': Types.Short\n },\n 339: {\n 'name': 'SampleFormat',\n 'type': Types.Short\n },\n 340: {\n 'name': 'SMinSampleValue',\n 'type': Types.Short\n },\n 341: {\n 'name': 'SMaxSampleValue',\n 'type': Types.Short\n },\n 342: {\n 'name': 'TransferRange',\n 'type': Types.Short\n },\n 343: {\n 'name': 'ClipPath',\n 'type': Types.Byte\n },\n 344: {\n 'name': 'XClipPathUnits',\n 'type': Types.Long\n },\n 345: {\n 'name': 'YClipPathUnits',\n 'type': Types.Long\n },\n 346: {\n 'name': 'Indexed',\n 'type': Types.Short\n },\n 347: {\n 'name': 'JPEGTables',\n 'type': Types.Undefined\n },\n 351: {\n 'name': 'OPIProxy',\n 'type': Types.Short\n },\n 512: {\n 'name': 'JPEGProc',\n 'type': Types.Long\n },\n 513: {\n 'name': 'JPEGInterchangeFormat',\n 'type': Types.Long\n },\n 514: {\n 'name': 'JPEGInterchangeFormatLength',\n 'type': Types.Long\n },\n 515: {\n 'name': 'JPEGRestartInterval',\n 'type': Types.Short\n },\n 517: {\n 'name': 'JPEGLosslessPredictors',\n 'type': Types.Short\n },\n 518: {\n 'name': 'JPEGPointTransforms',\n 'type': Types.Short\n },\n 519: {\n 'name': 'JPEGQTables',\n 'type': Types.Long\n },\n 520: {\n 'name': 'JPEGDCTables',\n 'type': Types.Long\n },\n 521: {\n 'name': 'JPEGACTables',\n 'type': Types.Long\n },\n 529: {\n 'name': 'YCbCrCoefficients',\n 'type': Types.Rational\n },\n 530: {\n 'name': 'YCbCrSubSampling',\n 'type': Types.Short\n },\n 531: {\n 'name': 'YCbCrPositioning',\n 'type': Types.Short\n },\n 532: {\n 'name': 'ReferenceBlackWhite',\n 'type': Types.Rational\n },\n 700: {\n 'name': 'XMLPacket',\n 'type': Types.Byte\n },\n 18246: {\n 'name': 'Rating',\n 'type': Types.Short\n },\n 18249: {\n 'name': 'RatingPercent',\n 'type': Types.Short\n },\n 32781: {\n 'name': 'ImageID',\n 'type': Types.Ascii\n },\n 33421: {\n 'name': 'CFARepeatPatternDim',\n 'type': Types.Short\n },\n 33422: {\n 'name': 'CFAPattern',\n 'type': Types.Byte\n },\n 33423: {\n 'name': 'BatteryLevel',\n 'type': Types.Rational\n },\n 33432: {\n 'name': 'Copyright',\n 'type': Types.Ascii\n },\n 33434: {\n 'name': 'ExposureTime',\n 'type': Types.Rational\n },\n 34377: {\n 'name': 'ImageResources',\n 'type': Types.Byte\n },\n 34665: {\n 'name': 'ExifTag',\n 'type': Types.Long\n },\n 34675: {\n 'name': 'InterColorProfile',\n 'type': Types.Undefined\n },\n 34853: {\n 'name': 'GPSTag',\n 'type': Types.Long\n },\n 34857: {\n 'name': 'Interlace',\n 'type': Types.Short\n },\n 34858: {\n 'name': 'TimeZoneOffset',\n 'type': Types.Long\n },\n 34859: {\n 'name': 'SelfTimerMode',\n 'type': Types.Short\n },\n 37387: {\n 'name': 'FlashEnergy',\n 'type': Types.Rational\n },\n 37388: {\n 'name': 'SpatialFrequencyResponse',\n 'type': Types.Undefined\n },\n 37389: {\n 'name': 'Noise',\n 'type': Types.Undefined\n },\n 37390: {\n 'name': 'FocalPlaneXResolution',\n 'type': Types.Rational\n },\n 37391: {\n 'name': 'FocalPlaneYResolution',\n 'type': Types.Rational\n },\n 37392: {\n 'name': 'FocalPlaneResolutionUnit',\n 'type': Types.Short\n },\n 37393: {\n 'name': 'ImageNumber',\n 'type': Types.Long\n },\n 37394: {\n 'name': 'SecurityClassification',\n 'type': Types.Ascii\n },\n 37395: {\n 'name': 'ImageHistory',\n 'type': Types.Ascii\n },\n 37397: {\n 'name': 'ExposureIndex',\n 'type': Types.Rational\n },\n 37398: {\n 'name': 'TIFFEPStandardID',\n 'type': Types.Byte\n },\n 37399: {\n 'name': 'SensingMethod',\n 'type': Types.Short\n },\n 40091: {\n 'name': 'XPTitle',\n 'type': Types.Byte\n },\n 40092: {\n 'name': 'XPComment',\n 'type': Types.Byte\n },\n 40093: {\n 'name': 'XPAuthor',\n 'type': Types.Byte\n },\n 40094: {\n 'name': 'XPKeywords',\n 'type': Types.Byte\n },\n 40095: {\n 'name': 'XPSubject',\n 'type': Types.Byte\n },\n 50341: {\n 'name': 'PrintImageMatching',\n 'type': Types.Undefined\n },\n 50706: {\n 'name': 'DNGVersion',\n 'type': Types.Byte\n },\n 50707: {\n 'name': 'DNGBackwardVersion',\n 'type': Types.Byte\n },\n 50708: {\n 'name': 'UniqueCameraModel',\n 'type': Types.Ascii\n },\n 50709: {\n 'name': 'LocalizedCameraModel',\n 'type': Types.Byte\n },\n 50710: {\n 'name': 'CFAPlaneColor',\n 'type': Types.Byte\n },\n 50711: {\n 'name': 'CFALayout',\n 'type': Types.Short\n },\n 50712: {\n 'name': 'LinearizationTable',\n 'type': Types.Short\n },\n 50713: {\n 'name': 'BlackLevelRepeatDim',\n 'type': Types.Short\n },\n 50714: {\n 'name': 'BlackLevel',\n 'type': Types.Rational\n },\n 50715: {\n 'name': 'BlackLevelDeltaH',\n 'type': Types.SRational\n },\n 50716: {\n 'name': 'BlackLevelDeltaV',\n 'type': Types.SRational\n },\n 50717: {\n 'name': 'WhiteLevel',\n 'type': Types.Short\n },\n 50718: {\n 'name': 'DefaultScale',\n 'type': Types.Rational\n },\n 50719: {\n 'name': 'DefaultCropOrigin',\n 'type': Types.Short\n },\n 50720: {\n 'name': 'DefaultCropSize',\n 'type': Types.Short\n },\n 50721: {\n 'name': 'ColorMatrix1',\n 'type': Types.SRational\n },\n 50722: {\n 'name': 'ColorMatrix2',\n 'type': Types.SRational\n },\n 50723: {\n 'name': 'CameraCalibration1',\n 'type': Types.SRational\n },\n 50724: {\n 'name': 'CameraCalibration2',\n 'type': Types.SRational\n },\n 50725: {\n 'name': 'ReductionMatrix1',\n 'type': Types.SRational\n },\n 50726: {\n 'name': 'ReductionMatrix2',\n 'type': Types.SRational\n },\n 50727: {\n 'name': 'AnalogBalance',\n 'type': Types.Rational\n },\n 50728: {\n 'name': 'AsShotNeutral',\n 'type': Types.Short\n },\n 50729: {\n 'name': 'AsShotWhiteXY',\n 'type': Types.Rational\n },\n 50730: {\n 'name': 'BaselineExposure',\n 'type': Types.SRational\n },\n 50731: {\n 'name': 'BaselineNoise',\n 'type': Types.Rational\n },\n 50732: {\n 'name': 'BaselineSharpness',\n 'type': Types.Rational\n },\n 50733: {\n 'name': 'BayerGreenSplit',\n 'type': Types.Long\n },\n 50734: {\n 'name': 'LinearResponseLimit',\n 'type': Types.Rational\n },\n 50735: {\n 'name': 'CameraSerialNumber',\n 'type': Types.Ascii\n },\n 50736: {\n 'name': 'LensInfo',\n 'type': Types.Rational\n },\n 50737: {\n 'name': 'ChromaBlurRadius',\n 'type': Types.Rational\n },\n 50738: {\n 'name': 'AntiAliasStrength',\n 'type': Types.Rational\n },\n 50739: {\n 'name': 'ShadowScale',\n 'type': Types.SRational\n },\n 50740: {\n 'name': 'DNGPrivateData',\n 'type': Types.Byte\n },\n 50741: {\n 'name': 'MakerNoteSafety',\n 'type': Types.Short\n },\n 50778: {\n 'name': 'CalibrationIlluminant1',\n 'type': Types.Short\n },\n 50779: {\n 'name': 'CalibrationIlluminant2',\n 'type': Types.Short\n },\n 50780: {\n 'name': 'BestQualityScale',\n 'type': Types.Rational\n },\n 50781: {\n 'name': 'RawDataUniqueID',\n 'type': Types.Byte\n },\n 50827: {\n 'name': 'OriginalRawFileName',\n 'type': Types.Byte\n },\n 50828: {\n 'name': 'OriginalRawFileData',\n 'type': Types.Undefined\n },\n 50829: {\n 'name': 'ActiveArea',\n 'type': Types.Short\n },\n 50830: {\n 'name': 'MaskedAreas',\n 'type': Types.Short\n },\n 50831: {\n 'name': 'AsShotICCProfile',\n 'type': Types.Undefined\n },\n 50832: {\n 'name': 'AsShotPreProfileMatrix',\n 'type': Types.SRational\n },\n 50833: {\n 'name': 'CurrentICCProfile',\n 'type': Types.Undefined\n },\n 50834: {\n 'name': 'CurrentPreProfileMatrix',\n 'type': Types.SRational\n },\n 50879: {\n 'name': 'ColorimetricReference',\n 'type': Types.Short\n },\n 50931: {\n 'name': 'CameraCalibrationSignature',\n 'type': Types.Byte\n },\n 50932: {\n 'name': 'ProfileCalibrationSignature',\n 'type': Types.Byte\n },\n 50934: {\n 'name': 'AsShotProfileName',\n 'type': Types.Byte\n },\n 50935: {\n 'name': 'NoiseReductionApplied',\n 'type': Types.Rational\n },\n 50936: {\n 'name': 'ProfileName',\n 'type': Types.Byte\n },\n 50937: {\n 'name': 'ProfileHueSatMapDims',\n 'type': Types.Long\n },\n 50941: {\n 'name': 'ProfileEmbedPolicy',\n 'type': Types.Long\n },\n 50942: {\n 'name': 'ProfileCopyright',\n 'type': Types.Byte\n },\n 50964: {\n 'name': 'ForwardMatrix1',\n 'type': Types.SRational\n },\n 50965: {\n 'name': 'ForwardMatrix2',\n 'type': Types.SRational\n },\n 50966: {\n 'name': 'PreviewApplicationName',\n 'type': Types.Byte\n },\n 50967: {\n 'name': 'PreviewApplicationVersion',\n 'type': Types.Byte\n },\n 50968: {\n 'name': 'PreviewSettingsName',\n 'type': Types.Byte\n },\n 50969: {\n 'name': 'PreviewSettingsDigest',\n 'type': Types.Byte\n },\n 50970: {\n 'name': 'PreviewColorSpace',\n 'type': Types.Long\n },\n 50971: {\n 'name': 'PreviewDateTime',\n 'type': Types.Ascii\n },\n 50972: {\n 'name': 'RawImageDigest',\n 'type': Types.Undefined\n },\n 50973: {\n 'name': 'OriginalRawFileDigest',\n 'type': Types.Undefined\n },\n 50974: {\n 'name': 'SubTileBlockSize',\n 'type': Types.Long\n },\n 50975: {\n 'name': 'RowInterleaveFactor',\n 'type': Types.Long\n },\n 50981: {\n 'name': 'ProfileLookTableDims',\n 'type': Types.Long\n },\n 51008: {\n 'name': 'OpcodeList1',\n 'type': Types.Undefined\n },\n 51009: {\n 'name': 'OpcodeList2',\n 'type': Types.Undefined\n },\n 51022: {\n 'name': 'OpcodeList3',\n 'type': Types.Undefined\n }\n },\n 'Exif': {\n 33434: {\n 'name': 'ExposureTime',\n 'type': Types.Rational\n },\n 33437: {\n 'name': 'FNumber',\n 'type': Types.Rational\n },\n 34850: {\n 'name': 'ExposureProgram',\n 'type': Types.Short\n },\n 34852: {\n 'name': 'SpectralSensitivity',\n 'type': Types.Ascii\n },\n 34855: {\n 'name': 'ISOSpeedRatings',\n 'type': Types.Short\n },\n 34856: {\n 'name': 'OECF',\n 'type': Types.Undefined\n },\n 34864: {\n 'name': 'SensitivityType',\n 'type': Types.Short\n },\n 34865: {\n 'name': 'StandardOutputSensitivity',\n 'type': Types.Long\n },\n 34866: {\n 'name': 'RecommendedExposureIndex',\n 'type': Types.Long\n },\n 34867: {\n 'name': 'ISOSpeed',\n 'type': Types.Long\n },\n 34868: {\n 'name': 'ISOSpeedLatitudeyyy',\n 'type': Types.Long\n },\n 34869: {\n 'name': 'ISOSpeedLatitudezzz',\n 'type': Types.Long\n },\n 36864: {\n 'name': 'ExifVersion',\n 'type': Types.Undefined\n },\n 36867: {\n 'name': 'DateTimeOriginal',\n 'type': Types.Ascii\n },\n 36868: {\n 'name': 'DateTimeDigitized',\n 'type': Types.Ascii\n },\n 37121: {\n 'name': 'ComponentsConfiguration',\n 'type': Types.Undefined\n },\n 37122: {\n 'name': 'CompressedBitsPerPixel',\n 'type': Types.Rational\n },\n 37377: {\n 'name': 'ShutterSpeedValue',\n 'type': Types.SRational\n },\n 37378: {\n 'name': 'ApertureValue',\n 'type': Types.Rational\n },\n 37379: {\n 'name': 'BrightnessValue',\n 'type': Types.SRational\n },\n 37380: {\n 'name': 'ExposureBiasValue',\n 'type': Types.SRational\n },\n 37381: {\n 'name': 'MaxApertureValue',\n 'type': Types.Rational\n },\n 37382: {\n 'name': 'SubjectDistance',\n 'type': Types.Rational\n },\n 37383: {\n 'name': 'MeteringMode',\n 'type': Types.Short\n },\n 37384: {\n 'name': 'LightSource',\n 'type': Types.Short\n },\n 37385: {\n 'name': 'Flash',\n 'type': Types.Short\n },\n 37386: {\n 'name': 'FocalLength',\n 'type': Types.Rational\n },\n 37396: {\n 'name': 'SubjectArea',\n 'type': Types.Short\n },\n 37500: {\n 'name': 'MakerNote',\n 'type': Types.Undefined\n },\n 37510: {\n 'name': 'UserComment',\n 'type': Types.Ascii\n },\n 37520: {\n 'name': 'SubSecTime',\n 'type': Types.Ascii\n },\n 37521: {\n 'name': 'SubSecTimeOriginal',\n 'type': Types.Ascii\n },\n 37522: {\n 'name': 'SubSecTimeDigitized',\n 'type': Types.Ascii\n },\n 40960: {\n 'name': 'FlashpixVersion',\n 'type': Types.Undefined\n },\n 40961: {\n 'name': 'ColorSpace',\n 'type': Types.Short\n },\n 40962: {\n 'name': 'PixelXDimension',\n 'type': Types.Long\n },\n 40963: {\n 'name': 'PixelYDimension',\n 'type': Types.Long\n },\n 40964: {\n 'name': 'RelatedSoundFile',\n 'type': Types.Ascii\n },\n 40965: {\n 'name': 'InteroperabilityTag',\n 'type': Types.Long\n },\n 41483: {\n 'name': 'FlashEnergy',\n 'type': Types.Rational\n },\n 41484: {\n 'name': 'SpatialFrequencyResponse',\n 'type': Types.Undefined\n },\n 41486: {\n 'name': 'FocalPlaneXResolution',\n 'type': Types.Rational\n },\n 41487: {\n 'name': 'FocalPlaneYResolution',\n 'type': Types.Rational\n },\n 41488: {\n 'name': 'FocalPlaneResolutionUnit',\n 'type': Types.Short\n },\n 41492: {\n 'name': 'SubjectLocation',\n 'type': Types.Short\n },\n 41493: {\n 'name': 'ExposureIndex',\n 'type': Types.Rational\n },\n 41495: {\n 'name': 'SensingMethod',\n 'type': Types.Short\n },\n 41728: {\n 'name': 'FileSource',\n 'type': Types.Undefined\n },\n 41729: {\n 'name': 'SceneType',\n 'type': Types.Undefined\n },\n 41730: {\n 'name': 'CFAPattern',\n 'type': Types.Undefined\n },\n 41985: {\n 'name': 'CustomRendered',\n 'type': Types.Short\n },\n 41986: {\n 'name': 'ExposureMode',\n 'type': Types.Short\n },\n 41987: {\n 'name': 'WhiteBalance',\n 'type': Types.Short\n },\n 41988: {\n 'name': 'DigitalZoomRatio',\n 'type': Types.Rational\n },\n 41989: {\n 'name': 'FocalLengthIn35mmFilm',\n 'type': Types.Short\n },\n 41990: {\n 'name': 'SceneCaptureType',\n 'type': Types.Short\n },\n 41991: {\n 'name': 'GainControl',\n 'type': Types.Short\n },\n 41992: {\n 'name': 'Contrast',\n 'type': Types.Short\n },\n 41993: {\n 'name': 'Saturation',\n 'type': Types.Short\n },\n 41994: {\n 'name': 'Sharpness',\n 'type': Types.Short\n },\n 41995: {\n 'name': 'DeviceSettingDescription',\n 'type': Types.Undefined\n },\n 41996: {\n 'name': 'SubjectDistanceRange',\n 'type': Types.Short\n },\n 42016: {\n 'name': 'ImageUniqueID',\n 'type': Types.Ascii\n },\n 42032: {\n 'name': 'CameraOwnerName',\n 'type': Types.Ascii\n },\n 42033: {\n 'name': 'BodySerialNumber',\n 'type': Types.Ascii\n },\n 42034: {\n 'name': 'LensSpecification',\n 'type': Types.Rational\n },\n 42035: {\n 'name': 'LensMake',\n 'type': Types.Ascii\n },\n 42036: {\n 'name': 'LensModel',\n 'type': Types.Ascii\n },\n 42037: {\n 'name': 'LensSerialNumber',\n 'type': Types.Ascii\n },\n 42240: {\n 'name': 'Gamma',\n 'type': Types.Rational\n }\n },\n 'GPS': {\n 0: {\n 'name': 'GPSVersionID',\n 'type': Types.Byte\n },\n 1: {\n 'name': 'GPSLatitudeRef',\n 'type': Types.Ascii\n },\n 2: {\n 'name': 'GPSLatitude',\n 'type': Types.Rational\n },\n 3: {\n 'name': 'GPSLongitudeRef',\n 'type': Types.Ascii\n },\n 4: {\n 'name': 'GPSLongitude',\n 'type': Types.Rational\n },\n 5: {\n 'name': 'GPSAltitudeRef',\n 'type': Types.Byte\n },\n 6: {\n 'name': 'GPSAltitude',\n 'type': Types.Rational\n },\n 7: {\n 'name': 'GPSTimeStamp',\n 'type': Types.Rational\n },\n 8: {\n 'name': 'GPSSatellites',\n 'type': Types.Ascii\n },\n 9: {\n 'name': 'GPSStatus',\n 'type': Types.Ascii\n },\n 10: {\n 'name': 'GPSMeasureMode',\n 'type': Types.Ascii\n },\n 11: {\n 'name': 'GPSDOP',\n 'type': Types.Rational\n },\n 12: {\n 'name': 'GPSSpeedRef',\n 'type': Types.Ascii\n },\n 13: {\n 'name': 'GPSSpeed',\n 'type': Types.Rational\n },\n 14: {\n 'name': 'GPSTrackRef',\n 'type': Types.Ascii\n },\n 15: {\n 'name': 'GPSTrack',\n 'type': Types.Rational\n },\n 16: {\n 'name': 'GPSImgDirectionRef',\n 'type': Types.Ascii\n },\n 17: {\n 'name': 'GPSImgDirection',\n 'type': Types.Rational\n },\n 18: {\n 'name': 'GPSMapDatum',\n 'type': Types.Ascii\n },\n 19: {\n 'name': 'GPSDestLatitudeRef',\n 'type': Types.Ascii\n },\n 20: {\n 'name': 'GPSDestLatitude',\n 'type': Types.Rational\n },\n 21: {\n 'name': 'GPSDestLongitudeRef',\n 'type': Types.Ascii\n },\n 22: {\n 'name': 'GPSDestLongitude',\n 'type': Types.Rational\n },\n 23: {\n 'name': 'GPSDestBearingRef',\n 'type': Types.Ascii\n },\n 24: {\n 'name': 'GPSDestBearing',\n 'type': Types.Rational\n },\n 25: {\n 'name': 'GPSDestDistanceRef',\n 'type': Types.Ascii\n },\n 26: {\n 'name': 'GPSDestDistance',\n 'type': Types.Rational\n },\n 27: {\n 'name': 'GPSProcessingMethod',\n 'type': Types.Undefined\n },\n 28: {\n 'name': 'GPSAreaInformation',\n 'type': Types.Undefined\n },\n 29: {\n 'name': 'GPSDateStamp',\n 'type': Types.Ascii\n },\n 30: {\n 'name': 'GPSDifferential',\n 'type': Types.Short\n },\n 31: {\n 'name': 'GPSHPositioningError',\n 'type': Types.Rational\n }\n },\n 'Interop': {\n 1: {\n 'name': 'InteroperabilityIndex',\n 'type': Types.Ascii\n }\n },\n};\nTags[\"0th\"] = Tags[\"Image\"];\nTags[\"1st\"] = Tags[\"Image\"];\n\n\n\nexport const TagValues = {\n ImageIFD: {\n ProcessingSoftware:11,\n NewSubfileType:254,\n SubfileType:255,\n ImageWidth:256,\n ImageLength:257,\n BitsPerSample:258,\n Compression:259,\n PhotometricInterpretation:262,\n Threshholding:263,\n CellWidth:264,\n CellLength:265,\n FillOrder:266,\n DocumentName:269,\n ImageDescription:270,\n Make:271,\n Model:272,\n StripOffsets:273,\n Orientation:274,\n SamplesPerPixel:277,\n RowsPerStrip:278,\n StripByteCounts:279,\n XResolution:282,\n YResolution:283,\n PlanarConfiguration:284,\n GrayResponseUnit:290,\n GrayResponseCurve:291,\n T4Options:292,\n T6Options:293,\n ResolutionUnit:296,\n TransferFunction:301,\n Software:305,\n DateTime:306,\n Artist:315,\n HostComputer:316,\n Predictor:317,\n WhitePoint:318,\n PrimaryChromaticities:319,\n ColorMap:320,\n HalftoneHints:321,\n TileWidth:322,\n TileLength:323,\n TileOffsets:324,\n TileByteCounts:325,\n SubIFDs:330,\n InkSet:332,\n InkNames:333,\n NumberOfInks:334,\n DotRange:336,\n TargetPrinter:337,\n ExtraSamples:338,\n SampleFormat:339,\n SMinSampleValue:340,\n SMaxSampleValue:341,\n TransferRange:342,\n ClipPath:343,\n XClipPathUnits:344,\n YClipPathUnits:345,\n Indexed:346,\n JPEGTables:347,\n OPIProxy:351,\n JPEGProc:512,\n JPEGInterchangeFormat:513,\n JPEGInterchangeFormatLength:514,\n JPEGRestartInterval:515,\n JPEGLosslessPredictors:517,\n JPEGPointTransforms:518,\n JPEGQTables:519,\n JPEGDCTables:520,\n JPEGACTables:521,\n YCbCrCoefficients:529,\n YCbCrSubSampling:530,\n YCbCrPositioning:531,\n ReferenceBlackWhite:532,\n XMLPacket:700,\n Rating:18246,\n RatingPercent:18249,\n ImageID:32781,\n CFARepeatPatternDim:33421,\n CFAPattern:33422,\n BatteryLevel:33423,\n Copyright:33432,\n ExposureTime:33434,\n ImageResources:34377,\n ExifTag:34665,\n InterColorProfile:34675,\n GPSTag:34853,\n Interlace:34857,\n TimeZoneOffset:34858,\n SelfTimerMode:34859,\n FlashEnergy:37387,\n SpatialFrequencyResponse:37388,\n Noise:37389,\n FocalPlaneXResolution:37390,\n FocalPlaneYResolution:37391,\n FocalPlaneResolutionUnit:37392,\n ImageNumber:37393,\n SecurityClassification:37394,\n ImageHistory:37395,\n ExposureIndex:37397,\n TIFFEPStandardID:37398,\n SensingMethod:37399,\n XPTitle:40091,\n XPComment:40092,\n XPAuthor:40093,\n XPKeywords:40094,\n XPSubject:40095,\n PrintImageMatching:50341,\n DNGVersion:50706,\n DNGBackwardVersion:50707,\n UniqueCameraModel:50708,\n LocalizedCameraModel:50709,\n CFAPlaneColor:50710,\n CFALayout:50711,\n LinearizationTable:50712,\n BlackLevelRepeatDim:50713,\n BlackLevel:50714,\n BlackLevelDeltaH:50715,\n BlackLevelDeltaV:50716,\n WhiteLevel:50717,\n DefaultScale:50718,\n DefaultCropOrigin:50719,\n DefaultCropSize:50720,\n ColorMatrix1:50721,\n ColorMatrix2:50722,\n CameraCalibration1:50723,\n CameraCalibration2:50724,\n ReductionMatrix1:50725,\n ReductionMatrix2:50726,\n AnalogBalance:50727,\n AsShotNeutral:50728,\n AsShotWhiteXY:50729,\n BaselineExposure:50730,\n BaselineNoise:50731,\n BaselineSharpness:50732,\n BayerGreenSplit:50733,\n LinearResponseLimit:50734,\n CameraSerialNumber:50735,\n LensInfo:50736,\n ChromaBlurRadius:50737,\n AntiAliasStrength:50738,\n ShadowScale:50739,\n DNGPrivateData:50740,\n MakerNoteSafety:50741,\n CalibrationIlluminant1:50778,\n CalibrationIlluminant2:50779,\n BestQualityScale:50780,\n RawDataUniqueID:50781,\n OriginalRawFileName:50827,\n OriginalRawFileData:50828,\n ActiveArea:50829,\n MaskedAreas:50830,\n AsShotICCProfile:50831,\n AsShotPreProfileMatrix:50832,\n CurrentICCProfile:50833,\n CurrentPreProfileMatrix:50834,\n ColorimetricReference:50879,\n CameraCalibrationSignature:50931,\n ProfileCalibrationSignature:50932,\n AsShotProfileName:50934,\n NoiseReductionApplied:50935,\n ProfileName:50936,\n ProfileHueSatMapDims:50937,\n ProfileHueSatMapData1:50938,\n ProfileHueSatMapData2:50939,\n ProfileToneCurve:50940,\n ProfileEmbedPolicy:50941,\n ProfileCopyright:50942,\n ForwardMatrix1:50964,\n ForwardMatrix2:50965,\n PreviewApplicationName:50966,\n PreviewApplicationVersion:50967,\n PreviewSettingsName:50968,\n PreviewSettingsDigest:50969,\n PreviewColorSpace:50970,\n PreviewDateTime:50971,\n RawImageDigest:50972,\n OriginalRawFileDigest:50973,\n SubTileBlockSize:50974,\n RowInterleaveFactor:50975,\n ProfileLookTableDims:50981,\n ProfileLookTableData:50982,\n OpcodeList1:51008,\n OpcodeList2:51009,\n OpcodeList3:51022,\n NoiseProfile:51041,\n },\n ExifIFD: {\n ExposureTime:33434,\n FNumber:33437,\n ExposureProgram:34850,\n SpectralSensitivity:34852,\n ISOSpeedRatings:34855,\n OECF:34856,\n SensitivityType:34864,\n StandardOutputSensitivity:34865,\n RecommendedExposureIndex:34866,\n ISOSpeed:34867,\n ISOSpeedLatitudeyyy:34868,\n ISOSpeedLatitudezzz:34869,\n ExifVersion:36864,\n DateTimeOriginal:36867,\n DateTimeDigitized:36868,\n ComponentsConfiguration:37121,\n CompressedBitsPerPixel:37122,\n ShutterSpeedValue:37377,\n ApertureValue:37378,\n BrightnessValue:37379,\n ExposureBiasValue:37380,\n MaxApertureValue:37381,\n SubjectDistance:37382,\n MeteringMode:37383,\n LightSource:37384,\n Flash:37385,\n FocalLength:37386,\n SubjectArea:37396,\n MakerNote:37500,\n UserComment:37510,\n SubSecTime:37520,\n SubSecTimeOriginal:37521,\n SubSecTimeDigitized:37522,\n FlashpixVersion:40960,\n ColorSpace:40961,\n PixelXDimension:40962,\n PixelYDimension:40963,\n RelatedSoundFile:40964,\n InteroperabilityTag:40965,\n FlashEnergy:41483,\n SpatialFrequencyResponse:41484,\n FocalPlaneXResolution:41486,\n FocalPlaneYResolution:41487,\n FocalPlaneResolutionUnit:41488,\n SubjectLocation:41492,\n ExposureIndex:41493,\n SensingMethod:41495,\n FileSource:41728,\n SceneType:41729,\n CFAPattern:41730,\n CustomRendered:41985,\n ExposureMode:41986,\n WhiteBalance:41987,\n DigitalZoomRatio:41988,\n FocalLengthIn35mmFilm:41989,\n SceneCaptureType:41990,\n GainControl:41991,\n Contrast:41992,\n Saturation:41993,\n Sharpness:41994,\n DeviceSettingDescription:41995,\n SubjectDistanceRange:41996,\n ImageUniqueID:42016,\n CameraOwnerName:42032,\n BodySerialNumber:42033,\n LensSpecification:42034,\n LensMake:42035,\n LensModel:42036,\n LensSerialNumber:42037,\n Gamma:42240,\n },\n GPSIFD: {\n GPSVersionID:0,\n GPSLatitudeRef:1,\n GPSLatitude:2,\n GPSLongitudeRef:3,\n GPSLongitude:4,\n GPSAltitudeRef:5,\n GPSAltitude:6,\n GPSTimeStamp:7,\n GPSSatellites:8,\n GPSStatus:9,\n GPSMeasureMode:10,\n GPSDOP:11,\n GPSSpeedRef:12,\n GPSSpeed:13,\n GPSTrackRef:14,\n GPSTrack:15,\n GPSImgDirectionRef:16,\n GPSImgDirection:17,\n GPSMapDatum:18,\n GPSDestLatitudeRef:19,\n GPSDestLatitude:20,\n GPSDestLongitudeRef:21,\n GPSDestLongitude:22,\n GPSDestBearingRef:23,\n GPSDestBearing:24,\n GPSDestDistanceRef:25,\n GPSDestDistance:26,\n GPSProcessingMethod:27,\n GPSAreaInformation:28,\n GPSDateStamp:29,\n GPSDifferential:30,\n GPSHPositioningError:31,\n },\n InteropIFD: {\n InteroperabilityIndex:1,\n }\n};","export class ValueConvertError extends Error {\n\n}","import * as constants from './constants';\nimport * as interfaces from './interfaces';\nimport * as exceptions from './exceptions';\n\nexport const _nLoopStr = (ch:string, num:number) => {\n let str = \"\";\n for (let i = 0; i < num; i++) {\n str += ch;\n }\n return str;\n};\n\nexport const pack = (mark:string, array:Array) => {\n if (!(array instanceof Array)) {\n throw new Error(\"'pack' error. Got invalid type argument.\");\n }\n if ((mark.length - 1) != array.length) {\n throw new Error(`'pack' error. ${mark.length - 1} marks, ${array.length} elements.`);\n }\n\n let littleEndian;\n if (mark[0] == \"<\") {\n littleEndian = true;\n } else if (mark[0] == \">\") {\n littleEndian = false;\n } else {\n throw new Error(\"Not match any endian.\");\n }\n let packed = \"\";\n let p = 1;\n let val = null;\n let c = null;\n let valBinary = null;\n\n while (c = mark[p]) {\n if (c.toLowerCase() == \"b\") {\n val = array[p - 1];\n if ((c == \"b\") && (val < 0)) {\n val += 0x100;\n }\n if ((val > 0xff) || (val < 0)) {\n throw new Error(\"'pack' error.\");\n } else {\n valBinary = String.fromCharCode(val);\n }\n } else if (c == \"H\") {\n val = array[p - 1];\n if ((val > 0xffff) || (val < 0)) {\n throw new Error(\"'pack' error.\");\n } else {\n valBinary = String.fromCharCode(Math.floor((val % 0x10000) / 0x100)) +\n String.fromCharCode(val % 0x100);\n if (littleEndian) {\n valBinary = valBinary.split(\"\").reverse().join(\"\");\n }\n }\n } else if (c.toLowerCase() == \"l\") {\n val = array[p - 1];\n if ((c == \"l\") && (val < 0)) {\n val += 0x100000000;\n }\n if ((val > 0xffffffff) || (val < 0)) {\n throw new Error(\"'pack' error.\");\n } else {\n valBinary = String.fromCharCode(Math.floor(val / 0x1000000)) +\n String.fromCharCode(Math.floor((val % 0x1000000) / 0x10000)) +\n String.fromCharCode(Math.floor((val % 0x10000) / 0x100)) +\n String.fromCharCode(val % 0x100);\n if (littleEndian) {\n valBinary = valBinary.split(\"\").reverse().join(\"\");\n }\n }\n } else {\n throw new Error(\"'pack' error.\");\n }\n\n packed += valBinary;\n p += 1;\n }\n\n return packed;\n};\n\nexport const unpack = (mark:string, str:string) => {\n if (typeof str != \"string\") {\n throw new Error(\"'unpack' error. Got invalid type argument.\");\n }\n let l = 0;\n for (let markPointer = 1; markPointer < mark.length; markPointer++) {\n if (mark[markPointer].toLowerCase() == \"b\") {\n l += 1;\n } else if (mark[markPointer].toLowerCase() == \"h\") {\n l += 2;\n } else if (mark[markPointer].toLowerCase() == \"l\") {\n l += 4;\n } else {\n throw new Error(\"'unpack' error. Got invalid mark.\");\n }\n }\n\n if (l != str.length) {\n throw new Error(\"'unpack' error. Mismatch between symbol and string length. \" + l + \":\" + str.length);\n }\n\n let littleEndian;\n if (mark[0] == \"<\") {\n littleEndian = true;\n } else if (mark[0] == \">\") {\n littleEndian = false;\n } else {\n throw new Error(\"'unpack' error.\");\n }\n let unpacked = [];\n let strPointer = 0;\n let p = 1;\n let val = null;\n let c = null;\n let length = null;\n let sliced = \"\";\n\n while (c = mark[p]) {\n if (c.toLowerCase() == \"b\") {\n length = 1;\n sliced = str.slice(strPointer, strPointer + length);\n val = sliced.charCodeAt(0);\n if ((c == \"b\") && (val >= 0x80)) {\n val -= 0x100;\n }\n } else if (c == \"H\") {\n length = 2;\n sliced = str.slice(strPointer, strPointer + length);\n if (littleEndian) {\n sliced = sliced.split(\"\").reverse().join(\"\");\n }\n val = sliced.charCodeAt(0) * 0x100 +\n sliced.charCodeAt(1);\n } else if (c.toLowerCase() == \"l\") {\n length = 4;\n sliced = str.slice(strPointer, strPointer + length);\n if (littleEndian) {\n sliced = sliced.split(\"\").reverse().join(\"\");\n }\n val = sliced.charCodeAt(0) * 0x1000000 +\n sliced.charCodeAt(1) * 0x10000 +\n sliced.charCodeAt(2) * 0x100 +\n sliced.charCodeAt(3);\n if ((c == \"l\") && (val >= 0x80000000)) {\n val -= 0x100000000;\n }\n } else {\n throw new Error(\"'unpack' error. \" + c);\n }\n\n unpacked.push(val);\n strPointer += length;\n p += 1;\n }\n\n return unpacked;\n};\n\nexport const _isBrowser = (new Function(\"try {return this===window;}catch(e){ return false;}\"))();\nexport const atob:Function = _isBrowser \n ? window.atob\n : (input:string) => {\n const decoded = Buffer.from(input,'base64');\n return decoded;\n };\nexport const btoa:Function = _isBrowser\n ? window.btoa\n : (input:string) => {\n const buf = Buffer.from(input);\n const encoded = buf.toString('base64');\n return encoded;\n };\n\n\nexport const _packByte = (array:Array) => {\n return pack(\">\" + _nLoopStr(\"B\", array.length), array);\n};\n\n\nexport const _packShort = (array:Array) => {\n return pack(\">\" + _nLoopStr(\"H\", array.length), array);\n};\n\n\nexport const _packLong = (array:Array) => {\n return pack(\">\" + _nLoopStr(\"L\", array.length), array);\n};\n\n\nexport const copy = (obj:any) => {\n const copied = {}\n Object.assign(copied, obj)\n return obj;\n};\n\n\nexport const getThumbnail = (jpeg:string) => {\n let segments = splitIntoSegments(jpeg);\n while ((\"\\xff\\xe0\" <= segments[1].slice(0, 2)) && (segments[1].slice(0, 2) <= \"\\xff\\xef\")) {\n segments = [segments[0]].concat(segments.slice(2));\n }\n return segments.join(\"\");\n};\n\nexport const _valueToBytes = (rawValue:any, valueType:number, offset:number) => {\n let tagBinary;\n if (valueType == constants.Types.Byte) {\n tagBinary = _toByte(rawValue, offset);\n } else if (valueType == constants.Types.Ascii) {\n tagBinary = _toAscii(rawValue, offset)\n } else if (valueType == constants.Types.Short) {\n tagBinary = _toShort(rawValue, offset);\n } else if (valueType == constants.Types.Long) {\n tagBinary = _toLong(rawValue, offset);\n } else if (valueType == constants.Types.Rational) {\n tagBinary = _toRational(rawValue, offset);\n } else if (valueType == constants.Types.Undefined) {\n tagBinary = _toUndefined(rawValue, offset);\n } else if (valueType == constants.Types.SLong) {\n throw new Error('Not implemented for SLong value');\n } else if (valueType == constants.Types.SRational) {\n tagBinary = _toSRational(rawValue, offset);\n } else {\n throw new Error(\"Got unhandled exif value type.\");\n }\n\n return tagBinary;\n};\n\ninterface ITagBinary {\n value:string,\n // length:number,\n lengthBinary:string,\n fourBytesOver:string\n};\n\n\nexport const _toByte = (rawValue:any, offset:number) => {\n if (typeof (rawValue) == \"number\") {\n rawValue = [rawValue];\n } else if (Array.isArray(rawValue) && (typeof rawValue[0] === 'number')) {\n // pass\n } else {\n const t = Array.isArray(rawValue) ? 'Array' : typeof rawValue;\n throw new exceptions.ValueConvertError(\n `Value must be \"number\" or \"Array\".\\n`\n + `Value: ${rawValue}\\n`\n + `Type: ${t}`\n );\n }\n\n const length = rawValue.length;\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n if (length <= 4) {\n tagBinary.value = (_packByte(rawValue) +\n _nLoopStr(\"\\x00\", 4 - length));\n } else {\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = _packByte(rawValue);\n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n return tagBinary;\n};\n\nexport const _toAscii = (rawValue:string, offset:number) => {\n if (typeof rawValue !== 'string') {\n const t = Array.isArray(rawValue) ? \"Array\" : typeof rawValue;\n throw new exceptions.ValueConvertError(`Value must be \"string\". Got \"${t}\".`);\n }\n\n const newValue = rawValue + \"\\x00\";\n const length = newValue.length;\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n if (length > 4) {\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = newValue;\n } else {\n tagBinary.value = newValue + _nLoopStr(\"\\x00\", 4 - length);\n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n return tagBinary;\n};\n\nexport const _toShort = (rawValue:any, offset:number) => {\n if (typeof (rawValue) == \"number\") {\n rawValue = [rawValue];\n } else if (Array.isArray(rawValue) && (typeof rawValue[0] === 'number')) {\n // pass\n } else {\n const t = Array.isArray(rawValue) ? 'Array' : typeof rawValue;\n throw new exceptions.ValueConvertError(\n `Value must be \"number\" or \"Array\".\\n`\n + `Value: ${rawValue}\\n`\n + `Type: ${t}`\n );\n }\n\n const length = rawValue.length;\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n if (length <= 2) {\n tagBinary.value = (_packShort(rawValue) +\n _nLoopStr(\"\\x00\\x00\", 2 - length));\n } else {\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = _packShort(rawValue);\n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n return tagBinary;\n};\n\nexport const _toLong = (rawValue:any, offset:number) => {\n if (typeof (rawValue) == \"number\") {\n rawValue = [rawValue];\n } else if (Array.isArray(rawValue) && (typeof rawValue[0] === 'number')) {\n // pass\n } else {\n const t = Array.isArray(rawValue) ? 'Array' : typeof rawValue;\n throw new exceptions.ValueConvertError(\n `Value must be \"number\" or \"Array\".\\n`\n + `Value: ${rawValue}\\n`\n + `Type: ${t}`\n );\n }\n\n\n const length = rawValue.length;\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n if (length <= 1) {\n tagBinary.value = _packLong(rawValue);\n } else {\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = _packLong(rawValue);\n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n return tagBinary;\n};\n\nexport const _toRational = (rawValue:any, offset:number) => {\n if (Array.isArray(rawValue) && (typeof rawValue[0] === \"number\") && (rawValue.length === 2)) {\n rawValue = [rawValue];\n } else if (Array.isArray(rawValue) && (Array.isArray(rawValue[0])) && (typeof rawValue[0][0] === \"number\")) {\n // pass\n } else {\n let t = Array.isArray(rawValue) ? \"Array\" : typeof rawValue;\n t = (t == 'Array') ? `Array<${typeof rawValue[0]}>` : t;\n throw new exceptions.ValueConvertError(`Value must be \"Array\" or \"Array>\". Got \"${t}\".`);\n }\n\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n const length = rawValue.length;\n let newValue = \"\";\n for (let n = 0; n < length; n++) {\n const num = rawValue[n][0];\n const den = rawValue[n][1];\n newValue += (pack(\">L\", [num]) +\n pack(\">L\", [den]));\n \n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = newValue; \n return tagBinary;\n};\n\nexport const _toUndefined = (rawValue:string, offset:number) => {\n if (typeof rawValue !== 'string') {\n const t = Array.isArray(rawValue) ? \"Array\" : typeof rawValue;\n throw new exceptions.ValueConvertError(`Value must be \"string\". Got \"${t}\".`);\n }\n\n const length = rawValue.length;\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n if (length > 4) {\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = rawValue;\n } else {\n tagBinary.value = rawValue + _nLoopStr(\"\\x00\", 4 - length);\n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n return tagBinary;\n};\n\n\nexport const _toSRational = (rawValue:any, offset:number) => {\n if (Array.isArray(rawValue) && (typeof rawValue[0] === \"number\") && (rawValue.length === 2)) {\n rawValue = [rawValue];\n } else if (Array.isArray(rawValue) && (Array.isArray(rawValue[0])) && (typeof rawValue[0][0] === \"number\")) {\n // pass\n } else {\n let t = Array.isArray(rawValue) ? \"Array\" : typeof rawValue;\n t = (t == 'Array') ? `Array<${typeof rawValue[0]}>` : t;\n throw new exceptions.ValueConvertError(`Value must be \"Array\" or \"Array>\". Got \"${t}\".`);\n }\n\n let tagBinary:ITagBinary = {\n value: '',\n lengthBinary: '',\n fourBytesOver: ''\n };\n const length = rawValue.length;\n let newValue = \"\";\n for (let n = 0; n < length; n++) {\n const num = rawValue[n][0];\n const den = rawValue[n][1];\n newValue += (pack(\">l\", [num]) +\n pack(\">l\", [den]));\n }\n tagBinary.lengthBinary = pack(\">L\", [length]);\n tagBinary.value = pack(\">L\", [offset]);\n tagBinary.fourBytesOver = newValue;\n return tagBinary;\n};\n\n\nexport const dictToBytes = (ifdObj:any, ifdName:string, ifdOffsetCount:number) => {\n const TIFF_HEADER_LENGTH = 8;\n const tagCount = Object.keys(ifdObj).length;\n const entryHeader = pack(\">H\", [tagCount]);\n let entriesLength;\n if ([\"0th\", \"1st\"].indexOf(ifdName) > -1) {\n entriesLength = 2 + tagCount * 12 + 4;\n } else {\n entriesLength = 2 + tagCount * 12;\n }\n let entries = \"\";\n let values = \"\";\n let key;\n\n for (key in ifdObj) {\n if (typeof (key) == \"string\") {\n key = parseInt(key);\n }\n if ((ifdName == \"0th\") && ([34665, 34853].indexOf(key) > -1)) {\n continue;\n } else if ((ifdName == \"Exif\") && (key == 40965)) {\n continue;\n } else if ((ifdName == \"1st\") && ([513, 514].indexOf(key) > -1)) {\n continue;\n }\n\n let rawValue = ifdObj[key];\n const keyBinary = pack(\">H\", [key]);\n const valueType:number = constants.Tags[ifdName][key][\"type\"];\n const typeBinary = pack(\">H\", [valueType]);\n\n const offset = TIFF_HEADER_LENGTH + entriesLength + ifdOffsetCount + values.length;\n let b:ITagBinary;\n try {\n b = _valueToBytes(rawValue, valueType, offset);\n } catch (e) {\n if (e instanceof exceptions.ValueConvertError) {\n const _ifdName = ['0th', '1st'].includes(ifdName) ? 'Image' : ifdName;\n const tagName = constants.Tags[_ifdName][key]['name'];\n const errorMessage = `Can't convert ${tagName} in ${ifdName} IFD.\\r`;\n e.message = errorMessage + e.message;\n }\n throw e;\n }\n\n entries += keyBinary + typeBinary + b.lengthBinary + b.value;\n values += b.fourBytesOver;\n }\n return [entryHeader + entries, values];\n}\n\nexport class ExifReader {\n tiftag: string;\n endianMark: string;\n constructor (exifBinary:string) {\n let segments,\n app1;\n if (exifBinary.slice(0, 2) == \"\\xff\\xd8\") { // JPEG\n segments = splitIntoSegments(exifBinary);\n app1 = getExifSeg(segments);\n if (app1) {\n this.tiftag = app1.slice(10);\n } else {\n this.tiftag = null;\n }\n } else if ([\"\\x49\\x49\", \"\\x4d\\x4d\"].indexOf(exifBinary.slice(0, 2)) > -1) { // TIFF\n this.tiftag = exifBinary;\n } else if (exifBinary.slice(0, 4) == \"Exif\") { // Exif\n this.tiftag = exifBinary.slice(6);\n } else {\n throw new Error(\"Given file is neither JPEG nor TIFF.\");\n }\n }\n\n getIfd = (pointer:number, ifdName:string) => {\n const tagCount = unpack(this.endianMark + \"H\",\n this.tiftag.slice(pointer, pointer + 2))[0];\n if (tagCount == 0) {\n return null;\n }\n let ifdObj:any = {};\n const offset = pointer + 2;\n let t;\n if ([\"0th\", \"1st\"].indexOf(ifdName) > -1) {\n t = \"Image\";\n } else {\n t = ifdName;\n }\n\n for (let x = 0; x < tagCount; x++) {\n pointer = offset + 12 * x;\n const tag = unpack(this.endianMark + \"H\",\n this.tiftag.slice(pointer, pointer + 2))[0];\n const valueType = unpack(this.endianMark + \"H\",\n this.tiftag.slice(pointer + 2, pointer + 4))[0];\n const valueNum = unpack(this.endianMark + \"L\",\n this.tiftag.slice(pointer + 4, pointer + 8))[0];\n const value = this.tiftag.slice(pointer + 8, pointer + 12);\n\n const valueSet = [valueType, valueNum, value];\n if (tag in constants.Tags[t]) {\n ifdObj[tag] = this.convertValue(valueSet);\n }\n }\n\n if (ifdName == \"0th\") {\n pointer = offset + 12 * tagCount;\n ifdObj[\"first_ifd_pointer\"] = this.tiftag.slice(pointer, pointer + 4);\n }\n\n return ifdObj;\n }\n\n convertValue = (val:any) => {\n let data = null;\n const t = val[0];\n const length = val[1];\n const value = val[2];\n let pointer;\n\n if (t == 1) { // BYTE\n if (length > 4) {\n pointer = unpack(this.endianMark + \"L\", value)[0];\n data = unpack(this.endianMark + _nLoopStr(\"B\", length),\n this.tiftag.slice(pointer, pointer + length));\n } else {\n data = unpack(this.endianMark + _nLoopStr(\"B\", length), value.slice(0, length));\n }\n } else if (t == 2) { // ASCII\n if (length > 4) {\n pointer = unpack(this.endianMark + \"L\", value)[0];\n data = this.tiftag.slice(pointer, pointer + length - 1);\n } else {\n data = value.slice(0, length - 1);\n }\n } else if (t == 3) { // SHORT\n if (length > 2) {\n pointer = unpack(this.endianMark + \"L\", value)[0];\n data = unpack(this.endianMark + _nLoopStr(\"H\", length),\n this.tiftag.slice(pointer, pointer + length * 2));\n } else {\n data = unpack(this.endianMark + _nLoopStr(\"H\", length),\n value.slice(0, length * 2));\n }\n } else if (t == 4) { // LONG\n if (length > 1) {\n pointer = unpack(this.endianMark + \"L\", value)[0];\n data = unpack(this.endianMark + _nLoopStr(\"L\", length),\n this.tiftag.slice(pointer, pointer + length * 4));\n } else {\n data = unpack(this.endianMark + _nLoopStr(\"L\", length),\n value);\n }\n } else if (t == 5) { // RATIONAL\n pointer = unpack(this.endianMark + \"L\", value)[0];\n if (length > 1) {\n data = [];\n for (let x = 0; x < length; x++) {\n data.push([unpack(this.endianMark + \"L\",\n this.tiftag.slice(pointer + x * 8, pointer + 4 + x * 8))[0],\n unpack(this.endianMark + \"L\",\n this.tiftag.slice(pointer + 4 + x * 8, pointer + 8 + x * 8))[0]\n ]);\n }\n } else {\n data = [\n unpack(this.endianMark + \"L\",\n this.tiftag.slice(pointer, pointer + 4))[0],\n unpack(this.endianMark + \"L\",\n this.tiftag.slice(pointer + 4, pointer + 8))[0]\n ];\n }\n } else if (t == 7) { // UNDEFINED BYTES\n if (length > 4) {\n pointer = unpack(this.endianMark + \"L\", value)[0];\n data = this.tiftag.slice(pointer, pointer + length);\n } else {\n data = value.slice(0, length);\n }\n } else if (t == 10) { // SRATIONAL\n pointer = unpack(this.endianMark + \"L\", value)[0];\n if (length > 1) {\n data = [];\n for (let x = 0; x < length; x++) {\n data.push([unpack(this.endianMark + \"l\",\n this.tiftag.slice(pointer + x * 8, pointer + 4 + x * 8))[0],\n unpack(this.endianMark + \"l\",\n this.tiftag.slice(pointer + 4 + x * 8, pointer + 8 + x * 8))[0]\n ]);\n }\n } else {\n data = [unpack(this.endianMark + \"l\",\n this.tiftag.slice(pointer, pointer + 4))[0],\n unpack(this.endianMark + \"l\",\n this.tiftag.slice(pointer + 4, pointer + 8))[0]\n ];\n }\n } else {\n throw new Error(\"Exif might be wrong. Got incorrect value \" +\n \"type to decode. type:\" + t);\n }\n\n if ((data instanceof Array) && (data.length == 1)) {\n return data[0];\n } else {\n return data;\n }\n }\n}\n\nexport const splitIntoSegments = (data:string) => {\n if (data.slice(0, 2) != \"\\xff\\xd8\") {\n throw new Error(\"Given data isn't JPEG.\");\n }\n\n let head = 2;\n let segments = [\"\\xff\\xd8\"];\n while (true) {\n if (data.slice(head, head + 2) == \"\\xff\\xda\") {\n segments.push(data.slice(head));\n break;\n } else {\n const length = unpack(\">H\", data.slice(head + 2, head + 4))[0];\n const endPoint = head + length + 2;\n segments.push(data.slice(head, endPoint));\n head = endPoint;\n }\n\n if (head >= data.length) {\n throw new Error(\"Wrong JPEG data.\");\n }\n }\n return segments;\n};\n\n\nconst getExifSeg = (segments:Array) => {\n let seg;\n for (let i = 0; i < segments.length; i++) {\n seg = segments[i];\n if (seg.slice(0, 2) == \"\\xff\\xe1\" &&\n seg.slice(4, 10) == \"Exif\\x00\\x00\") {\n return seg;\n }\n }\n return null;\n};\n\n\nexport const mergeSegments = (segments:Array, exif:string) => {\n let hasExifSegment = false;\n let additionalAPP1ExifSegments:Array = [];\n\n segments.forEach(function(segment, i) {\n // Replace first occurence of APP1:Exif segment\n if (segment.slice(0, 2) == \"\\xff\\xe1\" &&\n segment.slice(4, 10) == \"Exif\\x00\\x00\"\n ) {\n if (!hasExifSegment) {\n segments[i] = exif;\n hasExifSegment = true;\n } else {\n additionalAPP1ExifSegments.unshift(i);\n }\n }\n });\n\n // Remove additional occurences of APP1:Exif segment\n additionalAPP1ExifSegments.forEach(function(segmentIndex) {\n segments.splice(segmentIndex, 1);\n });\n\n if (!hasExifSegment && exif) {\n segments = [segments[0], exif].concat(segments.slice(1));\n }\n\n return segments.join(\"\");\n};\n","export const GPSHelper = {\n degToDmsRational: (degFloat:number) => {\n var degAbs = Math.abs(degFloat);\n var minFloat = degAbs % 1 * 60;\n var secFloat = minFloat % 1 * 60;\n var deg = Math.floor(degAbs);\n var min = Math.floor(minFloat);\n var sec = Math.round(secFloat * 100);\n return [[deg, 1], [min, 1], [sec, 100]];\n },\n\n dmsRationalToDeg: (dmsArray:Array>, ref:string) => {\n if (ref !== 'S' && ref !== 'W' && ref !== 'N' && ref !== 'E') {\n throw new Error('\"dmsRationalToDeg\", 2nd argument must be \"N\", \"S\", \"E\" or \"W\"');\n }\n var sign = (ref === 'S' || ref === 'W') ? -1.0 : 1.0;\n var deg = dmsArray[0][0] / dmsArray[0][1] +\n dmsArray[1][0] / (dmsArray[1][1] * 60.0) +\n dmsArray[2][0] / (dmsArray[2][1] * 3600.0);\n\n return sign * deg;\n }\n};","import * as _constants from './constants';\nimport * as _utils from './utils';\nimport * as _helper from './helper';\nimport * as interfaces from './interfaces';\nimport * as _exceptions from './exceptions';\n\nexport const version:string = '2.0.0b';\n\nexport const _:any = _utils;\nexport const helper:any = _helper;\nexport const constants:any = _constants;\nexport const exceptions:any = _exceptions;\n\nexport const Tags:any = _constants.Tags;\nexport const TagValues:any = _constants.TagValues;\n\n\nexport const remove = (imageBinary:string) => {\n let bbase64Encoded = false;\n if (imageBinary.slice(0, 2) == \"\\xff\\xd8\") {\n } else if (imageBinary.slice(0, 23) == \"data:image/jpeg;base64,\" || imageBinary.slice(0, 22) == \"data:image/jpg;base64,\") {\n imageBinary = _utils.atob(imageBinary.split(\",\")[1]);\n bbase64Encoded = true;\n } else {\n throw new Error(\"Given data is not jpeg.\");\n }\n \n const segments = _utils.splitIntoSegments(imageBinary);\n const newSegments = segments.filter(function(segment:string){\n return !(segment.slice(0, 2) == \"\\xff\\xe1\" &&\n segment.slice(4, 10) == \"Exif\\x00\\x00\"); \n });\n \n let newBinary = newSegments.join(\"\");\n if (bbase64Encoded) {\n newBinary = \"data:image/jpeg;base64,\" + _utils.btoa(newBinary);\n }\n\n return newBinary;\n};\n\n\nexport const insert = (exifBinary:string, imageBinary:string) => {\n let base64Encoded = false;\n if (exifBinary.slice(0, 6) != \"\\x45\\x78\\x69\\x66\\x00\\x00\") {\n throw new Error(\"Given data is not exif.\");\n }\n if (imageBinary.slice(0, 2) == \"\\xff\\xd8\") {\n } else if (imageBinary.slice(0, 23) == \"data:image/jpeg;base64,\" || imageBinary.slice(0, 22) == \"data:image/jpg;base64,\") {\n imageBinary = _utils.atob(imageBinary.split(\",\")[1]);\n base64Encoded = true;\n } else {\n throw new Error(\"Given data is not jpeg.\");\n }\n\n const app1Segment = \"\\xff\\xe1\" + _utils.pack(\">H\", [exifBinary.length + 2]) + exifBinary;\n const segments = _utils.splitIntoSegments(imageBinary);\n let newBinary = _utils.mergeSegments(segments, app1Segment);\n if (base64Encoded) {\n newBinary = \"data:image/jpeg;base64,\" + _utils.btoa(newBinary);\n }\n\n return newBinary;\n};\n\n\nexport const load = (binary:string) => {\n let exifBinary;\n if (typeof (binary) == \"string\") {\n if (binary.slice(0, 2) == \"\\xff\\xd8\") {\n exifBinary = binary;\n } else if (binary.slice(0, 23) == \"data:image/jpeg;base64,\" || binary.slice(0, 22) == \"data:image/jpg;base64,\") {\n exifBinary = _utils.atob(binary.split(\",\")[1]);\n } else if (binary.slice(0, 4) == \"Exif\") {\n exifBinary = binary.slice(6);\n } else {\n throw new Error(\"'load' gots invalid file data.\");\n }\n } else {\n throw new Error(\"'load' gots invalid type argument.\");\n }\n\n let exifObj:interfaces.IExif = {};\n let exifReader:any = new _utils.ExifReader(exifBinary);\n if (exifReader.tiftag === null) {\n return exifObj;\n }\n\n if (exifReader.tiftag.slice(0, 2) == \"\\x49\\x49\") {\n exifReader.endianMark = \"<\";\n } else {\n exifReader.endianMark = \">\";\n }\n\n let zerothIfd = null;\n let firstIfd = null;\n let exifIfd = null;\n let interopIfd = null;\n let gpsIfd = null;\n let thumbnail = null;\n let pointer = _utils.unpack(exifReader.endianMark + \"L\",\n exifReader.tiftag.slice(4, 8))[0];\n zerothIfd = exifReader.getIfd(pointer, \"0th\");\n\n const firstIfdPointer = zerothIfd[\"first_ifd_pointer\"];\n delete zerothIfd[\"first_ifd_pointer\"];\n\n if (zerothIfd !== null && 34665 in zerothIfd) {\n const pointer = zerothIfd[34665];\n exifIfd = exifReader.getIfd(pointer, \"Exif\");\n }\n if (zerothIfd !== null && 34853 in zerothIfd) {\n const pointer = zerothIfd[34853];\n gpsIfd = exifReader.getIfd(pointer, \"GPS\");\n }\n if (exifIfd !== null && 40965 in exifIfd) {\n const pointer = exifIfd[40965];\n interopIfd = exifReader.getIfd(pointer, \"Interop\");\n }\n if (firstIfdPointer != \"\\x00\\x00\\x00\\x00\") {\n const pointer = _utils.unpack(exifReader.endianMark + \"L\",\n firstIfdPointer)[0];\n firstIfd = exifReader.getIfd(pointer, \"1st\");\n if (firstIfd !== null && (513 in firstIfd) && (514 in firstIfd)) {\n const end = firstIfd[513] + firstIfd[514];\n thumbnail = exifReader.tiftag.slice(firstIfd[513], end);\n }\n }\n\n if (zerothIfd !== null) {\n exifObj['0th'] = zerothIfd;\n }\n if (firstIfd !== null) {\n exifObj['1st'] = firstIfd;\n }\n if (exifIfd !== null) {\n exifObj['Exif'] = exifIfd;\n }\n if (gpsIfd !== null) {\n exifObj['GPS'] = gpsIfd;\n }\n if (interopIfd !== null) {\n exifObj['Interop'] = interopIfd;\n }\n if (thumbnail !== null) {\n exifObj['thumbnail'] = thumbnail;\n }\n return exifObj;\n};\n\nexport const dump = (originalExifObj:interfaces.IExif) => {\n const TIFF_HEADER_LENGTH = 8;\n\n let exifObj:interfaces.IExif = _utils.copy(originalExifObj);\n const header = \"Exif\\x00\\x00\\x4d\\x4d\\x00\\x2a\\x00\\x00\\x00\\x08\";\n let existExifIfd = false;\n let existGpsIfd = false;\n let existInteropIfd = false;\n let existFirstIfd = false;\n\n let zerothIfd,\n exifIfd,\n interopIfd,\n gpsIfd,\n firstIfd;\n \n if (\"0th\" in exifObj) {\n zerothIfd = exifObj[\"0th\"];\n } else {\n zerothIfd = {};\n }\n \n if (((\"Exif\" in exifObj) && (Object.keys(exifObj[\"Exif\"]).length)) ||\n ((\"Interop\" in exifObj) && (Object.keys(exifObj[\"Interop\"]).length))) {\n zerothIfd[34665] = 1;\n existExifIfd = true;\n exifIfd = exifObj[\"Exif\"];\n if ((\"Interop\" in exifObj) && Object.keys(exifObj[\"Interop\"]).length) {\n exifIfd[40965] = 1;\n existInteropIfd = true;\n interopIfd = exifObj[\"Interop\"];\n } else if (Object.keys(exifIfd).indexOf(_constants.TagValues.ExifIFD.InteroperabilityTag.toString()) > -1) {\n delete exifIfd[40965];\n }\n } else if (Object.keys(zerothIfd).indexOf(_constants.TagValues.ImageIFD.ExifTag.toString()) > -1) {\n delete zerothIfd[34665];\n }\n\n if ((\"GPS\" in exifObj) && (Object.keys(exifObj[\"GPS\"]).length)) {\n zerothIfd[_constants.TagValues.ImageIFD.GPSTag] = 1;\n existGpsIfd = true;\n gpsIfd = exifObj[\"GPS\"];\n } else if (Object.keys(zerothIfd).indexOf(_constants.TagValues.ImageIFD.GPSTag.toString()) > -1) {\n delete zerothIfd[_constants.TagValues.ImageIFD.GPSTag];\n }\n \n if ((\"1st\" in exifObj) &&\n (\"thumbnail\" in exifObj) &&\n (exifObj[\"thumbnail\"] != null)) {\n existFirstIfd = true;\n exifObj[\"1st\"][513] = 1;\n exifObj[\"1st\"][514] = 1;\n firstIfd = exifObj[\"1st\"];\n }\n \n let zerothIfdSet = _utils.dictToBytes(zerothIfd, \"0th\", 0);\n const zerothIfdLength = (zerothIfdSet[0].length + Number(existExifIfd) * 12 + Number(existGpsIfd) * 12 + 4 +\n zerothIfdSet[1].length);\n\n let exifIfdSet,\n exifIfdBytes = \"\",\n exifIfdLength = 0,\n gpsIfdSet,\n gpsIfdBytes = \"\",\n gpsIfdLength = 0,\n interopIfdSet,\n interopIfdBytes = \"\",\n interopIfdLength = 0,\n firstIfdSet,\n firstIfdBytes = \"\",\n thumbnail;\n if (existExifIfd) {\n exifIfdSet = _utils.dictToBytes(exifIfd, \"Exif\", zerothIfdLength);\n exifIfdLength = exifIfdSet[0].length + Number(existInteropIfd) * 12 + exifIfdSet[1].length;\n }\n if (existGpsIfd) {\n gpsIfdSet = _utils.dictToBytes(gpsIfd, \"GPS\", zerothIfdLength + exifIfdLength);\n gpsIfdBytes = gpsIfdSet.join(\"\");\n gpsIfdLength = gpsIfdBytes.length;\n }\n if (existInteropIfd) {\n const offset = zerothIfdLength + exifIfdLength + gpsIfdLength;\n interopIfdSet = _utils.dictToBytes(interopIfd, \"Interop\", offset);\n interopIfdBytes = interopIfdSet.join(\"\");\n interopIfdLength = interopIfdBytes.length;\n }\n if (existFirstIfd) {\n const offset = zerothIfdLength + exifIfdLength + gpsIfdLength + interopIfdLength;\n firstIfdSet = _utils.dictToBytes(firstIfd, \"1st\", offset);\n thumbnail = _utils.getThumbnail(exifObj[\"thumbnail\"]);\n if (thumbnail.length > 64000) {\n throw new Error(\"Given thumbnail is too large. max 64kB\");\n }\n }\n\n let exifPointer = \"\",\n gpsPointer = \"\",\n interopPointer = \"\",\n firstIfdPointer = \"\\x00\\x00\\x00\\x00\";\n if (existExifIfd) {\n const pointerValue = TIFF_HEADER_LENGTH + zerothIfdLength;\n const pointerBinary = _utils.pack(\">L\", [pointerValue]);\n const key = 34665;\n const keyBinary = _utils.pack(\">H\", [key]);\n const typeBinary = _utils.pack(\">H\", [_constants.Types[\"Long\"]]);\n const lengthBinary = _utils.pack(\">L\", [1]);\n exifPointer = keyBinary + typeBinary + lengthBinary + pointerBinary;\n }\n if (existGpsIfd) {\n const pointerValue = TIFF_HEADER_LENGTH + zerothIfdLength + exifIfdLength;\n const pointerBinary = _utils.pack(\">L\", [pointerValue]);\n const key = 34853;\n const keyBinary = _utils.pack(\">H\", [key]);\n const typeBinary = _utils.pack(\">H\", [_constants.Types[\"Long\"]]);\n const lengthBinary = _utils.pack(\">L\", [1]);\n gpsPointer = keyBinary + typeBinary + lengthBinary + pointerBinary;\n }\n if (existInteropIfd) {\n const pointerValue = (TIFF_HEADER_LENGTH +\n zerothIfdLength + exifIfdLength + gpsIfdLength);\n const pointerBinary = _utils.pack(\">L\", [pointerValue]);\n const key = 40965;\n const keyBinary = _utils.pack(\">H\", [key]);\n const typeBinary = _utils.pack(\">H\", [_constants.Types[\"Long\"]]);\n const lengthBinary = _utils.pack(\">L\", [1]);\n interopPointer = keyBinary + typeBinary + lengthBinary + pointerBinary;\n }\n if (existFirstIfd) {\n const pointerValue = (TIFF_HEADER_LENGTH + zerothIfdLength +\n exifIfdLength + gpsIfdLength + interopIfdLength);\n firstIfdPointer = _utils.pack(\">L\", [pointerValue]);\n const thumbnailPointer = (pointerValue + firstIfdSet[0].length + 24 +\n 4 + firstIfdSet[1].length);\n const thumbnailPointerBinary = (\"\\x02\\x01\\x00\\x04\\x00\\x00\\x00\\x01\" +\n _utils.pack(\">L\", [thumbnailPointer]));\n const thumbnailLengthBinary = (\"\\x02\\x02\\x00\\x04\\x00\\x00\\x00\\x01\" +\n _utils.pack(\">L\", [thumbnail.length]));\n firstIfdBytes = (firstIfdSet[0] + thumbnailPointerBinary +\n thumbnailLengthBinary + \"\\x00\\x00\\x00\\x00\" +\n firstIfdSet[1] + thumbnail);\n }\n\n const zerothIfdBinary = (zerothIfdSet[0] + exifPointer + gpsPointer +\n firstIfdPointer + zerothIfdSet[1]);\n if (existExifIfd) {\n exifIfdBytes = exifIfdSet[0] + interopPointer + exifIfdSet[1];\n }\n\n return (header + zerothIfdBinary + exifIfdBytes + gpsIfdBytes +\n interopIfdBytes + firstIfdBytes);\n};\n"],"names":["constants.Types","exceptions.ValueConvertError","constants.Tags","Tags","_constants.Tags","TagValues","_constants.TagValues","_utils.atob","_utils.splitIntoSegments","_utils.btoa","_utils.pack","_utils.mergeSegments","_utils.ExifReader","_utils.unpack","_utils.copy","_utils.dictToBytes","_utils.getThumbnail","_constants.Types"],"mappings":";;;;;;IAIO,MAAM,KAAK,GAAU;QACxB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;QACR,SAAS,EAAE,EAAE;KAChB,CAAC;AAMF,IAAO,MAAM,QAAQ,GAAa;QAC9B,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,OAAO;QACV,CAAC,EAAE,OAAO;QACV,CAAC,EAAE,MAAM;QACT,CAAC,EAAE,UAAU;QACb,CAAC,EAAE,WAAW;QACd,CAAC,EAAE,OAAO;QACV,EAAE,EAAE,WAAW;KAClB,CAAC;AAGF,IAAO,MAAM,IAAI,GAAQ;QACrB,OAAO,EAAE;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