472 lines
15 KiB
JavaScript
472 lines
15 KiB
JavaScript
// Metro module 4834 (f4835).
|
|
import { getStringValue } from "./Module4827";
|
|
const getCreationDate = function getCreationDate(a0) {
|
|
const stringValue = getStringValue(a0);
|
|
return stringValue.length >= 8 ? stringValue.substr(0, 4) + "-" + stringValue.substr(4, 2) + "-" + stringValue.substr(6, 2) : stringValue;
|
|
};
|
|
const getCreationTime = function getCreationTime(a0) {
|
|
const stringValue = getStringValue(a0);
|
|
const length = stringValue.length;
|
|
let r16 = stringValue;
|
|
if (length >= 6) {
|
|
const r7 = stringValue.substr(0, 2) + ":" + stringValue.substr(2, 2) + ":" + stringValue.substr(4, 2);
|
|
r16 = stringValue.length === 11 ? r7 + (stringValue.substr(6, 1) + stringValue.substr(7, 2) + ":" + stringValue.substr(9, 2)) : r7;
|
|
}
|
|
return r16;
|
|
};
|
|
const getEncodingName = function getEncodingName(a0) {
|
|
const stringValue = getStringValue(a0);
|
|
let r20 = "UTF-8";
|
|
if (stringValue !== "\x1b%G") {
|
|
let r22 = "Windows-1252";
|
|
if (stringValue !== "\x1b%5") {
|
|
let r24 = "UTF-8 Level 1";
|
|
if (stringValue !== "\x1b%/G") {
|
|
let r25 = "UTF-8 Level 2";
|
|
if (stringValue !== "\x1b%/H") {
|
|
let r26 = "UTF-8 Level 3";
|
|
if (stringValue !== "\x1b%/I") {
|
|
const r27 = stringValue !== "\x1b/A" ? stringValue !== "\x1b/B" ? stringValue !== "\x1b/C" ? stringValue !== "\x1b/D" ? stringValue !== "\x1b/@" ? stringValue !== "\x1b/G" ? stringValue !== "\x1b/F" ? stringValue === "\x1b/H" ? "ISO-8859-8" : "Unknown" : "ISO-8859-7" : "ISO-8859-6" : "ISO-8859-5" : "ISO-8859-4" : "ISO-8859-3" : "ISO-8859-2" : "ISO-8859-1";
|
|
r26 = r27;
|
|
}
|
|
r25 = r26;
|
|
}
|
|
r24 = r25;
|
|
}
|
|
r22 = r24;
|
|
}
|
|
r20 = r22;
|
|
}
|
|
return r20;
|
|
};
|
|
export default {
|
|
iptc: {
|
|
256: {
|
|
name: "Model Version",
|
|
description: (a0) => ((a0[0] << 8) + a0[1]).toString()
|
|
},
|
|
261: {
|
|
name: "Destination",
|
|
repeatable: true
|
|
},
|
|
276: {
|
|
name: "File Format",
|
|
description: (a0) => ((a0[0] << 8) + a0[1]).toString()
|
|
},
|
|
278: {
|
|
name: "File Format Version",
|
|
description: (a0) => ((a0[0] << 8) + a0[1]).toString()
|
|
},
|
|
286: "Service Identifier",
|
|
296: "Envelope Number",
|
|
306: "Product ID",
|
|
316: "Envelope Priority",
|
|
326: {
|
|
name: "Date Sent",
|
|
description: getCreationDate
|
|
},
|
|
336: {
|
|
name: "Time Sent",
|
|
description: getCreationTime
|
|
},
|
|
346: {
|
|
name: "Coded Character Set",
|
|
description: getEncodingName,
|
|
encoding_name: getEncodingName
|
|
},
|
|
356: "UNO",
|
|
376: {
|
|
name: "ARM Identifier",
|
|
description: (a0) => ((a0[0] << 8) + a0[1]).toString()
|
|
},
|
|
378: {
|
|
name: "ARM Version",
|
|
description: (a0) => ((a0[0] << 8) + a0[1]).toString()
|
|
},
|
|
512: {
|
|
name: "Record Version",
|
|
description: (a0) => ((a0[0] << 8) + a0[1]).toString()
|
|
},
|
|
515: "Object Type Reference",
|
|
516: "Object Attribute Reference",
|
|
517: "Object Name",
|
|
519: "Edit Status",
|
|
520: {
|
|
name: "Editorial Update",
|
|
description: (a0) => getStringValue(a0) === "01" ? "Additional Language" : "Unknown"
|
|
},
|
|
522: "Urgency",
|
|
524: {
|
|
name: "Subject Reference",
|
|
repeatable: true,
|
|
description: (a0) => {
|
|
const r14 = getStringValue(a0).split(":");
|
|
const r4 = r14[2];
|
|
const r5 = r14[3];
|
|
let r15 = "";
|
|
const r18 = r4 + (r5 ? "/" + r14[3] : "");
|
|
if (r14[4]) {
|
|
r15 = "/" + r14[4];
|
|
}
|
|
return r18 + r15;
|
|
}
|
|
},
|
|
527: "Category",
|
|
532: {
|
|
name: "Supplemental Category",
|
|
repeatable: true
|
|
},
|
|
534: "Fixture Identifier",
|
|
537: {
|
|
name: "Keywords",
|
|
repeatable: true
|
|
},
|
|
538: {
|
|
name: "Content Location Code",
|
|
repeatable: true
|
|
},
|
|
539: {
|
|
name: "Content Location Name",
|
|
repeatable: true
|
|
},
|
|
542: "Release Date",
|
|
547: "Release Time",
|
|
549: "Expiration Date",
|
|
550: "Expiration Time",
|
|
552: "Special Instructions",
|
|
554: {
|
|
name: "Action Advised",
|
|
description: (a0) => {
|
|
const stringValue = getStringValue(a0);
|
|
return stringValue !== "01" ? stringValue !== "02" ? stringValue !== "03" ? stringValue === "04" ? "Object Reference" : "Unknown" : "Object Append" : "Object Replace" : "Object Kill";
|
|
}
|
|
},
|
|
557: {
|
|
name: "Reference Service",
|
|
repeatable: true
|
|
},
|
|
559: {
|
|
name: "Reference Date",
|
|
repeatable: true
|
|
},
|
|
562: {
|
|
name: "Reference Number",
|
|
repeatable: true
|
|
},
|
|
567: {
|
|
name: "Date Created",
|
|
description: getCreationDate
|
|
},
|
|
572: {
|
|
name: "Time Created",
|
|
description: getCreationTime
|
|
},
|
|
574: {
|
|
name: "Digital Creation Date",
|
|
description: getCreationDate
|
|
},
|
|
575: {
|
|
name: "Digital Creation Time",
|
|
description: getCreationTime
|
|
},
|
|
577: "Originating Program",
|
|
582: "Program Version",
|
|
587: {
|
|
name: "Object Cycle",
|
|
description: (a0) => {
|
|
const stringValue = getStringValue(a0);
|
|
return stringValue !== "a" ? stringValue !== "p" ? stringValue === "b" ? "both" : "Unknown" : "evening" : "morning";
|
|
}
|
|
},
|
|
592: {
|
|
name: "By-line",
|
|
repeatable: true
|
|
},
|
|
597: {
|
|
name: "By-line Title",
|
|
repeatable: true
|
|
},
|
|
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: true
|
|
},
|
|
632: "Caption/Abstract",
|
|
634: {
|
|
name: "Writer/Editor",
|
|
repeatable: true
|
|
},
|
|
637: {
|
|
name: "Rasterized Caption",
|
|
description: (a0) => a0
|
|
},
|
|
642: "Image Type",
|
|
643: {
|
|
name: "Image Orientation",
|
|
description: (a0) => {
|
|
const stringValue = getStringValue(a0);
|
|
return stringValue !== "P" ? stringValue !== "L" ? stringValue === "S" ? "Square" : "Unknown" : "Landscape" : "Portrait";
|
|
}
|
|
},
|
|
647: "Language Identifier",
|
|
662: {
|
|
name: "Audio Type",
|
|
description: (a0) => {
|
|
let r11 = getStringValue(a0);
|
|
const r13 = r11.charAt(0);
|
|
const r6 = r11.charAt(1);
|
|
const r5 = r13 !== "1" ? r13 === "2" ? "Stereo" : "" : "Mono";
|
|
const r26 = r6 === "A" ? r5 + ", actuality" : r6 === "C" ? r5 + ", question and answer session" : r6 === "M" ? r5 + ", music, transmitted by itself" : r6 === "Q" ? r5 + ", response to a question" : r6 === "R" ? r5 + ", raw sound" : r6 === "S" ? r5 + ", scener" : r6 === "V" ? r5 + ", voicer" : r6 === "W" ? r5 + ", wrap" : r5;
|
|
if (r26 !== "") {
|
|
r11 = r26;
|
|
}
|
|
return r11;
|
|
}
|
|
},
|
|
663: {
|
|
name: "Audio Sampling Rate",
|
|
description: (a0) => parseInt(getStringValue(a0), 10) + " Hz"
|
|
},
|
|
664: {
|
|
name: "Audio Sampling Resolution",
|
|
description: (a0) => {
|
|
const r12 = parseInt(getStringValue(a0), 10);
|
|
return r12 + (r12 === 1 ? " bit" : " bits");
|
|
}
|
|
},
|
|
665: {
|
|
name: "Audio Duration",
|
|
description: (a0) => {
|
|
const stringValue = getStringValue(a0);
|
|
return stringValue.length >= 6 ? stringValue.substr(0, 2) + ":" + stringValue.substr(2, 2) + ":" + stringValue.substr(4, 2) : stringValue;
|
|
}
|
|
},
|
|
666: "Audio Outcue",
|
|
698: "Short Document ID",
|
|
699: "Unique Document ID",
|
|
700: "Owner ID",
|
|
712: {
|
|
name: (a0) => a0.length === 2 ? "ObjectData Preview File Format" : "Record 2 destination",
|
|
description: (a0) => {
|
|
if (a0.length === 2) {
|
|
const r36 = (a0[0] << 8) + a0[1];
|
|
let r45 = "No ObjectData";
|
|
if (r36 !== 0) {
|
|
let r47 = "IPTC-NAA Digital Newsphoto Parameter Record";
|
|
if (r36 !== 1) {
|
|
let r49 = "IPTC7901 Recommended Message Format";
|
|
if (r36 !== 2) {
|
|
let r7 = "Tagged Image File Format (Adobe/Aldus Image data)";
|
|
if (r36 !== 3) {
|
|
let r8 = "Illustrator (Adobe Graphics data)";
|
|
if (r36 !== 4) {
|
|
let r9 = "AppleSingle (Apple Computer Inc)";
|
|
if (r36 !== 5) {
|
|
let r10 = "NAA 89-3 (ANPA 1312)";
|
|
if (r36 !== 6) {
|
|
let r11 = "MacBinary II";
|
|
if (r36 !== 7) {
|
|
let r12 = "IPTC Unstructured Character Oriented File Format (UCOFF)";
|
|
if (r36 !== 8) {
|
|
let r13 = "United Press International ANPA 1312 variant";
|
|
if (r36 !== 9) {
|
|
let r14 = "United Press International Down-Load Message";
|
|
if (r36 !== 10) {
|
|
let r15 = "JPEG File Interchange (JFIF)";
|
|
if (r36 !== 11) {
|
|
let r16 = "Photo-CD Image-Pac (Eastman Kodak)";
|
|
if (r36 !== 12) {
|
|
let r17 = "Microsoft Bit Mapped Graphics File [*.BMP]";
|
|
if (r36 !== 13) {
|
|
let r18 = "Digital Audio File [*.WAV] (Microsoft & Creative Labs)";
|
|
if (r36 !== 14) {
|
|
let r19 = "Audio plus Moving Video [*.AVI] (Microsoft)";
|
|
if (r36 !== 15) {
|
|
let r20 = "PC DOS/Windows Executable Files [*.COM][*.EXE]";
|
|
if (r36 !== 16) {
|
|
let r21 = "Compressed Binary File [*.ZIP] (PKWare Inc)";
|
|
if (r36 !== 17) {
|
|
let r22 = "Audio Interchange File Format AIFF (Apple Computer Inc)";
|
|
if (r36 !== 18) {
|
|
let r23 = "RIFF Wave (Microsoft Corporation)";
|
|
if (r36 !== 19) {
|
|
let r24 = "Freehand (Macromedia/Aldus)";
|
|
if (r36 !== 20) {
|
|
let r25 = "Hypertext Markup Language \"HTML\" (The Internet Society)";
|
|
if (r36 !== 21) {
|
|
const r26 = r36 !== 22 ? r36 !== 23 ? r36 !== 24 ? r36 !== 25 ? r36 !== 26 ? r36 !== 27 ? r36 !== 28 ? r36 !== 29 ? `Unknown format ${r36}` : "Corel Draw [*.CDR]" : "Ritzaus Bureau NITF version (RBNITF DTD)" : "Tidningarnas Telegrambyrå NITF version (TTNITF DTD)" : "Tape Archive (*.TAR)" : "News Industry Text Format (NITF)" : "Portable Document File (*.PDF) Adobe" : "MPEG 2 Audio Layer 3, ISO/IEC" : "MPEG 2 Audio Layer 2 (Musicom), ISO/IEC";
|
|
r25 = r26;
|
|
}
|
|
r24 = r25;
|
|
}
|
|
r23 = r24;
|
|
}
|
|
r22 = r23;
|
|
}
|
|
r21 = r22;
|
|
}
|
|
r20 = r21;
|
|
}
|
|
r19 = r20;
|
|
}
|
|
r18 = r19;
|
|
}
|
|
r17 = r18;
|
|
}
|
|
r16 = r17;
|
|
}
|
|
r15 = r16;
|
|
}
|
|
r14 = r15;
|
|
}
|
|
r13 = r14;
|
|
}
|
|
r12 = r13;
|
|
}
|
|
r11 = r12;
|
|
}
|
|
r10 = r11;
|
|
}
|
|
r9 = r10;
|
|
}
|
|
r8 = r9;
|
|
}
|
|
r7 = r8;
|
|
}
|
|
r49 = r7;
|
|
}
|
|
r47 = r49;
|
|
}
|
|
r45 = r47;
|
|
}
|
|
return r45;
|
|
}
|
|
return getStringValue(a0);
|
|
}
|
|
},
|
|
713: {
|
|
name: "ObjectData Preview File Format Version",
|
|
description: (a0, a1) => {
|
|
const r3 = {
|
|
"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"
|
|
}
|
|
};
|
|
const stringValue = getStringValue(a0);
|
|
if (a1["ObjectData Preview File Format"]) {
|
|
const stringValue2 = getStringValue(a1["ObjectData Preview File Format"].value);
|
|
if (r3[stringValue2] && r3[stringValue2][stringValue]) {
|
|
return r3[stringValue2][stringValue];
|
|
}
|
|
}
|
|
return stringValue;
|
|
}
|
|
},
|
|
714: "ObjectData Preview Data",
|
|
1802: {
|
|
name: "Size Mode",
|
|
description: (a0) => a0[0].toString()
|
|
},
|
|
1812: {
|
|
name: "Max Subfile Size",
|
|
description: (a0) => {
|
|
let length;
|
|
const r4 = 0 < a0.length;
|
|
let r0 = 0;
|
|
let r7 = 0;
|
|
let r6 = 0;
|
|
if (r4) {
|
|
do {
|
|
r7 = (r7 << 8) + a0[r0];
|
|
r0 = r0 + 1;
|
|
length = a0.length;
|
|
r6 = r7;
|
|
} while (r0 < length);
|
|
}
|
|
return r6.toString();
|
|
}
|
|
},
|
|
1882: {
|
|
name: "ObjectData Size Announced",
|
|
description: (a0) => {
|
|
let length;
|
|
const r4 = 0 < a0.length;
|
|
let r0 = 0;
|
|
let r7 = 0;
|
|
let r6 = 0;
|
|
if (r4) {
|
|
do {
|
|
r7 = (r7 << 8) + a0[r0];
|
|
r0 = r0 + 1;
|
|
length = a0.length;
|
|
r6 = r7;
|
|
} while (r0 < length);
|
|
}
|
|
return r6.toString();
|
|
}
|
|
},
|
|
1887: {
|
|
name: "Maximum ObjectData Size",
|
|
description: (a0) => {
|
|
let length;
|
|
const r4 = 0 < a0.length;
|
|
let r0 = 0;
|
|
let r7 = 0;
|
|
let r6 = 0;
|
|
if (r4) {
|
|
do {
|
|
r7 = (r7 << 8) + a0[r0];
|
|
r0 = r0 + 1;
|
|
length = a0.length;
|
|
r6 = r7;
|
|
} while (r0 < length);
|
|
}
|
|
return r6.toString();
|
|
}
|
|
}
|
|
}
|
|
};
|