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

161 lines
6.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9818
// Function ID: 9819
2026-07-20 16:05:17 +00:00
// Name: authorizeConnection
2026-08-24 06:08:38 +00:00
// Dependencies: [5230, 676, 709, 4346, 9789, 9819, 9836, 5265, 9847, 2008, 5102, 9849, 8812, 4093, 5228, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 9818 (authorizeConnection)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import OperatorTypes from "OperatorTypes" /* 5230 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
let closure_3 = OperatorTypes.GUILD_ROLE_CONNECTION_APPLICATION_CONNECTION_TYPE;
const PlatformTypes = ME.PlatformTypes;
const result = set.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) {
({ platformType, location: _location, onClose } = overrideUrl);
let handleModalClose5 = onClose;
overrideUrl = overrideUrl.overrideUrl;
const successRedirect = overrideUrl.successRedirect;
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";
}
if (platformType === PlatformTypes.XBOX) {
2026-08-24 06:08:38 +00:00
overrideUrl(4346).hideActionSheet();
const obj15 = overrideUrl(4346);
2026-07-29 08:29:29 +00:00
const tmp23 = overrideUrl;
2026-07-20 16:05:17 +00:00
const items = [_location];
2026-08-24 06:08:38 +00:00
overrideUrl(9789).showModal(items);
2026-07-29 08:29:29 +00:00
if (null != onClose) {
function handleModalClose(arg0) {
if (handleModalClose5 != null) {
tmp();
}
2026-08-24 06:08:38 +00:00
dispatcherDefault.unsubscribe("MODAL_POP", handleModalClose5);
2026-07-29 08:29:29 +00:00
}
handleModalClose5 = handleModalClose;
const subscription = tmp23(709).subscribe("MODAL_POP", handleModalClose);
const tmp23Result = tmp23(709);
}
2026-08-24 06:08:38 +00:00
const obj16 = overrideUrl(9789);
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-08-24 06:08:38 +00:00
overrideUrl(4346).hideActionSheet();
const obj11 = overrideUrl(4346);
2026-07-29 08:29:29 +00:00
const tmp15 = overrideUrl;
2026-07-20 16:05:17 +00:00
const items1 = [_location];
2026-08-24 06:08:38 +00:00
overrideUrl(9836).showModal(items1);
2026-07-29 08:29:29 +00:00
if (null != onClose) {
const handleModalClose4 = function handleModalClose(arg0) {
if (handleModalClose5 != null) {
tmp();
}
2026-08-24 06:08:38 +00:00
dispatcherDefault.unsubscribe("MODAL_POP", handleModalClose5);
2026-07-29 08:29:29 +00:00
};
handleModalClose5 = handleModalClose4;
const subscription1 = tmp15(709).subscribe("MODAL_POP", handleModalClose4);
const tmp15Result = tmp15(709);
}
2026-08-24 06:08:38 +00:00
const obj12 = overrideUrl(9836);
2026-07-29 08:29:29 +00:00
} else if (platformType === tmp.DOMAIN) {
2026-08-24 06:08:38 +00:00
overrideUrl(4346).hideActionSheet();
const obj8 = overrideUrl(4346);
2026-07-29 08:29:29 +00:00
const tmp10 = overrideUrl;
let obj = { locationStack: null };
2026-07-20 16:05:17 +00:00
const items2 = [_location];
2026-07-29 08:29:29 +00:00
obj[0] = items2;
2026-08-24 06:08:38 +00:00
overrideUrl(5265).pushLazy(handleModalClose5(2008)(9847, dependencyMap.paths), obj);
2026-07-29 08:29:29 +00:00
if (null != onClose) {
const handleModalClose3 = function handleModalClose(arg0) {
if (handleModalClose5 != null) {
tmp();
}
2026-08-24 06:08:38 +00:00
dispatcherDefault.unsubscribe("MODAL_POP", handleModalClose5);
2026-07-29 08:29:29 +00:00
};
handleModalClose5 = handleModalClose3;
const subscription2 = tmp10(709).subscribe("MODAL_POP", handleModalClose3);
const tmp10Result = tmp10(709);
}
2026-08-24 06:08:38 +00:00
const obj9 = overrideUrl(5265);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
const value = overrideUrl(5102).get(platformType);
2026-07-20 16:05:17 +00:00
let isFederated;
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-08-24 06:08:38 +00:00
let tmp28Result = tmp28(4346);
2026-07-29 08:29:29 +00:00
tmp28Result.hideActionSheet();
2026-08-24 06:08:38 +00:00
tmp28Result = tmp28(5265);
2026-07-29 08:29:29 +00:00
obj = { platformType: null, location: null, successRedirect: null };
obj[0] = platformType;
obj[1] = _location;
obj[2] = successRedirect;
2026-08-24 06:08:38 +00:00
tmp28Result.pushLazy(handleModalClose5(2008)(9849, tmp29.paths), obj);
2026-07-29 08:29:29 +00:00
if (null != onClose) {
const handleModalClose2 = function handleModalClose(arg0) {
if (handleModalClose5 != null) {
tmp();
}
2026-08-24 06:08:38 +00:00
dispatcherDefault.unsubscribe("MODAL_POP", handleModalClose5);
2026-07-29 08:29:29 +00:00
};
handleModalClose5 = handleModalClose2;
const subscription3 = tmp28(709).subscribe("MODAL_POP", handleModalClose2);
const tmp28Result1 = tmp28(709);
}
2026-07-20 16:05:17 +00:00
} else {
if (null != overrideUrl) {
if (platformType === closure_3) {
2026-08-24 06:08:38 +00:00
let obj2 = handleModalClose5(8812);
obj1 = { shouldConfirm: true, href: null, onConfirm: null };
2026-07-29 08:29:29 +00:00
obj1[1] = overrideUrl;
obj1[2] = function onConfirm() {
2026-08-24 06:08:38 +00:00
overrideUrl(closure_1_2[13]).openURL(overrideUrl);
2026-07-20 16:05:17 +00:00
};
obj2.handleClick(obj1);
}
}
2026-07-29 08:29:29 +00:00
obj2 = { location: null, successRedirect: null };
obj2[0] = _location;
obj2[1] = successRedirect;
2026-08-24 06:08:38 +00:00
const tmp28Result2 = tmp28(5228);
tmp28(5228).authorize(platformType, obj2).then((body) => {
2026-07-20 16:05:17 +00:00
const url = body.body.url;
if (null != url) {
2026-07-29 08:29:29 +00:00
overrideUrl(table[13]).openURL(url);
const obj = overrideUrl(table[13]);
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const authorizeResult = tmp28(5228).authorize(platformType, obj2);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const obj18 = overrideUrl(5102);
2026-07-29 08:29:29 +00:00
tmp29 = dependencyMap;
2026-07-20 16:05:17 +00:00
}
}
}
2026-08-24 06:08:38 +00:00
overrideUrl(4346).hideActionSheet();
const obj13 = overrideUrl(4346);
2026-07-29 08:29:29 +00:00
const tmp19 = overrideUrl;
2026-07-20 16:05:17 +00:00
const items3 = [_location];
2026-08-24 06:08:38 +00:00
overrideUrl(9819).showModal(items3, platformType);
2026-07-29 08:29:29 +00:00
if (null != onClose) {
handleModalClose5 = function handleModalClose(arg0) {
if (handleModalClose5 != null) {
tmp();
}
2026-08-24 06:08:38 +00:00
dispatcherDefault.unsubscribe("MODAL_POP", handleModalClose5);
2026-07-29 08:29:29 +00:00
};
const subscription4 = tmp19(709).subscribe("MODAL_POP", handleModalClose5);
const tmp19Result = tmp19(709);
}
2026-08-24 06:08:38 +00:00
const obj14 = overrideUrl(9819);
2026-07-20 16:05:17 +00:00
}
};