decord/source/modules/mfa/native/screens/TotpScreen.tsx

95 lines
2.9 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 14693
// Function ID: 111895
2026-07-20 16:05:17 +00:00
// Name: isValidClipboardCode
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 57, 31, 33, 14694, 14689, 1212, 14695, 14692, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 14693 (isValidClipboardCode)
2026-07-23 10:11:24 +00:00
import MFAOptionScreen from "MFAOptionScreen";
import _slicedToArray from "_slicedToArray";
import result from "result";
import { jsx } from "jsxProd";
const require = arg1;
2026-07-20 16:05:17 +00:00
function isValidClipboardCode(arg0) {
2026-07-24 07:16:23 +00:00
let isMatch = arg0.length === require(14694) /* finishMFACheck */.TOTP_CODE_LENGTH;
2026-07-20 16:05:17 +00:00
if (isMatch) {
isMatch = /^\d+$/.test(arg0);
const obj = /^\d+$/;
}
return isMatch;
}
2026-07-23 10:11:24 +00:00
const result = require("result").fileFinishedImporting("modules/mfa/native/screens/TotpScreen.tsx");
2026-07-20 16:05:17 +00:00
export default function TotpScreen(finish) {
2026-07-23 10:11:24 +00:00
let _slicedToArray;
let result;
2026-07-20 16:05:17 +00:00
let tmp5;
let tmp7;
finish = finish.finish;
const tmp = callback(React.useState(false), 2);
let first = tmp[0];
const importDefault = tmp[1];
const tmp3 = callback(React.useState(""), 2);
const first1 = tmp3[0];
2026-07-23 10:11:24 +00:00
let MFAOptionScreen = tmp3[1];
[tmp5, _slicedToArray] = callback(React.useState(undefined), 2);
2026-07-20 16:05:17 +00:00
const tmp4 = callback(React.useState(undefined), 2);
2026-07-23 10:11:24 +00:00
[tmp7, result] = callback(React.useState(false), 2);
2026-07-20 16:05:17 +00:00
const items = [finish];
2026-07-23 10:11:24 +00:00
callback = React.useCallback((() => {
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
let closure_0 = callback(tmp);
return function() {
return callback(...arguments);
};
2026-07-23 10:11:24 +00:00
})(), items);
2026-07-20 16:05:17 +00:00
let obj = {};
const tmp6 = callback(React.useState(false), 2);
2026-07-23 10:11:24 +00:00
const intl = finish(first1[6]).intl;
obj.headerText = intl.string(finish(first1[6]).t.uc00u5);
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
const tmp10 = importDefault(first1[5]);
const intl2 = finish(first1[6]).intl;
obj.label = intl2.string(finish(first1[6]).t.HZPBOd);
const intl3 = finish(first1[6]).intl;
obj.placeholder = intl3.string(finish(first1[6]).t.tARzgo);
2026-07-20 16:05:17 +00:00
obj.isValidClipboardCode = isValidClipboardCode;
2026-07-23 10:11:24 +00:00
obj.maxLength = finish(first1[4]).TOTP_CODE_LENGTH;
2026-07-20 16:05:17 +00:00
obj.onChangeCode = callback;
obj.error = tmp5;
let tmp12 = first;
if (!first) {
tmp12 = tmp7;
}
obj.isDisabled = tmp12;
obj.textContentType = "oneTimeCode";
obj.autoComplete = "one-time-code";
obj.keyboardType = "number-pad";
2026-07-23 10:11:24 +00:00
obj.input = callback(importDefault(first1[7]), obj);
2026-07-20 16:05:17 +00:00
obj = { variant: "primary" };
2026-07-23 10:11:24 +00:00
const tmp11 = importDefault(first1[7]);
const tmp13 = callback;
const intl4 = finish(first1[6]).intl;
obj.text = intl4.string(finish(first1[6]).t.geKm7t);
2026-07-20 16:05:17 +00:00
let tmp15 = first;
if (!first) {
tmp15 = tmp7;
}
obj.loading = tmp15;
obj.onPress = function onPress() {
callback(first1);
};
if (!first) {
first = tmp7;
}
if (!first) {
2026-07-23 10:11:24 +00:00
first = first1.length !== finish(first1[4]).TOTP_CODE_LENGTH;
2026-07-20 16:05:17 +00:00
}
obj.disabled = first;
2026-07-23 10:11:24 +00:00
obj.submit = tmp13(importDefault(first1[8]), obj);
2026-07-20 16:05:17 +00:00
obj.screenProps = { mfaChallenge: finish.mfaChallenge, finish };
obj.mfaMethod = "totp";
2026-07-23 10:11:24 +00:00
return callback(tmp10, obj);
2026-07-20 16:05:17 +00:00
};