expensify-common 2.0.188 → 2.0.190
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/dist/Logger.js +11 -1
- package/dist/esm/API.d.ts +11 -0
- package/dist/esm/API.js +786 -0
- package/dist/esm/APIDeferred.d.ts +7 -0
- package/dist/esm/APIDeferred.js +216 -0
- package/dist/esm/BrowserDetect.d.ts +19 -0
- package/dist/esm/BrowserDetect.js +105 -0
- package/dist/esm/CLI.js +37 -29
- package/dist/esm/CONST.d.ts +1727 -0
- package/dist/esm/CONST.js +1847 -0
- package/dist/esm/Cookie.d.ts +68 -0
- package/dist/esm/Cookie.js +159 -0
- package/dist/esm/CredentialsWrapper.d.ts +32 -0
- package/dist/esm/CredentialsWrapper.js +46 -0
- package/dist/esm/Device.d.ts +8 -0
- package/dist/esm/Device.js +24 -0
- package/dist/esm/ExpenseRule.d.ts +39 -0
- package/dist/esm/ExpenseRule.js +77 -0
- package/dist/esm/ExpensiMark.d.ts +197 -0
- package/dist/esm/ExpensiMark.js +1374 -0
- package/dist/esm/Func.d.ts +40 -0
- package/dist/esm/Func.js +69 -0
- package/dist/esm/Log.d.ts +3 -0
- package/dist/esm/Log.js +35 -0
- package/dist/esm/Logger.d.ts +82 -0
- package/dist/esm/Logger.js +148 -0
- package/dist/esm/Network.d.ts +6 -0
- package/dist/esm/Network.js +168 -0
- package/dist/esm/Num.d.ts +95 -0
- package/dist/esm/Num.js +190 -0
- package/dist/esm/PageEvent.d.ts +25 -0
- package/dist/esm/PageEvent.js +22 -0
- package/dist/esm/PubSub.d.ts +2 -0
- package/dist/esm/PubSub.js +111 -0
- package/dist/esm/ReportHistoryStore.d.ts +8 -0
- package/dist/esm/ReportHistoryStore.js +199 -0
- package/dist/esm/SafeString.js +2 -2
- package/dist/esm/Templates.d.ts +58 -0
- package/dist/esm/Templates.js +196 -0
- package/dist/esm/Url.d.ts +10 -0
- package/dist/esm/Url.js +15 -0
- package/dist/esm/components/CopyText.d.ts +45 -0
- package/dist/esm/components/CopyText.js +56 -0
- package/dist/esm/components/StepProgressBar.d.ts +26 -0
- package/dist/esm/components/StepProgressBar.js +40 -0
- package/dist/esm/components/form/element/combobox.d.ts +231 -0
- package/dist/esm/components/form/element/combobox.js +812 -0
- package/dist/esm/components/form/element/dropdown.d.ts +35 -0
- package/dist/esm/components/form/element/dropdown.js +61 -0
- package/dist/esm/components/form/element/dropdownItem.d.ts +55 -0
- package/dist/esm/components/form/element/dropdownItem.js +113 -0
- package/dist/esm/components/form/element/onOffSwitch.d.ts +94 -0
- package/dist/esm/components/form/element/onOffSwitch.js +167 -0
- package/dist/esm/components/form/element/switch.d.ts +58 -0
- package/dist/esm/components/form/element/switch.js +98 -0
- package/dist/esm/fastMerge.d.ts +9 -0
- package/dist/esm/fastMerge.js +58 -0
- package/dist/esm/index.d.ts +22 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/jquery.expensifyIframify.d.ts +9 -0
- package/dist/esm/jquery.expensifyIframify.js +397 -0
- package/dist/esm/md5.d.ts +2 -0
- package/dist/esm/md5.js +170 -0
- package/dist/esm/mixins/PubSub.d.ts +20 -0
- package/dist/esm/mixins/PubSub.js +47 -0
- package/dist/esm/mixins/extraClasses.d.ts +8 -0
- package/dist/esm/mixins/extraClasses.js +37 -0
- package/dist/esm/mixins/validationClasses.d.ts +12 -0
- package/dist/esm/mixins/validationClasses.js +30 -0
- package/dist/esm/str.d.ts +604 -0
- package/dist/esm/str.js +1036 -0
- package/dist/esm/tlds.d.ts +2 -0
- package/dist/esm/tlds.js +2 -0
- package/dist/esm/utils.d.ts +30 -0
- package/dist/esm/utils.js +65 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -1
- package/package.json +221 -4
|
@@ -0,0 +1,1847 @@
|
|
|
1
|
+
/* eslint-disable no-useless-escape */
|
|
2
|
+
const EMAIL_BASE_REGEX = "(?=((?=[\\w'#%+-]+(?:\\.[\\w'#%+-]+)*@)[\\w\\.'#%+-]{1,64}@(?:(?=[a-z\\d]+(?:-+[a-z\\d]+)*\\.)(?:[a-z\\d-]{1,63}\\.)+[a-z]{2,63})(?= |_|\\b))(?<end>.*))\\S{3,254}(?=\\k<end>$)";
|
|
3
|
+
const MOMENT_FORMAT_STRING = 'YYYY-MM-DD';
|
|
4
|
+
/**
|
|
5
|
+
* URL of our CloudFront Instance
|
|
6
|
+
*/
|
|
7
|
+
const g_cloudFront = 'https://d2k5nsl2zxldvw.cloudfront.net';
|
|
8
|
+
/**
|
|
9
|
+
* URL of our image CDN
|
|
10
|
+
*/
|
|
11
|
+
const g_cloudFrontImg = `${g_cloudFront}/images/`;
|
|
12
|
+
const CONST = {
|
|
13
|
+
CORPAY_DIRECT_REIMBURSEMENT_CURRENCIES: ['USD', 'GBP', 'EUR', 'AUD', 'CAD', 'SGD'],
|
|
14
|
+
/**
|
|
15
|
+
* Default max ACH limit. It can be overwritten by a private NVP
|
|
16
|
+
*
|
|
17
|
+
* @type {Number}
|
|
18
|
+
*/
|
|
19
|
+
ACH_DEFAULT_MAX_AMOUNT_LIMIT: 2000000,
|
|
20
|
+
/**
|
|
21
|
+
* This is set in main.html and is derived from a PHP template variable
|
|
22
|
+
* @type {String}
|
|
23
|
+
*/
|
|
24
|
+
URL_TO_SECURE_WEBSITE: '',
|
|
25
|
+
/**
|
|
26
|
+
* IRS remimbursement rate for mileage
|
|
27
|
+
* WARNING ! UPDATE THE PHP CONSTANT VERSION WHEN UPDATING THIS ONE
|
|
28
|
+
*
|
|
29
|
+
* @type Number
|
|
30
|
+
*/
|
|
31
|
+
MILEAGE_IRS_RATE: new Date() > new Date(2019, 1, 1) ? 0.545 : 0.58,
|
|
32
|
+
/**
|
|
33
|
+
* Display this amount to users to encourage them to book a call
|
|
34
|
+
*
|
|
35
|
+
* @type Number
|
|
36
|
+
*/
|
|
37
|
+
MAX_TRIAL_BONUS_DAYS: 42,
|
|
38
|
+
COUNTRY: {
|
|
39
|
+
US: 'US',
|
|
40
|
+
MX: 'MX',
|
|
41
|
+
AU: 'AU',
|
|
42
|
+
CA: 'CA',
|
|
43
|
+
UK: 'UK',
|
|
44
|
+
NZ: 'NZ',
|
|
45
|
+
},
|
|
46
|
+
CURRENCIES: {
|
|
47
|
+
US: 'USD',
|
|
48
|
+
AU: 'AUD',
|
|
49
|
+
UK: 'GBP',
|
|
50
|
+
NZ: 'NZD',
|
|
51
|
+
EU: 'EUR',
|
|
52
|
+
GB: 'GBP',
|
|
53
|
+
},
|
|
54
|
+
STATES: {
|
|
55
|
+
AK: {
|
|
56
|
+
stateISO: 'AK',
|
|
57
|
+
stateName: 'Alaska',
|
|
58
|
+
},
|
|
59
|
+
AL: {
|
|
60
|
+
stateISO: 'AL',
|
|
61
|
+
stateName: 'Alabama',
|
|
62
|
+
},
|
|
63
|
+
AR: {
|
|
64
|
+
stateISO: 'AR',
|
|
65
|
+
stateName: 'Arkansas',
|
|
66
|
+
},
|
|
67
|
+
AZ: {
|
|
68
|
+
stateISO: 'AZ',
|
|
69
|
+
stateName: 'Arizona',
|
|
70
|
+
},
|
|
71
|
+
CA: {
|
|
72
|
+
stateISO: 'CA',
|
|
73
|
+
stateName: 'California',
|
|
74
|
+
},
|
|
75
|
+
CO: {
|
|
76
|
+
stateISO: 'CO',
|
|
77
|
+
stateName: 'Colorado',
|
|
78
|
+
},
|
|
79
|
+
CT: {
|
|
80
|
+
stateISO: 'CT',
|
|
81
|
+
stateName: 'Connecticut',
|
|
82
|
+
},
|
|
83
|
+
DE: {
|
|
84
|
+
stateISO: 'DE',
|
|
85
|
+
stateName: 'Delaware',
|
|
86
|
+
},
|
|
87
|
+
FL: {
|
|
88
|
+
stateISO: 'FL',
|
|
89
|
+
stateName: 'Florida',
|
|
90
|
+
},
|
|
91
|
+
GA: {
|
|
92
|
+
stateISO: 'GA',
|
|
93
|
+
stateName: 'Georgia',
|
|
94
|
+
},
|
|
95
|
+
HI: {
|
|
96
|
+
stateISO: 'HI',
|
|
97
|
+
stateName: 'Hawaii',
|
|
98
|
+
},
|
|
99
|
+
IA: {
|
|
100
|
+
stateISO: 'IA',
|
|
101
|
+
stateName: 'Iowa',
|
|
102
|
+
},
|
|
103
|
+
ID: {
|
|
104
|
+
stateISO: 'ID',
|
|
105
|
+
stateName: 'Idaho',
|
|
106
|
+
},
|
|
107
|
+
IL: {
|
|
108
|
+
stateISO: 'IL',
|
|
109
|
+
stateName: 'Illinois',
|
|
110
|
+
},
|
|
111
|
+
IN: {
|
|
112
|
+
stateISO: 'IN',
|
|
113
|
+
stateName: 'Indiana',
|
|
114
|
+
},
|
|
115
|
+
KS: {
|
|
116
|
+
stateISO: 'KS',
|
|
117
|
+
stateName: 'Kansas',
|
|
118
|
+
},
|
|
119
|
+
KY: {
|
|
120
|
+
stateISO: 'KY',
|
|
121
|
+
stateName: 'Kentucky',
|
|
122
|
+
},
|
|
123
|
+
LA: {
|
|
124
|
+
stateISO: 'LA',
|
|
125
|
+
stateName: 'Louisiana',
|
|
126
|
+
},
|
|
127
|
+
MA: {
|
|
128
|
+
stateISO: 'MA',
|
|
129
|
+
stateName: 'Massachusetts',
|
|
130
|
+
},
|
|
131
|
+
MD: {
|
|
132
|
+
stateISO: 'MD',
|
|
133
|
+
stateName: 'Maryland',
|
|
134
|
+
},
|
|
135
|
+
ME: {
|
|
136
|
+
stateISO: 'ME',
|
|
137
|
+
stateName: 'Maine',
|
|
138
|
+
},
|
|
139
|
+
MI: {
|
|
140
|
+
stateISO: 'MI',
|
|
141
|
+
stateName: 'Michigan',
|
|
142
|
+
},
|
|
143
|
+
MN: {
|
|
144
|
+
stateISO: 'MN',
|
|
145
|
+
stateName: 'Minnesota',
|
|
146
|
+
},
|
|
147
|
+
MO: {
|
|
148
|
+
stateISO: 'MO',
|
|
149
|
+
stateName: 'Missouri',
|
|
150
|
+
},
|
|
151
|
+
MS: {
|
|
152
|
+
stateISO: 'MS',
|
|
153
|
+
stateName: 'Mississippi',
|
|
154
|
+
},
|
|
155
|
+
MT: {
|
|
156
|
+
stateISO: 'MT',
|
|
157
|
+
stateName: 'Montana',
|
|
158
|
+
},
|
|
159
|
+
NC: {
|
|
160
|
+
stateISO: 'NC',
|
|
161
|
+
stateName: 'North Carolina',
|
|
162
|
+
},
|
|
163
|
+
ND: {
|
|
164
|
+
stateISO: 'ND',
|
|
165
|
+
stateName: 'North Dakota',
|
|
166
|
+
},
|
|
167
|
+
NE: {
|
|
168
|
+
stateISO: 'NE',
|
|
169
|
+
stateName: 'Nebraska',
|
|
170
|
+
},
|
|
171
|
+
NH: {
|
|
172
|
+
stateISO: 'NH',
|
|
173
|
+
stateName: 'New Hampshire',
|
|
174
|
+
},
|
|
175
|
+
NJ: {
|
|
176
|
+
stateISO: 'NJ',
|
|
177
|
+
stateName: 'New Jersey',
|
|
178
|
+
},
|
|
179
|
+
NM: {
|
|
180
|
+
stateISO: 'NM',
|
|
181
|
+
stateName: 'New Mexico',
|
|
182
|
+
},
|
|
183
|
+
NV: {
|
|
184
|
+
stateISO: 'NV',
|
|
185
|
+
stateName: 'Nevada',
|
|
186
|
+
},
|
|
187
|
+
NY: {
|
|
188
|
+
stateISO: 'NY',
|
|
189
|
+
stateName: 'New York',
|
|
190
|
+
},
|
|
191
|
+
OH: {
|
|
192
|
+
stateISO: 'OH',
|
|
193
|
+
stateName: 'Ohio',
|
|
194
|
+
},
|
|
195
|
+
OK: {
|
|
196
|
+
stateISO: 'OK',
|
|
197
|
+
stateName: 'Oklahoma',
|
|
198
|
+
},
|
|
199
|
+
OR: {
|
|
200
|
+
stateISO: 'OR',
|
|
201
|
+
stateName: 'Oregon',
|
|
202
|
+
},
|
|
203
|
+
PA: {
|
|
204
|
+
stateISO: 'PA',
|
|
205
|
+
stateName: 'Pennsylvania',
|
|
206
|
+
},
|
|
207
|
+
PR: {
|
|
208
|
+
stateISO: 'PR',
|
|
209
|
+
stateName: 'Puerto Rico',
|
|
210
|
+
},
|
|
211
|
+
RI: {
|
|
212
|
+
stateISO: 'RI',
|
|
213
|
+
stateName: 'Rhode Island',
|
|
214
|
+
},
|
|
215
|
+
SC: {
|
|
216
|
+
stateISO: 'SC',
|
|
217
|
+
stateName: 'South Carolina',
|
|
218
|
+
},
|
|
219
|
+
SD: {
|
|
220
|
+
stateISO: 'SD',
|
|
221
|
+
stateName: 'South Dakota',
|
|
222
|
+
},
|
|
223
|
+
TN: {
|
|
224
|
+
stateISO: 'TN',
|
|
225
|
+
stateName: 'Tennessee',
|
|
226
|
+
},
|
|
227
|
+
TX: {
|
|
228
|
+
stateISO: 'TX',
|
|
229
|
+
stateName: 'Texas',
|
|
230
|
+
},
|
|
231
|
+
UT: {
|
|
232
|
+
stateISO: 'UT',
|
|
233
|
+
stateName: 'Utah',
|
|
234
|
+
},
|
|
235
|
+
VA: {
|
|
236
|
+
stateISO: 'VA',
|
|
237
|
+
stateName: 'Virginia',
|
|
238
|
+
},
|
|
239
|
+
VT: {
|
|
240
|
+
stateISO: 'VT',
|
|
241
|
+
stateName: 'Vermont',
|
|
242
|
+
},
|
|
243
|
+
WA: {
|
|
244
|
+
stateISO: 'WA',
|
|
245
|
+
stateName: 'Washington',
|
|
246
|
+
},
|
|
247
|
+
WI: {
|
|
248
|
+
stateISO: 'WI',
|
|
249
|
+
stateName: 'Wisconsin',
|
|
250
|
+
},
|
|
251
|
+
WV: {
|
|
252
|
+
stateISO: 'WV',
|
|
253
|
+
stateName: 'West Virginia',
|
|
254
|
+
},
|
|
255
|
+
WY: {
|
|
256
|
+
stateISO: 'WY',
|
|
257
|
+
stateName: 'Wyoming',
|
|
258
|
+
},
|
|
259
|
+
DC: {
|
|
260
|
+
stateISO: 'DC',
|
|
261
|
+
stateName: 'District Of Columbia',
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
/** Canadian provinces */
|
|
265
|
+
PROVINCES: {
|
|
266
|
+
AB: {
|
|
267
|
+
provinceISO: 'AB',
|
|
268
|
+
provinceName: 'Alberta',
|
|
269
|
+
},
|
|
270
|
+
BC: {
|
|
271
|
+
provinceISO: 'BC',
|
|
272
|
+
provinceName: 'British Columbia',
|
|
273
|
+
},
|
|
274
|
+
MB: {
|
|
275
|
+
provinceISO: 'MB',
|
|
276
|
+
provinceName: 'Manitoba',
|
|
277
|
+
},
|
|
278
|
+
NB: {
|
|
279
|
+
provinceISO: 'NB',
|
|
280
|
+
provinceName: 'New Brunswick',
|
|
281
|
+
},
|
|
282
|
+
NL: {
|
|
283
|
+
provinceISO: 'NL',
|
|
284
|
+
provinceName: 'Newfoundland and Labrador',
|
|
285
|
+
},
|
|
286
|
+
NS: {
|
|
287
|
+
provinceISO: 'NS',
|
|
288
|
+
provinceName: 'Nova Scotia',
|
|
289
|
+
},
|
|
290
|
+
NT: {
|
|
291
|
+
provinceISO: 'NT',
|
|
292
|
+
provinceName: 'Northwest Territories',
|
|
293
|
+
},
|
|
294
|
+
NU: {
|
|
295
|
+
provinceISO: 'NU',
|
|
296
|
+
provinceName: 'Nunavut',
|
|
297
|
+
},
|
|
298
|
+
ON: {
|
|
299
|
+
provinceISO: 'ON',
|
|
300
|
+
provinceName: 'Ontario',
|
|
301
|
+
},
|
|
302
|
+
PE: {
|
|
303
|
+
provinceISO: 'PE',
|
|
304
|
+
provinceName: 'Prince Edward Island',
|
|
305
|
+
},
|
|
306
|
+
QC: {
|
|
307
|
+
provinceISO: 'QC',
|
|
308
|
+
provinceName: 'Quebec',
|
|
309
|
+
},
|
|
310
|
+
SK: {
|
|
311
|
+
provinceISO: 'SK',
|
|
312
|
+
provinceName: 'Saskatchewan',
|
|
313
|
+
},
|
|
314
|
+
YT: {
|
|
315
|
+
provinceISO: 'YT',
|
|
316
|
+
provinceName: 'Yukon',
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
/**
|
|
320
|
+
* Special characters that need to be removed when they are ending an url
|
|
321
|
+
*
|
|
322
|
+
* @type String
|
|
323
|
+
*/
|
|
324
|
+
SPECIAL_CHARS_TO_REMOVE: '$*.+!(,=',
|
|
325
|
+
/**
|
|
326
|
+
* Store all the regular expression we are using for matching stuff
|
|
327
|
+
*/
|
|
328
|
+
REG_EXP: {
|
|
329
|
+
/**
|
|
330
|
+
* Regular expression to check that a domain is valid
|
|
331
|
+
*
|
|
332
|
+
* @type RegExp
|
|
333
|
+
*/
|
|
334
|
+
DOMAIN: /^[\w-\.]*\.\w{2,}$/,
|
|
335
|
+
/**
|
|
336
|
+
* Regex matching an text containing an email
|
|
337
|
+
*
|
|
338
|
+
* @type String
|
|
339
|
+
*/
|
|
340
|
+
EMAIL_PART: EMAIL_BASE_REGEX,
|
|
341
|
+
/**
|
|
342
|
+
* Regex matching a text containing general phone number
|
|
343
|
+
*
|
|
344
|
+
* @type RegExp
|
|
345
|
+
*/
|
|
346
|
+
GENERAL_PHONE_PART: /^(\+\d{1,2}\s?)?(\(\d{3}\)|\d{3})[\s.-]?\d{3}[\s.-]?\d{4}$/,
|
|
347
|
+
/**
|
|
348
|
+
* Regex matching a text containing an E.164 format phone number
|
|
349
|
+
*/
|
|
350
|
+
PHONE_PART: '\\+[1-9]\\d{1,14}',
|
|
351
|
+
/**
|
|
352
|
+
* Regular expression to check that a basic name is valid
|
|
353
|
+
*
|
|
354
|
+
* @type RegExp
|
|
355
|
+
*/
|
|
356
|
+
FREE_NAME: /^[^\r\n\t]{1,256}$/,
|
|
357
|
+
/**
|
|
358
|
+
* Regular expression to check that a card is masked
|
|
359
|
+
*
|
|
360
|
+
* @type RegExp
|
|
361
|
+
*/
|
|
362
|
+
MASKED_CARD: /^\d{0,6}[X]+\d{4,7}$/,
|
|
363
|
+
/**
|
|
364
|
+
* Regular expression to check that an email is valid
|
|
365
|
+
*
|
|
366
|
+
* @type RegExp
|
|
367
|
+
*/
|
|
368
|
+
EMAIL: new RegExp(`^${EMAIL_BASE_REGEX}$`, 'i'),
|
|
369
|
+
/**
|
|
370
|
+
* Regular expression to extract an email from a text
|
|
371
|
+
*
|
|
372
|
+
* @type RegExp
|
|
373
|
+
*/
|
|
374
|
+
EXTRACT_EMAIL: new RegExp(EMAIL_BASE_REGEX, 'gi'),
|
|
375
|
+
/**
|
|
376
|
+
* Regular expression to search for valid email addresses in a string
|
|
377
|
+
*
|
|
378
|
+
* @type RegExp
|
|
379
|
+
*/
|
|
380
|
+
EMAIL_SEARCH: new RegExp(EMAIL_BASE_REGEX, 'gi'),
|
|
381
|
+
/**
|
|
382
|
+
* Regular expression to detect if something is a hyperlink
|
|
383
|
+
*
|
|
384
|
+
* Adapted from: https://gist.github.com/dperini/729294
|
|
385
|
+
*
|
|
386
|
+
* @type RegExp
|
|
387
|
+
*/
|
|
388
|
+
HYPERLINK: /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,
|
|
389
|
+
/**
|
|
390
|
+
* Regex to match valid emails during markdown transformations
|
|
391
|
+
*
|
|
392
|
+
* @type String
|
|
393
|
+
*/
|
|
394
|
+
MARKDOWN_EMAIL: EMAIL_BASE_REGEX,
|
|
395
|
+
/**
|
|
396
|
+
* Regex matching an text containing an Emoji that can be a single emoji or made up by some different emojis
|
|
397
|
+
*
|
|
398
|
+
* @type RegExp
|
|
399
|
+
*/
|
|
400
|
+
EMOJI_RULE: /[\p{Extended_Pictographic}\uE000-\uF8FF\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}](\u200D[\p{Extended_Pictographic}]|[\u{1F3FB}-\u{1F3FF}]|[\u{E0020}-\u{E007F}]|\uFE0F|\u20E3)*|[\u{1F1E6}-\u{1F1FF}]{2}|[#*0-9]\uFE0F?\u20E3/gu,
|
|
401
|
+
/**
|
|
402
|
+
* Regex to match a piece of text or @here, needed for both shortMention and userMention
|
|
403
|
+
*/
|
|
404
|
+
PRE_MENTION_TEXT_PART: '(@here|[a-zA-Z0-9.!$%&+=?^\\`{|}-]?)',
|
|
405
|
+
},
|
|
406
|
+
REPORT: {
|
|
407
|
+
/**
|
|
408
|
+
* Limit when we decided to turn off print to pdf and use only the native feature
|
|
409
|
+
*/
|
|
410
|
+
LIMIT_PRINT_PDF: 250,
|
|
411
|
+
ACH_LIMIT: 2000000,
|
|
412
|
+
ACH_DEFAULT_DAYS: 4,
|
|
413
|
+
/**
|
|
414
|
+
* This is the string that a user can enter in a formula to refer to the report title field
|
|
415
|
+
*
|
|
416
|
+
* @type {String}
|
|
417
|
+
*/
|
|
418
|
+
TITLE_FORMULA: '{report:title}',
|
|
419
|
+
/**
|
|
420
|
+
* The max time a comment can be made after another to be considered the same comment, in seconds
|
|
421
|
+
*/
|
|
422
|
+
MAX_AGE_SAME_COMMENT: 300,
|
|
423
|
+
SMARTREPORT_AGENT_EMAIL: 'smartreports@expensify.com',
|
|
424
|
+
/**
|
|
425
|
+
* Email to submit smart reports to (alias for consistency)
|
|
426
|
+
*/
|
|
427
|
+
SMART_REPORT_AGENT_EMAIL: 'smartreports@expensify.com',
|
|
428
|
+
},
|
|
429
|
+
/**
|
|
430
|
+
* Root URLs
|
|
431
|
+
*/
|
|
432
|
+
URL: {
|
|
433
|
+
FORUM_ROOT: 'https://community.expensify.com/',
|
|
434
|
+
RECEIPTS: {
|
|
435
|
+
DEVELOPMENT: 'https://www.expensify.com.dev/receipts/',
|
|
436
|
+
STAGING: 'https://staging.expensify.com/receipts/',
|
|
437
|
+
PRODUCTION: 'https://www.expensify.com/receipts/',
|
|
438
|
+
},
|
|
439
|
+
CLOUDFRONT: 'https://d2k5nsl2zxldvw.cloudfront.net',
|
|
440
|
+
CLOUDFRONT_IMG: 'https://d2k5nsl2zxldvw.cloudfront.net/images/',
|
|
441
|
+
CLOUDFRONT_FILES: 'https://d2k5nsl2zxldvw.cloudfront.net/files/',
|
|
442
|
+
EXPENSIFY_SYNC_MANAGER: 'quickbooksdesktop/Expensify_QuickBooksDesktop_Setup_2300802.exe',
|
|
443
|
+
USEDOT_ROOT: 'https://use.expensify.com/',
|
|
444
|
+
HELPDOT_ROOT: 'https://help.expensify.com/',
|
|
445
|
+
ITUNES_SUBSCRIPTION: 'https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions',
|
|
446
|
+
},
|
|
447
|
+
DATE: {
|
|
448
|
+
FORMAT_STRING: 'yyyy-MM-dd',
|
|
449
|
+
FORMAT_STRING_PRETTY: 'MMM d, yyyy',
|
|
450
|
+
/**
|
|
451
|
+
* Expensify date format string for moment js
|
|
452
|
+
* usage: moment().format( CONST.DATE.MOMENT_FORMAT_STRING )
|
|
453
|
+
*/
|
|
454
|
+
MOMENT_FORMAT_STRING,
|
|
455
|
+
/**
|
|
456
|
+
* This is a typical format of the date plus the time
|
|
457
|
+
*
|
|
458
|
+
* @type {String}
|
|
459
|
+
*/
|
|
460
|
+
MOMENT_DATE_TIME: 'YYYY-MM-DD HH:mm',
|
|
461
|
+
/**
|
|
462
|
+
* Pretty format used for report history items
|
|
463
|
+
*
|
|
464
|
+
* @example Jun 19, 2019 12:38 PM
|
|
465
|
+
*
|
|
466
|
+
* @type {String}
|
|
467
|
+
*/
|
|
468
|
+
MOMENT_DATE_TIME_PRETTY: 'MMM DD YYYY h:mma',
|
|
469
|
+
/**
|
|
470
|
+
* Date-time format, including timezone information, eg "2015-10-14T19:44:35+07:00"
|
|
471
|
+
*
|
|
472
|
+
* @type {String}
|
|
473
|
+
*/
|
|
474
|
+
MOMENT_DATE_TIME_TIMEZONE: 'YYYY-MM-DDTHH:mm:ssZ',
|
|
475
|
+
/**
|
|
476
|
+
* Moment formatting option for a date of this format "Jul 2, 2014"
|
|
477
|
+
*
|
|
478
|
+
* @type {string}
|
|
479
|
+
*/
|
|
480
|
+
MOMENT_US_DATE: 'MMM D, YYYY',
|
|
481
|
+
/**
|
|
482
|
+
* Moment formatting option for a date of this format "July 2, 2014"
|
|
483
|
+
* ie, full month name
|
|
484
|
+
*
|
|
485
|
+
* @type {string}
|
|
486
|
+
*/
|
|
487
|
+
MOMENT_US_DATE_LONG: 'MMMM D, YYYY',
|
|
488
|
+
/**
|
|
489
|
+
* Moment formatting option for full month name and year as in "July 2015"
|
|
490
|
+
*
|
|
491
|
+
* @type {string}
|
|
492
|
+
*/
|
|
493
|
+
MOMENT_US_MONTH_YEAR_LONG: 'MMMM YYYY',
|
|
494
|
+
/**
|
|
495
|
+
* Difference between the local time and UTC time in ms
|
|
496
|
+
*/
|
|
497
|
+
TIMEZONE_OFFSET_MS: new Date().getTimezoneOffset() * 60000,
|
|
498
|
+
SHORT_MONTH_SHORT_DAY: 'MMM d', // e.g. Jan 1
|
|
499
|
+
LONG_YEAR_MONTH_DAY_24_TIME: 'yyyy-MM-dd HH:mm:ss', // e.g. 2020-01-01 20:45:15
|
|
500
|
+
SHORT_MONTH_DAY_LOCAL_TIME: 'MMM D [at] LT', // e.g. Jan 1 at 12:00 PM
|
|
501
|
+
SHORT_MONTH_DAY_YEAR_LOCAL_TIME: 'MMM D, YYYY [at] LT', // e.g. Jan 1, 2020 at 12:00 PM
|
|
502
|
+
},
|
|
503
|
+
/**
|
|
504
|
+
* Message used by the Func.die() exception
|
|
505
|
+
*
|
|
506
|
+
* @type String
|
|
507
|
+
*/
|
|
508
|
+
FUNC_DIE_MESSAGE: 'Aborting JavaScript execution',
|
|
509
|
+
/**
|
|
510
|
+
* Default for how long the email delivery failure NVP should be valid (in seconds)
|
|
511
|
+
* Currently 14 days (14 * 24 * 60 * 60)
|
|
512
|
+
*
|
|
513
|
+
* WARNING ! UPDATE THE PHP CONSTANT VERSION WHEN UPDATING THIS ONE
|
|
514
|
+
*
|
|
515
|
+
* @type Integer
|
|
516
|
+
*/
|
|
517
|
+
EMAIL_DELIVERY_FAILURE_VALIDITY: 1209600,
|
|
518
|
+
/**
|
|
519
|
+
* Bill Processing-related constants
|
|
520
|
+
*/
|
|
521
|
+
BILL_PROCESSING_PARTNER_NAME: 'expensify.cash',
|
|
522
|
+
BILL_PROCESSING_EMAIL_DOMAIN: 'expensify.cash',
|
|
523
|
+
/**
|
|
524
|
+
* Bank Import Logic Constants
|
|
525
|
+
*/
|
|
526
|
+
BANK_IMPORT: {
|
|
527
|
+
BANK_STATUS_BROKEN: 2,
|
|
528
|
+
},
|
|
529
|
+
/**
|
|
530
|
+
* Bank Account Logic Constants
|
|
531
|
+
*/
|
|
532
|
+
BANK_ACCOUNT: {
|
|
533
|
+
VERIFICATION_MAX_ATTEMPTS: 7,
|
|
534
|
+
},
|
|
535
|
+
// The number of days that certain banks limit their transaction imports to
|
|
536
|
+
// see https://stackoverflow.com/c/expensify/questions/1289/1290#1290 for more about this.
|
|
537
|
+
// If a bank isn't on this list, we default to 90 days
|
|
538
|
+
BANK_IMPORT_DAY_LIMITS: {
|
|
539
|
+
'americanexpress.com': 30,
|
|
540
|
+
'oauth.bankofamerica.com': 30,
|
|
541
|
+
'oauth.capitalone.com': 90,
|
|
542
|
+
'oauth.chase.com': 90,
|
|
543
|
+
'discover.com': 30,
|
|
544
|
+
'admin.pexcard.com': 30,
|
|
545
|
+
svbdirect: 75,
|
|
546
|
+
'oauth.wellsfargo.com': 30,
|
|
547
|
+
},
|
|
548
|
+
DEFAULT_BANK_IMPORT_DAYS: 90,
|
|
549
|
+
PERSONAL_CARD_START_DATE_TOOLTIP: 'Expensify will automatically import the earliest available transactions from this card. If a start date is selected, transactions with a posted date prior to this will not be included.',
|
|
550
|
+
/**
|
|
551
|
+
* Emails that the user shouldn't be interacting with from the front-end interface
|
|
552
|
+
* Trying to add these emails as a delegate, onto a policy, or as an approver is considered invalid
|
|
553
|
+
* Any changes here should be reflected in the PHP constant in web-expensify,
|
|
554
|
+
* which is located in _constant.php and also named EXPENSIFY_EMAILS.
|
|
555
|
+
* And should also be reflected in the constant in expensify/app,
|
|
556
|
+
* which is located in src/CONST.js and also named EXPENSIFY_EMAILS.
|
|
557
|
+
*/
|
|
558
|
+
EXPENSIFY_EMAILS: [
|
|
559
|
+
'concierge@expensify.com',
|
|
560
|
+
'help@expensify.com',
|
|
561
|
+
'receipts@expensify.com',
|
|
562
|
+
'chronos@expensify.com',
|
|
563
|
+
'qa@expensify.com',
|
|
564
|
+
'contributors@expensify.com',
|
|
565
|
+
'firstresponders@expensify.com',
|
|
566
|
+
'qa+travisreceipts@expensify.com',
|
|
567
|
+
'bills@expensify.com',
|
|
568
|
+
'studentambassadors@expensify.com',
|
|
569
|
+
'accounting@expensify.com',
|
|
570
|
+
'payroll@expensify.com',
|
|
571
|
+
'svfg@expensify.com',
|
|
572
|
+
'integrationtestingcreds@expensify.com',
|
|
573
|
+
'admin@expensify.com',
|
|
574
|
+
'notifications@expensify.com',
|
|
575
|
+
],
|
|
576
|
+
/**
|
|
577
|
+
* Emails that the user shouldn't submit reports to nor share reports with
|
|
578
|
+
* Any changes here should be reflected in the PHP constant,
|
|
579
|
+
* which is located in _constant.php and also named INVALID_APPROVER_AND_SHAREE_EMAILS
|
|
580
|
+
*/
|
|
581
|
+
INVALID_APPROVER_AND_SHAREE_EMAILS: [
|
|
582
|
+
'concierge@expensify.com',
|
|
583
|
+
'help@expensify.com',
|
|
584
|
+
'receipts@expensify.com',
|
|
585
|
+
'chronos@expensify.com',
|
|
586
|
+
'qa@expensify.com',
|
|
587
|
+
'contributors@expensify.com',
|
|
588
|
+
'firstresponders@expensify.com',
|
|
589
|
+
'qa+travisreceipts@expensify.com',
|
|
590
|
+
'bills@expensify.com',
|
|
591
|
+
'admin@expensify.com',
|
|
592
|
+
'notifications@expensify.com',
|
|
593
|
+
],
|
|
594
|
+
/**
|
|
595
|
+
* Smart scan-related constants
|
|
596
|
+
*/
|
|
597
|
+
SMART_SCAN: {
|
|
598
|
+
COST: 20,
|
|
599
|
+
FREE_NUMBER: 25,
|
|
600
|
+
},
|
|
601
|
+
SMS: {
|
|
602
|
+
// Domain used for accounts that sign up with phone numbers
|
|
603
|
+
DOMAIN: 'expensify.sms',
|
|
604
|
+
// Regex that matches on an E.164 phone number starting with a '+'
|
|
605
|
+
E164_REGEX: /^\+?[1-9]\d{1,14}$/,
|
|
606
|
+
},
|
|
607
|
+
PASSWORD_COMPLEXITY_REGEX_STRING: '^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,}$',
|
|
608
|
+
INTEGRATIONS: {
|
|
609
|
+
ACCOUNTING_METHOD: {
|
|
610
|
+
CASH: 'CASH',
|
|
611
|
+
ACCRUAL: 'ACCRUAL',
|
|
612
|
+
},
|
|
613
|
+
/**
|
|
614
|
+
* Constants that specify how to map (import) Integrations data to Expensify
|
|
615
|
+
* Parallel to IntegrationEntityMappingTypeEnum in the IS
|
|
616
|
+
*/
|
|
617
|
+
DATA_MAPPING: {
|
|
618
|
+
NONE: 'NONE',
|
|
619
|
+
TAG: 'TAG',
|
|
620
|
+
REPORT_FIELD: 'REPORT_FIELD',
|
|
621
|
+
DEFAULT: 'DEFAULT',
|
|
622
|
+
},
|
|
623
|
+
EXPORT_DATE: {
|
|
624
|
+
LAST_EXPENSE: 'LAST_EXPENSE',
|
|
625
|
+
REPORT_EXPORTED: 'REPORT_EXPORTED',
|
|
626
|
+
REPORT_SUBMITTED: 'REPORT_SUBMITTED',
|
|
627
|
+
},
|
|
628
|
+
XERO_HQ_CONNECTION_NAME: 'xerohq',
|
|
629
|
+
EXPENSIFY_SYNC_MANAGER_VERSION: '23.0.802.0',
|
|
630
|
+
},
|
|
631
|
+
INTEGRATION_TYPES: {
|
|
632
|
+
ACCOUNTING: 'accounting',
|
|
633
|
+
HR: 'hr',
|
|
634
|
+
},
|
|
635
|
+
DIRECT_INTEGRATIONS: {
|
|
636
|
+
zenefits: {
|
|
637
|
+
value: 'zenefits',
|
|
638
|
+
text: 'Zenefits',
|
|
639
|
+
image: `${g_cloudFrontImg}icons/export-icons/zenefit.svg`,
|
|
640
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/zenefit_gray.svg`,
|
|
641
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/zenefit_alert.svg`,
|
|
642
|
+
types: ['hr'],
|
|
643
|
+
isCorporateOnly: false,
|
|
644
|
+
},
|
|
645
|
+
gusto: {
|
|
646
|
+
value: 'gusto',
|
|
647
|
+
text: 'Gusto',
|
|
648
|
+
image: `${g_cloudFrontImg}icons/export-icons/gusto.svg`,
|
|
649
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/gusto_gray.svg`,
|
|
650
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/gusto_alert.svg`,
|
|
651
|
+
types: ['hr'],
|
|
652
|
+
isCorporateOnly: false,
|
|
653
|
+
},
|
|
654
|
+
quickbooksOnline: {
|
|
655
|
+
value: 'quickbooksOnline',
|
|
656
|
+
text: 'QuickBooks Online',
|
|
657
|
+
image: `${g_cloudFrontImg}icons/export-icons/quickbooks.svg`,
|
|
658
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/quickbooks_gray.svg`,
|
|
659
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/quickbooks_alert.svg`,
|
|
660
|
+
types: ['hr', 'accounting'],
|
|
661
|
+
isCorporateOnly: false,
|
|
662
|
+
},
|
|
663
|
+
xero: {
|
|
664
|
+
value: 'xero',
|
|
665
|
+
text: 'Xero',
|
|
666
|
+
image: `${g_cloudFrontImg}icons/export-icons/xero.svg`,
|
|
667
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/xero_gray.svg`,
|
|
668
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/xero_alert.svg`,
|
|
669
|
+
types: ['accounting'],
|
|
670
|
+
isCorporateOnly: false,
|
|
671
|
+
},
|
|
672
|
+
netsuite: {
|
|
673
|
+
value: 'netsuite',
|
|
674
|
+
text: 'NetSuite',
|
|
675
|
+
image: `${g_cloudFrontImg}icons/export-icons/netsuite.svg`,
|
|
676
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/netsuite_gray.svg`,
|
|
677
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/netsuite_alert.svg`,
|
|
678
|
+
types: ['hr', 'accounting'],
|
|
679
|
+
isCorporateOnly: true,
|
|
680
|
+
},
|
|
681
|
+
quickbooksDesktop: {
|
|
682
|
+
value: 'qbd',
|
|
683
|
+
text: 'QuickBooks Desktop',
|
|
684
|
+
image: `${g_cloudFrontImg}icons/export-icons/quickbooks.svg`,
|
|
685
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/quickbooks_gray.svg`,
|
|
686
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/quickbooks_alert.svg`,
|
|
687
|
+
types: ['accounting'],
|
|
688
|
+
isCorporateOnly: false,
|
|
689
|
+
},
|
|
690
|
+
intacct: {
|
|
691
|
+
value: 'intacct',
|
|
692
|
+
text: 'Sage Intacct',
|
|
693
|
+
image: `${g_cloudFrontImg}icons/export-icons/sage.svg`,
|
|
694
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/sage_gray.svg`,
|
|
695
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/sage_alert.svg`,
|
|
696
|
+
types: ['hr', 'accounting'],
|
|
697
|
+
isCorporateOnly: true,
|
|
698
|
+
},
|
|
699
|
+
financialforce: {
|
|
700
|
+
value: 'financialforce',
|
|
701
|
+
text: 'Certinia',
|
|
702
|
+
image: `${g_cloudFrontImg}icons/export-icons/certinia.svg`,
|
|
703
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/certinia_gray.svg`,
|
|
704
|
+
alert_image: `${g_cloudFrontImg}icons/export-icons/certinia_alert.svg`,
|
|
705
|
+
types: ['accounting'],
|
|
706
|
+
isCorporateOnly: true,
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
INDIRECT_INTEGRATIONS: {
|
|
710
|
+
microsoft_dynamics: {
|
|
711
|
+
value: 'microsoft_dynamics',
|
|
712
|
+
text: 'Microsoft Dynamics',
|
|
713
|
+
image: `${g_cloudFrontImg}icons/export-icons/microsoft_dynamics.svg`,
|
|
714
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/microsoft_dynamics_gray.svg`,
|
|
715
|
+
types: ['accounting'],
|
|
716
|
+
isCorporateOnly: true,
|
|
717
|
+
},
|
|
718
|
+
oracle: {
|
|
719
|
+
value: 'oracle',
|
|
720
|
+
text: 'Oracle',
|
|
721
|
+
image: `${g_cloudFrontImg}icons/export-icons/oracle.svg`,
|
|
722
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/oracle_gray.svg`,
|
|
723
|
+
types: ['hr', 'accounting'],
|
|
724
|
+
isCorporateOnly: true,
|
|
725
|
+
},
|
|
726
|
+
sage: {
|
|
727
|
+
value: 'sage',
|
|
728
|
+
text: 'Sage',
|
|
729
|
+
image: `${g_cloudFrontImg}icons/export-icons/sage.svg`,
|
|
730
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/sage_gray.svg`,
|
|
731
|
+
types: ['accounting'],
|
|
732
|
+
isCorporateOnly: true,
|
|
733
|
+
},
|
|
734
|
+
sap: {
|
|
735
|
+
value: 'sap',
|
|
736
|
+
text: 'SAP',
|
|
737
|
+
image: `${g_cloudFrontImg}icons/export-icons/sap.svg`,
|
|
738
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/sap_gray.svg`,
|
|
739
|
+
types: ['accounting'],
|
|
740
|
+
isCorporateOnly: true,
|
|
741
|
+
},
|
|
742
|
+
myob: {
|
|
743
|
+
value: 'myob',
|
|
744
|
+
text: 'MYOB',
|
|
745
|
+
image: `${g_cloudFrontImg}icons/export-icons/myob.svg`,
|
|
746
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/myob_gray.svg`,
|
|
747
|
+
types: ['accounting'],
|
|
748
|
+
isCorporateOnly: true,
|
|
749
|
+
},
|
|
750
|
+
workday: {
|
|
751
|
+
value: 'workday',
|
|
752
|
+
text: 'Workday',
|
|
753
|
+
image: `${g_cloudFrontImg}icons/export-icons/workday.svg`,
|
|
754
|
+
gray_image: `${g_cloudFrontImg}icons/export-icons/workday_gray.svg`,
|
|
755
|
+
types: ['hr'],
|
|
756
|
+
isCorporateOnly: true,
|
|
757
|
+
},
|
|
758
|
+
adp: {
|
|
759
|
+
value: 'adp',
|
|
760
|
+
text: 'ADP',
|
|
761
|
+
image: `${g_cloudFrontImg}icons/export-icons/adp.svg`,
|
|
762
|
+
types: ['hr'],
|
|
763
|
+
isCorporateOnly: true,
|
|
764
|
+
},
|
|
765
|
+
generic_indirect_connection: {
|
|
766
|
+
value: 'generic_indirect_connection',
|
|
767
|
+
text: 'Other',
|
|
768
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
769
|
+
types: ['hr', 'accounting'],
|
|
770
|
+
},
|
|
771
|
+
},
|
|
772
|
+
DEFAULT_IS_TEMPLATES: {
|
|
773
|
+
default: {
|
|
774
|
+
value: 'default_template',
|
|
775
|
+
text: 'Basic Export',
|
|
776
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
777
|
+
},
|
|
778
|
+
tag: {
|
|
779
|
+
value: 'tag_template',
|
|
780
|
+
text: 'Tag Export',
|
|
781
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
782
|
+
},
|
|
783
|
+
category: {
|
|
784
|
+
value: 'category_template',
|
|
785
|
+
text: 'Category Export',
|
|
786
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
787
|
+
},
|
|
788
|
+
detailed: {
|
|
789
|
+
value: 'detailed_export',
|
|
790
|
+
text: 'All Data - Expense Level Export',
|
|
791
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
792
|
+
},
|
|
793
|
+
report: {
|
|
794
|
+
value: 'report_level_export',
|
|
795
|
+
text: 'All Data - Report Level Export',
|
|
796
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
797
|
+
},
|
|
798
|
+
tax: {
|
|
799
|
+
value: 'multiple_tax_export',
|
|
800
|
+
text: 'Canadian Multiple Tax Export',
|
|
801
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
802
|
+
},
|
|
803
|
+
perdiem: {
|
|
804
|
+
value: 'per_diem_export',
|
|
805
|
+
text: 'Per Diem Export',
|
|
806
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
807
|
+
},
|
|
808
|
+
attendees: {
|
|
809
|
+
value: 'attendee_audit_export',
|
|
810
|
+
text: 'Attendee Audit Export',
|
|
811
|
+
image: `${g_cloudFrontImg}icons/accounting-other--blue.svg`,
|
|
812
|
+
},
|
|
813
|
+
},
|
|
814
|
+
NVP: {
|
|
815
|
+
// Dismissed Violations
|
|
816
|
+
DISMISSED_VIOLATIONS: 'dismissedViolations',
|
|
817
|
+
},
|
|
818
|
+
FILESIZE: {
|
|
819
|
+
BYTES_IN_MEGABYTE: 1000000, // Bytes in a Megabyte
|
|
820
|
+
MAX: 10000000, // Our max filesize allowed is 10MB
|
|
821
|
+
},
|
|
822
|
+
PARTNER_NAMES: {
|
|
823
|
+
IPHONE: 'iphone',
|
|
824
|
+
ANDROID: 'android',
|
|
825
|
+
CHAT: 'chat-expensify-com',
|
|
826
|
+
},
|
|
827
|
+
LOGIN_TYPES: {
|
|
828
|
+
WEB: 'login',
|
|
829
|
+
MOBILE: 'device',
|
|
830
|
+
},
|
|
831
|
+
VALIDATE_CODE_REASONS: {
|
|
832
|
+
SIGN_IN: 'sign_in',
|
|
833
|
+
ADD_CONTACT_METHOD: 'add_contact_method',
|
|
834
|
+
VALIDATE_ACCOUNT: 'validate_account',
|
|
835
|
+
REVEAL_CARD_DETAILS: 'reveal_card_details',
|
|
836
|
+
},
|
|
837
|
+
EXPENSIFY_CARD: {
|
|
838
|
+
FEED_NAME: 'Expensify Card',
|
|
839
|
+
// The following variables must be kept up to date with the Card::FraudState constants found in Auth
|
|
840
|
+
FRAUD_STATES: {
|
|
841
|
+
NONE: 0,
|
|
842
|
+
DOMAIN_CARDS_REIMBURSEMENTS_INVESTIGATION: 1,
|
|
843
|
+
DOMAIN_CARDS_RAPID_INCREASE_INVESTIGATION: 2,
|
|
844
|
+
DOMAIN_CARDS_RAPID_INCREASE_CLEARED: 3,
|
|
845
|
+
DOMAIN_CARDS_RAPID_INCREASE_CONFIRMED: 4,
|
|
846
|
+
INDIVIDUAL_CARD_RAPID_INCREASE_INVESTIGATION: 5,
|
|
847
|
+
INDIVIDUAL_CARD_RAPID_INCREASE_CLEARED: 6,
|
|
848
|
+
INDIVIDUAL_CARD_RAPID_INCREASE_CONFIRMED: 7,
|
|
849
|
+
SUSPICIOUS_PAN_ENTRY: 8,
|
|
850
|
+
SUSPICIOUS_PAN_ENTRY_CLEARED: 9,
|
|
851
|
+
SUSPICIOUS_PAN_ENTRY_CONFIRMED: 10,
|
|
852
|
+
SUSPICIOUS_TRANSACTIONS_DETECTED: 11,
|
|
853
|
+
SUSPICIOUS_TRANSACTIONS_DETECTED_CLEARED: 12,
|
|
854
|
+
SUSPICIOUS_TRANSACTIONS_DETECTED_CONFIRMED: 13,
|
|
855
|
+
},
|
|
856
|
+
},
|
|
857
|
+
TRAVEL_BOOKING: {
|
|
858
|
+
OPTIONS: {
|
|
859
|
+
shortFlightFare: {
|
|
860
|
+
economy: 'Economy',
|
|
861
|
+
premiumEconomy: 'Premium Economy',
|
|
862
|
+
business: 'Business',
|
|
863
|
+
first: 'First',
|
|
864
|
+
},
|
|
865
|
+
longFlightFare: {
|
|
866
|
+
economy: 'Economy',
|
|
867
|
+
premiumEconomy: 'Premium Economy',
|
|
868
|
+
business: 'Business',
|
|
869
|
+
first: 'First',
|
|
870
|
+
},
|
|
871
|
+
hotelStar: {
|
|
872
|
+
oneStar: '1',
|
|
873
|
+
twoStars: '2',
|
|
874
|
+
threeStars: '3',
|
|
875
|
+
fourStars: '4',
|
|
876
|
+
fiveStars: '5',
|
|
877
|
+
},
|
|
878
|
+
},
|
|
879
|
+
DEFAULT_OPTIONS: {
|
|
880
|
+
shortFlightFare: 'economy',
|
|
881
|
+
longFlightFare: 'economy',
|
|
882
|
+
hotelStar: 'fourStars',
|
|
883
|
+
},
|
|
884
|
+
PAYMENT_TYPE: {
|
|
885
|
+
PAY_AT_HOTEL: 'PAY_AT_HOTEL',
|
|
886
|
+
PAY_AT_VENDOR: 'PAY_AT_VENDOR',
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
// Expensify domains
|
|
890
|
+
EXPENSIFY_DOMAINS: ['expensify.com', 'expensifail.com', 'expensicorp.com'],
|
|
891
|
+
SUBSCRIPTION_CHANGE_REASONS: {
|
|
892
|
+
TOO_LIMITED: {
|
|
893
|
+
id: 'tooLimited',
|
|
894
|
+
label: 'Functionality needs improvement',
|
|
895
|
+
prompt: 'What software are you moving to and why?',
|
|
896
|
+
},
|
|
897
|
+
TOO_EXPENSIVE: {
|
|
898
|
+
id: 'tooExpensive',
|
|
899
|
+
label: 'Too expensive',
|
|
900
|
+
prompt: 'What software are you moving to and why?',
|
|
901
|
+
},
|
|
902
|
+
INADEQUATE_SUPPORT: {
|
|
903
|
+
id: 'inadequateSupport',
|
|
904
|
+
label: 'Inadequate customer support',
|
|
905
|
+
prompt: 'What software are you moving to and why?',
|
|
906
|
+
},
|
|
907
|
+
BUSINESS_CLOSING: {
|
|
908
|
+
id: 'businessClosing',
|
|
909
|
+
label: 'Company closing, downsizing, or acquired',
|
|
910
|
+
prompt: 'What software are you moving to and why?',
|
|
911
|
+
},
|
|
912
|
+
},
|
|
913
|
+
VIDEO_EXTENSIONS: ['mp4', 'mov', 'avi', 'wmv', 'flv', 'mkv', 'webm', '3gp', 'm4v', 'mpg', 'mpeg', 'ogv'],
|
|
914
|
+
// Country keys are ISO 3166-1 alpha-2 codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
915
|
+
// Per-country zip regex sources:
|
|
916
|
+
// - https://github.com/FormatterKit/PostalCodeValidator/blob/master/Sources/PostalCodeValidator/PostalCodeValidator.swift
|
|
917
|
+
// - https://en.wikipedia.org/wiki/List_of_postal_codes
|
|
918
|
+
COUNTRY_ZIP_REGEX_DATA: {
|
|
919
|
+
AC: {
|
|
920
|
+
regex: /^ASCN 1ZZ$/,
|
|
921
|
+
samples: 'ASCN 1ZZ',
|
|
922
|
+
},
|
|
923
|
+
AD: {
|
|
924
|
+
regex: /^AD[1-7]0\d$/,
|
|
925
|
+
samples: 'AD206, AD403, AD106, AD406',
|
|
926
|
+
},
|
|
927
|
+
// We have kept the empty object for the countries which do not have any zip code validation
|
|
928
|
+
// to ensure consistency so that the amount of countries displayed and in this object are same
|
|
929
|
+
AE: {},
|
|
930
|
+
AF: {
|
|
931
|
+
regex: /^\d{4}$/,
|
|
932
|
+
samples: '9536, 1476, 3842, 7975',
|
|
933
|
+
},
|
|
934
|
+
AG: {},
|
|
935
|
+
AI: {
|
|
936
|
+
regex: /^AI-2640$/,
|
|
937
|
+
samples: 'AI-2640',
|
|
938
|
+
},
|
|
939
|
+
AL: {
|
|
940
|
+
regex: /^\d{4}$/,
|
|
941
|
+
samples: '1631, 9721, 2360, 5574',
|
|
942
|
+
},
|
|
943
|
+
AM: {
|
|
944
|
+
regex: /^\d{4}$/,
|
|
945
|
+
samples: '5581, 7585, 8434, 2492',
|
|
946
|
+
},
|
|
947
|
+
AO: {},
|
|
948
|
+
AQ: {},
|
|
949
|
+
AR: {
|
|
950
|
+
regex: /^((?:[A-HJ-NP-Z])?\d{4})([A-Z]{3})?$/,
|
|
951
|
+
samples: 'Q7040GFQ, K2178ZHR, P6240EJG, J6070IAE',
|
|
952
|
+
},
|
|
953
|
+
AS: {
|
|
954
|
+
regex: /^96799$/,
|
|
955
|
+
samples: '96799',
|
|
956
|
+
},
|
|
957
|
+
AT: {
|
|
958
|
+
regex: /^\d{4}$/,
|
|
959
|
+
samples: '4223, 2052, 3544, 5488',
|
|
960
|
+
},
|
|
961
|
+
AU: {
|
|
962
|
+
regex: /^\d{4}$/,
|
|
963
|
+
samples: '7181, 7735, 9169, 8780',
|
|
964
|
+
},
|
|
965
|
+
AW: {},
|
|
966
|
+
AX: {
|
|
967
|
+
regex: /^22\d{3}$/,
|
|
968
|
+
samples: '22270, 22889, 22906, 22284',
|
|
969
|
+
},
|
|
970
|
+
AZ: {
|
|
971
|
+
regex: /^(AZ) (\d{4})$/,
|
|
972
|
+
samples: 'AZ 6704, AZ 5332, AZ 3907, AZ 6892',
|
|
973
|
+
},
|
|
974
|
+
BA: {
|
|
975
|
+
regex: /^\d{5}$/,
|
|
976
|
+
samples: '62722, 80420, 44595, 74614',
|
|
977
|
+
},
|
|
978
|
+
BB: {
|
|
979
|
+
regex: /^BB\d{5}$/,
|
|
980
|
+
samples: 'BB64089, BB17494, BB73163, BB25752',
|
|
981
|
+
},
|
|
982
|
+
BD: {
|
|
983
|
+
regex: /^\d{4}$/,
|
|
984
|
+
samples: '8585, 8175, 7381, 0154',
|
|
985
|
+
},
|
|
986
|
+
BE: {
|
|
987
|
+
regex: /^\d{4}$/,
|
|
988
|
+
samples: '7944, 5303, 6746, 7921',
|
|
989
|
+
},
|
|
990
|
+
BF: {},
|
|
991
|
+
BG: {
|
|
992
|
+
regex: /^\d{4}$/,
|
|
993
|
+
samples: '6409, 7657, 1206, 7908',
|
|
994
|
+
},
|
|
995
|
+
BH: {
|
|
996
|
+
regex: /^\d{3}\d?$/,
|
|
997
|
+
samples: '047, 1116, 490, 631',
|
|
998
|
+
},
|
|
999
|
+
BI: {},
|
|
1000
|
+
BJ: {},
|
|
1001
|
+
BL: {
|
|
1002
|
+
regex: /^97133$/,
|
|
1003
|
+
samples: '97133',
|
|
1004
|
+
},
|
|
1005
|
+
BM: {
|
|
1006
|
+
regex: /^[A-Z]{2} ?[A-Z0-9]{2}$/,
|
|
1007
|
+
samples: 'QV9P, OSJ1, PZ 3D, GR YK',
|
|
1008
|
+
},
|
|
1009
|
+
BN: {
|
|
1010
|
+
regex: /^[A-Z]{2} ?\d{4}$/,
|
|
1011
|
+
samples: 'PF 9925, TH1970, SC 4619, NF0781',
|
|
1012
|
+
},
|
|
1013
|
+
BO: {},
|
|
1014
|
+
BQ: {},
|
|
1015
|
+
BR: {
|
|
1016
|
+
regex: /^\d{5}-?\d{3}$/,
|
|
1017
|
+
samples: '18816-403, 95177-465, 43447-782, 39403-136',
|
|
1018
|
+
},
|
|
1019
|
+
BS: {},
|
|
1020
|
+
BT: {
|
|
1021
|
+
regex: /^\d{5}$/,
|
|
1022
|
+
samples: '28256, 52484, 30608, 93524',
|
|
1023
|
+
},
|
|
1024
|
+
BW: {},
|
|
1025
|
+
BY: {
|
|
1026
|
+
regex: /^\d{6}$/,
|
|
1027
|
+
samples: '504154, 360246, 741167, 895047',
|
|
1028
|
+
},
|
|
1029
|
+
BZ: {},
|
|
1030
|
+
CA: {
|
|
1031
|
+
regex: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z] ?\d[ABCEGHJ-NPRSTV-Z]\d$/,
|
|
1032
|
+
samples: 'S1A7K8, Y5H 4G6, H9V0P2, H1A1B5',
|
|
1033
|
+
},
|
|
1034
|
+
CC: {
|
|
1035
|
+
regex: /^6799$/,
|
|
1036
|
+
samples: '6799',
|
|
1037
|
+
},
|
|
1038
|
+
CD: {},
|
|
1039
|
+
CF: {},
|
|
1040
|
+
CG: {},
|
|
1041
|
+
CH: {
|
|
1042
|
+
regex: /^\d{4}$/,
|
|
1043
|
+
samples: '6370, 5271, 7873, 8220',
|
|
1044
|
+
},
|
|
1045
|
+
CI: {},
|
|
1046
|
+
CK: {},
|
|
1047
|
+
CL: {
|
|
1048
|
+
regex: /^\d{7}$/,
|
|
1049
|
+
samples: '7565829, 8702008, 3161669, 1607703',
|
|
1050
|
+
},
|
|
1051
|
+
CM: {},
|
|
1052
|
+
CN: {
|
|
1053
|
+
regex: /^\d{6}$/,
|
|
1054
|
+
samples: '240543, 870138, 295528, 861683',
|
|
1055
|
+
},
|
|
1056
|
+
CO: {
|
|
1057
|
+
regex: /^\d{6}$/,
|
|
1058
|
+
samples: '678978, 775145, 823943, 913970',
|
|
1059
|
+
},
|
|
1060
|
+
CR: {
|
|
1061
|
+
regex: /^\d{5}$/,
|
|
1062
|
+
samples: '28256, 52484, 30608, 93524',
|
|
1063
|
+
},
|
|
1064
|
+
CU: {
|
|
1065
|
+
regex: /^(?:CP)?(\d{5})$/,
|
|
1066
|
+
samples: '28256, 52484, 30608, 93524',
|
|
1067
|
+
},
|
|
1068
|
+
CV: {
|
|
1069
|
+
regex: /^\d{4}$/,
|
|
1070
|
+
samples: '9056, 8085, 0491, 4627',
|
|
1071
|
+
},
|
|
1072
|
+
CW: {},
|
|
1073
|
+
CX: {
|
|
1074
|
+
regex: /^6798$/,
|
|
1075
|
+
samples: '6798',
|
|
1076
|
+
},
|
|
1077
|
+
CY: {
|
|
1078
|
+
regex: /^\d{4}$/,
|
|
1079
|
+
samples: '9301, 2478, 1981, 6162',
|
|
1080
|
+
},
|
|
1081
|
+
CZ: {
|
|
1082
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1083
|
+
samples: '150 56, 50694, 229 08, 82811',
|
|
1084
|
+
},
|
|
1085
|
+
DE: {
|
|
1086
|
+
regex: /^\d{5}$/,
|
|
1087
|
+
samples: '33185, 37198, 81711, 44262',
|
|
1088
|
+
},
|
|
1089
|
+
DJ: {},
|
|
1090
|
+
DK: {
|
|
1091
|
+
regex: /^\d{4}$/,
|
|
1092
|
+
samples: '1429, 2457, 0637, 5764',
|
|
1093
|
+
},
|
|
1094
|
+
DM: {},
|
|
1095
|
+
DO: {
|
|
1096
|
+
regex: /^\d{5}$/,
|
|
1097
|
+
samples: '11877, 95773, 93875, 98032',
|
|
1098
|
+
},
|
|
1099
|
+
DZ: {
|
|
1100
|
+
regex: /^\d{5}$/,
|
|
1101
|
+
samples: '26581, 64621, 57550, 72201',
|
|
1102
|
+
},
|
|
1103
|
+
EC: {
|
|
1104
|
+
regex: /^\d{6}$/,
|
|
1105
|
+
samples: '541124, 873848, 011495, 334509',
|
|
1106
|
+
},
|
|
1107
|
+
EE: {
|
|
1108
|
+
regex: /^\d{5}$/,
|
|
1109
|
+
samples: '87173, 01127, 73214, 52381',
|
|
1110
|
+
},
|
|
1111
|
+
EG: {
|
|
1112
|
+
regex: /^\d{5}$/,
|
|
1113
|
+
samples: '98394, 05129, 91463, 77359',
|
|
1114
|
+
},
|
|
1115
|
+
EH: {
|
|
1116
|
+
regex: /^\d{5}$/,
|
|
1117
|
+
samples: '30577, 60264, 16487, 38593',
|
|
1118
|
+
},
|
|
1119
|
+
ER: {},
|
|
1120
|
+
ES: {
|
|
1121
|
+
regex: /^\d{5}$/,
|
|
1122
|
+
samples: '03315, 00413, 23179, 89324',
|
|
1123
|
+
},
|
|
1124
|
+
ET: {
|
|
1125
|
+
regex: /^\d{4}$/,
|
|
1126
|
+
samples: '6269, 8498, 4514, 7820',
|
|
1127
|
+
},
|
|
1128
|
+
FI: {
|
|
1129
|
+
regex: /^\d{5}$/,
|
|
1130
|
+
samples: '21859, 72086, 22422, 03774',
|
|
1131
|
+
},
|
|
1132
|
+
FJ: {},
|
|
1133
|
+
FK: {
|
|
1134
|
+
regex: /^FIQQ 1ZZ$/,
|
|
1135
|
+
samples: 'FIQQ 1ZZ',
|
|
1136
|
+
},
|
|
1137
|
+
FM: {
|
|
1138
|
+
regex: /^(9694[1-4])(?:[ -](\d{4}))?$/,
|
|
1139
|
+
samples: '96942-9352, 96944-4935, 96941 9065, 96943-5369',
|
|
1140
|
+
},
|
|
1141
|
+
FO: {
|
|
1142
|
+
regex: /^\d{3}$/,
|
|
1143
|
+
samples: '334, 068, 741, 787',
|
|
1144
|
+
},
|
|
1145
|
+
FR: {
|
|
1146
|
+
regex: /^\d{2} ?\d{3}$/,
|
|
1147
|
+
samples: '25822, 53 637, 55354, 82522',
|
|
1148
|
+
},
|
|
1149
|
+
GA: {},
|
|
1150
|
+
GB: {
|
|
1151
|
+
regex: /^[A-Z]{1,2}[0-9R][0-9A-Z]?\s*([0-9][ABD-HJLNP-UW-Z]{2})?$/,
|
|
1152
|
+
samples: 'LA102UX, BL2F8FX, BD1S9LU, WR4G 6LH, W1U',
|
|
1153
|
+
},
|
|
1154
|
+
GD: {},
|
|
1155
|
+
GE: {
|
|
1156
|
+
regex: /^\d{4}$/,
|
|
1157
|
+
samples: '1232, 9831, 4717, 9428',
|
|
1158
|
+
},
|
|
1159
|
+
GF: {
|
|
1160
|
+
regex: /^9[78]3\d{2}$/,
|
|
1161
|
+
samples: '98380, 97335, 98344, 97300',
|
|
1162
|
+
},
|
|
1163
|
+
GG: {
|
|
1164
|
+
regex: /^GY\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}$/,
|
|
1165
|
+
samples: 'GY757LD, GY6D 6XL, GY3Y2BU, GY85 1YO',
|
|
1166
|
+
},
|
|
1167
|
+
GH: {},
|
|
1168
|
+
GI: {
|
|
1169
|
+
regex: /^GX11 1AA$/,
|
|
1170
|
+
samples: 'GX11 1AA',
|
|
1171
|
+
},
|
|
1172
|
+
GL: {
|
|
1173
|
+
regex: /^39\d{2}$/,
|
|
1174
|
+
samples: '3964, 3915, 3963, 3956',
|
|
1175
|
+
},
|
|
1176
|
+
GM: {},
|
|
1177
|
+
GN: {
|
|
1178
|
+
regex: /^\d{3}$/,
|
|
1179
|
+
samples: '465, 994, 333, 078',
|
|
1180
|
+
},
|
|
1181
|
+
GP: {
|
|
1182
|
+
regex: /^9[78][01]\d{2}$/,
|
|
1183
|
+
samples: '98069, 97007, 97147, 97106',
|
|
1184
|
+
},
|
|
1185
|
+
GQ: {},
|
|
1186
|
+
GR: {
|
|
1187
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1188
|
+
samples: '98654, 319 78, 127 09, 590 52',
|
|
1189
|
+
},
|
|
1190
|
+
GS: {
|
|
1191
|
+
regex: /^SIQQ 1ZZ$/,
|
|
1192
|
+
samples: 'SIQQ 1ZZ',
|
|
1193
|
+
},
|
|
1194
|
+
GT: {
|
|
1195
|
+
regex: /^\d{5}$/,
|
|
1196
|
+
samples: '30553, 69925, 09376, 83719',
|
|
1197
|
+
},
|
|
1198
|
+
GU: {
|
|
1199
|
+
regex: /^((969)[1-3][0-2])$/,
|
|
1200
|
+
samples: '96922, 96932, 96921, 96911',
|
|
1201
|
+
},
|
|
1202
|
+
GW: {
|
|
1203
|
+
regex: /^\d{4}$/,
|
|
1204
|
+
samples: '1742, 7941, 4437, 7728',
|
|
1205
|
+
},
|
|
1206
|
+
GY: {},
|
|
1207
|
+
HK: {
|
|
1208
|
+
regex: /^999077$|^$/,
|
|
1209
|
+
samples: '999077',
|
|
1210
|
+
},
|
|
1211
|
+
HN: {
|
|
1212
|
+
regex: /^\d{5}$/,
|
|
1213
|
+
samples: '86238, 78999, 03594, 30406',
|
|
1214
|
+
},
|
|
1215
|
+
HR: {
|
|
1216
|
+
regex: /^\d{5}$/,
|
|
1217
|
+
samples: '85240, 80710, 78235, 98766',
|
|
1218
|
+
},
|
|
1219
|
+
HT: {
|
|
1220
|
+
regex: /^(?:HT)?(\d{4})$/,
|
|
1221
|
+
samples: '5101, HT6991, HT3871, 1126',
|
|
1222
|
+
},
|
|
1223
|
+
HU: {
|
|
1224
|
+
regex: /^\d{4}$/,
|
|
1225
|
+
samples: '0360, 2604, 3362, 4775',
|
|
1226
|
+
},
|
|
1227
|
+
ID: {
|
|
1228
|
+
regex: /^\d{5}$/,
|
|
1229
|
+
samples: '60993, 52656, 16521, 34931',
|
|
1230
|
+
},
|
|
1231
|
+
IE: {},
|
|
1232
|
+
IL: {
|
|
1233
|
+
regex: /^\d{5}(?:\d{2})?$/,
|
|
1234
|
+
samples: '74213, 6978354, 2441689, 4971551',
|
|
1235
|
+
},
|
|
1236
|
+
IM: {
|
|
1237
|
+
regex: /^IM\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}$/,
|
|
1238
|
+
samples: 'IM2X1JP, IM4V 9JU, IM3B1UP, IM8E 5XF',
|
|
1239
|
+
},
|
|
1240
|
+
IN: {
|
|
1241
|
+
regex: /^\d{6}$/,
|
|
1242
|
+
samples: '946956, 143659, 243258, 938385',
|
|
1243
|
+
},
|
|
1244
|
+
IO: {
|
|
1245
|
+
regex: /^BBND 1ZZ$/,
|
|
1246
|
+
samples: 'BBND 1ZZ',
|
|
1247
|
+
},
|
|
1248
|
+
IQ: {
|
|
1249
|
+
regex: /^\d{5}$/,
|
|
1250
|
+
samples: '63282, 87817, 38580, 47725',
|
|
1251
|
+
},
|
|
1252
|
+
IR: {
|
|
1253
|
+
regex: /^\d{5}-?\d{5}$/,
|
|
1254
|
+
samples: '0666174250, 6052682188, 02360-81920, 25102-08646',
|
|
1255
|
+
},
|
|
1256
|
+
IS: {
|
|
1257
|
+
regex: /^\d{3}$/,
|
|
1258
|
+
samples: '408, 013, 001, 936',
|
|
1259
|
+
},
|
|
1260
|
+
IT: {
|
|
1261
|
+
regex: /^\d{5}$/,
|
|
1262
|
+
samples: '31701, 61341, 92781, 45609',
|
|
1263
|
+
},
|
|
1264
|
+
JE: {
|
|
1265
|
+
regex: /^JE\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}$/,
|
|
1266
|
+
samples: 'JE0D 2EX, JE59 2OF, JE1X1ZW, JE0V 1SO',
|
|
1267
|
+
},
|
|
1268
|
+
JM: {},
|
|
1269
|
+
JO: {
|
|
1270
|
+
regex: /^\d{5}$/,
|
|
1271
|
+
samples: '20789, 02128, 52170, 40284',
|
|
1272
|
+
},
|
|
1273
|
+
JP: {
|
|
1274
|
+
regex: /^\d{3}-?\d{4}$/,
|
|
1275
|
+
samples: '5429642, 046-1544, 6463599, 368-5362',
|
|
1276
|
+
},
|
|
1277
|
+
KE: {
|
|
1278
|
+
regex: /^\d{5}$/,
|
|
1279
|
+
samples: '33043, 98830, 59324, 42876',
|
|
1280
|
+
},
|
|
1281
|
+
KG: {
|
|
1282
|
+
regex: /^\d{6}$/,
|
|
1283
|
+
samples: '500371, 176592, 184133, 225279',
|
|
1284
|
+
},
|
|
1285
|
+
KH: {
|
|
1286
|
+
regex: /^\d{5,6}$/,
|
|
1287
|
+
samples: '220281, 18824, 35379, 09570',
|
|
1288
|
+
},
|
|
1289
|
+
KI: {
|
|
1290
|
+
regex: /^KI\d{4}$/,
|
|
1291
|
+
samples: 'KI0104, KI0109, KI0112, KI0306',
|
|
1292
|
+
},
|
|
1293
|
+
KM: {},
|
|
1294
|
+
KN: {
|
|
1295
|
+
regex: /^KN\d{4}(-\d{4})?$/,
|
|
1296
|
+
samples: 'KN2522, KN2560-3032, KN3507, KN4440',
|
|
1297
|
+
},
|
|
1298
|
+
KP: {},
|
|
1299
|
+
KR: {
|
|
1300
|
+
regex: /^\d{5}$/,
|
|
1301
|
+
samples: '67417, 66648, 08359, 93750',
|
|
1302
|
+
},
|
|
1303
|
+
KW: {
|
|
1304
|
+
regex: /^\d{5}$/,
|
|
1305
|
+
samples: '74840, 53309, 71276, 59262',
|
|
1306
|
+
},
|
|
1307
|
+
KY: {
|
|
1308
|
+
regex: /^KY\d-\d{4}$/,
|
|
1309
|
+
samples: 'KY0-3078, KY1-7812, KY8-3729, KY3-4664',
|
|
1310
|
+
},
|
|
1311
|
+
KZ: {
|
|
1312
|
+
regex: /^\d{6}$/,
|
|
1313
|
+
samples: '129113, 976562, 226811, 933781',
|
|
1314
|
+
},
|
|
1315
|
+
LA: {
|
|
1316
|
+
regex: /^\d{5}$/,
|
|
1317
|
+
samples: '08875, 50779, 87756, 75932',
|
|
1318
|
+
},
|
|
1319
|
+
LB: {
|
|
1320
|
+
regex: /^(?:\d{4})(?: ?(?:\d{4}))?$/,
|
|
1321
|
+
samples: '5436 1302, 9830 7470, 76911911, 9453 1306',
|
|
1322
|
+
},
|
|
1323
|
+
LC: {
|
|
1324
|
+
regex: /^(LC)?\d{2} ?\d{3}$/,
|
|
1325
|
+
samples: '21080, LC99127, LC24 258, 51 740',
|
|
1326
|
+
},
|
|
1327
|
+
LI: {
|
|
1328
|
+
regex: /^\d{4}$/,
|
|
1329
|
+
samples: '6644, 2852, 4630, 4541',
|
|
1330
|
+
},
|
|
1331
|
+
LK: {
|
|
1332
|
+
regex: /^\d{5}$/,
|
|
1333
|
+
samples: '44605, 27721, 90695, 65514',
|
|
1334
|
+
},
|
|
1335
|
+
LR: {
|
|
1336
|
+
regex: /^\d{4}$/,
|
|
1337
|
+
samples: '6644, 2852, 4630, 4541',
|
|
1338
|
+
},
|
|
1339
|
+
LS: {
|
|
1340
|
+
regex: /^\d{3}$/,
|
|
1341
|
+
samples: '779, 803, 104, 897',
|
|
1342
|
+
},
|
|
1343
|
+
LT: {
|
|
1344
|
+
regex: /^((LT)[-])?(\d{5})$/,
|
|
1345
|
+
samples: 'LT-22248, LT-12796, 69822, 37280',
|
|
1346
|
+
},
|
|
1347
|
+
LU: {
|
|
1348
|
+
regex: /^((L)[-])?(\d{4})$/,
|
|
1349
|
+
samples: '5469, L-4476, 6304, 9739',
|
|
1350
|
+
},
|
|
1351
|
+
LV: {
|
|
1352
|
+
regex: /^((LV)[-])?\d{4}$/,
|
|
1353
|
+
samples: '9344, LV-5030, LV-0132, 8097',
|
|
1354
|
+
},
|
|
1355
|
+
LY: {},
|
|
1356
|
+
MA: {
|
|
1357
|
+
regex: /^\d{5}$/,
|
|
1358
|
+
samples: '50219, 95871, 80907, 79804',
|
|
1359
|
+
},
|
|
1360
|
+
MC: {
|
|
1361
|
+
regex: /^980\d{2}$/,
|
|
1362
|
+
samples: '98084, 98041, 98070, 98062',
|
|
1363
|
+
},
|
|
1364
|
+
MD: {
|
|
1365
|
+
regex: /^(MD[-]?)?(\d{4})$/,
|
|
1366
|
+
samples: '6250, MD-9681, MD3282, MD-0652',
|
|
1367
|
+
},
|
|
1368
|
+
ME: {
|
|
1369
|
+
regex: /^\d{5}$/,
|
|
1370
|
+
samples: '87622, 92688, 23129, 59566',
|
|
1371
|
+
},
|
|
1372
|
+
MF: {
|
|
1373
|
+
regex: /^9[78][01]\d{2}$/,
|
|
1374
|
+
samples: '97169, 98180, 98067, 98043',
|
|
1375
|
+
},
|
|
1376
|
+
MG: {
|
|
1377
|
+
regex: /^\d{3}$/,
|
|
1378
|
+
samples: '854, 084, 524, 064',
|
|
1379
|
+
},
|
|
1380
|
+
MH: {
|
|
1381
|
+
regex: /^((969)[6-7][0-9])(-\d{4})?/,
|
|
1382
|
+
samples: '96962, 96969, 96970-8530, 96960-3226',
|
|
1383
|
+
},
|
|
1384
|
+
MK: {
|
|
1385
|
+
regex: /^\d{4}$/,
|
|
1386
|
+
samples: '8299, 6904, 6144, 9753',
|
|
1387
|
+
},
|
|
1388
|
+
ML: {},
|
|
1389
|
+
MM: {
|
|
1390
|
+
regex: /^\d{5}$/,
|
|
1391
|
+
samples: '59188, 93943, 40829, 69981',
|
|
1392
|
+
},
|
|
1393
|
+
MN: {
|
|
1394
|
+
regex: /^\d{5}$/,
|
|
1395
|
+
samples: '94129, 29906, 53374, 80141',
|
|
1396
|
+
},
|
|
1397
|
+
MO: {},
|
|
1398
|
+
MP: {
|
|
1399
|
+
regex: /^(9695[012])(?:[ -](\d{4}))?$/,
|
|
1400
|
+
samples: '96952 3162, 96950 1567, 96951 2994, 96950 8745',
|
|
1401
|
+
},
|
|
1402
|
+
MQ: {
|
|
1403
|
+
regex: /^9[78]2\d{2}$/,
|
|
1404
|
+
samples: '98297, 97273, 97261, 98282',
|
|
1405
|
+
},
|
|
1406
|
+
MR: {},
|
|
1407
|
+
MS: {
|
|
1408
|
+
regex: /^[Mm][Ss][Rr]\s{0,1}\d{4}$/,
|
|
1409
|
+
samples: 'MSR1110, MSR1230, MSR1250, MSR1330',
|
|
1410
|
+
},
|
|
1411
|
+
MT: {
|
|
1412
|
+
regex: /^[A-Z]{3} [0-9]{4}|[A-Z]{2}[0-9]{2}|[A-Z]{2} [0-9]{2}|[A-Z]{3}[0-9]{4}|[A-Z]{3}[0-9]{2}|[A-Z]{3} [0-9]{2}$/,
|
|
1413
|
+
samples: 'DKV 8196, KSU9264, QII0259, HKH 1020',
|
|
1414
|
+
},
|
|
1415
|
+
MU: {
|
|
1416
|
+
regex: /^([0-9A-R]\d{4})$/,
|
|
1417
|
+
samples: 'H8310, 52591, M9826, F5810',
|
|
1418
|
+
},
|
|
1419
|
+
MV: {
|
|
1420
|
+
regex: /^\d{5}$/,
|
|
1421
|
+
samples: '16354, 20857, 50991, 72527',
|
|
1422
|
+
},
|
|
1423
|
+
MW: {},
|
|
1424
|
+
MX: {
|
|
1425
|
+
regex: /^\d{5}$/,
|
|
1426
|
+
samples: '71530, 76424, 73811, 50503',
|
|
1427
|
+
},
|
|
1428
|
+
MY: {
|
|
1429
|
+
regex: /^\d{5}$/,
|
|
1430
|
+
samples: '75958, 15826, 86715, 37081',
|
|
1431
|
+
},
|
|
1432
|
+
MZ: {
|
|
1433
|
+
regex: /^\d{4}$/,
|
|
1434
|
+
samples: '0902, 6258, 7826, 7150',
|
|
1435
|
+
},
|
|
1436
|
+
NA: {
|
|
1437
|
+
regex: /^\d{5}$/,
|
|
1438
|
+
samples: '68338, 63392, 21820, 61211',
|
|
1439
|
+
},
|
|
1440
|
+
NC: {
|
|
1441
|
+
regex: /^988\d{2}$/,
|
|
1442
|
+
samples: '98865, 98813, 98820, 98855',
|
|
1443
|
+
},
|
|
1444
|
+
NE: {
|
|
1445
|
+
regex: /^\d{4}$/,
|
|
1446
|
+
samples: '9790, 3270, 2239, 0400',
|
|
1447
|
+
},
|
|
1448
|
+
NF: {
|
|
1449
|
+
regex: /^2899$/,
|
|
1450
|
+
samples: '2899',
|
|
1451
|
+
},
|
|
1452
|
+
NG: {
|
|
1453
|
+
regex: /^\d{6}$/,
|
|
1454
|
+
samples: '289096, 223817, 199970, 840648',
|
|
1455
|
+
},
|
|
1456
|
+
NI: {
|
|
1457
|
+
regex: /^\d{5}$/,
|
|
1458
|
+
samples: '86308, 60956, 49945, 15470',
|
|
1459
|
+
},
|
|
1460
|
+
NL: {
|
|
1461
|
+
regex: /^\d{4} ?[A-Z]{2}$/,
|
|
1462
|
+
samples: '6998 VY, 5390 CK, 2476 PS, 8873OX',
|
|
1463
|
+
},
|
|
1464
|
+
NO: {
|
|
1465
|
+
regex: /^\d{4}$/,
|
|
1466
|
+
samples: '0711, 4104, 2683, 5015',
|
|
1467
|
+
},
|
|
1468
|
+
NP: {
|
|
1469
|
+
regex: /^\d{5}$/,
|
|
1470
|
+
samples: '42438, 73964, 66400, 33976',
|
|
1471
|
+
},
|
|
1472
|
+
NR: {
|
|
1473
|
+
regex: /^(NRU68)$/,
|
|
1474
|
+
samples: 'NRU68',
|
|
1475
|
+
},
|
|
1476
|
+
NU: {
|
|
1477
|
+
regex: /^(9974)$/,
|
|
1478
|
+
samples: '9974',
|
|
1479
|
+
},
|
|
1480
|
+
NZ: {
|
|
1481
|
+
regex: /^\d{4}$/,
|
|
1482
|
+
samples: '7015, 0780, 4109, 1422',
|
|
1483
|
+
},
|
|
1484
|
+
OM: {
|
|
1485
|
+
regex: /^(?:PC )?\d{3}$/,
|
|
1486
|
+
samples: 'PC 851, PC 362, PC 598, PC 499',
|
|
1487
|
+
},
|
|
1488
|
+
PA: {
|
|
1489
|
+
regex: /^\d{4}$/,
|
|
1490
|
+
samples: '0711, 4104, 2683, 5015',
|
|
1491
|
+
},
|
|
1492
|
+
PE: {
|
|
1493
|
+
regex: /^\d{5}$/,
|
|
1494
|
+
samples: '10013, 12081, 14833, 24615',
|
|
1495
|
+
},
|
|
1496
|
+
PF: {
|
|
1497
|
+
regex: /^987\d{2}$/,
|
|
1498
|
+
samples: '98755, 98710, 98748, 98791',
|
|
1499
|
+
},
|
|
1500
|
+
PG: {
|
|
1501
|
+
regex: /^\d{3}$/,
|
|
1502
|
+
samples: '193, 166, 880, 553',
|
|
1503
|
+
},
|
|
1504
|
+
PH: {
|
|
1505
|
+
regex: /^\d{4}$/,
|
|
1506
|
+
samples: '0137, 8216, 2876, 0876',
|
|
1507
|
+
},
|
|
1508
|
+
PK: {
|
|
1509
|
+
regex: /^\d{5}$/,
|
|
1510
|
+
samples: '78219, 84497, 62102, 12564',
|
|
1511
|
+
},
|
|
1512
|
+
PL: {
|
|
1513
|
+
regex: /^\d{2}-\d{3}$/,
|
|
1514
|
+
samples: '63-825, 26-714, 05-505, 15-200',
|
|
1515
|
+
},
|
|
1516
|
+
PM: {
|
|
1517
|
+
regex: /^(97500)$/,
|
|
1518
|
+
samples: '97500',
|
|
1519
|
+
},
|
|
1520
|
+
PN: {
|
|
1521
|
+
regex: /^PCRN 1ZZ$/,
|
|
1522
|
+
samples: 'PCRN 1ZZ',
|
|
1523
|
+
},
|
|
1524
|
+
PR: {
|
|
1525
|
+
regex: /^(00[679]\d{2})(?:[ -](\d{4}))?$/,
|
|
1526
|
+
samples: '00989 3603, 00639 0720, 00707-9803, 00610 7362',
|
|
1527
|
+
},
|
|
1528
|
+
PS: {
|
|
1529
|
+
regex: /^(00[679]\d{2})(?:[ -](\d{4}))?$/,
|
|
1530
|
+
samples: '00748, 00663, 00779-4433, 00934 1559',
|
|
1531
|
+
},
|
|
1532
|
+
PT: {
|
|
1533
|
+
regex: /^\d{4}-\d{3}$/,
|
|
1534
|
+
samples: '0060-917, 4391-979, 5551-657, 9961-093',
|
|
1535
|
+
},
|
|
1536
|
+
PW: {
|
|
1537
|
+
regex: /^(969(?:39|40))(?:[ -](\d{4}))?$/,
|
|
1538
|
+
samples: '96940, 96939, 96939 6004, 96940-1871',
|
|
1539
|
+
},
|
|
1540
|
+
PY: {
|
|
1541
|
+
regex: /^\d{4}$/,
|
|
1542
|
+
samples: '7895, 5835, 8783, 5887',
|
|
1543
|
+
},
|
|
1544
|
+
QA: {},
|
|
1545
|
+
RE: {
|
|
1546
|
+
regex: /^9[78]4\d{2}$/,
|
|
1547
|
+
samples: '98445, 97404, 98421, 98434',
|
|
1548
|
+
},
|
|
1549
|
+
RO: {
|
|
1550
|
+
regex: /^\d{6}$/,
|
|
1551
|
+
samples: '935929, 407608, 637434, 174574',
|
|
1552
|
+
},
|
|
1553
|
+
RS: {
|
|
1554
|
+
regex: /^\d{5,6}$/,
|
|
1555
|
+
samples: '929863, 259131, 687739, 07011',
|
|
1556
|
+
},
|
|
1557
|
+
RU: {
|
|
1558
|
+
regex: /^\d{6}$/,
|
|
1559
|
+
samples: '138294, 617323, 307906, 981238',
|
|
1560
|
+
},
|
|
1561
|
+
RW: {},
|
|
1562
|
+
SA: {
|
|
1563
|
+
regex: /^\d{5}(-{1}\d{4})?$/,
|
|
1564
|
+
samples: '86020-1256, 72375, 70280, 96328',
|
|
1565
|
+
},
|
|
1566
|
+
SB: {},
|
|
1567
|
+
SC: {},
|
|
1568
|
+
SD: {
|
|
1569
|
+
regex: /^\d{5}$/,
|
|
1570
|
+
samples: '78219, 84497, 62102, 12564',
|
|
1571
|
+
},
|
|
1572
|
+
SE: {
|
|
1573
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1574
|
+
samples: '095 39, 41052, 84687, 563 66',
|
|
1575
|
+
},
|
|
1576
|
+
SG: {
|
|
1577
|
+
regex: /^\d{6}$/,
|
|
1578
|
+
samples: '606542, 233985, 036755, 265255',
|
|
1579
|
+
},
|
|
1580
|
+
SH: {
|
|
1581
|
+
regex: /^(?:ASCN|TDCU|STHL) 1ZZ$/,
|
|
1582
|
+
samples: 'STHL 1ZZ, ASCN 1ZZ, TDCU 1ZZ',
|
|
1583
|
+
},
|
|
1584
|
+
SI: {
|
|
1585
|
+
regex: /^\d{4}$/,
|
|
1586
|
+
samples: '6898, 3413, 2031, 5732',
|
|
1587
|
+
},
|
|
1588
|
+
SJ: {
|
|
1589
|
+
regex: /^\d{4}$/,
|
|
1590
|
+
samples: '7616, 3163, 5769, 0237',
|
|
1591
|
+
},
|
|
1592
|
+
SK: {
|
|
1593
|
+
regex: /^\d{3} ?\d{2}$/,
|
|
1594
|
+
samples: '594 52, 813 34, 867 67, 41814',
|
|
1595
|
+
},
|
|
1596
|
+
SL: {},
|
|
1597
|
+
SM: {
|
|
1598
|
+
regex: /^4789\d$/,
|
|
1599
|
+
samples: '47894, 47895, 47893, 47899',
|
|
1600
|
+
},
|
|
1601
|
+
SN: {
|
|
1602
|
+
regex: /^[1-8]\d{4}$/,
|
|
1603
|
+
samples: '48336, 23224, 33261, 82430',
|
|
1604
|
+
},
|
|
1605
|
+
SO: {},
|
|
1606
|
+
SR: {},
|
|
1607
|
+
SS: {
|
|
1608
|
+
regex: /^[A-Z]{2} ?\d{5}$/,
|
|
1609
|
+
samples: 'JQ 80186, CU 46474, DE33738, MS 59107',
|
|
1610
|
+
},
|
|
1611
|
+
ST: {},
|
|
1612
|
+
SV: {},
|
|
1613
|
+
SX: {},
|
|
1614
|
+
SY: {},
|
|
1615
|
+
SZ: {
|
|
1616
|
+
regex: /^[HLMS]\d{3}$/,
|
|
1617
|
+
samples: 'H458, L986, M477, S916',
|
|
1618
|
+
},
|
|
1619
|
+
TA: {
|
|
1620
|
+
regex: /^TDCU 1ZZ$/,
|
|
1621
|
+
samples: 'TDCU 1ZZ',
|
|
1622
|
+
},
|
|
1623
|
+
TC: {
|
|
1624
|
+
regex: /^TKCA 1ZZ$/,
|
|
1625
|
+
samples: 'TKCA 1ZZ',
|
|
1626
|
+
},
|
|
1627
|
+
TD: {},
|
|
1628
|
+
TF: {},
|
|
1629
|
+
TG: {},
|
|
1630
|
+
TH: {
|
|
1631
|
+
regex: /^\d{5}$/,
|
|
1632
|
+
samples: '30706, 18695, 21044, 42496',
|
|
1633
|
+
},
|
|
1634
|
+
TJ: {
|
|
1635
|
+
regex: /^\d{6}$/,
|
|
1636
|
+
samples: '381098, 961344, 519925, 667883',
|
|
1637
|
+
},
|
|
1638
|
+
TK: {},
|
|
1639
|
+
TL: {},
|
|
1640
|
+
TM: {
|
|
1641
|
+
regex: /^\d{6}$/,
|
|
1642
|
+
samples: '544985, 164362, 425224, 374603',
|
|
1643
|
+
},
|
|
1644
|
+
TN: {
|
|
1645
|
+
regex: /^\d{4}$/,
|
|
1646
|
+
samples: '6075, 7340, 2574, 8988',
|
|
1647
|
+
},
|
|
1648
|
+
TO: {},
|
|
1649
|
+
TR: {
|
|
1650
|
+
regex: /^\d{5}$/,
|
|
1651
|
+
samples: '42524, 81057, 50859, 42677',
|
|
1652
|
+
},
|
|
1653
|
+
TT: {
|
|
1654
|
+
regex: /^\d{6}$/,
|
|
1655
|
+
samples: '041238, 033990, 763476, 981118',
|
|
1656
|
+
},
|
|
1657
|
+
TV: {},
|
|
1658
|
+
TW: {
|
|
1659
|
+
regex: /^\d{3}(?:\d{2})?$/,
|
|
1660
|
+
samples: '21577, 76068, 68698, 08912',
|
|
1661
|
+
},
|
|
1662
|
+
TZ: {},
|
|
1663
|
+
UA: {
|
|
1664
|
+
regex: /^\d{5}$/,
|
|
1665
|
+
samples: '10629, 81138, 15668, 30055',
|
|
1666
|
+
},
|
|
1667
|
+
UG: {},
|
|
1668
|
+
UM: {},
|
|
1669
|
+
US: {
|
|
1670
|
+
regex: /^[0-9]{5}(?:[- ][0-9]{4})?$/,
|
|
1671
|
+
samples: '12345, 12345-1234, 12345 1234',
|
|
1672
|
+
},
|
|
1673
|
+
UY: {
|
|
1674
|
+
regex: /^\d{5}$/,
|
|
1675
|
+
samples: '40073, 30136, 06583, 00021',
|
|
1676
|
+
},
|
|
1677
|
+
UZ: {
|
|
1678
|
+
regex: /^\d{6}$/,
|
|
1679
|
+
samples: '205122, 219713, 441699, 287471',
|
|
1680
|
+
},
|
|
1681
|
+
VA: {
|
|
1682
|
+
regex: /^(00120)$/,
|
|
1683
|
+
samples: '00120',
|
|
1684
|
+
},
|
|
1685
|
+
VC: {
|
|
1686
|
+
regex: /^VC\d{4}$/,
|
|
1687
|
+
samples: 'VC0600, VC0176, VC0616, VC4094',
|
|
1688
|
+
},
|
|
1689
|
+
VE: {
|
|
1690
|
+
regex: /^\d{4}$/,
|
|
1691
|
+
samples: '9692, 1953, 6680, 8302',
|
|
1692
|
+
},
|
|
1693
|
+
VG: {
|
|
1694
|
+
regex: /^VG\d{4}$/,
|
|
1695
|
+
samples: 'VG1204, VG7387, VG3431, VG6021',
|
|
1696
|
+
},
|
|
1697
|
+
VI: {
|
|
1698
|
+
regex: /^(008(?:(?:[0-4]\d)|(?:5[01])))(?:[ -](\d{4}))?$/,
|
|
1699
|
+
samples: '00820, 00804 2036, 00825 3344, 00811-5900',
|
|
1700
|
+
},
|
|
1701
|
+
VN: {
|
|
1702
|
+
regex: /^\d{6}$/,
|
|
1703
|
+
samples: '133836, 748243, 894060, 020597',
|
|
1704
|
+
},
|
|
1705
|
+
VU: {},
|
|
1706
|
+
WF: {
|
|
1707
|
+
regex: /^986\d{2}$/,
|
|
1708
|
+
samples: '98692, 98697, 98698, 98671',
|
|
1709
|
+
},
|
|
1710
|
+
WS: {
|
|
1711
|
+
regex: /^WS[1-2]\d{3}$/,
|
|
1712
|
+
samples: 'WS1349, WS2798, WS1751, WS2090',
|
|
1713
|
+
},
|
|
1714
|
+
XK: {
|
|
1715
|
+
regex: /^[1-7]\d{4}$/,
|
|
1716
|
+
samples: '56509, 15863, 46644, 21896',
|
|
1717
|
+
},
|
|
1718
|
+
YE: {},
|
|
1719
|
+
YT: {
|
|
1720
|
+
regex: /^976\d{2}$/,
|
|
1721
|
+
samples: '97698, 97697, 97632, 97609',
|
|
1722
|
+
},
|
|
1723
|
+
ZA: {
|
|
1724
|
+
regex: /^\d{4}$/,
|
|
1725
|
+
samples: '6855, 5179, 6956, 7147',
|
|
1726
|
+
},
|
|
1727
|
+
ZM: {
|
|
1728
|
+
regex: /^\d{5}$/,
|
|
1729
|
+
samples: '77603, 97367, 80454, 94484',
|
|
1730
|
+
},
|
|
1731
|
+
ZW: {},
|
|
1732
|
+
},
|
|
1733
|
+
GENERIC_ZIP_CODE_REGEX: /^(?:(?![\s-])[\w -]{0,9}[\w])?$/,
|
|
1734
|
+
};
|
|
1735
|
+
/**
|
|
1736
|
+
* UI Constants
|
|
1737
|
+
*/
|
|
1738
|
+
const UI = {
|
|
1739
|
+
ICON: {
|
|
1740
|
+
DELETE: 'trashcan',
|
|
1741
|
+
CAR: 'car',
|
|
1742
|
+
CASH: 'cash',
|
|
1743
|
+
MANAGED_CARD: 'corporate-card',
|
|
1744
|
+
CARD: 'credit-card',
|
|
1745
|
+
CLOCK: 'time',
|
|
1746
|
+
PER_DIEM: 'per-diem',
|
|
1747
|
+
PENDING_CARD: 'card-transaction-pending',
|
|
1748
|
+
CSV_UPLOAD: 'csv-upload',
|
|
1749
|
+
PENDING_CREDIT_CARD: 'credit-card-pending',
|
|
1750
|
+
},
|
|
1751
|
+
spinnerDIV: '<div class="spinner"></div>',
|
|
1752
|
+
spinnerSmallDIV: '<div class="spinner spinner-small"></div>',
|
|
1753
|
+
spinnerLargeDIV: '<div class="spinner spinner-large"></div>',
|
|
1754
|
+
spinnerClass: 'view_spinner',
|
|
1755
|
+
SPINNER: 'spinner',
|
|
1756
|
+
imageURLPrefix: g_cloudFrontImg,
|
|
1757
|
+
ACTIVE: 'active',
|
|
1758
|
+
ERROR: 'error',
|
|
1759
|
+
HIDDEN: 'hidden',
|
|
1760
|
+
INVISIBLE: 'invisible',
|
|
1761
|
+
DEPRECIATED: 'depreciated',
|
|
1762
|
+
DISABLED: 'disabled',
|
|
1763
|
+
REQUIRED: 'required',
|
|
1764
|
+
SELECT_DEFAULT: '###',
|
|
1765
|
+
SELECTED: 'selected',
|
|
1766
|
+
// Class used to identify qrCode container
|
|
1767
|
+
QR_CODE: 'js_qrCode',
|
|
1768
|
+
// Base z-index for dialogs $zindex-dialog in _vars.scss should take it's value from here!
|
|
1769
|
+
DIALOG_Z_INDEX: 4000,
|
|
1770
|
+
};
|
|
1771
|
+
/**
|
|
1772
|
+
* Set of most frequently used public domains
|
|
1773
|
+
*/
|
|
1774
|
+
const PUBLIC_DOMAINS_SET = new Set([
|
|
1775
|
+
'accountant.com',
|
|
1776
|
+
'afis.ch',
|
|
1777
|
+
'aol.com',
|
|
1778
|
+
'artlover.com',
|
|
1779
|
+
'asia.com',
|
|
1780
|
+
'att.net',
|
|
1781
|
+
'bellsouth.net',
|
|
1782
|
+
'bills.expensify.com',
|
|
1783
|
+
'btinternet.com',
|
|
1784
|
+
'cheerful.com',
|
|
1785
|
+
'chromeexpensify.com',
|
|
1786
|
+
'comcast.net',
|
|
1787
|
+
'consultant.com',
|
|
1788
|
+
'contractor.com',
|
|
1789
|
+
'cox.net',
|
|
1790
|
+
'cpa.com',
|
|
1791
|
+
'cryptohistoryprice.com',
|
|
1792
|
+
'dr.com',
|
|
1793
|
+
'email.com',
|
|
1794
|
+
'engineer.com',
|
|
1795
|
+
'europe.com',
|
|
1796
|
+
'evernote.user',
|
|
1797
|
+
'execs.com',
|
|
1798
|
+
'expensify.cash',
|
|
1799
|
+
'expensify.sms',
|
|
1800
|
+
'gmail.com',
|
|
1801
|
+
'gmail.con',
|
|
1802
|
+
'googlemail.com',
|
|
1803
|
+
'hey.com',
|
|
1804
|
+
'hotmail.co.uk',
|
|
1805
|
+
'hotmail.com',
|
|
1806
|
+
'hotmail.fr',
|
|
1807
|
+
'hotmail.it',
|
|
1808
|
+
'icloud.com',
|
|
1809
|
+
'iname.com',
|
|
1810
|
+
'jeeviess.com',
|
|
1811
|
+
'live.com',
|
|
1812
|
+
'mac.com',
|
|
1813
|
+
'mail.com',
|
|
1814
|
+
'mail.ru',
|
|
1815
|
+
'mailfence.com',
|
|
1816
|
+
'me.com',
|
|
1817
|
+
'msn.com',
|
|
1818
|
+
'musician.org',
|
|
1819
|
+
'myself.com',
|
|
1820
|
+
'outlook.com',
|
|
1821
|
+
'pm.me',
|
|
1822
|
+
'post.com',
|
|
1823
|
+
'privaterelay.appleid.com',
|
|
1824
|
+
'proton.me',
|
|
1825
|
+
'protonmail.ch',
|
|
1826
|
+
'protonmail.com',
|
|
1827
|
+
'qq.com',
|
|
1828
|
+
'rigl.ch',
|
|
1829
|
+
'sasktel.net',
|
|
1830
|
+
'sbcglobal.net',
|
|
1831
|
+
'spacehotline.com',
|
|
1832
|
+
'tafmail.com',
|
|
1833
|
+
'techie.com',
|
|
1834
|
+
'usa.com',
|
|
1835
|
+
'verizon.net',
|
|
1836
|
+
'vomoto.com',
|
|
1837
|
+
'wolfandcranebar.tech',
|
|
1838
|
+
'workmail.com',
|
|
1839
|
+
'writeme.com',
|
|
1840
|
+
'yahoo.ca',
|
|
1841
|
+
'yahoo.co.in',
|
|
1842
|
+
'yahoo.co.uk',
|
|
1843
|
+
'yahoo.com',
|
|
1844
|
+
'yahoo.com.br',
|
|
1845
|
+
'ymail.com',
|
|
1846
|
+
]);
|
|
1847
|
+
export { g_cloudFront, g_cloudFrontImg, CONST, UI, PUBLIC_DOMAINS_SET };
|