73 lines
3.4 KiB
TypeScript
73 lines
3.4 KiB
TypeScript
/* Metro module 11012; source: utils/ChatRestrictions.tsx; dependencies: [661, 11013, 1244, 2] */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
|
|
function _fun84369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:6, offset: 0x01f47364, size: 184 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const items2 = [{check: check, analyticsType: '@Everyone Warning', animation: undefined}];
|
|
items2[1] = {check: function(a0) {
|
|
var r0;
|
|
var object;
|
|
var value2 = TOKEN_REGEX.test(a0);
|
|
if (value2) {
|
|
object = {};
|
|
object.body = require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.sTwS1a);
|
|
r0 = object;
|
|
} else {
|
|
r0 = !!value2;
|
|
}
|
|
return r0;
|
|
}, analyticsType: 'API Token Warning'};
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/ChatRestrictions.tsx');
|
|
exports.RESTRICTIONS = items2;
|
|
function check(a0, a1, a2) { // fn#84370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:122, offset: 0x01f4741c, size: 464 bytes, params: 4, frame: 22
|
|
var r8;
|
|
var value2;
|
|
var defaultImport2;
|
|
var value3;
|
|
var Math;
|
|
var pow;
|
|
var Math2;
|
|
var floor;
|
|
var Math3;
|
|
var value5;
|
|
const t = (IndexNativeModule).t;
|
|
const intl = (IndexNativeModule).intl;
|
|
var formatToPlainString;
|
|
var object2;
|
|
if (a2) {
|
|
if (a1.getGuildId() == null) {
|
|
return false;
|
|
}
|
|
value2 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).extractEveryoneRole(a0, a1);
|
|
if (value2 == null) {
|
|
return false;
|
|
}
|
|
defaultImport2 = importDefault(11013) /* metro dependency 11013: MentionGuardUtils */;
|
|
if (defaultImport2.shouldShowEveryoneGuard(value2, a1)) {
|
|
value3 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).everyoneMemberCount(value2,
|
|
a1);
|
|
Math = global.Math;
|
|
pow = Math.pow;
|
|
Math2 = global.Math;
|
|
floor = Math2.floor;
|
|
Math3 = global.Math;
|
|
value5 = Reflect.apply(pow, Math, [10, Reflect.apply(floor, Math2, [Math3.log10(value3)])]);
|
|
r8 = a1.isForumPost() ? t.sYW2cy : a1.isThread() ? t['2YaiQ1'] : t['47E5Rz'];
|
|
formatToPlainString = intl.formatToPlainString;
|
|
object2 = {role: value2};
|
|
Math = global.Math;
|
|
object2.count = (Math.trunc(value3 / value5) * value5).toLocaleString();
|
|
return {body: Reflect.apply(formatToPlainString, intl, [r8, object2]), footer: intl.string(t.mVyrtu)};
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun84369, 11012, [661, 11013, 1244, 2]) /* metro module 11012, dependencies: [661, 11013, 1244, 2] */;
|