@everymatrix/cashier-page 1.86.0 → 1.86.1

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