decord/source/modules/connections/authorizeConnection.native.tsx

114 lines
4.4 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 8941
// Function ID: 70597
2026-07-20 16:05:17 +00:00
// Name: authorizeConnection
2026-07-28 08:39:19 +00:00
// Dependencies: [4975, 653, 686, 4133, 8907, 8942, 8959, 4372, 8970, 1935, 4849, 8977, 8176, 3862, 4973, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-28 08:39:19 +00:00
// Module 8941 (authorizeConnection)
2026-07-23 10:11:24 +00:00
import { GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE as closure_3 } from "OperatorTypes";
import { PlatformTypes } from "ME";
let result = require("dispatcher").fileFinishedImporting("modules/connections/authorizeConnection.native.tsx");
2026-07-20 16:05:17 +00:00
export default function authorizeConnection(successRedirect) {
let _location;
let overrideUrl;
let platformType;
2026-07-23 10:11:24 +00:00
let require;
({ platformType, location: _location, onClose: require, overrideUrl } = successRedirect);
2026-07-20 16:05:17 +00:00
successRedirect = successRedirect.successRedirect;
function registerHandleModalClose() {
if (null != handleModalClose) {
2026-07-23 10:11:24 +00:00
handleModalClose = function handleModalClose() {
2026-07-20 16:05:17 +00:00
if (null != handleModalClose) {
handleModalClose();
}
2026-07-23 10:11:24 +00:00
overrideUrl(outer2_2[2]).unsubscribe("MODAL_POP", handleModalClose);
};
const subscription = overrideUrl(outer1_2[2]).subscribe("MODAL_POP", handleModalClose);
const obj = overrideUrl(outer1_2[2]);
2026-07-20 16:05:17 +00:00
}
}
if (platformType === PlatformTypes.LEAGUE_OF_LEGENDS) {
platformType = PlatformTypes.RIOT_GAMES;
}
if (null == _location) {
_location = "mobile";
}
if (platformType === PlatformTypes.XBOX) {
2026-07-28 08:39:19 +00:00
overrideUrl(4133).hideActionSheet();
const obj15 = overrideUrl(4133);
2026-07-20 16:05:17 +00:00
const items = [_location];
2026-07-28 08:39:19 +00:00
overrideUrl(8907).showModal(items);
2026-07-20 16:05:17 +00:00
const result = registerHandleModalClose();
2026-07-28 08:39:19 +00:00
const obj16 = overrideUrl(8907);
2026-07-20 16:05:17 +00:00
} else {
if (platformType !== PlatformTypes.PLAYSTATION) {
if (platformType !== PlatformTypes.PLAYSTATION_STAGING) {
if (platformType === PlatformTypes.CRUNCHYROLL) {
2026-07-28 08:39:19 +00:00
overrideUrl(4133).hideActionSheet();
const obj11 = overrideUrl(4133);
2026-07-20 16:05:17 +00:00
const items1 = [_location];
2026-07-28 08:39:19 +00:00
overrideUrl(8959).showModal(items1);
2026-07-20 16:05:17 +00:00
const result1 = registerHandleModalClose();
2026-07-28 08:39:19 +00:00
const obj12 = overrideUrl(8959);
2026-07-20 16:05:17 +00:00
} else if (platformType === PlatformTypes.DOMAIN) {
2026-07-28 08:39:19 +00:00
overrideUrl(4133).hideActionSheet();
const obj8 = overrideUrl(4133);
2026-07-20 16:05:17 +00:00
let obj = {};
const items2 = [_location];
obj.locationStack = items2;
2026-07-28 08:39:19 +00:00
overrideUrl(4372).pushLazy(require(1935) /* maybeLoadBundle */(8970, dependencyMap.paths), obj);
2026-07-20 16:05:17 +00:00
const result2 = registerHandleModalClose();
2026-07-28 08:39:19 +00:00
const obj9 = overrideUrl(4372);
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
const value = overrideUrl(4849).get(platformType);
2026-07-20 16:05:17 +00:00
let isFederated;
if (null != value) {
isFederated = value.isFederated;
}
if (true === isFederated) {
2026-07-28 08:39:19 +00:00
overrideUrl(4133).hideActionSheet();
const obj5 = overrideUrl(4133);
2026-07-20 16:05:17 +00:00
obj = { platformType, location: _location, successRedirect };
2026-07-28 08:39:19 +00:00
overrideUrl(4372).pushLazy(require(1935) /* maybeLoadBundle */(8977, dependencyMap.paths), obj);
2026-07-20 16:05:17 +00:00
const result3 = registerHandleModalClose();
2026-07-28 08:39:19 +00:00
const obj6 = overrideUrl(4372);
2026-07-20 16:05:17 +00:00
} else {
if (null != overrideUrl) {
if (platformType === closure_3) {
2026-07-28 08:39:19 +00:00
let obj2 = require(8176) /* isLinkTrusted */;
2026-07-20 16:05:17 +00:00
const obj1 = {
shouldConfirm: true,
href: overrideUrl,
onConfirm() {
2026-07-23 10:11:24 +00:00
overrideUrl(outer1_2[13]).openURL(overrideUrl);
2026-07-20 16:05:17 +00:00
}
};
obj2.handleClick(obj1);
}
}
2026-07-28 08:39:19 +00:00
obj = overrideUrl(4973);
2026-07-20 16:05:17 +00:00
obj2 = { location: _location, successRedirect };
obj.authorize(platformType, obj2).then((body) => {
const url = body.body.url;
if (null != url) {
2026-07-23 10:11:24 +00:00
overrideUrl(outer1_2[13]).openURL(url);
const obj = overrideUrl(outer1_2[13]);
2026-07-20 16:05:17 +00:00
}
});
const authorizeResult = obj.authorize(platformType, obj2);
}
2026-07-28 08:39:19 +00:00
const obj17 = overrideUrl(4849);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-28 08:39:19 +00:00
overrideUrl(4133).hideActionSheet();
const obj13 = overrideUrl(4133);
2026-07-20 16:05:17 +00:00
const items3 = [_location];
2026-07-28 08:39:19 +00:00
overrideUrl(8942).showModal(items3, platformType);
2026-07-20 16:05:17 +00:00
const result4 = registerHandleModalClose();
2026-07-28 08:39:19 +00:00
const obj14 = overrideUrl(8942);
2026-07-20 16:05:17 +00:00
}
};