Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
115 lines
4.3 KiB
TypeScript
115 lines
4.3 KiB
TypeScript
// Module ID: 17008
|
|
// Function ID: 17009
|
|
// Name: MobileSurvey
|
|
// Dependencies: [5, 19, 4798, 1074, 21, 4607, 504, 1242, 4799, 5046, 1114, 4301, 1178, 576, 9537, 2]
|
|
// Exports: default
|
|
|
|
// Module 17008 (MobileSurvey)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import native from "native" /* 1178 */;
|
|
import LinkingDefault from "Linking" /* 4301 */;
|
|
import SurveyActionCreators from "SurveyActionCreators" /* 4799 */;
|
|
import _modDef9537 from "module_9537" /* 9537 */;
|
|
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import SurveyStore from "SurveyStore" /* 4798 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const AnalyticEvents = fn(1074).AnalyticEvents;
|
|
const jsx = fn(21).jsx;
|
|
const createStyles = fn(4607);
|
|
let closure_8 = createStyles.createStyles({ confirmIcon: { marginLeft: 4 } });
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("components_native/MobileSurvey.tsx");
|
|
|
|
export default function MobileSurvey() {
|
|
_require = closure_8();
|
|
const items = [SurveyStore];
|
|
const stateFromStores = require("initialize").useStateFromStores(items, () => currentSurvey.getCurrentSurvey());
|
|
const items1 = [stateFromStores];
|
|
const effect = noop.useEffect(() => {
|
|
if (null != stateFromStores) {
|
|
closure_0 = async function _setSurveySeen(arg0, value) {
|
|
if (c0 === 2) {
|
|
c0 = 3;
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
} else if (tmp3 === 3) {
|
|
if (arg0 === 1) {
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
const obj3 = { value, done: true };
|
|
return obj3;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c0 = 2;
|
|
if (0 === c1) {
|
|
if (arg0 === 1) {
|
|
c0 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c0 = 3;
|
|
const obj4 = { value, done: true };
|
|
return obj4;
|
|
} else if (null != c1) {
|
|
c1 = 1;
|
|
c0 = 1;
|
|
const obj5 = { value: confirmIcon(dependencyMap[8]).surveySeen(tmp5.key), done: false };
|
|
return obj5;
|
|
}
|
|
} else if (arg0 === 1) {
|
|
c0 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c0 = 3;
|
|
const obj = { value, done: true };
|
|
return obj;
|
|
}
|
|
c0 = 3;
|
|
return { value: "HermesInternal", done: null };
|
|
} catch (tmp9) {
|
|
c0 = tmp;
|
|
throw tmp9;
|
|
}
|
|
}
|
|
};
|
|
const obj2 = { type: "survey", promotion_id: tmp.id };
|
|
stateFromStores(dependencyMap[7]).track(constants.OPEN_MODAL, obj2);
|
|
(function setSurveySeen() {
|
|
const self = this;
|
|
const apply = closure_0.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})();
|
|
let obj = stateFromStores(dependencyMap[7]);
|
|
}
|
|
}, items1);
|
|
let tmp5 = null;
|
|
if (null != stateFromStores) {
|
|
let obj3 = { body: null, confirmText: null, cancelText: null, onConfirm: null, onCancel: null, renderConfirmRightIcon: null };
|
|
({ prompt: obj2.body, cta: obj2.confirmText } = stateFromStores);
|
|
const intl = tmp(1114).intl;
|
|
obj3.cancelText = intl.string(tmp(1114).t.f3Pet9);
|
|
obj3.onConfirm = function onConfirm() {
|
|
LinkingDefault.openURL(stateFromStores.url);
|
|
SurveyActionCreators.surveyHide(stateFromStores.key, false);
|
|
};
|
|
obj3.onCancel = function onCancel() {
|
|
return SurveyActionCreators.surveyHide(stateFromStores.key, true);
|
|
};
|
|
obj3.renderConfirmRightIcon = function renderConfirmRightIcon() {
|
|
return jsx(native.Icon, { style: confirmIcon.confirmIcon, color: nativeDefault.unsafe_rawColors.WHITE, size: native.Icon.Sizes.SMALL, source: _modDef9537 });
|
|
};
|
|
tmp5 = jsx(stateFromStores(5046), { body: null, confirmText: null, cancelText: null, onConfirm: null, onCancel: null, renderConfirmRightIcon: null });
|
|
const tmp8 = stateFromStores(5046);
|
|
}
|
|
return tmp5;
|
|
};
|