Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,277 @@
|
||||
/* Metro module 7223; source: stores/UploadStore.tsx; dependencies: [6, 7, 15, 17, 18, 4814, 566, 694, 2] */
|
||||
function _fun57776(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:6, offset: 0x016b5ea9, size: 514 bytes, params: 8, frame: 19
|
||||
const clearLocalUriForUpload = function() {
|
||||
env0_13 = {};
|
||||
};
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const env0_6 = RegExp('^(assets-library|ph|file):\\/\\/', '');
|
||||
const env0_7 = RegExp('^content:\\/\\/', '');
|
||||
Object = global.Object;
|
||||
const env0_8 = Object.freeze([]);
|
||||
const env0_9 = {};
|
||||
const env0_10 = {};
|
||||
const env0_11 = {};
|
||||
const env0_12 = {};
|
||||
let env0_13 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun57787(Store);
|
||||
value.displayName = 'UploadStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
||||
clearLocalUriForUpload();
|
||||
}, LOGOUT: function() {
|
||||
clearLocalUriForUpload();
|
||||
}, UPLOAD_START: UPLOAD_START_57796, UPLOAD_COMPRESSION_PROGRESS: function({channelId, file}) {
|
||||
updateFile(channelId, file);
|
||||
}, UPLOAD_PROGRESS: function({channelId, file}) {
|
||||
updateFile(channelId, file);
|
||||
}, UPLOAD_COMPLETE: function({channelId, file}) {
|
||||
return clearFile(channelId, file.id);
|
||||
}, UPLOAD_FAIL: function({channelId, file}) {
|
||||
return clearFile(channelId, file.id);
|
||||
}, UPLOAD_CANCEL_REQUEST: UPLOAD_CANCEL_REQUEST_57801, UPLOAD_ITEM_CANCEL_REQUEST: UPLOAD_ITEM_CANCEL_REQUEST,
|
||||
UPLOAD_FILE_UPDATE: UPLOAD_FILE_UPDATE, UPLOAD_RESTORE_FAILED_UPLOAD: UPLOAD_RESTORE_FAILED_UPLOAD});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/UploadStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_57777() { // fn#57777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:158, offset: 0x016b60ab, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_57777_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function storeLocalUriForUpload(a0, a1) { // fn#57780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:453, offset: 0x016b6109, size: 67 bytes, params: 3, frame: 15
|
||||
const env0_0 = a1;
|
||||
const binding = env0_13;
|
||||
const items2 = a1.items;
|
||||
const value = undefined;
|
||||
let r2 = items2 == null ? value : items2.map(_fun57781);
|
||||
r2 = r2 ?? [];
|
||||
binding[a0] = r2;
|
||||
return value;
|
||||
}
|
||||
|
||||
function clearFile(a0, a1) { // fn#57783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:820, offset: 0x016b6207, size: 95 bytes, params: 3, frame: 16
|
||||
var r0;
|
||||
const env0_0 = a1;
|
||||
const property = env0_9[a0];
|
||||
const value2 = property != null;
|
||||
if (value2) {
|
||||
env0_9[a0] = property.filter(function({id}) {
|
||||
return id !== require;
|
||||
});
|
||||
delete env0_10[a1];
|
||||
delete env0_11[a1];
|
||||
r0 = property.length !== env0_9[a0].length;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function updateFile(a0, a1) { // fn#57785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:949, offset: 0x016b6266, size: 145 bytes, params: 3, frame: 17
|
||||
var object2;
|
||||
const env0_0 = a1;
|
||||
const property = env0_9[a0];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
let binding = env0_9;
|
||||
binding[a0] = property.map(function(a0) {
|
||||
var r0;
|
||||
var object;
|
||||
var value = a0;
|
||||
var id = value.id;
|
||||
if (id !== require.id) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {};
|
||||
copyDataProperties(object, value, id);
|
||||
copyDataProperties(object, require, id);
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
binding = env0_11;
|
||||
let id = a1.id;
|
||||
const property2 = binding[id];
|
||||
if (property2 != null && env0_12[property2.id] != null) {
|
||||
binding = env0_12;
|
||||
id = property2.id;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_12[property2.id], property);
|
||||
copyDataProperties(object2, a1, property);
|
||||
binding[id] = object2;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun57787(a0) { // fn#57787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:1120, offset: 0x016b632e, size: 162 bytes, params: 2, frame: 16
|
||||
const closure = UploadStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(MessageStore);
|
||||
}}, {key: 'getFiles', value: value_57790}, {key: 'getMessageForFile', value: value_57791},
|
||||
{key: 'getUploaderFileForMessageId', value: value_57792}, {key: 'getUploadAttachments', value: value_57793}]);
|
||||
}
|
||||
|
||||
function UPLOAD_START_57796({channelId, file, uploader, message}) { // fn#57796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:1908, offset: 0x016b6413, size: 211 bytes, params: 2, frame: 19
|
||||
var r8;
|
||||
var binding;
|
||||
var id;
|
||||
var object;
|
||||
var value2;
|
||||
var items2;
|
||||
if (!uploader._aborted) {
|
||||
if (!uploader._errored) {
|
||||
r8 = env0_9[channelId] ?? env0_8;
|
||||
binding = env0_10;
|
||||
id = file.id;
|
||||
binding[id] = uploader;
|
||||
binding = env0_9;
|
||||
object = [];
|
||||
value2 = arraySpread(object, r8, 0, r8);
|
||||
object[value2] = file;
|
||||
value2 + 1;
|
||||
binding[channelId] = object;
|
||||
if (message != null) {
|
||||
binding = env0_11;
|
||||
id = file.id;
|
||||
binding[id] = message;
|
||||
items2 = file.items;
|
||||
if (items2 != null) {
|
||||
binding = env0_12;
|
||||
id = message.id;
|
||||
object = {};
|
||||
copyDataProperties(object, file, 0);
|
||||
object['items'] = items2;
|
||||
binding[id] = object;
|
||||
}
|
||||
storeLocalUriForUpload(message.nonce ?? message.id, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function UPLOAD_CANCEL_REQUEST_57801({file}) { // fn#57801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:2583, offset: 0x016b6529, size: 63 bytes, params: 2, frame: 11
|
||||
if (env0_10[file.id] == null) {
|
||||
return false;
|
||||
}
|
||||
global.setImmediate(_fun57802);
|
||||
}
|
||||
|
||||
function UPLOAD_ITEM_CANCEL_REQUEST({file, itemId}) { // fn#57803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:2736, offset: 0x016b6590, size: 73 bytes, params: 2, frame: 11
|
||||
if (env0_10[file.id] == null) {
|
||||
return false;
|
||||
}
|
||||
global.setImmediate(_fun57804);
|
||||
}
|
||||
|
||||
function UPLOAD_FILE_UPDATE({channelId, file}) { // fn#57805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:2877, offset: 0x016b65f3, size: 77 bytes, params: 2, frame: 16
|
||||
const property = env0_11[file.id];
|
||||
if (property != null) {
|
||||
storeLocalUriForUpload(property.nonce ?? property.id, file);
|
||||
}
|
||||
updateFile(channelId, file);
|
||||
}
|
||||
|
||||
function UPLOAD_RESTORE_FAILED_UPLOAD({file, messageId}) { // fn#57806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:3053, offset: 0x016b6640, size: 29 bytes, params: 2, frame: 3
|
||||
env0_12[messageId] = file;
|
||||
}
|
||||
|
||||
function _fun57781(a0) { // fn#57781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:544, offset: 0x016b614c, size: 174 bytes, params: 2, frame: 16
|
||||
var r4;
|
||||
var object2;
|
||||
var width;
|
||||
var id;
|
||||
const item = a0.item;
|
||||
let value = environment.__proto__;
|
||||
let binding = env1_6;
|
||||
let test = binding.test;
|
||||
let originalUri = item.originalUri;
|
||||
if (Reflect.apply(test, binding, [originalUri])) {
|
||||
object2 = {};
|
||||
width = item.width;
|
||||
value = 0;
|
||||
object2.width = width ?? value;
|
||||
r4 = item.height ?? value;
|
||||
object2.height = r4;
|
||||
originalUri = item.originalUri;
|
||||
value = '';
|
||||
r4 = originalUri ?? value;
|
||||
object2.localUri = r4;
|
||||
id = require.id;
|
||||
object2.uploaderId = id;
|
||||
id = a0.id;
|
||||
object2.uploaderItemId = id ?? value;
|
||||
return object2;
|
||||
}
|
||||
binding = env1_7;
|
||||
test = binding.test;
|
||||
originalUri = item.originalUri;
|
||||
if (Reflect.apply(test, binding, [originalUri])) {
|
||||
object2 = {};
|
||||
width = item.width;
|
||||
value = 0;
|
||||
object2.width = width ?? value;
|
||||
r4 = item.height ?? value;
|
||||
object2.height = r4;
|
||||
originalUri = item.originalUri;
|
||||
value = '';
|
||||
r4 = originalUri ?? value;
|
||||
object2.localUri = r4;
|
||||
id = require.id;
|
||||
object2.uploaderId = id;
|
||||
id = a0.id;
|
||||
object2.uploaderItemId = id ?? value;
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
|
||||
function value_57793(a0) { // fn#57793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:1660, offset: 0x016b63ea, size: 26 bytes, params: 2, frame: 2
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__;
|
||||
return env1_13[a0];
|
||||
}
|
||||
}
|
||||
|
||||
function _fun57802() { // fn#57802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:2669, offset: 0x016b6568, size: 40 bytes, params: 1, frame: 10
|
||||
return env0_0.cancel?.();
|
||||
}
|
||||
|
||||
function _fun57804() { // fn#57804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7401:2835, offset: 0x016b65d9, size: 26 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
return binding.cancelItem(itemId);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user