@everymatrix/cashier-page 1.69.94 → 1.69.123

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 (97) hide show
  1. package/components/CashierCarousel-Bmkxhtnm.cjs +23 -0
  2. package/components/{CashierCarousel-BdYVF6QV.js → CashierCarousel-D_wSKCMs.js} +1400 -1318
  3. package/components/{CashierCarousel-P8JOEAdW.js → CashierCarousel-U2ysEkZo.js} +1425 -1343
  4. package/components/{CashierError-BHR0wCX8.cjs → CashierError-Cwm9eY8c.cjs} +1 -1
  5. package/components/{CashierError-CV3sSdTA.js → CashierError-D2jZsClG.js} +2 -2
  6. package/components/{CashierError-Dc97Q3ia.js → CashierError-ZLpQCZ7N.js} +2 -2
  7. package/components/{CashierHeader-CNnGcxHX.js → CashierHeader-BCCA_87T.js} +4 -4
  8. package/components/CashierHeader-D40gryOj.cjs +1 -0
  9. package/components/{CashierHeader-BvRwyGj-.js → CashierHeader-DyFARvnF.js} +4 -4
  10. package/components/CashierIframeRedirect-BKExS9o2.cjs +1 -0
  11. package/components/{CashierIframeRedirect-CyxYgQXl.js → CashierIframeRedirect-BMGvaxHv.js} +29 -29
  12. package/components/{CashierIframeRedirect-Tyfog0B-.js → CashierIframeRedirect-Hz0t-XHA.js} +29 -29
  13. package/components/CashierMethodDetails-D0wpum5b.js +9564 -0
  14. package/components/CashierMethodDetails-FeiyXoHw.js +9523 -0
  15. package/components/CashierMethodDetails-ziUU0Tui.cjs +85 -0
  16. package/components/CashierMethodsList-CI_1-_NW.js +737 -0
  17. package/components/CashierMethodsList-PbOH7p79.cjs +1 -0
  18. package/components/CashierMethodsList-WQndorD0.js +725 -0
  19. package/components/CashierModal-Bm1ZHiKF.js +337 -0
  20. package/components/CashierModal-CZXS870r.cjs +1 -0
  21. package/components/CashierModal-DA9pYzjv.js +353 -0
  22. package/components/{CashierNotifications-B1_IvWSx.cjs → CashierNotifications-AE1W98Am.cjs} +1 -1
  23. package/components/{CashierNotifications-C7E0y8oy.js → CashierNotifications-BKEjPFOe.js} +1 -1
  24. package/components/{CashierNotifications-CV5fK-_h.js → CashierNotifications-BhTVfc_q.js} +1 -1
  25. package/components/CashierPage-B2478cGI.cjs +1 -0
  26. package/components/CashierPage-Bu-Q7zGW.js +3202 -0
  27. package/components/CashierPage-DRqoyxvy.js +3202 -0
  28. package/components/{CashierReceiptPage-CtOCAaLC.js → CashierReceiptPage-BCdXtAQy.js} +847 -767
  29. package/components/CashierReceiptPage-BTnWWxrf.cjs +26 -0
  30. package/components/{CashierReceiptPage-C6wwbN8P.js → CashierReceiptPage-mprh7bxR.js} +871 -767
  31. package/components/CashierSessionExpirationModal-CO21pLuC.cjs +2 -0
  32. package/components/{CashierSessionExpirationModal-DZ6cbZMo.js → CashierSessionExpirationModal-Cf9kV9t-.js} +36 -36
  33. package/components/{CashierSessionExpirationModal-CH7OH5eP.js → CashierSessionExpirationModal-DmelwHmk.js} +64 -64
  34. package/components/{CashierSpinner-CyPuIakf.js → CashierSpinner-BafoqXXx.js} +1 -1
  35. package/components/{CashierSpinner-DN8Xti3l.js → CashierSpinner-BoT5LgPd.js} +1 -1
  36. package/components/{CashierSpinner-CL3BxNa3.cjs → CashierSpinner-d2hvjlSo.cjs} +1 -1
  37. package/components/CashierStepUp-DAwEA9m8.js +1118 -0
  38. package/components/CashierStepUp-DHD1RjqN.js +1079 -0
  39. package/components/CashierStepUp-DPLCXGpo.cjs +1 -0
  40. package/components/{CashierTransactionHistory-DUJ7uEPo.js → CashierTransactionHistory-BKgkxlMX.js} +28 -28
  41. package/components/{CashierTransactionHistory-D7x8iV5o.js → CashierTransactionHistory-C8ds2Zwi.js} +28 -28
  42. package/components/CashierTransactionHistory-CBn28kTC.cjs +1 -0
  43. package/components/{CashierVerifications-dsnZ9UGl.js → CashierVerifications-B5x1jg3q.js} +124 -124
  44. package/components/CashierVerifications-Hi5EfxuQ.cjs +1 -0
  45. package/components/{CashierVerifications-D98F06Sz.js → CashierVerifications-fksQOX8S.js} +94 -94
  46. package/components/{TxnStatusIcon-DKrjQDkn.cjs → TxnStatusIcon-Bs5XHdDd.cjs} +1 -1
  47. package/components/{TxnStatusIcon-Bjzryymo.js → TxnStatusIcon-Ck-w1f1a.js} +1 -1
  48. package/components/{TxnStatusIcon-BnNOvKNP.js → TxnStatusIcon-ZhJG6FAv.js} +1 -1
  49. package/components/{TxnTypeIcons-CdJDWKBc.js → TxnTypeIcons-BJMvuKXL.js} +1 -1
  50. package/components/{TxnTypeIcons-DUFNEYZT.cjs → TxnTypeIcons-CPhGhukx.cjs} +1 -1
  51. package/components/{TxnTypeIcons-CgvUMv-Q.js → TxnTypeIcons-OgWLkxli.js} +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/stencil/{index-97d17652--F7PvMq9.js → index-97d17652-B6BYeRne.js} +1 -1
  57. package/stencil/{index-97d17652-CCFHkzJw.js → index-97d17652-BOr4KAqq.js} +1 -1
  58. package/stencil/{index-97d17652-BhLhk_xz.cjs → index-97d17652-zTl06Vn9.cjs} +1 -1
  59. package/stencil/{index-b2193545-B8kMF2bI.cjs → index-b2193545-B5Q7rnAU.cjs} +1 -1
  60. package/stencil/{index-b2193545-BoSqyMpB.js → index-b2193545-CF_fVoFe.js} +1 -1
  61. package/stencil/{index-b2193545-D4dOaNlR.js → index-b2193545-DfttkCgg.js} +1 -1
  62. package/stencil/{ui-image-DIEeZy5u.js → ui-image-BsYHwNhO.js} +1 -1
  63. package/stencil/{ui-image-BWJXFWH1.js → ui-image-CNaRr0ax.js} +1 -1
  64. package/stencil/{ui-image-ByEXiBzx.cjs → ui-image-IJc7Zz_R.cjs} +1 -1
  65. package/stencil/{ui-image-b7b48fe5-ByRuJtdE.js → ui-image-b7b48fe5-BKRtoUuG.js} +1 -1
  66. package/stencil/{ui-image-b7b48fe5-D6iig_uN.js → ui-image-b7b48fe5-HA45CrsG.js} +1 -1
  67. package/stencil/{ui-image-b7b48fe5-DG83WzAo.cjs → ui-image-b7b48fe5-MC0x5ZQd.cjs} +1 -1
  68. package/stencil/{ui-image_2-qO3reSlr.js → ui-image_2-CmVho0dS.js} +13 -13
  69. package/stencil/ui-image_2-CyqE6j_W.cjs +55 -0
  70. package/stencil/{ui-skeleton-ae35c6f2-8tYGV8SR.js → ui-image_2-Daq38JGa.js} +14 -12
  71. package/stencil/{ui-skeleton-9boHSjtG.js → ui-skeleton-B9YTz-WD.js} +2 -2
  72. package/stencil/{ui-skeleton-4-zrLsIW.js → ui-skeleton-CQ-FgYMx.js} +2 -2
  73. package/stencil/{ui-skeleton-_yJvAdAL.cjs → ui-skeleton-UxIIZ8UD.cjs} +1 -1
  74. package/stencil/ui-skeleton-ed169f8f-BEwquWmd.cjs +55 -0
  75. package/stencil/{ui-image_2-Bm97-wkj.js → ui-skeleton-ed169f8f-BMrkXoR5.js} +12 -14
  76. package/stencil/{ui-skeleton-ae35c6f2-IN_dPA5_.js → ui-skeleton-ed169f8f-BNn31z1X.js} +12 -12
  77. package/components/CashierCarousel-HRUJt7XK.cjs +0 -23
  78. package/components/CashierHeader-Dq5rXKEy.cjs +0 -1
  79. package/components/CashierIframeRedirect-C7g6aYiD.cjs +0 -1
  80. package/components/CashierMethodDetails-BQQkicL5.js +0 -8999
  81. package/components/CashierMethodDetails-Cw3bppxA.js +0 -8978
  82. package/components/CashierMethodDetails-vl9WpFW-.cjs +0 -85
  83. package/components/CashierMethodsList-Bi29u-3T.js +0 -733
  84. package/components/CashierMethodsList-Dnurtmpq.js +0 -745
  85. package/components/CashierMethodsList-MWY8DbQT.cjs +0 -1
  86. package/components/CashierModal-7LneBvzD.cjs +0 -1
  87. package/components/CashierModal-ChoubLYy.js +0 -268
  88. package/components/CashierModal-DCTbhFou.js +0 -268
  89. package/components/CashierPage-CPBTVmCF.js +0 -2724
  90. package/components/CashierPage-DOxt1V6T.cjs +0 -1
  91. package/components/CashierPage-TX2t-xAH.js +0 -2724
  92. package/components/CashierReceiptPage-BdQL3__D.cjs +0 -26
  93. package/components/CashierSessionExpirationModal-wp_kWVca.cjs +0 -2
  94. package/components/CashierTransactionHistory-DbJgP2OJ.cjs +0 -1
  95. package/components/CashierVerifications-BzbSPCl7.cjs +0 -1
  96. package/stencil/ui-image_2-DdFjzzNO.cjs +0 -55
  97. package/stencil/ui-skeleton-ae35c6f2-CKgUXOQC.cjs +0 -55
@@ -0,0 +1,1118 @@
1
+ var Ye = Object.defineProperty, Je = Object.defineProperties;
2
+ var Qe = Object.getOwnPropertyDescriptors;
3
+ var ge = Object.getOwnPropertySymbols;
4
+ var Ze = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable;
5
+ var be = (n, e, t) => e in n ? Ye(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, se = (n, e) => {
6
+ for (var t in e || (e = {}))
7
+ Ze.call(e, t) && be(n, t, e[t]);
8
+ if (ge)
9
+ for (var t of ge(e))
10
+ $e.call(e, t) && be(n, t, e[t]);
11
+ return n;
12
+ }, we = (n, e) => Je(n, Qe(e));
13
+ var oe = (n, e, t) => new Promise((l, o) => {
14
+ var a = (c) => {
15
+ try {
16
+ s(t.next(c));
17
+ } catch (u) {
18
+ o(u);
19
+ }
20
+ }, p = (c) => {
21
+ try {
22
+ s(t.throw(c));
23
+ } catch (u) {
24
+ o(u);
25
+ }
26
+ }, s = (c) => c.done ? l(c.value) : Promise.resolve(c.value).then(a, p);
27
+ s((t = t.apply(n, e)).next());
28
+ });
29
+ import { a as et, $ as tt, S as nt, b as lt, s as ot, f as $, c as it, G as ae, e as S, k as M, m as E, o as r, p as rt, q as st, y as _e, v as z, l as d, x as Z, Q as Y, n as I, w as R, W as Te, V as J, r as Le, R as ye, Z as at, B as ct, C as ut, D as pt, E as dt, F as ft } from "./CashierCarousel-U2ysEkZo.js";
30
+ function ke(n, e) {
31
+ et(n, e);
32
+ }
33
+ function mt(n) {
34
+ tt.set(n);
35
+ }
36
+ const ve = {
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",
79
+ channelEmail: "Email",
80
+ sendCode: "Kodu gönder",
81
+ waitSeconds: "Tekrar göndermeden önce lütfen bekleyin:"
82
+ }
83
+ };
84
+ function ht(n) {
85
+ it(n, "svelte-puc9uq", '*,*::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}.RadioIndicator.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;border-radius:50%;background:var(--emw--color-primary, #fff)}.RadioIndicator.checked{border:2px solid var(--emw--color-primary, #fff)}.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)}.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-size-big, 20px);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}.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:var(--emw--spacing-small, 12px);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}.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)}.ChannelCheckbox:hover:not(.selected){background:var(--emw--color-background-hover, rgba(255, 255, 255, 0.15));border-color:var(--emw--color-primary, #f9c408)}.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 Ce(n, e, t) {
88
+ const l = n.slice();
89
+ return l[65] = e[t], l[66] = e, l[67] = t, l;
90
+ }
91
+ function gt(n) {
92
+ let e, t, l = (
93
+ /*$_*/
94
+ n[16]("otpTitle") + ""
95
+ ), o, a, p, s, c, u;
96
+ function v(f, L) {
97
+ return (
98
+ /*showResendOtp*/
99
+ f[9] ? yt : (
100
+ /*showOtpInput*/
101
+ f[12] ? wt : _t
102
+ )
103
+ );
104
+ }
105
+ let C = v(n), w = C(n), b = !/*showOtpInput*/
106
+ n[12] && Oe(n);
107
+ function _(f, L) {
108
+ if (
109
+ /*isLoading*/
110
+ f[3] && /*showOtpInput*/
111
+ f[12]
112
+ )
113
+ return St;
114
+ if (
115
+ /*showOtpInput*/
116
+ f[12] && /*config*/
117
+ f[4]
118
+ )
119
+ return Ot;
120
+ }
121
+ let h = _(n), m = h && h(n);
122
+ function O(f, L) {
123
+ if (
124
+ /*showResendOtp*/
125
+ f[9]
126
+ )
127
+ return Tt;
128
+ if (
129
+ /*showOtpInput*/
130
+ f[12] && /*config*/
131
+ f[4]
132
+ )
133
+ return Mt;
134
+ }
135
+ let A = O(n), k = A && A(n);
136
+ return {
137
+ c() {
138
+ e = E("div"), t = E("div"), o = R(l), a = I(), w.c(), p = I(), b && b.c(), s = I(), m && m.c(), c = I(), u = E("div"), k && k.c(), r(t, "class", "Title"), r(e, "class", "OtpDescription"), r(u, "class", "OtpActionButtons");
139
+ },
140
+ m(f, L) {
141
+ M(f, e, L), d(e, t), d(t, o), d(e, a), w.m(e, null), M(f, p, L), b && b.m(f, L), M(f, s, L), m && m.m(f, L), M(f, c, L), M(f, u, L), k && k.m(u, null);
142
+ },
143
+ p(f, L) {
144
+ L[0] & /*$_*/
145
+ 65536 && l !== (l = /*$_*/
146
+ f[16]("otpTitle") + "") && z(o, l), C === (C = v(f)) && w ? w.p(f, L) : (w.d(1), w = C(f), w && (w.c(), w.m(e, null))), /*showOtpInput*/
147
+ f[12] ? b && (b.d(1), b = null) : b ? b.p(f, L) : (b = Oe(f), b.c(), b.m(s.parentNode, s)), h === (h = _(f)) && m ? m.p(f, L) : (m && m.d(1), m = h && h(f), m && (m.c(), m.m(c.parentNode, c))), A === (A = O(f)) && k ? k.p(f, L) : (k && k.d(1), k = A && A(f), k && (k.c(), k.m(u, null)));
148
+ },
149
+ d(f) {
150
+ f && (S(e), S(p), S(s), S(c), S(u)), w.d(), b && b.d(f), m && m.d(f), k && k.d();
151
+ }
152
+ };
153
+ }
154
+ function bt(n) {
155
+ let e, t, l, o, a, p, s = (
156
+ /*$_*/
157
+ n[16]("errorHeader") + ""
158
+ ), c, u, v, C, w, b, _ = (
159
+ /*$_*/
160
+ n[16]("close") + ""
161
+ ), h, m, O;
162
+ return {
163
+ c() {
164
+ e = E("div"), t = E("div"), l = Y("svg"), o = Y("path"), a = I(), p = E("h2"), c = R(s), u = I(), v = E("p"), C = R(
165
+ /*errorMessage*/
166
+ n[8]
167
+ ), w = I(), b = E("button"), h = R(_), 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(t, "class", "OtpErrorHeader"), r(b, "class", "OtpButton error"), r(e, "class", "OtpError");
168
+ },
169
+ m(A, k) {
170
+ M(A, e, k), d(e, t), d(t, l), d(l, o), d(t, a), d(t, p), d(p, c), d(e, u), d(e, v), d(v, C), d(e, w), d(e, b), d(b, h), m || (O = Z(
171
+ b,
172
+ "click",
173
+ /*manualClosePopup*/
174
+ n[25]
175
+ ), m = !0);
176
+ },
177
+ p(A, k) {
178
+ k[0] & /*$_*/
179
+ 65536 && s !== (s = /*$_*/
180
+ A[16]("errorHeader") + "") && z(c, s), k[0] & /*errorMessage*/
181
+ 256 && z(
182
+ C,
183
+ /*errorMessage*/
184
+ A[8]
185
+ ), k[0] & /*$_*/
186
+ 65536 && _ !== (_ = /*$_*/
187
+ A[16]("close") + "") && z(h, _);
188
+ },
189
+ d(A) {
190
+ A && S(e), m = !1, O();
191
+ }
192
+ };
193
+ }
194
+ function wt(n) {
195
+ let e, t, l, o;
196
+ function a(u, v) {
197
+ return (
198
+ /*isLastWarning*/
199
+ u[10] ? vt : kt
200
+ );
201
+ }
202
+ let p = a(n), s = p(n), c = (
203
+ /*hasErrors*/
204
+ n[6] && Ee(n)
205
+ );
206
+ return {
207
+ c() {
208
+ e = E("p"), s.c(), l = I(), c && c.c(), o = Le(), r(e, "class", t = /*isLastWarning*/
209
+ n[10] ? "LastWarningMessage" : "");
210
+ },
211
+ m(u, v) {
212
+ M(u, e, v), s.m(e, null), M(u, l, v), c && c.m(u, v), M(u, o, v);
213
+ },
214
+ p(u, v) {
215
+ p === (p = a(u)) && s ? s.p(u, v) : (s.d(1), s = p(u), s && (s.c(), s.m(e, null))), v[0] & /*isLastWarning*/
216
+ 1024 && t !== (t = /*isLastWarning*/
217
+ u[10] ? "LastWarningMessage" : "") && r(e, "class", t), /*hasErrors*/
218
+ u[6] ? c ? c.p(u, v) : (c = Ee(u), c.c(), c.m(o.parentNode, o)) : c && (c.d(1), c = null);
219
+ },
220
+ d(u) {
221
+ u && (S(e), S(l), S(o)), s.d(), c && c.d(u);
222
+ }
223
+ };
224
+ }
225
+ function _t(n) {
226
+ let e, t = (
227
+ /*$_*/
228
+ (n[16]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + ""
229
+ ), l;
230
+ return {
231
+ c() {
232
+ e = E("p"), l = R(t);
233
+ },
234
+ m(o, a) {
235
+ M(o, e, a), d(e, l);
236
+ },
237
+ p(o, a) {
238
+ a[0] & /*$_*/
239
+ 65536 && t !== (t = /*$_*/
240
+ (o[16]("selectChannelMessage") || "Selectează metoda prin care vrei să primești codul OTP") + "") && z(l, t);
241
+ },
242
+ d(o) {
243
+ o && S(e);
244
+ }
245
+ };
246
+ }
247
+ function yt(n) {
248
+ let e, t = (
249
+ /*$_*/
250
+ n[16]("otpExpiredMessage") + ""
251
+ ), l;
252
+ return {
253
+ c() {
254
+ e = E("p"), l = R(t), r(e, "class", "OtpNoticeMessage"), r(e, "role", "alert");
255
+ },
256
+ m(o, a) {
257
+ M(o, e, a), d(e, l);
258
+ },
259
+ p(o, a) {
260
+ a[0] & /*$_*/
261
+ 65536 && t !== (t = /*$_*/
262
+ o[16]("otpExpiredMessage") + "") && z(l, t);
263
+ },
264
+ d(o) {
265
+ o && S(e);
266
+ }
267
+ };
268
+ }
269
+ function kt(n) {
270
+ let e = (
271
+ /*$_*/
272
+ n[16]("popupMessage") + ""
273
+ ), t;
274
+ return {
275
+ c() {
276
+ t = R(e);
277
+ },
278
+ m(l, o) {
279
+ M(l, t, o);
280
+ },
281
+ p(l, o) {
282
+ o[0] & /*$_*/
283
+ 65536 && e !== (e = /*$_*/
284
+ l[16]("popupMessage") + "") && z(t, e);
285
+ },
286
+ d(l) {
287
+ l && S(t);
288
+ }
289
+ };
290
+ }
291
+ function vt(n) {
292
+ let e = (
293
+ /*$_*/
294
+ n[16]("popupMessageLastWarning") + ""
295
+ ), t;
296
+ return {
297
+ c() {
298
+ t = R(e);
299
+ },
300
+ m(l, o) {
301
+ M(l, t, o);
302
+ },
303
+ p(l, o) {
304
+ o[0] & /*$_*/
305
+ 65536 && e !== (e = /*$_*/
306
+ l[16]("popupMessageLastWarning") + "") && z(t, e);
307
+ },
308
+ d(l) {
309
+ l && S(t);
310
+ }
311
+ };
312
+ }
313
+ function Ee(n) {
314
+ let e, t;
315
+ return {
316
+ c() {
317
+ e = E("p"), t = R(
318
+ /*errorMessage*/
319
+ n[8]
320
+ ), r(e, "class", "OtpErrorMessage"), r(e, "role", "alert");
321
+ },
322
+ m(l, o) {
323
+ M(l, e, o), d(e, t);
324
+ },
325
+ p(l, o) {
326
+ o[0] & /*errorMessage*/
327
+ 256 && z(
328
+ t,
329
+ /*errorMessage*/
330
+ l[8]
331
+ );
332
+ },
333
+ d(l) {
334
+ l && S(e);
335
+ }
336
+ };
337
+ }
338
+ function Oe(n) {
339
+ let e, t, l, o, a, p, s, c, u, v, C, w, b, _, h, m = (
340
+ /*$_*/
341
+ n[16]("channelSMS") + ""
342
+ ), O, A, k, f, L, P, K, ee, G, D, X, j, F, V, Q = (
343
+ /*$_*/
344
+ n[16]("channelEmail") + ""
345
+ ), U, q, N, te, ne, x = (
346
+ /*selectedChannel*/
347
+ n[0] && Se(n)
348
+ );
349
+ return {
350
+ c() {
351
+ e = E("div"), t = E("label"), l = E("div"), o = I(), a = E("input"), s = I(), c = E("div"), u = Y("svg"), v = Y("path"), C = Y("circle"), w = Y("circle"), b = Y("circle"), _ = I(), h = E("span"), O = R(m), A = I(), k = E("label"), f = E("div"), L = I(), P = E("input"), ee = I(), G = E("div"), D = Y("svg"), X = Y("rect"), j = Y("path"), F = I(), V = E("span"), U = R(Q), q = I(), x && x.c(), N = Le(), r(l, "class", "RadioIndicator"), J(
352
+ l,
353
+ "checked",
354
+ /*selectedChannel*/
355
+ n[0] === /*channels*/
356
+ n[17].SMS
357
+ ), r(a, "type", "radio"), r(a, "name", "channel"), a.value = /*channels*/
358
+ n[17].SMS, a.checked = p = /*selectedChannel*/
359
+ n[0] === /*channels*/
360
+ n[17].SMS, r(v, "d", "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"), r(C, "cx", "9"), r(C, "cy", "11"), r(C, "r", "0.5"), r(C, "fill", "currentColor"), r(w, "cx", "12"), r(w, "cy", "11"), r(w, "r", "0.5"), r(w, "fill", "currentColor"), r(b, "cx", "15"), r(b, "cy", "11"), r(b, "r", "0.5"), r(b, "fill", "currentColor"), r(u, "xmlns", "http://www.w3.org/2000/svg"), r(u, "width", "24"), r(u, "height", "24"), r(u, "viewBox", "0 0 24 24"), r(u, "fill", "none"), r(u, "stroke", "currentColor"), r(u, "stroke-width", "2"), r(u, "stroke-linecap", "round"), r(u, "stroke-linejoin", "round"), r(c, "class", "ChannelContent"), r(t, "class", "ChannelCheckbox"), J(
361
+ t,
362
+ "selected",
363
+ /*selectedChannel*/
364
+ n[0] === /*channels*/
365
+ n[17].SMS
366
+ ), r(f, "class", "RadioIndicator"), J(
367
+ f,
368
+ "checked",
369
+ /*selectedChannel*/
370
+ n[0] === /*channels*/
371
+ n[17].EMAIL
372
+ ), r(P, "type", "radio"), r(P, "name", "channel"), P.value = /*channels*/
373
+ n[17].EMAIL, P.checked = K = /*selectedChannel*/
374
+ n[0] === /*channels*/
375
+ n[17].EMAIL, r(X, "x", "2"), r(X, "y", "4"), r(X, "width", "20"), r(X, "height", "16"), r(X, "rx", "2"), r(j, "d", "m2 7 10 6 10-6"), r(D, "xmlns", "http://www.w3.org/2000/svg"), r(D, "width", "24"), r(D, "height", "24"), r(D, "viewBox", "0 0 24 24"), r(D, "fill", "none"), r(D, "stroke", "currentColor"), r(D, "stroke-width", "2"), r(D, "stroke-linecap", "round"), r(D, "stroke-linejoin", "round"), r(G, "class", "ChannelContent"), r(k, "class", "ChannelCheckbox"), J(
376
+ k,
377
+ "selected",
378
+ /*selectedChannel*/
379
+ n[0] === /*channels*/
380
+ n[17].EMAIL
381
+ ), r(e, "class", "ChannelSelection");
382
+ },
383
+ m(T, W) {
384
+ M(T, e, W), d(e, t), d(t, l), d(t, o), d(t, a), d(t, s), d(t, c), d(c, u), d(u, v), d(u, C), d(u, w), d(u, b), d(c, _), d(c, h), d(h, O), d(e, A), d(e, k), d(k, f), d(k, L), d(k, P), d(k, ee), d(k, G), d(G, D), d(D, X), d(D, j), d(G, F), d(G, V), d(V, U), M(T, q, W), x && x.m(T, W), M(T, N, W), te || (ne = [
385
+ Z(
386
+ a,
387
+ "change",
388
+ /*change_handler*/
389
+ n[36]
390
+ ),
391
+ Z(
392
+ P,
393
+ "change",
394
+ /*change_handler_1*/
395
+ n[37]
396
+ )
397
+ ], te = !0);
398
+ },
399
+ p(T, W) {
400
+ W[0] & /*selectedChannel, channels*/
401
+ 131073 && J(
402
+ l,
403
+ "checked",
404
+ /*selectedChannel*/
405
+ T[0] === /*channels*/
406
+ T[17].SMS
407
+ ), W[0] & /*selectedChannel*/
408
+ 1 && p !== (p = /*selectedChannel*/
409
+ T[0] === /*channels*/
410
+ T[17].SMS) && (a.checked = p), W[0] & /*$_*/
411
+ 65536 && m !== (m = /*$_*/
412
+ T[16]("channelSMS") + "") && z(O, m), W[0] & /*selectedChannel, channels*/
413
+ 131073 && J(
414
+ t,
415
+ "selected",
416
+ /*selectedChannel*/
417
+ T[0] === /*channels*/
418
+ T[17].SMS
419
+ ), W[0] & /*selectedChannel, channels*/
420
+ 131073 && J(
421
+ f,
422
+ "checked",
423
+ /*selectedChannel*/
424
+ T[0] === /*channels*/
425
+ T[17].EMAIL
426
+ ), W[0] & /*selectedChannel*/
427
+ 1 && K !== (K = /*selectedChannel*/
428
+ T[0] === /*channels*/
429
+ T[17].EMAIL) && (P.checked = K), W[0] & /*$_*/
430
+ 65536 && Q !== (Q = /*$_*/
431
+ T[16]("channelEmail") + "") && z(U, Q), W[0] & /*selectedChannel, channels*/
432
+ 131073 && J(
433
+ k,
434
+ "selected",
435
+ /*selectedChannel*/
436
+ T[0] === /*channels*/
437
+ T[17].EMAIL
438
+ ), /*selectedChannel*/
439
+ T[0] ? x ? x.p(T, W) : (x = Se(T), x.c(), x.m(N.parentNode, N)) : x && (x.d(1), x = null);
440
+ },
441
+ d(T) {
442
+ T && (S(e), S(q), S(N)), x && x.d(T), te = !1, Te(ne);
443
+ }
444
+ };
445
+ }
446
+ function Se(n) {
447
+ let e, t, l, o;
448
+ function a(c, u) {
449
+ return (
450
+ /*currentChannelTimer*/
451
+ c[14] > 0 ? Et : Ct
452
+ );
453
+ }
454
+ let p = a(n), s = p(n);
455
+ return {
456
+ c() {
457
+ e = E("button"), s.c(), r(e, "class", "OtpButton"), e.disabled = t = !/*canSubmitChannel*/
458
+ n[15], J(e, "disabled", !/*canSubmitChannel*/
459
+ n[15]);
460
+ },
461
+ m(c, u) {
462
+ M(c, e, u), s.m(e, null), l || (o = Z(
463
+ e,
464
+ "click",
465
+ /*handleChannelSubmit*/
466
+ n[19]
467
+ ), l = !0);
468
+ },
469
+ p(c, u) {
470
+ p === (p = a(c)) && s ? s.p(c, u) : (s.d(1), s = p(c), s && (s.c(), s.m(e, null))), u[0] & /*canSubmitChannel*/
471
+ 32768 && t !== (t = !/*canSubmitChannel*/
472
+ c[15]) && (e.disabled = t), u[0] & /*canSubmitChannel*/
473
+ 32768 && J(e, "disabled", !/*canSubmitChannel*/
474
+ c[15]);
475
+ },
476
+ d(c) {
477
+ c && S(e), s.d(), l = !1, o();
478
+ }
479
+ };
480
+ }
481
+ function Ct(n) {
482
+ let e = (
483
+ /*$_*/
484
+ n[16]("sendCode") + ""
485
+ ), t;
486
+ return {
487
+ c() {
488
+ t = R(e);
489
+ },
490
+ m(l, o) {
491
+ M(l, t, o);
492
+ },
493
+ p(l, o) {
494
+ o[0] & /*$_*/
495
+ 65536 && e !== (e = /*$_*/
496
+ l[16]("sendCode") + "") && z(t, e);
497
+ },
498
+ d(l) {
499
+ l && S(t);
500
+ }
501
+ };
502
+ }
503
+ function Et(n) {
504
+ let e = (
505
+ /*$_*/
506
+ n[16]("waitSeconds") + ""
507
+ ), t, l, o, a;
508
+ return {
509
+ c() {
510
+ t = R(e), l = R(" ("), o = R(
511
+ /*currentChannelTimer*/
512
+ n[14]
513
+ ), a = R("s)");
514
+ },
515
+ m(p, s) {
516
+ M(p, t, s), M(p, l, s), M(p, o, s), M(p, a, s);
517
+ },
518
+ p(p, s) {
519
+ s[0] & /*$_*/
520
+ 65536 && e !== (e = /*$_*/
521
+ p[16]("waitSeconds") + "") && z(t, e), s[0] & /*currentChannelTimer*/
522
+ 16384 && z(
523
+ o,
524
+ /*currentChannelTimer*/
525
+ p[14]
526
+ );
527
+ },
528
+ d(p) {
529
+ p && (S(t), S(l), S(o), S(a));
530
+ }
531
+ };
532
+ }
533
+ function Ot(n) {
534
+ let e, t, l = (
535
+ /*$_*/
536
+ n[16]("timeRemaining") + ""
537
+ ), o, a, p = (
538
+ /*formatTime*/
539
+ n[20](
540
+ /*timeLeft*/
541
+ n[5]
542
+ ) + ""
543
+ ), s, c, u = (
544
+ /*$_*/
545
+ n[16]("minutes") + ""
546
+ ), v, C, w, b = ye(
547
+ /*otp*/
548
+ n[2]
549
+ ), _ = [];
550
+ for (let h = 0; h < b.length; h += 1)
551
+ _[h] = Me(Ce(n, b, h));
552
+ return {
553
+ c() {
554
+ e = E("div"), t = E("div"), o = R(l), a = I(), s = R(p), c = I(), v = R(u), C = I(), w = E("div");
555
+ for (let h = 0; h < _.length; h += 1)
556
+ _[h].c();
557
+ r(t, "class", "OtpTimer"), r(w, "class", "OtpField"), r(e, "class", "OtpFieldWrapper");
558
+ },
559
+ m(h, m) {
560
+ M(h, e, m), d(e, t), d(t, o), d(t, a), d(t, s), d(t, c), d(t, v), d(e, C), d(e, w);
561
+ for (let O = 0; O < _.length; O += 1)
562
+ _[O] && _[O].m(w, null);
563
+ },
564
+ p(h, m) {
565
+ if (m[0] & /*$_*/
566
+ 65536 && l !== (l = /*$_*/
567
+ h[16]("timeRemaining") + "") && z(o, l), m[0] & /*timeLeft*/
568
+ 32 && p !== (p = /*formatTime*/
569
+ h[20](
570
+ /*timeLeft*/
571
+ h[5]
572
+ ) + "") && z(s, p), m[0] & /*$_*/
573
+ 65536 && u !== (u = /*$_*/
574
+ h[16]("minutes") + "") && z(v, u), m[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
575
+ 14690324) {
576
+ b = ye(
577
+ /*otp*/
578
+ h[2]
579
+ );
580
+ let O;
581
+ for (O = 0; O < b.length; O += 1) {
582
+ const A = Ce(h, b, O);
583
+ _[O] ? _[O].p(A, m) : (_[O] = Me(A), _[O].c(), _[O].m(w, null));
584
+ }
585
+ for (; O < _.length; O += 1)
586
+ _[O].d(1);
587
+ _.length = b.length;
588
+ }
589
+ },
590
+ d(h) {
591
+ h && S(e), at(_, h);
592
+ }
593
+ };
594
+ }
595
+ function St(n) {
596
+ let e;
597
+ return {
598
+ c() {
599
+ e = E("div"), e.innerHTML = '<span class="OtpLoader"></span>', r(e, "class", "OtpLoaderContainer");
600
+ },
601
+ m(t, l) {
602
+ M(t, e, l);
603
+ },
604
+ p: ae,
605
+ d(t) {
606
+ t && S(e);
607
+ }
608
+ };
609
+ }
610
+ function Me(n) {
611
+ let e, t, l, o = (
612
+ /*index*/
613
+ n[67]
614
+ ), a, p;
615
+ const s = () => (
616
+ /*input_binding*/
617
+ n[38](e, o)
618
+ ), c = () => (
619
+ /*input_binding*/
620
+ n[38](null, o)
621
+ );
622
+ function u(...C) {
623
+ return (
624
+ /*input_handler*/
625
+ n[39](
626
+ /*index*/
627
+ n[67],
628
+ ...C
629
+ )
630
+ );
631
+ }
632
+ function v(...C) {
633
+ return (
634
+ /*keydown_handler*/
635
+ n[40](
636
+ /*index*/
637
+ n[67],
638
+ ...C
639
+ )
640
+ );
641
+ }
642
+ return {
643
+ c() {
644
+ e = E("input"), r(e, "id", `otp-input-${/*index*/
645
+ n[67]}`), r(e, "type", "text"), r(e, "class", t = `otp-box ${/*config*/
646
+ n[4].inputLength % 2 === 0 && /*index*/
647
+ n[67] === /*config*/
648
+ n[4].inputLength / 2 - 1 ? "space" : ""}`), r(e, "maxlength", 1), e.value = l = /*char*/
649
+ n[65], e.disabled = /*inputDisabled*/
650
+ n[11], r(e, "autocomplete", "off");
651
+ },
652
+ m(C, w) {
653
+ M(C, e, w), s(), a || (p = [
654
+ Z(e, "input", u),
655
+ Z(e, "keydown", v),
656
+ Z(
657
+ e,
658
+ "paste",
659
+ /*handleOnPasteOtp*/
660
+ n[21]
661
+ )
662
+ ], a = !0);
663
+ },
664
+ p(C, w) {
665
+ n = C, w[0] & /*config*/
666
+ 16 && t !== (t = `otp-box ${/*config*/
667
+ n[4].inputLength % 2 === 0 && /*index*/
668
+ n[67] === /*config*/
669
+ n[4].inputLength / 2 - 1 ? "space" : ""}`) && r(e, "class", t), w[0] & /*otp*/
670
+ 4 && l !== (l = /*char*/
671
+ n[65]) && e.value !== l && (e.value = l), w[0] & /*inputDisabled*/
672
+ 2048 && (e.disabled = /*inputDisabled*/
673
+ n[11]), o !== /*index*/
674
+ n[67] && (c(), o = /*index*/
675
+ n[67], s());
676
+ },
677
+ d(C) {
678
+ C && S(e), c(), a = !1, Te(p);
679
+ }
680
+ };
681
+ }
682
+ function Mt(n) {
683
+ let e, t = (
684
+ /*$_*/
685
+ n[16]("submit") + ""
686
+ ), l, o, a, p;
687
+ return {
688
+ c() {
689
+ e = E("button"), l = R(t), r(e, "class", "OtpButton"), e.disabled = o = /*otp*/
690
+ n[2].join("").length !== /*config*/
691
+ n[4].inputLength;
692
+ },
693
+ m(s, c) {
694
+ M(s, e, c), d(e, l), a || (p = Z(
695
+ e,
696
+ "click",
697
+ /*submitOtp*/
698
+ n[26]
699
+ ), a = !0);
700
+ },
701
+ p(s, c) {
702
+ c[0] & /*$_*/
703
+ 65536 && t !== (t = /*$_*/
704
+ s[16]("submit") + "") && z(l, t), c[0] & /*otp, config*/
705
+ 20 && o !== (o = /*otp*/
706
+ s[2].join("").length !== /*config*/
707
+ s[4].inputLength) && (e.disabled = o);
708
+ },
709
+ d(s) {
710
+ s && S(e), a = !1, p();
711
+ }
712
+ };
713
+ }
714
+ function Tt(n) {
715
+ let e, t = (
716
+ /*$_*/
717
+ n[16]("resendOtp") + ""
718
+ ), l, o, a;
719
+ return {
720
+ c() {
721
+ e = E("button"), l = R(t), r(e, "class", "OtpButton");
722
+ },
723
+ m(p, s) {
724
+ M(p, e, s), d(e, l), o || (a = Z(
725
+ e,
726
+ "click",
727
+ /*handleResendOtp*/
728
+ n[24]
729
+ ), o = !0);
730
+ },
731
+ p(p, s) {
732
+ s[0] & /*$_*/
733
+ 65536 && t !== (t = /*$_*/
734
+ p[16]("resendOtp") + "") && z(l, t);
735
+ },
736
+ d(p) {
737
+ p && S(e), o = !1, a();
738
+ }
739
+ };
740
+ }
741
+ function Lt(n) {
742
+ let e;
743
+ function t(a, p) {
744
+ return (
745
+ /*hasConfigErrors*/
746
+ a[7] ? bt : gt
747
+ );
748
+ }
749
+ let l = t(n), o = l(n);
750
+ return {
751
+ c() {
752
+ e = E("div"), o.c(), r(e, "class", "OtpContent");
753
+ },
754
+ m(a, p) {
755
+ M(a, e, p), o.m(e, null), n[41](e);
756
+ },
757
+ p(a, p) {
758
+ l === (l = t(a)) && o ? o.p(a, p) : (o.d(1), o = l(a), o && (o.c(), o.m(e, null)));
759
+ },
760
+ i: ae,
761
+ o: ae,
762
+ d(a) {
763
+ a && S(e), o.d(), n[41](null);
764
+ }
765
+ };
766
+ }
767
+ function At(n, e, t) {
768
+ let l, o, a;
769
+ rt(n, ft, (i) => t(16, a = i));
770
+ let { clientstyling: p = "" } = e, { clientstylingurl: s = "" } = e, { mbsource: c } = e, { lang: u = "en" } = e, { endpoint: v } = e, { session: C } = e, { translationurl: w } = e, { templateid: b } = e, _ = [], h = !0, m = null, O = 0, A = "", k = "", f = !1, L = !1, P = "", K = "", ee = "", G = !1, D = !1, X = !1, j = "", F = {}, V = null, Q = !1, U, q = [], N = null, te = 0;
771
+ const ne = { SMS: "sms", EMAIL: "email" }, x = {
772
+ MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
773
+ INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error"
774
+ };
775
+ Object.keys(ve).forEach((i) => {
776
+ ke(i, ve[i]);
777
+ });
778
+ const T = () => {
779
+ mt(u);
780
+ }, W = () => {
781
+ fetch(w).then((i) => i.json()).then((i) => {
782
+ Object.keys(i).forEach((g) => {
783
+ ke(g, i[g]);
784
+ });
785
+ }).catch((i) => {
786
+ console.log(i);
787
+ });
788
+ }, ce = (i) => oe(this, null, function* () {
789
+ var g;
790
+ if ((g = i.detail) != null && g["x-step-up-required"]) {
791
+ if (t(7, L = !1), t(6, f = !1), t(8, P = ""), K = i.detail["x-step-up-token"], ee = i.detail.flow, !K || !ee) {
792
+ t(3, h = !1), t(7, L = !0), t(8, P = a("configError"));
793
+ return;
794
+ }
795
+ t(12, Q = !1), t(3, h = !1);
796
+ }
797
+ }), Ae = () => {
798
+ N && (clearInterval(N), N = null), V && (clearInterval(V), V = null), t(6, f = !1), t(7, L = !1), t(8, P = ""), t(10, D = !1), t(2, _ = []), t(4, m = null), t(3, h = !0), t(0, j = ""), t(12, Q = !1), t(35, F = {});
799
+ }, ue = () => {
800
+ Ae();
801
+ }, Re = () => new Promise((i, g) => {
802
+ const y = new URL(`${v}/api/pam/v1/mfa/challenge/${K}`), B = new Headers();
803
+ B.append("accept", "application/json"), B.append("Content-Type", "application/json"), B.append("X-SessionId", `${C}`);
804
+ const le = {
805
+ method: "PATCH",
806
+ headers: B,
807
+ body: JSON.stringify({
808
+ channel: j,
809
+ templateId: b
810
+ })
811
+ };
812
+ fetch(y, le).then((he) => he.json()).then(() => {
813
+ i();
814
+ }).catch((he) => {
815
+ g();
816
+ });
817
+ }), Pe = () => {
818
+ V && clearInterval(V), V = setInterval(
819
+ () => {
820
+ const i = se({}, F);
821
+ let g = !1;
822
+ Object.keys(i).forEach((y) => {
823
+ i[y] > 0 && (i[y]--, g = !0);
824
+ }), t(35, F = i), !g && V && (clearInterval(V), V = null);
825
+ },
826
+ 1e3
827
+ );
828
+ }, ie = (i) => {
829
+ t(0, j = i);
830
+ }, Ie = () => oe(this, null, function* () {
831
+ if (!(!j || F[j] && F[j] > 0)) {
832
+ t(3, h = !0), b && b.startsWith("2fa-") && t(27, b = `2fa-${j}`);
833
+ try {
834
+ yield Re(), yield me(), t(35, F = we(se({}, F), {
835
+ [j]: 30
836
+ })), Pe(), t(12, Q = !0), De();
837
+ } catch (i) {
838
+ console.error("Error submitting channel:", i), t(6, f = !0), t(8, P = a("submissionError"));
839
+ } finally {
840
+ t(3, h = !1);
841
+ }
842
+ }
843
+ }), ze = () => {
844
+ const i = new Date(A), g = new Date(k), y = /* @__PURE__ */ new Date(), B = g.getTime() - y.getTime();
845
+ te = i.getTime() - B;
846
+ const H = Date.now(), le = Math.max(0, Math.floor((te - H) / 1e3));
847
+ t(5, O = le);
848
+ }, De = () => {
849
+ N && clearInterval(N), N = setInterval(
850
+ () => {
851
+ const i = Date.now(), g = Math.max(0, Math.floor((te - i) / 1e3));
852
+ t(5, O = g), t(11, X = g <= 0), g <= 0 && (clearInterval(N), N = null, t(9, G = !0), t(6, f = !1), t(10, D = !1));
853
+ },
854
+ 1e3
855
+ );
856
+ }, je = (i) => {
857
+ const g = Math.floor(i / 60), y = i % 60;
858
+ return `${g.toString().padStart(2, "0")}:${y.toString().padStart(2, "0")}`;
859
+ }, re = (i, g) => {
860
+ const y = [..._];
861
+ y[i] = g.toUpperCase(), t(2, _ = y);
862
+ }, Be = (i) => {
863
+ var B, H, le;
864
+ i.preventDefault();
865
+ const y = (((H = (B = i.clipboardData) == null ? void 0 : B.getData("text")) == null ? void 0 : H.trim()) || "").slice(0, m.inputLength).split("");
866
+ t(2, _ = [...y, ...Array(m.inputLength - y.length).fill("")]), (le = q[y.length]) == null || le.focus(), y.length === m.inputLength && fe();
867
+ }, pe = (i, g) => {
868
+ const y = i.target, B = y.value;
869
+ if (/^[a-z0-9]$/i.test(B)) {
870
+ re(g, B);
871
+ const H = q[g + 1];
872
+ H == null || H.focus();
873
+ }
874
+ y.value = "";
875
+ }, de = (i, g) => {
876
+ const y = i.key, B = i.ctrlKey || i.metaKey;
877
+ if (/^[a-z0-9]$/i.test(y)) {
878
+ if (B && y.toLowerCase() === "v")
879
+ return;
880
+ i.preventDefault(), re(g, y);
881
+ const H = q[g + 1];
882
+ H == null || H.focus();
883
+ } else if (y === "Backspace") {
884
+ i.preventDefault(), _[g] !== "" && re(g, "");
885
+ const H = q[g - 1];
886
+ H == null || H.focus();
887
+ }
888
+ }, xe = () => {
889
+ const i = new CustomEvent("otpResendRequested");
890
+ window.dispatchEvent(i);
891
+ }, He = (i) => {
892
+ window.dispatchEvent(new CustomEvent(
893
+ "otpSubmitted",
894
+ {
895
+ detail: {
896
+ code: i,
897
+ maxAttempts: m.maxValidationAttempts,
898
+ validatedAttempts: m.numberOfValidateAttempts
899
+ }
900
+ }
901
+ ));
902
+ }, Ne = (i) => oe(this, null, function* () {
903
+ const g = new URL(`/api/nwa/api/v1/mfa/challenge/${K}/validate`, v);
904
+ g.searchParams.append("input", i);
905
+ try {
906
+ const y = yield fetch(g.href, { method: "POST" });
907
+ if (y.status === 200) {
908
+ We();
909
+ return;
910
+ }
911
+ const B = yield y.json();
912
+ throw new Error(B.message);
913
+ } catch (y) {
914
+ if (y.message === x.INTERNAL_SERVER_ERROR) {
915
+ if (m.numberOfValidateAttempts === m.maxValidationAttempts - 1) {
916
+ window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
917
+ {
918
+ type: "WidgetNotification",
919
+ data: {
920
+ type: "error",
921
+ message: a("accountBlocked")
922
+ }
923
+ },
924
+ window.location.href
925
+ ), window.dispatchEvent(new CustomEvent("manualClosePopup"));
926
+ return;
927
+ }
928
+ t(6, f = !0), t(8, P = a("invalidOtp")), me();
929
+ return;
930
+ }
931
+ console.error("OTP submission failed:", y), t(6, f = !0), t(8, P = a("submissionError"));
932
+ } finally {
933
+ t(3, h = !1);
934
+ }
935
+ }), We = () => {
936
+ window.dispatchEvent(new CustomEvent(
937
+ "otpSuccess",
938
+ {
939
+ detail: {
940
+ message: "User successfully authenticated"
941
+ }
942
+ }
943
+ ));
944
+ }, Ve = () => {
945
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
946
+ }, fe = () => oe(this, null, function* () {
947
+ if (_.join("").length !== m.inputLength) {
948
+ t(6, f = !0), t(8, P = a("invalidOtp"));
949
+ return;
950
+ }
951
+ t(3, h = !0), t(6, f = !1), t(8, P = "");
952
+ const i = _.join("");
953
+ ee === "stateless" && He(i), ee === "stateful" && (yield Ne(i));
954
+ }), me = () => oe(this, null, function* () {
955
+ if (v)
956
+ try {
957
+ t(3, h = !0);
958
+ const i = new URL(`/api/nwa/api/v1/mfa/challenge/${K}/config`, v), g = yield fetch(i.href), y = yield g.json();
959
+ if (g.ok)
960
+ t(4, m = y), t(2, _ = Array(m.inputLength).fill("")), t(9, G = !1), A = m.expirationTime, k = m.serverTime, m.numberOfValidateAttempts !== 0 && (t(6, f = !0), t(8, P = a("invalidOtp"))), m.numberOfValidateAttempts === m.maxValidationAttempts - 1 && t(10, D = !0), t(3, h = !1), ze();
961
+ else if (y && y.details === x.MAX_ATTEMPTS_EXCEEDED)
962
+ window.dispatchEvent(new CustomEvent("manualClosePopup"));
963
+ else {
964
+ const B = y && y.message || `Failed to load config. Status: ${g.status}`;
965
+ throw new Error(B);
966
+ }
967
+ } catch (i) {
968
+ t(3, h = !1), t(7, L = !0), t(8, P = a("configError")), window.dispatchEvent(new CustomEvent("2fa-loading", { detail: { isLoading: !1 } })), console.error("Error loading 2FA config:", i);
969
+ }
970
+ });
971
+ st(() => (window.addEventListener("stepUpAuthRequired", ce, !1), window.addEventListener("closePopup", ue, !1), () => {
972
+ window.removeEventListener("stepUpAuthRequired", ce), window.removeEventListener("closePopup", ue, !1), N && clearInterval(N), V && clearInterval(V);
973
+ }));
974
+ const Fe = () => ie(ne.SMS), Ue = () => ie(ne.EMAIL);
975
+ function qe(i, g) {
976
+ _e[i ? "unshift" : "push"](() => {
977
+ q[g] = i, t(13, q);
978
+ });
979
+ }
980
+ const Ke = (i, g) => pe(g, i), Ge = (i, g) => de(g, i);
981
+ function Xe(i) {
982
+ _e[i ? "unshift" : "push"](() => {
983
+ U = i, t(1, U);
984
+ });
985
+ }
986
+ return n.$$set = (i) => {
987
+ "clientstyling" in i && t(28, p = i.clientstyling), "clientstylingurl" in i && t(29, s = i.clientstylingurl), "mbsource" in i && t(30, c = i.mbsource), "lang" in i && t(31, u = i.lang), "endpoint" in i && t(32, v = i.endpoint), "session" in i && t(33, C = i.session), "translationurl" in i && t(34, w = i.translationurl), "templateid" in i && t(27, b = i.templateid);
988
+ }, n.$$.update = () => {
989
+ n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
990
+ 268435458 && p && U && ct(U, p), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
991
+ 536870914 && s && U && ut(U, s), n.$$.dirty[0] & /*mbsource, customStylingContainer*/
992
+ 1073741826 && c && U && pt(U, `${c}.Style`), n.$$.dirty[1] & /*lang*/
993
+ 1 && u && T(), n.$$.dirty[1] & /*lang, translationurl*/
994
+ 9 && u && w && W(), n.$$.dirty[0] & /*selectedChannel*/
995
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
996
+ 16 && t(15, l = j && (!F[j] || F[j] === 0)), n.$$.dirty[0] & /*selectedChannel*/
997
+ 1 | n.$$.dirty[1] & /*channelSubmitTimers*/
998
+ 16 && t(14, o = j && F[j] || 0);
999
+ }, [
1000
+ j,
1001
+ U,
1002
+ _,
1003
+ h,
1004
+ m,
1005
+ O,
1006
+ f,
1007
+ L,
1008
+ P,
1009
+ G,
1010
+ D,
1011
+ X,
1012
+ Q,
1013
+ q,
1014
+ o,
1015
+ l,
1016
+ a,
1017
+ ne,
1018
+ ie,
1019
+ Ie,
1020
+ je,
1021
+ Be,
1022
+ pe,
1023
+ de,
1024
+ xe,
1025
+ Ve,
1026
+ fe,
1027
+ b,
1028
+ p,
1029
+ s,
1030
+ c,
1031
+ u,
1032
+ v,
1033
+ C,
1034
+ w,
1035
+ F,
1036
+ Fe,
1037
+ Ue,
1038
+ qe,
1039
+ Ke,
1040
+ Ge,
1041
+ Xe
1042
+ ];
1043
+ }
1044
+ class Rt extends nt {
1045
+ constructor(e) {
1046
+ super(), lt(
1047
+ this,
1048
+ e,
1049
+ At,
1050
+ Lt,
1051
+ ot,
1052
+ {
1053
+ clientstyling: 28,
1054
+ clientstylingurl: 29,
1055
+ mbsource: 30,
1056
+ lang: 31,
1057
+ endpoint: 32,
1058
+ session: 33,
1059
+ translationurl: 34,
1060
+ templateid: 27
1061
+ },
1062
+ ht,
1063
+ [-1, -1, -1]
1064
+ );
1065
+ }
1066
+ get clientstyling() {
1067
+ return this.$$.ctx[28];
1068
+ }
1069
+ set clientstyling(e) {
1070
+ this.$$set({ clientstyling: e }), $();
1071
+ }
1072
+ get clientstylingurl() {
1073
+ return this.$$.ctx[29];
1074
+ }
1075
+ set clientstylingurl(e) {
1076
+ this.$$set({ clientstylingurl: e }), $();
1077
+ }
1078
+ get mbsource() {
1079
+ return this.$$.ctx[30];
1080
+ }
1081
+ set mbsource(e) {
1082
+ this.$$set({ mbsource: e }), $();
1083
+ }
1084
+ get lang() {
1085
+ return this.$$.ctx[31];
1086
+ }
1087
+ set lang(e) {
1088
+ this.$$set({ lang: e }), $();
1089
+ }
1090
+ get endpoint() {
1091
+ return this.$$.ctx[32];
1092
+ }
1093
+ set endpoint(e) {
1094
+ this.$$set({ endpoint: e }), $();
1095
+ }
1096
+ get session() {
1097
+ return this.$$.ctx[33];
1098
+ }
1099
+ set session(e) {
1100
+ this.$$set({ session: e }), $();
1101
+ }
1102
+ get translationurl() {
1103
+ return this.$$.ctx[34];
1104
+ }
1105
+ set translationurl(e) {
1106
+ this.$$set({ translationurl: e }), $();
1107
+ }
1108
+ get templateid() {
1109
+ return this.$$.ctx[27];
1110
+ }
1111
+ set templateid(e) {
1112
+ this.$$set({ templateid: e }), $();
1113
+ }
1114
+ }
1115
+ dt(Rt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {}, templateid: {} }, [], [], !0);
1116
+ export {
1117
+ Rt as default
1118
+ };