126 lines
6.2 KiB
TypeScript
126 lines
6.2 KiB
TypeScript
/* Metro module 4134; source: errors/NativeDispatchError.tsx; dependencies: [6, 7, 4135, 1244, 4136, 2] */
|
|
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ConstantsModule from '../modules/rpc/Constants.tsx'; /* Metro dependency 4135 */
|
|
|
|
function _fun34332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4305:6, offset: 0x010529b4, size: 154 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const value = _fun34333();
|
|
(FileImportTrackerModule).fileFinishedImporting('errors/NativeDispatchError.tsx');
|
|
exports.default = value;
|
|
function _fun34333() { // fn#34333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4305:147, offset: 0x01052a4e, size: 57 bytes, params: 1, frame: 14
|
|
return CreateClass(NativeDispatchError, [{key: 'displayMessage', get: get_34335}]);
|
|
function NativeDispatchError(a0) { // fn#34334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4305:168, offset: 0x01052a87, size: 154 bytes, params: 2, frame: 14
|
|
env1_2(this, NativeDispatchError);
|
|
this.raw = a0;
|
|
if (a0.code != null) {
|
|
this.code = a0.code;
|
|
}
|
|
if (a0.uuid != null) {
|
|
this.uuid = a0.uuid;
|
|
}
|
|
if (a0.application_id != null) {
|
|
this.applicationId = a0.application_id;
|
|
}
|
|
if (a0.branch_id != null) {
|
|
this.branchId = a0.branch_id;
|
|
}
|
|
if (a0.context != null) {
|
|
this.context = a0.context;
|
|
} else {
|
|
this.context = {};
|
|
}
|
|
}
|
|
|
|
function get_34335() { // fn#34335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4305:498, offset: 0x01052b21, size: 1279 bytes, params: 1, frame: 20
|
|
var value;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
var available;
|
|
var required;
|
|
let code = this.code;
|
|
if (code == null) {
|
|
value = environment.__proto__;
|
|
return intl.string(t['5NMPSS']);
|
|
}
|
|
let context = this.context;
|
|
const path = context.path;
|
|
code = this.code;
|
|
value = environment.__proto__;
|
|
const DISK_LOW = DispatchErrorCodes.DISK_LOW;
|
|
if (DISK_LOW === code) {
|
|
context = this.context;
|
|
available = context.available;
|
|
required = context.required;
|
|
value = require(4136) /* metro dependency 4136: FileSizeUtils */;
|
|
value = value.formatSize(available, {useKibibytes: true});
|
|
return intl.formatToPlainString(t['2DR5dl'],
|
|
{required: (require(4136) /* metro dependency 4136: FileSizeUtils */).formatSize(required,
|
|
{useKibibytes: true}), available: value});
|
|
}
|
|
const POST_INSTALL_FAILED = DispatchErrorCodes.POST_INSTALL_FAILED;
|
|
if (POST_INSTALL_FAILED === code) {
|
|
return intl.formatToPlainString(t.hP0B3A, {name: this.context.name});
|
|
}
|
|
const FILE_NAME_TOO_LONG = DispatchErrorCodes.FILE_NAME_TOO_LONG;
|
|
if (FILE_NAME_TOO_LONG === code) {
|
|
return intl.string(t['FWht5+']);
|
|
}
|
|
const POST_INSTALL_CANCELLED = DispatchErrorCodes.POST_INSTALL_CANCELLED;
|
|
if (POST_INSTALL_CANCELLED === code) {
|
|
return intl.string(t['9CNxFJ']);
|
|
}
|
|
const IO_PERMISSION_DENIED = DispatchErrorCodes.IO_PERMISSION_DENIED;
|
|
if (IO_PERMISSION_DENIED === code) {
|
|
return intl.string(t['PJx5+Z']);
|
|
}
|
|
const NO_MANIFESTS = DispatchErrorCodes.NO_MANIFESTS;
|
|
if (NO_MANIFESTS === code) {
|
|
return intl.string(t.gLM395);
|
|
}
|
|
const NOT_ENTITLED = DispatchErrorCodes.NOT_ENTITLED;
|
|
if (NOT_ENTITLED === code) {
|
|
return intl.string(t.TLCR43);
|
|
}
|
|
const NOT_DIRECTORY = DispatchErrorCodes.NOT_DIRECTORY;
|
|
if (NOT_DIRECTORY === code) {
|
|
return intl.formatToPlainString(t.EjWbO6, {path: path});
|
|
}
|
|
const DISK_PERMISSION_DENIED = DispatchErrorCodes.DISK_PERMISSION_DENIED;
|
|
if (DISK_PERMISSION_DENIED === code) {
|
|
return intl.formatToPlainString(t.EjWbO6, {path: path});
|
|
}
|
|
const INVALID_DRIVE = DispatchErrorCodes.INVALID_DRIVE;
|
|
if (INVALID_DRIVE === code) {
|
|
return intl.formatToPlainString(t['08L2TG'], {path: path});
|
|
}
|
|
const APPLICATION_LOCK_FAILED = DispatchErrorCodes.APPLICATION_LOCK_FAILED;
|
|
if (APPLICATION_LOCK_FAILED === code) {
|
|
return intl.string(t.RDYCUV);
|
|
}
|
|
const DISK_FULL = DispatchErrorCodes.DISK_FULL;
|
|
if (DISK_FULL === code) {
|
|
return intl.string(t.mojtDJ);
|
|
}
|
|
const API_ERROR = DispatchErrorCodes.API_ERROR;
|
|
if (API_ERROR === code) {
|
|
return intl.string(t.OXD41D);
|
|
}
|
|
const MAX_REQUEST_RETRIES_EXCEEDED = DispatchErrorCodes.MAX_REQUEST_RETRIES_EXCEEDED;
|
|
if (MAX_REQUEST_RETRIES_EXCEEDED === code) {
|
|
return intl.string(t.OXD41D);
|
|
}
|
|
return intl.formatToPlainString(t.r477WB, {code: '' + this.code});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun34332, 4134, [6, 7, 4135, 1244, 4136,
|
|
2]) /* metro module 4134, dependencies: [6, 7, 4135, 1244, 4136, 2] */;
|