decord/source/modules/oauth2/native/authorizeCallback.tsx

88 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 10861
// Function ID: 10862
2026-07-20 16:05:17 +00:00
// Name: authorizeCallback
2026-08-05 07:35:12 +00:00
// Dependencies: [10622, 4460, 10407, 1959, 1467, 10862, 4221, 691, 3952, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 10861 (authorizeCallback)
2026-07-23 10:11:24 +00:00
import OAUTH2_AUTHORIZE_MODAL_KEY from "OAUTH2_AUTHORIZE_MODAL_KEY";
2026-07-29 08:29:29 +00:00
let c3;
let c4;
({ OAUTH2_SUCCESS_RESULT_MODAL_KEY: c3, OAUTH2_ERROR_RESULT_MODAL_KEY: c4 } = OAUTH2_AUTHORIZE_MODAL_KEY);
2026-07-23 10:11:24 +00:00
const re5 = /oauth2\/authorized/;
const re6 = /oauth2\/error/;
const result = require("error").fileFinishedImporting("modules/oauth2/native/authorizeCallback.tsx");
2026-07-20 16:05:17 +00:00
export default function authorizeCallback(arg0) {
let _location;
let canceled;
let host;
let pathname;
let searchParams;
let wasDeepLink;
({ location: _location, canceled, wasDeepLink } = arg0);
if (null != _location) {
2026-07-29 08:29:29 +00:00
let toURLSafeResult = importDefault(1467).toURLSafe(_location);
if (toURLSafeResult == null) {
2026-07-20 16:05:17 +00:00
toURLSafeResult = {};
}
({ host, pathname, searchParams } = toURLSafeResult);
if (null != host) {
2026-07-29 08:29:29 +00:00
let tmp8Result = tmp8(1467);
if (tmp8Result.isDiscordHostname(host)) {
2026-07-20 16:05:17 +00:00
if (null != pathname) {
if (null != pathname.match(closure_5)) {
2026-08-05 07:35:12 +00:00
tmp8Result = tmp8(4460);
2026-07-29 08:29:29 +00:00
let obj = { application: null, guild: null };
obj[0] = tmp;
obj[1] = tmp2;
2026-08-05 07:35:12 +00:00
tmp8Result.pushLazy(require(1959) /* asyncRequireImpl */(10862, tmp9.paths), obj, closure_3);
2026-07-20 16:05:17 +00:00
} else if (null != pathname.match(closure_6)) {
if (!canceled) {
let str;
2026-08-05 07:35:12 +00:00
const tmp8Result1 = tmp8(4460);
2026-07-29 08:29:29 +00:00
if (searchParams != null) {
2026-07-20 16:05:17 +00:00
str = "error_description";
const str2 = searchParams.get("error_description");
2026-07-29 08:29:29 +00:00
if (str2 != null) {
2026-07-20 16:05:17 +00:00
str = str2.toString();
}
}
2026-07-29 08:29:29 +00:00
if (str == null) {
2026-07-20 16:05:17 +00:00
let str1;
2026-07-29 08:29:29 +00:00
if (searchParams != null) {
2026-07-20 16:05:17 +00:00
const str4 = searchParams.get("error");
2026-07-29 08:29:29 +00:00
if (str4 != null) {
2026-07-20 16:05:17 +00:00
str1 = str4.toString();
}
}
str = str1;
}
2026-07-29 08:29:29 +00:00
obj = { error: null };
obj[0] = str;
2026-08-05 07:35:12 +00:00
tmp8Result1.pushLazy(require(1959) /* asyncRequireImpl */(10407, tmp9.paths), obj, closure_4);
const tmp17 = require(1959) /* asyncRequireImpl */(10407, tmp9.paths);
2026-07-20 16:05:17 +00:00
}
}
}
}
}
if (wasDeepLink) {
2026-08-05 07:35:12 +00:00
const browserManagerSelectedBrowser = require(4221) /* NativeModules */.getBrowserManagerSelectedBrowser();
2026-07-29 08:29:29 +00:00
wasDeepLink = browserManagerSelectedBrowser === require(691) /* keys */.WebBrowserType.IN_APP;
2026-08-05 07:35:12 +00:00
const obj5 = require(4221) /* NativeModules */;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj2 = importDefault(1467);
2026-07-20 16:05:17 +00:00
let SAFARI;
if (wasDeepLink) {
2026-07-29 08:29:29 +00:00
SAFARI = require(691) /* keys */.WebBrowserType.SAFARI;
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
importDefault(3952).openURL(_location, SAFARI);
const tmp8Result2 = importDefault(3952);
2026-07-20 16:05:17 +00:00
} else if (!canceled) {
2026-08-05 07:35:12 +00:00
obj = importDefault(4460);
obj.pushLazy(require(1959) /* asyncRequireImpl */(10407, dependencyMap.paths), undefined, closure_4);
2026-07-20 16:05:17 +00:00
}
};