decord/source/modules/user_identifiers/native/IOSUserIdentifiersManager.tsx

166 lines
5.2 KiB
TypeScript
Raw Normal View History

2026-08-26 06:04:24 +00:00
// Module ID: 16829
// Function ID: 16830
2026-07-29 08:29:29 +00:00
// Name: onPostConnectionOpen
2026-08-26 06:04:24 +00:00
// Dependencies: [5, 17, 1922, 676, 5433, 500, 16830, 530, 698, 1208, 2]
2026-07-20 16:05:17 +00:00
2026-08-26 06:04:24 +00:00
// Module 16829 (onPostConnectionOpen)
import initializeDefault from "initialize" /* 5433 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import { NativeModules } from "get ActivityIndicator" /* 17 */;
import closure_5 from "mergeGuildAvatar" /* 1922 */;
import { AnalyticEvents } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let require = arg1;
2026-08-24 06:08:38 +00:00
initializeDefault;
2026-07-29 08:29:29 +00:00
class IOSUserIdentifiersManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
closure_0 = applyArgumentsResult;
applyArgumentsResult.actions = {
POST_CONNECTION_OPEN() {
return applyArgumentsResult.onPostConnectionOpen();
}
};
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const prototype = IOSUserIdentifiersManager.prototype;
prototype["onPostConnectionOpen"] = function onPostConnectionOpen() {
const self = this;
return callback(function*() {
if (v0 === 2) {
v0 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-26 06:04:24 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
v0 = 2;
if (0 === c1) {
if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
if (obj6.isIOS()) {
if (tmp15Result.isIOSAppTransactionIdTrackingEnabled("IOSUserIdentifiersManager")) {
2026-08-24 06:08:38 +00:00
const currentUser = closure_1_5.getCurrentUser();
2026-07-29 08:29:29 +00:00
if (null != currentUser) {
c1 = 1;
v0 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-07-29 08:29:29 +00:00
obj1[0] = v0.syncAppTransactionId(currentUser);
return obj1;
}
}
tmp15Result = tmp15(tmp16[6]);
}
2026-08-24 06:08:38 +00:00
obj6 = v0(closure_1_2[5]);
2026-07-29 08:29:29 +00:00
tmp15 = v0;
2026-08-24 06:08:38 +00:00
tmp16 = closure_1_2;
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
}
v0 = 3;
2026-08-26 06:04:24 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} catch (tmp9) {
v0 = tmp;
throw tmp9;
}
}
})();
};
prototype["syncAppTransactionId"] = function syncAppTransactionId(currentUser) {
2026-08-24 06:08:38 +00:00
closure_0 = currentUser;
2026-07-29 08:29:29 +00:00
return callback(function*() {
2026-08-24 06:08:38 +00:00
closure_1 = tmp3;
c3 = 1;
2026-08-04 21:03:28 +00:00
const DCDAppTransactionManager = obj.DCDAppTransactionManager;
yield DCDAppTransactionManager.getAppTransactionId();
if (1 === tmp7) {
c3 = 0;
closure_1 = closure_2;
2026-08-24 06:08:38 +00:00
let obj6 = closure_1_1(closure_1_2[9]);
2026-08-04 21:03:28 +00:00
const obj2 = { tags: null };
obj2[0] = { source: "ios_user_identifiers_manager", step: "sync_app_transaction_id" };
obj6.captureException(closure_1, obj2);
2026-08-24 06:08:38 +00:00
closure_1_1(closure_1_2[8]).track(closure_1_6.APP_TRANSACTION_ID_SYNCED, { success: false });
c5 = 3;
const obj9 = closure_1_1(closure_1_2[8]);
2026-08-04 21:03:28 +00:00
} else if (2 === tmp7) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
2026-08-04 21:03:28 +00:00
c5 = 3;
2026-07-29 08:29:29 +00:00
throw arg1;
} else if (arg0 === 2) {
2026-08-04 21:03:28 +00:00
c3 = 0;
c5 = 3;
const obj3 = { value: null, done: true };
obj3[0] = arg1;
return obj3;
2026-07-29 08:29:29 +00:00
} else {
2026-08-24 06:08:38 +00:00
const appTransactionId = arg1.appTransactionId;
if (null != appTransactionId) {
if ("" !== appTransactionId) {
const appTransactionIds = appTransactionId.appTransactionIds;
2026-08-04 21:03:28 +00:00
let hasItem;
if (appTransactionIds != null) {
hasItem = appTransactionIds.includes(c0);
}
if (hasItem) {
2026-07-29 08:29:29 +00:00
c3 = 0;
c5 = 3;
2026-08-26 06:04:24 +00:00
return { value: "HermesInternal", done: null };
2026-08-04 21:03:28 +00:00
} else {
2026-08-24 06:08:38 +00:00
const HTTP = appTransactionId(closure_1_2[7]).HTTP;
2026-08-04 21:03:28 +00:00
const obj4 = { url: "/users/@me/app-transaction-ids", body: null, rejectWithError: true };
const obj5 = { app_transaction_id: null };
obj5[0] = c0;
obj4[1] = obj5;
obj = 3;
c5 = 1;
obj6 = { value: null, done: false };
obj6[0] = HTTP.post(obj4);
return obj6;
2026-07-29 08:29:29 +00:00
}
}
}
2026-08-04 21:03:28 +00:00
c3 = 0;
c5 = 3;
2026-08-26 06:04:24 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
} else if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 !== 2) {
2026-08-24 06:08:38 +00:00
obj = closure_1_1(closure_1_2[8]);
obj.track(closure_1_6.APP_TRANSACTION_ID_SYNCED, { success: true });
2026-08-04 21:03:28 +00:00
c3 = 0;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
c3 = 0;
return arg1;
2026-07-29 08:29:29 +00:00
})();
};
const iOSUserIdentifiersManager = new IOSUserIdentifiersManager();
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/user_identifiers/native/IOSUserIdentifiersManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default iOSUserIdentifiersManager;