Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,107 @@
|
||||
/* Metro module 13019; source: modules/rpc/server/commands/certifiedDevices.tsx; dependencies: [4135, 661, 4291, 4122, 8079, 8076, 13020, 2] */
|
||||
function _fun99379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:6, offset: 0x021c6264, size: 262 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4135) /* metro dependency 4135: Constants */;
|
||||
const RPC_LOCAL_SCOPE = value.RPC_LOCAL_SCOPE;
|
||||
const RPC_SCOPE_CONFIG = value.RPC_SCOPE_CONFIG;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const RPCCommands = value.RPCCommands;
|
||||
const env0_3 = value.RPCErrors;
|
||||
const env0_4 = (require(4291) /* metro dependency 4291: Constants */).DeviceTypes;
|
||||
object2 = {};
|
||||
const SET_CERTIFIED_DEVICES = RPCCommands.SET_CERTIFIED_DEVICES;
|
||||
const ANY = RPC_SCOPE_CONFIG.ANY;
|
||||
const OAuth2Scopes = (require(4122) /* metro dependency 4122: OAuth2Scopes */).OAuth2Scopes;
|
||||
const RPC = OAuth2Scopes.RPC;
|
||||
object2[SET_CERTIFIED_DEVICES] = {scope: {[ANY]: [RPC, RPC_LOCAL_SCOPE]}, validation: validation_99380,
|
||||
handler: handler_99381};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rpc/server/commands/certifiedDevices.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function validation_99380(a0) { // fn#99380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:295, offset: 0x021c636a, size: 496 bytes, params: 2, frame: 27
|
||||
const value3 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0).required();
|
||||
const keys = value3.keys;
|
||||
const value4 = a0.array();
|
||||
const items2 = value4.items;
|
||||
const value5 = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
const keys2 = value5.keys;
|
||||
const object = {};
|
||||
const value7 = a0.string().required();
|
||||
const valid = value7.valid;
|
||||
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
|
||||
const AUDIO_OUTPUT = DeviceTypes.AUDIO_OUTPUT;
|
||||
const VIDEO_INPUT = DeviceTypes.VIDEO_INPUT;
|
||||
object.type = Reflect.apply(valid, value7, [[AUDIO_INPUT, AUDIO_OUTPUT, VIDEO_INPUT]]);
|
||||
let value = a0.string();
|
||||
value = value.required();
|
||||
object.id = value.min(1);
|
||||
value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys3 = value.keys;
|
||||
const object5 = {};
|
||||
object5.name = a0.string().min(1);
|
||||
object5.url = a0.string().min(1);
|
||||
object.vendor = Reflect.apply(keys3, value, [object5]);
|
||||
value = (importDefault(8079) /* metro dependency 8079: createRpcJoiSchemaObject */)(a0);
|
||||
value = value.required();
|
||||
const keys4 = value.keys;
|
||||
const object6 = {};
|
||||
object6.name = a0.string().min(1);
|
||||
object6.url = a0.string().min(1);
|
||||
object.model = Reflect.apply(keys4, value, [object6]);
|
||||
value = a0.array();
|
||||
const items3 = value.items;
|
||||
const value12 = a0.string();
|
||||
object.related = Reflect.apply(items3, value, [value12.min(1)]);
|
||||
object.echo_cancellation = a0.boolean();
|
||||
object.noise_suppression = a0.boolean();
|
||||
object.automatic_gain_control = a0.boolean();
|
||||
object.hardware_mute = a0.boolean();
|
||||
return Reflect.apply(keys, value3, [{devices: Reflect.apply(items2, value4, [Reflect.apply(keys2, value5,
|
||||
[object])])}]);
|
||||
}
|
||||
|
||||
function handler_99381({socket, args}) { // fn#99381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:810, offset: 0x021c655a, size: 182 bytes, params: 2, frame: 16
|
||||
const devices = args.devices;
|
||||
if (socket.application.id == null) {
|
||||
throw new (importDefault(8076) /* metro dependency 8076: RPCError */)({errorCode: RPCErrors.INVALID_COMMAND},
|
||||
'No application.');
|
||||
}
|
||||
const value = require(13020) /* metro dependency 13020: CertifiedDeviceActionCreators */;
|
||||
value.setCertifiedDevices(socket.application.id, devices.map(function(a0) {
|
||||
var object = {type: a0.type, id: a0.id, vendor: a0.vendor, model: a0.model};
|
||||
object.related = a0.related.filter(_fun99383);
|
||||
object.echoCancellation = a0.echo_cancellation;
|
||||
object.noiseSuppression = a0.noise_suppression;
|
||||
object.automaticGainControl = a0.automatic_gain_control;
|
||||
object.hardwareMute = a0.hardware_mute;
|
||||
return object;
|
||||
}));
|
||||
}
|
||||
|
||||
function _fun99382({type, id, vendor, model, related, echo_cancellation, noise_suppression, automatic_gain_control, hardware_mute}) { // fn#99382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:993, offset: 0x021c6610, size: 121 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
object2.type = type;
|
||||
object2.id = id;
|
||||
object2.vendor = vendor;
|
||||
object2.model = model;
|
||||
object2.related = related.filter(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return devices.some(_fun99384);
|
||||
});
|
||||
object2.echoCancellation = echo_cancellation;
|
||||
object2.noiseSuppression = noise_suppression;
|
||||
object2.automaticGainControl = automatic_gain_control;
|
||||
object2.hardwareMute = hardware_mute;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun99383(a0) { // fn#99383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13209:1074, offset: 0x021c6689, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return devices.some(_fun99384);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user