@everymatrix/cashier-page 1.86.0 → 1.86.2

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 (36) hide show
  1. package/components/{CashierError-BwZRYX5r.js → CashierError-7qg__v0Z.js} +206 -229
  2. package/components/{CashierError-DFQyDQHn.cjs → CashierError-BorUJmCn.cjs} +1 -1
  3. package/components/{CashierError-kVdNczE9.js → CashierError-DZSJKCbW.js} +206 -229
  4. package/components/{CashierMethodDetails--Ebwn4lg.js → CashierMethodDetails-Bxh5WhVb.js} +2225 -2204
  5. package/components/{CashierMethodDetails-E1XQT_gz.js → CashierMethodDetails-BzVSr2on.js} +2349 -2328
  6. package/components/CashierMethodDetails-C1kjc4-Q.cjs +85 -0
  7. package/components/{CashierMethodsList-ByGJLq8_.js → CashierMethodsList-CBnuQYXc.js} +1 -1
  8. package/components/{CashierMethodsList-D5p1ksRs.js → CashierMethodsList-CLQK5Xcn.js} +1 -1
  9. package/components/{CashierMethodsList-BCfPOiPQ.cjs → CashierMethodsList-D9ypDDJW.cjs} +1 -1
  10. package/components/{CashierPage-BOXcdzek.js → CashierPage-BREFnfc1.js} +874 -812
  11. package/components/CashierPage-DcE7E_Wf.cjs +1 -0
  12. package/components/{CashierPage-DSBg3R7m.js → CashierPage-y5YsPxSa.js} +976 -914
  13. package/components/{CashierReceiptPage-DLHbUzv0.js → CashierReceiptPage-BbHKdDra.js} +1 -1
  14. package/components/{CashierReceiptPage-DWJG1k-S.js → CashierReceiptPage-CNwhHWwV.js} +1 -1
  15. package/components/{CashierReceiptPage-DW63yTeU.cjs → CashierReceiptPage-DGAjOoFe.cjs} +1 -1
  16. package/components/{CashierSessionExpirationModal-Di0jBCa7.cjs → CashierSessionExpirationModal-33ygvBxj.cjs} +1 -1
  17. package/components/{CashierSessionExpirationModal-CeesVv0R.js → CashierSessionExpirationModal-BQujD7Vd.js} +2 -2
  18. package/components/{CashierSessionExpirationModal-Dk8_yCxM.js → CashierSessionExpirationModal-D6h6euRq.js} +2 -2
  19. package/components/CashierStepUp-B9H7E8wY.cjs +1 -0
  20. package/components/CashierStepUp-DEb05cBS.js +1068 -0
  21. package/components/CashierStepUp-DnvNxlcq.js +1107 -0
  22. package/components/{CashierTransactionHistory-DAieZJ7I.js → CashierTransactionHistory-ButX2_sB.js} +2 -2
  23. package/components/{CashierTransactionHistory-DZS6p6Wq.js → CashierTransactionHistory-CX3RviXD.js} +2 -2
  24. package/components/{CashierTransactionHistory-dL_Zbx6y.cjs → CashierTransactionHistory-D8cuhIj_.cjs} +1 -1
  25. package/components/{CashierVerifications-B6QC6J6G.js → CashierVerifications-CPUhZGV4.js} +1 -1
  26. package/components/{CashierVerifications-BhbImoKx.cjs → CashierVerifications-DPeQTcCN.cjs} +1 -1
  27. package/components/{CashierVerifications-63wvOw6D.js → CashierVerifications-DVccv6qc.js} +1 -1
  28. package/es2015/cashier-page.cjs +1 -1
  29. package/es2015/cashier-page.js +7 -7
  30. package/esnext/cashier-page.js +1 -1
  31. package/package.json +1 -1
  32. package/components/CashierMethodDetails-D3OcsUSC.cjs +0 -85
  33. package/components/CashierPage-DSwyNlUe.cjs +0 -1
  34. package/components/CashierStepUp-BA2IK4WI.js +0 -1070
  35. package/components/CashierStepUp-CSkfphtu.js +0 -1109
  36. package/components/CashierStepUp-pkLhK-RI.cjs +0 -1
@@ -0,0 +1,1068 @@
1
+ import { a as Xe, $ as Ke, S as Ge, b as Ye, s as Je, f as oe, c as Qe, G as _e, e as O, k as S, m as k, o as r, p as Ze, q as $e, y as Ee, v as z, l as f, x as ne, W as J, n as R, w as L, _ as xe, V as Q, r as et, X as Oe, a3 as tt, B as nt, C as lt, D as ot, E as it, F as rt } from "./CashierCarousel-BNKjZ4dF.js";
2
+ function Se(n, t) {
3
+ Xe(n, t);
4
+ }
5
+ function st(n) {
6
+ Ke.set(n);
7
+ }
8
+ const Me = {
9
+ en: {
10
+ otpTitle: "Code verification is required",
11
+ popupMessage: "Please enter the security code received on your SMS/email address to perform the update.",
12
+ popupMessageLastWarning: "If the next validation attempt is failed, you will be logged out and blocked temporarily.",
13
+ minutes: "minutes",
14
+ errorHeader: "Error",
15
+ configError: "Unable to load OTP data. Please try again later.",
16
+ otpHeading: "Enter OTP",
17
+ resendOtp: "Resent OTP",
18
+ submit: "Submit",
19
+ close: "Close",
20
+ invalidOtp: "The code you've sent is not valid. Please try again.",
21
+ accountBlocked: "Too many attempts for OTP. Your account has been blocked for one hour.",
22
+ submissionError: "Something went wrong. Please try again.",
23
+ otpExpiredMessage: "Validation code has expired, please request a new one to continue.",
24
+ timeRemaining: "Code expires in:",
25
+ selectChannelTitle: "Select verification method",
26
+ selectChannelMessage: "Choose how you would like to receive your verification code",
27
+ channelSMS: "SMS",
28
+ channelEmail: "Email",
29
+ sendCode: "Send code",
30
+ waitSeconds: "Please wait for before resending:"
31
+ },
32
+ tr: {
33
+ otpTitle: "Kod doğrulaması gereklidir",
34
+ popupMessage: "Güncellemeyi gerçekleştirmek için SMS/e-posta adresinize gönderilen güvenlik kodunu girin.",
35
+ popupMessageLastWarning: "Bir sonraki doğrulama denemesi başarısız olursa, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",
36
+ minutes: "dakika",
37
+ errorHeader: "Hata",
38
+ configError: "OTP verileri yüklenemedi. Lütfen daha sonra tekrar deneyin.",
39
+ otpHeading: "OTP Girin",
40
+ resendOtp: "OTP'yi Yeniden Gönder",
41
+ submit: "Gönder",
42
+ close: "Kapat",
43
+ invalidOtp: "Gönderdiğiniz kod geçerli değil. Lütfen tekrar deneyin.",
44
+ accountBlocked: "OTP için çok fazla deneme yapıldı. Hesabınız bir saat süreyle engellenmiştir.",
45
+ submissionError: "Bir şeyler ters gitti. Lütfen tekrar deneyin.",
46
+ otpExpiredMessage: "Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir kod isteyin.",
47
+ timeRemaining: "Kodun süresi doluyor:",
48
+ selectChannelTitle: "Select verification method",
49
+ selectChannelMessage: "Choose how you would like to receive your verification code",
50
+ channelSMS: "SMS kodu",
51
+ channelEmail: "E-posta kodu",
52
+ sendCode: "Kodu gönder",
53
+ waitSeconds: "Tekrar göndermeden önce lütfen bekleyin:"
54
+ }
55
+ };
56
+ function at(n) {
57
+ Qe(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}}');
58
+ }
59
+ function Te(n, t, e) {
60
+ const l = n.slice();
61
+ return l[69] = t[e], l[70] = t, l[71] = e, l;
62
+ }
63
+ function ct(n) {
64
+ let t, e, l, o, a, p, s, u, d, _, b, T, M, w, m, y, C, I = (
65
+ /*$_*/
66
+ n[19]("channelSMS") + ""
67
+ ), q, W, j, x, le, F, Z, ie, $, E, A, V, re, se, ae = (
68
+ /*$_*/
69
+ n[19]("channelEmail") + ""
70
+ ), U, K, B, ee, G, ce, ue;
71
+ function pe(c, v) {
72
+ return (
73
+ /*showResendOtp*/
74
+ c[9] ? dt : (
75
+ /*showOtpInput*/
76
+ c[12] ? ut : ft
77
+ )
78
+ );
79
+ }
80
+ let fe = pe(n), X = fe(n), P = (
81
+ /*selectedChannel*/
82
+ n[0] && Ae(n)
83
+ );
84
+ function me(c, v) {
85
+ if (
86
+ /*isLoading*/
87
+ c[3] && /*showOtpInput*/
88
+ c[12]
89
+ )
90
+ return _t;
91
+ if (
92
+ /*showOtpInput*/
93
+ c[12] && /*config*/
94
+ c[4]
95
+ )
96
+ return bt;
97
+ }
98
+ let te = me(n), D = te && te(n);
99
+ function he(c, v) {
100
+ if (
101
+ /*showResendOtp*/
102
+ c[9]
103
+ )
104
+ return kt;
105
+ if (
106
+ /*showOtpInput*/
107
+ c[12] && /*config*/
108
+ c[4]
109
+ )
110
+ return yt;
111
+ }
112
+ let Y = he(n), H = Y && Y(n);
113
+ return {
114
+ c() {
115
+ t = k("div"), X.c(), e = R(), l = k("div"), o = k("label"), a = k("div"), p = R(), s = k("input"), d = R(), _ = k("div"), b = J("svg"), T = J("path"), M = J("circle"), w = J("circle"), m = J("circle"), y = R(), C = k("span"), q = L(I), W = R(), j = k("label"), x = k("div"), le = R(), F = k("input"), ie = R(), $ = k("div"), E = J("svg"), A = J("rect"), V = J("path"), re = R(), se = k("span"), U = L(ae), K = R(), P && P.c(), B = R(), D && D.c(), ee = R(), G = k("div"), H && H.c(), r(t, "class", "OtpDescription"), r(a, "class", "RadioIndicator"), Q(
116
+ a,
117
+ "checked",
118
+ /*selectedChannel*/
119
+ n[0] === /*channels*/
120
+ n[20].SMS
121
+ ), r(s, "type", "radio"), r(s, "name", "channel"), s.value = /*channels*/
122
+ n[20].SMS, s.checked = u = /*selectedChannel*/
123
+ n[0] === /*channels*/
124
+ 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(w, "cx", "12"), r(w, "cy", "11"), r(w, "r", "0.5"), r(w, "fill", "currentColor"), r(m, "cx", "15"), r(m, "cy", "11"), r(m, "r", "0.5"), r(m, "fill", "currentColor"), r(b, "xmlns", "http://www.w3.org/2000/svg"), r(b, "width", "24"), r(b, "height", "24"), r(b, "viewBox", "0 0 24 24"), r(b, "fill", "none"), r(b, "stroke", "currentColor"), r(b, "stroke-width", "2"), r(b, "stroke-linecap", "round"), r(b, "stroke-linejoin", "round"), r(_, "class", "ChannelContent"), r(o, "class", "ChannelCheckbox"), Q(
125
+ o,
126
+ "selected",
127
+ /*selectedChannel*/
128
+ n[0] === /*channels*/
129
+ n[20].SMS
130
+ ), r(x, "class", "RadioIndicator"), Q(
131
+ x,
132
+ "checked",
133
+ /*selectedChannel*/
134
+ n[0] === /*channels*/
135
+ n[20].EMAIL
136
+ ), r(F, "type", "radio"), r(F, "name", "channel"), F.value = /*channels*/
137
+ n[20].EMAIL, F.checked = Z = /*selectedChannel*/
138
+ n[0] === /*channels*/
139
+ n[20].EMAIL, r(A, "x", "2"), r(A, "y", "4"), r(A, "width", "20"), r(A, "height", "16"), r(A, "rx", "2"), r(V, "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(j, "class", "ChannelCheckbox"), Q(
140
+ j,
141
+ "selected",
142
+ /*selectedChannel*/
143
+ n[0] === /*channels*/
144
+ n[20].EMAIL
145
+ ), r(l, "class", "ChannelSelection"), r(G, "class", "OtpActionButtons");
146
+ },
147
+ m(c, v) {
148
+ S(c, t, v), X.m(t, null), S(c, e, v), S(c, l, v), f(l, o), f(o, a), f(o, p), f(o, s), f(o, d), f(o, _), f(_, b), f(b, T), f(b, M), f(b, w), f(b, m), f(_, y), f(_, C), f(C, q), f(l, W), f(l, j), f(j, x), f(j, le), f(j, F), f(j, ie), f(j, $), f($, E), f(E, A), f(E, V), f($, re), f($, se), f(se, U), S(c, K, v), P && P.m(c, v), S(c, B, v), D && D.m(c, v), S(c, ee, v), S(c, G, v), H && H.m(G, null), ce || (ue = [
149
+ ne(
150
+ s,
151
+ "change",
152
+ /*change_handler*/
153
+ n[39]
154
+ ),
155
+ ne(
156
+ F,
157
+ "change",
158
+ /*change_handler_1*/
159
+ n[40]
160
+ )
161
+ ], ce = !0);
162
+ },
163
+ p(c, v) {
164
+ fe === (fe = pe(c)) && X ? X.p(c, v) : (X.d(1), X = fe(c), X && (X.c(), X.m(t, null))), v[0] & /*selectedChannel, channels*/
165
+ 1048577 && Q(
166
+ a,
167
+ "checked",
168
+ /*selectedChannel*/
169
+ c[0] === /*channels*/
170
+ c[20].SMS
171
+ ), v[0] & /*selectedChannel*/
172
+ 1 && u !== (u = /*selectedChannel*/
173
+ c[0] === /*channels*/
174
+ c[20].SMS) && (s.checked = u), v[0] & /*$_*/
175
+ 524288 && I !== (I = /*$_*/
176
+ c[19]("channelSMS") + "") && z(q, I), v[0] & /*selectedChannel, channels*/
177
+ 1048577 && Q(
178
+ o,
179
+ "selected",
180
+ /*selectedChannel*/
181
+ c[0] === /*channels*/
182
+ c[20].SMS
183
+ ), v[0] & /*selectedChannel, channels*/
184
+ 1048577 && Q(
185
+ x,
186
+ "checked",
187
+ /*selectedChannel*/
188
+ c[0] === /*channels*/
189
+ c[20].EMAIL
190
+ ), v[0] & /*selectedChannel*/
191
+ 1 && Z !== (Z = /*selectedChannel*/
192
+ c[0] === /*channels*/
193
+ c[20].EMAIL) && (F.checked = Z), v[0] & /*$_*/
194
+ 524288 && ae !== (ae = /*$_*/
195
+ c[19]("channelEmail") + "") && z(U, ae), v[0] & /*selectedChannel, channels*/
196
+ 1048577 && Q(
197
+ j,
198
+ "selected",
199
+ /*selectedChannel*/
200
+ c[0] === /*channels*/
201
+ c[20].EMAIL
202
+ ), /*selectedChannel*/
203
+ c[0] ? P ? P.p(c, v) : (P = Ae(c), P.c(), P.m(B.parentNode, B)) : P && (P.d(1), P = null), te === (te = me(c)) && D ? D.p(c, v) : (D && D.d(1), D = te && te(c), D && (D.c(), D.m(ee.parentNode, ee))), Y === (Y = he(c)) && H ? H.p(c, v) : (H && H.d(1), H = Y && Y(c), H && (H.c(), H.m(G, null)));
204
+ },
205
+ d(c) {
206
+ c && (O(t), O(e), O(l), O(K), O(B), O(ee), O(G)), X.d(), P && P.d(c), D && D.d(c), H && H.d(), ce = !1, xe(ue);
207
+ }
208
+ };
209
+ }
210
+ function pt(n) {
211
+ let t, e, l, o, a, p, s = (
212
+ /*$_*/
213
+ n[19]("errorHeader") + ""
214
+ ), u, d, _, b, T, M, w = (
215
+ /*$_*/
216
+ n[19]("close") + ""
217
+ ), m, y, C;
218
+ return {
219
+ c() {
220
+ t = k("div"), e = k("div"), l = J("svg"), o = J("path"), a = R(), p = k("h2"), u = L(s), d = R(), _ = k("p"), b = L(
221
+ /*errorMessage*/
222
+ n[8]
223
+ ), T = R(), M = k("button"), m = L(w), 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(l, "xmlns", "http://www.w3.org/2000/svg"), r(l, "viewBox", "0 0 512 512"), r(e, "class", "OtpErrorHeader"), r(M, "class", "OtpButton error"), r(t, "class", "OtpError");
224
+ },
225
+ m(I, q) {
226
+ S(I, t, q), f(t, e), f(e, l), f(l, o), f(e, a), f(e, p), f(p, u), f(t, d), f(t, _), f(_, b), f(t, T), f(t, M), f(M, m), y || (C = ne(
227
+ M,
228
+ "click",
229
+ /*manualClosePopup*/
230
+ n[28]
231
+ ), y = !0);
232
+ },
233
+ p(I, q) {
234
+ q[0] & /*$_*/
235
+ 524288 && s !== (s = /*$_*/
236
+ I[19]("errorHeader") + "") && z(u, s), q[0] & /*errorMessage*/
237
+ 256 && z(
238
+ b,
239
+ /*errorMessage*/
240
+ I[8]
241
+ ), q[0] & /*$_*/
242
+ 524288 && w !== (w = /*$_*/
243
+ I[19]("close") + "") && z(m, w);
244
+ },
245
+ d(I) {
246
+ I && O(t), y = !1, C();
247
+ }
248
+ };
249
+ }
250
+ function ut(n) {
251
+ let t, e, l, o;
252
+ function a(d, _) {
253
+ return (
254
+ /*isLastWarning*/
255
+ d[10] ? ht : mt
256
+ );
257
+ }
258
+ let p = a(n), s = p(n), u = (
259
+ /*hasErrors*/
260
+ n[6] && Le(n)
261
+ );
262
+ return {
263
+ c() {
264
+ t = k("p"), s.c(), l = R(), u && u.c(), o = et(), r(t, "class", e = /*isLastWarning*/
265
+ n[10] ? "LastWarningMessage" : "");
266
+ },
267
+ m(d, _) {
268
+ S(d, t, _), s.m(t, null), S(d, l, _), u && u.m(d, _), S(d, o, _);
269
+ },
270
+ p(d, _) {
271
+ p === (p = a(d)) && s ? s.p(d, _) : (s.d(1), s = p(d), s && (s.c(), s.m(t, null))), _[0] & /*isLastWarning*/
272
+ 1024 && e !== (e = /*isLastWarning*/
273
+ d[10] ? "LastWarningMessage" : "") && r(t, "class", e), /*hasErrors*/
274
+ d[6] ? u ? u.p(d, _) : (u = Le(d), u.c(), u.m(o.parentNode, o)) : u && (u.d(1), u = null);
275
+ },
276
+ d(d) {
277
+ d && (O(t), O(l), O(o)), s.d(), u && u.d(d);
278
+ }
279
+ };
280
+ }
281
+ function ft(n) {
282
+ let t, e = (
283
+ /*$_*/
284
+ (n[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
285
+ ), l;
286
+ return {
287
+ c() {
288
+ t = k("p"), l = L(e);
289
+ },
290
+ m(o, a) {
291
+ S(o, t, a), f(t, l);
292
+ },
293
+ p(o, a) {
294
+ a[0] & /*$_*/
295
+ 524288 && e !== (e = /*$_*/
296
+ (o[19]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && z(l, e);
297
+ },
298
+ d(o) {
299
+ o && O(t);
300
+ }
301
+ };
302
+ }
303
+ function dt(n) {
304
+ let t, e = (
305
+ /*$_*/
306
+ n[19]("otpExpiredMessage") + ""
307
+ ), l;
308
+ return {
309
+ c() {
310
+ t = k("p"), l = L(e), r(t, "class", "OtpNoticeMessage"), r(t, "role", "alert");
311
+ },
312
+ m(o, a) {
313
+ S(o, t, a), f(t, l);
314
+ },
315
+ p(o, a) {
316
+ a[0] & /*$_*/
317
+ 524288 && e !== (e = /*$_*/
318
+ o[19]("otpExpiredMessage") + "") && z(l, e);
319
+ },
320
+ d(o) {
321
+ o && O(t);
322
+ }
323
+ };
324
+ }
325
+ function mt(n) {
326
+ let t = (
327
+ /*$_*/
328
+ n[19]("popupMessage") + ""
329
+ ), e;
330
+ return {
331
+ c() {
332
+ e = L(t);
333
+ },
334
+ m(l, o) {
335
+ S(l, e, o);
336
+ },
337
+ p(l, o) {
338
+ o[0] & /*$_*/
339
+ 524288 && t !== (t = /*$_*/
340
+ l[19]("popupMessage") + "") && z(e, t);
341
+ },
342
+ d(l) {
343
+ l && O(e);
344
+ }
345
+ };
346
+ }
347
+ function ht(n) {
348
+ let t = (
349
+ /*$_*/
350
+ n[19]("popupMessageLastWarning") + ""
351
+ ), e;
352
+ return {
353
+ c() {
354
+ e = L(t);
355
+ },
356
+ m(l, o) {
357
+ S(l, e, o);
358
+ },
359
+ p(l, o) {
360
+ o[0] & /*$_*/
361
+ 524288 && t !== (t = /*$_*/
362
+ l[19]("popupMessageLastWarning") + "") && z(e, t);
363
+ },
364
+ d(l) {
365
+ l && O(e);
366
+ }
367
+ };
368
+ }
369
+ function Le(n) {
370
+ let t, e;
371
+ return {
372
+ c() {
373
+ t = k("p"), e = L(
374
+ /*errorMessage*/
375
+ n[8]
376
+ ), r(t, "class", "OtpErrorMessage"), r(t, "role", "alert");
377
+ },
378
+ m(l, o) {
379
+ S(l, t, o), f(t, e);
380
+ },
381
+ p(l, o) {
382
+ o[0] & /*errorMessage*/
383
+ 256 && z(
384
+ e,
385
+ /*errorMessage*/
386
+ l[8]
387
+ );
388
+ },
389
+ d(l) {
390
+ l && O(t);
391
+ }
392
+ };
393
+ }
394
+ function Ae(n) {
395
+ let t, e, l, o;
396
+ function a(u, d) {
397
+ return (
398
+ /*currentChannelTimer*/
399
+ u[17] > 0 ? wt : gt
400
+ );
401
+ }
402
+ let p = a(n), s = p(n);
403
+ return {
404
+ c() {
405
+ t = k("button"), s.c(), r(t, "class", "OtpButton"), t.disabled = e = !/*canSubmitChannel*/
406
+ n[18], Q(t, "disabled", !/*canSubmitChannel*/
407
+ n[18] || /*waitingForConfig*/
408
+ n[16]);
409
+ },
410
+ m(u, d) {
411
+ S(u, t, d), s.m(t, null), l || (o = ne(
412
+ t,
413
+ "click",
414
+ /*handleChannelSubmit*/
415
+ n[22]
416
+ ), l = !0);
417
+ },
418
+ p(u, d) {
419
+ p === (p = a(u)) && s ? s.p(u, d) : (s.d(1), s = p(u), s && (s.c(), s.m(t, null))), d[0] & /*canSubmitChannel*/
420
+ 262144 && e !== (e = !/*canSubmitChannel*/
421
+ u[18]) && (t.disabled = e), d[0] & /*canSubmitChannel, waitingForConfig*/
422
+ 327680 && Q(t, "disabled", !/*canSubmitChannel*/
423
+ u[18] || /*waitingForConfig*/
424
+ u[16]);
425
+ },
426
+ d(u) {
427
+ u && O(t), s.d(), l = !1, o();
428
+ }
429
+ };
430
+ }
431
+ function gt(n) {
432
+ let t = (
433
+ /*$_*/
434
+ n[19]("sendCode") + ""
435
+ ), e;
436
+ return {
437
+ c() {
438
+ e = L(t);
439
+ },
440
+ m(l, o) {
441
+ S(l, e, o);
442
+ },
443
+ p(l, o) {
444
+ o[0] & /*$_*/
445
+ 524288 && t !== (t = /*$_*/
446
+ l[19]("sendCode") + "") && z(e, t);
447
+ },
448
+ d(l) {
449
+ l && O(e);
450
+ }
451
+ };
452
+ }
453
+ function wt(n) {
454
+ let t = (
455
+ /*$_*/
456
+ n[19]("waitSeconds") + ""
457
+ ), e, l, o, a;
458
+ return {
459
+ c() {
460
+ e = L(t), l = L(" ("), o = L(
461
+ /*currentChannelTimer*/
462
+ n[17]
463
+ ), a = L("s)");
464
+ },
465
+ m(p, s) {
466
+ S(p, e, s), S(p, l, s), S(p, o, s), S(p, a, s);
467
+ },
468
+ p(p, s) {
469
+ s[0] & /*$_*/
470
+ 524288 && t !== (t = /*$_*/
471
+ p[19]("waitSeconds") + "") && z(e, t), s[0] & /*currentChannelTimer*/
472
+ 131072 && z(
473
+ o,
474
+ /*currentChannelTimer*/
475
+ p[17]
476
+ );
477
+ },
478
+ d(p) {
479
+ p && (O(e), O(l), O(o), O(a));
480
+ }
481
+ };
482
+ }
483
+ function bt(n) {
484
+ let t, e, l = (
485
+ /*$_*/
486
+ n[19]("timeRemaining") + ""
487
+ ), o, a, p = (
488
+ /*formatTime*/
489
+ n[23](
490
+ /*timeLeft*/
491
+ n[5]
492
+ ) + ""
493
+ ), s, u, d = (
494
+ /*$_*/
495
+ n[19]("minutes") + ""
496
+ ), _, b, T, M = Oe(
497
+ /*otp*/
498
+ n[2]
499
+ ), w = [];
500
+ for (let m = 0; m < M.length; m += 1)
501
+ w[m] = Ie(Te(n, M, m));
502
+ return {
503
+ c() {
504
+ t = k("div"), e = k("div"), o = L(l), a = R(), s = L(p), u = R(), _ = L(d), b = R(), T = k("div");
505
+ for (let m = 0; m < w.length; m += 1)
506
+ w[m].c();
507
+ r(e, "class", "OtpTimer"), r(T, "class", "OtpField"), r(t, "class", "OtpFieldWrapper");
508
+ },
509
+ m(m, y) {
510
+ S(m, t, y), f(t, e), f(e, o), f(e, a), f(e, s), f(e, u), f(e, _), f(t, b), f(t, T);
511
+ for (let C = 0; C < w.length; C += 1)
512
+ w[C] && w[C].m(T, null);
513
+ },
514
+ p(m, y) {
515
+ if (y[0] & /*$_*/
516
+ 524288 && l !== (l = /*$_*/
517
+ m[19]("timeRemaining") + "") && z(o, l), y[0] & /*timeLeft*/
518
+ 32 && p !== (p = /*formatTime*/
519
+ m[23](
520
+ /*timeLeft*/
521
+ m[5]
522
+ ) + "") && z(s, p), y[0] & /*$_*/
523
+ 524288 && d !== (d = /*$_*/
524
+ m[19]("minutes") + "") && z(_, d), y[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
525
+ 117458964) {
526
+ M = Oe(
527
+ /*otp*/
528
+ m[2]
529
+ );
530
+ let C;
531
+ for (C = 0; C < M.length; C += 1) {
532
+ const I = Te(m, M, C);
533
+ w[C] ? w[C].p(I, y) : (w[C] = Ie(I), w[C].c(), w[C].m(T, null));
534
+ }
535
+ for (; C < w.length; C += 1)
536
+ w[C].d(1);
537
+ w.length = M.length;
538
+ }
539
+ },
540
+ d(m) {
541
+ m && O(t), tt(w, m);
542
+ }
543
+ };
544
+ }
545
+ function _t(n) {
546
+ let t;
547
+ return {
548
+ c() {
549
+ t = k("div"), t.innerHTML = '<span class="OtpLoader"></span>', r(t, "class", "OtpLoaderContainer");
550
+ },
551
+ m(e, l) {
552
+ S(e, t, l);
553
+ },
554
+ p: _e,
555
+ d(e) {
556
+ e && O(t);
557
+ }
558
+ };
559
+ }
560
+ function Ie(n) {
561
+ let t, e, l, o = (
562
+ /*index*/
563
+ n[71]
564
+ ), a, p;
565
+ const s = () => (
566
+ /*input_binding*/
567
+ n[41](t, o)
568
+ ), u = () => (
569
+ /*input_binding*/
570
+ n[41](null, o)
571
+ );
572
+ function d(...b) {
573
+ return (
574
+ /*input_handler*/
575
+ n[42](
576
+ /*index*/
577
+ n[71],
578
+ ...b
579
+ )
580
+ );
581
+ }
582
+ function _(...b) {
583
+ return (
584
+ /*keydown_handler*/
585
+ n[43](
586
+ /*index*/
587
+ n[71],
588
+ ...b
589
+ )
590
+ );
591
+ }
592
+ return {
593
+ c() {
594
+ t = k("input"), r(t, "id", `otp-input-${/*index*/
595
+ n[71]}`), r(t, "type", "text"), r(t, "class", e = `otp-box ${/*config*/
596
+ n[4].inputLength % 2 === 0 && /*index*/
597
+ n[71] === /*config*/
598
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), r(t, "maxlength", 1), t.value = l = /*char*/
599
+ n[69], r(t, "inputmode", "numeric"), t.disabled = /*inputDisabled*/
600
+ n[11], r(t, "autocomplete", "off");
601
+ },
602
+ m(b, T) {
603
+ S(b, t, T), s(), a || (p = [
604
+ ne(t, "input", d),
605
+ ne(t, "keydown", _),
606
+ ne(
607
+ t,
608
+ "paste",
609
+ /*handleOnPasteOtp*/
610
+ n[24]
611
+ )
612
+ ], a = !0);
613
+ },
614
+ p(b, T) {
615
+ n = b, T[0] & /*config*/
616
+ 16 && e !== (e = `otp-box ${/*config*/
617
+ n[4].inputLength % 2 === 0 && /*index*/
618
+ n[71] === /*config*/
619
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(t, "class", e), T[0] & /*otp*/
620
+ 4 && l !== (l = /*char*/
621
+ n[69]) && t.value !== l && (t.value = l), T[0] & /*inputDisabled*/
622
+ 2048 && (t.disabled = /*inputDisabled*/
623
+ n[11]), o !== /*index*/
624
+ n[71] && (u(), o = /*index*/
625
+ n[71], s());
626
+ },
627
+ d(b) {
628
+ b && O(t), u(), a = !1, xe(p);
629
+ }
630
+ };
631
+ }
632
+ function yt(n) {
633
+ let t, e = (
634
+ /*$_*/
635
+ n[19]("submit") + ""
636
+ ), l, o, a, p;
637
+ return {
638
+ c() {
639
+ t = k("button"), l = L(e), r(t, "class", "OtpButton"), t.disabled = o = /*otp*/
640
+ n[2].join("").length !== /*config*/
641
+ n[4].inputLength || /*isSubmitting*/
642
+ n[13] || /*maxAttempts*/
643
+ n[15];
644
+ },
645
+ m(s, u) {
646
+ S(s, t, u), f(t, l), a || (p = ne(
647
+ t,
648
+ "click",
649
+ /*submitOtp*/
650
+ n[29]
651
+ ), a = !0);
652
+ },
653
+ p(s, u) {
654
+ u[0] & /*$_*/
655
+ 524288 && e !== (e = /*$_*/
656
+ s[19]("submit") + "") && z(l, e), u[0] & /*otp, config, isSubmitting, maxAttempts*/
657
+ 40980 && o !== (o = /*otp*/
658
+ s[2].join("").length !== /*config*/
659
+ s[4].inputLength || /*isSubmitting*/
660
+ s[13] || /*maxAttempts*/
661
+ s[15]) && (t.disabled = o);
662
+ },
663
+ d(s) {
664
+ s && O(t), a = !1, p();
665
+ }
666
+ };
667
+ }
668
+ function kt(n) {
669
+ let t, e = (
670
+ /*$_*/
671
+ n[19]("resendOtp") + ""
672
+ ), l, o, a;
673
+ return {
674
+ c() {
675
+ t = k("button"), l = L(e), r(t, "class", "OtpButton");
676
+ },
677
+ m(p, s) {
678
+ S(p, t, s), f(t, l), o || (a = ne(
679
+ t,
680
+ "click",
681
+ /*handleResendOtp*/
682
+ n[27]
683
+ ), o = !0);
684
+ },
685
+ p(p, s) {
686
+ s[0] & /*$_*/
687
+ 524288 && e !== (e = /*$_*/
688
+ p[19]("resendOtp") + "") && z(l, e);
689
+ },
690
+ d(p) {
691
+ p && O(t), o = !1, a();
692
+ }
693
+ };
694
+ }
695
+ function vt(n) {
696
+ let t;
697
+ function e(a, p) {
698
+ return (
699
+ /*hasConfigErrors*/
700
+ a[7] ? pt : ct
701
+ );
702
+ }
703
+ let l = e(n), o = l(n);
704
+ return {
705
+ c() {
706
+ t = k("div"), o.c(), r(t, "class", "OtpContent");
707
+ },
708
+ m(a, p) {
709
+ S(a, t, p), o.m(t, null), n[44](t);
710
+ },
711
+ p(a, p) {
712
+ l === (l = e(a)) && o ? o.p(a, p) : (o.d(1), o = l(a), o && (o.c(), o.m(t, null)));
713
+ },
714
+ i: _e,
715
+ o: _e,
716
+ d(a) {
717
+ a && O(t), o.d(), n[44](null);
718
+ }
719
+ };
720
+ }
721
+ function Ct(n, t, e) {
722
+ let l, o, a;
723
+ Ze(n, rt, (i) => e(19, a = i));
724
+ let { clientstyling: p = "" } = t, { clientstylingurl: s = "" } = t, { mbsource: u } = t, { lang: d = "en" } = t, { endpoint: _ } = t, { session: b } = t, { translationurl: T } = t, { templateid: M } = t, w = [], m = !0, y = null, C = 0, I = "", q = "", W = !1, j = !1, x = "", le = "", F = "", Z = !1, ie = !1, $ = !1, E = "", A = {}, V = null, re = !1, se = !1, ae = "", U, K = [], B = null, ee = 0, G = !1, ce = !1;
725
+ const ue = { SMS: "sms", EMAIL: "email" }, pe = {
726
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
727
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error",
728
+ MAX_INVALIDATE: "gm.multifactorauthentication.challenge_internal_server_error"
729
+ };
730
+ Object.keys(Me).forEach((i) => {
731
+ Se(i, Me[i]);
732
+ });
733
+ const fe = () => {
734
+ st(d);
735
+ }, X = () => {
736
+ fetch(T).then((i) => i.json()).then((i) => {
737
+ Object.keys(i).forEach((h) => {
738
+ Se(h, i[h]);
739
+ });
740
+ }).catch((i) => {
741
+ console.log(i);
742
+ });
743
+ }, P = async (i) => {
744
+ if (i.detail?.["x-step-up-required"]) {
745
+ if (e(7, j = !1), e(6, W = !1), e(8, x = ""), le = i.detail["x-step-up-token"], F = i.detail.flow, !le || !F) {
746
+ e(3, m = !1), e(7, j = !0), e(8, x = a("configError"));
747
+ return;
748
+ }
749
+ e(12, re = !1), e(3, m = !1);
750
+ }
751
+ }, me = () => {
752
+ B && (clearInterval(B), B = null), V && (clearInterval(V), V = null), e(6, W = !1), e(7, j = !1), e(8, x = ""), e(10, ie = !1), e(2, w = []), e(4, y = null), e(3, m = !0), e(0, E = ""), e(12, re = !1), e(38, A = {});
753
+ }, te = () => {
754
+ me();
755
+ }, D = () => new Promise((i, h) => {
756
+ const g = new URL(`${_}/api/pam/v1/mfa/challenge/${le}`), N = new Headers();
757
+ N.append("accept", "application/json"), N.append("Content-Type", "application/json"), N.append("X-SessionId", `${b}`), e(16, ce = !0);
758
+ const be = {
759
+ method: "PATCH",
760
+ headers: N,
761
+ body: JSON.stringify({
762
+ channel: E,
763
+ templateId: M
764
+ })
765
+ };
766
+ fetch(g, be).then((Ce) => Ce.json()).then(() => {
767
+ e(15, G = !1), c(), v(), i();
768
+ }).catch((Ce) => {
769
+ h();
770
+ });
771
+ }), he = () => {
772
+ V && clearInterval(V), V = setInterval(
773
+ () => {
774
+ const i = { ...A };
775
+ let h = !1;
776
+ Object.keys(i).forEach((g) => {
777
+ i[g] > 0 && (i[g]--, h = !0);
778
+ }), e(38, A = i), !h && V && (clearInterval(V), V = null);
779
+ },
780
+ 1e3
781
+ );
782
+ }, Y = (i) => {
783
+ e(0, E = i);
784
+ }, H = async () => {
785
+ if (!(!E || A[E] && A[E] > 0)) {
786
+ e(3, m = !0), M && M.startsWith("2fa-") && e(30, M = `2fa-${E}`);
787
+ try {
788
+ await D(), await we(), e(38, A = {
789
+ ...A,
790
+ [E]: 30
791
+ }), he(), e(12, re = !0), c(), v();
792
+ } catch (i) {
793
+ console.error("Error submitting channel:", i), e(6, W = !0), e(8, x = a("submissionError"));
794
+ } finally {
795
+ e(3, m = !1);
796
+ }
797
+ }
798
+ }, c = () => {
799
+ const i = new Date(I), h = new Date(q), g = /* @__PURE__ */ new Date(), N = h.getTime() - g.getTime();
800
+ ee = i.getTime() - N;
801
+ const de = Date.now(), be = Math.max(0, Math.floor((ee - de) / 1e3));
802
+ e(5, C = be);
803
+ }, v = () => {
804
+ B && clearInterval(B), B = setInterval(
805
+ () => {
806
+ const i = Date.now(), h = Math.max(0, Math.floor((ee - i) / 1e3));
807
+ e(5, C = h), e(11, $ = h <= 0), h <= 0 && (clearInterval(B), B = null, e(9, Z = !0), e(6, W = !1), e(10, ie = !1));
808
+ },
809
+ 1e3
810
+ );
811
+ }, Re = (i) => {
812
+ const h = Math.floor(i / 60), g = i % 60;
813
+ return `${h.toString().padStart(2, "0")}:${g.toString().padStart(2, "0")}`;
814
+ }, ge = (i, h) => {
815
+ const g = [...w];
816
+ g[i] = h.toUpperCase(), e(2, w = g), g.join("") !== ae && e(13, se = !1);
817
+ }, ze = (i) => {
818
+ i.preventDefault();
819
+ const g = (i.clipboardData?.getData("text")?.trim() || "").slice(0, y.inputLength).split("");
820
+ e(2, w = [...g, ...Array(y.inputLength - g.length).fill("")]), K[g.length]?.focus(), g.length === y.inputLength && ve();
821
+ }, ye = (i, h) => {
822
+ const g = i.target, N = g.value;
823
+ /^[a-z0-9]$/i.test(N) && (ge(h, N), K[h + 1]?.focus()), g.value = "";
824
+ }, ke = (i, h) => {
825
+ const g = i.key, N = i.ctrlKey || i.metaKey;
826
+ if (/^[a-z0-9]$/i.test(g)) {
827
+ if (N && g.toLowerCase() === "v")
828
+ return;
829
+ i.preventDefault(), ge(h, g), K[h + 1]?.focus();
830
+ } else
831
+ g === "Backspace" && (i.preventDefault(), w[h] !== "" && ge(h, ""), K[h - 1]?.focus());
832
+ }, Pe = () => {
833
+ F == "stateful" && (D(), e(9, Z = !1));
834
+ const i = new CustomEvent("otpResendRequested");
835
+ window.dispatchEvent(i);
836
+ }, De = (i) => {
837
+ window.dispatchEvent(new CustomEvent(
838
+ "otpSubmitted",
839
+ {
840
+ detail: {
841
+ code: i,
842
+ maxAttempts: y.maxValidationAttempts,
843
+ validatedAttempts: y.numberOfValidateAttempts
844
+ }
845
+ }
846
+ ));
847
+ }, je = async (i) => {
848
+ const h = new URL(`/api/nwa/api/v1/mfa/challenge/${le}/validate`, _);
849
+ h.searchParams.append("input", i);
850
+ try {
851
+ const g = await fetch(h.href, { method: "POST" });
852
+ if (g.status === 200) {
853
+ Be();
854
+ return;
855
+ }
856
+ const N = await g.json();
857
+ throw new Error(N.message);
858
+ } catch (g) {
859
+ if (await we(), g.message === pe.INTERNAL_SERVER_ERROR) {
860
+ if (y.numberOfValidateAttempts === y.maxValidationAttempts - 1) {
861
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
862
+ {
863
+ type: "WidgetNotification",
864
+ data: {
865
+ type: "error",
866
+ message: a("accountBlocked")
867
+ }
868
+ },
869
+ window.location.href
870
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
871
+ return;
872
+ }
873
+ e(6, W = !0), e(8, x = a("invalidOtp")), we();
874
+ return;
875
+ }
876
+ g.message === pe.MAX_INVALIDATE && (e(6, W = !0), e(8, x = a("invalidOtp"))), g.details === pe.MAX_ATTEMPTS_EXCEEDED && e(15, G = !0), console.error("OTP submission failed:", g), e(6, W = !0), e(8, x = a("submissionError"));
877
+ } finally {
878
+ e(3, m = !1);
879
+ }
880
+ }, Be = () => {
881
+ window.dispatchEvent(new CustomEvent(
882
+ "otpSuccess",
883
+ {
884
+ detail: {
885
+ message: "User successfully authenticated"
886
+ }
887
+ }
888
+ ));
889
+ }, He = () => {
890
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
891
+ }, ve = async () => {
892
+ if (w.join("").length !== y.inputLength) {
893
+ e(6, W = !0), e(8, x = a("invalidOtp"));
894
+ return;
895
+ }
896
+ const i = w.join("");
897
+ e(13, se = !0), ae = i, e(3, m = !0), e(6, W = !1), e(8, x = ""), F === "stateless" && De(i), F === "stateful" && await je(i);
898
+ }, we = async () => {
899
+ if (_)
900
+ try {
901
+ e(3, m = !0);
902
+ const i = new URL(`/api/nwa/api/v1/mfa/challenge/${le}/config`, _), h = await fetch(i.href), g = await h.json();
903
+ if (h.ok)
904
+ e(4, y = g), e(2, w = Array(y.inputLength).fill("")), e(9, Z = !1), I = y.expirationTime, q = y.serverTime, y.numberOfValidateAttempts !== 0 && (e(6, W = !0), e(8, x = a("invalidOtp"))), y.numberOfValidateAttempts === y.maxValidationAttempts - 1 && e(10, ie = !0), e(3, m = !1), c(), v(), e(16, ce = !1);
905
+ else if (g && g.details === pe.MAX_ATTEMPTS_EXCEEDED)
906
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
907
+ else {
908
+ const N = g && g.message || `Failed to load config. Status: ${h.status}`;
909
+ throw new Error(N);
910
+ }
911
+ } catch (i) {
912
+ e(3, m = !1), e(7, j = !0), e(8, x = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", i);
913
+ }
914
+ };
915
+ $e(() => (window.addEventListener("stepUpAuthRequired", P, !1), window.addEventListener("closePopup", te, !1), () => {
916
+ window.removeEventListener("stepUpAuthRequired", P), window.removeEventListener("closePopup", te, !1), B && clearInterval(B), V && clearInterval(V);
917
+ }));
918
+ const Ne = () => Y(ue.SMS), Ve = () => Y(ue.EMAIL);
919
+ function We(i, h) {
920
+ Ee[i ? "unshift" : "push"](() => {
921
+ K[h] = i, e(14, K);
922
+ });
923
+ }
924
+ const Fe = (i, h) => ye(h, i), Ue = (i, h) => ke(h, i);
925
+ function qe(i) {
926
+ Ee[i ? "unshift" : "push"](() => {
927
+ U = i, e(1, U);
928
+ });
929
+ }
930
+ return n.$$set = (i) => {
931
+ "clientstyling" in i && e(31, p = i.clientstyling), "clientstylingurl" in i && e(32, s = i.clientstylingurl), "mbsource" in i && e(33, u = i.mbsource), "lang" in i && e(34, d = i.lang), "endpoint" in i && e(35, _ = i.endpoint), "session" in i && e(36, b = i.session), "translationurl" in i && e(37, T = i.translationurl), "templateid" in i && e(30, M = i.templateid);
932
+ }, n.$$.update = () => {
933
+ n.$$.dirty[0] & /*customStylingContainer*/
934
+ 2 | n.$$.dirty[1] & /*clientstyling*/
935
+ 1 && p && U && nt(U, p), n.$$.dirty[0] & /*customStylingContainer*/
936
+ 2 | n.$$.dirty[1] & /*clientstylingurl*/
937
+ 2 && s && U && lt(U, s), n.$$.dirty[0] & /*customStylingContainer*/
938
+ 2 | n.$$.dirty[1] & /*mbsource*/
939
+ 4 && u && U && ot(U, `${u}.Style`), n.$$.dirty[1] & /*lang*/
940
+ 8 && d && fe(), n.$$.dirty[1] & /*lang, translationurl*/
941
+ 72 && d && T && X(), n.$$.dirty[0] & /*selectedChannel*/
942
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
943
+ 128 && e(18, l = E && (!A[E] || A[E] === 0)), n.$$.dirty[0] & /*selectedChannel*/
944
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
945
+ 128 && e(17, o = E && A[E] || 0);
946
+ }, [
947
+ E,
948
+ U,
949
+ w,
950
+ m,
951
+ y,
952
+ C,
953
+ W,
954
+ j,
955
+ x,
956
+ Z,
957
+ ie,
958
+ $,
959
+ re,
960
+ se,
961
+ K,
962
+ G,
963
+ ce,
964
+ o,
965
+ l,
966
+ a,
967
+ ue,
968
+ Y,
969
+ H,
970
+ Re,
971
+ ze,
972
+ ye,
973
+ ke,
974
+ Pe,
975
+ He,
976
+ ve,
977
+ M,
978
+ p,
979
+ s,
980
+ u,
981
+ d,
982
+ _,
983
+ b,
984
+ T,
985
+ A,
986
+ Ne,
987
+ Ve,
988
+ We,
989
+ Fe,
990
+ Ue,
991
+ qe
992
+ ];
993
+ }
994
+ class Et extends Ge {
995
+ constructor(t) {
996
+ super(), Ye(
997
+ this,
998
+ t,
999
+ Ct,
1000
+ vt,
1001
+ Je,
1002
+ {
1003
+ clientstyling: 31,
1004
+ clientstylingurl: 32,
1005
+ mbsource: 33,
1006
+ lang: 34,
1007
+ endpoint: 35,
1008
+ session: 36,
1009
+ translationurl: 37,
1010
+ templateid: 30
1011
+ },
1012
+ at,
1013
+ [-1, -1, -1]
1014
+ );
1015
+ }
1016
+ get clientstyling() {
1017
+ return this.$$.ctx[31];
1018
+ }
1019
+ set clientstyling(t) {
1020
+ this.$$set({ clientstyling: t }), oe();
1021
+ }
1022
+ get clientstylingurl() {
1023
+ return this.$$.ctx[32];
1024
+ }
1025
+ set clientstylingurl(t) {
1026
+ this.$$set({ clientstylingurl: t }), oe();
1027
+ }
1028
+ get mbsource() {
1029
+ return this.$$.ctx[33];
1030
+ }
1031
+ set mbsource(t) {
1032
+ this.$$set({ mbsource: t }), oe();
1033
+ }
1034
+ get lang() {
1035
+ return this.$$.ctx[34];
1036
+ }
1037
+ set lang(t) {
1038
+ this.$$set({ lang: t }), oe();
1039
+ }
1040
+ get endpoint() {
1041
+ return this.$$.ctx[35];
1042
+ }
1043
+ set endpoint(t) {
1044
+ this.$$set({ endpoint: t }), oe();
1045
+ }
1046
+ get session() {
1047
+ return this.$$.ctx[36];
1048
+ }
1049
+ set session(t) {
1050
+ this.$$set({ session: t }), oe();
1051
+ }
1052
+ get translationurl() {
1053
+ return this.$$.ctx[37];
1054
+ }
1055
+ set translationurl(t) {
1056
+ this.$$set({ translationurl: t }), oe();
1057
+ }
1058
+ get templateid() {
1059
+ return this.$$.ctx[30];
1060
+ }
1061
+ set templateid(t) {
1062
+ this.$$set({ templateid: t }), oe();
1063
+ }
1064
+ }
1065
+ it(Et, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1066
+ export {
1067
+ Et as default
1068
+ };