@everymatrix/cashier-method-details 1.0.69 → 1.0.71

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,926 @@
1
+ import { S as Te, b as je, f as R, c as ke, a as Le, d as Re, g as b, h as S, D as Y, j as f, l as v, k as w, n as G, v as g, w as xe, I as Pe, C as ne, E as P, y as A, A as K, z as D, K as se, x as Se, M as Ie } from "./CashierConfirmModal-Du_O46d4.js";
2
+ import "./CashierMethodDetails-BB054oOy.js";
3
+ import { i as Ae, a as De, $ as Ee, b as Me } from "./CashierError-BYyEe0s_.js";
4
+ Ae({
5
+ fallbackLocale: "en"
6
+ });
7
+ function ie(n, e) {
8
+ De(n, e);
9
+ }
10
+ function Ne(n) {
11
+ Ee.set(n);
12
+ }
13
+ const le = {
14
+ en: {
15
+ deposit: {
16
+ success: {
17
+ title: "{amount} {currency}",
18
+ subTitle: "Deposited in your account",
19
+ text: "Your deposit is successful"
20
+ },
21
+ pending: {
22
+ title: "{amount} {currency}",
23
+ subTitle: "Transaction is in progress",
24
+ text: "Thank you. Your deposit is being processed."
25
+ },
26
+ reject: {
27
+ title: "Deposit Rejected",
28
+ subTitle: " ",
29
+ text: " "
30
+ },
31
+ fail: {
32
+ title: "Error",
33
+ subTitle: " ",
34
+ text: "{errorText}"
35
+ },
36
+ cancel: {
37
+ title: "You have cancelled the transaction",
38
+ subTitle: " ",
39
+ text: " "
40
+ }
41
+ },
42
+ withdrawal: {
43
+ success: {
44
+ title: "{amount} {currency}",
45
+ subTitle: "Withdrawn from your account",
46
+ text: "Your withdrawal is successful"
47
+ },
48
+ pending: {
49
+ title: "{amount} {currency}",
50
+ subTitle: "Withdrawn from your account",
51
+ text: "Thank you. Your withdrawal is being processed."
52
+ },
53
+ reject: {
54
+ title: "Withdrawal Rejected",
55
+ subTitle: " ",
56
+ text: " "
57
+ },
58
+ fail: {
59
+ title: "Error",
60
+ subTitle: " ",
61
+ text: "{errorText}"
62
+ },
63
+ cancel: {
64
+ title: "You have cancelled the transaction",
65
+ subTitle: " ",
66
+ text: " "
67
+ }
68
+ },
69
+ reference: "Reference ID: {code}",
70
+ close: "Close"
71
+ },
72
+ "pt-br": {
73
+ deposit: {
74
+ success: {
75
+ title: "{amount} {currency}",
76
+ subTitle: "Depositado em sua conta",
77
+ text: "Seu depósito foi bem-sucedido"
78
+ },
79
+ pending: {
80
+ title: "{amount} {currency}",
81
+ subTitle: "Transação em andamento",
82
+ text: "Obrigado. Seu depósito está sendo processado."
83
+ },
84
+ reject: {
85
+ title: "Depósito Rejeitado",
86
+ subTitle: "",
87
+ text: "{errorText}"
88
+ },
89
+ fail: {
90
+ title: "Erro",
91
+ subTitle: "",
92
+ text: "{errorText}"
93
+ },
94
+ cancel: {
95
+ title: "Você cancelou a transação",
96
+ subTitle: "",
97
+ text: "{errorText}"
98
+ }
99
+ },
100
+ reference: "Referência ID: {code}",
101
+ close: "VOLTAR AO PROVEDOR DE PAGAMENTO"
102
+ },
103
+ "es-mx": {
104
+ deposit: {
105
+ success: {
106
+ title: "{amount} {currency}",
107
+ subTitle: "Depositado en tu cuenta",
108
+ text: "Tu depósito fue exitoso"
109
+ },
110
+ pending: {
111
+ title: "{amount} {currency}",
112
+ subTitle: "Transacción en proceso",
113
+ text: "Gracias. Tu depósito está siendo procesado."
114
+ },
115
+ reject: {
116
+ title: "Depósito Rechazado",
117
+ subTitle: " ",
118
+ text: "{errorText}"
119
+ },
120
+ fail: {
121
+ title: "Error",
122
+ subTitle: " ",
123
+ text: "{errorText}"
124
+ },
125
+ cancel: {
126
+ title: "Has cancelado la transacción",
127
+ subTitle: " ",
128
+ text: "{errorText}"
129
+ }
130
+ },
131
+ reference: "Referencia ID: {code}",
132
+ close: "REGRESAR A PROVEEDOR DE PAGO"
133
+ }
134
+ }, He = (n, e) => `${n + Oe[e]}`, Be = (n, e) => `${Z[e]}.${J[n]}.title`, Ve = (n, e) => `${Z[e]}.${J[n]}.subTitle`, ze = (n, e) => `${Z[e]}.${J[n]}.text`, Oe = {
135
+ Success: "/txn-success.png",
136
+ Voided: "/txn-success.png",
137
+ Rejected: "/txn-failed.png",
138
+ Failed: "/txn-failed.png",
139
+ Canceled: "/txn-failed.png",
140
+ PendingNotification: "/txn-pending.png",
141
+ PendingConfirmation: "/txn-pending.png",
142
+ PendingApprovalStage1: "/txn-pending.png",
143
+ PendingApprovalStage2: "/txn-pending.png",
144
+ PendingApprovalStage3: "/txn-pending.png",
145
+ PendingOfflineNotification: "/txn-pending.png"
146
+ }, Z = {
147
+ Deposit: "deposit",
148
+ Withdraw: "withdrawal"
149
+ }, J = {
150
+ Success: "success",
151
+ Voided: "success",
152
+ Rejected: "reject",
153
+ Failed: "fail",
154
+ Canceled: "cancel",
155
+ PendingNotification: "pending",
156
+ PendingConfirmation: "pending",
157
+ PendingApprovalStage1: "pending",
158
+ PendingApprovalStage3: "pending",
159
+ PendingApprovalStage2: "pending",
160
+ PendingOfflineNotification: "pending"
161
+ }, { document: Ue } = Pe;
162
+ function We(n) {
163
+ Re(n, "svelte-b9pf1j", ".CashierReceiptPageWidget.svelte-b9pf1j.svelte-b9pf1j{height:100%}.CashierReceiptPage.svelte-b9pf1j.svelte-b9pf1j{border-radius:var(--mmw--border-radius-medium-plus, 6px);background:var(--emw--color-background, #fff);padding:0 0 var(--emw--spacing-small-minus, 10px) 0;margin:0 auto;position:relative;word-wrap:break-word}.ReceiptWrapper.svelte-b9pf1j.svelte-b9pf1j{width:100%;height:200px;border-bottom:1px solid var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));display:flex;align-items:flex-end;flex-direction:row-reverse;position:relative}.TitleWrapper.svelte-b9pf1j.svelte-b9pf1j{display:flex;position:absolute;left:0;bottom:11px;flex-direction:column;justify-content:flex-end;flex-shrink:0}.Title.svelte-b9pf1j.svelte-b9pf1j{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-x-large-plus, 26px);font-weight:var(--emw--font-weight-semibold, 500);margin-bottom:0;line-height:var(--emw--font-size-x-large-plus, 26px)}.SubTitle.svelte-b9pf1j.svelte-b9pf1j{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-small, 14px);color:var(--mmw--color-grey-290, #666);margin-top:var(--emw--spacing-small, 12px)}.Text.svelte-b9pf1j.svelte-b9pf1j{padding:var(--emw--spacing-small, 12px) 0;font-size:var(--emw--font-size-small, 14px);color:var(--mmw--color-grey-10, #111)}.Reference.svelte-b9pf1j.svelte-b9pf1j{color:var(--mmw--color-grey-290, #666);font-size:var(--emw--font-size-x-small, 12px);font-weight:var(--emw--font-weight-normal, 400);margin:0}.PrimaryButton.svelte-b9pf1j.svelte-b9pf1j{color:var(--emw--color-white, #FFF);border:none;background:var(--emw--color-primary, #7EC51E);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;border-radius:var(--emw--border-radius-medium, 5px);height:36px;font-size:var(--emw--font-size-x-small, 12px);font-family:inherit;margin:var(--emw--spacing-large, 20px) 0;width:100%}.PrimaryButton.svelte-b9pf1j.svelte-b9pf1j:hover{background:var(--emw--color-hover, #71B11B)}.PrimaryButton.svelte-b9pf1j.svelte-b9pf1j:active{background:var(--emw--color-active, #5C950F)}.HeaderButtonContainer.svelte-b9pf1j.svelte-b9pf1j{position:absolute;z-index:1;right:0;display:flex;align-items:baseline;gap:var(--emw--spacing-small, 12px);padding:var(--emw--spacing-small, 12px) 0}.HeaderButtonContainer.svelte-b9pf1j>span.svelte-b9pf1j{cursor:pointer}.ReceiptField.svelte-b9pf1j.svelte-b9pf1j{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--font-size-medium, 16px);color:var(--emw--color-gray-150, #666);margin:var(--emw--spacing-small, 12px)}");
164
+ }
165
+ function oe(n, e, t) {
166
+ const i = n.slice();
167
+ return i[43] = e[t], i[45] = t, i;
168
+ }
169
+ function qe(n) {
170
+ let e;
171
+ return {
172
+ c() {
173
+ e = b("cashier-error"), P(
174
+ e,
175
+ "assetsurl",
176
+ /*assetsurl*/
177
+ n[3]
178
+ ), P(
179
+ e,
180
+ "translationurl",
181
+ /*translationurl*/
182
+ n[2]
183
+ ), P(
184
+ e,
185
+ "clientstylingurl",
186
+ /*clientstylingurl*/
187
+ n[5]
188
+ ), P(
189
+ e,
190
+ "clientstyling",
191
+ /*clientstyling*/
192
+ n[4]
193
+ ), P(e, "hidebuttons", "true"), P(
194
+ e,
195
+ "errorcode",
196
+ /*errorResponseCode*/
197
+ n[15]
198
+ );
199
+ },
200
+ m(t, i) {
201
+ w(t, e, i);
202
+ },
203
+ p(t, i) {
204
+ i[0] & /*assetsurl*/
205
+ 8 && P(
206
+ e,
207
+ "assetsurl",
208
+ /*assetsurl*/
209
+ t[3]
210
+ ), i[0] & /*translationurl*/
211
+ 4 && P(
212
+ e,
213
+ "translationurl",
214
+ /*translationurl*/
215
+ t[2]
216
+ ), i[0] & /*clientstylingurl*/
217
+ 32 && P(
218
+ e,
219
+ "clientstylingurl",
220
+ /*clientstylingurl*/
221
+ t[5]
222
+ ), i[0] & /*clientstyling*/
223
+ 16 && P(
224
+ e,
225
+ "clientstyling",
226
+ /*clientstyling*/
227
+ t[4]
228
+ ), i[0] & /*errorResponseCode*/
229
+ 32768 && P(
230
+ e,
231
+ "errorcode",
232
+ /*errorResponseCode*/
233
+ t[15]
234
+ );
235
+ },
236
+ d(t) {
237
+ t && g(e);
238
+ }
239
+ };
240
+ }
241
+ function Qe(n) {
242
+ let e, t, i, s, o, r, d, c, u, y, B, E, M, N, I, H, p, V, z, C, O = (
243
+ /*$_*/
244
+ n[17]("close") + ""
245
+ ), U, W, Q, j = (
246
+ /*showcontactbutton*/
247
+ n[1] && /*showcontactbutton*/
248
+ n[1] !== "false" && re(n)
249
+ ), h = (
250
+ /*showclosebutton*/
251
+ n[0] && /*showclosebutton*/
252
+ n[0] !== "false" && ae(n)
253
+ ), _ = (
254
+ /*txnInfo*/
255
+ n[8].referenceId && ce(n)
256
+ ), T = (
257
+ /*receiptFields*/
258
+ n[9].length && ue(n)
259
+ );
260
+ return {
261
+ c() {
262
+ e = b("div"), j && j.c(), t = S(), h && h.c(), i = S(), s = b("div"), o = b("img"), d = S(), c = b("div"), u = b("h2"), y = A(
263
+ /*title*/
264
+ n[11]
265
+ ), B = S(), E = b("div"), M = A(
266
+ /*subTitle*/
267
+ n[10]
268
+ ), N = S(), I = b("div"), H = A(
269
+ /*text*/
270
+ n[12]
271
+ ), p = S(), _ && _.c(), V = S(), T && T.c(), z = S(), C = b("button"), U = A(O), f(e, "class", "HeaderButtonContainer svelte-b9pf1j"), Y(o.src, r = /*statusImageUrl*/
272
+ n[13]) || f(o, "src", r), f(o, "class", "StatusLogo"), f(u, "class", "Title svelte-b9pf1j"), f(E, "class", "SubTitle svelte-b9pf1j"), f(c, "class", "TitleWrapper svelte-b9pf1j"), f(s, "class", "ReceiptWrapper svelte-b9pf1j"), f(I, "class", "Text svelte-b9pf1j"), f(C, "class", "PrimaryButton svelte-b9pf1j");
273
+ },
274
+ m(a, m) {
275
+ w(a, e, m), j && j.m(e, null), v(e, t), h && h.m(e, null), w(a, i, m), w(a, s, m), v(s, o), v(s, d), v(s, c), v(c, u), v(u, y), v(c, B), v(c, E), v(E, M), w(a, N, m), w(a, I, m), v(I, H), w(a, p, m), _ && _.m(a, m), w(a, V, m), T && T.m(a, m), w(a, z, m), w(a, C, m), v(C, U), W || (Q = K(
276
+ C,
277
+ "click",
278
+ /*closeReceipt*/
279
+ n[18]
280
+ ), W = !0);
281
+ },
282
+ p(a, m) {
283
+ /*showcontactbutton*/
284
+ a[1] && /*showcontactbutton*/
285
+ a[1] !== "false" ? j ? j.p(a, m) : (j = re(a), j.c(), j.m(e, t)) : j && (j.d(1), j = null), /*showclosebutton*/
286
+ a[0] && /*showclosebutton*/
287
+ a[0] !== "false" ? h ? h.p(a, m) : (h = ae(a), h.c(), h.m(e, null)) : h && (h.d(1), h = null), m[0] & /*statusImageUrl*/
288
+ 8192 && !Y(o.src, r = /*statusImageUrl*/
289
+ a[13]) && f(o, "src", r), m[0] & /*title*/
290
+ 2048 && D(
291
+ y,
292
+ /*title*/
293
+ a[11]
294
+ ), m[0] & /*subTitle*/
295
+ 1024 && D(
296
+ M,
297
+ /*subTitle*/
298
+ a[10]
299
+ ), m[0] & /*text*/
300
+ 4096 && D(
301
+ H,
302
+ /*text*/
303
+ a[12]
304
+ ), /*txnInfo*/
305
+ a[8].referenceId ? _ ? _.p(a, m) : (_ = ce(a), _.c(), _.m(V.parentNode, V)) : _ && (_.d(1), _ = null), /*receiptFields*/
306
+ a[9].length ? T ? T.p(a, m) : (T = ue(a), T.c(), T.m(z.parentNode, z)) : T && (T.d(1), T = null), m[0] & /*$_*/
307
+ 131072 && O !== (O = /*$_*/
308
+ a[17]("close") + "") && D(U, O);
309
+ },
310
+ d(a) {
311
+ a && (g(e), g(i), g(s), g(N), g(I), g(p), g(V), g(z), g(C)), j && j.d(), h && h.d(), _ && _.d(a), T && T.d(a), W = !1, Q();
312
+ }
313
+ };
314
+ }
315
+ function re(n) {
316
+ let e, t, i;
317
+ return {
318
+ c() {
319
+ e = b("span"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.33279 0.00663425C7.89688 0.105453 6.49895 0.511564 5.2336 1.19749C3.96825 1.88341 2.86499 2.83313 1.9985 3.9824C0.985792 5.31809 0.356137 6.84155 0.0769857 8.63039C-0.0256619 9.28509 -0.0256619 10.7147 0.0769857 11.3694C0.505101 14.1158 1.83326 16.3704 3.9851 18.0027C5.31451 19.0117 6.84672 19.6451 8.63053 19.923C9.28522 20.0257 10.7148 20.0257 11.3695 19.923C13.803 19.5437 15.8709 18.4471 17.4232 16.7121C18.8001 15.1736 19.595 13.4737 19.923 11.3694C20.0257 10.7147 20.0257 9.28509 19.923 8.63039C19.6451 6.84655 19.0117 5.31433 18.0028 3.9849C17.1973 2.91304 16.1846 2.01398 15.0249 1.34112C13.8652 0.668249 12.5821 0.235297 11.2518 0.0679732C10.614 0.00852964 9.97311 -0.0119547 9.33279 0.00663425ZM11.3019 1.33481C14.7956 1.87685 17.641 4.45559 18.4885 7.848C18.69 8.65292 18.7288 9.00343 18.7288 9.99988C18.7288 10.6946 18.715 10.97 18.6675 11.2855C18.4018 13.0557 17.6016 14.7024 16.374 16.0052C15.1464 17.308 13.5501 18.2045 11.7988 18.5748C10.686 18.8127 9.31401 18.8127 8.20117 18.5748C4.93272 17.8788 2.33398 15.3927 1.52156 12.1868C1.31126 11.3556 1.2712 11.0101 1.2712 9.99988C1.2712 8.98966 1.31126 8.64416 1.52156 7.81295C1.91376 6.29839 2.70396 4.91631 3.81023 3.81003C4.9165 2.70374 6.29856 1.91353 7.81311 1.52133C8.0885 1.45123 8.49409 1.36986 8.7144 1.34107L9.21512 1.27347C9.46673 1.23967 10.9689 1.28349 11.3019 1.33481ZM9.5481 5.25925C8.67685 5.35439 7.88821 5.8138 7.33116 6.54987C7.12462 6.82277 7.042 7.06437 7.09332 7.25339C7.17594 7.56009 7.55398 7.71781 7.87945 7.58262C7.94079 7.55633 8.16236 7.36355 8.37016 7.15325C8.79201 6.72763 8.99981 6.59995 9.41541 6.51232C10.5533 6.27197 11.541 6.85532 11.596 7.79918C11.6086 8.02326 11.5998 8.08084 11.5259 8.24107C11.3632 8.59659 11.0177 8.88826 10.5095 9.09982C10.1439 9.24341 9.76155 9.33975 9.3716 9.38649L9.1275 9.40902L9.13876 10.5306L9.14878 11.6523L9.23265 11.8025C9.42542 12.1517 9.96745 12.2118 10.2378 11.9152C10.3793 11.7587 10.4056 11.6247 10.4256 10.9638L10.4431 10.3416L10.6635 10.2815C12.1518 9.88095 13.1433 8.66669 12.973 7.44993C12.8579 6.62248 12.3709 5.96027 11.586 5.56845C11.0778 5.31433 10.2278 5.18539 9.5481 5.25925ZM9.37285 13.0568C9.06365 13.2108 8.90092 13.4799 8.89967 13.8404C8.89717 14.6003 9.77342 15.0071 10.3405 14.5089C10.4789 14.3866 10.576 14.2244 10.6186 14.0447C10.6612 13.8649 10.6471 13.6764 10.5783 13.505C10.3755 13.0493 9.81098 12.839 9.37285 13.0568Z" fill="#111111"></path></svg>', f(e, "class", "svelte-b9pf1j");
320
+ },
321
+ m(s, o) {
322
+ w(s, e, o), t || (i = K(
323
+ e,
324
+ "click",
325
+ /*liveChat*/
326
+ n[19]
327
+ ), t = !0);
328
+ },
329
+ p: G,
330
+ d(s) {
331
+ s && g(e), t = !1, i();
332
+ }
333
+ };
334
+ }
335
+ function ae(n) {
336
+ let e, t, i;
337
+ return {
338
+ c() {
339
+ e = b("span"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="20" viewBox="0 0 13 13" fill="none"><path d="M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z" fill="#111111"></path></svg>', f(e, "class", "svelte-b9pf1j");
340
+ },
341
+ m(s, o) {
342
+ w(s, e, o), t || (i = K(
343
+ e,
344
+ "click",
345
+ /*closeReceipt*/
346
+ n[18]
347
+ ), t = !0);
348
+ },
349
+ p: G,
350
+ d(s) {
351
+ s && g(e), t = !1, i();
352
+ }
353
+ };
354
+ }
355
+ function ce(n) {
356
+ let e, t = (
357
+ /*$_*/
358
+ n[17]("reference", {
359
+ values: { code: (
360
+ /*txnInfo*/
361
+ n[8].referenceId
362
+ ) }
363
+ }) + ""
364
+ ), i;
365
+ return {
366
+ c() {
367
+ e = b("div"), i = A(t), f(e, "class", "Reference svelte-b9pf1j");
368
+ },
369
+ m(s, o) {
370
+ w(s, e, o), v(e, i);
371
+ },
372
+ p(s, o) {
373
+ o[0] & /*$_, txnInfo*/
374
+ 131328 && t !== (t = /*$_*/
375
+ s[17]("reference", {
376
+ values: { code: (
377
+ /*txnInfo*/
378
+ s[8].referenceId
379
+ ) }
380
+ }) + "") && D(i, t);
381
+ },
382
+ d(s) {
383
+ s && g(e);
384
+ }
385
+ };
386
+ }
387
+ function ue(n) {
388
+ let e, t = se(
389
+ /*receiptFields*/
390
+ n[9]
391
+ ), i = [];
392
+ for (let s = 0; s < t.length; s += 1)
393
+ i[s] = fe(oe(n, t, s));
394
+ return {
395
+ c() {
396
+ for (let s = 0; s < i.length; s += 1)
397
+ i[s].c();
398
+ e = Se();
399
+ },
400
+ m(s, o) {
401
+ for (let r = 0; r < i.length; r += 1)
402
+ i[r] && i[r].m(s, o);
403
+ w(s, e, o);
404
+ },
405
+ p(s, o) {
406
+ if (o[0] & /*openUrlInNewTab, receiptFields, qrCodeContainer, FieldTypes*/
407
+ 1065600) {
408
+ t = se(
409
+ /*receiptFields*/
410
+ s[9]
411
+ );
412
+ let r;
413
+ for (r = 0; r < t.length; r += 1) {
414
+ const d = oe(s, t, r);
415
+ i[r] ? i[r].p(d, o) : (i[r] = fe(d), i[r].c(), i[r].m(e.parentNode, e));
416
+ }
417
+ for (; r < i.length; r += 1)
418
+ i[r].d(1);
419
+ i.length = t.length;
420
+ }
421
+ },
422
+ d(s) {
423
+ s && g(e), Ie(i, s);
424
+ }
425
+ };
426
+ }
427
+ function Ye(n) {
428
+ let e, t = (
429
+ /*field*/
430
+ n[43].defaultValue + ""
431
+ ), i;
432
+ return {
433
+ c() {
434
+ e = b("span"), i = A(t), f(e, "class", "Label");
435
+ },
436
+ m(s, o) {
437
+ w(s, e, o), v(e, i);
438
+ },
439
+ p(s, o) {
440
+ o[0] & /*receiptFields*/
441
+ 512 && t !== (t = /*field*/
442
+ s[43].defaultValue + "") && D(i, t);
443
+ },
444
+ d(s) {
445
+ s && g(e);
446
+ }
447
+ };
448
+ }
449
+ function Ge(n) {
450
+ let e, t = (
451
+ /*field*/
452
+ n[43].description + ""
453
+ ), i, s, o, r = (
454
+ /*field*/
455
+ n[43].Name + ""
456
+ ), d, c;
457
+ return {
458
+ c() {
459
+ e = b("span"), i = A(t), s = S(), o = b("a"), d = A(r), f(o, "href", c = /*field*/
460
+ n[43].defaultValue), f(o, "target", "_blank"), f(o, "rel", "noopener noreferrer");
461
+ },
462
+ m(u, y) {
463
+ w(u, e, y), v(e, i), v(e, s), v(e, o), v(o, d);
464
+ },
465
+ p(u, y) {
466
+ y[0] & /*receiptFields*/
467
+ 512 && t !== (t = /*field*/
468
+ u[43].description + "") && D(i, t), y[0] & /*receiptFields*/
469
+ 512 && r !== (r = /*field*/
470
+ u[43].Name + "") && D(d, r), y[0] & /*receiptFields*/
471
+ 512 && c !== (c = /*field*/
472
+ u[43].defaultValue) && f(o, "href", c);
473
+ },
474
+ d(u) {
475
+ u && g(e);
476
+ }
477
+ };
478
+ }
479
+ function Ke(n) {
480
+ let e, t, i;
481
+ return {
482
+ c() {
483
+ e = b("img"), Y(e.src, t = /*field*/
484
+ n[43].defaultValue) || f(e, "src", t), f(e, "title", i = /*field*/
485
+ n[43].description), f(e, "alt", "");
486
+ },
487
+ m(s, o) {
488
+ w(s, e, o);
489
+ },
490
+ p(s, o) {
491
+ o[0] & /*receiptFields*/
492
+ 512 && !Y(e.src, t = /*field*/
493
+ s[43].defaultValue) && f(e, "src", t), o[0] & /*receiptFields*/
494
+ 512 && i !== (i = /*field*/
495
+ s[43].description) && f(e, "title", i);
496
+ },
497
+ d(s) {
498
+ s && g(e);
499
+ }
500
+ };
501
+ }
502
+ function Ze(n) {
503
+ let e, t = (
504
+ /*field*/
505
+ n[43].defaultValue + ""
506
+ );
507
+ return {
508
+ c() {
509
+ e = b("span");
510
+ },
511
+ m(i, s) {
512
+ w(i, e, s), e.innerHTML = t;
513
+ },
514
+ p(i, s) {
515
+ s[0] & /*receiptFields*/
516
+ 512 && t !== (t = /*field*/
517
+ i[43].defaultValue + "") && (e.innerHTML = t);
518
+ },
519
+ d(i) {
520
+ i && g(e);
521
+ }
522
+ };
523
+ }
524
+ function Je(n) {
525
+ let e, t, i = (
526
+ /*field*/
527
+ n[43].defaultValue + ""
528
+ ), s, o, r;
529
+ function d() {
530
+ return (
531
+ /*click_handler*/
532
+ n[29](
533
+ /*field*/
534
+ n[43]
535
+ )
536
+ );
537
+ }
538
+ return {
539
+ c() {
540
+ e = b("div"), t = b("div"), s = A(i), f(e, "class", "QRCode");
541
+ },
542
+ m(c, u) {
543
+ w(c, e, u), v(e, t), v(t, s), n[28](t), o || (r = K(e, "click", d), o = !0);
544
+ },
545
+ p(c, u) {
546
+ n = c, u[0] & /*receiptFields*/
547
+ 512 && i !== (i = /*field*/
548
+ n[43].defaultValue + "") && D(s, i);
549
+ },
550
+ d(c) {
551
+ c && g(e), n[28](null), o = !1, r();
552
+ }
553
+ };
554
+ }
555
+ function fe(n) {
556
+ let e, t;
557
+ function i(r, d) {
558
+ return (
559
+ /*field*/
560
+ r[43].type === /*FieldTypes*/
561
+ r[7].QRCode ? Je : (
562
+ /*field*/
563
+ r[43].type === /*FieldTypes*/
564
+ r[7].Html ? Ze : (
565
+ /*field*/
566
+ r[43].type === /*FieldTypes*/
567
+ r[7].Image ? Ke : (
568
+ /*field*/
569
+ r[43].type === /*FieldTypes*/
570
+ r[7].Link ? Ge : Ye
571
+ )
572
+ )
573
+ )
574
+ );
575
+ }
576
+ let s = i(n), o = s(n);
577
+ return {
578
+ c() {
579
+ e = b("div"), o.c(), t = S(), f(e, "class", "ReceiptField svelte-b9pf1j");
580
+ },
581
+ m(r, d) {
582
+ w(r, e, d), o.m(e, null), v(e, t);
583
+ },
584
+ p(r, d) {
585
+ s === (s = i(r)) && o ? o.p(r, d) : (o.d(1), o = s(r), o && (o.c(), o.m(e, t)));
586
+ },
587
+ d(r) {
588
+ r && g(e), o.d();
589
+ }
590
+ };
591
+ }
592
+ function Xe(n) {
593
+ let e, t, i, s, o;
594
+ function r(u, y) {
595
+ if (
596
+ /*txnInfo*/
597
+ u[8]
598
+ ) return Qe;
599
+ if (
600
+ /*errorResponseCode*/
601
+ u[15] && !/*showErrorOutsideReceiptPage*/
602
+ u[16]
603
+ ) return qe;
604
+ }
605
+ let d = r(n), c = d && d(n);
606
+ return {
607
+ c() {
608
+ e = b("script"), i = S(), s = b("div"), o = b("div"), c && c.c(), Y(e.src, t = Fe) || f(e, "src", t), f(o, "class", "CashierReceiptPage svelte-b9pf1j"), f(s, "class", "CashierReceiptPageWidget svelte-b9pf1j");
609
+ },
610
+ m(u, y) {
611
+ v(Ue.head, e), w(u, i, y), w(u, s, y), v(s, o), c && c.m(o, null), n[30](s);
612
+ },
613
+ p(u, y) {
614
+ d === (d = r(u)) && c ? c.p(u, y) : (c && c.d(1), c = d && d(u), c && (c.c(), c.m(o, null)));
615
+ },
616
+ i: G,
617
+ o: G,
618
+ d(u) {
619
+ u && (g(i), g(s)), g(e), c && c.d(), n[30](null);
620
+ }
621
+ };
622
+ }
623
+ let Fe = "https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js", $e = "_blank";
624
+ function et(n, e, t) {
625
+ let i;
626
+ xe(n, Me, (l) => t(17, i = l));
627
+ let { endpoint: s } = e, { session: o } = e, { lang: r = "en" } = e, { local: d = "en-US" } = e, { showerrors: c = "true" } = e, { showclosebutton: u = "false" } = e, { showcontactbutton: y = "false" } = e, { translationurl: B } = e, { assetsurl: E = "" } = e, { customerid: M } = e, { transactionid: N } = e, { clientstyling: I = "" } = e, { clientstylingurl: H = "" } = e;
628
+ var p;
629
+ (function(l) {
630
+ l.Unknown = "Unknown", l.Text = "Text", l.Boolean = "Boolean", l.Number = "Number", l.Money = "Money", l.DateTime = "DateTime", l.Lookup = "Lookup", l.IpAddress = "IpAddress", l.Date = "Date", l.Time = "Time", l.LookupCollection = "LookupCollection", l.Hidden = "Hidden", l.Label = "Label", l.Password = "Password", l.Link = "Link", l.Image = "Image", l.Html = "Html", l.QRCode = "QR";
631
+ })(p || (p = {}));
632
+ const V = (l, [k, x]) => [
633
+ ...l,
634
+ ...Array.isArray(k) ? [...k.map((L) => [L, x])] : [[k, x]]
635
+ ], z = new Map([
636
+ [["Unknown", 0], p.Unknown],
637
+ [["Text", 1], p.Text],
638
+ [["Boolean", 2], p.Boolean],
639
+ [["Number", 3], p.Number],
640
+ [["Money", 4], p.Money],
641
+ [["DateTime", 5], p.DateTime],
642
+ [["Lookup", 6], p.Lookup],
643
+ [["IpAddress", 7], p.IpAddress],
644
+ [["Date", 8], p.Date],
645
+ [["Time", 9], p.Time],
646
+ [["LookupCollection", 10], p.LookupCollection],
647
+ [["Hidden", 11], p.Hidden],
648
+ [["Label", 12], p.Label],
649
+ [["Password", 13], p.Password],
650
+ [["Link", 14], p.Link],
651
+ [["Image", 15], p.Image],
652
+ [["Html", 19], p.Html],
653
+ [["QR", 20], p.QRCode]
654
+ ].reduce(V, []));
655
+ let C, O = [], U, W, Q, j, h, _ = [], T, a, m = new Intl.NumberFormat(d, { minimumFractionDigits: 2 });
656
+ const de = () => {
657
+ Ne(r);
658
+ }, pe = () => {
659
+ let l = B;
660
+ if (l)
661
+ return fetch(l).then((k) => k.json()).then((k) => {
662
+ Object.keys(k).forEach((x) => {
663
+ ie(x, k[x]);
664
+ });
665
+ }).catch((k) => {
666
+ });
667
+ };
668
+ Object.keys(le).forEach((l) => {
669
+ ie(l, le[l]);
670
+ });
671
+ const me = () => {
672
+ let l = document.createElement("style");
673
+ l.innerHTML = I, h.appendChild(l);
674
+ }, ge = () => {
675
+ let l = new URL(H), k = document.createElement("style");
676
+ fetch(l.href).then((x) => x.text()).then((x) => {
677
+ k.innerHTML = x, setTimeout(
678
+ () => {
679
+ h.appendChild(k);
680
+ },
681
+ 1
682
+ ), setTimeout(
683
+ () => {
684
+ },
685
+ 500
686
+ );
687
+ });
688
+ }, be = () => {
689
+ dispatchEvent(new CustomEvent(
690
+ "closeCashierReceiptPage",
691
+ {
692
+ bubbles: !0,
693
+ cancelable: !0,
694
+ composed: !0
695
+ }
696
+ ));
697
+ }, he = () => {
698
+ dispatchEvent(new CustomEvent(
699
+ "liveChatReceiptPage",
700
+ {
701
+ bubbles: !0,
702
+ cancelable: !0,
703
+ composed: !0
704
+ }
705
+ ));
706
+ }, ve = () => {
707
+ window.postMessage(
708
+ {
709
+ type: "ErrorResponseCode",
710
+ errorResponseCode: T,
711
+ showErrorOutsideReceiptPage: a
712
+ },
713
+ window.location.href
714
+ );
715
+ }, we = () => {
716
+ const l = new URL(`${s}/v1/player/${M}/payment/GetPaymentInfo`), k = new Headers();
717
+ k.append("accept", "application/json"), k.append("Content-Type", "application/json"), k.append("X-SessionId", `${o}`);
718
+ const x = {
719
+ method: "POST",
720
+ headers: k,
721
+ body: JSON.stringify({ TransactionCode: N })
722
+ };
723
+ fetch(l, x).then((L) => L.json()).then((L) => {
724
+ var F, $, ee, te;
725
+ if (L.ResponseCode !== "Success") {
726
+ t(15, T = L.ResponseCode), t(16, a = c.toLowerCase() === "false" || !c), ve();
727
+ return;
728
+ }
729
+ t(8, C = {
730
+ type: L.Transaction.Type,
731
+ referenceId: L.Transaction.Code,
732
+ status: (F = L.Transaction.Status) == null ? void 0 : F.Status,
733
+ message: ($ = L.Transaction.Status) == null ? void 0 : $.Message,
734
+ amount: (ee = L.Transaction.Amounts[0]) == null ? void 0 : ee.Amount,
735
+ currency: (te = L.Transaction.Amounts[0]) == null ? void 0 : te.Currency
736
+ }), t(9, O = L.ReceiptInfo && L.ReceiptInfo.ReceiptFields ? L.ReceiptInfo.ReceiptFields.map((q) => ({
737
+ type: z.get(q.Type),
738
+ name: q.Name,
739
+ description: q.Description,
740
+ defaultValue: q.DefaultValue,
741
+ useCopyButton: q.UseCopyButton,
742
+ usePrintButton: q.UsePrintButton
743
+ })) : []), t(11, W = i(Be(C.status, C.type), {
744
+ values: {
745
+ amount: m.format(C.amount),
746
+ currency: C.currency
747
+ }
748
+ })), t(10, U = i(Ve(C.status, C.type))), t(12, Q = i(ze(C.status, C.type), { values: { errorText: C.message } })), t(13, j = He(E, C.status));
749
+ });
750
+ }, X = (l) => {
751
+ l && window.postMessage(
752
+ {
753
+ type: "NavigateTo",
754
+ path: l,
755
+ target: $e,
756
+ externalLink: !1
757
+ },
758
+ window.location.href
759
+ );
760
+ };
761
+ function Ce(l) {
762
+ ne[l ? "unshift" : "push"](() => {
763
+ _[_.length] = l, t(14, _);
764
+ });
765
+ }
766
+ const _e = (l) => {
767
+ X(l.description);
768
+ };
769
+ function ye(l) {
770
+ ne[l ? "unshift" : "push"](() => {
771
+ h = l, t(6, h);
772
+ });
773
+ }
774
+ return n.$$set = (l) => {
775
+ "endpoint" in l && t(21, s = l.endpoint), "session" in l && t(22, o = l.session), "lang" in l && t(23, r = l.lang), "local" in l && t(24, d = l.local), "showerrors" in l && t(25, c = l.showerrors), "showclosebutton" in l && t(0, u = l.showclosebutton), "showcontactbutton" in l && t(1, y = l.showcontactbutton), "translationurl" in l && t(2, B = l.translationurl), "assetsurl" in l && t(3, E = l.assetsurl), "customerid" in l && t(26, M = l.customerid), "transactionid" in l && t(27, N = l.transactionid), "clientstyling" in l && t(4, I = l.clientstyling), "clientstylingurl" in l && t(5, H = l.clientstylingurl);
776
+ }, n.$$.update = () => {
777
+ n.$$.dirty[0] & /*endpoint, session, customerid, transactionid, showerrors*/
778
+ 241172480 && s && o && M && N && c && we(), n.$$.dirty[0] & /*lang*/
779
+ 8388608 && r && de(), n.$$.dirty[0] & /*lang, translationurl*/
780
+ 8388612 && r && B && pe(), n.$$.dirty[0] & /*clientstyling, customStylingContainer*/
781
+ 80 && I && h && me(), n.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
782
+ 96 && H && h && ge();
783
+ }, [
784
+ u,
785
+ y,
786
+ B,
787
+ E,
788
+ I,
789
+ H,
790
+ h,
791
+ p,
792
+ C,
793
+ O,
794
+ U,
795
+ W,
796
+ Q,
797
+ j,
798
+ _,
799
+ T,
800
+ a,
801
+ i,
802
+ be,
803
+ he,
804
+ X,
805
+ s,
806
+ o,
807
+ r,
808
+ d,
809
+ c,
810
+ M,
811
+ N,
812
+ Ce,
813
+ _e,
814
+ ye
815
+ ];
816
+ }
817
+ class tt extends Te {
818
+ constructor(e) {
819
+ super(), je(
820
+ this,
821
+ e,
822
+ et,
823
+ Xe,
824
+ Le,
825
+ {
826
+ endpoint: 21,
827
+ session: 22,
828
+ lang: 23,
829
+ local: 24,
830
+ showerrors: 25,
831
+ showclosebutton: 0,
832
+ showcontactbutton: 1,
833
+ translationurl: 2,
834
+ assetsurl: 3,
835
+ customerid: 26,
836
+ transactionid: 27,
837
+ clientstyling: 4,
838
+ clientstylingurl: 5
839
+ },
840
+ We,
841
+ [-1, -1]
842
+ );
843
+ }
844
+ get endpoint() {
845
+ return this.$$.ctx[21];
846
+ }
847
+ set endpoint(e) {
848
+ this.$$set({ endpoint: e }), R();
849
+ }
850
+ get session() {
851
+ return this.$$.ctx[22];
852
+ }
853
+ set session(e) {
854
+ this.$$set({ session: e }), R();
855
+ }
856
+ get lang() {
857
+ return this.$$.ctx[23];
858
+ }
859
+ set lang(e) {
860
+ this.$$set({ lang: e }), R();
861
+ }
862
+ get local() {
863
+ return this.$$.ctx[24];
864
+ }
865
+ set local(e) {
866
+ this.$$set({ local: e }), R();
867
+ }
868
+ get showerrors() {
869
+ return this.$$.ctx[25];
870
+ }
871
+ set showerrors(e) {
872
+ this.$$set({ showerrors: e }), R();
873
+ }
874
+ get showclosebutton() {
875
+ return this.$$.ctx[0];
876
+ }
877
+ set showclosebutton(e) {
878
+ this.$$set({ showclosebutton: e }), R();
879
+ }
880
+ get showcontactbutton() {
881
+ return this.$$.ctx[1];
882
+ }
883
+ set showcontactbutton(e) {
884
+ this.$$set({ showcontactbutton: e }), R();
885
+ }
886
+ get translationurl() {
887
+ return this.$$.ctx[2];
888
+ }
889
+ set translationurl(e) {
890
+ this.$$set({ translationurl: e }), R();
891
+ }
892
+ get assetsurl() {
893
+ return this.$$.ctx[3];
894
+ }
895
+ set assetsurl(e) {
896
+ this.$$set({ assetsurl: e }), R();
897
+ }
898
+ get customerid() {
899
+ return this.$$.ctx[26];
900
+ }
901
+ set customerid(e) {
902
+ this.$$set({ customerid: e }), R();
903
+ }
904
+ get transactionid() {
905
+ return this.$$.ctx[27];
906
+ }
907
+ set transactionid(e) {
908
+ this.$$set({ transactionid: e }), R();
909
+ }
910
+ get clientstyling() {
911
+ return this.$$.ctx[4];
912
+ }
913
+ set clientstyling(e) {
914
+ this.$$set({ clientstyling: e }), R();
915
+ }
916
+ get clientstylingurl() {
917
+ return this.$$.ctx[5];
918
+ }
919
+ set clientstylingurl(e) {
920
+ this.$$set({ clientstylingurl: e }), R();
921
+ }
922
+ }
923
+ ke(tt, { endpoint: {}, session: {}, lang: {}, local: {}, showerrors: {}, showclosebutton: {}, showcontactbutton: {}, translationurl: {}, assetsurl: {}, customerid: {}, transactionid: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
924
+ export {
925
+ tt as default
926
+ };