@kushki/js 1.36.0 → 1.37.0

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.
Files changed (76) hide show
  1. package/lib/Kushki.d.ts +17 -2
  2. package/lib/Kushki.js +132 -113
  3. package/lib/KushkiInfo.js +11 -14
  4. package/lib/constant/CreditCardEspecifications.js +2 -2
  5. package/lib/constant/Identifiers.js +21 -21
  6. package/lib/gateway/KushkiGateway.js +161 -276
  7. package/lib/gateway/SiftScience.js +42 -45
  8. package/lib/generic/AurusError.js +12 -28
  9. package/lib/generic/KushkiError.js +15 -33
  10. package/lib/infrastructure/BinCardTypeEnum.js +1 -1
  11. package/lib/infrastructure/CardBrandsEnum.d.ts +5 -0
  12. package/lib/infrastructure/CardBrandsEnum.js +8 -0
  13. package/lib/infrastructure/CognitoErrorEnum.js +1 -1
  14. package/lib/infrastructure/Container.js +41 -75
  15. package/lib/infrastructure/EnvironmentEnum.js +1 -1
  16. package/lib/infrastructure/ErrorEnum.d.ts +2 -1
  17. package/lib/infrastructure/ErrorEnum.js +42 -37
  18. package/lib/infrastructure/HeadersEnum.js +1 -1
  19. package/lib/infrastructure/KPayUserPoolEnum.js +1 -1
  20. package/lib/infrastructure/KpayPaymentKind.js +1 -1
  21. package/lib/infrastructure/PathEnum.js +1 -1
  22. package/lib/infrastructure/PlatformCodeEnum.js +15 -15
  23. package/lib/infrastructure/SiftScienceEnum.js +1 -1
  24. package/lib/infrastructure/StatusCodeEnum.js +1 -1
  25. package/lib/infrastructure/ThreeDSEnum.js +1 -1
  26. package/lib/infrastructure/VisaBrandingResourceUrlEnum.d.ts +2 -2
  27. package/lib/infrastructure/VisaBrandingResourceUrlEnum.js +3 -3
  28. package/lib/lib.js +1 -1
  29. package/lib/libs/MCSensoryBranding/mastercard-sensory-branding.d.ts +21 -0
  30. package/lib/libs/MCSensoryBranding/mastercard-sensory-branding.js +781 -0
  31. package/lib/libs/VisaSensoryBranding/visa-sensory-branding.d.ts +1 -1
  32. package/lib/libs/VisaSensoryBranding/visa-sensory-branding.js +630 -158
  33. package/lib/libs/cardinal/prod.js +10 -10
  34. package/lib/libs/cardinal/staging.js +9 -9
  35. package/lib/repository/IAntiFraud.js +1 -1
  36. package/lib/repository/IAuthService.js +1 -1
  37. package/lib/repository/ICardAsyncService.js +1 -1
  38. package/lib/repository/ICardDynamicService.js +1 -1
  39. package/lib/repository/ICardService.js +1 -1
  40. package/lib/repository/ICardSubscriptionDynamicService.js +1 -1
  41. package/lib/repository/ICashService.js +1 -1
  42. package/lib/repository/ICommissionService.js +1 -1
  43. package/lib/repository/IKPayService.js +1 -1
  44. package/lib/repository/IKushkiGateway.js +1 -1
  45. package/lib/repository/IKushkiService.d.ts +9 -2
  46. package/lib/repository/IKushkiService.js +1 -1
  47. package/lib/repository/IMobileProcessorService.js +1 -1
  48. package/lib/repository/IMultiMerchantService.js +1 -1
  49. package/lib/repository/IPayoutsCashService.js +1 -1
  50. package/lib/repository/IPayoutsTransferService.js +1 -1
  51. package/lib/repository/ISecureService.js +1 -1
  52. package/lib/repository/ISiftScienceService.js +1 -1
  53. package/lib/repository/ITransferService.js +1 -1
  54. package/lib/repository/ITransferSubscriptionService.js +1 -1
  55. package/lib/service/AuthService.js +99 -161
  56. package/lib/service/CardAsyncService.js +19 -26
  57. package/lib/service/CardDynamicService.js +32 -43
  58. package/lib/service/CardService.js +271 -382
  59. package/lib/service/CardSubscriptionDynamicService.js +31 -40
  60. package/lib/service/CashService.js +15 -16
  61. package/lib/service/CommissionService.js +13 -14
  62. package/lib/service/KPayService.js +19 -23
  63. package/lib/service/KushkiService.d.ts +2 -1
  64. package/lib/service/KushkiService.js +48 -33
  65. package/lib/service/MobileProcessorService.js +59 -70
  66. package/lib/service/MultiMerchantService.js +13 -14
  67. package/lib/service/PayoutsCashService.js +15 -16
  68. package/lib/service/PayoutsTransferService.js +17 -18
  69. package/lib/service/SecureService.js +13 -14
  70. package/lib/service/SiftScienceService.js +16 -20
  71. package/lib/service/TransferService.js +21 -36
  72. package/lib/service/TransferSubscriptionsService.js +16 -17
  73. package/lib/service/UtilsService.js +51 -57
  74. package/lib/types/card_branding_request.d.ts +40 -0
  75. package/lib/types/visa_branding_request.d.ts +25 -3
  76. package/package.json +2 -2
@@ -1,167 +1,639 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // istanbul ignore file
4
4
  // tslint:disable
5
5
  // @ts-nocheck
6
- var VisaBrandingResourceUrlEnum_1 = require("./../../../lib/infrastructure/VisaBrandingResourceUrlEnum");
7
- exports["default"] = !(function (n) {
8
- function e(o) {
9
- if (t[o])
10
- return t[o].exports;
11
- var r = (t[o] = { i: o, l: !1, exports: {} });
12
- return n[o].call(r.exports, r, r.exports, e), (r.l = !0), r.exports;
6
+ exports.default = (() => {
7
+ "use strict";
8
+ var e = {};
9
+ var a = {
10
+ en: {
11
+ name: "English",
12
+ code: "en",
13
+ fontFamily: "visa_font",
14
+ fontNames: "VisaDialectUI-Medium",
15
+ data: { approved: "Approved", success: "Success", complete: "Complete" },
16
+ },
17
+ ar: {
18
+ name: "Arabic",
19
+ code: "ar",
20
+ fontFamily: "noto_sans_arabic",
21
+ fontNames: "NotoSansArabic-Medium",
22
+ data: { approved: "مُعتمد", success: "نجاح", complete: "إتمام" },
23
+ },
24
+ az: {
25
+ name: "Azeri",
26
+ code: "az",
27
+ fontFamily: "visa_font",
28
+ fontNames: "VisaDialectUI-Medium",
29
+ data: { approved: "Təsdiqlənib", success: "Uğurlu", complete: "Tamamla" },
30
+ },
31
+ id: {
32
+ name: "Bahasa Indonesia",
33
+ code: "id",
34
+ fontFamily: "visa_font",
35
+ fontNames: "VisaDialectUI-Medium",
36
+ data: { approved: "Disetujui", success: "Berhasil", complete: "Selesai" },
37
+ },
38
+ bs: {
39
+ name: "Bosnian",
40
+ code: "bs",
41
+ fontFamily: "visa_font",
42
+ fontNames: "VisaDialectUI-Medium",
43
+ data: { approved: "Odobreno", success: "Uspješno", complete: "Završeno" },
44
+ },
45
+ bg: {
46
+ name: "Bulgarian",
47
+ code: "bg",
48
+ fontFamily: "visa_font",
49
+ fontNames: "VisaDialectUI-Medium",
50
+ data: { approved: "Одобрено", success: "Успех", complete: "Готово" },
51
+ },
52
+ en_ca: {
53
+ name: "Canadian English",
54
+ code: "en_ca",
55
+ fontFamily: "visa_font",
56
+ fontNames: "VisaDialectUI-Medium",
57
+ data: { approved: "Approved", success: "Success", complete: "Complete" },
58
+ },
59
+ fr_ca: {
60
+ name: "Canadian French",
61
+ code: "fr_ca",
62
+ fontFamily: "visa_font",
63
+ fontNames: "VisaDialectUI-Medium",
64
+ data: { approved: "Approuvé", success: "Succès", complete: "Terminé" },
65
+ },
66
+ hr: {
67
+ name: "Croatian",
68
+ code: "hr",
69
+ fontFamily: "visa_font",
70
+ fontNames: "VisaDialectUI-Medium",
71
+ data: { approved: "Odobreno", success: "Uspješno", complete: "Dovršeno" },
72
+ },
73
+ cs: {
74
+ name: "Czech",
75
+ code: "cs",
76
+ fontFamily: "visa_font",
77
+ fontNames: "VisaDialectUI-Medium",
78
+ data: { approved: "Schváleno", success: "Úspěch", complete: "Dokončeno" },
79
+ },
80
+ da: {
81
+ name: "Danish",
82
+ code: "da",
83
+ fontFamily: "visa_font",
84
+ fontNames: "VisaDialectUI-Medium",
85
+ data: { approved: "Godkendt", success: "Success", complete: "Komplet" },
86
+ },
87
+ nl: {
88
+ name: "Dutch",
89
+ code: "nl",
90
+ fontFamily: "visa_font",
91
+ fontNames: "VisaDialectUI-Medium",
92
+ data: {
93
+ approved: "Goedgekeurd",
94
+ success: "Succes",
95
+ complete: "Voltooid",
96
+ },
97
+ },
98
+ fi: {
99
+ name: "Finnish",
100
+ code: "fi",
101
+ fontFamily: "visa_font",
102
+ fontNames: "VisaDialectUI-Medium",
103
+ data: { approved: "Hyväksytty", success: "Onnistui", complete: "Täytä" },
104
+ },
105
+ fr: {
106
+ name: "French",
107
+ code: "fr",
108
+ fontFamily: "visa_font",
109
+ fontNames: "VisaDialectUI-Medium",
110
+ data: { approved: "Approuvé", success: "Validé", complete: "Finaliser" },
111
+ },
112
+ ka: {
113
+ name: "Georgian",
114
+ code: "ka",
115
+ fontFamily: "noto_sans_georgian",
116
+ fontNames: "NotoSansGeorgian-Medium",
117
+ data: {
118
+ approved: "დამტკიცდა",
119
+ success: "წარმატება",
120
+ complete: "შესრულებული",
121
+ },
122
+ },
123
+ de: {
124
+ name: "German",
125
+ code: "de",
126
+ fontFamily: "visa_font",
127
+ fontNames: "VisaDialectUI-Medium",
128
+ data: {
129
+ approved: "Autorisiert",
130
+ success: "Erfoig",
131
+ complete: "Vollständig",
132
+ },
133
+ },
134
+ el: {
135
+ name: "Greek",
136
+ code: "el",
137
+ fontFamily: "visa_font",
138
+ fontNames: "VisaDialectUI-Medium",
139
+ data: {
140
+ approved: "Εγκρίθηκε",
141
+ success: "Επιτυχία",
142
+ complete: "Ολοκλήρωση",
143
+ },
144
+ },
145
+ he: {
146
+ name: "Hebrew",
147
+ code: "he",
148
+ fontFamily: "noto_sans_hebrew",
149
+ fontNames: "NotoSansHebrew-Medium",
150
+ data: { approved: "אושר", success: "בוצע בהצלחה", complete: "הושלם" },
151
+ },
152
+ hu: {
153
+ name: "Hungarian",
154
+ code: "hu",
155
+ fontFamily: "visa_font",
156
+ fontNames: "VisaDialectUI-Medium",
157
+ data: { approved: "Jóváhagyva", success: "Sikeres", complete: "Kész" },
158
+ },
159
+ is: {
160
+ name: "Icelandic",
161
+ code: "is",
162
+ fontFamily: "visa_font",
163
+ fontNames: "VisaDialectUI-Medium",
164
+ data: { approved: "Samþykkt", success: "Heppnaðist", complete: "Lokið" },
165
+ },
166
+ it: {
167
+ name: "Italian",
168
+ code: "it",
169
+ fontFamily: "visa_font",
170
+ fontNames: "VisaDialectUI-Medium",
171
+ data: {
172
+ approved: "Approvato",
173
+ success: "Op. riuscita",
174
+ complete: "Completato",
175
+ },
176
+ },
177
+ lv: {
178
+ name: "Latvian",
179
+ code: "lv",
180
+ fontFamily: "visa_font",
181
+ fontNames: "VisaDialectUI-Medium",
182
+ data: {
183
+ approved: "Apstiprināts",
184
+ success: "Veiksmīgi",
185
+ complete: "Pabeigts",
186
+ },
187
+ },
188
+ lt: {
189
+ name: "Lithuanian",
190
+ code: "lt",
191
+ fontFamily: "visa_font",
192
+ fontNames: "VisaDialectUI-Medium",
193
+ data: {
194
+ approved: "Patvirtinta",
195
+ success: "Pavyko",
196
+ complete: "Užbaigta",
197
+ },
198
+ },
199
+ ja: {
200
+ name: "Japanese",
201
+ code: "ja",
202
+ fontFamily: "noto_sans_japanese",
203
+ fontNames: "NotoSansJP-Medium",
204
+ data: {
205
+ approved: "承認しました",
206
+ success: "完了しました",
207
+ complete: "完了しました",
208
+ },
209
+ },
210
+ kk: {
211
+ name: "Kazakh",
212
+ code: "kk",
213
+ fontFamily: "visa_font",
214
+ fontNames: "VisaDialectUI-Medium",
215
+ data: { approved: "Бекітілген", success: "Сәтті", complete: "Аяқталған" },
216
+ },
217
+ km: {
218
+ name: "Khmer",
219
+ code: "km",
220
+ fontFamily: "noto_sans_khmer",
221
+ fontNames: "NotoSansKhmer-Medium",
222
+ data: {
223
+ approved: "បាន​អនុម័ត",
224
+ success: "ដោយជោគជ័យ",
225
+ complete: "បានបញ្ចប់",
226
+ },
227
+ },
228
+ rw: {
229
+ name: "Kinyarwanda",
230
+ code: "rw",
231
+ fontFamily: "visa_font",
232
+ fontNames: "VisaDialectUI-Medium",
233
+ data: {
234
+ approved: "Byemejwe",
235
+ success: "Byakunze",
236
+ complete: "Byarangiye",
237
+ },
238
+ },
239
+ ko: {
240
+ name: "Korean",
241
+ code: "ko",
242
+ fontFamily: "noto_sans_korean",
243
+ fontNames: "NotoSansKR-Medium",
244
+ data: { approved: "승인됨", success: "성공", complete: "완료" },
245
+ },
246
+ mn: {
247
+ name: "Mongolian",
248
+ code: "mn",
249
+ fontFamily: "visa_font",
250
+ fontNames: "VisaDialectUI-Medium",
251
+ data: { approved: "Баталсан", success: "Амжилттай", complete: "Дууссан" },
252
+ },
253
+ no: {
254
+ name: "Norwegian",
255
+ code: "no",
256
+ fontFamily: "visa_font",
257
+ fontNames: "VisaDialectUI-Medium",
258
+ data: {
259
+ approved: "Godkjent",
260
+ success: "Vellykket",
261
+ complete: "Fullført",
262
+ },
263
+ },
264
+ pl: {
265
+ name: "Polish",
266
+ code: "pl",
267
+ fontFamily: "visa_font",
268
+ fontNames: "VisaDialectUI-Medium",
269
+ data: {
270
+ approved: "Zatwierdzone",
271
+ success: "Udało się",
272
+ complete: "Zakończone",
273
+ },
274
+ },
275
+ pt_br: {
276
+ name: "Portuguese (Brazilian)",
277
+ code: "pt_br",
278
+ fontFamily: "visa_font",
279
+ fontNames: "VisaDialectUI-Medium",
280
+ data: { approved: "Aprovado", success: "Sucesso", complete: "Concluído" },
281
+ },
282
+ pt: {
283
+ name: "Portuguese (Regular)",
284
+ code: "pt",
285
+ fontFamily: "visa_font",
286
+ fontNames: "VisaDialectUI-Medium",
287
+ data: {
288
+ approved: "Aprovado",
289
+ success: "Bem sucedido",
290
+ complete: "Concluído",
291
+ },
292
+ },
293
+ ro: {
294
+ name: "Romanian",
295
+ code: "ro",
296
+ fontFamily: "visa_font",
297
+ fontNames: "VisaDialectUI-Medium",
298
+ data: { approved: "Aprobat", success: "Succes", complete: "Finalizat" },
299
+ },
300
+ ru: {
301
+ name: "Russian",
302
+ code: "ru",
303
+ fontFamily: "visa_font",
304
+ fontNames: "VisaDialectUI-Medium",
305
+ data: { approved: "Одобрено", success: "Успешно", complete: "Готово" },
306
+ },
307
+ sr: {
308
+ name: "Serbian",
309
+ code: "sr",
310
+ fontFamily: "visa_font",
311
+ fontNames: "VisaDialectUI-Medium",
312
+ data: { approved: "Odobreno", success: "Uspešno", complete: "Završi" },
313
+ },
314
+ zh_cn: {
315
+ name: "Simplified Chinese",
316
+ code: "zh_cn",
317
+ fontFamily: "noto_sans_simplified_chinese",
318
+ fontNames: "NotoSansSC-Medium",
319
+ data: { approved: "已批准", success: "成功", complete: "完成" },
320
+ },
321
+ sk: {
322
+ name: "Slovakian",
323
+ code: "sk",
324
+ fontFamily: "visa_font",
325
+ fontNames: "VisaDialectUI-Medium",
326
+ data: { approved: "Schválené", success: "Úspech", complete: "Dokončiť" },
327
+ },
328
+ sl: {
329
+ name: "Slovenian",
330
+ code: "sl",
331
+ fontFamily: "visa_font",
332
+ fontNames: "VisaDialectUI-Medium",
333
+ data: {
334
+ approved: "Odobreno",
335
+ success: "Uspelo vam je",
336
+ complete: "Končano",
337
+ },
338
+ },
339
+ es_ar: {
340
+ name: "Spanish (AR)",
341
+ code: "es_ar",
342
+ fontFamily: "visa_font",
343
+ fontNames: "VisaDialectUI-Medium",
344
+ data: { approved: "Aprobado", success: "Éxito", complete: "Completo" },
345
+ },
346
+ es_mx: {
347
+ name: "Spanish (MX)",
348
+ code: "es_mx",
349
+ fontFamily: "visa_font",
350
+ fontNames: "VisaDialectUI-Medium",
351
+ data: {
352
+ approved: "Aprobado",
353
+ success: "Exitoso",
354
+ complete: "Completado",
355
+ },
356
+ },
357
+ es_la: {
358
+ name: "Spanish (LA)",
359
+ code: "es_la",
360
+ fontFamily: "visa_font",
361
+ fontNames: "VisaDialectUI-Medium",
362
+ data: { approved: "Aprobado", success: "Éxito", complete: "Completo" },
363
+ },
364
+ es: {
365
+ name: "Spanish (ES)",
366
+ code: "es",
367
+ fontFamily: "visa_font",
368
+ fontNames: "VisaDialectUI-Medium",
369
+ data: { approved: "Aprobado", success: "Hecho", complete: "Finalizado" },
370
+ },
371
+ sv: {
372
+ name: "Swedish",
373
+ code: "sv",
374
+ fontFamily: "visa_font",
375
+ fontNames: "VisaDialectUI-Medium",
376
+ data: {
377
+ approved: "Godkänt",
378
+ success: "Det lyckades",
379
+ complete: "Fullständigt",
380
+ },
381
+ },
382
+ th: {
383
+ name: "Thai",
384
+ code: "th",
385
+ fontFamily: "noto_sans_thai",
386
+ fontNames: "NotoSansThai-Medium",
387
+ data: {
388
+ approved: "อนุมัติ",
389
+ success: "สำเร็จ",
390
+ complete: "เสร็จสมบูรณ์",
391
+ },
392
+ },
393
+ zh_hk: {
394
+ name: "Traditional Chinese (HK)",
395
+ code: "zh_hk",
396
+ fontFamily: "noto_sans_traditional_chinese",
397
+ fontNames: "NotoSansTC-Medium",
398
+ data: { approved: "已批准", success: "成功", complete: "完成" },
399
+ },
400
+ zh_tw: {
401
+ name: "Traditional Chinese (TW)",
402
+ code: "zh_tw",
403
+ fontFamily: "noto_sans_traditional_chinese",
404
+ fontNames: "NotoSansTC-Medium",
405
+ data: { approved: "已核准", success: "成功", complete: "完成" },
406
+ },
407
+ tr: {
408
+ name: "Turkish",
409
+ code: "tr",
410
+ fontFamily: "visa_font",
411
+ fontNames: "VisaDialectUI-Medium",
412
+ data: {
413
+ approved: "Onaylandı",
414
+ success: "Başardınız",
415
+ complete: "Tamamlandı",
416
+ },
417
+ },
418
+ en_gb: {
419
+ name: "UK English",
420
+ code: "en_gb",
421
+ fontFamily: "visa_font",
422
+ fontNames: "VisaDialectUI-Medium",
423
+ data: { approved: "Approved", success: "Success", complete: "Complete" },
424
+ },
425
+ ua: {
426
+ name: "Ukrainian",
427
+ code: "ua",
428
+ fontFamily: "visa_font",
429
+ fontNames: "VisaDialectUI-Medium",
430
+ data: { approved: "Схвалено", success: "Готово", complete: "Завершено" },
431
+ },
432
+ vi: {
433
+ name: "Vietnamese",
434
+ code: "vi",
435
+ fontFamily: "visa_font",
436
+ fontNames: "VisaDialectUI-Medium",
437
+ data: {
438
+ approved: "Đã phê duyệt",
439
+ success: "Thành công",
440
+ complete: "Hoàn thành",
441
+ },
442
+ },
443
+ };
444
+ function o(e, a) {
445
+ var o = Object.keys(e);
446
+ if (Object.getOwnPropertySymbols) {
447
+ var t = Object.getOwnPropertySymbols(e);
448
+ a &&
449
+ (t = t.filter(function (a) {
450
+ return Object.getOwnPropertyDescriptor(e, a).enumerable;
451
+ })),
452
+ o.push.apply(o, t);
453
+ }
454
+ return o;
13
455
  }
14
- var t = {};
15
- (e.m = n),
16
- (e.c = t),
17
- (e.d = function (n, t, o) {
18
- e.o(n, t) ||
19
- Object.defineProperty(n, t, {
20
- configurable: !1,
21
- enumerable: !0,
22
- get: o
23
- });
24
- }),
25
- (e.n = function (n) {
26
- var t = n && n.__esModule
27
- ? function () {
28
- return n["default"];
456
+ function t(e) {
457
+ for (var a = 1; a < arguments.length; a++) {
458
+ var t = null != arguments[a] ? arguments[a] : {};
459
+ a % 2
460
+ ? o(Object(t), !0).forEach(function (a) {
461
+ n(e, a, t[a]);
462
+ })
463
+ : Object.getOwnPropertyDescriptors
464
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t))
465
+ : o(Object(t)).forEach(function (a) {
466
+ Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(t, a));
467
+ });
468
+ }
469
+ return e;
470
+ }
471
+ function n(e, a, o) {
472
+ if (a in e) {
473
+ Object.defineProperty(e, a, {
474
+ value: o,
475
+ enumerable: true,
476
+ configurable: true,
477
+ writable: true,
478
+ });
479
+ }
480
+ else {
481
+ e[a] = o;
482
+ }
483
+ return e;
484
+ }
485
+ (function () {
486
+ if (typeof window.CustomEvent === "function")
487
+ return false;
488
+ function e(e, a) {
489
+ a = a || { bubbles: false, cancelable: false, detail: undefined };
490
+ var o = document.createEvent("CustomEvent");
491
+ o.initCustomEvent(e, a.bubbles, a.cancelable, a.detail);
492
+ return o;
493
+ }
494
+ e.prototype = window.Event.prototype;
495
+ window.CustomEvent = e;
496
+ })();
497
+ (function () {
498
+ var e, o, n;
499
+ function s(e, a) {
500
+ var o = c(a);
501
+ var t = d(o);
502
+ t = t ? "?" + t : t;
503
+ return e + "/index.html" + t;
504
+ }
505
+ function i(e) {
506
+ return /(^[0-9A-F]{6}$)|(^[0-9A-F]{3}$)/i.test(e);
507
+ }
508
+ function c(e) {
509
+ var o = ["sound", "constrained", "accessibilityText"];
510
+ var t = o.reduce(function (a, o) {
511
+ if (e[o] !== undefined) {
512
+ a[o] = e[o] === true ? true : false;
29
513
  }
30
- : function () {
31
- return n;
32
- };
33
- return e.d(t, "a", t), t;
34
- }),
35
- (e.o = function (n, e) {
36
- return Object.prototype.hasOwnProperty.call(n, e);
37
- }),
38
- (e.p = ""),
39
- e((e.s = 0));
40
- })([
41
- function (n, e, t) {
42
- "use strict";
43
- var o = Object.assign ||
44
- function (n) {
45
- for (var e = 1; e < arguments.length; e++) {
46
- var t = arguments[e];
47
- for (var o in t)
48
- Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]);
514
+ return a;
515
+ }, {});
516
+ if (e.color) {
517
+ if ((e.color.length <= 6 && i(e.color)) ||
518
+ e.color.toLowerCase() === "white" ||
519
+ e.color.toLowerCase() === "blue" ||
520
+ e.color.toLowerCase() === "blur" ||
521
+ e.color.toLowerCase() === "transparent") {
522
+ t.color = e.color;
49
523
  }
50
- return n;
51
- };
52
- !(function () {
53
- function n(n, e) {
54
- e = e || { bubbles: !1, cancelable: !1, detail: void 0 };
55
- var t = document.createEvent("CustomEvent");
56
- return t.initCustomEvent(n, e.bubbles, e.cancelable, e.detail), t;
57
524
  }
58
- if ("function" == typeof window.CustomEvent)
59
- return !1;
60
- (n.prototype = window.Event.prototype), (window.CustomEvent = n);
61
- })(),
62
- (function () {
63
- function n(e, isTest) {
64
- var o = t(e), i = r(o);
65
- return ((i = i ? "?" + i : i),
66
- isTest
67
- ? VisaBrandingResourceUrlEnum_1.VisaBrandingResourceUrlEnum.visaBrandingResourcesDev +
68
- "/index.html" +
69
- i
70
- : VisaBrandingResourceUrlEnum_1.VisaBrandingResourceUrlEnum.visaBrandingResourcesProd +
71
- "/index.html" +
72
- i);
73
- }
74
- function e(n) {
75
- return /(^[0-9A-F]{6}$)|(^[0-9A-F]{3}$)/i.test(n);
76
- }
77
- function t(n) {
78
- var t = ["sound", "checkmark", "constrained"], o = t.reduce(function (e, t) {
79
- return void 0 !== n[t] && (e[t] = !0 === n[t]), e;
80
- }, {});
81
- return (n.color &&
82
- ((n.color.length <= 6 && e(n.color)) ||
83
- "white" === n.color.toLowerCase() ||
84
- "blue" === n.color.toLowerCase()) &&
85
- (o.color = n.color),
86
- o);
87
- }
88
- function r(n) {
89
- return Object.keys(n)
90
- .map(function (e) {
91
- return encodeURIComponent(e) + "=" + encodeURIComponent(n[e]);
92
- })
93
- .join("&");
94
- }
95
- function i(t, isTest) {
96
- var o = n(t, isTest), r = document.createElement("iframe");
97
- r.allow = "autoplay";
98
- return (!0 === t.constrained
99
- ? (r.style.position = "relative")
100
- : (r.style.position = "fixed"),
101
- (r.style.display = "none"),
102
- (r.style.height = "100%"),
103
- (r.style.width = "100%"),
104
- (r.style.border = "0"),
105
- (r.style.top = "0"),
106
- (r.style.left = "0"),
107
- (r.style.zIndex = "9999999"),
108
- (r.src = o),
109
- r);
110
- }
111
- function s(n) {
112
- for (; n.firstChild;)
113
- n.removeChild(n.firstChild);
114
- }
115
- function a(n, isTest, t) {
116
- "loading" === document.readyState
117
- ? document.addEventListener("DOMContentLoaded", function () {
118
- d(n, isTest, t);
119
- })
120
- : d(n, isTest, t);
121
- }
122
- function d(e, isTest, r) {
123
- if (((e = e || {}),
124
- (f = n(e, isTest)),
125
- (u = r || document.getElementById("visa-sensory-branding")),
126
- !(u instanceof HTMLElement)))
127
- throw new Error("DOM element was not passed to VisaSensoryBranding init");
128
- if (!t)
129
- throw new Error("Folder Path was not passed to VisaSensoryBranding init");
130
- var a = o({}, e) || {};
131
- (a.sound = !1),
132
- (l = i(a, isTest)),
133
- s(u),
134
- u.appendChild(l),
135
- (u.onload = function () {
136
- s(u);
137
- });
138
- }
139
- function c() {
140
- new Date(),
141
- window.addEventListener("message", (function () {
142
- function n(e) {
143
- "visa-sensory-branding-end" === e.data &&
144
- (window.removeEventListener("message", n),
145
- u.classList.remove("show"),
146
- (l.style.display = "none"),
147
- u.dispatchEvent(new CustomEvent("visa-sensory-branding-end")));
148
- }
149
- return n;
150
- })()),
151
- s(u),
152
- (l.src = f),
153
- (l.style.display = "block"),
154
- u.appendChild(l),
155
- u.classList.add("show");
525
+ if (e.checkmarkTextOption) {
526
+ t.checkmarkTextOption = e.checkmarkTextOption;
527
+ }
528
+ if (e.checkmark) {
529
+ t.checkmark = e.checkmark;
530
+ }
531
+ if (e.languageCode) {
532
+ t.languageCode = e.languageCode;
533
+ }
534
+ else {
535
+ e.languageCode = "es";
536
+ t.languageCode = "es";
537
+ }
538
+ var n = document.getElementById("visa-sensory-branding");
539
+ var s = a[e.languageCode].data["success"];
540
+ n.setAttribute("role", "alert");
541
+ e.accessibilityText
542
+ ? n.setAttribute("aria-label", e.accessibilityText)
543
+ : n.setAttribute("aria-label", s);
544
+ return t;
545
+ }
546
+ function d(e) {
547
+ return Object.keys(e)
548
+ .map(function (a) {
549
+ return encodeURIComponent(a) + "=" + encodeURIComponent(e[a]);
550
+ })
551
+ .join("&");
552
+ }
553
+ function m(e, a) {
554
+ var o = s(e, a);
555
+ var t = Object.assign(document.createElement("iframe"), {
556
+ sandbox: "allow-same-origin allow-scripts",
557
+ });
558
+ if (a["constrained"] === true) {
559
+ t.style.position = "relative";
560
+ }
561
+ else {
562
+ t.style.position = "fixed";
563
+ }
564
+ t.style.display = "none";
565
+ t.style.height = "100%";
566
+ t.style.width = "100%";
567
+ t.style.border = "0";
568
+ t.style.top = "0";
569
+ t.style.left = "0";
570
+ t.style.zIndex = "9999999";
571
+ t.src = o;
572
+ t.allow = "autoplay";
573
+ return t;
574
+ }
575
+ function r(e) {
576
+ while (e.firstChild) {
577
+ e.removeChild(e.firstChild);
578
+ }
579
+ }
580
+ function l(e, a, o) {
581
+ if (document.readyState === "loading") {
582
+ document.addEventListener("DOMContentLoaded", function () {
583
+ p(e, a, o);
584
+ });
585
+ }
586
+ else {
587
+ p(e, a, o);
588
+ }
589
+ }
590
+ function p(a, i, c) {
591
+ a = a || {};
592
+ n = s(i, a);
593
+ e = c || document.getElementById("visa-sensory-branding");
594
+ i = i || "./VisaSensoryBrandingSDK";
595
+ if (!(e instanceof HTMLElement)) {
596
+ throw new Error("DOM element was not passed to VisaSensoryBranding init");
597
+ }
598
+ if (!i) {
599
+ throw new Error("Folder Path was not passed to VisaSensoryBranding init");
600
+ }
601
+ var d = t({}, a) || {};
602
+ d.sound = false;
603
+ o = m(i, d);
604
+ r(e);
605
+ e.appendChild(o);
606
+ e.onload = function () {
607
+ r(e);
608
+ };
609
+ }
610
+ function u() {
611
+ window.addEventListener("message", function a(t) {
612
+ if (t.data === "visa-sensory-branding-end") {
613
+ window.removeEventListener("message", a);
614
+ e.classList.remove("show");
615
+ o.style.display = "none";
616
+ e.dispatchEvent(new CustomEvent("visa-sensory-branding-end"));
156
617
  }
157
- var u, l, f;
158
- if (((window.VisaSensoryBranding = window.VisaSensoryBranding || {}),
159
- window.VisaSensoryBranding.show))
160
- throw new Error("VisaSensoryBranding.show is already define.");
161
- if (((window.VisaSensoryBranding.show = c),
162
- window.VisaSensoryBranding.init))
163
- throw new Error("VisaSensoryBranding.init is already define.");
164
- window.VisaSensoryBranding.init = a;
165
- })();
166
- },
167
- ]);
618
+ });
619
+ r(e);
620
+ o.src = n;
621
+ o.style.display = "block";
622
+ e.appendChild(o);
623
+ e.classList.add("show");
624
+ }
625
+ window.VisaSensoryBranding = window.VisaSensoryBranding || {};
626
+ if (window.VisaSensoryBranding.show) {
627
+ throw new Error("VisaSensoryBranding.show is already defined.");
628
+ }
629
+ else {
630
+ window.VisaSensoryBranding.show = u;
631
+ }
632
+ if (window.VisaSensoryBranding.init) {
633
+ throw new Error("VisaSensoryBranding.init is already defined.");
634
+ }
635
+ else {
636
+ window.VisaSensoryBranding.init = l;
637
+ }
638
+ })();
639
+ })();