@protontech/autofill 0.0.22991789 → 0.0.33690782
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/features.d.ts +1 -0
- package/constants/features.js +1 -0
- package/constants/heuristics.d.ts +5 -4
- package/constants/heuristics.js +5 -10
- package/constants/selectors.d.ts +13 -7
- package/constants/selectors.js +29 -17
- package/debug.d.ts +24 -1
- package/debug.js +15 -13
- package/dictionary/generate.js +30 -21
- package/dictionary/generated/dictionary.d.ts +18 -4
- package/dictionary/generated/dictionary.js +31 -17
- package/dictionary/source/dictionary.d.ts +4 -3
- package/dictionary/source/dictionary.js +155 -89
- package/dictionary/source/patterns.js +2 -2
- package/features/feature.d.ts +17 -0
- package/features/feature.js +72 -0
- package/features/feature.spec.d.ts +1 -0
- package/features/feature.spec.js +55 -0
- package/features/v1/abstract.field.d.ts +20401 -0
- package/features/v1/abstract.field.js +95 -0
- package/features/v1/abstract.form.d.ts +1226 -0
- package/features/v1/abstract.form.js +336 -0
- package/features/v1/field.email.d.ts +62 -0
- package/features/v1/field.email.js +27 -0
- package/features/v1/field.otp.d.ts +142 -0
- package/features/v1/field.otp.js +105 -0
- package/features/v1/field.password.d.ts +162 -0
- package/features/v1/field.password.js +81 -0
- package/features/v1/field.username-hidden.d.ts +62 -0
- package/features/v1/field.username-hidden.js +25 -0
- package/features/v1/field.username.d.ts +72 -0
- package/features/v1/field.username.js +31 -0
- package/features/v1/index.d.ts +4427 -0
- package/features/v1/index.js +22 -0
- package/features/v1/index.spec.d.ts +1 -0
- package/features/v1/index.spec.js +30 -0
- package/index.d.ts +5 -2
- package/index.js +10 -3
- package/models/perceptron/index.d.ts +2 -0
- package/models/perceptron/index.js +27 -0
- package/models/perceptron/params/email-model.json +53 -0
- package/models/perceptron/params/login-model.json +465 -0
- package/models/perceptron/params/new-password-model.json +133 -0
- package/models/perceptron/params/otp-model.json +117 -0
- package/models/perceptron/params/password-change-model.json +465 -0
- package/models/perceptron/params/password-model.json +133 -0
- package/models/perceptron/params/recovery-model.json +465 -0
- package/models/perceptron/params/register-model.json +465 -0
- package/models/perceptron/params/username-hidden-model.json +53 -0
- package/models/perceptron/params/username-model.json +61 -0
- package/models/prod_20240829/index.d.ts +2 -0
- package/models/prod_20240829/index.js +27 -0
- package/models/prod_20240829/params/email-model.json +45 -0
- package/models/prod_20240829/params/login-model.json +421 -0
- package/models/prod_20240829/params/new-password-model.json +125 -0
- package/models/prod_20240829/params/otp-model.json +153 -0
- package/models/prod_20240829/params/password-change-model.json +421 -0
- package/models/prod_20240829/params/password-model.json +125 -0
- package/models/prod_20240829/params/recovery-model.json +421 -0
- package/models/prod_20240829/params/register-model.json +421 -0
- package/models/prod_20240829/params/username-hidden-model.json +41 -0
- package/models/prod_20240829/params/username-model.json +45 -0
- package/models/random_forest/index.d.ts +2 -0
- package/models/random_forest/index.js +27 -0
- package/models/random_forest/params/email-model.json +1456 -0
- package/models/random_forest/params/login-model.json +4194 -0
- package/models/random_forest/params/new-password-model.json +1448 -0
- package/models/random_forest/params/otp-model.json +2004 -0
- package/models/random_forest/params/password-change-model.json +1422 -0
- package/models/random_forest/params/password-model.json +1292 -0
- package/models/random_forest/params/recovery-model.json +2754 -0
- package/models/random_forest/params/register-model.json +3678 -0
- package/models/random_forest/params/username-hidden-model.json +1108 -0
- package/models/random_forest/params/username-model.json +1052 -0
- package/models/v1/index.d.ts +2 -0
- package/models/v1/index.js +35 -0
- package/package.json +14 -15
- package/rules/v1/index.d.ts +3 -0
- package/rules/v1/index.js +69 -0
- package/rulesets.d.ts +2 -2
- package/rulesets.js +11 -10
- package/types/index.d.ts +72 -17
- package/types/index.js +35 -2
- package/utils/attributes.js +1 -1
- package/utils/clustering.js +18 -5
- package/utils/credit-card.d.ts +32 -0
- package/utils/credit-card.js +259 -0
- package/utils/credit-card.samples.spec.d.ts +1 -0
- package/utils/credit-card.samples.spec.js +452 -0
- package/utils/credit-card.spec.d.ts +1 -0
- package/utils/credit-card.spec.js +296 -0
- package/utils/dom.d.ts +3 -2
- package/utils/dom.js +12 -7
- package/utils/exclusion.d.ts +1 -0
- package/utils/exclusion.js +22 -10
- package/utils/extract.d.ts +1 -0
- package/utils/extract.js +26 -7
- package/utils/fathom.d.ts +10 -23
- package/utils/fathom.js +7 -12
- package/utils/field.d.ts +12 -4
- package/utils/field.js +25 -14
- package/utils/flags.d.ts +9 -3
- package/utils/flags.js +27 -9
- package/utils/form.d.ts +16 -5
- package/utils/form.js +35 -14
- package/utils/identity.d.ts +12 -21
- package/utils/identity.js +66 -41
- package/utils/identity.samples.spec.d.ts +1 -0
- package/utils/identity.samples.spec.js +28 -0
- package/utils/iframe.d.ts +2 -0
- package/utils/iframe.js +22 -0
- package/utils/overrides.d.ts +19 -0
- package/utils/overrides.js +40 -0
- package/utils/prepass.js +6 -4
- package/utils/re.d.ts +19 -4
- package/utils/re.js +22 -7
- package/utils/re.spec.d.ts +1 -0
- package/utils/re.spec.js +62 -0
- package/utils/shadow-dom.d.ts +8 -0
- package/utils/shadow-dom.js +53 -0
- package/utils/shadow-dom.spec.d.ts +1 -0
- package/utils/shadow-dom.spec.js +215 -0
- package/utils/visible.d.ts +3 -2
- package/utils/visible.js +42 -22
- package/cli.d.ts +0 -2
- package/cli.js +0 -128
- package/features/abstract.field.d.ts +0 -123
- package/features/abstract.field.js +0 -63
- package/features/abstract.form.d.ts +0 -98
- package/features/abstract.form.js +0 -281
- package/features/field.email.d.ts +0 -18
- package/features/field.email.js +0 -43
- package/features/field.otp.d.ts +0 -36
- package/features/field.otp.js +0 -116
- package/features/field.password.d.ts +0 -35
- package/features/field.password.js +0 -104
- package/features/field.username-hidden.d.ts +0 -15
- package/features/field.username-hidden.js +0 -40
- package/features/field.username.d.ts +0 -16
- package/features/field.username.js +0 -41
- package/features/form.combined.d.ts +0 -1
- package/features/form.combined.js +0 -6
- package/trainees/field.email.d.ts +0 -2
- package/trainees/field.email.js +0 -16
- package/trainees/field.identity.d.ts +0 -2
- package/trainees/field.identity.js +0 -9
- package/trainees/field.otp.d.ts +0 -2
- package/trainees/field.otp.js +0 -16
- package/trainees/field.password.current.d.ts +0 -2
- package/trainees/field.password.current.js +0 -16
- package/trainees/field.password.new.d.ts +0 -2
- package/trainees/field.password.new.js +0 -16
- package/trainees/field.username-hidden.d.ts +0 -2
- package/trainees/field.username-hidden.js +0 -22
- package/trainees/field.username.d.ts +0 -2
- package/trainees/field.username.js +0 -16
- package/trainees/form.login.d.ts +0 -2
- package/trainees/form.login.js +0 -16
- package/trainees/form.noop.d.ts +0 -1
- package/trainees/form.noop.js +0 -7
- package/trainees/form.password-change.d.ts +0 -2
- package/trainees/form.password-change.js +0 -16
- package/trainees/form.recovery.d.ts +0 -2
- package/trainees/form.recovery.js +0 -16
- package/trainees/form.register.d.ts +0 -2
- package/trainees/form.register.js +0 -16
- package/trainees/index.d.ts +0 -9
- package/trainees/index.js +0 -72
- package/trainees/results/result.email.d.ts +0 -2
- package/trainees/results/result.email.js +0 -17
- package/trainees/results/result.login.d.ts +0 -2
- package/trainees/results/result.login.js +0 -110
- package/trainees/results/result.new-password.d.ts +0 -2
- package/trainees/results/result.new-password.js +0 -36
- package/trainees/results/result.otp.d.ts +0 -2
- package/trainees/results/result.otp.js +0 -43
- package/trainees/results/result.password-change.d.ts +0 -2
- package/trainees/results/result.password-change.js +0 -110
- package/trainees/results/result.password.d.ts +0 -2
- package/trainees/results/result.password.js +0 -36
- package/trainees/results/result.recovery.d.ts +0 -2
- package/trainees/results/result.recovery.js +0 -110
- package/trainees/results/result.register.d.ts +0 -2
- package/trainees/results/result.register.js +0 -110
- package/trainees/results/result.username-hidden.d.ts +0 -2
- package/trainees/results/result.username-hidden.js +0 -15
- package/trainees/results/result.username.d.ts +0 -2
- package/trainees/results/result.username.js +0 -16
- package/utils/memoize.d.ts +0 -5
- package/utils/memoize.js +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FEATURE_SEPARATOR = "--";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const FEATURE_SEPARATOR = "--";
|
|
@@ -4,12 +4,13 @@ export declare const MAX_HEADING_HORIZONTAL_DIST = 75;
|
|
|
4
4
|
export declare const MAX_HEADING_VERTICAL_DIST = 150;
|
|
5
5
|
export declare const MAX_CLUSTER_SPLIT_DISTANCE = 400;
|
|
6
6
|
export declare const MAX_VISIBILITY_WALK_UP = 1;
|
|
7
|
-
export declare const MIN_AREA_SUBMIT_BTN =
|
|
7
|
+
export declare const MIN_AREA_SUBMIT_BTN = 3000;
|
|
8
8
|
export declare const MIN_FIELD_HEIGHT = 15;
|
|
9
9
|
export declare const MIN_FIELD_WIDTH = 30;
|
|
10
|
-
export declare const MAX_INPUTS_PER_FORM =
|
|
11
|
-
export declare const MAX_FIELDS_PER_FORM =
|
|
10
|
+
export declare const MAX_INPUTS_PER_FORM = 50;
|
|
11
|
+
export declare const MAX_FIELDS_PER_FORM = 100;
|
|
12
12
|
export declare const MAX_HIDDEN_FIELD_VALUE_LENGTH = 320;
|
|
13
13
|
export declare const HIDDEN_FIELD_IGNORE_VALUES: string[];
|
|
14
|
-
export declare const OTP_PATTERNS:
|
|
14
|
+
export declare const OTP_PATTERNS: string[];
|
|
15
15
|
export declare const VALID_INPUT_TYPES: string[];
|
|
16
|
+
export declare const SCROLLBAR_WIDTH = 16;
|
package/constants/heuristics.js
CHANGED
|
@@ -4,18 +4,13 @@ export const MAX_HEADING_HORIZONTAL_DIST = 75;
|
|
|
4
4
|
export const MAX_HEADING_VERTICAL_DIST = 150;
|
|
5
5
|
export const MAX_CLUSTER_SPLIT_DISTANCE = 400;
|
|
6
6
|
export const MAX_VISIBILITY_WALK_UP = 1;
|
|
7
|
-
export const MIN_AREA_SUBMIT_BTN =
|
|
7
|
+
export const MIN_AREA_SUBMIT_BTN = 3000;
|
|
8
8
|
export const MIN_FIELD_HEIGHT = 15;
|
|
9
9
|
export const MIN_FIELD_WIDTH = 30;
|
|
10
|
-
export const MAX_INPUTS_PER_FORM =
|
|
11
|
-
export const MAX_FIELDS_PER_FORM =
|
|
10
|
+
export const MAX_INPUTS_PER_FORM = 50;
|
|
11
|
+
export const MAX_FIELDS_PER_FORM = 100;
|
|
12
12
|
export const MAX_HIDDEN_FIELD_VALUE_LENGTH = 320;
|
|
13
13
|
export const HIDDEN_FIELD_IGNORE_VALUES = ["0", "1", "true", "false"];
|
|
14
|
-
export const OTP_PATTERNS = [
|
|
15
|
-
[1, "d*"],
|
|
16
|
-
[6, "d{6}"],
|
|
17
|
-
[1, "[0-9]*"],
|
|
18
|
-
[6, "[0-9]{6}"],
|
|
19
|
-
[5, "([0-9a-fA-F]{5}-?[0-9a-fA-F]{5})"],
|
|
20
|
-
];
|
|
14
|
+
export const OTP_PATTERNS = ["[0-9]{6}", "[0-9]{1}", "[0-9]*", "d{6}", "d{6}*", "d{1}", "/d{6}", "/d{6}*", "/d{1}"];
|
|
21
15
|
export const VALID_INPUT_TYPES = ["text", "email", "number", "tel", "password", "hidden", "search"];
|
|
16
|
+
export const SCROLLBAR_WIDTH = 16;
|
package/constants/selectors.d.ts
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
export declare const FORM_CLUSTER_ATTR = "data-protonpass-form";
|
|
2
2
|
export declare const kFieldSelector = "input, select, textarea";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const kFieldLabelSelector = "[class*=\"label\"], [id*=\"label\"]";
|
|
4
|
+
export declare const kEmailSelector = "input[name=\"email\"], input[id=\"email\"], input[name=\"user_email\"]";
|
|
4
5
|
export declare const kPasswordSelector = "input[type=\"password\"], input[type=\"text\"][id=\"password\"]";
|
|
5
6
|
export declare const kCaptchaSelector = "[class*=\"captcha\"], [id*=\"captcha\"], [name*=\"captcha\"]";
|
|
6
7
|
export declare const kSocialSelector = "[class*=social], [aria-label*=with]";
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const kEditorElements: string[];
|
|
9
|
+
export declare const kEditorPatterns: string[];
|
|
10
|
+
export declare const kEditorSelector: string;
|
|
11
|
+
export declare const kDomDialogSelector = "[role=\"dialog\"], [role=\"tabpanel\"], [role=\"group\"], [role=\"form\"], [id*=\"modal\"], [class*=\"modal\"]";
|
|
12
|
+
export declare const kDomClusterSelector = "[role=\"dialog\"], [role=\"tabpanel\"], [role=\"group\"], [role=\"form\"], [id*=\"modal\"], [class*=\"modal\"], header, main, nav, footer, aside";
|
|
13
|
+
export declare const kDomGroupSelector = "[role=\"dialog\"], [role=\"tabpanel\"], [role=\"group\"], [role=\"form\"], [id*=\"modal\"], [class*=\"modal\"], header, main, nav, footer, aside, section";
|
|
9
14
|
export declare const kUsernameSelector: string;
|
|
10
15
|
export declare const kHiddenUsernameSelector: string;
|
|
11
16
|
export declare const kHeadingSelector: string;
|
|
12
17
|
export declare const kButtonSubmitSelector: string;
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
18
|
+
export declare const kTextInputTypes: string[];
|
|
19
|
+
export declare const kLayoutSelector = "div, section, aside, main, nav, label";
|
|
20
|
+
export declare const kAnchorLinkSelector = "a, [role=\"link\"], span[role=\"button\"]";
|
|
15
21
|
export declare const formCandidateSelector = "form, [data-protonpass-form]";
|
|
16
22
|
export declare const inputCandidateSelector = "input:not([type=\"hidden\"]):not([type=\"submit\"]):not([type=\"button\"]):not([type=\"image\"]):not([type=\"checkbox\"])";
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
23
|
+
export declare const kInputIteratorSelector = "input:not([type=\"hidden\"]):not([type=\"submit\"]):not([type=\"button\"]):not([type=\"image\"]), textarea, select";
|
|
24
|
+
export declare const kButtonSelector: string;
|
package/constants/selectors.js
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
export const FORM_CLUSTER_ATTR = "data-protonpass-form";
|
|
2
2
|
export const kFieldSelector = "input, select, textarea";
|
|
3
|
-
export const
|
|
3
|
+
export const kFieldLabelSelector = `[class*="label"], [id*="label"]`;
|
|
4
|
+
export const kEmailSelector = 'input[name="email"], input[id="email"], input[name="user_email"]';
|
|
4
5
|
export const kPasswordSelector = 'input[type="password"], input[type="text"][id="password"]';
|
|
5
6
|
export const kCaptchaSelector = `[class*="captcha"], [id*="captcha"], [name*="captcha"]`;
|
|
6
7
|
export const kSocialSelector = `[class*=social], [aria-label*=with]`;
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
8
|
+
export const kEditorElements = ["body", "div", "section", "main"];
|
|
9
|
+
export const kEditorPatterns = [
|
|
10
|
+
'[class*="editor"]',
|
|
11
|
+
'[class*="Editor"]',
|
|
12
|
+
'[class*="EDITOR"]',
|
|
13
|
+
'[id*="editor"]',
|
|
14
|
+
'[id*="Editor"]',
|
|
15
|
+
'[id*="EDITOR"]',
|
|
16
|
+
'[class*="composer" i]',
|
|
17
|
+
'[id*="composer" i]',
|
|
18
|
+
'[class*="wysiwyg" i]',
|
|
19
|
+
'[id*="wysiwyg" i]',
|
|
20
|
+
'[class*="tinymce" i]',
|
|
21
|
+
'[id*="tinymce" i]',
|
|
22
|
+
];
|
|
23
|
+
export const kEditorSelector = `[contenteditable="true"], :is(${kEditorElements.join(",")}):is(${kEditorPatterns.join(",")})`;
|
|
24
|
+
export const kDomDialogSelector = `[role="dialog"], [role="tabpanel"], [role="group"], [role="form"], [id*="modal"], [class*="modal"]`;
|
|
25
|
+
export const kDomClusterSelector = `${kDomDialogSelector}, header, main, nav, footer, aside`;
|
|
26
|
+
export const kDomGroupSelector = `${kDomClusterSelector}, section`;
|
|
9
27
|
export const kUsernameSelector = [
|
|
10
28
|
'input[type="login"]',
|
|
11
29
|
'input[type="username"]',
|
|
@@ -15,16 +33,7 @@ export const kUsernameSelector = [
|
|
|
15
33
|
'input[name="account"]',
|
|
16
34
|
'input[name="quickconnect-id"]',
|
|
17
35
|
].join(",");
|
|
18
|
-
export const kHiddenUsernameSelector = [
|
|
19
|
-
'[name*="user" i]',
|
|
20
|
-
'[id*="user" i]',
|
|
21
|
-
'[name*="login" i]',
|
|
22
|
-
'[id*="login" i]',
|
|
23
|
-
'[name*="email" i]',
|
|
24
|
-
'[id*="email" i]',
|
|
25
|
-
'[name*="identifier" i]',
|
|
26
|
-
'[id*="identifier" i]',
|
|
27
|
-
].join(",");
|
|
36
|
+
export const kHiddenUsernameSelector = ['[name*="user" i]', '[id*="user" i]', '[name*="login" i]', '[id*="login" i]', '[name*="email" i]', '[id*="email" i]', '[name*="identifier" i]', '[id*="identifier" i]'].join(",");
|
|
28
37
|
export const kHeadingSelector = [
|
|
29
38
|
...[1, 2, 3, 4, 5].flatMap((level) => [`h${level}, [aria-level="${level}"]`]),
|
|
30
39
|
'[role="heading"]',
|
|
@@ -36,6 +45,8 @@ export const kHeadingSelector = [
|
|
|
36
45
|
].join(",");
|
|
37
46
|
export const kButtonSubmitSelector = [
|
|
38
47
|
'input[type="submit"]',
|
|
48
|
+
'input[type="button"]',
|
|
49
|
+
'input[type="image"][alt]',
|
|
39
50
|
'button[id*="password" i]',
|
|
40
51
|
'button[type="submit"]',
|
|
41
52
|
'button[type="button"]',
|
|
@@ -44,9 +55,10 @@ export const kButtonSubmitSelector = [
|
|
|
44
55
|
'div[role="button"]',
|
|
45
56
|
'div[role="submit"]',
|
|
46
57
|
].join(",");
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
58
|
+
export const kTextInputTypes = ["text", "email", "tel", "password", "number"];
|
|
59
|
+
export const kLayoutSelector = `div, section, aside, main, nav, label`;
|
|
60
|
+
export const kAnchorLinkSelector = `a, [role="link"], span[role="button"]`;
|
|
49
61
|
export const formCandidateSelector = `form, [${FORM_CLUSTER_ATTR}]`;
|
|
50
62
|
export const inputCandidateSelector = 'input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="checkbox"])';
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
63
|
+
export const kInputIteratorSelector = 'input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]), textarea, select';
|
|
64
|
+
export const kButtonSelector = `button:not([type]), a[role="button"], ${kButtonSubmitSelector}`;
|
package/debug.d.ts
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Fnode } from "@protontech/fathom";
|
|
2
|
+
import * as clustering from "./utils/clustering";
|
|
3
|
+
import * as dom from "./utils/dom";
|
|
4
|
+
import * as exclusions from "./utils/exclusion";
|
|
5
|
+
import * as extract from "./utils/extract";
|
|
6
|
+
import * as fields from "./utils/field";
|
|
7
|
+
import * as forms from "./utils/form";
|
|
8
|
+
import * as prepass from "./utils/prepass";
|
|
9
|
+
import * as visibility from "./utils/visible";
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
FATHOM_DEBUG?: {
|
|
13
|
+
createMockFnode: (element: HTMLElement) => Fnode;
|
|
14
|
+
clustering: typeof clustering;
|
|
15
|
+
dom: typeof dom;
|
|
16
|
+
exclusions: typeof exclusions;
|
|
17
|
+
extract: typeof extract;
|
|
18
|
+
fields: typeof fields;
|
|
19
|
+
forms: typeof forms;
|
|
20
|
+
prepass: typeof prepass;
|
|
21
|
+
visibility: typeof visibility;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
package/debug.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as formUtils from "./utils/form";
|
|
4
|
-
import * as fieldRules from "./utils/field";
|
|
5
|
-
import * as trainees from "./trainees";
|
|
1
|
+
import * as clustering from "./utils/clustering";
|
|
2
|
+
import * as dom from "./utils/dom";
|
|
6
3
|
import * as exclusions from "./utils/exclusion";
|
|
4
|
+
import * as extract from "./utils/extract";
|
|
5
|
+
import * as fields from "./utils/field";
|
|
6
|
+
import * as forms from "./utils/form";
|
|
7
7
|
import * as prepass from "./utils/prepass";
|
|
8
|
-
|
|
8
|
+
import * as visibility from "./utils/visible";
|
|
9
|
+
window.FATHOM_DEBUG = {
|
|
9
10
|
createMockFnode: (element) => ({ element }),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
clustering,
|
|
12
|
+
dom,
|
|
13
|
+
exclusions,
|
|
14
|
+
extract,
|
|
15
|
+
fields,
|
|
16
|
+
forms,
|
|
17
|
+
prepass,
|
|
18
|
+
visibility,
|
|
17
19
|
};
|
package/dictionary/generate.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { sanitizeString, sanitizeStringWithSpaces } from "@protontech/autofill/utils/text";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
3
4
|
import regexgen from "regexgen";
|
|
4
|
-
import { sanitizeString } from "../utils/text";
|
|
5
5
|
import dictionary from "./source/dictionary";
|
|
6
6
|
const generateRegexes = () => {
|
|
7
7
|
let output = "";
|
|
@@ -11,30 +11,39 @@ const generateRegexes = () => {
|
|
|
11
11
|
output += " * `TYPE_ATTR_RE`: regexp for node attributes\n";
|
|
12
12
|
output += " * `TYPE_ATTR_END`: attr ending constraint regexp */\n\n";
|
|
13
13
|
Object.entries(dictionary).forEach(([name, definition]) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
15
|
+
const i18n = Object.values((_a = definition.i18n) !== null && _a !== void 0 ? _a : {})
|
|
16
|
+
.flat()
|
|
17
|
+
.map(sanitizeString);
|
|
18
|
+
const attrs = ((_c = (_b = definition === null || definition === void 0 ? void 0 : definition.attr) === null || _b === void 0 ? void 0 : _b.values) !== null && _c !== void 0 ? _c : []).map(sanitizeString);
|
|
19
|
+
const prefixes = ((_e = (_d = definition === null || definition === void 0 ? void 0 : definition.attr) === null || _d === void 0 ? void 0 : _d.prefixes) !== null && _e !== void 0 ? _e : []).map(sanitizeString);
|
|
20
|
+
const attrsExact = ((_g = (_f = definition === null || definition === void 0 ? void 0 : definition.attr) === null || _f === void 0 ? void 0 : _f.exact) !== null && _g !== void 0 ? _g : []).map(sanitizeStringWithSpaces);
|
|
21
|
+
if (i18n.length > 0) {
|
|
22
|
+
output += `export const ${name}_RE = ${regexgen(i18n, "")}i;\n`;
|
|
20
23
|
}
|
|
21
24
|
if (attrs.length > 0 || attrsExact.length > 0) {
|
|
22
25
|
const regAttrs = attrs.length > 0 ? regexgen(attrs, "").source : null;
|
|
23
26
|
const regExact = attrsExact.length > 0 ? `\\b(${regexgen(attrsExact, "").source})\\b` : null;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const regPrefixes = prefixes.length > 0 ? regexgen(prefixes, "").source : null;
|
|
28
|
+
const withPrefixes = (re) => (regPrefixes ? `(?:${regPrefixes})${re}` : re);
|
|
29
|
+
const re = (() => {
|
|
30
|
+
if (regAttrs && !regExact)
|
|
31
|
+
return withPrefixes(regAttrs);
|
|
32
|
+
else if (!regAttrs && regExact)
|
|
33
|
+
return regExact;
|
|
34
|
+
else if (regAttrs && regExact)
|
|
35
|
+
return `${withPrefixes(regAttrs)}|${regExact}`;
|
|
36
|
+
return "";
|
|
37
|
+
})();
|
|
38
|
+
output += `export const ${name}_ATTR_RE = /${re}/i;\n`;
|
|
30
39
|
}
|
|
31
|
-
if (
|
|
32
|
-
const startWithRe = regexgen(definition.
|
|
33
|
-
output += `export const ${name}_ATTR_START_RE =
|
|
40
|
+
if (definition === null || definition === void 0 ? void 0 : definition.startsWith) {
|
|
41
|
+
const startWithRe = regexgen(definition.startsWith.map(sanitizeString), "");
|
|
42
|
+
output += `export const ${name}_ATTR_START_RE = /\\b(?:${startWithRe.source})\\S+/i;\n`;
|
|
34
43
|
}
|
|
35
|
-
if (
|
|
36
|
-
const endWordsRe = regexgen(definition.
|
|
37
|
-
output += `export const ${name}_ATTR_END_RE= /\\b
|
|
44
|
+
if (definition === null || definition === void 0 ? void 0 : definition.endsWith) {
|
|
45
|
+
const endWordsRe = regexgen(definition.endsWith.map(sanitizeString), "");
|
|
46
|
+
output += `export const ${name}_ATTR_END_RE= /\\b\\S*(?:${endWordsRe.source})\\b/i;\n`;
|
|
38
47
|
}
|
|
39
48
|
});
|
|
40
49
|
fs.writeFileSync(path.resolve(__dirname, "./generated/dictionary.ts"), output);
|
|
@@ -27,9 +27,9 @@ export declare const CURRENT_VALUE_ATTR_RE: RegExp;
|
|
|
27
27
|
export declare const HIDDEN_ATTR_RE: RegExp;
|
|
28
28
|
export declare const OAUTH_ATTR_RE: RegExp;
|
|
29
29
|
export declare const TOS_RE: RegExp;
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
30
|
+
export declare const TWO_FA_RE: RegExp;
|
|
31
|
+
export declare const TWO_FA_ATTR_RE: RegExp;
|
|
32
|
+
export declare const AUTHENTICATOR_ATTR_RE: RegExp;
|
|
33
33
|
export declare const OTP_ATTR_RE: RegExp;
|
|
34
34
|
export declare const OTP_OUTLIER_RE: RegExp;
|
|
35
35
|
export declare const OTP_OUTLIER_ATTR_RE: RegExp;
|
|
@@ -40,7 +40,7 @@ export declare const IDENTITY_FIRSTNAME_ATTR_RE: RegExp;
|
|
|
40
40
|
export declare const IDENTITY_MIDDLENAME_ATTR_RE: RegExp;
|
|
41
41
|
export declare const IDENTITY_LASTNAME_ATTR_RE: RegExp;
|
|
42
42
|
export declare const IDENTITY_TELEPHONE_ATTR_RE: RegExp;
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const IDENTITY_TELEPHONE_OUTLIER_ATTR_RE: RegExp;
|
|
44
44
|
export declare const IDENTITY_ADDRESS_ATTR_RE: RegExp;
|
|
45
45
|
export declare const IDENTITY_ADDRESS_LINES_ATTR_END_RE: RegExp;
|
|
46
46
|
export declare const IDENTITY_STATE_ATTR_RE: RegExp;
|
|
@@ -49,3 +49,17 @@ export declare const IDENTITY_ZIPCODE_ATTR_RE: RegExp;
|
|
|
49
49
|
export declare const IDENTITY_ORGANIZATION_ATTR_RE: RegExp;
|
|
50
50
|
export declare const IDENTITY_COUNTRY_ATTR_RE: RegExp;
|
|
51
51
|
export declare const IDENTITY_COUNTRY_CODE_ATTR_RE: RegExp;
|
|
52
|
+
export declare const CC_PREFIX_ATTR_RE: RegExp;
|
|
53
|
+
export declare const CC_NUMBER_ATTR_RE: RegExp;
|
|
54
|
+
export declare const CC_OUTLIER_ATTR_RE: RegExp;
|
|
55
|
+
export declare const CC_CVC_ATTR_RE: RegExp;
|
|
56
|
+
export declare const CC_CODE_ATTR_RE: RegExp;
|
|
57
|
+
export declare const CC_NAME_ATTR_RE: RegExp;
|
|
58
|
+
export declare const CC_EXP_ATTR_RE: RegExp;
|
|
59
|
+
export declare const CC_EXP_MONTH_ATTR_RE: RegExp;
|
|
60
|
+
export declare const CC_EXP_MONTH_ATTR_END_RE: RegExp;
|
|
61
|
+
export declare const CC_EXP_YEAR_ATTR_RE: RegExp;
|
|
62
|
+
export declare const CC_EXP_YEAR_ATTR_END_RE: RegExp;
|
|
63
|
+
export declare const IFRAME_FIELD_ATTR_RE: RegExp;
|
|
64
|
+
export declare const PAYMENT_ATTR_RE: RegExp;
|
|
65
|
+
export declare const DOCUMENT_ATTR_RE: RegExp;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const LOGIN_RE = /(?:(?:n(?:ouvelleses|uevase|ewses)s|iniciarses|connex)io|anmeldedate|sign[io])n|in(?:iciarsessao|troduce)|
|
|
2
|
-
export const REGISTER_RE = /
|
|
3
|
-
export const RECOVERY_RE = /(?:wiederherstell|zurucksetz)en|re(?:(?:initialis|stablec)er|(?:defini|staur[ae])r|c(?:uper[ae]|ove)r
|
|
1
|
+
export const LOGIN_RE = /a(?:uthenti(?:fizierungs|cate)|nmeld(?:ung|en))|(?:(?:n(?:ouvelleses|uevase|ewses)s|iniciarses|connex)io|anmeldedate|inlogge|sign[io])n|in(?:iciarsessao|troduce)|(?:authentifie|introduci|conecta|entr[ae])r|s(?:econnect|identifi)er|novasessao|prihlasit|connect|acceder|login/i;
|
|
2
|
+
export const REGISTER_RE = /(?:kontoerstelle|joi)n|cr(?:ea(?:reaccount|teaccount|rcuenta|account)|iarconta)|(?:nouveaucompt|creeruncompt|s?inscrir|unirs)e|re(?:gist(?:r(?:ier(?:ung|en)|a(?:rse|ti)|ar)|er)|joindre)|nuevacuenta|getstarted|neueskonto|newaccount|novaconta|(?:com(?:mence|eca)|(?:empez|junt)a)r|signup/i;
|
|
3
|
+
export const RECOVERY_RE = /(?:wiederherstell|zurucksetz)en|re(?:(?:initialis|stablec)er|s(?:tor(?:ing|e)|et)|(?:defini|staur[ae])r|c(?:uper[ae]|ove)r)|problem|(?:troubl|aid)e|a[jy]uda|h(?:ilfe|elp)/i;
|
|
4
4
|
export const MULTI_STEP_RE = /p(?:rogres(?:s(?:ion|o)|o)|aso)|fortschritt|progress|s(?:chritt|t(?:age|ep))|etap[ae]|phase/i;
|
|
5
5
|
export const TROUBLE_RE = /schwierigkeit|(?:difficult|troubl|oubli|hilf)e|i(?:nciden(?:cia|t)|ssue)|vergessen|esquecido|olvidado|needhelp|questao|problem|forgot|ayuda/i;
|
|
6
|
-
export const PASSWORD_RE = /p(?:hrasesecrete|ass(?:(?:phras|cod)e|wor[dt]))|(?:c(?:havesecret|lavesecret|ontrasen)|deseguranc)a|(?:(?:zugangs|secret)cod|clesecret)e|codesecret|motdepasse|geheimnis|secret|heslo|senha|key/i;
|
|
6
|
+
export const PASSWORD_RE = /p(?:hrasesecrete|ass(?:(?:phras|cod)e|wor[dt]))|(?:c(?:havesecret|lavesecret|ontrasen)|deseguranc)a|(?:(?:zugangs|secret)cod|clesecret)e|wachtwoord|codesecret|motdepasse|geheimnis|secret|heslo|senha|key/i;
|
|
7
7
|
export const PASSWORD_ATTR_RE = /p(?:ass|wd?)|fmt|mdp/i;
|
|
8
|
-
export const PASSWORD_OUTLIER_RE = /
|
|
9
|
-
export const USERNAME_RE = /(?:identifi(?:cado|e)|benutze)r|identi(?:fiant|ty)|u(?:tilisateur|s(?:ername|uario?))|(?:screen|nick)name|nutzername|(?:anmeld|handl)e|pseudo/i;
|
|
10
|
-
export const USERNAME_ATTR_RE = /
|
|
8
|
+
export const PASSWORD_OUTLIER_RE = /s(?:ocialsecurity|ecanswer)|nationalid|answer|userid/i;
|
|
9
|
+
export const USERNAME_RE = /gebruikersnaam|(?:identifi(?:cado|e)|benutze)r|identi(?:fiant|ty)|u(?:tilisateur|s(?:ername|uario?))|(?:screen|nick)name|nutzername|(?:anmeld|handl)e|pseudo/i;
|
|
10
|
+
export const USERNAME_ATTR_RE = /(?:custom|us)erid|login(?:name|id)|a(?:cc(?:ountid|t)|ppleid)/i;
|
|
11
11
|
export const USERNAME_OUTLIER_RE = /(?:nom(?:defamill|br)|tit[lr])e|(?:primeiro|sobre)nome|(?:company|middle|nach|vor)name|firstname|apellido|lastname|prenom/i;
|
|
12
12
|
export const EMAIL_RE = /co(?:urriel|rrei?o)|email/i;
|
|
13
13
|
export const EMAIL_ATTR_RE = /usermail/i;
|
|
@@ -15,37 +15,51 @@ export const TEL_RE = /numerodetel|phonenumber|cellnumber|cellphone|tele(?:phone
|
|
|
15
15
|
export const CAPTCHA_ATTR_RE = /(?:solvemedi|(?:key|fun|re|h)?captch)a/i;
|
|
16
16
|
export const SUBMIT_ACTION_RE = /(?:valide|envia)r|s(?:enden|ubmit)|go/i;
|
|
17
17
|
export const CREATE_ACTION_RE = /erstellen|n(?:o(?:uveau|vo)|uevo|e[uw])|cr(?:e(?:a[rt]e|er)|iar)|crear|set/i;
|
|
18
|
-
export const CREATE_ACTION_ATTR_END_RE = /\b
|
|
18
|
+
export const CREATE_ACTION_ATTR_END_RE = /\b\S*(?:fst|1)\b/i;
|
|
19
19
|
export const RESET_ACTION_RE = /(?:a(?:ktualisiere|nder)|zurucksetze)n|(?:re(?:initialise|stablece|defini)|mettreajou)r|a(?:ctualiz|tualiz|lter)ar|c(?:ambiar|hange)|update|reset/i;
|
|
20
20
|
export const CONFIRM_ACTION_RE = /digitarnovamente|v(?:olveraescribi|erifi(?:ca|e))r|saisiranouveau|(?:erneuteingeb|wiederhol|bestatig)en|verif(?:izieren|y)|re(?:pe(?:t[ei]r|at)|type)|confirm|again/i;
|
|
21
|
-
export const CONFIRM_ACTION_ATTR_END_RE = /\b
|
|
21
|
+
export const CONFIRM_ACTION_ATTR_END_RE = /\b\S*(?:snd|bis|2)\b/i;
|
|
22
22
|
export const STEP_ACTION_RE = /(?:f(?:ertigstell|ortfahr)|abschlie)en|getstarted|siguiente|(?:preceden|suivan|accep)t|(?:finaliza|termin[ae]|anterio|weite)r|co(?:mplet(?:ar|e)|ntinu(?:ar|e))|pro(?:c(?:hain|eed)|ximo)|finish|zuruck|back|next/i;
|
|
23
23
|
export const REMEMBER_ACTION_RE = /angemeldetbleiben|lembrardemim|micherinnern|sesouvenirde|re(?:cordarme|member|ster)|manterme|mantener|stay|keep/i;
|
|
24
|
-
export const SEARCH_ACTION_RE = /recherche|buscar|s(?:earch|uche)|query/i;
|
|
24
|
+
export const SEARCH_ACTION_RE = /recherche|buscar|s(?:earch|uche)|query|find/i;
|
|
25
25
|
export const CURRENT_VALUE_RE = /(?:be(?:stehend|for)|vorherig|aktuell)e|exist(?:ente|ing)|pre(?:cedent|vious)|a(?:n(?:t(?:erior|igo)|cien)|ctu[ae]l|tual)|existant|dernier|current|(?:ultim|viej)o|(?:letz|al)te|last|old/i;
|
|
26
26
|
export const CURRENT_VALUE_ATTR_RE = /prev|curr/i;
|
|
27
27
|
export const HIDDEN_ATTR_RE = /s(?:creenreade)?ronly|(?:move)?offscreen|(?:displaynon|a11yhid)e|\b((?:is)?hidden)\b/i;
|
|
28
28
|
export const OAUTH_ATTR_RE = /facebook|twitch|google|apple/i;
|
|
29
29
|
export const TOS_RE = /(?:datenschutzrichtlini|politicadeprivacidad|confidentialit|a(?:cknowledg|gre))e|nutzungsbedingungen|(?:consentimi?ent|ac(?:ue|o)rd)o|(?:einwillig|zustimm)ung|consentement|condi(?:cione|tion)s|term(?:osdeuso|inos|sof)|(?:privacida|understan)d|guideline|consent|p(?:riva|oli)cy|accord/i;
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
30
|
+
export const TWO_FA_RE = /(?:doublefacteu|(?:doblefac|zweifak|twofac)to)r|verifica(?:c(?:ion|ao)|tion)|multifa(?:ct(?:eu|o)|k?to)r|(?:securitycod|doubleetap|authcod)e|zweischritte|dois(?:fatore|passo)s|doblepaso|2(?:s(?:chritte|tep)|(?:etap[ae]|paso)s|fa)|twostep/i;
|
|
31
|
+
export const TWO_FA_ATTR_RE = /(?:authentication|approvals|email|login)code|phoneverification|challenge|t(?:wo(?:fa(?:ctor)?|step)|facode)|2fa|\b([mt]fa)\b/i;
|
|
32
|
+
export const AUTHENTICATOR_ATTR_RE = /a(?:pplicationdauthentification|ut(?:henti(?:(?:fiz|s)ierungsapp|cat(?:ionapp|or)|fi(?:cateu|kato)r)|enticador))|genera(?:torapp|dora)/i;
|
|
33
33
|
export const OTP_ATTR_RE = /totp(?:pin)?|o(?:netime|t[cp])|1time/i;
|
|
34
34
|
export const OTP_OUTLIER_RE = /n(?:(?:ue|o)vocodigo|ouveaucode|e(?:usenden|(?:uer|w)code))|re(?:enviar|send)|envoyer|senden|enviar|send/i;
|
|
35
|
-
export const OTP_OUTLIER_ATTR_RE = /
|
|
35
|
+
export const OTP_OUTLIER_ATTR_RE = /email|sms/i;
|
|
36
36
|
export const NEWSLETTER_RE = /newsletter|b(?:ul|o)letin|mailing/i;
|
|
37
37
|
export const NEWSLETTER_ATTR_RE = /subscription|mailinglist|newsletter|emailform/i;
|
|
38
38
|
export const IDENTITY_FULLNAME_ATTR_RE = /addresscontact|contactperson|addressname|yourname|fullname|\b(name)\b/i;
|
|
39
39
|
export const IDENTITY_FIRSTNAME_ATTR_RE = /givenname|firstn(?:ame)?|\b(fname)\b/i;
|
|
40
40
|
export const IDENTITY_MIDDLENAME_ATTR_RE = /additionalname|middlen(?:ame)?|\b(mname)\b/i;
|
|
41
41
|
export const IDENTITY_LASTNAME_ATTR_RE = /familyn(?:ame)?|lastn(?:ame)?|surname|\b([ls]name)\b/i;
|
|
42
|
-
export const IDENTITY_TELEPHONE_ATTR_RE = /(?:national|contact)number|
|
|
43
|
-
export const
|
|
42
|
+
export const IDENTITY_TELEPHONE_ATTR_RE = /(?:national|contact)number|(?:tele)?phone|mobile|\b(tel(?:national|local)?)\b/i;
|
|
43
|
+
export const IDENTITY_TELEPHONE_OUTLIER_ATTR_RE = /extension|security|co(?:untry|de)|prefix/i;
|
|
44
44
|
export const IDENTITY_ADDRESS_ATTR_RE = /(?:preferred|street)address|address(?:line(?:one|[1s])|1)|mailingaddr|bill(?:ing)?addr|\b(mailaddr|addr(?:ess)?|street|line1)\b/i;
|
|
45
|
-
export const IDENTITY_ADDRESS_LINES_ATTR_END_RE = /\b
|
|
45
|
+
export const IDENTITY_ADDRESS_LINES_ATTR_END_RE = /\b\S*(?:line(?:t(?:hree|wo)|[23]))\b/i;
|
|
46
46
|
export const IDENTITY_STATE_ATTR_RE = /address(?:(?:provinc|stat)e|level1)|stateprovince|\b(province|county|region|state)\b/i;
|
|
47
47
|
export const IDENTITY_CITY_ATTR_RE = /address(?:level2|town|city)|personalcity|\b((?:local|c)ity|town)\b/i;
|
|
48
48
|
export const IDENTITY_ZIPCODE_ATTR_RE = /(?:address(?:postal|zip)|post)code|address(?:postal|zip)|postalcode|zipcode|\b(zip)\b/i;
|
|
49
49
|
export const IDENTITY_ORGANIZATION_ATTR_RE = /organization(?:name)?|companyname|\b(organization)\b/i;
|
|
50
50
|
export const IDENTITY_COUNTRY_ATTR_RE = /addresscountry(?:name)?|countryname|\b(country)\b/i;
|
|
51
51
|
export const IDENTITY_COUNTRY_CODE_ATTR_RE = /countrycode/i;
|
|
52
|
+
export const CC_PREFIX_ATTR_RE = /(?:payments?|new)card|c(?:ar(?:tecredit|d)|red(?:it(?:debit|card)|card))|stripe|vads/i;
|
|
53
|
+
export const CC_NUMBER_ATTR_RE = /num(?:ero(?:de)?)?carte|c(?:ardn(?:um|[or])|bnum|cno)|\b(c(?:ard |c)number)\b/i;
|
|
54
|
+
export const CC_OUTLIER_ATTR_RE = /c(?:ertificate|oupon)|logincard|voucher|promo/i;
|
|
55
|
+
export const CC_CVC_ATTR_RE = /c(?:ard(?:verification|code)|cv|sc|v[cv])|payments?code|\b(c(?:cc(?:ode|vv|sc)|vn))\b/i;
|
|
56
|
+
export const CC_CODE_ATTR_RE = /securitycode|cardpin|pincode/i;
|
|
57
|
+
export const CC_NAME_ATTR_RE = /accountholdername|card(?:holder)?name|cardholder|nameoncard|holdername|\b(ccname)\b/i;
|
|
58
|
+
export const CC_EXP_ATTR_RE = /expir(?:ation(?:monthyear|date)|ation|ydate|y)|cardexp(?:iration)?|\b(ccexp(?:iration)?|expiry date)\b/i;
|
|
59
|
+
export const CC_EXP_MONTH_ATTR_RE = /exp(?:ir(?:y(?:date(?:field)?mo|m[mo]?)|ationdatem[mo]|(?:ation|e)m[mo]?)|m[mo]?)|m(?:expiration|oisexp)|cbdatemo|cardm[mo]?|\b(cc(?:expmonth|m(?:onth|m)))\b/i;
|
|
60
|
+
export const CC_EXP_MONTH_ATTR_END_RE = /\b\S*(?:m(?:onth|o|m))\b/i;
|
|
61
|
+
export const CC_EXP_YEAR_ATTR_RE = /exp(?:ir(?:y(?:date(?:field)?year|y(?:yyy|ear|y)?)|ationdatey(?:y(?:yy)?|ear)|(?:ation|e)y(?:yyy|ear|y)?)|y(?:yyy|ear|y)?)|yexpiration|cbdateann|anne(?:ee)?xp|cardy(?:yyy|ear|y)?|\b(cc(?:expyear|y(?:ear|[ry])))\b/i;
|
|
62
|
+
export const CC_EXP_YEAR_ATTR_END_RE = /\b\S*(?:y(?:ear|y))\b/i;
|
|
63
|
+
export const IFRAME_FIELD_ATTR_RE = /s(?:tripeframe|ecurity)|c(?:ontrol|v[cv])|expiry|input|f(?:ield|orm)|p(?:bf|ci)/i;
|
|
64
|
+
export const PAYMENT_ATTR_RE = /c(?:heckout|ar[dt])|payment/i;
|
|
65
|
+
export const DOCUMENT_ATTR_RE = /s(?:ocialsecurity|ubscription)|membership|nationalid|i(?:nsurance|dcard)|p(?:asse?por|ermi)t|contract|licen[cs]e/i;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
type DictionaryEntry = {
|
|
2
|
-
i18n
|
|
2
|
+
i18n?: Record<string, string[]>;
|
|
3
|
+
startsWith?: string[];
|
|
4
|
+
endsWith?: string[];
|
|
3
5
|
attr?: {
|
|
4
6
|
values?: string[];
|
|
5
7
|
exact?: string[];
|
|
6
|
-
|
|
7
|
-
startsWith?: string[];
|
|
8
|
+
prefixes?: string[];
|
|
8
9
|
};
|
|
9
10
|
};
|
|
10
11
|
declare const dictionary: Record<string, DictionaryEntry>;
|