110 lines
4.8 KiB
TypeScript
110 lines
4.8 KiB
TypeScript
/* Metro module 4911; source: modules/threads/getTimestampString.tsx; dependencies: [1244, 3738, 2] */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
|
|
function _fun43401(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5089:6, offset: 0x0115207b, size: 101 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/threads/getTimestampString.tsx');
|
|
exports.default = _default;
|
|
function _default(a0, a1) { // fn#43402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5089:124, offset: 0x011520e0, size: 652 bytes, params: 3, frame: 25
|
|
var r0;
|
|
var value10;
|
|
var value12;
|
|
var value14;
|
|
var value16;
|
|
var value18;
|
|
const value = a2;
|
|
const value2 = undefined;
|
|
const env0_0 = !(value !== value2) || value;
|
|
const value3 = (importDefault(3738) /* metro dependency 3738 */)();
|
|
const value5 = value3.diff((importDefault(3738) /* metro dependency 3738 */)(a0), 's');
|
|
const r13 = a1 != null ? a1() : value2;
|
|
const object = {};
|
|
const t = (IndexNativeModule).t;
|
|
object.seconds = t.sMPmtq;
|
|
const N9M4N1 = t.N9M4N1;
|
|
object.minutes = N9M4N1;
|
|
object.hours = t.p0KedC;
|
|
object.days = t.gjK5av;
|
|
object.months = t.kHo4Or;
|
|
const KjKr2P = t.KjKr2P;
|
|
object.years = KjKr2P;
|
|
const formatString2 = formatString;
|
|
if (value5 < 60) {
|
|
r0 = (r13 == null ? value2 : r13.seconds) != null ? formatString2('seconds', value5) : formatString2('minutes',
|
|
1);
|
|
if (r0 != null) {
|
|
return r0;
|
|
}
|
|
}
|
|
if (value5 < 3600) {
|
|
value10 = formatString2('minutes', global.Math.floor(value5 / 60));
|
|
if (value10 != null) {
|
|
return value10;
|
|
}
|
|
}
|
|
if (value5 < 86400) {
|
|
value12 = formatString2('hours', global.Math.floor(value5 / 3600));
|
|
if (value12 != null) {
|
|
return value12;
|
|
}
|
|
}
|
|
if (value5 < 2592000) {
|
|
value14 = formatString2('days', global.Math.floor(value5 / 86400));
|
|
if (value14 != null) {
|
|
return value14;
|
|
}
|
|
}
|
|
if (value5 < 31104000) {
|
|
value16 = formatString2('months', global.Math.floor(value5 / 2592000));
|
|
if (value16 != null) {
|
|
return value16;
|
|
}
|
|
}
|
|
if (value5 >= 31104000) {
|
|
if ((r13 == null ? value2 : r13.years) == null) {
|
|
return (importDefault(3738) /* metro dependency 3738 */)(a0).format('LL');
|
|
}
|
|
value18 = formatString2('years', global.Math.floor(value5 / 31104000));
|
|
if (value18 != null) {
|
|
return value18;
|
|
}
|
|
}
|
|
return (importDefault(3738) /* metro dependency 3738 */)(a0).format('LL');
|
|
function formatString(a0, a1) { // fn#43403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5089:354, owner: _default.formatString, offset: 0x0115236c, size: 114 bytes, params: 3, frame: 17
|
|
var environment;
|
|
var r1;
|
|
var r0;
|
|
var value4;
|
|
let value = ((a0, a1, a2) => {
|
|
var r0;
|
|
var value = null;
|
|
r0 = value != a1 && value != a1[a0];
|
|
r0 = r0 ? value != (value != a1[a0] ? a1[a0] : value == a2 ? undefined : a2[a0]) ? value != a1[a0] ? a1[a0] : value == a2 ? undefined : a2[a0] : value : value != (value == a2 ? undefined : a2[a0]) ? value == a2 ? undefined : a2[a0] : value;
|
|
return r0;
|
|
})(a0, env0_1, env0_0 ? env0_2 : undefined);
|
|
const value3 = null;
|
|
if (value3 == value) {
|
|
r0 = value3;
|
|
} else {
|
|
if (typeof value === 'string') {
|
|
r1 = value;
|
|
} else {
|
|
value4 = environment.__proto__;
|
|
value = (require(1244) /* metro dependency 1244: indexNative */).intl.formatToPlainString(value,
|
|
{count: a1});
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun43401, 4911, [1244, 3738, 2]) /* metro module 4911, dependencies: [1244, 3738, 2] */;
|