Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,45 @@
|
||||
/* Metro module 6909; source: modules/mobile_web_handoff/MobileWebHandoffUtils.tsx; dependencies: [5, 661, 491, 507, 2] */
|
||||
function _fun54998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:6, offset: 0x01372e40, size: 160 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
object2 = {generateNonce: generateNonce, createHandoffToken: function() {
|
||||
return _createHandoffToken.apply(this, arguments);
|
||||
}};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mobile_web_handoff/MobileWebHandoffUtils.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function _createHandoffToken() { // fn#54999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:126, offset: 0x01372ee0, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun55001).apply(this, arguments);
|
||||
}
|
||||
|
||||
function generateNonce() { // fn#55002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:436, offset: 0x01372fc1, size: 37 bytes, params: 1, frame: 11
|
||||
return (require(491) /* metro dependency 491 */).v4();
|
||||
}
|
||||
|
||||
function* _fun55001(a0) { // fn#55001, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7087:187, offset: 0x01372f19, size: 168 bytes, params: 2, frame: 14
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const HTTP = env2_0(env2_1[3]).HTTP;
|
||||
const post = HTTP.post;
|
||||
const HANDOFF = env2_3.HANDOFF;
|
||||
yield Reflect.apply(post, HTTP, [{'url': null, 'body': null, 'oldFormErrors': true, 'retries': 1,
|
||||
'rejectWithError': false, url: HANDOFF, body: {key: a0}}]);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
const handoff_token = value.body.handoff_token;
|
||||
if (handoff_token != null) {
|
||||
return handoff_token;
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('Missing handoff token!');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
/* Metro module 6906; source: modules/mobile_web_handoff/native/MobileWebHandoffLinking.tsx; dependencies: [5, 1226, 661, 5080, 6907, 6909, 683, 490, 6910, 1471, 3853, 2] */
|
||||
function _fun54969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:6, offset: 0x0137228f, size: 228 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const createHandoffTokenWithLoadingModal = function({nonce, fingerprint, handoffSource}) {
|
||||
var Promise = global.Promise;
|
||||
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
var value2 = new Promise(_fun54971);
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = constantsModule.AnalyticEvents;
|
||||
const env0_6 = constantsModule.MarketingURLs;
|
||||
const env0_7 = constantsModule.Routes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mobile_web_handoff/native/MobileWebHandoffLinking.tsx');
|
||||
exports.default = {redirectWithHandoffToken: function() {
|
||||
return _redirectWithHandoffToken.apply(this, arguments);
|
||||
}, redirectDeveloperPortalWithHandoffToken: function() {
|
||||
return _redirectDeveloperPortalWithHandoffToken.apply(this, arguments);
|
||||
}};
|
||||
}
|
||||
|
||||
function createHandoffTokenWithLoadingModal({nonce, fingerprint, handoffSource}) { // fn#54970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:191, offset: 0x01372373, size: 72 bytes, params: 2, frame: 11
|
||||
const Promise = global.Promise;
|
||||
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
const promise = new Promise(_fun54971);
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
|
||||
function _redirectWithHandoffToken() { // fn#54974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:787, offset: 0x01372569, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun54976).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _redirectDeveloperPortalWithHandoffToken() { // fn#54977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:1595, offset: 0x01372802, size: 48 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun54979).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun54971(a0) { // fn#54971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:296, offset: 0x013723bb, size: 252 bytes, params: 2, frame: 22
|
||||
var environment;
|
||||
var defaultImport2;
|
||||
var track;
|
||||
var MOBILE_WEB_HANDOFF_FAILURE;
|
||||
var maybeExtractId;
|
||||
var fingerprintBinding;
|
||||
var moduleValue;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(env1_8);
|
||||
if (AuthenticationStore.isAuthenticated()) {
|
||||
moduleValue = require(6907) /* metro dependency 6907: SimpleLoadingModal */;
|
||||
moduleValue.showSimpleLoadingModal(env1_8, {operation: operation, onResolved: a0, onRejected: onRejected});
|
||||
} else {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
MOBILE_WEB_HANDOFF_FAILURE = AnalyticEvents.MOBILE_WEB_HANDOFF_FAILURE;
|
||||
value = require(490) /* metro dependency 490: FingerprintUtils */;
|
||||
maybeExtractId = value.maybeExtractId;
|
||||
fingerprintBinding = fingerprint;
|
||||
Reflect.apply(track, defaultImport2, [MOBILE_WEB_HANDOFF_FAILURE, {reason: 'user_not_authenticated_in_app',
|
||||
fingerprint: Reflect.apply(maybeExtractId, value, [fingerprintBinding]), handoff_source: handoffSource},
|
||||
{fingerprint: fingerprintBinding}]);
|
||||
a0('null');
|
||||
}
|
||||
}
|
||||
|
||||
async function _fun54976(a0) { // fn#54976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:860, offset: 0x013725ab, size: 599 bytes, params: 2, frame: 27
|
||||
var r4;
|
||||
var URL;
|
||||
var value11;
|
||||
var url;
|
||||
var prototype;
|
||||
var uRL;
|
||||
var value14;
|
||||
var value15;
|
||||
var value16;
|
||||
var value17;
|
||||
var value18;
|
||||
let value = a1;
|
||||
if (true) {
|
||||
var r7 = value !== undefined ? value : {};
|
||||
var forceExternalBrowser = r7.forceExternalBrowser;
|
||||
forceExternalBrowser = !(forceExternalBrowser === undefined) && forceExternalBrowser;
|
||||
value = Object.create(null);
|
||||
value.forceExternalBrowser = 0;
|
||||
var value4 = copyDataProperties({}, r7, value, undefined);
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, value4, value);
|
||||
var nonce = value4.nonce;
|
||||
if (nonce != null) {
|
||||
r4 = nonce;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[5]);
|
||||
value = value.generateNonce();
|
||||
r4 = value;
|
||||
}
|
||||
object2['nonce'] = r4;
|
||||
value = environment.__proto__.__proto__;
|
||||
object2['handoffSource'] = env2_0(env2_2[8]).getLoginHandoffSourceFromRedirectTo(a0);
|
||||
await env2_9(object2);
|
||||
var value9 = undefined;
|
||||
if (false) {
|
||||
return value9;
|
||||
}
|
||||
if (value4.skipLoginRedirect === true) {
|
||||
URL = global.URL;
|
||||
value14 = '' + global.location.protocol + global.window.GLOBAL_ENV.WEBAPP_ENDPOINT;
|
||||
prototype = URL.prototype;
|
||||
value15 = Object.create(prototype, {constructor: {value: URL}});
|
||||
uRL = new URL();
|
||||
value16 = uRL instanceof Object ? uRL : value15;
|
||||
URL = global.URL;
|
||||
prototype = URL.prototype;
|
||||
value17 = Object.create(prototype, {constructor: {value: URL}});
|
||||
uRL = new URL(a0);
|
||||
value18 = uRL instanceof Object ? uRL : value17;
|
||||
value16.pathname = value18.pathname;
|
||||
value16.search = value18.search;
|
||||
value16.hash = value18.hash;
|
||||
r4 = value16;
|
||||
} else {
|
||||
URL = global.URL;
|
||||
value11 = env2_1(env2_2[9]);
|
||||
url = value11.makeUrl(env2_7.LOGIN_HANDOFF, false);
|
||||
uRL = new URL();
|
||||
}
|
||||
var searchParams = r4.searchParams;
|
||||
searchParams.append('handoff_token', value9);
|
||||
if (value4.skipLoginRedirect !== true) {
|
||||
searchParams = r4.searchParams;
|
||||
searchParams.append('handoff_key', object2.nonce);
|
||||
searchParams = r4.searchParams;
|
||||
searchParams.append('redirect_to', a0);
|
||||
}
|
||||
value = env2_1(env2_2[10]);
|
||||
if (forceExternalBrowser) {
|
||||
value.openURLExternally(r4.href);
|
||||
} else {
|
||||
value.performURLNavigation(r4.href);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function _fun54979(a0) { // fn#54979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:1698, offset: 0x01372844, size: 304 bytes, params: 2, frame: 22
|
||||
var r4;
|
||||
var binding;
|
||||
let value = a1;
|
||||
if (true) {
|
||||
var r2 = value !== undefined ? value : {};
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, r2, undefined);
|
||||
var nonce = r2.nonce;
|
||||
if (nonce != null) {
|
||||
r4 = nonce;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[5]);
|
||||
value = value.generateNonce();
|
||||
r4 = value;
|
||||
}
|
||||
object2['nonce'] = r4;
|
||||
value = environment.__proto__.__proto__;
|
||||
var LoginHandoffSource = env2_0(env2_2[8]).LoginHandoffSource;
|
||||
var ROLE_SUBSCRIPTION_SETTING = LoginHandoffSource.ROLE_SUBSCRIPTION_SETTING;
|
||||
object2['handoffSource'] = ROLE_SUBSCRIPTION_SETTING;
|
||||
await env2_9(object2);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
var URL = global.URL;
|
||||
var protocol = global.location.protocol;
|
||||
binding = env2_6;
|
||||
var DEVELOPER_PORTAL_LOGIN_HANDOFF = binding.DEVELOPER_PORTAL_LOGIN_HANDOFF;
|
||||
var uRL = new URL('' + protocol + Reflect.apply(DEVELOPER_PORTAL_LOGIN_HANDOFF, binding, [object2.nonce, value5,
|
||||
a0]));
|
||||
value = env2_1(env2_2[10]);
|
||||
value.performURLNavigation(uRL.href);
|
||||
}
|
||||
}
|
||||
|
||||
function operation() { // fn#54972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:386, offset: 0x013724b7, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(6909) /* metro dependency 6909: MobileWebHandoffUtils */;
|
||||
return value.createHandoffToken(nonce);
|
||||
}
|
||||
|
||||
function onRejected() { // fn#54973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7084:444, offset: 0x013724e4, size: 133 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const MOBILE_WEB_HANDOFF_FAILURE = AnalyticEvents.MOBILE_WEB_HANDOFF_FAILURE;
|
||||
value = require(490) /* metro dependency 490: FingerprintUtils */;
|
||||
const maybeExtractId = value.maybeExtractId;
|
||||
const fingerprintBinding = fingerprint;
|
||||
Reflect.apply(track, defaultImport, [MOBILE_WEB_HANDOFF_FAILURE, {reason: 'handoff_token_fetch_failure',
|
||||
fingerprint: Reflect.apply(maybeExtractId, value, [fingerprintBinding]), handoff_source: handoffSource},
|
||||
{fingerprint: fingerprintBinding}]);
|
||||
env0_0('null');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 6907; source: modules/mobile_web_handoff/native/SimpleLoadingModal.tsx; dependencies: [5080, 6908, 1962, 2] */
|
||||
function _fun54982(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7085:6, offset: 0x01372974, size: 101 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mobile_web_handoff/native/SimpleLoadingModal.tsx');
|
||||
exports.showSimpleLoadingModal = showSimpleLoadingModal;
|
||||
}
|
||||
|
||||
function showSimpleLoadingModal(a0, a1) { // fn#54983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7085:207, offset: 0x013729d9, size: 138 bytes, params: 3, frame: 20
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a1, undefined);
|
||||
object2['onDismissed'] = onDismissed;
|
||||
Reflect.apply(pushLazy, defaultImport, [value, object2, a0, {animation: 'none'}]);
|
||||
}
|
||||
|
||||
function onDismissed() { // fn#54984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7085:301, owner: showSimpleLoadingModal.onDismissed, offset: 0x01372a63, size: 74 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(env0_0);
|
||||
if (require.onDismissed != null) {
|
||||
require.onDismissed();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/* Metro module 6908; source: modules/mobile_web_handoff/native/SimpleLoadingModalUI.tsx; dependencies: [31, 27, 33, 4501, 5461, 2] */
|
||||
function _fun54985(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:6, offset: 0x01372aad, size: 259 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Modal;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({modalBackground: {'flex': 1,
|
||||
'alignItems': 'center', 'flexDirection': 'column', 'justifyContent': 'center'}});
|
||||
object2 = {OPENING: 0};
|
||||
object2[0] = 'OPENING';
|
||||
object2.SHOWN = 1;
|
||||
object2[1] = 'SHOWN';
|
||||
object2.DISMISSED = 2;
|
||||
object2[2] = 'DISMISSED';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/mobile_web_handoff/native/SimpleLoadingModalUI.tsx');
|
||||
exports.default = SimpleLoadingModal;
|
||||
}
|
||||
|
||||
function SimpleLoadingModal({operation, onResolved = function() {
|
||||
}, onRejected = function() {
|
||||
}, cancelable, onDismissed = function() {
|
||||
}}) { // fn#54986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:379, offset: 0x01372bb0, size: 383 bytes, params: 2, frame: 21
|
||||
const env0_2 = onRejected;
|
||||
if (cancelable !== undefined) {
|
||||
}
|
||||
const styles = useStyles();
|
||||
const binding = env0_2;
|
||||
const useRef = binding.useRef;
|
||||
const OPENING = undefined.OPENING;
|
||||
const env0_5 = Reflect.apply(useRef, binding, [OPENING]);
|
||||
const value2 = binding.useCallback(_fun54990, [onDismissed]);
|
||||
binding.useEffect(_fun54993, [operation, binding.useCallback(_fun54991, [value2, onResolved]),
|
||||
binding.useCallback(_fun54992, [value2, onRejected])]);
|
||||
const modalBindingProps = {'transparent': true, 'animationType': 'none', onShow: onShow,
|
||||
onRequestClose: onRequestClose};
|
||||
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
|
||||
return (
|
||||
<Modal {...modalBindingProps}>
|
||||
<View style={styles.modalBackground}>
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun54990() { // fn#54990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:548, offset: 0x01372d2f, size: 63 bytes, params: 1, frame: 11
|
||||
const current = env0_5.current;
|
||||
const SHOWN = env1_7.SHOWN;
|
||||
if (current === SHOWN) {
|
||||
env0_4();
|
||||
}
|
||||
const binding = env0_5;
|
||||
const DISMISSED = env1_7.DISMISSED;
|
||||
binding.current = DISMISSED;
|
||||
}
|
||||
|
||||
function _fun54991(a0) { // fn#54991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:624, offset: 0x01372d6e, size: 27 bytes, params: 2, frame: 12
|
||||
env0_1(a0);
|
||||
env0_6();
|
||||
}
|
||||
|
||||
function _fun54992(a0) { // fn#54992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:663, offset: 0x01372d89, size: 27 bytes, params: 2, frame: 12
|
||||
env0_2(a0);
|
||||
env0_6();
|
||||
}
|
||||
|
||||
function _fun54993() { // fn#54993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:705, offset: 0x01372da4, size: 48 bytes, params: 1, frame: 13
|
||||
let value = operation();
|
||||
value = value.then(_fun54994);
|
||||
value.catch(_fun54995);
|
||||
}
|
||||
|
||||
function onShow() { // fn#54996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:806, owner: SimpleLoadingModal.onShow, offset: 0x01372de7, size: 65 bytes, params: 1, frame: 11
|
||||
const current = env0_5.current;
|
||||
const DISMISSED = env1_7.DISMISSED;
|
||||
if (current === DISMISSED) {
|
||||
env0_4();
|
||||
} else {
|
||||
env0_5.current = env1_7.SHOWN;
|
||||
}
|
||||
}
|
||||
|
||||
function onRequestClose() { // fn#54997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7086:873, owner: SimpleLoadingModal.onRequestClose, offset: 0x01372e28, size: 24 bytes, params: 1, frame: 9
|
||||
if (cancelable) {
|
||||
env0_6();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user