@invoice-sdk/widget 1.124.0 → 1.124.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-Bh9yQ9hE.js → index-D8SOjo7a.js} +3 -3
- package/dist/{index-DqNES6rw.js → index-tAcS3qVN.js} +146 -148
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/{loading-BU9hOP_i.js → loading-riArY4Yy.js} +2 -2
- package/dist/{widget-C0kRNRwJ.js → widget-DN6mATiV.js} +2 -2
- package/package.json +1 -1
|
@@ -5100,7 +5100,7 @@ function od(e) {
|
|
|
5100
5100
|
function Yd(e) {
|
|
5101
5101
|
return S(this, null, function* () {
|
|
5102
5102
|
if (pe(e), !ie) {
|
|
5103
|
-
const { InvoiceRegisterWidget: i } = yield import("./widget-
|
|
5103
|
+
const { InvoiceRegisterWidget: i } = yield import("./widget-DN6mATiV.js");
|
|
5104
5104
|
ie = i;
|
|
5105
5105
|
}
|
|
5106
5106
|
const A = me(e.selector), t = yield ie(
|
|
@@ -5123,7 +5123,7 @@ function Yd(e) {
|
|
|
5123
5123
|
function xd(e) {
|
|
5124
5124
|
return S(this, null, function* () {
|
|
5125
5125
|
if (pe(e), !te) {
|
|
5126
|
-
const { EContractWidget: t } = yield import("./widget-
|
|
5126
|
+
const { EContractWidget: t } = yield import("./widget-DN6mATiV.js");
|
|
5127
5127
|
te = t;
|
|
5128
5128
|
}
|
|
5129
5129
|
const A = me(e.selector);
|
|
@@ -5174,7 +5174,7 @@ function Zd(e) {
|
|
|
5174
5174
|
})
|
|
5175
5175
|
};
|
|
5176
5176
|
}
|
|
5177
|
-
ne || (ne = (yield import("./index-
|
|
5177
|
+
ne || (ne = (yield import("./index-tAcS3qVN.js")).createInvoiceRequestFlow);
|
|
5178
5178
|
const i = ne({
|
|
5179
5179
|
uuid: t,
|
|
5180
5180
|
orderInfo: e.orderInfo || { code: "", address: "", total: "" },
|
|
@@ -13,20 +13,20 @@ var W = (r, e, t) => new Promise((n, d) => {
|
|
|
13
13
|
var c = (l) => {
|
|
14
14
|
try {
|
|
15
15
|
g(t.next(l));
|
|
16
|
-
} catch (
|
|
17
|
-
d(
|
|
16
|
+
} catch (f) {
|
|
17
|
+
d(f);
|
|
18
18
|
}
|
|
19
19
|
}, s = (l) => {
|
|
20
20
|
try {
|
|
21
21
|
g(t.throw(l));
|
|
22
|
-
} catch (
|
|
23
|
-
d(
|
|
22
|
+
} catch (f) {
|
|
23
|
+
d(f);
|
|
24
24
|
}
|
|
25
25
|
}, g = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(c, s);
|
|
26
26
|
g((t = t.apply(r, e)).next());
|
|
27
27
|
});
|
|
28
|
-
import { c as U, f as te, e as le, b as de, o as ce, p as ge, s as ue, q as
|
|
29
|
-
import { t as i, c as J, j as
|
|
28
|
+
import { c as U, f as te, e as le, b as de, o as ce, p as ge, s as ue, q as pe } from "./loading-riArY4Yy.js";
|
|
29
|
+
import { t as i, c as J, j as we } from "./index-D8SOjo7a.js";
|
|
30
30
|
function D(r) {
|
|
31
31
|
const e = r.trim();
|
|
32
32
|
return e ? e.length < 2 || e.length > 250 ? { valid: !1, error: i("length_2_250") } : /[<>:"\/\\|?*@#$%!^]/.test(e) ? { valid: !1, error: i("invalid_characters") } : { valid: !0 } : { valid: !1, error: i("required_name") };
|
|
@@ -64,46 +64,46 @@ function me({ defaultValues: r = {}, onChange: e } = {}) {
|
|
|
64
64
|
const t = {
|
|
65
65
|
representativeName: r.representativeName || "",
|
|
66
66
|
buyerAddress: r.buyerAddress || "",
|
|
67
|
-
email: r.email || ""
|
|
68
|
-
|
|
67
|
+
email: r.email || "",
|
|
68
|
+
phone: r.phone || ""
|
|
69
69
|
}, n = document.createElement("div");
|
|
70
70
|
n.className = "wgt:space-y-2";
|
|
71
71
|
function d() {
|
|
72
72
|
typeof e == "function" && e(O({}, t));
|
|
73
73
|
}
|
|
74
|
-
function c({ label: P, required: o, name: a, type: m = "text", placeholder:
|
|
74
|
+
function c({ label: P, required: o, name: a, type: m = "text", placeholder: h }) {
|
|
75
75
|
const V = document.createElement("div");
|
|
76
76
|
V.className = "";
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
77
|
+
const A = document.createElement("label");
|
|
78
|
+
A.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", A.htmlFor = a, A.innerHTML = o ? `${P} <span class="wgt:text-semantic-error wgt:text-[#ED1C24]">*</span>` : P;
|
|
79
|
+
const w = document.createElement("input");
|
|
80
|
+
w.id = a, w.name = a, w.type = m, w.placeholder = h || "", w.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", w.value = t[a] || "";
|
|
81
81
|
const T = document.createElement("div");
|
|
82
|
-
return T.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", T.setAttribute("data-error-for", a),
|
|
83
|
-
t[a] =
|
|
82
|
+
return T.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", T.setAttribute("data-error-for", a), w.addEventListener("input", () => {
|
|
83
|
+
t[a] = w.value, w.classList.remove(
|
|
84
84
|
"wgt:border-semantic-error",
|
|
85
85
|
"wgt:bg-semantic-error-50"
|
|
86
86
|
), T.classList.add("wgt:hidden"), d();
|
|
87
|
-
}),
|
|
88
|
-
let
|
|
87
|
+
}), w.addEventListener("blur", () => {
|
|
88
|
+
let H;
|
|
89
89
|
switch (a) {
|
|
90
90
|
case "representativeName":
|
|
91
|
-
|
|
91
|
+
H = D(w.value);
|
|
92
92
|
break;
|
|
93
93
|
case "buyerAddress":
|
|
94
|
-
|
|
94
|
+
H = Q(w.value);
|
|
95
95
|
break;
|
|
96
96
|
case "email":
|
|
97
|
-
|
|
97
|
+
H = z(w.value);
|
|
98
98
|
break;
|
|
99
99
|
default:
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
!
|
|
102
|
+
!H.valid && H.error && (w.classList.add(
|
|
103
103
|
"wgt:border-semantic-error",
|
|
104
104
|
"wgt:bg-semantic-error-50"
|
|
105
|
-
), T.textContent =
|
|
106
|
-
}), V.appendChild(
|
|
105
|
+
), T.textContent = H.error, T.classList.remove("wgt:hidden"));
|
|
106
|
+
}), V.appendChild(A), V.appendChild(w), V.appendChild(T), { field: V, input: w, errorEl: T };
|
|
107
107
|
}
|
|
108
108
|
const {
|
|
109
109
|
field: s,
|
|
@@ -114,7 +114,7 @@ function me({ defaultValues: r = {}, onChange: e } = {}) {
|
|
|
114
114
|
required: !0,
|
|
115
115
|
name: "representativeName",
|
|
116
116
|
placeholder: i("representativeName_input")
|
|
117
|
-
}), { field:
|
|
117
|
+
}), { field: f, errorEl: C } = c({
|
|
118
118
|
label: i("buyerAddress"),
|
|
119
119
|
required: !1,
|
|
120
120
|
name: "buyerAddress",
|
|
@@ -130,22 +130,22 @@ function me({ defaultValues: r = {}, onChange: e } = {}) {
|
|
|
130
130
|
type: "email",
|
|
131
131
|
placeholder: i("email_input")
|
|
132
132
|
});
|
|
133
|
-
n.appendChild(s), n.appendChild(
|
|
134
|
-
function
|
|
133
|
+
n.appendChild(s), n.appendChild(f), n.appendChild(M);
|
|
134
|
+
function p() {
|
|
135
135
|
let P = !0;
|
|
136
|
-
function o(
|
|
137
|
-
|
|
136
|
+
function o(h, V, A) {
|
|
137
|
+
h.classList.add(
|
|
138
138
|
"wgt:border-semantic-error",
|
|
139
139
|
"wgt:bg-semantic-error-50"
|
|
140
|
-
),
|
|
140
|
+
), A && V && (V.textContent = A, V.classList.remove("wgt:hidden")), P = !1;
|
|
141
141
|
}
|
|
142
142
|
const a = D(t.representativeName);
|
|
143
143
|
if (a.valid || o(g, l, a.error), t.buyerAddress.trim()) {
|
|
144
|
-
const
|
|
145
|
-
|
|
144
|
+
const h = Q(t.buyerAddress);
|
|
145
|
+
h.valid || o(
|
|
146
146
|
document.querySelector('input[name="buyerAddress"]'),
|
|
147
147
|
C,
|
|
148
|
-
|
|
148
|
+
h.error
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
151
|
const m = z(t.email);
|
|
@@ -154,7 +154,7 @@ function me({ defaultValues: r = {}, onChange: e } = {}) {
|
|
|
154
154
|
function k() {
|
|
155
155
|
return O({}, t);
|
|
156
156
|
}
|
|
157
|
-
return { container: n, getValues: k, validate:
|
|
157
|
+
return { container: n, getValues: k, validate: p };
|
|
158
158
|
}
|
|
159
159
|
function Ce({
|
|
160
160
|
defaultValues: r = {},
|
|
@@ -175,23 +175,23 @@ function Ce({
|
|
|
175
175
|
function c() {
|
|
176
176
|
typeof e == "function" && e(O({}, n));
|
|
177
177
|
}
|
|
178
|
-
function s({ label:
|
|
178
|
+
function s({ label: x, required: L, name: v, type: K = "text", placeholder: I }) {
|
|
179
179
|
const q = document.createElement("div");
|
|
180
180
|
q.className = "";
|
|
181
181
|
const B = document.createElement("label");
|
|
182
|
-
B.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", B.htmlFor =
|
|
182
|
+
B.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950", B.htmlFor = v, B.innerHTML = L ? `${x} <span class="wgt:text-[#ED1C24]">*</span>` : x;
|
|
183
183
|
const N = document.createElement("input");
|
|
184
|
-
N.id =
|
|
184
|
+
N.id = v, N.name = v, N.type = K, N.placeholder = I || "", N.className = "wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary", N.value = n[v] || "";
|
|
185
185
|
const R = document.createElement("div");
|
|
186
|
-
return R.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", R.setAttribute("data-error-for",
|
|
187
|
-
n[
|
|
186
|
+
return R.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", R.setAttribute("data-error-for", v), N.addEventListener("input", () => {
|
|
187
|
+
n[v] = N.value, N.classList.remove(
|
|
188
188
|
"wgt:border-semantic-error",
|
|
189
189
|
"wgt:bg-semantic-error-50"
|
|
190
190
|
), R.classList.add("wgt:hidden"), c();
|
|
191
191
|
}), N.addEventListener("blur", () => {
|
|
192
192
|
if (!N.value.trim() && !L) return;
|
|
193
193
|
let j;
|
|
194
|
-
switch (
|
|
194
|
+
switch (v) {
|
|
195
195
|
case "businesName":
|
|
196
196
|
case "representativeName":
|
|
197
197
|
j = D(N.value);
|
|
@@ -218,13 +218,13 @@ function Ce({
|
|
|
218
218
|
g.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:font-medium wgt:text-strong-950 wgt:text-sm";
|
|
219
219
|
const l = document.createElement("input");
|
|
220
220
|
l.type = "checkbox", l.className = "wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary", l.checked = n.noTaxCode;
|
|
221
|
-
const
|
|
222
|
-
|
|
221
|
+
const f = document.createElement("span");
|
|
222
|
+
f.textContent = i("business_noTaxCode"), f.className = "wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]", f.style.fontFamily = "Inter, sans-serif", l.addEventListener("change", () => {
|
|
223
223
|
n.noTaxCode = l.checked, u.disabled = n.noTaxCode, k.disabled = n.noTaxCode, u.classList.remove(
|
|
224
224
|
"wgt:border-semantic-error",
|
|
225
225
|
"wgt:bg-semantic-error-50"
|
|
226
|
-
),
|
|
227
|
-
}), g.appendChild(l), g.appendChild(
|
|
226
|
+
), p.classList.add("wgt:hidden"), c();
|
|
227
|
+
}), g.appendChild(l), g.appendChild(f);
|
|
228
228
|
const C = document.createElement("div");
|
|
229
229
|
C.className = "wgt:space-y-2";
|
|
230
230
|
const M = document.createElement("label");
|
|
@@ -233,19 +233,19 @@ function Ce({
|
|
|
233
233
|
b.className = "wgt:flex wgt:gap-2 wgt:mt-2";
|
|
234
234
|
const u = document.createElement("input");
|
|
235
235
|
u.type = "text", u.name = "taxCode", u.placeholder = i("taxCode_input"), u.value = n.taxCode, u.className = "wgt:flex-1 wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary";
|
|
236
|
-
const
|
|
237
|
-
|
|
236
|
+
const p = document.createElement("div");
|
|
237
|
+
p.className = "wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden", u.addEventListener("input", () => {
|
|
238
238
|
n.taxCode = u.value, u.classList.remove(
|
|
239
239
|
"wgt:border-semantic-error",
|
|
240
240
|
"wgt:bg-semantic-error-50"
|
|
241
|
-
),
|
|
241
|
+
), p.classList.add("wgt:hidden"), c();
|
|
242
242
|
}), u.addEventListener("blur", () => {
|
|
243
243
|
if (n.noTaxCode || !u.value.trim()) return;
|
|
244
|
-
const
|
|
245
|
-
|
|
244
|
+
const x = G(u.value);
|
|
245
|
+
x.valid || (u.classList.add(
|
|
246
246
|
"wgt:border-semantic-error",
|
|
247
247
|
"wgt:bg-semantic-error-50"
|
|
248
|
-
),
|
|
248
|
+
), p.textContent = x.error, p.classList.remove("wgt:hidden"));
|
|
249
249
|
});
|
|
250
250
|
const k = U({
|
|
251
251
|
type: "button",
|
|
@@ -254,38 +254,38 @@ function Ce({
|
|
|
254
254
|
handleClick: () => W(null, null, function* () {
|
|
255
255
|
if (n.noTaxCode || typeof t != "function")
|
|
256
256
|
return;
|
|
257
|
-
const
|
|
258
|
-
if (!
|
|
257
|
+
const x = String(n.taxCode || "").trim();
|
|
258
|
+
if (!x) {
|
|
259
259
|
u.classList.add(
|
|
260
260
|
"wgt:border-semantic-error",
|
|
261
261
|
"wgt:bg-semantic-error-50"
|
|
262
|
-
),
|
|
262
|
+
), p.textContent = "Vui lòng nhập MST", p.classList.remove("wgt:hidden");
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
|
-
const L = G(
|
|
265
|
+
const L = G(x);
|
|
266
266
|
if (!L.valid) {
|
|
267
267
|
u.classList.add(
|
|
268
268
|
"wgt:border-semantic-error",
|
|
269
269
|
"wgt:bg-semantic-error-50"
|
|
270
|
-
),
|
|
270
|
+
), p.textContent = L.error, p.classList.remove("wgt:hidden");
|
|
271
271
|
return;
|
|
272
272
|
}
|
|
273
273
|
try {
|
|
274
274
|
k.disabled = !0;
|
|
275
|
-
const
|
|
276
|
-
if (!
|
|
277
|
-
|
|
278
|
-
} catch (
|
|
275
|
+
const v = yield t(x, O({}, n));
|
|
276
|
+
if (!v || typeof v != "object") return;
|
|
277
|
+
v.businessName != null && (n.businessName = String(v.businessName || ""), o.value = n.businessName), v.representativeName != null && (n.representativeName = String(v.representativeName || ""), h.value = n.representativeName), v.buyerAddress != null && (n.buyerAddress = String(v.buyerAddress || ""), w.value = n.buyerAddress), c();
|
|
278
|
+
} catch (v) {
|
|
279
279
|
u.classList.add(
|
|
280
280
|
"wgt:border-semantic-error",
|
|
281
281
|
"wgt:bg-semantic-error-50"
|
|
282
|
-
),
|
|
282
|
+
), p.textContent = "Không tìm thấy thông tin MST", p.classList.remove("wgt:hidden");
|
|
283
283
|
} finally {
|
|
284
284
|
k.disabled = n.noTaxCode;
|
|
285
285
|
}
|
|
286
286
|
})
|
|
287
287
|
});
|
|
288
|
-
b.appendChild(u), b.appendChild(k), C.appendChild(M), C.appendChild(b), C.appendChild(
|
|
288
|
+
b.appendChild(u), b.appendChild(k), C.appendChild(M), C.appendChild(b), C.appendChild(p);
|
|
289
289
|
const {
|
|
290
290
|
field: P,
|
|
291
291
|
input: o,
|
|
@@ -297,7 +297,7 @@ function Ce({
|
|
|
297
297
|
placeholder: i("businessName_input")
|
|
298
298
|
}), {
|
|
299
299
|
field: m,
|
|
300
|
-
input:
|
|
300
|
+
input: h,
|
|
301
301
|
errorEl: V
|
|
302
302
|
} = s({
|
|
303
303
|
label: i("representativeName"),
|
|
@@ -305,8 +305,8 @@ function Ce({
|
|
|
305
305
|
name: "representativeName",
|
|
306
306
|
placeholder: i("representativeName_input")
|
|
307
307
|
}), {
|
|
308
|
-
field:
|
|
309
|
-
input:
|
|
308
|
+
field: A,
|
|
309
|
+
input: w,
|
|
310
310
|
errorEl: T
|
|
311
311
|
} = s({
|
|
312
312
|
label: i("buyerAddress"),
|
|
@@ -314,7 +314,7 @@ function Ce({
|
|
|
314
314
|
name: "buyerAddress",
|
|
315
315
|
placeholder: i("buyerAddress_input")
|
|
316
316
|
}), {
|
|
317
|
-
field:
|
|
317
|
+
field: H,
|
|
318
318
|
input: X,
|
|
319
319
|
errorEl: F
|
|
320
320
|
} = s({
|
|
@@ -334,33 +334,33 @@ function Ce({
|
|
|
334
334
|
type: "tel",
|
|
335
335
|
placeholder: i("phone_input")
|
|
336
336
|
});
|
|
337
|
-
d.appendChild(g), d.appendChild(C), d.appendChild(P), d.appendChild(m), d.appendChild(
|
|
337
|
+
d.appendChild(g), d.appendChild(C), d.appendChild(P), d.appendChild(m), d.appendChild(A), d.appendChild(H), d.appendChild(y), u.disabled = n.noTaxCode, k.disabled = n.noTaxCode;
|
|
338
338
|
function Z() {
|
|
339
|
-
let
|
|
339
|
+
let x = !0;
|
|
340
340
|
function L(q, B, N) {
|
|
341
341
|
q.classList.add(
|
|
342
342
|
"wgt:border-semantic-error",
|
|
343
343
|
"wgt:bg-semantic-error-50",
|
|
344
344
|
"wgt:mt-2"
|
|
345
|
-
), N && B && (B.textContent = N, B.classList.remove("wgt:hidden")),
|
|
345
|
+
), N && B && (B.textContent = N, B.classList.remove("wgt:hidden")), x = !1;
|
|
346
346
|
}
|
|
347
347
|
if (!n.noTaxCode) {
|
|
348
348
|
const q = G(n.taxCode);
|
|
349
|
-
q.valid || L(u,
|
|
349
|
+
q.valid || L(u, p, q.error);
|
|
350
350
|
}
|
|
351
|
-
const
|
|
352
|
-
|
|
351
|
+
const v = D(n.businessName);
|
|
352
|
+
v.valid || L(o, a, v.error);
|
|
353
353
|
const K = D(n.representativeName);
|
|
354
|
-
if (K.valid || L(
|
|
354
|
+
if (K.valid || L(h, V, K.error), n.buyerAddress.trim()) {
|
|
355
355
|
const q = Q(n.buyerAddress);
|
|
356
|
-
q.valid || L(
|
|
356
|
+
q.valid || L(w, T, q.error);
|
|
357
357
|
}
|
|
358
358
|
const I = z(n.email);
|
|
359
359
|
if (I.valid || L(X, F, I.error), n.phone.trim()) {
|
|
360
360
|
const q = ee(n.phone, !0);
|
|
361
361
|
q.valid || L(E, S, q.error);
|
|
362
362
|
}
|
|
363
|
-
return
|
|
363
|
+
return x;
|
|
364
364
|
}
|
|
365
365
|
function Y() {
|
|
366
366
|
return O({}, n);
|
|
@@ -384,30 +384,30 @@ function fe({
|
|
|
384
384
|
g.className = "wgt:w-full wgt:max-w-md wgt:bg-white wgt:rounded-2xl wgt:shadow-xl wgt:max-h-[90vh] wgt:overflow-y-auto";
|
|
385
385
|
const l = document.createElement("div");
|
|
386
386
|
l.className = "wgt:px-6 wgt:pt-6 wgt:pb-4 wgt:space-y-2";
|
|
387
|
-
const
|
|
388
|
-
|
|
387
|
+
const f = document.createElement("h3");
|
|
388
|
+
f.className = "wgt:text-xl wgt:font-semibold wgt:text-center wgt:text-strong-950", f.textContent = i("confirmation_popup_title");
|
|
389
389
|
const C = document.createElement("p");
|
|
390
|
-
C.className = "wgt:text-sm wgt:text-center wgt:text-[#525866]", C.textContent = i("confirmation_popup_subtitle"), l.appendChild(
|
|
390
|
+
C.className = "wgt:text-sm wgt:text-center wgt:text-[#525866]", C.textContent = i("confirmation_popup_subtitle"), l.appendChild(f), l.appendChild(C), g.appendChild(l);
|
|
391
391
|
const M = document.createElement("div");
|
|
392
392
|
M.className = "wgt:px-6 wgt:pb-4";
|
|
393
393
|
const b = document.createElement("div");
|
|
394
394
|
b.className = "wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";
|
|
395
|
-
function u(
|
|
395
|
+
function u(w, T, H) {
|
|
396
396
|
const X = document.createElement("div");
|
|
397
397
|
X.className = "wgt:flex wgt:items-start wgt:gap-3";
|
|
398
398
|
const F = document.createElement("span");
|
|
399
|
-
F.className = "wgt:text-primary wgt:flex-shrink-0", F.innerHTML =
|
|
399
|
+
F.className = "wgt:text-primary wgt:flex-shrink-0", F.innerHTML = w;
|
|
400
400
|
const y = document.createElement("div");
|
|
401
401
|
y.className = "wgt:flex wgt:items-start wgt:justify-between wgt:flex-1 wgt:gap-2";
|
|
402
402
|
const E = document.createElement("span");
|
|
403
403
|
E.className = "wgt:text-sm wgt:text-[#525866] wgt:w-1/3", E.textContent = T;
|
|
404
404
|
const S = document.createElement("span");
|
|
405
|
-
return S.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", S.textContent =
|
|
405
|
+
return S.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", S.textContent = H || "-", y.appendChild(E), y.appendChild(S), X.appendChild(F), X.appendChild(y), X;
|
|
406
406
|
}
|
|
407
|
-
const
|
|
407
|
+
const p = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>', k = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>', P = '<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';
|
|
408
408
|
b.appendChild(
|
|
409
409
|
u(
|
|
410
|
-
|
|
410
|
+
p,
|
|
411
411
|
i("confirmation_popup_orderCode"),
|
|
412
412
|
t == null ? void 0 : t.billNo
|
|
413
413
|
)
|
|
@@ -415,7 +415,7 @@ function fe({
|
|
|
415
415
|
u(
|
|
416
416
|
k,
|
|
417
417
|
i("confirmation_popup_address"),
|
|
418
|
-
t == null ? void 0 : t.
|
|
418
|
+
t == null ? void 0 : t.address
|
|
419
419
|
)
|
|
420
420
|
), b.appendChild(
|
|
421
421
|
u(
|
|
@@ -428,19 +428,17 @@ function fe({
|
|
|
428
428
|
o.className = "wgt:px-6 wgt:pb-6";
|
|
429
429
|
const a = document.createElement("div");
|
|
430
430
|
a.className = "wgt:space-y-3 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:px-4 wgt:py-4";
|
|
431
|
-
function m(
|
|
432
|
-
const
|
|
433
|
-
|
|
431
|
+
function m(w, T) {
|
|
432
|
+
const H = document.createElement("div");
|
|
433
|
+
H.className = "wgt:flex wgt:items-start wgt:justify-between wgt:gap-4";
|
|
434
434
|
const X = document.createElement("span");
|
|
435
|
-
X.className = "wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3", X.textContent =
|
|
435
|
+
X.className = "wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3", X.textContent = w;
|
|
436
436
|
const F = document.createElement("span");
|
|
437
|
-
return F.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", F.textContent = T || "-",
|
|
437
|
+
return F.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3", F.textContent = T || "-", H.appendChild(X), H.appendChild(F), H;
|
|
438
438
|
}
|
|
439
439
|
r === "business" ? (a.appendChild(
|
|
440
440
|
m(i("confirmation_popup_taxCode"), e.taxCode)
|
|
441
|
-
), a.appendChild(
|
|
442
|
-
m(i("businessName"), e.businessName)
|
|
443
|
-
), a.appendChild(
|
|
441
|
+
), a.appendChild(m(i("businessName"), e.businessName)), a.appendChild(
|
|
444
442
|
m(
|
|
445
443
|
i("confirmation_popup_representativeName"),
|
|
446
444
|
e.representativeName
|
|
@@ -461,8 +459,8 @@ function fe({
|
|
|
461
459
|
), a.appendChild(
|
|
462
460
|
m(i("confirmation_popup_email"), e.email)
|
|
463
461
|
)), o.appendChild(a), g.appendChild(o);
|
|
464
|
-
const
|
|
465
|
-
|
|
462
|
+
const h = document.createElement("div");
|
|
463
|
+
h.className = "wgt:px-6 wgt:pb-6 wgt:flex wgt:gap-3";
|
|
466
464
|
const V = U({
|
|
467
465
|
type: "button",
|
|
468
466
|
title: "Đóng",
|
|
@@ -470,7 +468,7 @@ function fe({
|
|
|
470
468
|
handleClick: () => {
|
|
471
469
|
typeof d == "function" && d(), s.remove();
|
|
472
470
|
}
|
|
473
|
-
}),
|
|
471
|
+
}), A = U({
|
|
474
472
|
type: "button",
|
|
475
473
|
title: "Xác nhận",
|
|
476
474
|
className: "wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-primary wgt:text-white",
|
|
@@ -478,8 +476,8 @@ function fe({
|
|
|
478
476
|
typeof c == "function" && c({ type: r, data: e }), s.remove();
|
|
479
477
|
}
|
|
480
478
|
});
|
|
481
|
-
return
|
|
482
|
-
|
|
479
|
+
return h.appendChild(V), h.appendChild(A), g.appendChild(h), s.appendChild(g), s.addEventListener("click", (w) => {
|
|
480
|
+
w.target === s && (typeof d == "function" && d(), s.remove());
|
|
483
481
|
}), { overlay: s };
|
|
484
482
|
}
|
|
485
483
|
const he = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAABICAYAAABbaA9tAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAKz9JREFUeAHtXQd4HNW1PlO3aqVdrVaymiVZso0bocR54AAGQu/F5BkIHZxAgNBDHkU8kgChBgLEJJTAoxlMiCkOzRCbEmow7sa2ZEuy2qqstNoyO+XdMzNXOzteNTc+YP/vu9rdmTu3zbnnnnavAL4ZMENcYyCHHHYCWNj94MAk4MtDoeI3SyfMejYYLCU/NfM6Bznk8C0Dj38ugn2Egeopi7WaqVqqeoqmVU/VuionvY3XrflyyGF7sTuXfqxLu6e83HWFWLC1V5YKZFVVcclQCbMWgWF9BYHeJ6Id485tbEyAsZqokEMO24HdSdgoYihK3bSNkaRUo6mqDBmcmZFZTePdvLDZsXlNtdm2HGHnsF3YXTI21qN0l0+5MyGlCFFrNqJGaLzKMLKmaePbKuvuAYOoc/J2DtuF3UU42t2B0opD8twv9KQkFD9ovYSWBzkzfrJxTVGLRdd+MiM/tiwe74UcctgO7A6OrRPxz9ze+2KSRNi0If0QSlbIDdbF8Z+yDMMSOVvB6+Q+E0sl4Zeewj9Zn88hh7FgdxC2Uk/MeUUOx8kxVdFonQ4GOJXlV7ka187kWXa5wLCUgBmSTy1xuI5/1DADKpBDDmPEriZsnT0fxrkuluQUqWxQV1XzeAf8rb97Hv54sr//4nzBgYZszWgUw/SnJDicdV62m9qZw3cMu8MqwmjjJzWFFbWMNehWp1KXIKxzNqyZbLZBUyonru7WYA9WU2nDtHyHM3zrxpWl9QAy5JDDGLDLOeGS/HF7axw/SNQIkRegsb/vPvOnPrkWJ2N3+9l0c/TcslK0T6jsh5BDDmPEriRsnWC9bteZspJmuIRgVTfHy28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s4liit8vglL38vKayz8yAtDguLzS4BfEeoPf55LvDxt7VHeqZWRXQW/kspKq25PjJyOhqibBKtqEadLPvcXWyC+4mvzWJkxXwul8mkSee7ekYqgDar5NyGaas29utgffQ5b89nzZogGtZk3Glmcw3n2IdtH72fLY28pkqdceBp2tTfT5ofLtFOy0grJAXxY7E7FnRS7j2A0UR4RTPI7TrW043iP8VEqlWKuVH60wbYrytLW8bymyiT72iDX77nXIkt+eL1tQv9Vca9+QYY9LsbeL3s+Wx95WLUu91ufkIdpEnx8q307BriRsBPNVb8cKkKVG1WIB6CWK4aF5PjwBaFABPcDh+VVE0/ur59PdZwy/ZW7n1i/h282tc/gGsKsJG49OUt9Ixv4S4My9wKBrhRqklMpHA6WH4bVnissOAY6v4Sw7gAWeh9b+rkfh282pc/iGsKsJWyfKd6XogywrKpb1h+0l1o65eT50GeN/Kni4J6X7KXTOrBIHoYeIL88llD9by8khh9FidyzxeiB/c0XdE4UMc3ZM1eNY8exrfUNDHi9s6pflGtD/VYe+y0V1sxwbVlNPVzRvOhN2/D8Q5PA9xC4XRcBUCJ7qS17h5B14Pog+mYhXE/fwqgZR62EexsZhkpy8AHf1RK+C9PafHHIYE3YHYev1XB/Z0tMJyo1+TkAP5OB/CjM/dWLHCFM//iP1lHLjHwc62mH3tS+H7xh2p7VBF0ni1XuskFV5miQT4mas//mAkfGAGx/HruAa182A0e9FzCGHbbA7OaIeL3JWw5ofeBnfRgevoW9Xt33iJ54LWODNa1r4wxn03JIccvjWYNBj1VZR+1etag/0Qmpa9YxUV0XdY1qaoL+v/5slh52Eb4IzDp6FUV9U5M3TtNIirrTlrPavBmDb47ZyyOFbh5y4kUMOOeQwFvw/nuqxEggnLfAAAAAASUVORK5CYII=";
|
|
@@ -494,18 +492,18 @@ function xe({ theme: r, assets: e = {}, year: t } = {}) {
|
|
|
494
492
|
g.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:mb-3 wgt:flex-wrap";
|
|
495
493
|
const l = document.createElement("div");
|
|
496
494
|
l.className = "wgt:text-base wgt:font-semibold wgt:text-strong-950", l.textContent = "Giải pháp thanh toán được cung cấp bởi";
|
|
497
|
-
const
|
|
498
|
-
|
|
495
|
+
const f = document.createElement("div");
|
|
496
|
+
f.className = "wgt:flex wgt:items-center wgt:justify-center wgt:shrink-0";
|
|
499
497
|
const C = document.createElement("img");
|
|
500
|
-
if (C.src = he, C.alt = "ATOM", C.className = "wgt:h-6 wgt:w-auto", C.loading = "lazy",
|
|
498
|
+
if (C.src = he, C.alt = "ATOM", C.className = "wgt:h-6 wgt:w-auto", C.loading = "lazy", f.appendChild(C), g.appendChild(l), g.appendChild(f), s.appendChild(g), e.cyberSourceLogo || e.pciLogo) {
|
|
501
499
|
const u = document.createElement("div");
|
|
502
500
|
if (u.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-6 wgt:py-2", e.cyberSourceLogo) {
|
|
503
|
-
const
|
|
504
|
-
|
|
501
|
+
const p = document.createElement("img");
|
|
502
|
+
p.src = e.cyberSourceLogo, p.alt = "CyberSource", p.className = "wgt:h-10 wgt:w-auto", p.loading = "lazy", u.appendChild(p);
|
|
505
503
|
}
|
|
506
504
|
if (e.pciLogo) {
|
|
507
|
-
const
|
|
508
|
-
|
|
505
|
+
const p = document.createElement("img");
|
|
506
|
+
p.src = e.pciLogo, p.alt = "PCI DSS", p.className = "wgt:h-10 wgt:w-auto", p.loading = "lazy", u.appendChild(p);
|
|
509
507
|
}
|
|
510
508
|
s.appendChild(u);
|
|
511
509
|
}
|
|
@@ -528,7 +526,7 @@ function ve({
|
|
|
528
526
|
const {
|
|
529
527
|
container: g,
|
|
530
528
|
open: l,
|
|
531
|
-
close:
|
|
529
|
+
close: f
|
|
532
530
|
} = le();
|
|
533
531
|
c.style.position = c.style.position || "relative", c.appendChild(g);
|
|
534
532
|
const C = document.createElement("div");
|
|
@@ -539,36 +537,36 @@ function ve({
|
|
|
539
537
|
b.className = "wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center", b.textContent = i("invoiceform_subtitle"), C.appendChild(M), C.appendChild(b), s.appendChild(C);
|
|
540
538
|
const u = document.createElement("div");
|
|
541
539
|
u.className = "wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";
|
|
542
|
-
function
|
|
540
|
+
function p(y, E) {
|
|
543
541
|
const S = document.createElement("div");
|
|
544
542
|
S.className = "wgt:flex wgt:items-start";
|
|
545
543
|
const Z = document.createElement("div");
|
|
546
544
|
Z.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:w-1/3";
|
|
547
545
|
const Y = document.createElement("span");
|
|
548
546
|
Y.className = "wgt:inline-flex wgt:items-center wgt:justify-center wgt:w-4 wgt:h-4 wgt:text-icon-primary";
|
|
549
|
-
let
|
|
550
|
-
y === i("invoice_number") ?
|
|
547
|
+
let x = "";
|
|
548
|
+
y === i("invoice_number") ? x = `
|
|
551
549
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
552
550
|
<path d="M12.7996 14H3.19961C3.04048 14 2.88787 13.9368 2.77535 13.8243C2.66282 13.7117 2.59961 13.5591 2.59961 13.4V2.6C2.59961 2.44087 2.66282 2.28826 2.77535 2.17574C2.88787 2.06321 3.04048 2 3.19961 2H12.7996C12.9587 2 13.1114 2.06321 13.2239 2.17574C13.3364 2.28826 13.3996 2.44087 13.3996 2.6V13.4C13.3996 13.5591 13.3364 13.7117 13.2239 13.8243C13.1114 13.9368 12.9587 14 12.7996 14ZM12.1996 12.8V3.2H3.79961V12.8H12.1996ZM5.59961 6.2H10.3996V7.4H5.59961V6.2ZM5.59961 8.6H10.3996V9.8H5.59961V8.6Z" fill="currentColor"/>
|
|
553
551
|
</svg>
|
|
554
|
-
` : y === i("address_form") ?
|
|
552
|
+
` : y === i("address_form") ? x = `
|
|
555
553
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
556
554
|
<path d="M7.99961 13.34L10.9696 10.37C11.557 9.78256 11.9569 9.03419 12.1189 8.21948C12.281 7.40477 12.1978 6.56031 11.8799 5.79289C11.562 5.02546 11.0236 4.36954 10.333 3.90805C9.64229 3.44657 8.83028 3.20026 7.99961 3.20026C7.16895 3.20026 6.35694 3.44657 5.66626 3.90805C4.97558 4.36954 4.43726 5.02546 4.11936 5.79289C3.80146 6.56031 3.71826 7.40477 3.88028 8.21948C4.04231 9.03419 4.44227 9.78256 5.02961 10.37L7.99961 13.34ZM7.99961 15.0368L4.18121 11.2184C3.42602 10.4631 2.91172 9.50096 2.70337 8.45346C2.49501 7.40597 2.60195 6.32021 3.01067 5.33349C3.41938 4.34678 4.11152 3.50342 4.99954 2.91006C5.88756 2.3167 6.9316 2 7.99961 2C9.06763 2 10.1117 2.3167 10.9997 2.91006C11.8877 3.50342 12.5798 4.34678 12.9886 5.33349C13.3973 6.32021 13.5042 7.40597 13.2959 8.45346C13.0875 9.50096 12.5732 10.4631 11.818 11.2184L7.99961 15.0368ZM7.99961 8.59995C8.31787 8.59995 8.6231 8.47353 8.84814 8.24848C9.07318 8.02344 9.19961 7.71821 9.19961 7.39995C9.19961 7.08169 9.07318 6.77647 8.84814 6.55143C8.6231 6.32638 8.31787 6.19995 7.99961 6.19995C7.68135 6.19995 7.37613 6.32638 7.15108 6.55143C6.92604 6.77647 6.79961 7.08169 6.79961 7.39995C6.79961 7.71821 6.92604 8.02344 7.15108 8.24848C7.37613 8.47353 7.68135 8.59995 7.99961 8.59995ZM7.99961 9.79995C7.36309 9.79995 6.75264 9.5471 6.30256 9.09701C5.85247 8.64692 5.59961 8.03647 5.59961 7.39995C5.59961 6.76343 5.85247 6.15298 6.30256 5.7029C6.75264 5.25281 7.36309 4.99995 7.99961 4.99995C8.63613 4.99995 9.24658 5.25281 9.69667 5.7029C10.1468 6.15298 10.3996 6.76343 10.3996 7.39995C10.3996 8.03647 10.1468 8.64692 9.69667 9.09701C9.24658 9.5471 8.63613 9.79995 7.99961 9.79995Z" fill="currentColor"/>
|
|
557
555
|
</svg>
|
|
558
|
-
` : y === i("total_amount") && (
|
|
556
|
+
` : y === i("total_amount") && (x = `
|
|
559
557
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
560
558
|
<path d="M8 14C4.6862 14 2 11.3138 2 8C2 4.6862 4.6862 2 8 2C11.3138 2 14 4.6862 14 8C14 11.3138 11.3138 14 8 14ZM8 12.8C9.27304 12.8 10.4939 12.2943 11.3941 11.3941C12.2943 10.4939 12.8 9.27304 12.8 8C12.8 6.72696 12.2943 5.50606 11.3941 4.60589C10.4939 3.70571 9.27304 3.2 8 3.2C6.72696 3.2 5.50606 3.70571 4.60589 4.60589C3.70571 5.50606 3.2 6.72696 3.2 8C3.2 9.27304 3.70571 10.4939 4.60589 11.3941C5.50606 12.2943 6.72696 12.8 8 12.8V12.8ZM5.9 9.2H9.2C9.27957 9.2 9.35587 9.16839 9.41213 9.11213C9.46839 9.05587 9.5 8.97957 9.5 8.9C9.5 8.82044 9.46839 8.74413 9.41213 8.68787C9.35587 8.63161 9.27957 8.6 9.2 8.6H6.8C6.40218 8.6 6.02064 8.44197 5.73934 8.16066C5.45804 7.87936 5.3 7.49783 5.3 7.1C5.3 6.70218 5.45804 6.32065 5.73934 6.03934C6.02064 5.75804 6.40218 5.6 6.8 5.6H7.4V4.4H8.6V5.6H10.1V6.8H6.8C6.72044 6.8 6.64413 6.83161 6.58787 6.88787C6.53161 6.94413 6.5 7.02044 6.5 7.1C6.5 7.17957 6.53161 7.25587 6.58787 7.31213C6.64413 7.36839 6.72044 7.4 6.8 7.4H9.2C9.59783 7.4 9.97936 7.55804 10.2607 7.83934C10.542 8.12065 10.7 8.50218 10.7 8.9C10.7 9.29783 10.542 9.67936 10.2607 9.96066C9.97936 10.242 9.59783 10.4 9.2 10.4H8.6V11.6H7.4V10.4H5.9V9.2Z" fill="currentColor"/>
|
|
561
559
|
</svg>
|
|
562
|
-
`), Y.innerHTML =
|
|
560
|
+
`), Y.innerHTML = x;
|
|
563
561
|
const L = document.createElement("span");
|
|
564
562
|
L.className = "wgt:text-sm wgt:text-weak-700", L.textContent = y, Z.appendChild(Y), Z.appendChild(L);
|
|
565
|
-
const
|
|
566
|
-
return
|
|
563
|
+
const v = document.createElement("span");
|
|
564
|
+
return v.className = "wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right", v.textContent = E != null ? E : "", S.appendChild(Z), S.appendChild(v), S;
|
|
567
565
|
}
|
|
568
|
-
u.appendChild(
|
|
569
|
-
|
|
566
|
+
u.appendChild(p(i("invoice_number"), r == null ? void 0 : r.billNo)), u.appendChild(
|
|
567
|
+
p(i("address_form"), r == null ? void 0 : r.address)
|
|
570
568
|
), u.appendChild(
|
|
571
|
-
|
|
569
|
+
p(
|
|
572
570
|
i("total_amount"),
|
|
573
571
|
`${te(r == null ? void 0 : r.amount)} VND`
|
|
574
572
|
)
|
|
@@ -597,7 +595,7 @@ function ve({
|
|
|
597
595
|
`, P.appendChild(o), P.appendChild(a);
|
|
598
596
|
const m = document.createElement("div");
|
|
599
597
|
m.className = "wgt:mt-4 wgt:px-4", k.appendChild(m);
|
|
600
|
-
const
|
|
598
|
+
const h = me(), V = Ce({
|
|
601
599
|
defaultValues: { taxCode: d || "" },
|
|
602
600
|
onFetchByTaxCode: (y) => W(null, null, function* () {
|
|
603
601
|
var S, Z, Y;
|
|
@@ -609,15 +607,15 @@ function ve({
|
|
|
609
607
|
};
|
|
610
608
|
})
|
|
611
609
|
});
|
|
612
|
-
let
|
|
610
|
+
let A = "individual", w = h;
|
|
613
611
|
function T(y) {
|
|
614
|
-
|
|
612
|
+
A = y, o.style.borderBottom = "none", a.style.borderBottom = "none";
|
|
615
613
|
const E = "wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold";
|
|
616
|
-
y === "individual" ? (o.className = `${E} wgt:text-strong-950`, o.style.borderBottom = "2px solid var(--primary)", a.className = `${E} wgt:text-soft-400`, m.innerHTML = "", m.appendChild(
|
|
614
|
+
y === "individual" ? (o.className = `${E} wgt:text-strong-950`, o.style.borderBottom = "2px solid var(--primary)", a.className = `${E} wgt:text-soft-400`, m.innerHTML = "", m.appendChild(h.container), w = h) : (a.className = `${E} wgt:text-strong-950`, a.style.borderBottom = "2px solid var(--primary)", o.className = `${E} wgt:text-soft-400`, m.innerHTML = "", m.appendChild(V.container), w = V);
|
|
617
615
|
}
|
|
618
616
|
o.addEventListener("click", () => T("individual")), a.addEventListener("click", () => T("business")), T("individual");
|
|
619
|
-
const
|
|
620
|
-
|
|
617
|
+
const H = document.createElement("p");
|
|
618
|
+
H.className = "wgt:mt-2 wgt:text-xs wgt:text-[#FF8447] wgt:text-left wgt:justify-center", H.textContent = i("invoiceform_note"), s.appendChild(H);
|
|
621
619
|
const X = document.createElement("div");
|
|
622
620
|
X.className = "wgt:mt-6 wgt:w-full wgt:flex wgt:justify-center wgt:items-center";
|
|
623
621
|
const F = U({
|
|
@@ -625,10 +623,10 @@ function ve({
|
|
|
625
623
|
title: i("btn_preview"),
|
|
626
624
|
className: "wgt:min-w-[163px] wgt:text-white",
|
|
627
625
|
handleClick: () => {
|
|
628
|
-
if (!
|
|
626
|
+
if (!w.validate()) return;
|
|
629
627
|
const y = {
|
|
630
|
-
type:
|
|
631
|
-
data:
|
|
628
|
+
type: A,
|
|
629
|
+
data: w.getValues()
|
|
632
630
|
}, { overlay: E } = fe({
|
|
633
631
|
type: y.type,
|
|
634
632
|
data: y.data,
|
|
@@ -642,11 +640,11 @@ function ve({
|
|
|
642
640
|
E.remove(), l();
|
|
643
641
|
try {
|
|
644
642
|
if (typeof n != "function") return;
|
|
645
|
-
const
|
|
643
|
+
const x = yield n({
|
|
646
644
|
type: y.type,
|
|
647
645
|
data: y.data
|
|
648
|
-
}), L = (Y = (Z = (S =
|
|
649
|
-
if (
|
|
646
|
+
}), L = (Y = (Z = (S = x == null ? void 0 : x.finalData) != null ? S : x == null ? void 0 : x.data) != null ? Z : x) != null ? Y : {}, v = String((L == null ? void 0 : L.status) || "").trim().toLowerCase();
|
|
647
|
+
if (f(), v === "invoiced") {
|
|
650
648
|
J({
|
|
651
649
|
message: i("invoice_success"),
|
|
652
650
|
description: i("invoice_description"),
|
|
@@ -657,7 +655,7 @@ function ve({
|
|
|
657
655
|
}).open();
|
|
658
656
|
return;
|
|
659
657
|
}
|
|
660
|
-
if (
|
|
658
|
+
if (v === "failed") {
|
|
661
659
|
J({
|
|
662
660
|
message: i("invoice_failed"),
|
|
663
661
|
description: i("invoice_description_failed"),
|
|
@@ -669,8 +667,8 @@ function ve({
|
|
|
669
667
|
}).open();
|
|
670
668
|
return;
|
|
671
669
|
}
|
|
672
|
-
} catch (
|
|
673
|
-
|
|
670
|
+
} catch (x) {
|
|
671
|
+
f(), J({
|
|
674
672
|
message: i("invoice_failed"),
|
|
675
673
|
description: i("invoice_description_failed"),
|
|
676
674
|
okLabel: i("close"),
|
|
@@ -678,7 +676,7 @@ function ve({
|
|
|
678
676
|
hideOkButton: !1,
|
|
679
677
|
closeOnClickOutside: !1,
|
|
680
678
|
theme: t
|
|
681
|
-
}).open(), console.error(
|
|
679
|
+
}).open(), console.error(x);
|
|
682
680
|
}
|
|
683
681
|
})
|
|
684
682
|
});
|
|
@@ -753,7 +751,7 @@ function re(r, e) {
|
|
|
753
751
|
}
|
|
754
752
|
function Ee(r, e, t) {
|
|
755
753
|
return W(this, null, function* () {
|
|
756
|
-
return ie(r) ? ue(e, t) :
|
|
754
|
+
return ie(r) ? ue(e, t) : pe(e, t);
|
|
757
755
|
});
|
|
758
756
|
}
|
|
759
757
|
function Pe({ uuid: r, orderInfo: e, theme: t }) {
|
|
@@ -772,13 +770,13 @@ function Pe({ uuid: r, orderInfo: e, theme: t }) {
|
|
|
772
770
|
}
|
|
773
771
|
function l(o) {
|
|
774
772
|
o && console.log("[DEBUG] renderFailedPage:", o);
|
|
775
|
-
const a =
|
|
773
|
+
const a = we({
|
|
776
774
|
theme: t,
|
|
777
775
|
onClose: u
|
|
778
776
|
});
|
|
779
777
|
g(a.container);
|
|
780
778
|
}
|
|
781
|
-
function
|
|
779
|
+
function f() {
|
|
782
780
|
const o = ye({
|
|
783
781
|
theme: t
|
|
784
782
|
});
|
|
@@ -794,12 +792,12 @@ function Pe({ uuid: r, orderInfo: e, theme: t }) {
|
|
|
794
792
|
const a = ve({
|
|
795
793
|
orderInfo: o || {},
|
|
796
794
|
theme: t,
|
|
797
|
-
onSubmit: (V) => W(null, [V], function* ({ type: m, data:
|
|
798
|
-
const
|
|
799
|
-
if (!
|
|
795
|
+
onSubmit: (V) => W(null, [V], function* ({ type: m, data: h }) {
|
|
796
|
+
const A = b();
|
|
797
|
+
if (!A)
|
|
800
798
|
return l({ reason: "MISSING_UUID_ON_SUBMIT" }), { ok: !1 };
|
|
801
|
-
const
|
|
802
|
-
return yield Ee(t,
|
|
799
|
+
const w = Le(m, h);
|
|
800
|
+
return yield Ee(t, A, w), { ok: !0, finalData: yield Me(A, t, {
|
|
803
801
|
maxTries: 20,
|
|
804
802
|
intervalMs: 1500
|
|
805
803
|
}) };
|
|
@@ -815,10 +813,10 @@ function Pe({ uuid: r, orderInfo: e, theme: t }) {
|
|
|
815
813
|
}
|
|
816
814
|
function u() {
|
|
817
815
|
return W(this, null, function* () {
|
|
818
|
-
yield
|
|
816
|
+
yield p();
|
|
819
817
|
});
|
|
820
818
|
}
|
|
821
|
-
function
|
|
819
|
+
function p() {
|
|
822
820
|
return W(this, null, function* () {
|
|
823
821
|
try {
|
|
824
822
|
const o = b();
|
|
@@ -827,8 +825,8 @@ function Pe({ uuid: r, orderInfo: e, theme: t }) {
|
|
|
827
825
|
const a = yield re(t, o), m = String((a == null ? void 0 : a.message) || "").trim();
|
|
828
826
|
if (m)
|
|
829
827
|
return l({ reason: "API_MESSAGE", apiMsg: m, res: a });
|
|
830
|
-
const
|
|
831
|
-
return
|
|
828
|
+
const h = ne(a == null ? void 0 : a.status);
|
|
829
|
+
return h === "expired" ? f() : h === "invoiced" ? C(a) : h === "pending" || h === "waiting" ? M(a || e || {}) : h === "" && a && Object.keys(a).length > 0 ? M(a) : l({ reason: "UNKNOWN_STATUS", status: h, res: a });
|
|
832
830
|
} catch (o) {
|
|
833
831
|
return console.log("[DEBUG] loadAndRender error:", o), l({ reason: "EXCEPTION", error: (o == null ? void 0 : o.message) || o });
|
|
834
832
|
}
|
|
@@ -838,7 +836,7 @@ function Pe({ uuid: r, orderInfo: e, theme: t }) {
|
|
|
838
836
|
return W(this, null, function* () {
|
|
839
837
|
l({ reason: "INIT_DEFAULT_RENDER" });
|
|
840
838
|
try {
|
|
841
|
-
yield
|
|
839
|
+
yield p();
|
|
842
840
|
} catch (o) {
|
|
843
841
|
return l({
|
|
844
842
|
reason: "INIT_EXCEPTION",
|
|
@@ -867,10 +865,10 @@ function Le(r, e) {
|
|
|
867
865
|
function Me(d, c) {
|
|
868
866
|
return W(this, arguments, function* (r, e, { maxTries: t = 20, intervalMs: n = 1500 } = {}) {
|
|
869
867
|
for (let g = 0; g < t; g++) {
|
|
870
|
-
yield
|
|
871
|
-
const l = yield re(e, r),
|
|
872
|
-
if (
|
|
873
|
-
if (
|
|
868
|
+
yield He(n);
|
|
869
|
+
const l = yield re(e, r), f = ne(l == null ? void 0 : l.status);
|
|
870
|
+
if (f === "invoiced" || f === "failed") return l;
|
|
871
|
+
if (f === "expired") {
|
|
874
872
|
const C = new Error("Invoice request expired while polling");
|
|
875
873
|
throw C.code = "EXPIRED", C.data = l, C;
|
|
876
874
|
}
|
|
@@ -879,7 +877,7 @@ function Me(d, c) {
|
|
|
879
877
|
throw s.code = "POLL_TIMEOUT", s;
|
|
880
878
|
});
|
|
881
879
|
}
|
|
882
|
-
function
|
|
880
|
+
function He(r) {
|
|
883
881
|
return new Promise((e) => setTimeout(e, r));
|
|
884
882
|
}
|
|
885
883
|
export {
|
package/dist/index.esm.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
</svg>`:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none">
|
|
127
127
|
<path d="M9 6L15 12L9 18" stroke="#0E121B" stroke-width="2"
|
|
128
128
|
stroke-linecap="round" stroke-linejoin="round"/>
|
|
129
|
-
</svg>`,B}const l=g("prev"),d=g("next");l.style.left="8px",d.style.right="8px",s.appendChild(l),s.appendChild(d);let T=n,x=A,Q=a;const E=()=>window.matchMedia("(max-width: 414px)").matches;function p(){const k=u.getBoundingClientRect(),B=s.getBoundingClientRect(),X=k.top-B.top+k.height/2;l.style.top=`${X}px`,d.style.top=`${X}px`,l.style.transform="translateY(-50%)",d.style.transform="translateY(-50%)"}function v(){const k=u.firstElementChild;return k?k.getBoundingClientRect().width+24:300}function M(k){u.scrollBy({left:k*v(),behavior:"smooth"})}function f(){if(E())return;const k=u.scrollWidth-u.clientWidth;l.disabled=u.scrollLeft<=0,d.disabled=u.scrollLeft>=k-2}l.addEventListener("click",()=>M(-1)),d.addEventListener("click",()=>M(1)),u.addEventListener("scroll",f);function y(){if(u.innerHTML="",!T||T.length===0){const k=document.createElement("div");k.className="wgt:col-span-full wgt:text-center wgt:py-8 wgt:text-text-sub-600",k.innerText=q("noPackageFound")||"Không tìm thấy gói phù hợp",u.appendChild(k);return}T.forEach(k=>{const B=k._id===Q,X=x.includes(k.code),{container:b}=N1({pkg:k,type:t,isDiscounted:X,promotion:e,isSelected:B,isRenew:i,onSelect:()=>{c((h||i)&&B?"":k._id)}});b.classList.add("wgt:snap-start"),u.appendChild(b)}),requestAnimationFrame(()=>{p(),f()})}y();let N=!1,J=0,P=0;u.addEventListener("mousedown",k=>{N=!0,u.classList.replace("wgt:cursor-grab","wgt:cursor-grabbing"),J=k.pageX,P=u.scrollLeft});const L=()=>{N&&(N=!1,u.classList.replace("wgt:cursor-grabbing","wgt:cursor-grab"))};document.addEventListener("mouseup",L),u.addEventListener("mouseleave",L),u.addEventListener("mousemove",k=>{N&&(k.preventDefault(),u.scrollLeft=P-(k.pageX-J)*1.5)}),u.addEventListener("wheel",k=>{k.preventDefault(),u.scrollLeft+=k.deltaY},{passive:!1});const w=new ResizeObserver(()=>p());return w.observe(u),w.observe(s),{container:o,render:y,setSelectedPackageId(k){Q=k,y()},updateData(k,B=null,X=null){T=k||T,B!==null&&(x=B),X!==null&&(Q=X),y()},updateDiscountedOnly(k){x=k,y()}}}const X1="1.124.
|
|
129
|
+
</svg>`,B}const l=g("prev"),d=g("next");l.style.left="8px",d.style.right="8px",s.appendChild(l),s.appendChild(d);let T=n,x=A,Q=a;const E=()=>window.matchMedia("(max-width: 414px)").matches;function p(){const k=u.getBoundingClientRect(),B=s.getBoundingClientRect(),X=k.top-B.top+k.height/2;l.style.top=`${X}px`,d.style.top=`${X}px`,l.style.transform="translateY(-50%)",d.style.transform="translateY(-50%)"}function v(){const k=u.firstElementChild;return k?k.getBoundingClientRect().width+24:300}function M(k){u.scrollBy({left:k*v(),behavior:"smooth"})}function f(){if(E())return;const k=u.scrollWidth-u.clientWidth;l.disabled=u.scrollLeft<=0,d.disabled=u.scrollLeft>=k-2}l.addEventListener("click",()=>M(-1)),d.addEventListener("click",()=>M(1)),u.addEventListener("scroll",f);function y(){if(u.innerHTML="",!T||T.length===0){const k=document.createElement("div");k.className="wgt:col-span-full wgt:text-center wgt:py-8 wgt:text-text-sub-600",k.innerText=q("noPackageFound")||"Không tìm thấy gói phù hợp",u.appendChild(k);return}T.forEach(k=>{const B=k._id===Q,X=x.includes(k.code),{container:b}=N1({pkg:k,type:t,isDiscounted:X,promotion:e,isSelected:B,isRenew:i,onSelect:()=>{c((h||i)&&B?"":k._id)}});b.classList.add("wgt:snap-start"),u.appendChild(b)}),requestAnimationFrame(()=>{p(),f()})}y();let N=!1,J=0,P=0;u.addEventListener("mousedown",k=>{N=!0,u.classList.replace("wgt:cursor-grab","wgt:cursor-grabbing"),J=k.pageX,P=u.scrollLeft});const L=()=>{N&&(N=!1,u.classList.replace("wgt:cursor-grabbing","wgt:cursor-grab"))};document.addEventListener("mouseup",L),u.addEventListener("mouseleave",L),u.addEventListener("mousemove",k=>{N&&(k.preventDefault(),u.scrollLeft=P-(k.pageX-J)*1.5)}),u.addEventListener("wheel",k=>{k.preventDefault(),u.scrollLeft+=k.deltaY},{passive:!1});const w=new ResizeObserver(()=>p());return w.observe(u),w.observe(s),{container:o,render:y,setSelectedPackageId(k){Q=k,y()},updateData(k,B=null,X=null){T=k||T,B!==null&&(x=B),X!==null&&(Q=X),y()},updateDiscountedOnly(k){x=k,y()}}}const X1="1.124.2";function S1(A){return W(this,arguments,function*({search:t,bank:n}){return(yield Zn.get(`${FA}`,{params:{isActive:!0,search:t||null,type:"service",bank:n}})).data})}function H1(n){return W(this,arguments,function*({bank:t}){return(yield Zn.get(`${FA}`,{params:{isActive:!0,type:"initial_fee",bank:t}})).data})}function L1(a){return W(this,arguments,function*({bank:t,hasRenew:n,isCashRegister:A,customerType:e}){return(yield Zn.get(`${FA}`,{params:{isActive:!0,type:"service",bank:t,hasRenew:n,limit:99,isCashRegister:A,customerType:"ENTERPRISE"}})).data})}function J1(n){return W(this,arguments,function*({bank:t}){return(yield Zn.get(`${FA}`,{params:{isActive:!0,type:"signature",bank:t,limit:99}})).data})}function P1(t){return W(this,null,function*(){const n=new FormData;return n.append("eInvoiceRegistration",JSON.stringify(t.eInvoiceRegistration)),n.append("provider",t.provider),n.append("bank",t.bank),n.append("packages",JSON.stringify(t.packages)),n.append("promotionCodes",JSON.stringify(t.promotionCodes)),n.append("logo",t.logo),n.append("organizationRegistrationCert",t.organizationRegistrationCert),t.legalRepresentativeIdCard.forEach(e=>{n.append("legalRepresentativeIdCard",e)}),n.append("isRenew",t.isRenew),n.append("isCashRegister",t.isCashRegister),yield Zn.post(Gi,n,{headers:{"Content-Type":"multipart/form-data","X-Invoice-Widget-Mode":YA(),"X-Invoice-Widget-Version":X1}})})}function b1(t){return W(this,null,function*(){return yield Zn.get(`${Ri}/${t}/status`)})}function D1(){return W(this,arguments,function*({isRenewable:t,serialNumber:n}={}){const A={isRenewable:!!t,serialNumber:(n!=null?n:"").trim()};return console.log("PROMO params:",A),(yield Zn.get(_i,{params:A})).data})}function K1(t){return W(this,null,function*(){return yield Zn.post(`${$i}/${t}`)})}function z1(t){return W(this,null,function*(){return yield Zn.get(`${no}/${encodeURIComponent(t)}`)})}function O1(t,n){return W(this,null,function*(){try{return yield Zn.post(`${to}/${encodeURIComponent(t)}`,n)}catch(A){throw A}})}function V1(t){return W(this,null,function*(){return yield Zn.get(`${Ao}/${encodeURIComponent(t)}`)})}function R1(t,n){return W(this,null,function*(){try{return yield Zn.post(`${eo}/${encodeURIComponent(t)}`,n)}catch(A){throw A}})}function G1({name:t,value:n,feeLabel:A,required:e,description:a,isChecked:h=!0,onChange:c=null}){const i=document.createElement("label");i.className=["wgt:relative","wgt:flex","wgt:items-start","wgt:gap-3","wgt:px-4","wgt:py-3","wgt:-mt-4","wgt:@max-2xl:px-0"].join(" ");const o=ue({name:t,value:n,checked:h,onChange:g=>{console.log("Checkbox state changed to:",g),c&&c(g)}});i.appendChild(o.container);const s=document.createElement("div");s.className="wgt:flex wgt:flex-col wgt:gap-1";const r=document.createElement("div");r.className="wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";const u=document.createElement("span");u.className="wgt:text-base wgt:font-semibold wgt:text-text-sub-600",u.textContent=A,r.appendChild(u);{const g=document.createElement("span");g.className=["wgt:bg-soft-200","wgt:text-text-sub-600","wgt:text-xs","wgt:font-semibold","wgt:px-1.5","wgt:py-1","wgt:rounded-sm"].join(" "),g.textContent=q("required"),r.appendChild(g)}s.appendChild(r);const m=document.createElement("p");return m.className="wgt:text-text-soft-400 wgt:text-sm",m.textContent=a,s.appendChild(m),i.appendChild(s),{container:i}}function kA(){const t=document.createElement("div");t.className="wgt:absolute wgt:inset-0 wgt:bg-white/80 wgt:items-center wgt:justify-center wgt:z-50 wgt:w-full wgt:h-full wgt:backdrop-blur-sm",t.style.display="none";const n=document.createElement("div");n.className="wgt:flex wgt:flex-col wgt:items-center wgt:gap-4 wgt:bg-white wgt:rounded-lg wgt:p-6 wgt:shadow-lg";const A=document.createElement("div");return A.className="wgt:h-12 wgt:w-12 wgt:animate-spin wgt:rounded-full wgt:border-4 wgt:border-solid wgt:border-primary wgt:border-t-transparent",n.appendChild(A),t.appendChild(n),{container:t,open:()=>{t.style.display="flex"},close:()=>{t.style.display="none"}}}function Y1({promotion:t,onSelect:n,isHidden:A=!1,isSelectable:e=!0}){const a=document.createElement("div");if(A)return a.style.display="none",{container:a};e&&t.isSelected,a.className="wgt:w-full wgt:flex wgt:items-center wgt:relative wgt:h-[6.75rem]";const h=document.createElement("div");h.className="wgt:absolute wgt:top-0 wgt:left-0 wgt:z-0",h.innerHTML=`<svg width="177" height="108" viewBox="0 0 177 108" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
130
130
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.0743 3.375H37.1375V0H166.603C172.3 0 176.919 5.65535 176.919 12.6316V95.3684C176.919 102.345 172.3 108 166.603 108H37.1375V104.625H35.0743V108H10.316C4.61862 108 4.15411e-08 102.345 0 95.3684V93.4737C3.41841 93.4737 6.18958 90.0805 6.18958 85.8947C6.18958 81.709 3.41841 78.3158 0 78.3158V72C3.41841 72 6.18958 68.6068 6.18958 64.4211C6.18958 60.2353 3.41841 56.8421 0 56.8421V50.5263C3.41841 50.5263 6.18958 47.1331 6.18958 42.9474C6.18958 38.7616 3.41841 35.3684 0 35.3684V29.0526C3.41841 29.0526 6.18958 25.6594 6.18958 21.4737C6.18958 17.2879 3.41841 13.8947 0 13.8947V12.6316C0 5.65535 4.61862 0 10.316 0H35.0743V3.375ZM35.0743 97.875H37.1375V91.125H35.0743V97.875ZM35.0743 84.375H37.1375V77.625H35.0743V84.375ZM35.0743 70.875H37.1375V64.125H35.0743V70.875ZM35.0743 57.375H37.1375V50.625H35.0743V57.375ZM35.0743 43.875H37.1375V37.125H35.0743V43.875ZM35.0743 30.375H37.1375V23.625H35.0743V30.375ZM35.0743 16.875H37.1375V10.125H35.0743V16.875Z" fill="#C0D5FF"/>
|
|
131
131
|
</svg>
|
|
132
132
|
`;const c=document.createElement("div");c.className="wgt:w-full wgt:relative wgt:z-10 wgt:h-full wgt:bg-white wgt:rounded-tr wgt:rounded-br wgt:px-4 wgt:py-3 wgt:ml-9 wgt:flex wgt:flex-col wgt:justify-between";const i=document.createElement("div");i.className="wgt:flex wgt:items-start wgt:flex-col wgt:relative";const o=document.createElement("h3");o.className=["wgt:text-base","wgt:font-semibold","wgt:text-gray-500","wgt:mb-1","wgt:text-primary"].join(" "),o.textContent=t.code,i.appendChild(o);const s=document.createElement("p");s.className=["wgt:text-sm","wgt:text-text-sub-600","wgt:mb-2"].join(" ");const r=MA(Vt());s.textContent=t[r],i.appendChild(s);const{container:u}=ue({checked:t.isSelected,onChange:()=>{let g=!t.isSelected;n(t.code,g)},isIconCheckbox:!0});e||(u.style.display="none"),u.className="wgt:absolute wgt:top-0 wgt:right-0",i.appendChild(u),c.appendChild(i);const m=document.createElement("p");return m.className=["wgt:text-xs","wgt:font-normal","wgt:text-right","wgt:text-[#335CFF]","wgt:italic"].join(" "),m.textContent=`${q("validityPeriod")}: ${q("expiredDate")} ${t.expiredAt.split("T")[0]}`,c.appendChild(m),a.appendChild(h),a.appendChild(c),{container:a}}function j1({value:t="",placeholder:n="",onInputChange:A=void 0}){const e=n||q("searchUnits"),a=document.createElement("div");a.className="wgt:flex wgt:flex-col";const h=document.createElement("div");h.className="wgt:flex wgt:rounded-lg wgt:border wgt:border-gray-300 wgt:overflow-hidden",a.appendChild(h);const c=document.createElement("input");return c.type="text",c.inputMode="numeric",c.value=t,c.placeholder=e,c.className="wgt:flex-1 wgt:px-4 wgt:py-2 wgt:text-text-sub-600 wgt:placeholder-gray-400 wgt:bg-white wgt:focus:outline-none",typeof A=="function"&&c.addEventListener("input",A),h.appendChild(c),{container:a}}function F1({theme:t,debounceTimer:n,typedUnits:A,onSearchComplete:e}){let a=[],h=[];const c=document.createElement("div");c.className="wgt:flex wgt:flex-col wgt:gap-3";const i=document.createElement("div");i.className="wgt:flex wgt:flex-col wgt:gap-4",c.appendChild(i);const o=document.createElement("h2");o.className="wgt:text-xl wgt:font-bold wgt:text-text-black",o.innerText=q("selectInvoicePackage");const s=document.createElement("span");s.className="wgt:text-sm wgt:text-red-500 wgt:ml-1",s.innerText="*",o.appendChild(s),i.appendChild(o);function r(){return W(this,null,function*(){n&&clearTimeout(n),A!==""?n=setTimeout(()=>W(null,null,function*(){try{const Q=A.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g,"."),E=yield S1({search:Q,bank:t});E&&(h=E),e&&e()}catch(Q){console.error("Error searching packages:",Q),Jt.error(q("errorSearchingPackages"),{autoClose:5e3,closeButton:!0,icon:!0})}}),500):(h=a,e&&e())})}const u=j1({value:"",placeholder:q("searchUnits"),onInputChange:Q=>{A=Q.target.value.replace(/\D/g,""),r()}});i.appendChild(u.container);const m=document.createElement("div");m.className="wgt:flex wgt:flex-col wgt:gap-2",c.appendChild(m);const g=document.createElement("h3");g.className="wgt:text-sm wgt:font-semibold wgt:text-[#525866]",g.innerText=q("mostSuitablePackage"),m.appendChild(g);const l=document.createElement("div");m.appendChild(l);const d=document.createElement("div");d.className="wgt:flex wgt:items-center wgt:justify-center wgt:py-8",d.innerHTML=`
|
|
@@ -469,10 +469,10 @@ Minimum version required to store current data is: `+P+`.
|
|
|
469
469
|
font-weight: 500;
|
|
470
470
|
background-color: white;
|
|
471
471
|
transition: background-color 0.2s ease, color 0.2s ease;
|
|
472
|
-
`,p.addEventListener("mouseenter",()=>{p.style.backgroundColor=`${r}10`}),p.addEventListener("mouseleave",()=>{p.style.backgroundColor="white"}),p.addEventListener("focus",()=>p.style.outline="none"),Q.appendChild(p);let v=!1,M=!1;const f=w=>{w.target===m&&!e&&L(!1)},y=w=>{w.key==="Escape"&&!e&&L(!1)};function N(){m.addEventListener("click",f),window.addEventListener("keydown",y),E.addEventListener("click",()=>L(!0)),p.addEventListener("click",()=>L(!1))}function J(){m.removeEventListener("click",f),window.removeEventListener("keydown",y)}function P(){v||(v=!0,document.body.appendChild(m),m.style.display="flex",setTimeout(()=>E.focus(),0),N())}function L(w=!1){if(!(!v||M)){M=!0,v=!1,J();try{m.remove()}catch(k){}w?a?window.location.href=a:typeof t=="function"&&t():!w&&typeof n=="function"&&n()}}return{container:m,open:P,close:L}}function jr(t,n){return W(this,null,function*(){const[A,e]=yield Promise.all([le(t,n,"HDTT"),le(t,n,"HDMTT")]);return{isNewCustomer:!!(A!=null&&A.isNewCustomer&&(e!=null&&e.isNewCustomer)),details:{HDTT:!!(A!=null&&A.isNewCustomer),HDMTT:!!(e!=null&&e.isNewCustomer)}}})}function S0(t,n,A,e=!1,a="ocb",h="",c=null){return W(this,null,function*(){var i,o;try{if(a!=="bvb"){A(!0,null);return}let s=null;if(!c)s=yield jr(t,n);else{const u=yield le(t,n,c);s={isNewCustomer:!!(u!=null&&u.isNewCustomer),details:{[c]:!!(u!=null&&u.isNewCustomer)}}}let r=null;if(e){r=yield me(t,n),A(s.isNewCustomer,r);return}if(!s.isNewCustomer){r=yield me(t,n),yield A(s.isNewCustomer,r),yield new Promise(m=>setTimeout(m,1e3)),(((i=r==null?void 0:r.organization)==null?void 0:i.name)||((o=r==null?void 0:r.organization)==null?void 0:o.taxCode))&&Yr({settingUrl:h,onCancel:()=>{},onConfirm:()=>W(null,null,function*(){const g=yield me(t,n);A(!1,g)}),showCloseButton:!0,preventClose:!1}).open();return}A(!0,null)}catch(s){console.error("Error checking new customer:",s),A(!0,null)}})}function Fr(t,n,A,e,a,h){return W(this,null,function*(){var D,O;const i=[{name:"M-Invoice",route:"m-invoice",logoUrl:qa},{name:"Misa",route:"misa",logoUrl:ma},{name:"FPT",route:"fpt",logoUrl:Ca},{name:"Viettel",route:"viettel",logoUrl:da}].filter(K=>K.route==="m-invoice");function o(){return[q("stepInfo"),q("stepPlan"),q("stepPayment")]}let s=Ys({steps:o(),currentStep:1}),{container:r,setStep:u,setContent:m}=s;t.dataset.theme=a||"default",t.classList.add("wgt:mx-auto","wgt:@container"),t.appendChild(r);let g=1,l=i[0],d={_userHasEditedTaxCode:!1,eInvoiceRegistration:{taxAuthorityCode:"",invoiceSymbol:"",previousEInvoiceProvider:"",organization:{name:"",address:"",taxCode:(e==null?void 0:e.taxCode)||"",taxAuthority:""},contactPerson:{name:"",address:"",email:"",phone:""},legalRepresentative:{name:"",dob:"",gender:"",phone:"",idCard:"",passportNumber:"",nationality:"",permanentAddress:""},hasUsedEInvoice:!1,isUsedEInvoiceBefore:!1,businessType:""},bank:a,provider:l.route,logo:null,license:null,idCard:null,idCardBack:null,packages:[],promotionCodes:[]},T=!0,x=null,Q=null,E=null,p=null,v=null,M=0,f=0,y=null,N=null,J=null,P={qtyRegFee:1,qtyInvoicePkg:1,qtySignaturePkg:1};function L(){l=i[0],d={eInvoiceRegistration:{taxAuthorityCode:"",invoiceSymbol:"",businessType:"",previousEInvoiceProvider:"",organization:{name:"",address:"",taxCode:(e==null?void 0:e.taxCode)||"",taxAuthority:""},contactPerson:{name:"",address:"",email:"",phone:""},legalRepresentative:{name:"",dob:"",gender:"",phone:"",idCard:"",passportNumber:"",nationality:"",permanentAddress:""},hasUsedEInvoice:!1,isUsedEInvoiceBefore:!1},bank:a||"ocb",provider:l.route,logo:null,license:null,idCard:null,idCardBack:null,packages:[],promotionCodes:[]},Q=null,E=null,p=null,v=null,M=0,J=null,P={qtyRegFee:1,qtyInvoicePkg:1,qtySignaturePkg:1}}function w(K){K||(K={name:"",address:"",taxCode:(e==null?void 0:e.taxCode)||"",taxAuthority:""}),d=En(j({},d),{eInvoiceRegistration:{organization:{name:(K==null?void 0:K.name)||"",address:(K==null?void 0:K.address)||"",taxCode:(K==null?void 0:K.taxCode)||"",taxAuthority:(K==null?void 0:K.taxAuthority)||""},contactPerson:{name:"",address:"",email:"",phone:""},legalRepresentative:{name:"",dob:"",gender:"",phone:"",idCard:"",passportNumber:"",nationality:"",permanentAddress:""},hasUsedEInvoice:!1,isUsedEInvoiceBefore:!1,invoiceSymbol:"",previousEInvoiceProvider:"",businessType:""},logo:null,license:null,idCard:null,idCardBack:null,packages:[],promotionCodes:[]})}function k(){L(),g=1,u(g,o()),b(g)}function B(){typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}function X(K,U){return W(this,null,function*(){K?d=En(j({},d),{eInvoiceRegistration:{organization:j({},K.organization),contactPerson:h?j({},K.contactPerson):d.eInvoiceRegistration.contactPerson,legalRepresentative:h?j({},K.legalRepresentative):d.eInvoiceRegistration.legalRepresentative,hasUsedEInvoice:K.hasUsedEInvoice,invoiceSymbol:K.invoiceSymbol,previousEInvoiceProvider:K.previousEInvoiceProvider,businessType:K.businessType}}):U&&w(U),yield b(g)})}function b(K){return W(this,null,function*(){const U="1C26MYY",nn=/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/;if(K===1){const{container:_}=yield k1({isNewCustomer:x,isRenewal:h,providerProps:{providers:i,selectedRoute:l.route,onProviderChange:Z=>W(null,null,function*(){var V,An;l=Z,yield S0(Z.route,(An=(V=d==null?void 0:d.eInvoiceRegistration)==null?void 0:V.organization)==null?void 0:An.taxCode,(Cn,zn)=>{x=Cn,X(zn)},h,a,(e==null?void 0:e.settingUrl)||"")})},formProps:{isNewCustomer:x,isRenewal:h,handleCheckNewCustomer:S0,updateRegistrationData:X,serial:nn.test((e==null?void 0:e.serial)||"")?e.serial:U,onSubmit:Z=>{d.eInvoiceRegistration=j(j({},d.eInvoiceRegistration),Z.eInvoiceRegistration),d.logo=Z.logo||null,d.license=Z.license||null,d.idCard=Z.idCard||null,d.idCardBack=Z.idCardBack||null,d.provider=l.route,g=2,u(g,o()),b(g),B()},registrationData:d,theme:a||"default",onShowPolicy:A||(()=>{}),selectedTaxAuthority:y,setSelectedTaxAuthority:Z=>{y=Z},dobPicker:J,setDobPicker:Z=>{J=Z}}});m(_)}else if(K===2){tt(At.STEP2_VIEWED,{theme:a,isRenewal:h,provider:l==null?void 0:l.route,isNewCustomer:x});const{container:_}=yield $1({onNext:()=>W(null,null,function*(){tt(At.STEP2_COMPLETED,{theme:a,provider:l==null?void 0:l.route,totalAmount:M,orderAmount:f,isFreeOrder:M===0}),g=3,u(g,o()),b(g),B()}),onPrev:()=>{g=1,u(g,o()),b(g),B()},setOrderAmount:Z=>{f=Z},setSelectedInitPackage:Z=>{E=Z},setSelectedInvoiceOtp:Z=>{p=Z},setSelectedSignatureOtp:Z=>{v=Z},setOrderId:Z=>{Q=Z},setTotalAmount:Z=>{M=Z},setOrderAmount:Z=>{f=Z},setSelectedPromotions:Z=>{N=Z},setPackages:Z=>{d.packages=Z},setPromotionCodes:Z=>{d.promotionCodes=Z},selectedInitPackage:E,selectedInvoiceOtp:p,selectedSignatureOtp:v,selectedPromotions:N,theme:a,selectedProvider:l,registrationData:d,isNewCustomer:x,savedQuantities:P,isRenewal:h,setSavedQuantities:Z=>{P=Z}});m(_)}else if(K===3){const{container:_}=yield Sr({onNext:()=>{g=4,u(g,o()),b(g),B()},onPrev:()=>{g=2,u(g,o()),b(g),B()},step:3,checkoutProps:{logos:a==="ocb"?[Kr]:[Lr,ac,br,Pr,Jr],logosAbove:a==="ocb"?[ac,Dr]:[],illustrationSrc:zr},theme:a||"ocb",orderInfoProps:{registrationData:d,orderId:Q||"",selectedProvider:l||{name:"",logo:""},selectedInvoiceOtp:p||{unitsPerMonth:0},selectedSignatureOtp:v||{durationYears:0},selectedPromotions:N,totalAmountText:M,totalAmountText:f,isRenewal:h,isNewCustomer:x,onCancel:()=>{g=2,u(g,o()),b(g),B()},onResetToStep1:k},setOrderId:Z=>{Q=Z}});m(_)}else if(K===4){const{container:_}=Hr({orderId:Q||"",onPrev:()=>{g=3,u(g,o()),b(g),B()},onReturnHome:()=>{H(),typeof n=="function"&&n()},theme:a||"ocb",settingUrl:(e==null?void 0:e.settingUrl)||"",serial:(e==null?void 0:e.serial)||"1C26MYY",provider:l.route});m(_)}})}const{container:I,open:C}=kA();T&&(m(I),C()),yield S0(l.route,(O=(D=d==null?void 0:d.eInvoiceRegistration)==null?void 0:D.organization)==null?void 0:O.taxCode,(K,U)=>W(null,null,function*(){T=!1,x=K,X(U),s.updateTitle(q(h?"eInvoiceRenewal":"eInvoiceRegister"))}),h,a,(e==null?void 0:e.settingUrl)||"");const S=cc(()=>{H()},{includeHash:!1});function H(){J&&typeof J.destroy=="function"&&J.destroy(),S(),t&&t.parentNode&&(t.innerHTML="")}})}function Zr(t,n,A,e){return W(this,null,function*(){const{container:a,setContent:h}=Or(),c=A==null?void 0:A.orderId,i=(A==null?void 0:A.callbackUrl)||`${window.location.origin}/dashboard`,{container:o}=yield hc({orderId:c,callbackUrl:i,onCompleteSignature:(...m)=>W(null,null,function*(){e&&(yield e(...m)),u()})});h(o),t.appendChild(a);const{container:s}=yield hc({orderId:c,callbackUrl:i,onCompleteSignature:e});h(s);const r=cc(()=>{u()},{includeHash:!1});function u(){r(),t&&t.parentNode&&(t.innerHTML="")}return{destroy:u}})}const oc=Object.freeze(Object.defineProperty({__proto__:null,EContractWidget:Zr,InvoiceRegisterWidget:Fr},Symbol.toStringTag,{value:"Module"}));function XA(t){const n=t.trim();return n?n.length<2||n.length>250?{valid:!1,error:q("length_2_250")}:/[<>:"\/\\|?*@#$%!^]/.test(n)?{valid:!1,error:q("invalid_characters")}:{valid:!0}:{valid:!1,error:q("required_name")}}function pe(t,n=!1){const A=String(t!=null?t:"").trim();return A?A.length<2||A.length>250?{valid:!1,error:q("length_2_250")}:/[<>:"\\|?*@#$%!^]/.test(A)?{valid:!1,error:q("invalid_characters")}:{valid:!0}:n?{valid:!1,error:q("required_address")}:{valid:!0}}function we(t){const n=t.trim();return n?n.length<6||n.length>254?{valid:!1,error:q("email_length")}:/[<>:"\/\\|?*#$%!\s]/.test(n)?{valid:!1,error:q("email_invalid_format")}:/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(n)?n.includes("@@")?{valid:!1,error:q("email_invalid_format")}:{valid:!0}:{valid:!1,error:q("email_invalid_format")}:{valid:!1,error:q("required_email")}}function sc(t,n=!1){const A=t.trim();if(!A)return n?{valid:!1,error:q("required_phone")}:{valid:!0};const e=A.replace(/\s/g,"");if(/[<>:"\/\\|?*@#$%!A-Za-z]/.test(e))return{valid:!1,error:q("phone_invalid")};const h=/^0\d{9}$/,c=/^\+84\d{9}$/;return!h.test(e)&&!c.test(e)?{valid:!1,error:q("phone_invalid_format")}:{valid:!0}}function H0(t){const n=t.trim();if(!n)return{valid:!1,error:q("required_tax_code")};const A=n.replace(/\s/g,"");if(/[<>:"\/\\|?*@#$%!A-Za-z\s]/.test(A))return{valid:!1,error:q("tax_code_invalid")};if((A.match(/-/g)||[]).length>1)return{valid:!1,error:q("tax_code_invalid_format")};const h=/^\d{10}$/,c=/^\d{10}-\d{3}$/;return!h.test(A)&&!c.test(A)?{valid:!1,error:q("tax_code_invalid_format")}:{valid:!0}}function Wr({defaultValues:t={},onChange:n}={}){const A={representativeName:t.representativeName||"",buyerAddress:t.buyerAddress||"",email:t.email||""},e=document.createElement("div");e.className="wgt:space-y-2";function a(){typeof n=="function"&&n(j({},A))}function h({label:T,required:x,name:Q,type:E="text",placeholder:p}){const v=document.createElement("div");v.className="";const M=document.createElement("label");M.className="wgt:text-sm wgt:font-medium wgt:text-strong-950",M.htmlFor=Q,M.innerHTML=x?`${T} <span class="wgt:text-semantic-error wgt:text-[#ED1C24]">*</span>`:T;const f=document.createElement("input");f.id=Q,f.name=Q,f.type=E,f.placeholder=p||"",f.className="wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary",f.value=A[Q]||"";const y=document.createElement("div");return y.className="wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",y.setAttribute("data-error-for",Q),f.addEventListener("input",()=>{A[Q]=f.value,f.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),y.classList.add("wgt:hidden"),a()}),f.addEventListener("blur",()=>{let N;switch(Q){case"representativeName":N=XA(f.value);break;case"buyerAddress":N=pe(f.value);break;case"email":N=we(f.value);break;default:return}!N.valid&&N.error&&(f.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),y.textContent=N.error,y.classList.remove("wgt:hidden"))}),v.appendChild(M),v.appendChild(f),v.appendChild(y),{field:v,input:f,errorEl:y}}const{field:c,input:i,errorEl:o}=h({label:q("representativeName"),required:!0,name:"representativeName",placeholder:q("representativeName_input")}),{field:s,errorEl:r}=h({label:q("buyerAddress"),required:!1,name:"buyerAddress",placeholder:q("buyerAddress_input")}),{field:u,input:m,errorEl:g}=h({label:q("email"),required:!0,name:"email",type:"email",placeholder:q("email_input")});e.appendChild(c),e.appendChild(s),e.appendChild(u);function l(){let T=!0;function x(p,v,M){p.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),M&&v&&(v.textContent=M,v.classList.remove("wgt:hidden")),T=!1}const Q=XA(A.representativeName);if(Q.valid||x(i,o,Q.error),A.buyerAddress.trim()){const p=pe(A.buyerAddress);p.valid||x(document.querySelector('input[name="buyerAddress"]'),r,p.error)}const E=we(A.email);return E.valid||x(m,g,E.error),T}function d(){return j({},A)}return{container:e,getValues:d,validate:l}}function Ur({defaultValues:t={},onChange:n,onFetchByTaxCode:A}={}){const e={noTaxCode:!!t.noTaxCode,taxCode:t.taxCode||"",businessName:t.businessName||"",representativeName:t.representativeName||"",buyerAddress:t.buyerAddress||"",email:t.email||"",phone:t.phone||""},a=document.createElement("div");a.className="wgt:space-y-2";function h(){typeof n=="function"&&n(j({},e))}function c({label:b,required:I,name:C,type:S="text",placeholder:H}){const D=document.createElement("div");D.className="";const O=document.createElement("label");O.className="wgt:text-sm wgt:font-medium wgt:text-strong-950",O.htmlFor=C,O.innerHTML=I?`${b} <span class="wgt:text-[#ED1C24]">*</span>`:b;const K=document.createElement("input");K.id=C,K.name=C,K.type=S,K.placeholder=H||"",K.className="wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary",K.value=e[C]||"";const U=document.createElement("div");return U.className="wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",U.setAttribute("data-error-for",C),K.addEventListener("input",()=>{e[C]=K.value,K.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),U.classList.add("wgt:hidden"),h()}),K.addEventListener("blur",()=>{if(!K.value.trim()&&!I)return;let nn;switch(C){case"businesName":case"representativeName":nn=XA(K.value);break;case"buyerAddress":nn=pe(K.value);break;case"email":nn=we(K.value);break;case"phone":nn=sc(K.value,!0);break;default:return}!nn.valid&&nn.error&&(K.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),U.textContent=nn.error,U.classList.remove("wgt:hidden"))}),D.appendChild(O),D.appendChild(K),D.appendChild(U),{field:D,input:K,errorEl:U}}const i=document.createElement("label");i.className="wgt:flex wgt:items-center wgt:gap-2 wgt:font-medium wgt:text-strong-950 wgt:text-sm";const o=document.createElement("input");o.type="checkbox",o.className="wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary",o.checked=e.noTaxCode;const s=document.createElement("span");s.textContent=q("business_noTaxCode"),s.className="wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]",s.style.fontFamily="Inter, sans-serif",o.addEventListener("change",()=>{e.noTaxCode=o.checked,g.disabled=e.noTaxCode,d.disabled=e.noTaxCode,g.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.classList.add("wgt:hidden"),h()}),i.appendChild(o),i.appendChild(s);const r=document.createElement("div");r.className="wgt:space-y-2";const u=document.createElement("label");u.className="wgt:text-sm wgt:font-medium wgt:text-strong-950 ",u.innerHTML=q("confirmation_popup_taxCode")+'<span class="wgt:text-[#ED1C24]">*</span>';const m=document.createElement("div");m.className="wgt:flex wgt:gap-2 wgt:mt-2";const g=document.createElement("input");g.type="text",g.name="taxCode",g.placeholder=q("taxCode_input"),g.value=e.taxCode,g.className="wgt:flex-1 wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary";const l=document.createElement("div");l.className="wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",g.addEventListener("input",()=>{e.taxCode=g.value,g.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.classList.add("wgt:hidden"),h()}),g.addEventListener("blur",()=>{if(e.noTaxCode||!g.value.trim())return;const b=H0(g.value);b.valid||(g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent=b.error,l.classList.remove("wgt:hidden"))});const d=It({type:"button",title:q("fetch_info"),className:"wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:font-semibold wgt:rounded-lg wgt:flex-shrink-0 wgt:text-primary wgt:bg-white wgt:border wgt:border-primary",handleClick:()=>W(null,null,function*(){if(e.noTaxCode||typeof A!="function")return;const b=String(e.taxCode||"").trim();if(!b){g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent="Vui lòng nhập MST",l.classList.remove("wgt:hidden");return}const I=H0(b);if(!I.valid){g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent=I.error,l.classList.remove("wgt:hidden");return}try{d.disabled=!0;const C=yield A(b,j({},e));if(!C||typeof C!="object")return;C.businessName!=null&&(e.businessName=String(C.businessName||""),x.value=e.businessName),C.representativeName!=null&&(e.representativeName=String(C.representativeName||""),p.value=e.representativeName),C.buyerAddress!=null&&(e.buyerAddress=String(C.buyerAddress||""),f.value=e.buyerAddress),h()}catch(C){g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent="Không tìm thấy thông tin MST",l.classList.remove("wgt:hidden")}finally{d.disabled=e.noTaxCode}})});m.appendChild(g),m.appendChild(d),r.appendChild(u),r.appendChild(m),r.appendChild(l);const{field:T,input:x,errorEl:Q}=c({label:q("businessName"),required:!0,name:"businessName",placeholder:q("businessName_input")}),{field:E,input:p,errorEl:v}=c({label:q("representativeName"),required:!0,name:"representativeName",placeholder:q("representativeName_input")}),{field:M,input:f,errorEl:y}=c({label:q("buyerAddress"),required:!1,name:"buyerAddress",placeholder:q("buyerAddress_input")}),{field:N,input:J,errorEl:P}=c({label:q("email"),required:!0,name:"email",type:"email",placeholder:q("email_input")}),{field:L,input:w,errorEl:k}=c({label:q("phone"),required:!1,name:"phone",type:"tel",placeholder:q("phone_input")});a.appendChild(i),a.appendChild(r),a.appendChild(T),a.appendChild(E),a.appendChild(M),a.appendChild(N),a.appendChild(L),g.disabled=e.noTaxCode,d.disabled=e.noTaxCode;function B(){let b=!0;function I(D,O,K){D.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50","wgt:mt-2"),K&&O&&(O.textContent=K,O.classList.remove("wgt:hidden")),b=!1}if(!e.noTaxCode){const D=H0(e.taxCode);D.valid||I(g,l,D.error)}const C=XA(e.businessName);C.valid||I(x,Q,C.error);const S=XA(e.representativeName);if(S.valid||I(p,v,S.error),e.buyerAddress.trim()){const D=pe(e.buyerAddress);D.valid||I(f,y,D.error)}const H=we(e.email);if(H.valid||I(J,P,H.error),e.phone.trim()){const D=sc(e.phone,!0);D.valid||I(w,k,D.error)}return b}function X(){return j({},e)}return{container:a,getValues:X,validate:B}}function _r({type:t,data:n,orderInfo:A,theme:e,onClose:a,onConfirm:h}){const c=document.createElement("div");c.className="wgt:fixed wgt:inset-0 wgt:flex wgt:items-center wgt:justify-center wgt:z-50 wgt:p-4",c.style.cssText=`
|
|
472
|
+
`,p.addEventListener("mouseenter",()=>{p.style.backgroundColor=`${r}10`}),p.addEventListener("mouseleave",()=>{p.style.backgroundColor="white"}),p.addEventListener("focus",()=>p.style.outline="none"),Q.appendChild(p);let v=!1,M=!1;const f=w=>{w.target===m&&!e&&L(!1)},y=w=>{w.key==="Escape"&&!e&&L(!1)};function N(){m.addEventListener("click",f),window.addEventListener("keydown",y),E.addEventListener("click",()=>L(!0)),p.addEventListener("click",()=>L(!1))}function J(){m.removeEventListener("click",f),window.removeEventListener("keydown",y)}function P(){v||(v=!0,document.body.appendChild(m),m.style.display="flex",setTimeout(()=>E.focus(),0),N())}function L(w=!1){if(!(!v||M)){M=!0,v=!1,J();try{m.remove()}catch(k){}w?a?window.location.href=a:typeof t=="function"&&t():!w&&typeof n=="function"&&n()}}return{container:m,open:P,close:L}}function jr(t,n){return W(this,null,function*(){const[A,e]=yield Promise.all([le(t,n,"HDTT"),le(t,n,"HDMTT")]);return{isNewCustomer:!!(A!=null&&A.isNewCustomer&&(e!=null&&e.isNewCustomer)),details:{HDTT:!!(A!=null&&A.isNewCustomer),HDMTT:!!(e!=null&&e.isNewCustomer)}}})}function S0(t,n,A,e=!1,a="ocb",h="",c=null){return W(this,null,function*(){var i,o;try{if(a!=="bvb"){A(!0,null);return}let s=null;if(!c)s=yield jr(t,n);else{const u=yield le(t,n,c);s={isNewCustomer:!!(u!=null&&u.isNewCustomer),details:{[c]:!!(u!=null&&u.isNewCustomer)}}}let r=null;if(e){r=yield me(t,n),A(s.isNewCustomer,r);return}if(!s.isNewCustomer){r=yield me(t,n),yield A(s.isNewCustomer,r),yield new Promise(m=>setTimeout(m,1e3)),(((i=r==null?void 0:r.organization)==null?void 0:i.name)||((o=r==null?void 0:r.organization)==null?void 0:o.taxCode))&&Yr({settingUrl:h,onCancel:()=>{},onConfirm:()=>W(null,null,function*(){const g=yield me(t,n);A(!1,g)}),showCloseButton:!0,preventClose:!1}).open();return}A(!0,null)}catch(s){console.error("Error checking new customer:",s),A(!0,null)}})}function Fr(t,n,A,e,a,h){return W(this,null,function*(){var D,O;const i=[{name:"M-Invoice",route:"m-invoice",logoUrl:qa},{name:"Misa",route:"misa",logoUrl:ma},{name:"FPT",route:"fpt",logoUrl:Ca},{name:"Viettel",route:"viettel",logoUrl:da}].filter(K=>K.route==="m-invoice");function o(){return[q("stepInfo"),q("stepPlan"),q("stepPayment")]}let s=Ys({steps:o(),currentStep:1}),{container:r,setStep:u,setContent:m}=s;t.dataset.theme=a||"default",t.classList.add("wgt:mx-auto","wgt:@container"),t.appendChild(r);let g=1,l=i[0],d={_userHasEditedTaxCode:!1,eInvoiceRegistration:{taxAuthorityCode:"",invoiceSymbol:"",previousEInvoiceProvider:"",organization:{name:"",address:"",taxCode:(e==null?void 0:e.taxCode)||"",taxAuthority:""},contactPerson:{name:"",address:"",email:"",phone:""},legalRepresentative:{name:"",dob:"",gender:"",phone:"",idCard:"",passportNumber:"",nationality:"",permanentAddress:""},hasUsedEInvoice:!1,isUsedEInvoiceBefore:!1,businessType:""},bank:a,provider:l.route,logo:null,license:null,idCard:null,idCardBack:null,packages:[],promotionCodes:[]},T=!0,x=null,Q=null,E=null,p=null,v=null,M=0,f=0,y=null,N=null,J=null,P={qtyRegFee:1,qtyInvoicePkg:1,qtySignaturePkg:1};function L(){l=i[0],d={eInvoiceRegistration:{taxAuthorityCode:"",invoiceSymbol:"",businessType:"",previousEInvoiceProvider:"",organization:{name:"",address:"",taxCode:(e==null?void 0:e.taxCode)||"",taxAuthority:""},contactPerson:{name:"",address:"",email:"",phone:""},legalRepresentative:{name:"",dob:"",gender:"",phone:"",idCard:"",passportNumber:"",nationality:"",permanentAddress:""},hasUsedEInvoice:!1,isUsedEInvoiceBefore:!1},bank:a||"ocb",provider:l.route,logo:null,license:null,idCard:null,idCardBack:null,packages:[],promotionCodes:[]},Q=null,E=null,p=null,v=null,M=0,J=null,P={qtyRegFee:1,qtyInvoicePkg:1,qtySignaturePkg:1}}function w(K){K||(K={name:"",address:"",taxCode:(e==null?void 0:e.taxCode)||"",taxAuthority:""}),d=En(j({},d),{eInvoiceRegistration:{organization:{name:(K==null?void 0:K.name)||"",address:(K==null?void 0:K.address)||"",taxCode:(K==null?void 0:K.taxCode)||"",taxAuthority:(K==null?void 0:K.taxAuthority)||""},contactPerson:{name:"",address:"",email:"",phone:""},legalRepresentative:{name:"",dob:"",gender:"",phone:"",idCard:"",passportNumber:"",nationality:"",permanentAddress:""},hasUsedEInvoice:!1,isUsedEInvoiceBefore:!1,invoiceSymbol:"",previousEInvoiceProvider:"",businessType:""},logo:null,license:null,idCard:null,idCardBack:null,packages:[],promotionCodes:[]})}function k(){L(),g=1,u(g,o()),b(g)}function B(){typeof window!="undefined"&&window.scrollTo({top:0,behavior:"smooth"})}function X(K,U){return W(this,null,function*(){K?d=En(j({},d),{eInvoiceRegistration:{organization:j({},K.organization),contactPerson:h?j({},K.contactPerson):d.eInvoiceRegistration.contactPerson,legalRepresentative:h?j({},K.legalRepresentative):d.eInvoiceRegistration.legalRepresentative,hasUsedEInvoice:K.hasUsedEInvoice,invoiceSymbol:K.invoiceSymbol,previousEInvoiceProvider:K.previousEInvoiceProvider,businessType:K.businessType}}):U&&w(U),yield b(g)})}function b(K){return W(this,null,function*(){const U="1C26MYY",nn=/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/;if(K===1){const{container:_}=yield k1({isNewCustomer:x,isRenewal:h,providerProps:{providers:i,selectedRoute:l.route,onProviderChange:Z=>W(null,null,function*(){var V,An;l=Z,yield S0(Z.route,(An=(V=d==null?void 0:d.eInvoiceRegistration)==null?void 0:V.organization)==null?void 0:An.taxCode,(Cn,zn)=>{x=Cn,X(zn)},h,a,(e==null?void 0:e.settingUrl)||"")})},formProps:{isNewCustomer:x,isRenewal:h,handleCheckNewCustomer:S0,updateRegistrationData:X,serial:nn.test((e==null?void 0:e.serial)||"")?e.serial:U,onSubmit:Z=>{d.eInvoiceRegistration=j(j({},d.eInvoiceRegistration),Z.eInvoiceRegistration),d.logo=Z.logo||null,d.license=Z.license||null,d.idCard=Z.idCard||null,d.idCardBack=Z.idCardBack||null,d.provider=l.route,g=2,u(g,o()),b(g),B()},registrationData:d,theme:a||"default",onShowPolicy:A||(()=>{}),selectedTaxAuthority:y,setSelectedTaxAuthority:Z=>{y=Z},dobPicker:J,setDobPicker:Z=>{J=Z}}});m(_)}else if(K===2){tt(At.STEP2_VIEWED,{theme:a,isRenewal:h,provider:l==null?void 0:l.route,isNewCustomer:x});const{container:_}=yield $1({onNext:()=>W(null,null,function*(){tt(At.STEP2_COMPLETED,{theme:a,provider:l==null?void 0:l.route,totalAmount:M,orderAmount:f,isFreeOrder:M===0}),g=3,u(g,o()),b(g),B()}),onPrev:()=>{g=1,u(g,o()),b(g),B()},setOrderAmount:Z=>{f=Z},setSelectedInitPackage:Z=>{E=Z},setSelectedInvoiceOtp:Z=>{p=Z},setSelectedSignatureOtp:Z=>{v=Z},setOrderId:Z=>{Q=Z},setTotalAmount:Z=>{M=Z},setOrderAmount:Z=>{f=Z},setSelectedPromotions:Z=>{N=Z},setPackages:Z=>{d.packages=Z},setPromotionCodes:Z=>{d.promotionCodes=Z},selectedInitPackage:E,selectedInvoiceOtp:p,selectedSignatureOtp:v,selectedPromotions:N,theme:a,selectedProvider:l,registrationData:d,isNewCustomer:x,savedQuantities:P,isRenewal:h,setSavedQuantities:Z=>{P=Z}});m(_)}else if(K===3){const{container:_}=yield Sr({onNext:()=>{g=4,u(g,o()),b(g),B()},onPrev:()=>{g=2,u(g,o()),b(g),B()},step:3,checkoutProps:{logos:a==="ocb"?[Kr]:[Lr,ac,br,Pr,Jr],logosAbove:a==="ocb"?[ac,Dr]:[],illustrationSrc:zr},theme:a||"ocb",orderInfoProps:{registrationData:d,orderId:Q||"",selectedProvider:l||{name:"",logo:""},selectedInvoiceOtp:p||{unitsPerMonth:0},selectedSignatureOtp:v||{durationYears:0},selectedPromotions:N,totalAmountText:M,totalAmountText:f,isRenewal:h,isNewCustomer:x,onCancel:()=>{g=2,u(g,o()),b(g),B()},onResetToStep1:k},setOrderId:Z=>{Q=Z}});m(_)}else if(K===4){const{container:_}=Hr({orderId:Q||"",onPrev:()=>{g=3,u(g,o()),b(g),B()},onReturnHome:()=>{H(),typeof n=="function"&&n()},theme:a||"ocb",settingUrl:(e==null?void 0:e.settingUrl)||"",serial:(e==null?void 0:e.serial)||"1C26MYY",provider:l.route});m(_)}})}const{container:I,open:C}=kA();T&&(m(I),C()),yield S0(l.route,(O=(D=d==null?void 0:d.eInvoiceRegistration)==null?void 0:D.organization)==null?void 0:O.taxCode,(K,U)=>W(null,null,function*(){T=!1,x=K,X(U),s.updateTitle(q(h?"eInvoiceRenewal":"eInvoiceRegister"))}),h,a,(e==null?void 0:e.settingUrl)||"");const S=cc(()=>{H()},{includeHash:!1});function H(){J&&typeof J.destroy=="function"&&J.destroy(),S(),t&&t.parentNode&&(t.innerHTML="")}})}function Zr(t,n,A,e){return W(this,null,function*(){const{container:a,setContent:h}=Or(),c=A==null?void 0:A.orderId,i=(A==null?void 0:A.callbackUrl)||`${window.location.origin}/dashboard`,{container:o}=yield hc({orderId:c,callbackUrl:i,onCompleteSignature:(...m)=>W(null,null,function*(){e&&(yield e(...m)),u()})});h(o),t.appendChild(a);const{container:s}=yield hc({orderId:c,callbackUrl:i,onCompleteSignature:e});h(s);const r=cc(()=>{u()},{includeHash:!1});function u(){r(),t&&t.parentNode&&(t.innerHTML="")}return{destroy:u}})}const oc=Object.freeze(Object.defineProperty({__proto__:null,EContractWidget:Zr,InvoiceRegisterWidget:Fr},Symbol.toStringTag,{value:"Module"}));function XA(t){const n=t.trim();return n?n.length<2||n.length>250?{valid:!1,error:q("length_2_250")}:/[<>:"\/\\|?*@#$%!^]/.test(n)?{valid:!1,error:q("invalid_characters")}:{valid:!0}:{valid:!1,error:q("required_name")}}function pe(t,n=!1){const A=String(t!=null?t:"").trim();return A?A.length<2||A.length>250?{valid:!1,error:q("length_2_250")}:/[<>:"\\|?*@#$%!^]/.test(A)?{valid:!1,error:q("invalid_characters")}:{valid:!0}:n?{valid:!1,error:q("required_address")}:{valid:!0}}function we(t){const n=t.trim();return n?n.length<6||n.length>254?{valid:!1,error:q("email_length")}:/[<>:"\/\\|?*#$%!\s]/.test(n)?{valid:!1,error:q("email_invalid_format")}:/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(n)?n.includes("@@")?{valid:!1,error:q("email_invalid_format")}:{valid:!0}:{valid:!1,error:q("email_invalid_format")}:{valid:!1,error:q("required_email")}}function sc(t,n=!1){const A=t.trim();if(!A)return n?{valid:!1,error:q("required_phone")}:{valid:!0};const e=A.replace(/\s/g,"");if(/[<>:"\/\\|?*@#$%!A-Za-z]/.test(e))return{valid:!1,error:q("phone_invalid")};const h=/^0\d{9}$/,c=/^\+84\d{9}$/;return!h.test(e)&&!c.test(e)?{valid:!1,error:q("phone_invalid_format")}:{valid:!0}}function H0(t){const n=t.trim();if(!n)return{valid:!1,error:q("required_tax_code")};const A=n.replace(/\s/g,"");if(/[<>:"\/\\|?*@#$%!A-Za-z\s]/.test(A))return{valid:!1,error:q("tax_code_invalid")};if((A.match(/-/g)||[]).length>1)return{valid:!1,error:q("tax_code_invalid_format")};const h=/^\d{10}$/,c=/^\d{10}-\d{3}$/;return!h.test(A)&&!c.test(A)?{valid:!1,error:q("tax_code_invalid_format")}:{valid:!0}}function Wr({defaultValues:t={},onChange:n}={}){const A={representativeName:t.representativeName||"",buyerAddress:t.buyerAddress||"",email:t.email||"",phone:t.phone||""},e=document.createElement("div");e.className="wgt:space-y-2";function a(){typeof n=="function"&&n(j({},A))}function h({label:T,required:x,name:Q,type:E="text",placeholder:p}){const v=document.createElement("div");v.className="";const M=document.createElement("label");M.className="wgt:text-sm wgt:font-medium wgt:text-strong-950",M.htmlFor=Q,M.innerHTML=x?`${T} <span class="wgt:text-semantic-error wgt:text-[#ED1C24]">*</span>`:T;const f=document.createElement("input");f.id=Q,f.name=Q,f.type=E,f.placeholder=p||"",f.className="wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary",f.value=A[Q]||"";const y=document.createElement("div");return y.className="wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",y.setAttribute("data-error-for",Q),f.addEventListener("input",()=>{A[Q]=f.value,f.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),y.classList.add("wgt:hidden"),a()}),f.addEventListener("blur",()=>{let N;switch(Q){case"representativeName":N=XA(f.value);break;case"buyerAddress":N=pe(f.value);break;case"email":N=we(f.value);break;default:return}!N.valid&&N.error&&(f.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),y.textContent=N.error,y.classList.remove("wgt:hidden"))}),v.appendChild(M),v.appendChild(f),v.appendChild(y),{field:v,input:f,errorEl:y}}const{field:c,input:i,errorEl:o}=h({label:q("representativeName"),required:!0,name:"representativeName",placeholder:q("representativeName_input")}),{field:s,errorEl:r}=h({label:q("buyerAddress"),required:!1,name:"buyerAddress",placeholder:q("buyerAddress_input")}),{field:u,input:m,errorEl:g}=h({label:q("email"),required:!0,name:"email",type:"email",placeholder:q("email_input")});e.appendChild(c),e.appendChild(s),e.appendChild(u);function l(){let T=!0;function x(p,v,M){p.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),M&&v&&(v.textContent=M,v.classList.remove("wgt:hidden")),T=!1}const Q=XA(A.representativeName);if(Q.valid||x(i,o,Q.error),A.buyerAddress.trim()){const p=pe(A.buyerAddress);p.valid||x(document.querySelector('input[name="buyerAddress"]'),r,p.error)}const E=we(A.email);return E.valid||x(m,g,E.error),T}function d(){return j({},A)}return{container:e,getValues:d,validate:l}}function Ur({defaultValues:t={},onChange:n,onFetchByTaxCode:A}={}){const e={noTaxCode:!!t.noTaxCode,taxCode:t.taxCode||"",businessName:t.businessName||"",representativeName:t.representativeName||"",buyerAddress:t.buyerAddress||"",email:t.email||"",phone:t.phone||""},a=document.createElement("div");a.className="wgt:space-y-2";function h(){typeof n=="function"&&n(j({},e))}function c({label:b,required:I,name:C,type:S="text",placeholder:H}){const D=document.createElement("div");D.className="";const O=document.createElement("label");O.className="wgt:text-sm wgt:font-medium wgt:text-strong-950",O.htmlFor=C,O.innerHTML=I?`${b} <span class="wgt:text-[#ED1C24]">*</span>`:b;const K=document.createElement("input");K.id=C,K.name=C,K.type=S,K.placeholder=H||"",K.className="wgt:w-full wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:mt-2 wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary",K.value=e[C]||"";const U=document.createElement("div");return U.className="wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",U.setAttribute("data-error-for",C),K.addEventListener("input",()=>{e[C]=K.value,K.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),U.classList.add("wgt:hidden"),h()}),K.addEventListener("blur",()=>{if(!K.value.trim()&&!I)return;let nn;switch(C){case"businesName":case"representativeName":nn=XA(K.value);break;case"buyerAddress":nn=pe(K.value);break;case"email":nn=we(K.value);break;case"phone":nn=sc(K.value,!0);break;default:return}!nn.valid&&nn.error&&(K.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),U.textContent=nn.error,U.classList.remove("wgt:hidden"))}),D.appendChild(O),D.appendChild(K),D.appendChild(U),{field:D,input:K,errorEl:U}}const i=document.createElement("label");i.className="wgt:flex wgt:items-center wgt:gap-2 wgt:font-medium wgt:text-strong-950 wgt:text-sm";const o=document.createElement("input");o.type="checkbox",o.className="wgt:h-4 wgt:w-4 wgt:rounded wgt:border-[#E4E7EC] focus:wgt:outline-none focus:wgt:ring-primary",o.checked=e.noTaxCode;const s=document.createElement("span");s.textContent=q("business_noTaxCode"),s.className="wgt:italic wgt:font-normal wgt:text-[14px] wgt:leading-[20px] wgt:tracking-[0px] wgt:align-middle wgt:text-[#525866]",s.style.fontFamily="Inter, sans-serif",o.addEventListener("change",()=>{e.noTaxCode=o.checked,g.disabled=e.noTaxCode,d.disabled=e.noTaxCode,g.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.classList.add("wgt:hidden"),h()}),i.appendChild(o),i.appendChild(s);const r=document.createElement("div");r.className="wgt:space-y-2";const u=document.createElement("label");u.className="wgt:text-sm wgt:font-medium wgt:text-strong-950 ",u.innerHTML=q("confirmation_popup_taxCode")+'<span class="wgt:text-[#ED1C24]">*</span>';const m=document.createElement("div");m.className="wgt:flex wgt:gap-2 wgt:mt-2";const g=document.createElement("input");g.type="text",g.name="taxCode",g.placeholder=q("taxCode_input"),g.value=e.taxCode,g.className="wgt:flex-1 wgt:rounded-lg wgt:border wgt:border-[#E4E7EC] wgt:bg-white wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:text-strong-950 focus:wgt:outline-none focus:wgt:border-primary focus:wgt:ring-1 focus:wgt:ring-primary";const l=document.createElement("div");l.className="wgt:text-xs wgt:text-[#ED1C24] wgt:mt-1 wgt:hidden",g.addEventListener("input",()=>{e.taxCode=g.value,g.classList.remove("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.classList.add("wgt:hidden"),h()}),g.addEventListener("blur",()=>{if(e.noTaxCode||!g.value.trim())return;const b=H0(g.value);b.valid||(g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent=b.error,l.classList.remove("wgt:hidden"))});const d=It({type:"button",title:q("fetch_info"),className:"wgt:px-3 wgt:py-2.5 wgt:text-sm wgt:font-semibold wgt:rounded-lg wgt:flex-shrink-0 wgt:text-primary wgt:bg-white wgt:border wgt:border-primary",handleClick:()=>W(null,null,function*(){if(e.noTaxCode||typeof A!="function")return;const b=String(e.taxCode||"").trim();if(!b){g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent="Vui lòng nhập MST",l.classList.remove("wgt:hidden");return}const I=H0(b);if(!I.valid){g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent=I.error,l.classList.remove("wgt:hidden");return}try{d.disabled=!0;const C=yield A(b,j({},e));if(!C||typeof C!="object")return;C.businessName!=null&&(e.businessName=String(C.businessName||""),x.value=e.businessName),C.representativeName!=null&&(e.representativeName=String(C.representativeName||""),p.value=e.representativeName),C.buyerAddress!=null&&(e.buyerAddress=String(C.buyerAddress||""),f.value=e.buyerAddress),h()}catch(C){g.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50"),l.textContent="Không tìm thấy thông tin MST",l.classList.remove("wgt:hidden")}finally{d.disabled=e.noTaxCode}})});m.appendChild(g),m.appendChild(d),r.appendChild(u),r.appendChild(m),r.appendChild(l);const{field:T,input:x,errorEl:Q}=c({label:q("businessName"),required:!0,name:"businessName",placeholder:q("businessName_input")}),{field:E,input:p,errorEl:v}=c({label:q("representativeName"),required:!0,name:"representativeName",placeholder:q("representativeName_input")}),{field:M,input:f,errorEl:y}=c({label:q("buyerAddress"),required:!1,name:"buyerAddress",placeholder:q("buyerAddress_input")}),{field:N,input:J,errorEl:P}=c({label:q("email"),required:!0,name:"email",type:"email",placeholder:q("email_input")}),{field:L,input:w,errorEl:k}=c({label:q("phone"),required:!1,name:"phone",type:"tel",placeholder:q("phone_input")});a.appendChild(i),a.appendChild(r),a.appendChild(T),a.appendChild(E),a.appendChild(M),a.appendChild(N),a.appendChild(L),g.disabled=e.noTaxCode,d.disabled=e.noTaxCode;function B(){let b=!0;function I(D,O,K){D.classList.add("wgt:border-semantic-error","wgt:bg-semantic-error-50","wgt:mt-2"),K&&O&&(O.textContent=K,O.classList.remove("wgt:hidden")),b=!1}if(!e.noTaxCode){const D=H0(e.taxCode);D.valid||I(g,l,D.error)}const C=XA(e.businessName);C.valid||I(x,Q,C.error);const S=XA(e.representativeName);if(S.valid||I(p,v,S.error),e.buyerAddress.trim()){const D=pe(e.buyerAddress);D.valid||I(f,y,D.error)}const H=we(e.email);if(H.valid||I(J,P,H.error),e.phone.trim()){const D=sc(e.phone,!0);D.valid||I(w,k,D.error)}return b}function X(){return j({},e)}return{container:a,getValues:X,validate:B}}function _r({type:t,data:n,orderInfo:A,theme:e,onClose:a,onConfirm:h}){const c=document.createElement("div");c.className="wgt:fixed wgt:inset-0 wgt:flex wgt:items-center wgt:justify-center wgt:z-50 wgt:p-4",c.style.cssText=`
|
|
473
473
|
background-color: rgba(0, 0, 0, 0.5);
|
|
474
474
|
backdrop-filter: blur(4px);
|
|
475
|
-
`,e&&c.setAttribute("data-theme",e);const i=document.createElement("div");i.className="wgt:w-full wgt:max-w-md wgt:bg-white wgt:rounded-2xl wgt:shadow-xl wgt:max-h-[90vh] wgt:overflow-y-auto";const o=document.createElement("div");o.className="wgt:px-6 wgt:pt-6 wgt:pb-4 wgt:space-y-2";const s=document.createElement("h3");s.className="wgt:text-xl wgt:font-semibold wgt:text-center wgt:text-strong-950",s.textContent=q("confirmation_popup_title");const r=document.createElement("p");r.className="wgt:text-sm wgt:text-center wgt:text-[#525866]",r.textContent=q("confirmation_popup_subtitle"),o.appendChild(s),o.appendChild(r),i.appendChild(o);const u=document.createElement("div");u.className="wgt:px-6 wgt:pb-4";const m=document.createElement("div");m.className="wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";function g(f,y,N){const J=document.createElement("div");J.className="wgt:flex wgt:items-start wgt:gap-3";const P=document.createElement("span");P.className="wgt:text-primary wgt:flex-shrink-0",P.innerHTML=f;const L=document.createElement("div");L.className="wgt:flex wgt:items-start wgt:justify-between wgt:flex-1 wgt:gap-2";const w=document.createElement("span");w.className="wgt:text-sm wgt:text-[#525866] wgt:w-1/3",w.textContent=y;const k=document.createElement("span");return k.className="wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3",k.textContent=N||"-",L.appendChild(w),L.appendChild(k),J.appendChild(P),J.appendChild(L),J}const l='<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',d='<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',T='<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';m.appendChild(g(l,q("confirmation_popup_orderCode"),A==null?void 0:A.billNo)),m.appendChild(g(d,q("confirmation_popup_address"),A==null?void 0:A.merchantAddress)),m.appendChild(g(T,q("confirmation_popup_totalAmount"),Kn(A==null?void 0:A.amount)+" VND")),u.appendChild(m),i.appendChild(u);const x=document.createElement("div");x.className="wgt:px-6 wgt:pb-6";const Q=document.createElement("div");Q.className="wgt:space-y-3 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:px-4 wgt:py-4";function E(f,y){const N=document.createElement("div");N.className="wgt:flex wgt:items-start wgt:justify-between wgt:gap-4";const J=document.createElement("span");J.className="wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3",J.textContent=f;const P=document.createElement("span");return P.className="wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3",P.textContent=y||"-",N.appendChild(J),N.appendChild(P),N}t==="business"?(Q.appendChild(E(q("confirmation_popup_taxCode"),n.taxCode)),Q.appendChild(E(q("businessName"),n.businessName)),Q.appendChild(E(q("confirmation_popup_representativeName"),n.representativeName)),Q.appendChild(E(q("confirmation_popup_buyerAddress"),n.buyerAddress)),Q.appendChild(E(q("confirmation_popup_email"),n.email)),Q.appendChild(E(q("confirmation_popup_phone"),n.phone))):(Q.appendChild(E(q("confirmation_popup_representativeName"),n.representativeName)),Q.appendChild(E(q("confirmation_popup_buyerAddress"),n.buyerAddress)),Q.appendChild(E(q("confirmation_popup_email"),n.email))),x.appendChild(Q),i.appendChild(x);const p=document.createElement("div");p.className="wgt:px-6 wgt:pb-6 wgt:flex wgt:gap-3";const v=It({type:"button",title:"Đóng",className:"wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-white wgt:text-primary wgt:border wgt:border-primary",handleClick:()=>{typeof a=="function"&&a(),c.remove()}}),M=It({type:"button",title:"Xác nhận",className:"wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-primary wgt:text-white",handleClick:()=>{typeof h=="function"&&h({type:t,data:n}),c.remove()}});return p.appendChild(v),p.appendChild(M),i.appendChild(p),c.appendChild(i),c.addEventListener("click",f=>{f.target===c&&(typeof a=="function"&&a(),c.remove())}),{overlay:c}}const $r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAABICAYAAABbaA9tAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAKz9JREFUeAHtXQd4HNW1PlO3aqVdrVaymiVZso0boc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WLUu91ufkIdpEnx8q307BriRsBPNVb8cKkKVG1WIB6CWK4aF5PjwBaFABPcDh+VVE0/ur59PdZwy/ZW7n1i/h282tc/gGsKsJG49OUt9Ixv4S4My9wKBrhRqklMpHA6WH4bVnissOAY6v4Sw7gAWeh9b+rkfh282pc/iGsKsJWyfKd6XogywrKpb1h+0l1o65eT50GeN/Kni4J6X7KXTOrBIHoYeIL88llD9by8khh9FidyzxeiB/c0XdE4UMc3ZM1eNY8exrfUNDHi9s6pflGtD/VYe+y0V1sxwbVlNPVzRvOhN2/D8Q5PA9xC4XRcBUCJ7qS17h5B14Pog+mYhXE/fwqgZR62EexsZhkpy8AHf1RK+C9PafHHIYE3YHYev1XB/Z0tMJyo1+TkAP5OB/CjM/dWLHCFM//iP1lHLjHwc62mH3tS+H7xh2p7VBF0ni1XuskFV5miQT4mas//mAkfGAGx/HruAa182A0e9FzCGHbbA7OaIeL3JWw5ofeBnfRgevoW9Xt33iJ54LWODNa1r4wxn03JIccvjWYNBj1VZR+1etag/0Qmpa9YxUV0XdY1qaoL+v/5slh52Eb4IzDp6FUV9U5M3TtNIirrTlrPavBmDb47ZyyOFbh5y4kUMOOeQwFvw/nuqxEggnLfAAAAAASUVORK5CYII=";function nu({theme:t,assets:n={},year:A}={}){const e=A!=null?A:new Date().getFullYear(),a=document.createElement("div");a.className="wgt:w-full wgt:bg-white",t&&a.setAttribute("data-theme",t);const h=document.createElement("div");h.className="wgt:w-full wgt:border-t wgt:border-[#E5E7EB]",a.appendChild(h);const c=document.createElement("div");c.className="wgt:w-full wgt:max-w-md wgt:mx-auto wgt:px-4 wgt:py-4",a.appendChild(c);const i=document.createElement("div");i.className="wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:mb-3 wgt:flex-wrap";const o=document.createElement("div");o.className="wgt:text-base wgt:font-semibold wgt:text-strong-950",o.textContent="Giải pháp thanh toán được cung cấp bởi";const s=document.createElement("div");s.className="wgt:flex wgt:items-center wgt:justify-center wgt:shrink-0";const r=document.createElement("img");if(r.src=$r,r.alt="ATOM",r.className="wgt:h-6 wgt:w-auto",r.loading="lazy",s.appendChild(r),i.appendChild(o),i.appendChild(s),c.appendChild(i),n.cyberSourceLogo||n.pciLogo){const g=document.createElement("div");if(g.className="wgt:flex wgt:items-center wgt:justify-center wgt:gap-6 wgt:py-2",n.cyberSourceLogo){const l=document.createElement("img");l.src=n.cyberSourceLogo,l.alt="CyberSource",l.className="wgt:h-10 wgt:w-auto",l.loading="lazy",g.appendChild(l)}if(n.pciLogo){const l=document.createElement("img");l.src=n.pciLogo,l.alt="PCI DSS",l.className="wgt:h-10 wgt:w-auto",l.loading="lazy",g.appendChild(l)}c.appendChild(g)}const u=document.createElement("div");u.className="wgt:w-full wgt:border-t wgt:border-[#E5E7EB]",a.appendChild(u);const m=document.createElement("div");return m.className="wgt:w-full wgt:max-w-md wgt:mx-auto wgt:px-4 wgt:py-3 wgt:text-center wgt:text-sm wgt:text-[#9CA3AF]",m.textContent=`© ${e} Bản quyền thuộc về ATOM`,a.appendChild(m),{container:a}}function tu({orderInfo:t,onPreview:n,theme:A,onSubmit:e,taxCode:a=""}){const h=document.createElement("div");h.className="wgt:flex wgt:flex-col wgt:items-center wgt:justify-between wgt:h-full wgt:shadow wgt:rounded-xl",A&&h.setAttribute("data-theme",A);const c=document.createElement("div");c.className="wgt:w-full wgt:max-w-md wgt:space-y-4 wgt:rounded-xl wgt:bg-white wgt:p-4",h.appendChild(c);const{container:i,open:o,close:s}=kA();h.style.position=h.style.position||"relative",h.appendChild(i);const r=document.createElement("div");r.className="wgt:space-y-1";const u=document.createElement("h3");u.className="wgt:text-2xl wgt:font-semibold wgt:text-text-black wgt:text-center wgt:justify-center",u.textContent=q("invoiceform_title");const m=document.createElement("p");m.className="wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center",m.textContent=q("invoiceform_subtitle"),r.appendChild(u),r.appendChild(m),c.appendChild(r);const g=document.createElement("div");g.className="wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";function l(L,w){const k=document.createElement("div");k.className="wgt:flex wgt:items-start";const B=document.createElement("div");B.className="wgt:flex wgt:items-center wgt:gap-2 wgt:w-1/3";const X=document.createElement("span");X.className="wgt:inline-flex wgt:items-center wgt:justify-center wgt:w-4 wgt:h-4 wgt:text-icon-primary";let b="";L===q("invoice_number")?b=`
|
|
475
|
+
`,e&&c.setAttribute("data-theme",e);const i=document.createElement("div");i.className="wgt:w-full wgt:max-w-md wgt:bg-white wgt:rounded-2xl wgt:shadow-xl wgt:max-h-[90vh] wgt:overflow-y-auto";const o=document.createElement("div");o.className="wgt:px-6 wgt:pt-6 wgt:pb-4 wgt:space-y-2";const s=document.createElement("h3");s.className="wgt:text-xl wgt:font-semibold wgt:text-center wgt:text-strong-950",s.textContent=q("confirmation_popup_title");const r=document.createElement("p");r.className="wgt:text-sm wgt:text-center wgt:text-[#525866]",r.textContent=q("confirmation_popup_subtitle"),o.appendChild(s),o.appendChild(r),i.appendChild(o);const u=document.createElement("div");u.className="wgt:px-6 wgt:pb-4";const m=document.createElement("div");m.className="wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-4 wgt:py-3";function g(f,y,N){const J=document.createElement("div");J.className="wgt:flex wgt:items-start wgt:gap-3";const P=document.createElement("span");P.className="wgt:text-primary wgt:flex-shrink-0",P.innerHTML=f;const L=document.createElement("div");L.className="wgt:flex wgt:items-start wgt:justify-between wgt:flex-1 wgt:gap-2";const w=document.createElement("span");w.className="wgt:text-sm wgt:text-[#525866] wgt:w-1/3",w.textContent=y;const k=document.createElement("span");return k.className="wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3",k.textContent=N||"-",L.appendChild(w),L.appendChild(k),J.appendChild(P),J.appendChild(L),J}const l='<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',d='<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',T='<svg class="wgt:w-4 wgt:h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';m.appendChild(g(l,q("confirmation_popup_orderCode"),A==null?void 0:A.billNo)),m.appendChild(g(d,q("confirmation_popup_address"),A==null?void 0:A.address)),m.appendChild(g(T,q("confirmation_popup_totalAmount"),Kn(A==null?void 0:A.amount)+" VND")),u.appendChild(m),i.appendChild(u);const x=document.createElement("div");x.className="wgt:px-6 wgt:pb-6";const Q=document.createElement("div");Q.className="wgt:space-y-3 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:px-4 wgt:py-4";function E(f,y){const N=document.createElement("div");N.className="wgt:flex wgt:items-start wgt:justify-between wgt:gap-4";const J=document.createElement("span");J.className="wgt:text-sm wgt:text-[#0E121B] wgt:w-1/3",J.textContent=f;const P=document.createElement("span");return P.className="wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:text-right wgt:w-2/3",P.textContent=y||"-",N.appendChild(J),N.appendChild(P),N}t==="business"?(Q.appendChild(E(q("confirmation_popup_taxCode"),n.taxCode)),Q.appendChild(E(q("businessName"),n.businessName)),Q.appendChild(E(q("confirmation_popup_representativeName"),n.representativeName)),Q.appendChild(E(q("confirmation_popup_buyerAddress"),n.buyerAddress)),Q.appendChild(E(q("confirmation_popup_email"),n.email)),Q.appendChild(E(q("confirmation_popup_phone"),n.phone))):(Q.appendChild(E(q("confirmation_popup_representativeName"),n.representativeName)),Q.appendChild(E(q("confirmation_popup_buyerAddress"),n.buyerAddress)),Q.appendChild(E(q("confirmation_popup_email"),n.email))),x.appendChild(Q),i.appendChild(x);const p=document.createElement("div");p.className="wgt:px-6 wgt:pb-6 wgt:flex wgt:gap-3";const v=It({type:"button",title:"Đóng",className:"wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-white wgt:text-primary wgt:border wgt:border-primary",handleClick:()=>{typeof a=="function"&&a(),c.remove()}}),M=It({type:"button",title:"Xác nhận",className:"wgt:flex-1 wgt:py-3 wgt:text-sm wgt:font-semibold wgt:rounded-[8px] wgt:bg-primary wgt:text-white",handleClick:()=>{typeof h=="function"&&h({type:t,data:n}),c.remove()}});return p.appendChild(v),p.appendChild(M),i.appendChild(p),c.appendChild(i),c.addEventListener("click",f=>{f.target===c&&(typeof a=="function"&&a(),c.remove())}),{overlay:c}}const $r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAABICAYAAABbaA9tAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAKz9JREFUeAHtXQd4HNW1PlO3aqVdrVaymiVZso0bocR54AAGQu/F5BkIHZxAgNBDHkU8kgChBgLEJJTAoxlMiCkOzRCbEmow7sa2ZEuy2qqstNoyO+XdMzNXOzteNTc+YP/vu9rdmTu3zbnnnnavAL4ZMENcYyCHHHYCWNj94MAk4MtDoeI3SyfMejYYLCU/NfM6Bznk8C0Dj38ugn2Egeopi7WaqVqqeoqmV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T50GeN/Kni4J6X7KXTOrBIHoYeIL88llD9by8khh9FidyzxeiB/c0XdE4UMc3ZM1eNY8exrfUNDHi9s6pflGtD/VYe+y0V1sxwbVlNPVzRvOhN2/D8Q5PA9xC4XRcBUCJ7qS17h5B14Pog+mYhXE/fwqgZR62EexsZhkpy8AHf1RK+C9PafHHIYE3YHYev1XB/Z0tMJyo1+TkAP5OB/CjM/dWLHCFM//iP1lHLjHwc62mH3tS+H7xh2p7VBF0ni1XuskFV5miQT4mas//mAkfGAGx/HruAa182A0e9FzCGHbbA7OaIeL3JWw5ofeBnfRgevoW9Xt33iJ54LWODNa1r4wxn03JIccvjWYNBj1VZR+1etag/0Qmpa9YxUV0XdY1qaoL+v/5slh52Eb4IzDp6FUV9U5M3TtNIirrTlrPavBmDb47ZyyOFbh5y4kUMOOeQwFvw/nuqxEggnLfAAAAAASUVORK5CYII=";function nu({theme:t,assets:n={},year:A}={}){const e=A!=null?A:new Date().getFullYear(),a=document.createElement("div");a.className="wgt:w-full wgt:bg-white",t&&a.setAttribute("data-theme",t);const h=document.createElement("div");h.className="wgt:w-full wgt:border-t wgt:border-[#E5E7EB]",a.appendChild(h);const c=document.createElement("div");c.className="wgt:w-full wgt:max-w-md wgt:mx-auto wgt:px-4 wgt:py-4",a.appendChild(c);const i=document.createElement("div");i.className="wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:mb-3 wgt:flex-wrap";const o=document.createElement("div");o.className="wgt:text-base wgt:font-semibold wgt:text-strong-950",o.textContent="Giải pháp thanh toán được cung cấp bởi";const s=document.createElement("div");s.className="wgt:flex wgt:items-center wgt:justify-center wgt:shrink-0";const r=document.createElement("img");if(r.src=$r,r.alt="ATOM",r.className="wgt:h-6 wgt:w-auto",r.loading="lazy",s.appendChild(r),i.appendChild(o),i.appendChild(s),c.appendChild(i),n.cyberSourceLogo||n.pciLogo){const g=document.createElement("div");if(g.className="wgt:flex wgt:items-center wgt:justify-center wgt:gap-6 wgt:py-2",n.cyberSourceLogo){const l=document.createElement("img");l.src=n.cyberSourceLogo,l.alt="CyberSource",l.className="wgt:h-10 wgt:w-auto",l.loading="lazy",g.appendChild(l)}if(n.pciLogo){const l=document.createElement("img");l.src=n.pciLogo,l.alt="PCI DSS",l.className="wgt:h-10 wgt:w-auto",l.loading="lazy",g.appendChild(l)}c.appendChild(g)}const u=document.createElement("div");u.className="wgt:w-full wgt:border-t wgt:border-[#E5E7EB]",a.appendChild(u);const m=document.createElement("div");return m.className="wgt:w-full wgt:max-w-md wgt:mx-auto wgt:px-4 wgt:py-3 wgt:text-center wgt:text-sm wgt:text-[#9CA3AF]",m.textContent=`© ${e} Bản quyền thuộc về ATOM`,a.appendChild(m),{container:a}}function tu({orderInfo:t,onPreview:n,theme:A,onSubmit:e,taxCode:a=""}){const h=document.createElement("div");h.className="wgt:flex wgt:flex-col wgt:items-center wgt:justify-between wgt:h-full wgt:shadow wgt:rounded-xl",A&&h.setAttribute("data-theme",A);const c=document.createElement("div");c.className="wgt:w-full wgt:max-w-md wgt:space-y-4 wgt:rounded-xl wgt:bg-white wgt:p-4",h.appendChild(c);const{container:i,open:o,close:s}=kA();h.style.position=h.style.position||"relative",h.appendChild(i);const r=document.createElement("div");r.className="wgt:space-y-1";const u=document.createElement("h3");u.className="wgt:text-2xl wgt:font-semibold wgt:text-text-black wgt:text-center wgt:justify-center",u.textContent=q("invoiceform_title");const m=document.createElement("p");m.className="wgt:text-sm wgt:text-weak-700 wgt:text-center wgt:justify-center",m.textContent=q("invoiceform_subtitle"),r.appendChild(u),r.appendChild(m),c.appendChild(r);const g=document.createElement("div");g.className="wgt:mt-2 wgt:space-y-3 wgt:rounded-xl wgt:bg-weak-50 wgt:px-6 wgt:py-6";function l(L,w){const k=document.createElement("div");k.className="wgt:flex wgt:items-start";const B=document.createElement("div");B.className="wgt:flex wgt:items-center wgt:gap-2 wgt:w-1/3";const X=document.createElement("span");X.className="wgt:inline-flex wgt:items-center wgt:justify-center wgt:w-4 wgt:h-4 wgt:text-icon-primary";let b="";L===q("invoice_number")?b=`
|
|
476
476
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
477
477
|
<path d="M12.7996 14H3.19961C3.04048 14 2.88787 13.9368 2.77535 13.8243C2.66282 13.7117 2.59961 13.5591 2.59961 13.4V2.6C2.59961 2.44087 2.66282 2.28826 2.77535 2.17574C2.88787 2.06321 3.04048 2 3.19961 2H12.7996C12.9587 2 13.1114 2.06321 13.2239 2.17574C13.3364 2.28826 13.3996 2.44087 13.3996 2.6V13.4C13.3996 13.5591 13.3364 13.7117 13.2239 13.8243C13.1114 13.9368 12.9587 14 12.7996 14ZM12.1996 12.8V3.2H3.79961V12.8H12.1996ZM5.59961 6.2H10.3996V7.4H5.59961V6.2ZM5.59961 8.6H10.3996V9.8H5.59961V8.6Z" fill="currentColor"/>
|
|
478
478
|
</svg>
|
|
@@ -484,7 +484,7 @@ Minimum version required to store current data is: `+P+`.
|
|
|
484
484
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
485
485
|
<path d="M8 14C4.6862 14 2 11.3138 2 8C2 4.6862 4.6862 2 8 2C11.3138 2 14 4.6862 14 8C14 11.3138 11.3138 14 8 14ZM8 12.8C9.27304 12.8 10.4939 12.2943 11.3941 11.3941C12.2943 10.4939 12.8 9.27304 12.8 8C12.8 6.72696 12.2943 5.50606 11.3941 4.60589C10.4939 3.70571 9.27304 3.2 8 3.2C6.72696 3.2 5.50606 3.70571 4.60589 4.60589C3.70571 5.50606 3.2 6.72696 3.2 8C3.2 9.27304 3.70571 10.4939 4.60589 11.3941C5.50606 12.2943 6.72696 12.8 8 12.8V12.8ZM5.9 9.2H9.2C9.27957 9.2 9.35587 9.16839 9.41213 9.11213C9.46839 9.05587 9.5 8.97957 9.5 8.9C9.5 8.82044 9.46839 8.74413 9.41213 8.68787C9.35587 8.63161 9.27957 8.6 9.2 8.6H6.8C6.40218 8.6 6.02064 8.44197 5.73934 8.16066C5.45804 7.87936 5.3 7.49783 5.3 7.1C5.3 6.70218 5.45804 6.32065 5.73934 6.03934C6.02064 5.75804 6.40218 5.6 6.8 5.6H7.4V4.4H8.6V5.6H10.1V6.8H6.8C6.72044 6.8 6.64413 6.83161 6.58787 6.88787C6.53161 6.94413 6.5 7.02044 6.5 7.1C6.5 7.17957 6.53161 7.25587 6.58787 7.31213C6.64413 7.36839 6.72044 7.4 6.8 7.4H9.2C9.59783 7.4 9.97936 7.55804 10.2607 7.83934C10.542 8.12065 10.7 8.50218 10.7 8.9C10.7 9.29783 10.542 9.67936 10.2607 9.96066C9.97936 10.242 9.59783 10.4 9.2 10.4H8.6V11.6H7.4V10.4H5.9V9.2Z" fill="currentColor"/>
|
|
486
486
|
</svg>
|
|
487
|
-
`),X.innerHTML=b;const I=document.createElement("span");I.className="wgt:text-sm wgt:text-weak-700",I.textContent=L,B.appendChild(X),B.appendChild(I);const C=document.createElement("span");return C.className="wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right",C.textContent=w!=null?w:"",k.appendChild(B),k.appendChild(C),k}g.appendChild(l(q("invoice_number"),t==null?void 0:t.billNo)),g.appendChild(l(q("address_form"),t==null?void 0:t.
|
|
487
|
+
`),X.innerHTML=b;const I=document.createElement("span");I.className="wgt:text-sm wgt:text-weak-700",I.textContent=L,B.appendChild(X),B.appendChild(I);const C=document.createElement("span");return C.className="wgt:text-sm wgt:font-semibold wgt:text-strong-950 wgt:w-2/3 wgt:text-right",C.textContent=w!=null?w:"",k.appendChild(B),k.appendChild(C),k}g.appendChild(l(q("invoice_number"),t==null?void 0:t.billNo)),g.appendChild(l(q("address_form"),t==null?void 0:t.address)),g.appendChild(l(q("total_amount"),`${Kn(t==null?void 0:t.amount)} VND`)),c.appendChild(g);const d=document.createElement("div");d.className="wgt:mt-4 wgt:rounded-xl wgt:border wgt:border-[#E1E4EA] wgt:bg-white wgt:pb-6",c.appendChild(d);const T=document.createElement("div");T.className="wgt:flex wgt:border-b wgt:border-[#E1E4EA]",d.appendChild(T);const x=document.createElement("button");x.type="button",x.className="wgt:relative wgt:flex-1 wgt:py-4 wgt:text-sm wgt:font-semibold",x.innerHTML=`
|
|
488
488
|
<span class="wgt:flex wgt:items-center wgt:justify-center wgt:gap-2">
|
|
489
489
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
490
490
|
<path d="M10 12C11.4587 12 12.8572 12.5799 13.8887 13.6113C14.8016 14.5242 15.3592 15.7247 15.4756 17H14.9746C14.8598 15.8576 14.3542 14.7839 13.5352 13.9648C12.5975 13.0272 11.3261 12.5 10 12.5C8.67392 12.5 7.40253 13.0272 6.46484 13.9648C5.64577 14.7839 5.14018 15.8576 5.02539 17H4.52441C4.64082 15.7247 5.19843 14.5242 6.11133 13.6113C7.07838 12.6443 8.36805 12.0742 9.72754 12.0068L10 12ZM10 2.25C12.2101 2.25 14 4.03989 14 6.25C14 8.46011 12.2101 10.25 10 10.25C7.78989 10.25 6 8.46011 6 6.25C6 4.03989 7.78989 2.25 10 2.25ZM10 2.75C8.06636 2.75 6.5 4.31636 6.5 6.25C6.5 8.18364 8.06636 9.75 10 9.75C11.9336 9.75 13.5 8.18364 13.5 6.25C13.5 4.31636 11.9336 2.75 10 2.75Z" fill="currentColor" stroke="currentColor"/>
|
|
@@ -521,4 +521,4 @@ Minimum version required to store current data is: `+P+`.
|
|
|
521
521
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.7788 33.9142C39.4439 33.9142 39.9696 34.4369 39.9696 35.1051C39.9696 35.7748 39.4447 36.2959 38.7788 36.2959C38.1144 36.2959 37.5879 35.7748 37.5879 35.1051C37.5879 34.4361 38.1144 33.9142 38.7788 33.9142ZM44.1494 28.6799C43.9468 28.6837 43.7479 28.7675 43.6039 28.9146L39.9376 32.59C39.5826 32.4232 39.1925 32.3234 38.7788 32.3234C37.2542 32.3234 36.0039 33.5813 36.0039 35.1051C36.0039 36.6296 37.2542 37.8891 38.7788 37.8891C40.3033 37.8891 41.5544 36.6296 41.5544 35.1051C41.5544 34.5679 41.3944 34.0712 41.1285 33.6445L44.727 30.0376C45.2367 29.5317 44.8702 28.6632 44.1494 28.6799Z" fill="#808080"/>
|
|
522
522
|
</svg>
|
|
523
523
|
|
|
524
|
-
`,a.appendChild(h),e.appendChild(a);const c=document.createElement("h2");c.className="wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2",c.textContent=q("invoiceExpired_title"),e.appendChild(c);const i=document.createElement("p");i.className="wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed wgt:px-2 wgt:mb-3",i.textContent=q("invoiceExpired_description"),e.appendChild(i);const o=document.createElement("p");return o.className="wgt:text-sm wgt:text-[#99A0AE] wgt:italic wgt:leading-relaxed wgt:px-4",o.textContent=q("invoiceExpired_note"),e.appendChild(o),A.appendChild(e),{container:A}}function rc(t){return String(t||"").trim().toLowerCase()}function uc(t){return String(t||"").trim().toLowerCase()==="1invoice"}function gc(t,n){return W(this,null,function*(){return uc(t)?V1(n):z1(n)})}function au(t,n,A){return W(this,null,function*(){return uc(t)?R1(n,A):O1(n,A)})}function hu({uuid:t,orderInfo:n,theme:A}){const e=document.createElement("div");e.className="wgt:w-full wgt:min-h-screen wgt:flex wgt:flex-col wgt:bg-[#F3F4F6]";let a=!1;const h=document.createElement("div");h.className="wgt:w-full",e.appendChild(h);const c=nu({theme:A,year:2025});c.container.classList.add("wgt:mt-1"),e.appendChild(c.container);function i(x){a||(h.innerHTML="",x&&h.appendChild(x))}function o(x){x&&console.log("[DEBUG] renderFailedPage:",x);const Q=Ue({theme:A,onClose:g});i(Q.container)}function s(){const x=eu({theme:A});i(x.container)}function r(x){const Q=Au({theme:A});i(Q.container)}function u(x){const Q=tu({orderInfo:x||{},theme:A,onSubmit:v=>W(null,[v],function*({type:E,data:p}){const M=m();if(!M)return o({reason:"MISSING_UUID_ON_SUBMIT"}),{ok:!1};const f=iu(E,p);return yield au(A,M,f),{ok:!0,finalData:yield ou(M,A,{maxTries:20,intervalMs:1500})}}),onBack:g});i(Q.container)}function m(){var E;const x=new URLSearchParams(window.location.search||"");return String((E=x.get("uuid"))!=null?E:"").trim()||String(t||"").trim()||String((n==null?void 0:n.uuid)||"").trim()}function g(){return W(this,null,function*(){yield l()})}function l(){return W(this,null,function*(){try{const x=m();if(!x)return o({reason:"EMPTY_UUID_NO_API_CALL"});const Q=yield gc(A,x),E=String((Q==null?void 0:Q.message)||"").trim();if(E)return o({reason:"API_MESSAGE",apiMsg:E,res:Q});const p=rc(Q==null?void 0:Q.status);return p==="expired"?s():p==="invoiced"?r(Q):p==="pending"||p==="waiting"?u(Q||n||{}):p===""&&Q&&Object.keys(Q).length>0?u(Q):o({reason:"UNKNOWN_STATUS",status:p,res:Q})}catch(x){return console.log("[DEBUG] loadAndRender error:",x),o({reason:"EXCEPTION",error:(x==null?void 0:x.message)||x})}})}function d(){return W(this,null,function*(){o({reason:"INIT_DEFAULT_RENDER"});try{yield l()}catch(x){return o({reason:"INIT_EXCEPTION",error:(x==null?void 0:x.message)||x})}})}function T(){a=!0,e.innerHTML=""}return{container:e,init:d,destroy:T}}function cu(t){return String(t||"").trim().toLowerCase()==="business"?"enterprise":"individual"}function iu(t,n){const A=cu(t),e={invoiceType:A,buyerName:(n==null?void 0:n.representativeName)||"",address:(n==null?void 0:n.buyerAddress)||"",email:(n==null?void 0:n.email)||""};return A==="enterprise"&&(e.taxCode=n!=null&&n.noTaxCode?"":(n==null?void 0:n.taxCode)||"",e.businessName=(n==null?void 0:n.businessName)||""),e}function ou(a,h){return W(this,arguments,function*(t,n,{maxTries:A=20,intervalMs:e=1500}={}){for(let i=0;i<A;i++){yield su(e);const o=yield gc(n,t),s=rc(o==null?void 0:o.status);if(s==="invoiced")return o;if(s==="expired"){const r=new Error("Invoice request expired while polling");throw r.code="EXPIRED",r.data=o,r}}const c=new Error("Polling timeout: status not invoiced");throw c.code="POLL_TIMEOUT",c})}function su(t){return new Promise(n=>setTimeout(n,t))}const ru=Object.freeze(Object.defineProperty({__proto__:null,createInvoiceRequestFlow:hu},Symbol.toStringTag,{value:"Module"}));en.checkContractStatus=Os,en.getSettings=zs,en.init=Ds,en.initEContract=Ks,en.initExportEInvoice=Vs,en.setConfig=ga,en.setCurrentMode=la,en.setWidgetLanguage=ch,Object.defineProperty(en,Symbol.toStringTag,{value:"Module"})});
|
|
524
|
+
`,a.appendChild(h),e.appendChild(a);const c=document.createElement("h2");c.className="wgt:text-base wgt:font-semibold wgt:text-[#0E121B] wgt:mb-2",c.textContent=q("invoiceExpired_title"),e.appendChild(c);const i=document.createElement("p");i.className="wgt:text-sm wgt:text-[#525866] wgt:leading-relaxed wgt:px-2 wgt:mb-3",i.textContent=q("invoiceExpired_description"),e.appendChild(i);const o=document.createElement("p");return o.className="wgt:text-sm wgt:text-[#99A0AE] wgt:italic wgt:leading-relaxed wgt:px-4",o.textContent=q("invoiceExpired_note"),e.appendChild(o),A.appendChild(e),{container:A}}function rc(t){return String(t||"").trim().toLowerCase()}function uc(t){return String(t||"").trim().toLowerCase()==="1invoice"}function gc(t,n){return W(this,null,function*(){return uc(t)?V1(n):z1(n)})}function au(t,n,A){return W(this,null,function*(){return uc(t)?R1(n,A):O1(n,A)})}function hu({uuid:t,orderInfo:n,theme:A}){const e=document.createElement("div");e.className="wgt:w-full wgt:min-h-screen wgt:flex wgt:flex-col wgt:bg-[#F3F4F6]";let a=!1;const h=document.createElement("div");h.className="wgt:w-full",e.appendChild(h);const c=nu({theme:A,year:2025});c.container.classList.add("wgt:mt-1"),e.appendChild(c.container);function i(x){a||(h.innerHTML="",x&&h.appendChild(x))}function o(x){x&&console.log("[DEBUG] renderFailedPage:",x);const Q=Ue({theme:A,onClose:g});i(Q.container)}function s(){const x=eu({theme:A});i(x.container)}function r(x){const Q=Au({theme:A});i(Q.container)}function u(x){const Q=tu({orderInfo:x||{},theme:A,onSubmit:v=>W(null,[v],function*({type:E,data:p}){const M=m();if(!M)return o({reason:"MISSING_UUID_ON_SUBMIT"}),{ok:!1};const f=iu(E,p);return yield au(A,M,f),{ok:!0,finalData:yield ou(M,A,{maxTries:20,intervalMs:1500})}}),onBack:g});i(Q.container)}function m(){var E;const x=new URLSearchParams(window.location.search||"");return String((E=x.get("uuid"))!=null?E:"").trim()||String(t||"").trim()||String((n==null?void 0:n.uuid)||"").trim()}function g(){return W(this,null,function*(){yield l()})}function l(){return W(this,null,function*(){try{const x=m();if(!x)return o({reason:"EMPTY_UUID_NO_API_CALL"});const Q=yield gc(A,x),E=String((Q==null?void 0:Q.message)||"").trim();if(E)return o({reason:"API_MESSAGE",apiMsg:E,res:Q});const p=rc(Q==null?void 0:Q.status);return p==="expired"?s():p==="invoiced"?r(Q):p==="pending"||p==="waiting"?u(Q||n||{}):p===""&&Q&&Object.keys(Q).length>0?u(Q):o({reason:"UNKNOWN_STATUS",status:p,res:Q})}catch(x){return console.log("[DEBUG] loadAndRender error:",x),o({reason:"EXCEPTION",error:(x==null?void 0:x.message)||x})}})}function d(){return W(this,null,function*(){o({reason:"INIT_DEFAULT_RENDER"});try{yield l()}catch(x){return o({reason:"INIT_EXCEPTION",error:(x==null?void 0:x.message)||x})}})}function T(){a=!0,e.innerHTML=""}return{container:e,init:d,destroy:T}}function cu(t){return String(t||"").trim().toLowerCase()==="business"?"enterprise":"individual"}function iu(t,n){const A=cu(t),e={invoiceType:A,buyerName:(n==null?void 0:n.representativeName)||"",address:(n==null?void 0:n.buyerAddress)||"",email:(n==null?void 0:n.email)||""};return A==="enterprise"&&(e.taxCode=n!=null&&n.noTaxCode?"":(n==null?void 0:n.taxCode)||"",e.businessName=(n==null?void 0:n.businessName)||""),e}function ou(a,h){return W(this,arguments,function*(t,n,{maxTries:A=20,intervalMs:e=1500}={}){for(let i=0;i<A;i++){yield su(e);const o=yield gc(n,t),s=rc(o==null?void 0:o.status);if(s==="invoiced"||s==="failed")return o;if(s==="expired"){const r=new Error("Invoice request expired while polling");throw r.code="EXPIRED",r.data=o,r}}const c=new Error("Polling timeout: status not invoiced");throw c.code="POLL_TIMEOUT",c})}function su(t){return new Promise(n=>setTimeout(n,t))}const ru=Object.freeze(Object.defineProperty({__proto__:null,createInvoiceRequestFlow:hu},Symbol.toStringTag,{value:"Module"}));en.checkContractStatus=Os,en.getSettings=zs,en.init=Ds,en.initEContract=Ks,en.initExportEInvoice=Vs,en.setConfig=ga,en.setCurrentMode=la,en.setWidgetLanguage=ch,Object.defineProperty(en,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -14,7 +14,7 @@ var n = (e, t, r) => new Promise((o, g) => {
|
|
|
14
14
|
}, c = (i) => i.done ? o(i.value) : Promise.resolve(i.value).then(s, p);
|
|
15
15
|
c((r = r.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import { k as l, g as w, l as f, C as m, G as E, n as R, o as y, I as C, p as I, S as v, q as T, a as h, r as O, u, w as S, O as _ } from "./index-
|
|
17
|
+
import { k as l, g as w, l as f, C as m, G as E, n as R, o as y, I as C, p as I, S as v, q as T, a as h, r as O, u, w as S, O as _ } from "./index-D8SOjo7a.js";
|
|
18
18
|
function $({
|
|
19
19
|
title: e,
|
|
20
20
|
isDisabled: t = !1,
|
|
@@ -95,7 +95,7 @@ function A(e, t) {
|
|
|
95
95
|
})).data;
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
const M = (e) => new Intl.NumberFormat("vi-VN").format(e), U = "1.124.
|
|
98
|
+
const M = (e) => new Intl.NumberFormat("vi-VN").format(e), U = "1.124.2";
|
|
99
99
|
function q(r) {
|
|
100
100
|
return n(this, arguments, function* ({ search: e, bank: t }) {
|
|
101
101
|
return (yield a.get(`${u}`, {
|
|
@@ -35,8 +35,8 @@ var on = (t, n, e) => new Promise((c, h) => {
|
|
|
35
35
|
}, o = (u) => u.done ? c(u.value) : Promise.resolve(u.value).then(a, A);
|
|
36
36
|
o((e = e.apply(t, n)).next());
|
|
37
37
|
});
|
|
38
|
-
import { t as g, g as _h, a as $h, b as wt, s as _t, c as Lt, d as Tc, e as xc, f as dc, m as wc, h as pc, i as Cc, v as fc } from "./index-
|
|
39
|
-
import { c as Ct, a as t0, g as $t, b as Xc, f as Vn, d as Bc, e as c0, h as Nc, i as Ec, j as Hc, k as yc, l as Pc, m as kc, n as vc } from "./loading-
|
|
38
|
+
import { t as g, g as _h, a as $h, b as wt, s as _t, c as Lt, d as Tc, e as xc, f as dc, m as wc, h as pc, i as Cc, v as fc } from "./index-D8SOjo7a.js";
|
|
39
|
+
import { c as Ct, a as t0, g as $t, b as Xc, f as Vn, d as Bc, e as c0, h as Nc, i as Ec, j as Hc, k as yc, l as Pc, m as kc, n as vc } from "./loading-riArY4Yy.js";
|
|
40
40
|
import { g as nc } from "./_commonjsHelpers-bAxELxBV.js";
|
|
41
41
|
function ih({ steps: t = [], currentStep: n = 1 } = {}) {
|
|
42
42
|
const e = document.createElement("div");
|