Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
60 lines
2.1 KiB
TypeScript
60 lines
2.1 KiB
TypeScript
// Module ID: 13537
|
|
// Function ID: 13538
|
|
// Name: clipPOVOverlap
|
|
// Dependencies: [5444, 1074, 1385, 13538, 2]
|
|
// Exports: getClipAttachmentPOVWindow, getClipPOVOverlapMilliseconds, getClipPOVWindow
|
|
|
|
// Module 13537 (clipPOVOverlap)
|
|
import Constants from "Constants" /* 1074 */;
|
|
import FlagUtils from "FlagUtils" /* 1385 */;
|
|
import ClipsConstants from "ClipsConstants" /* 5444 */;
|
|
import getPOVExportTargetDefault from "getPOVExportTarget" /* 13538 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const ClipType = ClipsConstants.ClipType;
|
|
const MessageAttachmentFlags = Constants.MessageAttachmentFlags;
|
|
const result = size.fileFinishedImporting("modules/clips/clipPOVOverlap.tsx");
|
|
|
|
export const getClipPOVWindow = function getClipPOVWindow(type) {
|
|
if (type.type === ClipType.CLIP) {
|
|
if (null != type.applicationId) {
|
|
if (null != type.syncTimestamp) {
|
|
const obj = { applicationId: type.applicationId, startTimestamp: type.syncTimestamp - type.length, endTimestamp: type.syncTimestamp };
|
|
return obj;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
export const getClipAttachmentPOVWindow = function getClipAttachmentPOVWindow(nextResult) {
|
|
let num = nextResult.flags;
|
|
if (num == null) {
|
|
num = 0;
|
|
}
|
|
const application = nextResult.application;
|
|
let id;
|
|
if (application != null) {
|
|
id = application.id;
|
|
}
|
|
const tmp4 = getPOVExportTargetDefault(nextResult);
|
|
if (null != id) {
|
|
if (null != tmp4) {
|
|
if (hasFlagResult) {
|
|
const obj2 = { applicationId: id, startTimestamp: tmp4.syncTimestamp - 1000 * tmp4.duration, endTimestamp: tmp4.syncTimestamp };
|
|
return obj2;
|
|
}
|
|
}
|
|
}
|
|
};
|
|
export const getClipPOVOverlapMilliseconds = function getClipPOVOverlapMilliseconds(applicationId, nextResult1) {
|
|
if (applicationId.applicationId === nextResult1.applicationId) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const bound = Math.min(applicationId.endTimestamp, nextResult1.endTimestamp);
|
|
const diff = bound - Math.max(applicationId.startTimestamp, nextResult1.startTimestamp);
|
|
let tmp4;
|
|
if (diff > 5000) {
|
|
tmp4 = diff;
|
|
}
|
|
return tmp4;
|
|
}
|
|
};
|