Files
2026-07-28 01:06:53 +03:00

865 lines
34 KiB
TypeScript

/* Metro module 9535; source: modules/qualtrics/QualtricsActionCreators.tsx; dependencies: [57, 5, 9536, 9538, 9539, 9540, 661, 507, 694, 1216, 9541, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import SurveyStore from '../../stores/SurveyStore.tsx'; /* Metro dependency 9536 */
import QualtricsStore from './QualtricsStore.tsx'; /* Metro dependency 9539 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as QualtricsResponseStoreModule from './QualtricsResponseStore.tsx'; /* Metro dependency 9538 */
import * as QualtricsConstantsModule from './QualtricsConstants.tsx'; /* Metro dependency 9540 */
function _fun74366(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:6, offset: 0x01d8b6f8, size: 324 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = function() {
return _fetchSurveyDetails.apply(this, arguments);
};
const closure2 = function() {
return _submitSurveyResponse.apply(this, arguments);
};
const closure3 = function() {
return _fireSurveyAction.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {fetchSurveyDetails: closure, submitSurveyResponse: closure2, fireSurveyAction: closure3};
(FileImportTrackerModule).fileFinishedImporting('modules/qualtrics/QualtricsActionCreators.tsx');
exports.default = object;
exports.fetchSurveyDetails = closure;
exports.submitSurveyResponse = closure2;
exports.fireSurveyAction = closure3;
function _fetchSurveyDetails() { // fn#74368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:327, offset: 0x01d8b83c, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun74370).apply(this, arguments);
function* _fun74370(a0) { // fn#74370, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:388, offset: 0x01d8b879, size: 202 bytes, params: 2, frame: 18
var binding;
var binding2;
var property;
var value3;
var HTTP;
var get;
var object;
var EMBEDDED_SURVEY;
var value4;
var value5;
var value6;
var value7;
var body;
var binding3;
var value8;
var dispatch;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
HTTP = value3.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
binding = env2_10;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
EMBEDDED_SURVEY = binding.EMBEDDED_SURVEY;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
value4 = Reflect.apply(EMBEDDED_SURVEY, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object.url = value4;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
value5 = Reflect.apply(get, HTTP, [object]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
if (value7) {
return value6;
}
try {
body = value6.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
property = binding3[8];
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
dispatch = value8.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object.type = 'QUALTRICS_SURVEY_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object.surveyId = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
object.surveyDetails = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
try {
Reflect.apply(dispatch, value8, [object]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return null;
}
return body;
}
}
function _submitSurveyResponse() { // fn#74372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:741, offset: 0x01d8b943, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun74374).apply(this, arguments);
function* _fun74374(a0, a1) { // fn#74374, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:806, offset: 0x01d8b980, size: 280 bytes, params: 3, frame: 21
var environment;
var object;
var binding2;
var property;
var value6;
var HTTP;
var post;
var object2;
var EMBEDDED_SURVEY_RESPONSE;
var value7;
var object3;
var JSON;
var stringify;
var value8;
var value9;
var value10;
var value11;
var body;
var responseId;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_6;
const surveyResponses = parseSurveyResponses(a0, a1, binding.getState().getDisplayedQuestions(a0) ?? []);
if (surveyResponses == null) {
return {responseId: 'null'};
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
value6 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
HTTP = value6.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
post = HTTP.post;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
binding = env2_10;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
EMBEDDED_SURVEY_RESPONSE = binding.EMBEDDED_SURVEY_RESPONSE;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
value7 = Reflect.apply(EMBEDDED_SURVEY_RESPONSE, binding, [a0]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object2.url = value7;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
JSON = global.JSON;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
stringify = JSON.stringify;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
value8 = Reflect.apply(stringify, JSON, [surveyResponses]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object3.values_json = value8;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object2.body = object3;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object2.rejectWithError = true;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
value9 = Reflect.apply(post, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
if (value11) {
return value10;
}
try {
body = value10.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
responseId = body.responseId;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
try {
object.responseId = responseId;
} catch (error) {
binding = env2_1;
value = binding(env2_2[9]);
value.captureException(error);
return {responseId: 'null'};
}
return object;
function parseSurveyResponses(a0, a1, a2) { // fn#74375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:867, offset: 0x01d8ba98, size: 558 bytes, params: 4, frame: 37
var r7;
var property;
var value5;
var property2;
var Questions;
var property3;
var QuestionType;
var MULTIPLE_CHOICE;
var Selector;
var MULTIPLE_ANSWER;
var SINGLE_ANSWER;
var TEXT_ENTRY;
var HermesInternal;
var concat;
var includes;
var parseInt;
var split;
var property4;
var property5;
var ChoiceOrder;
var value6;
var value7;
var value8;
const survey = env3_7.getSurvey(a0);
if (survey == null) {
return null;
}
const object = {};
let Object = global.Object;
const value3 = Object.entries(a1);
let length = value3.length;
const value4 = 0;
if (value4 < length) {
r7 = value4;
reducibleLoop2: while (true) {
property = value3[r7];
value5 = env3_3(property, 2);
property = value5[value4];
property2 = value5[1];
Questions = survey.Questions;
property3 = Questions[property];
reducibleJoin17: while (true) {
if (property3 == null) {
break reducibleJoin17;
}
QuestionType = property3.QuestionType;
MULTIPLE_CHOICE = env3_9.MULTIPLE_CHOICE;
if (QuestionType === MULTIPLE_CHOICE) {
Selector = property3.Selector;
MULTIPLE_ANSWER = env3_8.MULTIPLE_ANSWER;
if (Selector === MULTIPLE_ANSWER) {
split = property2.split;
object[property] = Reflect.apply(split, property2, [',']);
ChoiceOrder = property3.ChoiceOrder;
if (ChoiceOrder == null) {
break reducibleJoin17;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value7 = '' + property + '_DO';
ChoiceOrder = property3.ChoiceOrder;
object[value7] = ChoiceOrder;
break reducibleJoin17;
}
}
QuestionType = property3.QuestionType;
MULTIPLE_CHOICE = env3_9.MULTIPLE_CHOICE;
if (QuestionType === MULTIPLE_CHOICE) {
Selector = property3.Selector;
SINGLE_ANSWER = env3_8.SINGLE_ANSWER;
if (Selector === SINGLE_ANSWER) {
includes = property2.includes;
if (Reflect.apply(includes, property2, [':TEXT:'])) {
split = property2.split;
property4 = Reflect.apply(split, property2, [':TEXT:', 2])[value4];
split = property2.split;
property5 = Reflect.apply(split, property2, [':TEXT:', 2])[1];
parseInt = global.parseInt;
object[property] = parseInt(property4);
concat = global.HermesInternal.concat;
object['' + property + '_' + property4 + '_TEXT'] = property5;
} else {
parseInt = global.parseInt;
object[property] = parseInt(property2);
}
ChoiceOrder = property3.ChoiceOrder;
if (ChoiceOrder == null) {
break reducibleJoin17;
}
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value6 = '' + property + '_DO';
ChoiceOrder = property3.ChoiceOrder;
object[value6] = ChoiceOrder;
break reducibleJoin17;
}
}
QuestionType = property3.QuestionType;
TEXT_ENTRY = env3_9.TEXT_ENTRY;
if (QuestionType === TEXT_ENTRY) {
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object['' + property + '_TEXT'] = property2;
break reducibleJoin17;
}
object[property] = property2;
break reducibleJoin17;
}
value8 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
length = value3.length;
if (value8 < length) {
r7 = value8;
continue reducibleLoop2;
}
break reducibleLoop2;
}
}
Object = global.Object;
const env0_2 = Object.keys(a1);
a2.forEach(_fun74376);
return object;
function _fun74376(a0) { // fn#74376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:1563, offset: 0x01d8bcc6, size: 173 bytes, params: 2, frame: 15
var Selector;
var value5;
const binding = env0_2;
if (!binding.includes(a0)) {
var Questions = env0_0.Questions;
var property = Questions[a0];
if (property == null) {
return undefined;
}
var ChoiceOrder = property.ChoiceOrder;
if (ChoiceOrder != null && property.QuestionType === env4_9.MULTIPLE_CHOICE) {
Selector = property.Selector;
value5 = environment.__proto__.__proto__.__proto__.__proto__;
if (Selector === env4_8.MULTIPLE_ANSWER) {
env0_1[a0] = [];
}
env0_1['' + a0 + '_DO'] = property.ChoiceOrder;
}
}
}
}
}
}
function _fireSurveyAction() { // fn#74378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:2139, offset: 0x01d8bd73, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun74380).apply(this, arguments);
function* _fun74380(a0, a1) { // fn#74380, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9721:2196, offset: 0x01d8bdb0, size: 312 bytes, params: 3, frame: 20
var r2;
var survey;
var SURVEY_ACTION_SAMPLE_PERCENTS;
var property;
var Math;
var random;
var value5;
var value6;
var object;
var binding2;
var value7;
var HTTP;
var post;
var object2;
var EMBEDDED_SURVEY_ACTION;
var value8;
var value9;
var value10;
var binding3;
var value11;
var dispatch;
var value12;
var body;
var value13;
var error;
if (false) {
return undefined;
}
value = undefined;
let binding = env2_5;
const shouldAllowSurveyAction2 = binding.shouldAllowSurveyAction();
reducibleJoin3: while (true) {
if (shouldAllowSurveyAction2) {
binding = env2_0;
SURVEY_ACTION_SAMPLE_PERCENTS = binding(env2_2[10]).SURVEY_ACTION_SAMPLE_PERCENTS;
property = SURVEY_ACTION_SAMPLE_PERCENTS[a0];
Math = global.Math;
random = Math.random;
value5 = Reflect.apply(random, Math, []);
value6 = property >= 100 * value5;
r2 = value6;
break reducibleJoin3;
}
r2 = !!shouldAllowSurveyAction2;
break reducibleJoin3;
}
reduciblePort43: while (true) {
exceptionLanding42: while (true) {
if (r2) {
object = {action_type: a0};
reducibleJoin6: while (true) {
if (a1 == null) {
break reducibleJoin6;
}
object.metadata = a1;
break reducibleJoin6;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding42;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding42;
}
try {
property = binding2[7];
} catch (error) {
break exceptionLanding42;
}
try {
value7 = binding(property);
} catch (error) {
break exceptionLanding42;
}
try {
HTTP = value7.HTTP;
} catch (error) {
break exceptionLanding42;
}
try {
post = HTTP.post;
} catch (error) {
break exceptionLanding42;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding42;
}
try {
binding = env2_10;
} catch (error) {
break exceptionLanding42;
}
try {
EMBEDDED_SURVEY_ACTION = binding.EMBEDDED_SURVEY_ACTION;
} catch (error) {
break exceptionLanding42;
}
try {
object2.url = EMBEDDED_SURVEY_ACTION;
} catch (error) {
break exceptionLanding42;
}
try {
object2.body = object;
} catch (error) {
break exceptionLanding42;
}
try {
object2.rejectWithError = true;
} catch (error) {
break exceptionLanding42;
}
try {
value8 = Reflect.apply(post, HTTP, [object2]);
} catch (error) {
break exceptionLanding42;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding42;
}
if (value10) {
return value9;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding42;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding42;
}
try {
property = binding3[8];
} catch (error) {
break exceptionLanding42;
}
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding42;
}
try {
dispatch = value11.dispatch;
} catch (error) {
break exceptionLanding42;
}
try {
object = {'type': 'SURVEY_FETCHED', 'survey': null, 'isActionTriggered': true};
} catch (error) {
break exceptionLanding42;
}
try {
value12 = value9 == null;
} catch (error) {
break exceptionLanding42;
}
reducibleJoin39: while (true) {
if (value12) {
survey = value;
break reducibleJoin39;
}
try {
body = value9.body;
} catch (error) {
break exceptionLanding42;
}
try {
value13 = body == null;
} catch (error) {
break exceptionLanding42;
}
if (value13) {
survey = value;
break reducibleJoin39;
}
try {
survey = body.survey;
} catch (error) {
break exceptionLanding42;
}
break reducibleJoin39;
}
try {
object.survey = survey;
} catch (error) {
break exceptionLanding42;
}
try {
Reflect.apply(dispatch, value11, [object]);
} catch (error) {
break exceptionLanding42;
}
break reduciblePort43;
}
break reduciblePort43;
}
break reduciblePort43;
}
return value;
}
}
}
global.__d(_fun74366, 9535, [57, 5, 9536, 9538, 9539, 9540, 661, 507, 694, 1216, 9541,
2]) /* metro module 9535, dependencies: [57, 5, 9536, 9538, 9539, 9540, 661, 507, 694, 1216, 9541, 2] */;