decord/source/modules/age_assurance/hooks/useAgeVerificationMethodsV2.tsx

184 lines
5.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6599
// Function ID: 6600
2026-07-24 07:16:23 +00:00
// Name: useAgeVerificationMethodsV2
2026-08-24 06:08:38 +00:00
// Dependencies: [5, 32, 19, 5431, 6600, 709, 2]
2026-07-24 07:16:23 +00:00
// Exports: useAgeVerificationMethodsV2
2026-08-24 06:08:38 +00:00
// Module 6599 (useAgeVerificationMethodsV2)
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "_slicedToArray" /* 32 */;
import closure_5 from "noop" /* 19 */;
import closure_6 from "initialize" /* 5431 */;
2026-07-24 07:16:23 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/age_assurance/hooks/useAgeVerificationMethodsV2.tsx");
2026-07-24 07:16:23 +00:00
export const useAgeVerificationMethodsV2 = function useAgeVerificationMethodsV2() {
2026-08-11 06:20:06 +00:00
[tmp2, closure_0] = callback2(callback.useState(() => {
2026-08-24 06:08:38 +00:00
let methodsV2 = closure_6.methodsV2;
2026-07-29 08:29:29 +00:00
if (methodsV2 == null) {
methodsV2 = [];
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
return methodsV2;
}), 2);
2026-08-11 06:20:06 +00:00
const tmp = callback2(callback.useState(() => {
2026-08-24 06:08:38 +00:00
let methodsV2 = closure_6.methodsV2;
2026-08-11 06:20:06 +00:00
if (methodsV2 == null) {
methodsV2 = [];
}
return methodsV2;
}), 2);
2026-08-24 06:08:38 +00:00
[tmp4, importDefault] = callback2(callback.useState(() => closure_6.methodsV2FooterMessage), 2);
const tmp5 = callback2(callback.useState(() => null == closure_6.methodsV2), 2);
closure_2 = tmp5[1];
2026-08-11 06:20:06 +00:00
const tmp6 = callback2(callback.useState(false), 2);
callback = tmp6[1];
callback2 = callback.useRef(true);
2026-07-29 08:29:29 +00:00
closure_0 = undefined;
closure_0 = callback((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c5 = 0;
c6 = 0;
c4 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0) {
if (c6 === 2) {
c6 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp8 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-07-24 07:16:23 +00:00
} else {
2026-07-29 08:29:29 +00:00
try {
c6 = 2;
if (0 === c5) {
if (arg0 === 1) {
c6 = 3;
throw arg1;
} else if (arg0 === 2) {
c6 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
dependencyMap = tmp4;
closure_1 = tmp6;
2026-08-11 06:20:06 +00:00
let lib;
2026-08-24 06:08:38 +00:00
const methodsV2 = closure_2_6.methodsV2;
2026-08-11 06:20:06 +00:00
if (!lib) {
2026-07-29 08:29:29 +00:00
if (null != methodsV2) {
2026-08-11 06:20:06 +00:00
lib(methodsV2);
2026-08-24 06:08:38 +00:00
closure_1_1(tmp72.methodsV2FooterMessage);
closure_1_2(false);
closure_1_3(false);
2026-07-29 08:29:29 +00:00
c6 = 3;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: true };
2026-07-29 08:29:29 +00:00
obj1[0] = undefined;
return obj1;
}
}
2026-08-24 06:08:38 +00:00
closure_1_2(true);
closure_1_3(false);
c4 = 2;
let obj2 = lib(6600);
2026-07-29 08:29:29 +00:00
c5 = 3;
c6 = 1;
2026-08-11 06:20:06 +00:00
obj2 = { value: null, done: false };
obj2[0] = obj2.fetchAgeVerificationMethodsV2();
2026-07-29 08:29:29 +00:00
return obj2;
}
} else if (1 === tmp9) {
c4 = 0;
2026-08-11 06:20:06 +00:00
if (c4.current) {
2026-08-24 06:08:38 +00:00
closure_1_2(false);
2026-07-29 08:29:29 +00:00
}
2026-08-24 06:08:38 +00:00
throw closure_3;
2026-07-29 08:29:29 +00:00
} else {
if (2 === tmp9) {
c4 = 1;
2026-08-11 06:20:06 +00:00
if (c4.current) {
2026-08-24 06:08:38 +00:00
closure_1_3(true);
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
c6 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 0;
2026-08-11 06:20:06 +00:00
if (c4.current) {
2026-08-24 06:08:38 +00:00
closure_1_2(false);
2026-07-29 08:29:29 +00:00
}
c6 = 3;
2026-08-11 06:20:06 +00:00
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
2026-07-29 08:29:29 +00:00
} else {
2026-08-11 06:20:06 +00:00
lib = arg1;
const obj3 = { type: "AGE_VERIFICATION_METHODS_V2_LOAD_SUCCESS", methods: null, footerMessage: null };
obj3[1] = lib.methods;
obj3[2] = lib.footerMessage;
2026-08-24 06:08:38 +00:00
closure_2_1(709).dispatch(obj3);
2026-08-11 06:20:06 +00:00
if (c4.current) {
lib(lib.methods);
2026-08-24 06:08:38 +00:00
closure_1_1(lib.footerMessage);
2026-07-29 08:29:29 +00:00
}
c4 = 1;
2026-08-24 06:08:38 +00:00
const obj7 = closure_2_1(709);
2026-07-29 08:29:29 +00:00
}
c4 = 0;
2026-08-11 06:20:06 +00:00
if (c4.current) {
2026-08-24 06:08:38 +00:00
closure_1_2(false);
2026-07-29 08:29:29 +00:00
}
c6 = 3;
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
2026-08-11 06:20:06 +00:00
} catch (tmp54) {
2026-08-24 06:08:38 +00:00
closure_3 = tmp54;
2026-07-29 08:29:29 +00:00
if (tmp5 === c4) {
c6 = tmp3;
2026-08-11 06:20:06 +00:00
throw tmp54;
} else if (tmp2 === tmp56) {
2026-07-29 08:29:29 +00:00
c5 = tmp2;
} else {
c5 = tmp;
}
}
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
})();
});
2026-08-11 06:20:06 +00:00
callback = callback.useCallback(function() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = closure_0.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
}, []);
const items = [callback];
2026-08-11 06:20:06 +00:00
const effect = callback.useEffect(() => {
2026-08-24 06:08:38 +00:00
closure_4.current = true;
2026-07-29 08:29:29 +00:00
callback(false);
2026-07-24 07:16:23 +00:00
return () => {
2026-08-24 06:08:38 +00:00
closure_4.current = false;
2026-07-24 07:16:23 +00:00
};
}, items);
2026-08-24 06:08:38 +00:00
const tmp3 = callback2(callback.useState(() => closure_6.methodsV2FooterMessage), 2);
2026-07-29 08:29:29 +00:00
const items1 = [callback];
return {
2026-08-11 06:20:06 +00:00
loading: tmp5[0],
error: tmp6[0],
2026-07-29 08:29:29 +00:00
methods: tmp2,
2026-08-11 06:20:06 +00:00
footerMessage: tmp4,
refetch: callback.useCallback(() => {
2026-07-29 08:29:29 +00:00
callback(true);
}, items1)
};
2026-07-24 07:16:23 +00:00
};