/* Metro module 4285; source: modules/go_live/utils/StreamKeyUtils.tsx; dependencies: [57, 4286, 2] */ function _fun36336(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4457:6, offset: 0x01089742, size: 148 bytes, params: 8, frame: 18 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_0 = importDefault(57) /* metro dependency 57 */; const env0_1 = (require(4286) /* metro dependency 4286: Constants */).StreamTypes; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/go_live/utils/StreamKeyUtils.tsx'); exports.isStreamKey = function(a0) { return a0 != null && (a0.startsWith(StreamTypes.GUILD) || a0.startsWith(StreamTypes.CALL)); }; exports.decodeStreamKey = decodeStreamKey; exports.encodeStreamKey = encodeStreamKey; } function decodeStreamKey(a0) { // fn#36338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4457:321, offset: 0x01089817, size: 219 bytes, params: 2, frame: 16 let value = a0.split(':'); const property = value[0]; const GUILD = StreamTypes.GUILD; if (GUILD === property) { value = env0_0(value, 4); return {streamType: value[0], guildId: value[1], channelId: value[2], ownerId: value[3]}; } const CALL = StreamTypes.CALL; if (CALL === property) { value = env0_0(value, 3); return {streamType: value[0], channelId: value[1], ownerId: value[2]}; } const Error = global.Error; value = 'Unknown stream type ' + property; const value3 = Object.create(Error.prototype, {constructor: {value: Error}}); const error = new Error(value); throw error instanceof Object ? error : value3; } function encodeStreamKey({streamType, guildId, channelId, ownerId}) { // fn#36339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4457:625, offset: 0x010898f2, size: 176 bytes, params: 2, frame: 15 const GUILD = StreamTypes.GUILD; if (GUILD === streamType) { return [streamType, guildId, channelId, ownerId].join(':'); } const CALL = StreamTypes.CALL; if (CALL === streamType) { return [streamType, channelId, ownerId].join(':'); } const Error = global.Error; const value = 'Unknown stream type ' + streamType; const value2 = Object.create(Error.prototype, {constructor: {value: Error}}); const error = new Error(value); throw error instanceof Object ? error : value2; }