decord/source/modules/age_gate/AgeGateActionCreators.tsx

47 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15290
// Function ID: 15291
2026-07-20 16:05:17 +00:00
// Name: submitDateOfBirth
2026-08-24 06:08:38 +00:00
// Dependencies: [1221, 676, 15289, 698, 530, 709, 2]
2026-07-20 16:05:17 +00:00
// Exports: logoutUnderageNewUser, preventUnderageRegistration, submitDateOfBirth
2026-08-24 06:08:38 +00:00
// Module 15290 (submitDateOfBirth)
import set from "set" /* 2 */;
import expandEventPropertiesDefault from "expandEventProperties" /* 698 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import result2 from "result" /* 1221 */;
import trackAgeGateSubmittedDefault from "trackAgeGateSubmitted" /* 15289 */;
import ME from "ME" /* 676 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const AgeGateAnalyticAction = result2.AgeGateAnalyticAction;
2026-07-29 08:29:29 +00:00
({ AnalyticEvents: c4, Endpoints: c5 } = ME);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/age_gate/AgeGateActionCreators.tsx");
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
export const submitDateOfBirth = function submitDateOfBirth(c0, closure_1_2) {
const _require = closure_1_2;
trackAgeGateSubmittedDefault(c0, closure_1_2);
let obj = expandEventPropertiesDefault;
obj = { source: closure_1_2, action: AgeGateAnalyticAction.AGE_GATE_SUBMITTED };
2026-07-20 16:05:17 +00:00
obj.track(constants.AGE_GATE_ACTION, obj);
2026-07-29 08:29:29 +00:00
const HTTP = _require(530).HTTP;
2026-08-24 06:08:38 +00:00
obj = { url: constants2.ME, oldFormErrors: true, body: { date_of_birth: c0.format("YYYY-MM-DD") }, rejectWithError: false };
obj1 = { date_of_birth: c0.format("YYYY-MM-DD") };
2026-07-20 16:05:17 +00:00
return HTTP.patch(obj).then((user) => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[5]);
2026-07-20 16:05:17 +00:00
obj.dispatch({ type: "CURRENT_USER_UPDATE", user: user.body });
2026-08-24 06:08:38 +00:00
obj = { source: closure_0, action: closure_1_3.AGE_GATE_SUCCESS };
closure_1_1(closure_1_2[3]).track(closure_1_4.AGE_GATE_ACTION, obj);
2026-07-20 16:05:17 +00:00
});
};
export const preventUnderageRegistration = function preventUnderageRegistration(REGISTER) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj.dispatch({ type: "AGE_GATE_PREVENT_UNDERAGE_REGISTRATION" });
obj = { source: REGISTER, action: AgeGateAnalyticAction.AGE_GATE_PREVENT_UNDERAGE_REGISTRATION };
2026-08-24 06:08:38 +00:00
expandEventPropertiesDefault.track(constants.AGE_GATE_ACTION, obj);
2026-07-20 16:05:17 +00:00
};
export const logoutUnderageNewUser = function logoutUnderageNewUser(source) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj.dispatch({ type: "AGE_GATE_LOGOUT_UNDERAGE_NEW_USER" });
obj = { source, action: AgeGateAnalyticAction.AGE_GATE_LOGOUT_UNDERAGE_NEW_USER };
2026-08-24 06:08:38 +00:00
expandEventPropertiesDefault.track(constants.AGE_GATE_ACTION, obj);
2026-07-20 16:05:17 +00:00
};