@everymatrix/cashier-page 1.94.36 → 1.94.37

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 (70) hide show
  1. package/components/CashierCarousel-CWqhxf1D.cjs +1 -0
  2. package/components/{CashierCarousel-Ju7cQ53J.js → CashierCarousel-DFK922WR.js} +214 -178
  3. package/components/{CashierCarousel-B4jAzsnI.js → CashierCarousel-k7Y3Z9n1.js} +214 -178
  4. package/components/CashierError-C1W-9X8J.cjs +1 -0
  5. package/components/CashierError-C9gnnAyr.js +814 -0
  6. package/components/CashierError-WkiOBVs-.js +798 -0
  7. package/components/CashierHeader-BK500Xjw.cjs +1 -0
  8. package/components/{CashierHeader-BGpZFT0g.js → CashierHeader-Byz_chFz.js} +53 -32
  9. package/components/{CashierHeader-CP6ffv1-.js → CashierHeader-COwiXVNs.js} +53 -32
  10. package/components/CashierIframeRedirect-BDGjUNum.cjs +1 -0
  11. package/components/{CashierIframeRedirect-BhGJdt1S.js → CashierIframeRedirect-BoyUKotK.js} +69 -60
  12. package/components/{CashierIframeRedirect-Bf0iNUJc.js → CashierIframeRedirect-rUhN76X2.js} +69 -60
  13. package/components/{CashierMethodDetails-BJYlZyTr.js → CashierMethodDetails-CGdI_qop.js} +2488 -2194
  14. package/components/{CashierMethodDetails-DF2piOnQ.js → CashierMethodDetails-UYwG3pD4.js} +2389 -2095
  15. package/components/CashierMethodDetails-rXDr1XNZ.cjs +85 -0
  16. package/components/{CashierMethodsList-i6RsCq8_.js → CashierMethodsList-BJOLHbcD.js} +169 -133
  17. package/components/{CashierMethodsList-CceoUQus.js → CashierMethodsList-BL0sUyuY.js} +182 -146
  18. package/components/CashierMethodsList-CZV52Zob.cjs +1 -0
  19. package/components/{CashierModal-B_CMXPj2.js → CashierModal-B_7Q4iwq.js} +2 -2
  20. package/components/{CashierModal-Dd14V9-9.cjs → CashierModal-BxI26VGr.cjs} +1 -1
  21. package/components/{CashierModal-CvAq_Ya6.js → CashierModal-Dl0z5NVU.js} +2 -2
  22. package/components/{CashierNotifications-CGOL4Hgi.js → CashierNotifications-0c5qC2wE.js} +1 -1
  23. package/components/{CashierNotifications-B2ACV2Wj.js → CashierNotifications-BELBGieS.js} +1 -1
  24. package/components/{CashierNotifications-DiuiOKKG.cjs → CashierNotifications-IlgXqW4M.cjs} +1 -1
  25. package/components/CashierPage-56J3O0u0.cjs +23 -0
  26. package/components/{CashierPage-C78qNR_6.js → CashierPage-D9p8Vv64.js} +1159 -1018
  27. package/components/{CashierPage-9QGvgJdD.js → CashierPage-f3Bp0yQu.js} +1058 -917
  28. package/components/{CashierReceiptPage-BO_YWEks.cjs → CashierReceiptPage-CiR_vfro.cjs} +2 -2
  29. package/components/{CashierReceiptPage-C5xtHwlF.js → CashierReceiptPage-D2QaqABB.js} +800 -524
  30. package/components/{CashierReceiptPage-BN3nEO9S.js → CashierReceiptPage-HHsf22Go.js} +759 -483
  31. package/components/CashierSessionExpirationModal-BGSdk_Mj.cjs +2 -0
  32. package/components/{CashierSessionExpirationModal-BAxa-peO.js → CashierSessionExpirationModal-BgA16ICX.js} +366 -342
  33. package/components/{CashierSessionExpirationModal-BmDU66u_.js → CashierSessionExpirationModal-YD2SyMu-.js} +342 -318
  34. package/components/{CashierSpinner-78TTHLfL.js → CashierSpinner-B1exigYR.js} +2 -2
  35. package/components/{CashierSpinner-Cxrxu50U.js → CashierSpinner-WMxJlzPU.js} +2 -2
  36. package/components/{CashierSpinner-4oFy3A9w.cjs → CashierSpinner-xDUg2Ia3.cjs} +1 -1
  37. package/components/CashierStepUp-BJcULKh3.cjs +1 -0
  38. package/components/CashierStepUp-BX4oMHdc.js +1200 -0
  39. package/components/CashierStepUp-C_ptl1y7.js +1161 -0
  40. package/components/{CashierTransactionHistory-D4QXPykp.js → CashierTransactionHistory-CHZesJO5.js} +563 -488
  41. package/components/{CashierTransactionHistory-Cp1_tsYu.js → CashierTransactionHistory-CrflKpwN.js} +550 -475
  42. package/components/CashierTransactionHistory-TDbLeWcJ.cjs +1 -0
  43. package/components/{CashierVerifications-DCt6vl4P.js → CashierVerifications-BDZn88UR.js} +310 -249
  44. package/components/{CashierVerifications-DIXTooXo.js → CashierVerifications-CoqfO6l6.js} +309 -256
  45. package/components/CashierVerifications-QKE-9H4t.cjs +1 -0
  46. package/components/{TxnStatusIcon-BohNSp8i.cjs → TxnStatusIcon-BOdjGqDN.cjs} +1 -1
  47. package/components/{TxnStatusIcon-DxkpWqST.js → TxnStatusIcon-CXbH_076.js} +1 -1
  48. package/components/{TxnStatusIcon-BYUMew_B.js → TxnStatusIcon-Cvq52nxs.js} +1 -1
  49. package/components/{TxnTypeIcons-BNIyiw8U.js → TxnTypeIcons-BZnwBNqe.js} +1 -1
  50. package/components/{TxnTypeIcons-C3j3WSxa.js → TxnTypeIcons-D-qWVgkw.js} +1 -1
  51. package/components/{TxnTypeIcons-BUklfomB.cjs → TxnTypeIcons-DuRqxFjm.cjs} +1 -1
  52. package/es2015/cashier-page.cjs +1 -1
  53. package/es2015/cashier-page.js +1 -1
  54. package/esnext/cashier-page.js +1 -1
  55. package/package.json +1 -1
  56. package/components/CashierCarousel-BcDm5UC1.cjs +0 -1
  57. package/components/CashierError-DiBxWuzE.js +0 -642
  58. package/components/CashierError-DuQCc57p.js +0 -658
  59. package/components/CashierError-qOoBUKKi.cjs +0 -1
  60. package/components/CashierHeader-DJMhpwtG.cjs +0 -1
  61. package/components/CashierIframeRedirect-Cnzm6DaQ.cjs +0 -1
  62. package/components/CashierMethodDetails-BWunEzWc.cjs +0 -85
  63. package/components/CashierMethodsList-Usolzb6T.cjs +0 -1
  64. package/components/CashierPage-CWUHd9kH.cjs +0 -23
  65. package/components/CashierSessionExpirationModal-BaxvOINh.cjs +0 -2
  66. package/components/CashierStepUp-BRMl9Byl.js +0 -1092
  67. package/components/CashierStepUp-BsfyLsnN.cjs +0 -1
  68. package/components/CashierStepUp-CbqhLfIu.js +0 -1131
  69. package/components/CashierTransactionHistory-DS0DSRSZ.cjs +0 -1
  70. package/components/CashierVerifications-BHJ7Twd4.cjs +0 -1
@@ -1,1131 +0,0 @@
1
- var Ze = Object.defineProperty, $e = Object.defineProperties;
2
- var et = Object.getOwnPropertyDescriptors;
3
- var Me = Object.getOwnPropertySymbols;
4
- var tt = Object.prototype.hasOwnProperty, nt = Object.prototype.propertyIsEnumerable;
5
- var Te = (n, t, e) => t in n ? Ze(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, ve = (n, t) => {
6
- for (var e in t || (t = {}))
7
- tt.call(t, e) && Te(n, e, t[e]);
8
- if (Me)
9
- for (var e of Me(t))
10
- nt.call(t, e) && Te(n, e, t[e]);
11
- return n;
12
- }, Le = (n, t) => $e(n, et(t));
13
- var me = (n, t, e) => new Promise((i, o) => {
14
- var a = (c) => {
15
- try {
16
- s(e.next(c));
17
- } catch (f) {
18
- o(f);
19
- }
20
- }, p = (c) => {
21
- try {
22
- s(e.throw(c));
23
- } catch (f) {
24
- o(f);
25
- }
26
- }, s = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(a, p);
27
- s((e = e.apply(n, t)).next());
28
- });
29
- import { a as it, $ as ot, S as lt, b as rt, s as st, f as le, c as at, y as ke, e as O, k as S, m as v, o as r, p as ct, q as pt, x as ze, v as D, l as d, z as te, Q as J, n as x, w as L, F as Be, L as Q, r as ut, D as Ae, E as dt, A as ft, B as mt } from "./CashierPage-C78qNR_6.js";
30
- import { s as ht, a as gt, b as bt } from "./CashierHeader-BGpZFT0g.js";
31
- function Re(n, t) {
32
- it(n, t);
33
- }
34
- function wt(n) {
35
- ot.set(n);
36
- }
37
- const Ie = {
38
- en: {
39
- otpTitle: "Code verification is required",
40
- popupMessage: "Please enter the security code received on your SMS/email address to perform the update.",
41
- popupMessageLastWarning: "If the next validation attempt is failed, your transaction will fail and you will be returned back to payment method.",
42
- minutes: "minutes",
43
- errorHeader: "Error",
44
- configError: "Unable to load OTP data. Please try again later.",
45
- otpHeading: "Enter OTP",
46
- resendOtp: "Resent OTP",
47
- submit: "Submit",
48
- close: "Close",
49
- invalidOtp: "The code you've sent is not valid. Please try again.",
50
- accountBlocked: "Too many attempts for OTP. Your account has been blocked for one hour.",
51
- submissionError: "Something went wrong. Please try again.",
52
- otpExpiredMessage: "Validation code has expired, please request a new one to continue.",
53
- timeRemaining: "Code expires in:",
54
- selectChannelTitle: "Select verification method",
55
- selectChannelMessage: "Choose how you would like to receive your verification code",
56
- channelSMS: "SMS",
57
- channelEmail: "Email",
58
- sendCode: "Send code",
59
- waitSeconds: "Please wait for before resending:"
60
- },
61
- tr: {
62
- otpTitle: "Kod doğrulaması gereklidir",
63
- popupMessage: "Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",
64
- popupMessageLastWarning: "Bir sonraki doğrulama denemesi başarısız olursa, işleminiz başarısız olacak ve ödeme yöntemine geri döndürüleceksiniz.",
65
- minutes: "dakika",
66
- errorHeader: "Hata",
67
- configError: "OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",
68
- otpHeading: "OTP Girin",
69
- resendOtp: "OTP'yi Yeniden Gönder",
70
- submit: "Gönder",
71
- close: "Kapat",
72
- invalidOtp: "Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",
73
- accountBlocked: "OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",
74
- submissionError: "Bir şeyler ters gitti. Lütfen tekrar deneyin.",
75
- otpExpiredMessage: "Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",
76
- timeRemaining: "Kodun süresi doluyor:",
77
- selectChannelTitle: "Doğrulama yöntemi seçin",
78
- selectChannelMessage: "Doğrulama kodunuzu nasıl almak istediğinizi seçin",
79
- channelSMS: "SMS kodu",
80
- channelEmail: "E-posta kodu",
81
- sendCode: "Kodu gönder",
82
- waitSeconds: "Tekrar göndermeden önce lütfen bekleyin:"
83
- },
84
- fr: {
85
- otpTitle: "La vérification par code est requise",
86
- popupMessage: "Veuillez saisir le code de sécurité reçu par SMS ou par e-mail afin d’effectuer la mise à jour.",
87
- popupMessageLastWarning: "Si la prochaine tentative de validation échoue, votre transaction échouera et vous serez redirigé vers le moyen de paiement.",
88
- minutes: "minutes",
89
- errorHeader: "Erreur",
90
- configError: "Impossible de charger les données OTP. Veuillez réessayer plus tard.",
91
- otpHeading: "Saisir le code OTP",
92
- resendOtp: "Renvoyer le code OTP",
93
- submit: "Valider",
94
- close: "Fermer",
95
- invalidOtp: "Le code que vous avez saisi n’est pas valide. Veuillez réessayer.",
96
- accountBlocked: "Trop de tentatives de code OTP. Votre compte a été bloqué pendant une heure.",
97
- submissionError: "Une erreur s’est produite. Veuillez réessayer.",
98
- otpExpiredMessage: "Le code de validation a expiré. Veuillez en demander un nouveau pour continuer.",
99
- timeRemaining: "Le code expire dans :",
100
- selectChannelTitle: "Sélectionner la méthode de vérification",
101
- selectChannelMessage: "Choisissez comment vous souhaitez recevoir votre code de vérification",
102
- channelSMS: "SMS",
103
- channelEmail: "E-mail",
104
- sendCode: "Envoyer le code",
105
- waitSeconds: "Veuillez patienter avant de renvoyer le code :"
106
- }
107
- };
108
- function _t(n) {
109
- at(n, "svelte-gpy3mu", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.RadioIndicator{width:20px;height:20px;border-radius:50%;border:2px solid var(--emw--color-typography, #fff);position:relative;flex-shrink:0;margin-right:8px;transition:all 0.2s ease;opacity:0.7}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;opacity:1;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.ModalCloseIcon{padding:0px;position:absolute;right:0;top:0;margin:15px 20px;z-index:20;transition:all 0.3s ease}.ModalCloseIcon svg{width:11px;height:11px;fill:var(--emw--color-primary, red);cursor:pointer}.ModalCloseIcon:hover{transform:rotate(90deg)}.OtpContent{width:100%;display:flex;flex-direction:column;gap:var(--emw--spacing-large, 20px)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpButton{text-transform:uppercase;font-weight:var(--emw--font-weight-medium, 500);color:var(--emw--color-typography-button, #000000);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-family:inherit;height:46px;line-height:normal;border:none;background:var(--emw--color-primary, #f9c408);border-radius:10px;width:100%;margin:var(--emw--spacing-small, 12px) 0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--emw--spacing-2x-small-plus, 5px);transition:all 0.2s linear}.OtpButton:active{box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-active, #fecd1c)}.OtpButton[disabled],.OtpButton.disabled{filter:saturate(50%);opacity:0.5;cursor:not-allowed;pointer-events:none}.OtpButton:hover:not([disabled]):not(.disabled){box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.2);background-color:var(--emw--color-hover, #dbac03)}@container (max-width: 500px){.OtpDescription{font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-size-big, 20px)}}.OtpDescription{display:flex;color:var(--emw--color-typography, #fff);flex-direction:column;gap:12px;font-size:var(--emw--font-size-small, 12px)}.OtpDescription .Title{font-size:var(--emw--font-medium, 16px);font-weight:var(--emw--font-weight-medium, 600)}.OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px;align-items:center}.OtpError h2{margin:0;color:var(--emw--color-typography, #fff)}.OtpError p{color:var(--emw--color-typography, #fff);text-align:center;font-size:var(--emw--font-size-small, 12px)}.OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.ChannelSelection{display:flex;flex-direction:row;justify-content:space-between}.ChannelCheckbox{display:flex;align-items:center;padding:var(--emw--spacing-medium, 16px);cursor:pointer;transition:all 0.2s ease}.ChannelCheckbox input[type=radio]{display:none}.ChannelCheckbox .ChannelContent{display:flex;align-items:center;gap:3px;width:100%;color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500)}.ChannelCheckbox .ChannelContent svg{flex-shrink:0;opacity:0.7;width:20px;height:20px}.ChannelCheckbox .ChannelContent span{text-transform:uppercase}.ChannelCheckbox.selected .ChannelContent{color:var(--emw--color-primary, #000000)}.ChannelCheckbox.selected .ChannelContent svg{stroke:var(--emw--color-primary, #000000);opacity:1}.ChannelCheckbox:hover:not(.selected){color:var(--emw--color-active, #fff)}.OtpField{display:flex;justify-content:space-between;margin:10px}.OtpField input{width:45px;font-size:32px;padding:5px;text-align:center;border-radius:5px;margin:6px;font-weight:bold;outline:none;background:var(--emw--color-background);border:0;transition:all 0.1s;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);color:var(--emw--color-typography, #fff)}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{box-shadow:0 0 1px 1px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between;gap:40px}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpNoticeMessage{color:var(--emw--color-primary, #f9c408);font-weight:bold}.LastWarningMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;display:flex;justify-content:center;align-items:center;padding:20px 0}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.OtpTimer{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-small, 12px);opacity:0.8}@container (max-width: 500px){.OtpContent{padding:var(--emw--spacing-small, 10px)}.OtpField input{width:40px;font-size:28px;margin:4px}}');
110
- }
111
- function Pe(n, t, e) {
112
- const i = n.slice();
113
- return i[69] = t[e], i[70] = t, i[71] = e, i;
114
- }
115
- function yt(n) {
116
- let t, e, i, o, a, p, s, c, f, _, w, T, M, b, m, y, C, R = (
117
- /*$_*/
118
- n[19]("channelSMS") + ""
119
- ), K, W, V, I, ne, q, Z, re, $, E, z, F, se, ae, ce = (
120
- /*$_*/
121
- n[19]("channelEmail") + ""
122
- ), U, he, X, H, Y, pe, ue;
123
- function de(u, k) {
124
- return (
125
- /*showResendOtp*/
126
- u[9] ? Et : (
127
- /*showOtpInput*/
128
- u[12] ? kt : Ct
129
- )
130
- );
131
- }
132
- let ee = de(n), G = ee(n), N = (
133
- /*selectedChannel*/
134
- n[0] && De(n)
135
- );
136
- function ge(u, k) {
137
- if (
138
- /*isLoading*/
139
- u[3] && /*showOtpInput*/
140
- u[12]
141
- )
142
- return zt;
143
- if (
144
- /*showOtpInput*/
145
- u[12] && /*config*/
146
- u[4]
147
- )
148
- return Lt;
149
- }
150
- let ie = ge(n), j = ie && ie(n);
151
- function be(u, k) {
152
- if (
153
- /*showResendOtp*/
154
- u[9]
155
- )
156
- return Rt;
157
- if (
158
- /*showOtpInput*/
159
- u[12] && /*config*/
160
- u[4]
161
- )
162
- return At;
163
- }
164
- let oe = be(n), P = oe && oe(n);
165
- return {
166
- c() {
167
- t = v("div"), G.c(), e = x(), i = v("div"), o = v("label"), a = v("div"), p = x(), s = v("input"), f = x(), _ = v("div"), w = J("svg"), T = J("path"), M = J("circle"), b = J("circle"), m = J("circle"), y = x(), C = v("span"), K = L(R), W = x(), V = v("label"), I = v("div"), ne = x(), q = v("input"), re = x(), $ = v("div"), E = J("svg"), z = J("rect"), F = J("path"), se = x(), ae = v("span"), U = L(ce), he = x(), N && N.c(), X = x(), j && j.c(), H = x(), Y = v("div"), P && P.c(), r(t, "class", "OtpDescription"), r(a, "class", "RadioIndicator"), Q(
168
- a,
169
- "checked",
170
- /*selectedChannel*/
171
- n[0] === /*channels*/
172
- n[20].SMS
173
- ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
174
- n[20].SMS, s.checked = c = /*selectedChannel*/
175
- n[0] === /*channels*/
176
- n[20].SMS, r(T, "d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"), r(M, "cx", "9"), r(M, "cy", "11"), r(M, "r", "0.5"), r(M, "fill", "currentColor"), r(b, "cx", "12"), r(b, "cy", "11"), r(b, "r", "0.5"), r(b, "fill", "currentColor"), r(m, "cx", "15"), r(m, "cy", "11"), r(m, "r", "0.5"), r(m, "fill", "currentColor"), r(w, "xmlns", "http://www.w3.org/2000/svg"), r(w, "width", "24"), r(w, "height", "24"), r(w, "viewBox", "0 0 24 24"), r(w, "fill", "none"), r(w, "stroke", "currentColor"), r(w, "stroke-width", "2"), r(w, "stroke-linecap", "round"), r(w, "stroke-linejoin", "round"), r(_, "class", "ChannelContent"), r(o, "class", "ChannelCheckbox"), Q(
177
- o,
178
- "selected",
179
- /*selectedChannel*/
180
- n[0] === /*channels*/
181
- n[20].SMS
182
- ), r(I, "class", "RadioIndicator"), Q(
183
- I,
184
- "checked",
185
- /*selectedChannel*/
186
- n[0] === /*channels*/
187
- n[20].EMAIL
188
- ), r(q, "type", "radio"), r(q, "name", "channel"), q.value = /*channels*/
189
- n[20].EMAIL, q.checked = Z = /*selectedChannel*/
190
- n[0] === /*channels*/
191
- n[20].EMAIL, r(z, "x", "2"), r(z, "y", "4"), r(z, "width", "20"), r(z, "height", "16"), r(z, "rx", "2"), r(F, "d", "m2 7 10 6 10-6"), r(E, "xmlns", "http://www.w3.org/2000/svg"), r(E, "width", "24"), r(E, "height", "24"), r(E, "viewBox", "0 0 24 24"), r(E, "fill", "none"), r(E, "stroke", "currentColor"), r(E, "stroke-width", "2"), r(E, "stroke-linecap", "round"), r(E, "stroke-linejoin", "round"), r($, "class", "ChannelContent"), r(V, "class", "ChannelCheckbox"), Q(
192
- V,
193
- "selected",
194
- /*selectedChannel*/
195
- n[0] === /*channels*/
196
- n[20].EMAIL
197
- ), r(i, "class", "ChannelSelection"), r(Y, "class", "OtpActionButtons");
198
- },
199
- m(u, k) {
200
- S(u, t, k), G.m(t, null), S(u, e, k), S(u, i, k), d(i, o), d(o, a), d(o, p), d(o, s), d(o, f), d(o, _), d(_, w), d(w, T), d(w, M), d(w, b), d(w, m), d(_, y), d(_, C), d(C, K), d(i, W), d(i, V), d(V, I), d(V, ne), d(V, q), d(V, re), d(V, $), d($, E), d(E, z), d(E, F), d($, se), d($, ae), d(ae, U), S(u, he, k), N && N.m(u, k), S(u, X, k), j && j.m(u, k), S(u, H, k), S(u, Y, k), P && P.m(Y, null), pe || (ue = [
201
- te(
202
- s,
203
- "change",
204
- /*change_handler*/
205
- n[39]
206
- ),
207
- te(
208
- q,
209
- "change",
210
- /*change_handler_1*/
211
- n[40]
212
- )
213
- ], pe = !0);
214
- },
215
- p(u, k) {
216
- ee === (ee = de(u)) && G ? G.p(u, k) : (G.d(1), G = ee(u), G && (G.c(), G.m(t, null))), k[0] & /*selectedChannel, channels*/
217
- 1048577 && Q(
218
- a,
219
- "checked",
220
- /*selectedChannel*/
221
- u[0] === /*channels*/
222
- u[20].SMS
223
- ), k[0] & /*selectedChannel*/
224
- 1 && c !== (c = /*selectedChannel*/
225
- u[0] === /*channels*/
226
- u[20].SMS) && (s.checked = c), k[0] & /*$_*/
227
- 524288 && R !== (R = /*$_*/
228
- u[19]("channelSMS") + "") && D(K, R), k[0] & /*selectedChannel, channels*/
229
- 1048577 && Q(
230
- o,
231
- "selected",
232
- /*selectedChannel*/
233
- u[0] === /*channels*/
234
- u[20].SMS
235
- ), k[0] & /*selectedChannel, channels*/
236
- 1048577 && Q(
237
- I,
238
- "checked",
239
- /*selectedChannel*/
240
- u[0] === /*channels*/
241
- u[20].EMAIL
242
- ), k[0] & /*selectedChannel*/
243
- 1 && Z !== (Z = /*selectedChannel*/
244
- u[0] === /*channels*/
245
- u[20].EMAIL) && (q.checked = Z), k[0] & /*$_*/
246
- 524288 && ce !== (ce = /*$_*/
247
- u[19]("channelEmail") + "") && D(U, ce), k[0] & /*selectedChannel, channels*/
248
- 1048577 && Q(
249
- V,
250
- "selected",
251
- /*selectedChannel*/
252
- u[0] === /*channels*/
253
- u[20].EMAIL
254
- ), /*selectedChannel*/
255
- u[0] ? N ? N.p(u, k) : (N = De(u), N.c(), N.m(X.parentNode, X)) : N && (N.d(1), N = null), ie === (ie = ge(u)) && j ? j.p(u, k) : (j && j.d(1), j = ie && ie(u), j && (j.c(), j.m(H.parentNode, H))), oe === (oe = be(u)) && P ? P.p(u, k) : (P && P.d(1), P = oe && oe(u), P && (P.c(), P.m(Y, null)));
256
- },
257
- d(u) {
258
- u && (O(t), O(e), O(i), O(he), O(X), O(H), O(Y)), G.d(), N && N.d(u), j && j.d(u), P && P.d(), pe = !1, Be(ue);
259
- }
260
- };
261
- }
262
- function vt(n) {
263
- let t, e, i, o, a, p, s = (
264
- /*$_*/
265
- n[19]("errorHeader") + ""
266
- ), c, f, _, w, T, M, b = (
267
- /*$_*/
268
- n[19]("close") + ""
269
- ), m, y, C;
270
- return {
271
- c() {
272
- t = v("div"), e = v("div"), i = J("svg"), o = J("path"), a = x(), p = v("h2"), c = L(s), f = x(), _ = v("p"), w = L(
273
- /*errorMessage*/
274
- n[8]
275
- ), T = x(), M = v("button"), m = L(b), r(o, "d", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"), r(i, "xmlns", "http://www.w3.org/2000/svg"), r(i, "viewBox", "0 0 512 512"), r(e, "class", "OtpErrorHeader"), r(M, "class", "OtpButton error"), r(t, "class", "OtpError");
276
- },
277
- m(R, K) {
278
- S(R, t, K), d(t, e), d(e, i), d(i, o), d(e, a), d(e, p), d(p, c), d(t, f), d(t, _), d(_, w), d(t, T), d(t, M), d(M, m), y || (C = te(
279
- M,
280
- "click",
281
- /*manualClosePopup*/
282
- n[28]
283
- ), y = !0);
284
- },
285
- p(R, K) {
286
- K[0] & /*$_*/
287
- 524288 && s !== (s = /*$_*/
288
- R[19]("errorHeader") + "") && D(c, s), K[0] & /*errorMessage*/
289
- 256 && D(
290
- w,
291
- /*errorMessage*/
292
- R[8]
293
- ), K[0] & /*$_*/
294
- 524288 && b !== (b = /*$_*/
295
- R[19]("close") + "") && D(m, b);
296
- },
297
- d(R) {
298
- R && O(t), y = !1, C();
299
- }
300
- };
301
- }
302
- function kt(n) {
303
- let t, e, i, o;
304
- function a(f, _) {
305
- return (
306
- /*isLastWarning*/
307
- f[10] ? St : Ot
308
- );
309
- }
310
- let p = a(n), s = p(n), c = (
311
- /*hasErrors*/
312
- n[6] && xe(n)
313
- );
314
- return {
315
- c() {
316
- t = v("p"), s.c(), i = x(), c && c.c(), o = ut(), r(t, "class", e = /*isLastWarning*/
317
- n[10] ? "LastWarningMessage" : "");
318
- },
319
- m(f, _) {
320
- S(f, t, _), s.m(t, null), S(f, i, _), c && c.m(f, _), S(f, o, _);
321
- },
322
- p(f, _) {
323
- p === (p = a(f)) && s ? s.p(f, _) : (s.d(1), s = p(f), s && (s.c(), s.m(t, null))), _[0] & /*isLastWarning*/
324
- 1024 && e !== (e = /*isLastWarning*/
325
- f[10] ? "LastWarningMessage" : "") && r(t, "class", e), /*hasErrors*/
326
- f[6] ? c ? c.p(f, _) : (c = xe(f), c.c(), c.m(o.parentNode, o)) : c && (c.d(1), c = null);
327
- },
328
- d(f) {
329
- f && (O(t), O(i), O(o)), s.d(), c && c.d(f);
330
- }
331
- };
332
- }
333
- function Ct(n) {
334
- let t, e = (
335
- /*$_*/
336
- (n[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
337
- ), i;
338
- return {
339
- c() {
340
- t = v("p"), i = L(e);
341
- },
342
- m(o, a) {
343
- S(o, t, a), d(t, i);
344
- },
345
- p(o, a) {
346
- a[0] & /*$_*/
347
- 524288 && e !== (e = /*$_*/
348
- (o[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && D(i, e);
349
- },
350
- d(o) {
351
- o && O(t);
352
- }
353
- };
354
- }
355
- function Et(n) {
356
- let t, e = (
357
- /*$_*/
358
- n[19]("otpExpiredMessage") + ""
359
- ), i;
360
- return {
361
- c() {
362
- t = v("p"), i = L(e), r(t, "class", "OtpNoticeMessage"), r(t, "role", "alert");
363
- },
364
- m(o, a) {
365
- S(o, t, a), d(t, i);
366
- },
367
- p(o, a) {
368
- a[0] & /*$_*/
369
- 524288 && e !== (e = /*$_*/
370
- o[19]("otpExpiredMessage") + "") && D(i, e);
371
- },
372
- d(o) {
373
- o && O(t);
374
- }
375
- };
376
- }
377
- function Ot(n) {
378
- let t = (
379
- /*$_*/
380
- n[19]("popupMessage") + ""
381
- ), e;
382
- return {
383
- c() {
384
- e = L(t);
385
- },
386
- m(i, o) {
387
- S(i, e, o);
388
- },
389
- p(i, o) {
390
- o[0] & /*$_*/
391
- 524288 && t !== (t = /*$_*/
392
- i[19]("popupMessage") + "") && D(e, t);
393
- },
394
- d(i) {
395
- i && O(e);
396
- }
397
- };
398
- }
399
- function St(n) {
400
- let t = (
401
- /*$_*/
402
- n[19]("popupMessageLastWarning") + ""
403
- ), e;
404
- return {
405
- c() {
406
- e = L(t);
407
- },
408
- m(i, o) {
409
- S(i, e, o);
410
- },
411
- p(i, o) {
412
- o[0] & /*$_*/
413
- 524288 && t !== (t = /*$_*/
414
- i[19]("popupMessageLastWarning") + "") && D(e, t);
415
- },
416
- d(i) {
417
- i && O(e);
418
- }
419
- };
420
- }
421
- function xe(n) {
422
- let t, e;
423
- return {
424
- c() {
425
- t = v("p"), e = L(
426
- /*errorMessage*/
427
- n[8]
428
- ), r(t, "class", "OtpErrorMessage"), r(t, "role", "alert");
429
- },
430
- m(i, o) {
431
- S(i, t, o), d(t, e);
432
- },
433
- p(i, o) {
434
- o[0] & /*errorMessage*/
435
- 256 && D(
436
- e,
437
- /*errorMessage*/
438
- i[8]
439
- );
440
- },
441
- d(i) {
442
- i && O(t);
443
- }
444
- };
445
- }
446
- function De(n) {
447
- let t, e, i, o;
448
- function a(c, f) {
449
- return (
450
- /*currentChannelTimer*/
451
- c[17] > 0 ? Tt : Mt
452
- );
453
- }
454
- let p = a(n), s = p(n);
455
- return {
456
- c() {
457
- t = v("button"), s.c(), r(t, "class", "OtpButton"), t.disabled = e = !/*canSubmitChannel*/
458
- n[18], Q(t, "disabled", !/*canSubmitChannel*/
459
- n[18] || /*waitingForConfig*/
460
- n[16]);
461
- },
462
- m(c, f) {
463
- S(c, t, f), s.m(t, null), i || (o = te(
464
- t,
465
- "click",
466
- /*handleChannelSubmit*/
467
- n[22]
468
- ), i = !0);
469
- },
470
- p(c, f) {
471
- p === (p = a(c)) && s ? s.p(c, f) : (s.d(1), s = p(c), s && (s.c(), s.m(t, null))), f[0] & /*canSubmitChannel*/
472
- 262144 && e !== (e = !/*canSubmitChannel*/
473
- c[18]) && (t.disabled = e), f[0] & /*canSubmitChannel, waitingForConfig*/
474
- 327680 && Q(t, "disabled", !/*canSubmitChannel*/
475
- c[18] || /*waitingForConfig*/
476
- c[16]);
477
- },
478
- d(c) {
479
- c && O(t), s.d(), i = !1, o();
480
- }
481
- };
482
- }
483
- function Mt(n) {
484
- let t = (
485
- /*$_*/
486
- n[19]("sendCode") + ""
487
- ), e;
488
- return {
489
- c() {
490
- e = L(t);
491
- },
492
- m(i, o) {
493
- S(i, e, o);
494
- },
495
- p(i, o) {
496
- o[0] & /*$_*/
497
- 524288 && t !== (t = /*$_*/
498
- i[19]("sendCode") + "") && D(e, t);
499
- },
500
- d(i) {
501
- i && O(e);
502
- }
503
- };
504
- }
505
- function Tt(n) {
506
- let t = (
507
- /*$_*/
508
- n[19]("waitSeconds") + ""
509
- ), e, i, o, a;
510
- return {
511
- c() {
512
- e = L(t), i = L(" ("), o = L(
513
- /*currentChannelTimer*/
514
- n[17]
515
- ), a = L("s)");
516
- },
517
- m(p, s) {
518
- S(p, e, s), S(p, i, s), S(p, o, s), S(p, a, s);
519
- },
520
- p(p, s) {
521
- s[0] & /*$_*/
522
- 524288 && t !== (t = /*$_*/
523
- p[19]("waitSeconds") + "") && D(e, t), s[0] & /*currentChannelTimer*/
524
- 131072 && D(
525
- o,
526
- /*currentChannelTimer*/
527
- p[17]
528
- );
529
- },
530
- d(p) {
531
- p && (O(e), O(i), O(o), O(a));
532
- }
533
- };
534
- }
535
- function Lt(n) {
536
- let t, e, i = (
537
- /*$_*/
538
- n[19]("timeRemaining") + ""
539
- ), o, a, p = (
540
- /*formatTime*/
541
- n[23](
542
- /*timeLeft*/
543
- n[5]
544
- ) + ""
545
- ), s, c, f = (
546
- /*$_*/
547
- n[19]("minutes") + ""
548
- ), _, w, T, M = Ae(
549
- /*otp*/
550
- n[2]
551
- ), b = [];
552
- for (let m = 0; m < M.length; m += 1)
553
- b[m] = je(Pe(n, M, m));
554
- return {
555
- c() {
556
- t = v("div"), e = v("div"), o = L(i), a = x(), s = L(p), c = x(), _ = L(f), w = x(), T = v("div");
557
- for (let m = 0; m < b.length; m += 1)
558
- b[m].c();
559
- r(e, "class", "OtpTimer"), r(T, "class", "OtpField"), r(t, "class", "OtpFieldWrapper");
560
- },
561
- m(m, y) {
562
- S(m, t, y), d(t, e), d(e, o), d(e, a), d(e, s), d(e, c), d(e, _), d(t, w), d(t, T);
563
- for (let C = 0; C < b.length; C += 1)
564
- b[C] && b[C].m(T, null);
565
- },
566
- p(m, y) {
567
- if (y[0] & /*$_*/
568
- 524288 && i !== (i = /*$_*/
569
- m[19]("timeRemaining") + "") && D(o, i), y[0] & /*timeLeft*/
570
- 32 && p !== (p = /*formatTime*/
571
- m[23](
572
- /*timeLeft*/
573
- m[5]
574
- ) + "") && D(s, p), y[0] & /*$_*/
575
- 524288 && f !== (f = /*$_*/
576
- m[19]("minutes") + "") && D(_, f), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
577
- 117458964) {
578
- M = Ae(
579
- /*otp*/
580
- m[2]
581
- );
582
- let C;
583
- for (C = 0; C < M.length; C += 1) {
584
- const R = Pe(m, M, C);
585
- b[C] ? b[C].p(R, y) : (b[C] = je(R), b[C].c(), b[C].m(T, null));
586
- }
587
- for (; C < b.length; C += 1)
588
- b[C].d(1);
589
- b.length = M.length;
590
- }
591
- },
592
- d(m) {
593
- m && O(t), dt(b, m);
594
- }
595
- };
596
- }
597
- function zt(n) {
598
- let t;
599
- return {
600
- c() {
601
- t = v("div"), t.innerHTML = '<span class="OtpLoader"></span>', r(t, "class", "OtpLoaderContainer");
602
- },
603
- m(e, i) {
604
- S(e, t, i);
605
- },
606
- p: ke,
607
- d(e) {
608
- e && O(t);
609
- }
610
- };
611
- }
612
- function je(n) {
613
- let t, e, i, o = (
614
- /*index*/
615
- n[71]
616
- ), a, p;
617
- const s = () => (
618
- /*input_binding*/
619
- n[41](t, o)
620
- ), c = () => (
621
- /*input_binding*/
622
- n[41](null, o)
623
- );
624
- function f(...w) {
625
- return (
626
- /*input_handler*/
627
- n[42](
628
- /*index*/
629
- n[71],
630
- ...w
631
- )
632
- );
633
- }
634
- function _(...w) {
635
- return (
636
- /*keydown_handler*/
637
- n[43](
638
- /*index*/
639
- n[71],
640
- ...w
641
- )
642
- );
643
- }
644
- return {
645
- c() {
646
- t = v("input"), r(t, "id", `otp-input-${/*index*/
647
- n[71]}`), r(t, "type", "text"), r(t, "class", e = `otp-box ${/*config*/
648
- n[4].inputLength % 2 === 0 && /*index*/
649
- n[71] === /*config*/
650
- n[4].inputLength / 2 - 1 ? "space" : ""}`), r(t, "maxlength", 1), t.value = i = /*char*/
651
- n[69], r(t, "inputmode", "numeric"), t.disabled = /*inputDisabled*/
652
- n[11], r(t, "autocomplete", "off");
653
- },
654
- m(w, T) {
655
- S(w, t, T), s(), a || (p = [
656
- te(t, "input", f),
657
- te(t, "keydown", _),
658
- te(
659
- t,
660
- "paste",
661
- /*handleOnPasteOtp*/
662
- n[24]
663
- )
664
- ], a = !0);
665
- },
666
- p(w, T) {
667
- n = w, T[0] & /*config*/
668
- 16 && e !== (e = `otp-box ${/*config*/
669
- n[4].inputLength % 2 === 0 && /*index*/
670
- n[71] === /*config*/
671
- n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(t, "class", e), T[0] & /*otp*/
672
- 4 && i !== (i = /*char*/
673
- n[69]) && t.value !== i && (t.value = i), T[0] & /*inputDisabled*/
674
- 2048 && (t.disabled = /*inputDisabled*/
675
- n[11]), o !== /*index*/
676
- n[71] && (c(), o = /*index*/
677
- n[71], s());
678
- },
679
- d(w) {
680
- w && O(t), c(), a = !1, Be(p);
681
- }
682
- };
683
- }
684
- function At(n) {
685
- let t, e = (
686
- /*$_*/
687
- n[19]("submit") + ""
688
- ), i, o, a, p;
689
- return {
690
- c() {
691
- t = v("button"), i = L(e), r(t, "class", "OtpButton"), t.disabled = o = /*otp*/
692
- n[2].join("").length !== /*config*/
693
- n[4].inputLength || /*isSubmitting*/
694
- n[13] || /*maxAttempts*/
695
- n[15];
696
- },
697
- m(s, c) {
698
- S(s, t, c), d(t, i), a || (p = te(
699
- t,
700
- "click",
701
- /*submitOtp*/
702
- n[29]
703
- ), a = !0);
704
- },
705
- p(s, c) {
706
- c[0] & /*$_*/
707
- 524288 && e !== (e = /*$_*/
708
- s[19]("submit") + "") && D(i, e), c[0] & /*otp, config, isSubmitting, maxAttempts*/
709
- 40980 && o !== (o = /*otp*/
710
- s[2].join("").length !== /*config*/
711
- s[4].inputLength || /*isSubmitting*/
712
- s[13] || /*maxAttempts*/
713
- s[15]) && (t.disabled = o);
714
- },
715
- d(s) {
716
- s && O(t), a = !1, p();
717
- }
718
- };
719
- }
720
- function Rt(n) {
721
- let t, e = (
722
- /*$_*/
723
- n[19]("resendOtp") + ""
724
- ), i, o, a;
725
- return {
726
- c() {
727
- t = v("button"), i = L(e), r(t, "class", "OtpButton");
728
- },
729
- m(p, s) {
730
- S(p, t, s), d(t, i), o || (a = te(
731
- t,
732
- "click",
733
- /*handleResendOtp*/
734
- n[27]
735
- ), o = !0);
736
- },
737
- p(p, s) {
738
- s[0] & /*$_*/
739
- 524288 && e !== (e = /*$_*/
740
- p[19]("resendOtp") + "") && D(i, e);
741
- },
742
- d(p) {
743
- p && O(t), o = !1, a();
744
- }
745
- };
746
- }
747
- function It(n) {
748
- let t;
749
- function e(a, p) {
750
- return (
751
- /*hasConfigErrors*/
752
- a[7] ? vt : yt
753
- );
754
- }
755
- let i = e(n), o = i(n);
756
- return {
757
- c() {
758
- t = v("div"), o.c(), r(t, "class", "OtpContent");
759
- },
760
- m(a, p) {
761
- S(a, t, p), o.m(t, null), n[44](t);
762
- },
763
- p(a, p) {
764
- i === (i = e(a)) && o ? o.p(a, p) : (o.d(1), o = i(a), o && (o.c(), o.m(t, null)));
765
- },
766
- i: ke,
767
- o: ke,
768
- d(a) {
769
- a && O(t), o.d(), n[44](null);
770
- }
771
- };
772
- }
773
- function Pt(n, t, e) {
774
- let i, o, a;
775
- ct(n, mt, (l) => e(19, a = l));
776
- let { clientstyling: p = "" } = t, { clientstylingurl: s = "" } = t, { mbsource: c } = t, { lang: f = "en" } = t, { endpoint: _ } = t, { session: w } = t, { translationurl: T } = t, { templateid: M } = t, b = [], m = !0, y = null, C = 0, R = "", K = "", W = !1, V = !1, I = "", ne = "", q = "", Z = !1, re = !1, $ = !1, E = "", z = {}, F = null, se = !1, ae = !1, ce = "", U, he, X = [], H = null, Y = 0, pe = !1, ue = !1;
777
- const de = { SMS: "sms", EMAIL: "email" }, ee = {
778
- MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
779
- INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
780
- MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
781
- };
782
- Object.keys(Ie).forEach((l) => {
783
- Re(l, Ie[l]);
784
- });
785
- const G = () => {
786
- wt(f);
787
- }, N = () => {
788
- fetch(T).then((l) => l.json()).then((l) => {
789
- Object.keys(l).forEach((h) => {
790
- Re(h, l[h]);
791
- });
792
- }).catch((l) => {
793
- console.log(l);
794
- });
795
- }, ge = (l) => me(this, null, function* () {
796
- var h;
797
- if ((h = l.detail) != null && h["x-step-up-required"]) {
798
- if (e(7, V = !1), e(6, W = !1), e(8, I = ""), ne = l.detail["x-step-up-token"], q = l.detail.flow, !ne || !q) {
799
- e(3, m = !1), e(7, V = !0), e(8, I = a("configError"));
800
- return;
801
- }
802
- e(12, se = !1), e(3, m = !1);
803
- }
804
- }), ie = () => {
805
- H && (clearInterval(H), H = null), F && (clearInterval(F), F = null), e(6, W = !1), e(7, V = !1), e(8, I = ""), e(10, re = !1), e(2, b = []), e(4, y = null), e(3, m = !0), e(0, E = ""), e(12, se = !1), e(38, z = {});
806
- }, j = () => {
807
- ie();
808
- }, be = () => new Promise((l, h) => {
809
- const g = new URL(`${_}/api/pam/v1/mfa/challenge/${ne}`), A = new Headers();
810
- A.append("accept", "application/json"), A.append("Content-Type", "application/json"), A.append("X-SessionId", `${w}`), e(16, ue = !0);
811
- const fe = {
812
- method: "PATCH",
813
- headers: A,
814
- body: JSON.stringify({
815
- channel: E,
816
- templateId: M
817
- })
818
- };
819
- fetch(g, fe).then((Se) => Se.json()).then(() => {
820
- e(15, pe = !1), k(), we(), l();
821
- }).catch((Se) => {
822
- h();
823
- });
824
- }), oe = () => {
825
- F && clearInterval(F), F = setInterval(
826
- () => {
827
- const l = ve({}, z);
828
- let h = !1;
829
- Object.keys(l).forEach((g) => {
830
- l[g] > 0 && (l[g]--, h = !0);
831
- }), e(38, z = l), !h && F && (clearInterval(F), F = null);
832
- },
833
- 1e3
834
- );
835
- }, P = (l) => {
836
- e(0, E = l);
837
- }, u = () => me(this, null, function* () {
838
- if (!(!E || z[E] && z[E] > 0)) {
839
- e(3, m = !0), M && M.startsWith("2fa-") && e(30, M = `2fa-${E}`);
840
- try {
841
- yield be(), yield ye(), e(38, z = Le(ve({}, z), {
842
- [E]: 30
843
- })), oe(), e(12, se = !0), k(), we();
844
- } catch (l) {
845
- console.error("Error submitting channel:", l), e(6, W = !0), e(8, I = a("submissionError"));
846
- } finally {
847
- e(3, m = !1);
848
- }
849
- }
850
- }), k = () => {
851
- const l = new Date(R), h = new Date(K), g = /* @__PURE__ */ new Date(), A = h.getTime() - g.getTime();
852
- Y = l.getTime() - A;
853
- const B = Date.now(), fe = Math.max(0, Math.floor((Y - B) / 1e3));
854
- e(5, C = fe);
855
- }, we = () => {
856
- H && clearInterval(H), H = setInterval(
857
- () => {
858
- const l = Date.now(), h = Math.max(0, Math.floor((Y - l) / 1e3));
859
- e(5, C = h), e(11, $ = h <= 0), h <= 0 && (clearInterval(H), H = null, e(9, Z = !0), e(6, W = !1), e(10, re = !1));
860
- },
861
- 1e3
862
- );
863
- }, Ve = (l) => {
864
- const h = Math.floor(l / 60), g = l % 60;
865
- return `${h.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`;
866
- }, _e = (l, h) => {
867
- const g = [...b];
868
- g[l] = h.toUpperCase(), e(2, b = g), g.join("") !== ce && e(13, ae = !1);
869
- }, He = (l) => {
870
- var A, B, fe;
871
- l.preventDefault();
872
- const g = (((B = (A = l.clipboardData) == null ? void 0 : A.getData("text")) == null ? void 0 : B.trim()) || "").slice(0, y.inputLength).split("");
873
- e(2, b = [...g, ...Array(y.inputLength - g.length).fill("")]), (fe = X[g.length]) == null || fe.focus(), g.length === y.inputLength && Oe();
874
- }, Ce = (l, h) => {
875
- const g = l.target, A = g.value;
876
- if (/^[a-z0-9]$/i.test(A)) {
877
- _e(h, A);
878
- const B = X[h + 1];
879
- B == null || B.focus();
880
- }
881
- g.value = "";
882
- }, Ee = (l, h) => {
883
- const g = l.key, A = l.ctrlKey || l.metaKey;
884
- if (/^[a-z0-9]$/i.test(g)) {
885
- if (A && g.toLowerCase() === "v")
886
- return;
887
- l.preventDefault(), _e(h, g);
888
- const B = X[h + 1];
889
- B == null || B.focus();
890
- } else if (g === "Backspace") {
891
- l.preventDefault(), b[h] !== "" && _e(h, "");
892
- const B = X[h - 1];
893
- B == null || B.focus();
894
- }
895
- }, Ne = () => {
896
- q == "stateful" && (be(), e(9, Z = !1));
897
- const l = new CustomEvent("otpResendRequested");
898
- window.dispatchEvent(l);
899
- }, Fe = (l) => {
900
- window.dispatchEvent(new CustomEvent(
901
- "otpSubmitted",
902
- {
903
- detail: {
904
- code: l,
905
- maxAttempts: y.maxValidationAttempts,
906
- validatedAttempts: y.numberOfValidateAttempts
907
- }
908
- }
909
- ));
910
- }, We = (l) => me(this, null, function* () {
911
- const h = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/validate`, _);
912
- h.searchParams.append("input", l);
913
- try {
914
- const g = yield fetch(h.href, { method: "POST" });
915
- if (g.status === 200) {
916
- qe();
917
- return;
918
- }
919
- const A = yield g.json();
920
- throw new Error(A.message);
921
- } catch (g) {
922
- if (yield ye(), g.message === ee.INTERNAL_SERVER_ERROR) {
923
- if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
924
- window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
925
- {
926
- type: "WidgetNotification",
927
- data: {
928
- type: "error",
929
- message: a("accountBlocked")
930
- }
931
- },
932
- window.location.href
933
- ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
934
- return;
935
- }
936
- e(6, W = !0), e(8, I = a("invalidOtp")), ye();
937
- return;
938
- }
939
- g.message === ee.MAX_INVALIDATE && (e(6, W = !0), e(8, I = a("invalidOtp"))), g.details === ee.MAX_ATTEMPTS_EXCEEDED && e(15, pe = !0), console.error("OTP submission failed:", g), e(6, W = !0), e(8, I = a("submissionError"));
940
- } finally {
941
- e(3, m = !1);
942
- }
943
- }), qe = () => {
944
- window.dispatchEvent(new CustomEvent(
945
- "otpSuccess",
946
- {
947
- detail: {
948
- message: "User successfully authenticated"
949
- }
950
- }
951
- ));
952
- }, Ue = () => {
953
- window.dispatchEvent(new CustomEvent("manualClosePopup"));
954
- }, Oe = () => me(this, null, function* () {
955
- if (b.join("").length !== y.inputLength) {
956
- e(6, W = !0), e(8, I = a("invalidOtp"));
957
- return;
958
- }
959
- const l = b.join("");
960
- e(13, ae = !0), ce = l, e(3, m = !0), e(6, W = !1), e(8, I = ""), q === "stateless" && Fe(l), q === "stateful" && (yield We(l));
961
- }), ye = () => me(this, null, function* () {
962
- if (_)
963
- try {
964
- e(3, m = !0);
965
- const l = new URL(`/api/nwa/api/v1/mfa/challenge/${ne}/config`, _), h = yield fetch(l.href), g = yield h.json();
966
- if (h.ok)
967
- e(4, y = g), e(2, b = Array(y.inputLength).fill("")), e(9, Z = !1), R = y.expirationTime, K = y.serverTime, y.numberOfValidateAttempts !== 0 && (e(6, W = !0), e(8, I = a("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && e(10, re = !0), e(3, m = !1), k(), we(), e(16, ue = !1);
968
- else if (g && g.details === ee.MAX_ATTEMPTS_EXCEEDED)
969
- window.dispatchEvent(new CustomEvent("manualClosePopup"));
970
- else {
971
- const A = g && g.message || `Failed to load config. Status: ${h.status}`;
972
- throw new Error(A);
973
- }
974
- } catch (l) {
975
- e(3, m = !1), e(7, V = !0), e(8, I = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", l);
976
- }
977
- });
978
- pt(() => (window.addEventListener("stepUpAuthRequired", ge, !1), window.addEventListener("closePopup", j, !1), () => {
979
- window.removeEventListener("stepUpAuthRequired", ge), window.removeEventListener("closePopup", j, !1), H && clearInterval(H), F && clearInterval(F);
980
- }));
981
- const Xe = () => P(de.SMS), Ke = () => P(de.EMAIL);
982
- function Ge(l, h) {
983
- ze[l ? "unshift" : "push"](() => {
984
- X[h] = l, e(14, X);
985
- });
986
- }
987
- const Ye = (l, h) => Ce(h, l), Je = (l, h) => Ee(h, l);
988
- function Qe(l) {
989
- ze[l ? "unshift" : "push"](() => {
990
- U = l, e(1, U);
991
- });
992
- }
993
- return n.$$set = (l) => {
994
- "clientstyling" in l && e(31, p = l.clientstyling), "clientstylingurl" in l && e(32, s = l.clientstylingurl), "mbsource" in l && e(33, c = l.mbsource), "lang" in l && e(34, f = l.lang), "endpoint" in l && e(35, _ = l.endpoint), "session" in l && e(36, w = l.session), "translationurl" in l && e(37, T = l.translationurl), "templateid" in l && e(30, M = l.templateid);
995
- }, n.$$.update = () => {
996
- n.$$.dirty[0] & /*customStylingContainer*/
997
- 2 | n.$$.dirty[1] & /*clientstyling*/
998
- 1 && p && U && ht(U, p), n.$$.dirty[0] & /*customStylingContainer*/
999
- 2 | n.$$.dirty[1] & /*clientstylingurl*/
1000
- 2 && s && U && gt(U, s), n.$$.dirty[0] & /*customStylingContainer*/
1001
- 2 | n.$$.dirty[1] & /*mbsource*/
1002
- 4 && c && U && bt(U, `${c}.Style`, he), n.$$.dirty[1] & /*lang*/
1003
- 8 && f && G(), n.$$.dirty[1] & /*lang, translationurl*/
1004
- 72 && f && T && N(), n.$$.dirty[0] & /*selectedChannel*/
1005
- 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
1006
- 128 && e(18, i = E && (!z[E] || z[E] === 0)), n.$$.dirty[0] & /*selectedChannel*/
1007
- 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
1008
- 128 && e(17, o = E && z[E] || 0);
1009
- }, [
1010
- E,
1011
- U,
1012
- b,
1013
- m,
1014
- y,
1015
- C,
1016
- W,
1017
- V,
1018
- I,
1019
- Z,
1020
- re,
1021
- $,
1022
- se,
1023
- ae,
1024
- X,
1025
- pe,
1026
- ue,
1027
- o,
1028
- i,
1029
- a,
1030
- de,
1031
- P,
1032
- u,
1033
- Ve,
1034
- He,
1035
- Ce,
1036
- Ee,
1037
- Ne,
1038
- Ue,
1039
- Oe,
1040
- M,
1041
- p,
1042
- s,
1043
- c,
1044
- f,
1045
- _,
1046
- w,
1047
- T,
1048
- z,
1049
- Xe,
1050
- Ke,
1051
- Ge,
1052
- Ye,
1053
- Je,
1054
- Qe
1055
- ];
1056
- }
1057
- class xt extends lt {
1058
- constructor(t) {
1059
- super(), rt(
1060
- this,
1061
- t,
1062
- Pt,
1063
- It,
1064
- st,
1065
- {
1066
- clientstyling: 31,
1067
- clientstylingurl: 32,
1068
- mbsource: 33,
1069
- lang: 34,
1070
- endpoint: 35,
1071
- session: 36,
1072
- translationurl: 37,
1073
- templateid: 30
1074
- },
1075
- _t,
1076
- [-1, -1, -1]
1077
- );
1078
- }
1079
- get clientstyling() {
1080
- return this.$$.ctx[31];
1081
- }
1082
- set clientstyling(t) {
1083
- this.$$set({ clientstyling: t }), le();
1084
- }
1085
- get clientstylingurl() {
1086
- return this.$$.ctx[32];
1087
- }
1088
- set clientstylingurl(t) {
1089
- this.$$set({ clientstylingurl: t }), le();
1090
- }
1091
- get mbsource() {
1092
- return this.$$.ctx[33];
1093
- }
1094
- set mbsource(t) {
1095
- this.$$set({ mbsource: t }), le();
1096
- }
1097
- get lang() {
1098
- return this.$$.ctx[34];
1099
- }
1100
- set lang(t) {
1101
- this.$$set({ lang: t }), le();
1102
- }
1103
- get endpoint() {
1104
- return this.$$.ctx[35];
1105
- }
1106
- set endpoint(t) {
1107
- this.$$set({ endpoint: t }), le();
1108
- }
1109
- get session() {
1110
- return this.$$.ctx[36];
1111
- }
1112
- set session(t) {
1113
- this.$$set({ session: t }), le();
1114
- }
1115
- get translationurl() {
1116
- return this.$$.ctx[37];
1117
- }
1118
- set translationurl(t) {
1119
- this.$$set({ translationurl: t }), le();
1120
- }
1121
- get templateid() {
1122
- return this.$$.ctx[30];
1123
- }
1124
- set templateid(t) {
1125
- this.$$set({ templateid: t }), le();
1126
- }
1127
- }
1128
- ft(xt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1129
- export {
1130
- xt as default
1131
- };