decord/source/lib/uploader/Upload.tsx

117 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 4665
2026-07-24 07:16:23 +00:00
// Function ID: 40495
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 15, 17, 18, 4666, 22, 4670, 491, 631, 2]
2026-07-20 16:05:17 +00:00
// Exports: isResolvedUpload
2026-07-23 10:11:24 +00:00
// Module 4665 (_isNativeReflectConstruct)
import apply from "apply";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
2026-07-23 10:11:24 +00:00
let obj = { REACT_NATIVE: 0, [0]: "REACT_NATIVE", WEB: 1, [1]: "WEB" };
const tmp2 = ((EventEmitter) => {
2026-07-20 16:05:17 +00:00
class Upload {
constructor(arg0) {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_4(this, Upload);
obj = outer1_7(Upload);
tmp2 = outer1_6;
if (outer1_10()) {
2026-07-20 16:05:17 +00:00
tmp4 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp5 = outer1_7;
constructResult = Reflect.construct(obj, [], outer1_7(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
constructResult = obj.apply(self, undefined);
}
tmp2Result = tmp2(self, constructResult);
tmp2Result.allowOptimization = true;
tmp2Result.item = EventEmitter;
2026-07-23 10:11:24 +00:00
if (EventEmitter.platform === outer1_9.REACT_NATIVE) {
2026-07-20 16:05:17 +00:00
uri = EventEmitter.id;
tmp11 = null;
if (null == uri) {
uri = EventEmitter.uri;
}
tmp2Result.id = uri;
tmp12 = Upload;
2026-07-23 10:11:24 +00:00
tmp13 = outer1_3;
2026-07-20 16:05:17 +00:00
num3 = 5;
2026-07-23 10:11:24 +00:00
obj4 = Upload(outer1_3[5]);
2026-07-20 16:05:17 +00:00
obj = {};
({ uri: obj5.uri, filename: obj5.overrideFilename, mimeType: obj5.overrideType } = EventEmitter);
file = obj4.getFile(obj);
({ filename: tmp6.filename, isImage: tmp6.isImage, isVideo: tmp6.isVideo, type: tmp6.mimeType } = file);
({ origin: tmp6.origin, durationSecs: tmp6.durationSecs, waveform: tmp6.waveform } = EventEmitter);
} else {
id = EventEmitter.id;
tmp15 = null;
if (null == id) {
2026-07-23 10:11:24 +00:00
tmp7 = outer1_1;
tmp8 = outer1_3;
2026-07-20 16:05:17 +00:00
num = 6;
2026-07-23 10:11:24 +00:00
obj2 = outer1_1(outer1_3[6]);
2026-07-20 16:05:17 +00:00
str = "upload";
id = obj2.uniqueId("upload");
}
tmp2Result.id = id;
2026-07-23 10:11:24 +00:00
tmp9 = outer1_2;
tmp10 = outer1_3;
2026-07-20 16:05:17 +00:00
num2 = 7;
2026-07-23 10:11:24 +00:00
obj3 = outer1_2(outer1_3[7]);
2026-07-20 16:05:17 +00:00
tmp2Result.classification = obj3.classifyFile(EventEmitter.file);
str2 = "image";
tmp2Result.isImage = "image" === tmp2Result.classification;
str3 = "video";
tmp2Result.isVideo = "video" === tmp2Result.classification;
tmp2Result.filename = EventEmitter.file.name;
tmp2Result.mimeType = EventEmitter.file.type;
tmp2Result.origin = EventEmitter.origin;
}
({ isThumbnail: tmp6.isThumbnail, clip: tmp6.clip } = EventEmitter);
2026-07-23 10:11:24 +00:00
obj6 = Upload(outer1_3[8]);
2026-07-20 16:05:17 +00:00
tmp2Result.uniqueId = obj6.v4();
tmp2Result.spoiler = false;
tmp2Result.description = null;
return tmp2Result;
}
}
callback2(Upload, EventEmitter);
let obj = {
key: "cancel",
value() {
}
};
const items = [obj, ];
obj = {
key: "resetState",
value() {
return this;
}
};
items[1] = obj;
return callback(Upload, items);
2026-07-23 10:11:24 +00:00
})(require("EventEmitter").EventEmitter);
let result = require("_possibleConstructorReturn").fileFinishedImporting("lib/uploader/Upload.tsx");
2026-07-21 06:55:02 +00:00
export default tmp2;
2026-07-20 16:05:17 +00:00
export const UploadPlatform = obj;
export const isResolvedUpload = function isResolvedUpload(file) {
return undefined !== file.isVideo && undefined !== file.isImage;
};
export const UploadOrigin = { FILE_ATTACHMENT: 0, [0]: "FILE_ATTACHMENT", IMAGE_PICKER: 1, [1]: "IMAGE_PICKER", IMAGE_EDITOR: 2, [2]: "IMAGE_EDITOR" };