Files
safari-internal-js/27.0/js/forms/FormMetadataContactsAutoFillMappings.js
2026-09-17 13:47:07 +02:00

310 lines
6.5 KiB
JavaScript

//# sourceURL=__InjectedScript_FormMetadataContactsAutoFillMappings.js
/* Copyright (c) 2026 Apple Inc. All rights reserved. */
// Copyright (C) 2018-2025 Apple Inc. All rights reserved.
function newAddressBookFieldLabelPatternMatchers() {
return [
new FormMetadataFieldPatternMatcher(
window.webkit.buffers.addressBookFieldLabelPatternMatchers0,
),
new FormMetadataFieldPatternMatcher(
window.webkit.buffers.addressBookFieldLabelPatternMatchers1,
),
new FormMetadataFieldPatternMatcher(
window.webkit.buffers.addressBookFieldLabelPatternMatchers2,
),
new FormMetadataFieldPatternMatcher(
window.webkit.buffers.addressBookFieldLabelPatternMatchers3,
),
];
}
function newEmailFieldLabelPatternMatchers() {
return [
new FormMetadataFieldPatternMatcher(
window.webkit.buffers.emailFieldLabelPatternMatchers,
),
];
}
class ValueSpecifier {
constructor(e, n, l, a, t, s, r) {
((this.property = e),
(this.component = n),
(this.label = l),
(this.category = a),
(this.parentProperty = t),
(this.classification = s),
(this.classificationHint = r));
}
}
var valueSpecifiers = [
new ValueSpecifier(
"FullNameComposite",
null,
null,
"FullNameComposite",
null,
"name",
null,
),
new ValueSpecifier(
"First",
null,
null,
"First",
"FullNameComposite",
"given-name",
null,
),
new ValueSpecifier(
"Middle",
null,
null,
"Middle",
"FullNameComposite",
"additional-name",
null,
),
new ValueSpecifier(
"Last",
null,
null,
"Last",
"FullNameComposite",
"family-name",
null,
),
new ValueSpecifier("Birthday", null, null, "Birthday", null, "bday", null),
new ValueSpecifier(
"JobTitle",
null,
null,
"JobTitle",
null,
"organization-title",
null,
),
new ValueSpecifier("Email", null, null, "Email", null, "email", null),
new ValueSpecifier(
"Address",
"Street",
null,
"AddressStreet",
null,
"street-address",
null,
),
new ValueSpecifier(
"Address",
"City",
null,
"AddressCity",
null,
"address-level2",
null,
),
new ValueSpecifier(
"Address",
"State",
null,
"AddressState",
null,
"address-level1",
null,
),
new ValueSpecifier(
"Address",
"ZIP",
null,
"AddressZIP",
null,
"postal-code",
null,
),
new ValueSpecifier(
"Address",
"Country",
null,
"AddressCountry",
null,
"country",
null,
),
new ValueSpecifier(
"Phone",
null,
null,
"Phone",
null,
"tel-area-code",
null,
),
new ValueSpecifier("Phone", null, null, "Phone", null, "tel", null),
new ValueSpecifier(
"Organization",
null,
null,
"Organization",
null,
"organization",
null,
),
new ValueSpecifier(
"URLs",
null,
"_$!<HomePage>!$_",
"URLs_$!<HomePage>!$_",
null,
"url",
null,
),
new ValueSpecifier(
"Phone",
null,
"_$!<Home>!$_",
"Phone_$!<Home>!$_",
null,
"tel",
"home",
),
new ValueSpecifier(
"Phone",
null,
"_$!<Work>!$_",
"Phone_$!<Work>!$_",
null,
"tel",
"work",
),
new ValueSpecifier(
"Phone",
null,
"_$!<Mobile>!$_",
"Phone_$!<Mobile>!$_",
null,
"tel",
"mobile",
),
new ValueSpecifier(
"Phone",
null,
"_$!<Pager>!$_",
"Phone_$!<Pager>!$_",
null,
"tel",
"pager",
),
new ValueSpecifier("Phone", null, null, "Phone", null, "tel", "fax"),
new ValueSpecifier("<Invalid>", null, null, "<Invalid>", null, null, null),
new ValueSpecifier(
"InstantMessage",
"AIMInstant",
null,
"InstantMessageAIMInstant",
null,
"-sf-instant-message",
"-sf-aim",
),
new ValueSpecifier(
"InstantMessage",
"ICQInstant",
null,
"InstantMessageICQInstant",
null,
"-sf-instant-message",
"-sf-icq",
),
new ValueSpecifier(
"InstantMessage",
"JabberInstant",
null,
"InstantMessageJabberInstant",
null,
"-sf-instant-message",
"-sf-jabber",
),
new ValueSpecifier(
"InstantMessage",
"MSNInstant",
null,
"InstantMessageMSNInstant",
null,
"-sf-instant-message",
"-sf-msn",
),
new ValueSpecifier(
"InstantMessage",
"QQInstant",
null,
"InstantMessageQQInstant",
null,
"-sf-instant-message",
"-sf-qq",
),
new ValueSpecifier(
"InstantMessage",
"SkypeInstant",
null,
"InstantMessageSkypeInstant",
null,
"-sf-instant-message",
"-sf-skype",
),
],
FormAutoFillKeywords = {
NonAutoFillableFormTypeRegularExpressions: ["[\\b-]import[\\b-]"],
LoginFormTypeKeywords: {
"@me": 1,
"welcome back": 1,
"log on": 1,
log_on: 1,
"sign on": 1,
login: 1,
signon: 1,
"log in": 1,
"sign in": 1,
signin: 1,
"forgot user": 1,
"enter your current password": 2,
"enter your password": 2,
reauth: 2,
"\u767b\u5f55": 1,
"\u767b\u5165": 1,
"iniciar sesi\xf3n": 1,
anmelden: 1,
absenden: 1,
connexion: 1,
"logg inn": 1,
"\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e23\u0e30\u0e1a\u0e1a": 1,
},
NewAccountFormTypeKeywords: {
"set up": 1,
setup: 1,
signup: 1,
"sign up": 1,
create: 1,
"create account": 1,
"create an account": 1,
enrollment: 1,
reg: 1,
activate: 1,
"\u6ce8\u518c": 1,
"\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e2a\u0e21\u0e32\u0e0a\u0e34\u0e01": 1,
},
ChangePasswordFormTypeKeywords: {
forgotpassword: 1,
"forgot password": 1,
reset: 1,
update: 1,
change: 1,
"\u518d\u8a2d\u5b9a": 1,
cambiar: 1,
},
ForgotPasswordAffordanceRegularExpressions: [
"^forgot.*password",
"^log.*in.*email",
"request.*password",
],
ForgotUserNameAffordanceRegularExpressions: ["^forgot.*user.*name"],
ForgotEmailAffordanceRegularExpressions: ["^forgot.*email", "email\\?$"],
};
0;