430 lines
18 KiB
TypeScript
430 lines
18 KiB
TypeScript
/* Metro module 11203; source: modules/polls/PollsHttpApi.tsx; dependencies: [5, 661, 507, 4131, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun85603(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:6, offset: 0x01f75456, size: 171 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/polls/PollsHttpApi.tsx');
|
|
exports.submitPollVote = function() {
|
|
return _submitPollVote.apply(this, arguments);
|
|
};
|
|
exports.endPollEarly = function() {
|
|
return _endPollEarly_85607.apply(this, arguments);
|
|
};
|
|
function _submitPollVote() { // fn#85604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:128, offset: 0x01f75501, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun85606).apply(this, arguments);
|
|
async function _fun85606({channelId, messageId, answerIds}) { // fn#85606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:181, offset: 0x01f75547, size: 202 bytes, params: 2, frame: 20
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var put;
|
|
var object;
|
|
var POLL_ANSWERS;
|
|
var value5;
|
|
var object2;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var APIError;
|
|
var prototype;
|
|
var aPIError;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
binding2 = env2_1;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
property = binding2[2];
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
put = HTTP.put;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
POLL_ANSWERS = binding.POLL_ANSWERS;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(POLL_ANSWERS, binding, [channelId, messageId]);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object.url = value5;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object2.answer_ids = answerIds;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object.body = object2;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(put, HTTP, [object]);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
await value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
return value8 ? value7 : undefined;
|
|
}
|
|
|
|
}
|
|
|
|
function _endPollEarly_85607() { // fn#85607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:390, offset: 0x01f75611, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun85609).apply(this, arguments);
|
|
async function _fun85609({channelId, messageId}) { // fn#85609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11389:439, offset: 0x01f75657, size: 183 bytes, params: 2, frame: 19
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var post;
|
|
var object;
|
|
var POLL_EXPIRE;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var APIError;
|
|
var prototype;
|
|
var aPIError;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
binding2 = env2_1;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
property = binding2[2];
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
post = HTTP.post;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
POLL_EXPIRE = binding.POLL_EXPIRE;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(POLL_EXPIRE, binding, [channelId, messageId]);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object.url = value5;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(post, HTTP, [object]);
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
await value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
binding = env2_0;
|
|
APIError = binding(env2_1[3]).APIError;
|
|
prototype = APIError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value = aPIError instanceof Object ? aPIError : value;
|
|
throw value;
|
|
}
|
|
return value8 ? value7 : undefined;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun85603, 11203, [5, 661, 507, 4131, 2]) /* metro module 11203, dependencies: [5, 661, 507, 4131, 2] */;
|