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

141 lines
5.2 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 9177
// Function ID: 9178
2026-07-20 16:05:17 +00:00
// Name: authorizeConnection
2026-10-09 10:00:15 +00:00
// Dependencies: [6870, 1085, 584, 5055, 9178, 12869, 12880, 5941, 12891, 2000, 5760, 12893, 8474, 4765, 6868, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-09 10:00:15 +00:00
// Module 9177 (authorizeConnection)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import LinkingDefault from "Linking" /* 4765 */;
import Constants2 from "Constants" /* 6870 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
let closure_3 = Constants2.GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE;
const PlatformTypes = Constants.PlatformTypes;
const result = size.fileFinishedImporting("modules/connections/authorizeConnection.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function authorizeConnection(overrideUrl) {
2026-10-03 08:58:59 +00:00
let _location;
let items2;
let onClose;
let platformType;
const handleModalClose6 = function handleModalClose() {
if (onClose != null) {
tmp();
}
const obj = DispatcherDefault;
obj.unsubscribe("MODAL_POP", handleModalClose);
};
2026-07-29 08:29:29 +00:00
({ platformType, location: _location, onClose } = overrideUrl);
overrideUrl = overrideUrl.overrideUrl;
const successRedirect = overrideUrl.successRedirect;
2026-10-03 08:58:59 +00:00
const tmp = PlatformTypes;
2026-07-20 16:05:17 +00:00
if (platformType === PlatformTypes.LEAGUE_OF_LEGENDS) {
2026-07-29 08:29:29 +00:00
platformType = tmp.RIOT_GAMES;
2026-07-20 16:05:17 +00:00
}
if (null == _location) {
_location = "mobile";
}
2026-10-03 08:58:59 +00:00
if (platformType === tmp.XBOX) {
2026-10-09 10:00:15 +00:00
const obj15 = overrideUrl(5055);
2026-10-03 08:58:59 +00:00
obj15.hideActionSheet();
2026-07-20 16:05:17 +00:00
const items = [_location];
2026-10-09 10:00:15 +00:00
const obj16 = overrideUrl(9178);
2026-10-03 08:58:59 +00:00
obj16.showModal(items);
const tmp23 = overrideUrl;
2026-07-29 08:29:29 +00:00
if (null != onClose) {
2026-10-03 08:58:59 +00:00
const handleModalClose = handleModalClose6;
const tmp23Result = tmp23(584);
const subscription = tmp23Result.subscribe("MODAL_POP", handleModalClose);
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (platformType !== tmp.PLAYSTATION) {
if (platformType !== tmp.PLAYSTATION_STAGING) {
if (platformType === tmp.CRUNCHYROLL) {
2026-10-09 10:00:15 +00:00
const obj11 = overrideUrl(5055);
2026-10-03 08:58:59 +00:00
obj11.hideActionSheet();
2026-07-20 16:05:17 +00:00
const items1 = [_location];
2026-10-09 10:00:15 +00:00
const obj12 = overrideUrl(12880);
2026-10-03 08:58:59 +00:00
obj12.showModal(items1);
const tmp15 = overrideUrl;
2026-07-29 08:29:29 +00:00
if (null != onClose) {
2026-10-03 08:58:59 +00:00
const handleModalClose4 = handleModalClose6;
const tmp15Result = tmp15(584);
const subscription1 = tmp15Result.subscribe("MODAL_POP", handleModalClose4);
2026-07-29 08:29:29 +00:00
}
} else if (platformType === tmp.DOMAIN) {
2026-10-09 10:00:15 +00:00
const obj8 = overrideUrl(5055);
2026-10-03 08:58:59 +00:00
obj8.hideActionSheet();
let obj = { locationStack: items2 };
items2 = [_location];
2026-10-09 10:00:15 +00:00
const obj9 = overrideUrl(5941);
obj9.pushLazy(onClose(2000)(12891, dependencyMap.paths), obj);
2026-07-29 08:29:29 +00:00
const tmp10 = overrideUrl;
if (null != onClose) {
2026-10-03 08:58:59 +00:00
const handleModalClose3 = handleModalClose6;
const tmp10Result = tmp10(584);
const subscription2 = tmp10Result.subscribe("MODAL_POP", handleModalClose3);
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
} else {
2026-10-09 10:00:15 +00:00
const obj18 = overrideUrl(5760);
2026-10-03 08:58:59 +00:00
const value = obj18.get(platformType);
2026-07-20 16:05:17 +00:00
let isFederated;
2026-10-03 08:58:59 +00:00
const tmp29 = dependencyMap;
2026-07-29 08:29:29 +00:00
if (value != null) {
2026-07-20 16:05:17 +00:00
isFederated = value.isFederated;
}
if (true === isFederated) {
2026-10-09 10:00:15 +00:00
const tmp28Result = overrideUrl(5055);
2026-10-03 08:58:59 +00:00
tmp28Result.hideActionSheet();
const obj2 = { platformType, location: _location, successRedirect };
2026-10-09 10:00:15 +00:00
const tmp28Result4 = overrideUrl(5941);
tmp28Result4.pushLazy(onClose(2000)(12893, tmp29.paths), obj2);
2026-07-29 08:29:29 +00:00
if (null != onClose) {
2026-10-03 08:58:59 +00:00
const handleModalClose2 = handleModalClose6;
const tmp28Result5 = overrideUrl(584);
const subscription3 = tmp28Result5.subscribe("MODAL_POP", handleModalClose2);
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
} else {
if (null != overrideUrl) {
if (platformType === closure_3) {
const obj4 = {
shouldConfirm: true,
href: overrideUrl,
onConfirm() {
2026-10-03 08:58:59 +00:00
const obj = LinkingDefault;
obj.openURL(overrideUrl);
}
2026-07-20 16:05:17 +00:00
};
2026-10-09 10:00:15 +00:00
const obj3 = onClose(8474);
2026-10-03 08:58:59 +00:00
obj3.handleClick(obj4);
2026-07-20 16:05:17 +00:00
}
}
const obj5 = { location: _location, successRedirect };
2026-10-09 10:00:15 +00:00
const tmp28Result6 = overrideUrl(6868);
2026-10-03 08:58:59 +00:00
const authorizeResult = tmp28Result6.authorize(platformType, obj5);
authorizeResult.then((body) => {
2026-07-20 16:05:17 +00:00
const url = body.body.url;
if (null != url) {
2026-10-03 08:58:59 +00:00
const obj = overrideUrl(dependencyMap[13]);
obj.openURL(url);
2026-07-20 16:05:17 +00:00
}
});
}
}
}
}
2026-10-09 10:00:15 +00:00
const obj13 = overrideUrl(5055);
2026-10-03 08:58:59 +00:00
obj13.hideActionSheet();
2026-07-20 16:05:17 +00:00
const items3 = [_location];
2026-10-09 10:00:15 +00:00
const obj14 = overrideUrl(12869);
2026-10-03 08:58:59 +00:00
obj14.showModal(items3, platformType);
const tmp19 = overrideUrl;
2026-07-29 08:29:29 +00:00
if (null != onClose) {
2026-10-03 08:58:59 +00:00
const handleModalClose5 = handleModalClose6;
const tmp19Result = tmp19(584);
const subscription4 = tmp19Result.subscribe("MODAL_POP", handleModalClose5);
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
}
};