"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.walletTimeout = exports.walletId = exports.tourMargin = exports.testIdPrefix = exports.second = exports.minute = exports.minPINLength = exports.hour = exports.hitSlop = exports.hiddenFieldValue = exports.domain = exports.dateIntFormat = exports.attemptLockoutThresholdRules = exports.attemptLockoutBaseRules = exports.PINRules = exports.LocalStorageKeys = exports.KeychainServices = exports.EventTypes = void 0;
const lengthOfHiddenAttributes = 10;
const unicodeForBulletCharacter = '\u2022';
const dateIntFormat = 'YYYYMMDD';
exports.dateIntFormat = dateIntFormat;
const hiddenFieldValue = Array(lengthOfHiddenAttributes).fill(unicodeForBulletCharacter).join('');
// Used to property prefix TestIDs so they can be looked up
// by on-device automated testing systems like SauceLabs.
exports.hiddenFieldValue = hiddenFieldValue;
const testIdPrefix = 'com.ariesbifold:id/';
exports.testIdPrefix = testIdPrefix;
let LocalStorageKeys = /*#__PURE__*/function (LocalStorageKeys) {
  LocalStorageKeys["Onboarding"] = "OnboardingState";
  LocalStorageKeys["LoginAttempts"] = "LoginAttempts";
  LocalStorageKeys["RevokedCredentials"] = "RevokedCredentials";
  LocalStorageKeys["RevokedCredentialsMessageDismissed"] = "RevokedCredentialsMessageDismissed";
  LocalStorageKeys["Preferences"] = "PreferencesState";
  LocalStorageKeys["Migration"] = "MigrationState";
  LocalStorageKeys["Tours"] = "ToursState";
  return LocalStorageKeys;
}({});
exports.LocalStorageKeys = LocalStorageKeys;
let KeychainServices = /*#__PURE__*/function (KeychainServices) {
  KeychainServices["Salt"] = "secret.wallet.salt";
  KeychainServices["Key"] = "secret.wallet.key";
  return KeychainServices;
}({});
exports.KeychainServices = KeychainServices;
let EventTypes = /*#__PURE__*/function (EventTypes) {
  EventTypes["ERROR_ADDED"] = "ErrorAdded";
  EventTypes["ERROR_REMOVED"] = "ErrorRemoved";
  EventTypes["BIOMETRY_UPDATE"] = "BiometryUpdate";
  EventTypes["BIOMETRY_ERROR"] = "BiometryError";
  return EventTypes;
}({});
exports.EventTypes = EventTypes;
const second = 1000;
exports.second = second;
const minute = 60000;
exports.minute = minute;
const hour = 3600000;

// wallet timeout of 5 minutes, 0 means the wallet never locks due to inactivity
exports.hour = hour;
const walletTimeout = minute * 5;

/* lockout attempt rules: The base rules apply the lockout at a specified number of incorrect attempts,
 and the threshold rules apply the lockout penalty to each attempt after the threshold that falls on the attemptIncrement.
 (In this case the threshold rule applies to every 5th incorrect login after 20)
5 incorrect => 1 minute lockout
10 incorrect => 10 minute lockout
15 incorrect => 1 hour lockout
20, 25, 30, etc incorrect => 1 day lockout
*/
exports.walletTimeout = walletTimeout;
const attemptLockoutBaseRules = {
  5: minute,
  10: 10 * minute,
  15: hour
};
exports.attemptLockoutBaseRules = attemptLockoutBaseRules;
const attemptLockoutThresholdRules = {
  attemptThreshold: 20,
  attemptIncrement: 5,
  attemptPenalty: 24 * hour
};
exports.attemptLockoutThresholdRules = attemptLockoutThresholdRules;
const walletId = 'walletId';
exports.walletId = walletId;
const minPINLength = 6;
exports.minPINLength = minPINLength;
const PINRules = {
  only_numbers: true,
  min_length: 6,
  max_length: 6,
  no_repeated_numbers: false,
  no_repetition_of_the_two_same_numbers: false,
  no_series_of_numbers: false,
  no_even_or_odd_series_of_numbers: false,
  no_cross_pattern: false
};
exports.PINRules = PINRules;
const domain = 'didcomm://invite';
exports.domain = domain;
const tourMargin = 25;
exports.tourMargin = tourMargin;
const hitSlop = {
  top: 44,
  bottom: 44,
  left: 44,
  right: 44
};
exports.hitSlop = hitSlop;
//# sourceMappingURL=constants.js.map