125 lines
6.0 KiB
TypeScript
125 lines
6.0 KiB
TypeScript
/* Metro module 4486; source: modules/instant_invite/native/DCDSendUtils.tsx; dependencies: [27, 477, 4487, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
|
|
function _fun38234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:6, offset: 0x010ba9e8, size: 176 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/DCDSendUtils.tsx');
|
|
exports.sendSMS = sendSMS;
|
|
exports.sendMail = sendMail;
|
|
exports.canSendSMS = canSendSMS;
|
|
exports.canSendMail = canSendMail;
|
|
exports.canOpenUrlScheme = canOpenUrlScheme;
|
|
function sendSMS(a0, a1) { // fn#38235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:229, offset: 0x010baa98, size: 137 bytes, params: 3, frame: 17
|
|
var value;
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
|
|
value.sendSMS(a0.body ?? '', a0.recipients ?? []);
|
|
} else {
|
|
NativeModules.DCDSend.sendSMS(a0, a1);
|
|
}
|
|
}
|
|
|
|
function sendMail(a0, a1) { // fn#38236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:368, offset: 0x010bab21, size: 157 bytes, params: 3, frame: 19
|
|
var sendMail;
|
|
var subject;
|
|
var value2;
|
|
var value;
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
|
|
sendMail = value.sendMail;
|
|
subject = a0.subject;
|
|
value2 = '';
|
|
Reflect.apply(sendMail, value, [subject ?? value2, a0.body ?? value2, a0.recipients ?? []]);
|
|
} else {
|
|
NativeModules.DCDSend.sendMail(a0, a1);
|
|
}
|
|
}
|
|
|
|
function canSendSMS() { // fn#38237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:538, offset: 0x010babbe, size: 110 bytes, params: 1, frame: 15
|
|
var r0;
|
|
var Promise;
|
|
var resolve;
|
|
var value;
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
Promise = global.Promise;
|
|
resolve = Promise.resolve;
|
|
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
|
|
value = Reflect.apply(resolve, Promise, [value.canSendSMS()]);
|
|
r0 = value;
|
|
} else {
|
|
r0 = NativeModules.DCDSend.canSendSMS();
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function canSendMail() { // fn#38238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:638, offset: 0x010bac2c, size: 110 bytes, params: 1, frame: 15
|
|
var r0;
|
|
var Promise;
|
|
var resolve;
|
|
var value;
|
|
if (PlatformUtilsModule.isAndroid()) {
|
|
Promise = global.Promise;
|
|
resolve = Promise.resolve;
|
|
value = importDefault(4487) /* metro dependency 4487: NativeIntentsModule */;
|
|
value = Reflect.apply(resolve, Promise, [value.canSendMail()]);
|
|
r0 = value;
|
|
} else {
|
|
r0 = NativeModules.DCDSend.canSendMail();
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function canOpenUrlScheme(a0) { // fn#38239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:745, offset: 0x010bac9a, size: 160 bytes, params: 2, frame: 15
|
|
var environment;
|
|
var Promise;
|
|
var resolve;
|
|
var property;
|
|
var error;
|
|
const env0_0 = a0;
|
|
let value = environment;
|
|
const moduleValue = require(dependencyMap[1]);
|
|
if (moduleValue.isAndroid()) {
|
|
try {
|
|
Promise = global.Promise;
|
|
resolve = Promise.resolve;
|
|
property = dependencyMap[2];
|
|
value = importDefault(property);
|
|
value = value.canOpenUrlScheme(a0);
|
|
value = Reflect.apply(resolve, Promise, [value]);
|
|
} catch (error) {
|
|
Promise = global.Promise;
|
|
return Promise.resolve(false);
|
|
}
|
|
return value;
|
|
}
|
|
Promise = global.Promise;
|
|
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
const promise = new Promise(_fun38240);
|
|
return promise instanceof Object ? promise : value;
|
|
function _fun38240(a0) { // fn#38240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:909, offset: 0x010bad3a, size: 98 bytes, params: 2, frame: 16
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
value = Linking.canOpenURL('' + env0_0 + '://app');
|
|
value = value.then(_fun38241);
|
|
value.catch(_fun38242);
|
|
function _fun38241(a0) { // fn#38241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:946, offset: 0x00cee816, size: 19 bytes, params: 2, frame: 11
|
|
env0_0(a0);
|
|
}
|
|
|
|
function _fun38242() { // fn#38242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4664:965, offset: 0x010bad9c, size: 18 bytes, params: 1, frame: 11
|
|
env0_0(false);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun38234, 4486, [27, 477, 4487, 2]) /* metro module 4486, dependencies: [27, 477, 4487, 2] */;
|