decord/source/modules/rpc/server/commands/links.tsx

131 lines
4.7 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 13472
// Function ID: 103563
2026-07-20 16:05:17 +00:00
// Name: set
2026-07-27 11:26:19 +00:00
// Dependencies: [5, 1347, 4168, 4034, 653, 4156, 10557, 10559, 477, 10545, 4125, 3749, 13473, 3822, 675, 8138, 13474, 10554, 6554, 13468, 5664, 13475, 2]
2026-07-23 10:11:24 +00:00
2026-07-27 11:26:19 +00:00
// Module 13472 (set)
2026-07-23 10:11:24 +00:00
import closure_3 from "items3";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import RPC_SCOPE_CONFIG from "RPC_SCOPE_CONFIG";
import ME from "ME";
import items3 from "items3";
import createRPCCommand from "createRPCCommand";
import set from "_isNativeReflectConstruct";
2026-07-20 16:05:17 +00:00
let RPCCommands;
let RPC_AUTHENTICATED_SCOPE;
let RPC_SCOPE_CONFIG;
2026-07-23 10:11:24 +00:00
let closure_10;
let closure_6;
let closure_7;
let closure_8;
let closure_9;
const require = arg1;
({ RPC_AUTHENTICATED_SCOPE, RPC_SCOPE_CONFIG } = RPC_SCOPE_CONFIG);
({ ApplicationFlags: closure_6, PopoutWindowKeys: closure_7, RPCCommands, RPCErrors: closure_8, UserSettingsSections: closure_9, AnalyticEvents: closure_10 } = ME);
2026-07-20 16:05:17 +00:00
const items = [, ];
2026-07-23 10:11:24 +00:00
({ AM_HARMONY_PRD_APPLICATION_ID: arr[0], AM_HARMONY_STG_APPLICATION_ID: arr[1] } = items3);
let set = new Set(items);
obj = { [RPCCommands.OPEN_EXTERNAL_LINK]: obj, [RPCCommands.NAVIGATE_TO_CONNECTIONS]: obj };
2026-07-20 16:05:17 +00:00
obj = {
scope: { [RPC_SCOPE_CONFIG.ANY]: items1 },
validation(string) {
2026-07-27 11:26:19 +00:00
let obj = importDefault(10557)(string);
2026-07-20 16:05:17 +00:00
obj = {};
const requiredResult = obj.required();
obj.url = string.string().required();
return requiredResult.keys(obj);
},
handler(socket) {
2026-07-23 10:11:24 +00:00
socket = socket.socket;
const url = socket.args.url;
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
return callback(tmp)();
}
};
2026-07-23 10:11:24 +00:00
items1 = [RPC_AUTHENTICATED_SCOPE, RPC_SCOPE_CONFIG.RPC_EMBEDDED_APP_SCOPE];
2026-07-20 16:05:17 +00:00
obj = {
validation(arg0) {
2026-07-27 11:26:19 +00:00
return importDefault(10557)(arg0);
2026-07-20 16:05:17 +00:00
},
scope: { [RPC_SCOPE_CONFIG.ANY]: items2 },
handler(socket) {
socket = socket.socket;
2026-07-27 11:26:19 +00:00
let obj = require(10559) /* recurseReplaceContentTree */;
2026-07-20 16:05:17 +00:00
const result = obj.validatePostMessageTransport(socket.transport);
if (set.has(obj2.validateApplication(socket.application))) {
obj = { screen: constants3.CONNECTIONS };
2026-07-25 08:10:48 +00:00
require(6554) /* openUserSettings */.openUserSettings(obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-27 11:26:19 +00:00
let tmp4 = importDefault(10554);
2026-07-20 16:05:17 +00:00
obj = { errorCode: constants2.UNAUTHORIZED_FOR_APPLICATION };
const prototype = tmp4.prototype;
tmp4 = new tmp4(obj, "Command not available for this application");
throw tmp4;
}
2026-07-27 11:26:19 +00:00
obj2 = require(10559) /* recurseReplaceContentTree */;
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
items2 = [RPC_AUTHENTICATED_SCOPE];
items3 = [RPC_AUTHENTICATED_SCOPE];
obj[RPCCommands.SHARE_LINK] = createRPCCommand.createRPCCommand(RPCCommands.SHARE_LINK, {
2026-07-20 16:05:17 +00:00
scope: { [RPC_SCOPE_CONFIG.ANY]: items3 },
handler(arg0) {
let args;
2026-07-23 10:11:24 +00:00
let dependencyMap;
let importDefault;
let require;
2026-07-20 16:05:17 +00:00
let socket;
({ socket, args } = arg0);
2026-07-23 10:11:24 +00:00
({ custom_id: require, message: importDefault, link_id: dependencyMap } = args);
2026-07-27 11:26:19 +00:00
let obj = require(10559) /* recurseReplaceContentTree */;
2026-07-23 10:11:24 +00:00
let result = obj.validatePostMessageTransport(socket.transport);
2026-07-27 11:26:19 +00:00
const validateApplicationResult = require(10559) /* recurseReplaceContentTree */.validateApplication(socket.application);
2026-07-20 16:05:17 +00:00
if (null == validateApplicationResult) {
2026-07-27 11:26:19 +00:00
let tmp19 = importDefault(10554);
2026-07-20 16:05:17 +00:00
obj = { errorCode: constants2.INVALID_COMMAND };
const prototype3 = tmp19.prototype;
tmp19 = new tmp19(obj, "No application.");
throw tmp19;
} else {
if (obj5.hasApplicationFlag(socket.application, constants.EMBEDDED)) {
const promise = new Promise((arg0) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let obj = outer1_0(outer1_2[21]);
2026-07-20 16:05:17 +00:00
obj = {
2026-07-23 10:11:24 +00:00
applicationId: closure_3,
customId: closure_0,
2026-07-20 16:05:17 +00:00
linkId: closure_2,
message: closure_1,
2026-07-23 10:11:24 +00:00
onShare(stateFromStores, first1) {
2026-07-20 16:05:17 +00:00
const obj = {};
let tmp2 = first1;
if (!first1) {
2026-07-23 10:11:24 +00:00
tmp2 = stateFromStores;
2026-07-20 16:05:17 +00:00
}
obj.success = tmp2;
obj.didCopyLink = first1;
2026-07-23 10:11:24 +00:00
obj.didSendMessage = stateFromStores;
closure_0(obj);
2026-07-20 16:05:17 +00:00
}
};
const result = obj.openActivityShareLinkModal(obj);
});
return promise;
} else {
2026-07-27 11:26:19 +00:00
let tmp5 = importDefault(10554);
2026-07-20 16:05:17 +00:00
obj = { errorCode: constants2.INVALID_COMMAND };
const prototype = tmp5.prototype;
tmp5 = new tmp5(obj, "This application cannot access this API");
throw tmp5;
}
2026-07-25 08:10:48 +00:00
obj5 = require(5664) /* getApplicationFlags */;
2026-07-20 16:05:17 +00:00
}
2026-07-27 11:26:19 +00:00
const obj2 = require(10559) /* recurseReplaceContentTree */;
2026-07-20 16:05:17 +00:00
}
});
2026-07-23 10:11:24 +00:00
let result = set.fileFinishedImporting("modules/rpc/server/commands/links.tsx");
2026-07-20 16:05:17 +00:00
export default obj;