@invoice-sdk/widget 1.105.0 → 1.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BGKVAZVg.js → index-CnNsnfVf.js} +522 -518
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +19 -19
- package/dist/{widget-BRp1WLVR.js → widget-CbtN3rHO.js} +484 -472
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var nC = (g, A, E) => A in g ? hQ(g, A, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
for (var E of Xg(A))
|
|
10
10
|
hC.call(A, E) && nC(g, E, A[E]);
|
|
11
11
|
return g;
|
|
12
|
-
},
|
|
12
|
+
}, zA = (g, A) => cQ(g, eQ(A));
|
|
13
13
|
var pg = (g, A) => {
|
|
14
14
|
var E = {};
|
|
15
15
|
for (var C in g)
|
|
@@ -19,7 +19,7 @@ var pg = (g, A) => {
|
|
|
19
19
|
A.indexOf(C) < 0 && hC.call(g, C) && (E[C] = g[C]);
|
|
20
20
|
return E;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
22
|
+
var Z = (g, A, E) => new Promise((C, B) => {
|
|
23
23
|
var Q = (I) => {
|
|
24
24
|
try {
|
|
25
25
|
n(E.next(I));
|
|
@@ -35,7 +35,7 @@ var V = (g, A, E) => new Promise((C, B) => {
|
|
|
35
35
|
}, n = (I) => I.done ? C(I.value) : Promise.resolve(I.value).then(Q, t);
|
|
36
36
|
n((E = E.apply(g, A)).next());
|
|
37
37
|
});
|
|
38
|
-
import { t as c, g as vB, a as wQ, b as oQ, C as aQ, G as iQ, c as uQ, d as MB, e as Dg, f as sQ, h as DQ, i as jg, O as fQ, j as rQ, s as tg, k as Ng, l as mQ, m as PQ, n as qQ, o as vQ, p as MQ, q as lQ, v as TQ } from "./index-
|
|
38
|
+
import { t as c, g as vB, a as wQ, b as oQ, C as aQ, G as iQ, c as uQ, d as MB, e as Dg, f as sQ, h as DQ, i as jg, O as fQ, j as rQ, s as tg, k as Ng, l as mQ, m as PQ, n as qQ, o as vQ, p as MQ, q as lQ, v as TQ } from "./index-CnNsnfVf.js";
|
|
39
39
|
import { g as pC } from "./_commonjsHelpers-bAxELxBV.js";
|
|
40
40
|
function cC({ steps: g = [], currentStep: A = 1 } = {}) {
|
|
41
41
|
const E = document.createElement("div");
|
|
@@ -455,8 +455,8 @@ function Zg({
|
|
|
455
455
|
P.id ? X === P.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : k === P.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
|
|
456
456
|
].filter(Boolean).join(" "), v.innerText = P.label, v.dataset.value = P.value, v.addEventListener("click", () => {
|
|
457
457
|
if (P.id && (X = P.id), k = P.value, o.value = P.label, s.classList.add("wgt:hidden"), typeof t == "function") {
|
|
458
|
-
const
|
|
459
|
-
P.id && (
|
|
458
|
+
const Y = { target: { value: P.value } };
|
|
459
|
+
P.id && (Y.target.id = P.id), t(Y);
|
|
460
460
|
}
|
|
461
461
|
}), f.appendChild(v);
|
|
462
462
|
});
|
|
@@ -490,8 +490,8 @@ function Zg({
|
|
|
490
490
|
},
|
|
491
491
|
setValue(m, P, v) {
|
|
492
492
|
X = v || null, k = m || "";
|
|
493
|
-
const
|
|
494
|
-
|
|
493
|
+
const Y = E.find((x) => x.id ? x.id === v : x.value === m);
|
|
494
|
+
Y ? (o.value = Y.label, R.value = m, D()) : (o.value = P || "", R.value = m || "", D());
|
|
495
495
|
},
|
|
496
496
|
setOptions(m) {
|
|
497
497
|
for (E.splice(0, E.length, ...m), d = [...m]; R.options.length > 0; )
|
|
@@ -571,7 +571,7 @@ function cg({
|
|
|
571
571
|
"wgt:cursor-pointer",
|
|
572
572
|
"wgt:hover:text-primary-hover-text",
|
|
573
573
|
B
|
|
574
|
-
].filter(Boolean).join(" "), Q.innerText = g, typeof E == "function" && Q.addEventListener("click", (t) =>
|
|
574
|
+
].filter(Boolean).join(" "), Q.innerText = g, typeof E == "function" && Q.addEventListener("click", (t) => Z(null, null, function* () {
|
|
575
575
|
if (!Q.disabled) {
|
|
576
576
|
Q.disabled = !0;
|
|
577
577
|
try {
|
|
@@ -797,8 +797,8 @@ function wC({
|
|
|
797
797
|
P.className = "wgt:flex wgt:flex-col";
|
|
798
798
|
const v = document.createElement("p");
|
|
799
799
|
v.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", v.innerText = D.name;
|
|
800
|
-
const
|
|
801
|
-
|
|
800
|
+
const Y = document.createElement("p");
|
|
801
|
+
Y.className = "wgt:text-sm wgt:text-gray-500", Y.innerText = X(D.size), P.appendChild(v), P.appendChild(Y), m.appendChild(P), n.appendChild(m), typeof C == "function" && C(null, D);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
804
|
function r(D) {
|
|
@@ -921,12 +921,12 @@ const JQ = ({
|
|
|
921
921
|
P.className = "wgt:text-red-500 wgt:ml-1", P.innerText = "*", m.appendChild(P), T.appendChild(m);
|
|
922
922
|
const v = document.createElement("select");
|
|
923
923
|
v.className = `${a} wgt:@max-2xl:w-full wgt:w-16`, v.title = c("yearTooltip", "Năm phát hành (2 chữ số cuối)"), B.forEach((l) => v.append(new Option(l, l))), v.value = String(C).slice(-2), T.appendChild(v), u.append(T);
|
|
924
|
-
const
|
|
925
|
-
|
|
924
|
+
const Y = document.createElement("div");
|
|
925
|
+
Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
926
926
|
const x = document.createElement("span");
|
|
927
927
|
x.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", x.textContent = c("typeOfEInvoice");
|
|
928
|
-
const
|
|
929
|
-
|
|
928
|
+
const J = document.createElement("span");
|
|
929
|
+
J.className = "wgt:text-red-500 wgt:ml-1", J.innerText = "*", x.appendChild(J), Y.appendChild(x);
|
|
930
930
|
const q = document.createElement("select");
|
|
931
931
|
q.className = `${a} wgt:@max-2xl:w-full wgt:w-40`, q.title = c("invoiceTypeTooltip", "Loại hóa đơn");
|
|
932
932
|
const N = {
|
|
@@ -942,7 +942,7 @@ const JQ = ({
|
|
|
942
942
|
};
|
|
943
943
|
n.forEach((l) => {
|
|
944
944
|
q.append(new Option(N[l], l));
|
|
945
|
-
}),
|
|
945
|
+
}), Y.appendChild(q), u.append(Y);
|
|
946
946
|
const U = document.createElement("div");
|
|
947
947
|
U.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
|
|
948
948
|
const y = document.createElement("span");
|
|
@@ -972,12 +972,12 @@ const JQ = ({
|
|
|
972
972
|
typeof l != "string" || l.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(l) && (k.value = l[0], R.value = l[1], v.value = l.slice(2, 4), q.value = l[4], i.value = l.slice(5, 7), H());
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
|
-
},
|
|
975
|
+
}, NA = wQ.create({
|
|
976
976
|
headers: {
|
|
977
977
|
Accept: "application/json"
|
|
978
978
|
}
|
|
979
979
|
});
|
|
980
|
-
|
|
980
|
+
NA.interceptors.request.use(
|
|
981
981
|
function(g) {
|
|
982
982
|
return g.baseURL = vB().invoiceHubBaseUrl, g;
|
|
983
983
|
},
|
|
@@ -985,12 +985,12 @@ zA.interceptors.request.use(
|
|
|
985
985
|
return Promise.reject(g);
|
|
986
986
|
}
|
|
987
987
|
);
|
|
988
|
-
oQ(
|
|
988
|
+
oQ(NA, {});
|
|
989
989
|
function XQ(g) {
|
|
990
|
-
return
|
|
990
|
+
return Z(this, null, function* () {
|
|
991
991
|
if (!g)
|
|
992
992
|
throw new Error("Tax code is required to fetch tax information.");
|
|
993
|
-
return yield
|
|
993
|
+
return yield NA.get(uQ, {
|
|
994
994
|
params: {
|
|
995
995
|
tax: g
|
|
996
996
|
}
|
|
@@ -998,10 +998,10 @@ function XQ(g) {
|
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
1000
|
function ZC(g, A, E) {
|
|
1001
|
-
return
|
|
1001
|
+
return Z(this, null, function* () {
|
|
1002
1002
|
if (!A)
|
|
1003
1003
|
throw new Error("Tax code is required to check new customer.");
|
|
1004
|
-
return (yield
|
|
1004
|
+
return (yield NA.get(aQ, {
|
|
1005
1005
|
params: {
|
|
1006
1006
|
provider: g,
|
|
1007
1007
|
taxCode: A,
|
|
@@ -1011,8 +1011,8 @@ function ZC(g, A, E) {
|
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
function Lg(g, A) {
|
|
1014
|
-
return
|
|
1015
|
-
return (yield
|
|
1014
|
+
return Z(this, null, function* () {
|
|
1015
|
+
return (yield NA.get(iQ, {
|
|
1016
1016
|
params: {
|
|
1017
1017
|
provider: g,
|
|
1018
1018
|
taxCode: A
|
|
@@ -1184,18 +1184,18 @@ function GQ() {
|
|
|
1184
1184
|
else
|
|
1185
1185
|
return '<td class="is-empty"></td>';
|
|
1186
1186
|
return i.isDisabled && w.push("is-disabled"), i.isToday && w.push("is-today"), i.isSelected && (w.push("is-selected"), H = "true"), i.hasEvent && w.push("has-event"), i.isInRange && w.push("is-inrange"), i.isStartRange && w.push("is-startrange"), i.isEndRange && w.push("is-endrange"), '<td data-day="' + i.day + '" class="' + w.join(" ") + '" aria-selected="' + H + '"><button class="pika-button pika-day" type="button" data-pika-year="' + i.year + '" data-pika-month="' + i.month + '" data-pika-day="' + i.day + '">' + i.day + "</button></td>";
|
|
1187
|
-
},
|
|
1187
|
+
}, Y = function(i, w) {
|
|
1188
1188
|
i.setHours(0, 0, 0, 0);
|
|
1189
|
-
var H = i.getDate(), l = i.getDay(), F = w, b = F - 1, M = 7, j = function(
|
|
1190
|
-
return (
|
|
1189
|
+
var H = i.getDate(), l = i.getDay(), F = w, b = F - 1, M = 7, j = function(uA) {
|
|
1190
|
+
return (uA + M - 1) % M;
|
|
1191
1191
|
};
|
|
1192
1192
|
i.setDate(H + b - j(l));
|
|
1193
|
-
var G = new Date(i.getFullYear(), 0, F), K = 1440 * 60 * 1e3,
|
|
1193
|
+
var G = new Date(i.getFullYear(), 0, F), K = 1440 * 60 * 1e3, V = (i.getTime() - G.getTime()) / K, QA = 1 + Math.round((V - b + j(G.getDay())) / M);
|
|
1194
1194
|
return QA;
|
|
1195
1195
|
}, x = function(i, w, H, l) {
|
|
1196
|
-
var F = new Date(H, w, i), b = C ? E(F).isoWeek() :
|
|
1196
|
+
var F = new Date(H, w, i), b = C ? E(F).isoWeek() : Y(F, l);
|
|
1197
1197
|
return '<td class="pika-week">' + b + "</td>";
|
|
1198
|
-
},
|
|
1198
|
+
}, J = function(i, w, H, l) {
|
|
1199
1199
|
return '<tr class="pika-row' + (H ? " pick-whole-week" : "") + (l ? " is-selected" : "") + '">' + (w ? i.reverse() : i).join("") + "</tr>";
|
|
1200
1200
|
}, q = function(i) {
|
|
1201
1201
|
return "<tbody>" + i.join("") + "</tbody>";
|
|
@@ -1205,12 +1205,12 @@ function GQ() {
|
|
|
1205
1205
|
H.push('<th scope="col"><abbr title="' + P(i, w) + '">' + P(i, w, !0) + "</abbr></th>");
|
|
1206
1206
|
return "<thead><tr>" + (i.isRTL ? H.reverse() : H).join("") + "</tr></thead>";
|
|
1207
1207
|
}, U = function(i, w, H, l, F, b) {
|
|
1208
|
-
var M, j, G, K = i._o,
|
|
1208
|
+
var M, j, G, K = i._o, V = H === K.minYear, QA = H === K.maxYear, uA = '<div id="' + b + '" class="pika-title" role="heading" aria-live="assertive">', KA, XA, FA = !0, OA = !0;
|
|
1209
1209
|
for (G = [], M = 0; M < 12; M++)
|
|
1210
|
-
G.push('<option value="' + (H === F ? M - w : 12 + M - w) + '"' + (M === l ? ' selected="selected"' : "") + (
|
|
1210
|
+
G.push('<option value="' + (H === F ? M - w : 12 + M - w) + '"' + (M === l ? ' selected="selected"' : "") + (V && M < K.minMonth || QA && M > K.maxMonth ? ' disabled="disabled"' : "") + ">" + K.i18n.months[M] + "</option>");
|
|
1211
1211
|
for (KA = '<div class="pika-label">' + K.i18n.months[l] + '<select class="pika-select pika-select-month" tabindex="-1">' + G.join("") + "</select></div>", o(K.yearRange) ? (M = K.yearRange[0], j = K.yearRange[1] + 1) : (M = H - K.yearRange, j = 1 + H + K.yearRange), G = []; M < j && M <= K.maxYear; M++)
|
|
1212
1212
|
M >= K.minYear && G.push('<option value="' + M + '"' + (M === H ? ' selected="selected"' : "") + ">" + M + "</option>");
|
|
1213
|
-
return XA = '<div class="pika-label">' + H + K.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + G.join("") + "</select></div>", K.showMonthAfterYear ?
|
|
1213
|
+
return XA = '<div class="pika-label">' + H + K.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + G.join("") + "</select></div>", K.showMonthAfterYear ? uA += XA + KA : uA += KA + XA, V && (l === 0 || K.minMonth >= l) && (FA = !1), QA && (l === 11 || K.maxMonth <= l) && (OA = !1), w === 0 && (uA += '<button class="pika-prev' + (FA ? "" : " is-disabled") + '" type="button">' + K.i18n.previousMonth + "</button>"), w === i._o.numberOfMonths - 1 && (uA += '<button class="pika-next' + (OA ? "" : " is-disabled") + '" type="button">' + K.i18n.nextMonth + "</button>"), uA += "</div>";
|
|
1214
1214
|
}, y = function(i, w, H) {
|
|
1215
1215
|
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + H + '">' + N(i) + q(w) + "</table>";
|
|
1216
1216
|
}, p = function(i) {
|
|
@@ -1436,14 +1436,14 @@ function GQ() {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
},
|
|
1438
1438
|
adjustPosition: function() {
|
|
1439
|
-
var i, w, H, l, F, b, M, j, G, K,
|
|
1439
|
+
var i, w, H, l, F, b, M, j, G, K, V, QA;
|
|
1440
1440
|
if (!this._o.container) {
|
|
1441
|
-
if (this.el.style.position = "absolute", i = this._o.trigger, w = i, H = this.el.offsetWidth, l = this.el.offsetHeight, F = window.innerWidth || Q.documentElement.clientWidth, b = window.innerHeight || Q.documentElement.clientHeight, M = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop,
|
|
1441
|
+
if (this.el.style.position = "absolute", i = this._o.trigger, w = i, H = this.el.offsetWidth, l = this.el.offsetHeight, F = window.innerWidth || Q.documentElement.clientWidth, b = window.innerHeight || Q.documentElement.clientHeight, M = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, V = !0, QA = !0, typeof i.getBoundingClientRect == "function")
|
|
1442
1442
|
K = i.getBoundingClientRect(), j = K.left + window.pageXOffset, G = K.bottom + window.pageYOffset;
|
|
1443
1443
|
else
|
|
1444
1444
|
for (j = w.offsetLeft, G = w.offsetTop + w.offsetHeight; w = w.offsetParent; )
|
|
1445
1445
|
j += w.offsetLeft, G += w.offsetTop;
|
|
1446
|
-
(this._o.reposition && j + H > F || this._o.position.indexOf("right") > -1 && j - H + i.offsetWidth > 0) && (j = j - H + i.offsetWidth,
|
|
1446
|
+
(this._o.reposition && j + H > F || this._o.position.indexOf("right") > -1 && j - H + i.offsetWidth > 0) && (j = j - H + i.offsetWidth, V = !1), (this._o.reposition && G + l > b + M || this._o.position.indexOf("top") > -1 && G - l - i.offsetHeight > 0) && (G = G - l - i.offsetHeight, QA = !1), this.el.style.left = j + "px", this.el.style.top = G + "px", u(this.el, V ? "left-aligned" : "right-aligned"), u(this.el, QA ? "bottom-aligned" : "top-aligned"), a(this.el, V ? "right-aligned" : "left-aligned"), a(this.el, QA ? "top-aligned" : "bottom-aligned");
|
|
1447
1447
|
}
|
|
1448
1448
|
},
|
|
1449
1449
|
/**
|
|
@@ -1452,28 +1452,28 @@ function GQ() {
|
|
|
1452
1452
|
render: function(i, w, H) {
|
|
1453
1453
|
var l = this._o, F = /* @__PURE__ */ new Date(), b = X(i, w), M = new Date(i, w, 1).getDay(), j = [], G = [];
|
|
1454
1454
|
d(F), l.firstDay > 0 && (M -= l.firstDay, M < 0 && (M += 7));
|
|
1455
|
-
for (var K = w === 0 ? 11 : w - 1,
|
|
1455
|
+
for (var K = w === 0 ? 11 : w - 1, V = w === 11 ? 0 : w + 1, QA = w === 0 ? i - 1 : i, uA = w === 11 ? i + 1 : i, KA = X(QA, K), XA = b + M, FA = XA; FA > 7; )
|
|
1456
1456
|
FA -= 7;
|
|
1457
1457
|
XA += 7 - FA;
|
|
1458
1458
|
for (var OA = !1, DA = 0, Cg = 0; DA < XA; DA++) {
|
|
1459
|
-
var vA = new Date(i, w, 1 + (DA - M)), YA = s(this._d) ? r(vA, this._d) : !1, RA = r(vA, F), WA = l.events.indexOf(vA.toDateString()) !== -1,
|
|
1460
|
-
|
|
1459
|
+
var vA = new Date(i, w, 1 + (DA - M)), YA = s(this._d) ? r(vA, this._d) : !1, RA = r(vA, F), WA = l.events.indexOf(vA.toDateString()) !== -1, bA = DA < M || DA >= b + M, TA = 1 + (DA - M), jA = w, yA = i, _A = l.startRange && r(l.startRange, vA), wg = l.endRange && r(l.endRange, vA), Pg = l.startRange && l.endRange && l.startRange < vA && vA < l.endRange, og = l.minDate && vA < l.minDate || l.maxDate && vA > l.maxDate || l.disableWeekends && f(vA) || l.disableDayFn && l.disableDayFn(vA);
|
|
1460
|
+
bA && (DA < M ? (TA = KA + TA, jA = K, yA = QA) : (TA = TA - b, jA = V, yA = uA));
|
|
1461
1461
|
var UA = {
|
|
1462
1462
|
day: TA,
|
|
1463
|
-
month:
|
|
1464
|
-
year:
|
|
1463
|
+
month: jA,
|
|
1464
|
+
year: yA,
|
|
1465
1465
|
hasEvent: WA,
|
|
1466
1466
|
isSelected: YA,
|
|
1467
1467
|
isToday: RA,
|
|
1468
1468
|
isDisabled: og,
|
|
1469
|
-
isEmpty:
|
|
1469
|
+
isEmpty: bA,
|
|
1470
1470
|
isStartRange: _A,
|
|
1471
1471
|
isEndRange: wg,
|
|
1472
1472
|
isInRange: Pg,
|
|
1473
1473
|
showDaysInNextAndPreviousMonths: l.showDaysInNextAndPreviousMonths,
|
|
1474
1474
|
enableSelectionDaysInNextAndPreviousMonths: l.enableSelectionDaysInNextAndPreviousMonths
|
|
1475
1475
|
};
|
|
1476
|
-
l.pickWholeWeek && YA && (OA = !0), G.push(v(UA)), ++Cg === 7 && (l.showWeekNumber && G.unshift(x(DA - M, w, i, l.firstWeekOfYearMinDays)), j.push(
|
|
1476
|
+
l.pickWholeWeek && YA && (OA = !0), G.push(v(UA)), ++Cg === 7 && (l.showWeekNumber && G.unshift(x(DA - M, w, i, l.firstWeekOfYearMinDays)), j.push(J(G, l.isRTL, l.pickWholeWeek, OA)), G = [], Cg = 0, OA = !1);
|
|
1477
1477
|
}
|
|
1478
1478
|
return y(l, j, H);
|
|
1479
1479
|
},
|
|
@@ -1621,10 +1621,10 @@ function KQ() {
|
|
|
1621
1621
|
WC(), qA && qA.parentNode && qA.parentNode.removeChild(qA), fg && window.removeEventListener("resize", fg), qA = null, fg = null, eg = [];
|
|
1622
1622
|
}
|
|
1623
1623
|
const hg = {
|
|
1624
|
-
info: (g, A = {}) => Og(g,
|
|
1625
|
-
success: (g, A = {}) => Og(g,
|
|
1626
|
-
warning: (g, A = {}) => Og(g,
|
|
1627
|
-
error: (g, A = {}) => Og(g,
|
|
1624
|
+
info: (g, A = {}) => Og(g, zA(lA({}, A), { type: "info" })),
|
|
1625
|
+
success: (g, A = {}) => Og(g, zA(lA({}, A), { type: "success" })),
|
|
1626
|
+
warning: (g, A = {}) => Og(g, zA(lA({}, A), { type: "warning" })),
|
|
1627
|
+
error: (g, A = {}) => Og(g, zA(lA({}, A), { type: "error" })),
|
|
1628
1628
|
clear: WC,
|
|
1629
1629
|
destroy: KQ
|
|
1630
1630
|
};
|
|
@@ -1775,13 +1775,13 @@ function gE(g, A, E = 200) {
|
|
|
1775
1775
|
const o = BE();
|
|
1776
1776
|
t.setTransform(...o), t.drawImage(C, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
|
|
1777
1777
|
} else if (A.length === 4) {
|
|
1778
|
-
const [o, s, f, k] = A, X = f - o, d = k - s, r = X * 0.05, D = d * 0.05, R = Math.max(0, o - r), T = Math.max(0, s - D), m = Math.min(C.width, f + r), P = Math.min(C.height, k + D), v = m - R,
|
|
1778
|
+
const [o, s, f, k] = A, X = f - o, d = k - s, r = X * 0.05, D = d * 0.05, R = Math.max(0, o - r), T = Math.max(0, s - D), m = Math.min(C.width, f + r), P = Math.min(C.height, k + D), v = m - R, Y = P - T;
|
|
1779
1779
|
t.drawImage(
|
|
1780
1780
|
C,
|
|
1781
1781
|
R,
|
|
1782
1782
|
T,
|
|
1783
1783
|
v,
|
|
1784
|
-
|
|
1784
|
+
Y,
|
|
1785
1785
|
0,
|
|
1786
1786
|
0,
|
|
1787
1787
|
E,
|
|
@@ -1870,8 +1870,8 @@ function IE(g, A, E, C, B = 0.5) {
|
|
|
1870
1870
|
const d = EE();
|
|
1871
1871
|
let r = d.length > 0 ? d[0] : [], D = r.length >= 4 ? r.slice(0, 4) : f;
|
|
1872
1872
|
D = D.map((q) => [q[0] * o, q[1] * s]);
|
|
1873
|
-
const R = 0.1, T = Math.min(...D.map((q) => q[0])), m = Math.max(...D.map((q) => q[0])), P = Math.min(...D.map((q) => q[1])), v = Math.max(...D.map((q) => q[1])),
|
|
1874
|
-
q[0] + (q[0] < (T + m) / 2 ? -R *
|
|
1873
|
+
const R = 0.1, T = Math.min(...D.map((q) => q[0])), m = Math.max(...D.map((q) => q[0])), P = Math.min(...D.map((q) => q[1])), v = Math.max(...D.map((q) => q[1])), Y = m - T, x = v - P, J = D.map((q) => [
|
|
1874
|
+
q[0] + (q[0] < (T + m) / 2 ? -R * Y : R * Y),
|
|
1875
1875
|
q[1] + (q[1] < (P + v) / 2 ? -R * x : R * x)
|
|
1876
1876
|
]);
|
|
1877
1877
|
Q.push({
|
|
@@ -1884,7 +1884,7 @@ function IE(g, A, E, C, B = 0.5) {
|
|
|
1884
1884
|
wh: [f[2] - f[0], f[3] - f[1]],
|
|
1885
1885
|
polygon_xy: r.map((q) => [q[0] * o, q[1] * s]),
|
|
1886
1886
|
quad_xy: D,
|
|
1887
|
-
padded_quad_xy:
|
|
1887
|
+
padded_quad_xy: J,
|
|
1888
1888
|
image_shape: [C, E]
|
|
1889
1889
|
});
|
|
1890
1890
|
}
|
|
@@ -1973,7 +1973,7 @@ function cE(g, A = "sourceCanvas") {
|
|
|
1973
1973
|
});
|
|
1974
1974
|
}
|
|
1975
1975
|
function eE(o) {
|
|
1976
|
-
return
|
|
1976
|
+
return Z(this, arguments, function* ({
|
|
1977
1977
|
onSubmit: g,
|
|
1978
1978
|
registrationData: A,
|
|
1979
1979
|
theme: E = "ocb",
|
|
@@ -1989,7 +1989,7 @@ function eE(o) {
|
|
|
1989
1989
|
serial: u,
|
|
1990
1990
|
isRenewal: a = !1
|
|
1991
1991
|
}) {
|
|
1992
|
-
var
|
|
1992
|
+
var aA, iA, MA, rA, xA, pA, Mg, dB, xB, HB, kB, RB, YB, JB, XB, FB, OB, GB, LB, zB, NB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B, AC, gC, BC, CC, QC, EC, IC;
|
|
1993
1993
|
let s = null;
|
|
1994
1994
|
function f() {
|
|
1995
1995
|
if (s || A._userHasEditedTaxCode || I !== !1 || a)
|
|
@@ -2024,11 +2024,11 @@ function eE(o) {
|
|
|
2024
2024
|
d.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
|
|
2025
2025
|
const r = document.createElement("form");
|
|
2026
2026
|
r.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", r.addEventListener("submit", (L) => {
|
|
2027
|
-
if (L.preventDefault(), !
|
|
2027
|
+
if (L.preventDefault(), !eA()) return;
|
|
2028
2028
|
const O = hA();
|
|
2029
2029
|
typeof g == "function" && g(O);
|
|
2030
2030
|
}), d.appendChild(r);
|
|
2031
|
-
let D, R, T, m, P, v,
|
|
2031
|
+
let D, R, T, m, P, v, Y, x, J, q, N, U, y, p, i, w, H, l, F, b, M, j, G, K, V;
|
|
2032
2032
|
const QA = document.createElement("button");
|
|
2033
2033
|
D = kA({
|
|
2034
2034
|
name: "taxCode",
|
|
@@ -2036,7 +2036,7 @@ function eE(o) {
|
|
|
2036
2036
|
required: !0,
|
|
2037
2037
|
placeholder: "",
|
|
2038
2038
|
type: "text",
|
|
2039
|
-
value: ((
|
|
2039
|
+
value: ((iA = (aA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : aA.organization) == null ? void 0 : iA.taxCode) || "",
|
|
2040
2040
|
readOnly: !1,
|
|
2041
2041
|
note: c(
|
|
2042
2042
|
"taxNote",
|
|
@@ -2046,14 +2046,14 @@ function eE(o) {
|
|
|
2046
2046
|
onInput: (L) => {
|
|
2047
2047
|
const O = L.target.value.trim();
|
|
2048
2048
|
if (A._userHasEditedTaxCode = !0, k(), D.setError(null), O.length === 0) {
|
|
2049
|
-
|
|
2049
|
+
IA();
|
|
2050
2050
|
return;
|
|
2051
2051
|
}
|
|
2052
2052
|
if (O.length < 10) {
|
|
2053
|
-
D.setError(c("errorInvalidTaxCode", "Mã số thuế không hợp lệ")),
|
|
2053
|
+
D.setError(c("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), IA();
|
|
2054
2054
|
return;
|
|
2055
2055
|
}
|
|
2056
|
-
O.length >= 10 && OA(O),
|
|
2056
|
+
O.length >= 10 && OA(O), IA();
|
|
2057
2057
|
}
|
|
2058
2058
|
}), R = kA({
|
|
2059
2059
|
name: "companyName",
|
|
@@ -2076,7 +2076,7 @@ function eE(o) {
|
|
|
2076
2076
|
readOnly: !1,
|
|
2077
2077
|
horizontal: !0
|
|
2078
2078
|
});
|
|
2079
|
-
const
|
|
2079
|
+
const uA = NQ.map((L) => ({
|
|
2080
2080
|
value: L["cqt quản lý"],
|
|
2081
2081
|
label: L["tên cqt"],
|
|
2082
2082
|
id: L["ma xa"]
|
|
@@ -2085,16 +2085,16 @@ function eE(o) {
|
|
|
2085
2085
|
name: "companyTaxManagement",
|
|
2086
2086
|
label: c("taxAuthority"),
|
|
2087
2087
|
value: ((dB = (Mg = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : Mg.organization) == null ? void 0 : dB.taxAuthority) || "",
|
|
2088
|
-
options:
|
|
2088
|
+
options: uA,
|
|
2089
2089
|
required: !0,
|
|
2090
2090
|
error: null,
|
|
2091
2091
|
horizontal: !0,
|
|
2092
2092
|
searchable: !0,
|
|
2093
2093
|
onChange: (L) => {
|
|
2094
|
-
L.target.id && Q(L.target.id),
|
|
2094
|
+
L.target.id && Q(L.target.id), IA();
|
|
2095
2095
|
}
|
|
2096
2096
|
}), B) {
|
|
2097
|
-
const L =
|
|
2097
|
+
const L = uA.find(
|
|
2098
2098
|
(O) => O.id === B
|
|
2099
2099
|
);
|
|
2100
2100
|
L && m.setValue && m.setValue(
|
|
@@ -2108,10 +2108,10 @@ function eE(o) {
|
|
|
2108
2108
|
required: !1,
|
|
2109
2109
|
file: (A == null ? void 0 : A.logo) || null,
|
|
2110
2110
|
onFileChange: (L) => {
|
|
2111
|
-
|
|
2111
|
+
IA();
|
|
2112
2112
|
},
|
|
2113
2113
|
error: null
|
|
2114
|
-
}),
|
|
2114
|
+
}), J = kA({
|
|
2115
2115
|
name: "repName",
|
|
2116
2116
|
label: c("fullName"),
|
|
2117
2117
|
required: !0,
|
|
@@ -2122,10 +2122,10 @@ function eE(o) {
|
|
|
2122
2122
|
onInput: (L) => {
|
|
2123
2123
|
const O = L.target.value;
|
|
2124
2124
|
if (O.trim() === "") {
|
|
2125
|
-
|
|
2125
|
+
J.setError(c("errorRequired"));
|
|
2126
2126
|
return;
|
|
2127
2127
|
}
|
|
2128
|
-
Fg(O) ?
|
|
2128
|
+
Fg(O) ? J.setError(null) : J.setError(c("errorInvalidName"));
|
|
2129
2129
|
}
|
|
2130
2130
|
}), q = kA({
|
|
2131
2131
|
name: "repDob",
|
|
@@ -2145,10 +2145,10 @@ function eE(o) {
|
|
|
2145
2145
|
return `${gA}/${O}/${tA}`;
|
|
2146
2146
|
},
|
|
2147
2147
|
onSelect: (L) => {
|
|
2148
|
-
q.setError(null),
|
|
2148
|
+
q.setError(null), IA();
|
|
2149
2149
|
},
|
|
2150
2150
|
onClose: () => {
|
|
2151
|
-
q.inputEl.value ? q.setError(null) : q.setError(c("errorRequired")),
|
|
2151
|
+
q.inputEl.value ? q.setError(null) : q.setError(c("errorRequired")), IA();
|
|
2152
2152
|
},
|
|
2153
2153
|
maxDate: /* @__PURE__ */ new Date(),
|
|
2154
2154
|
showMonthDropdown: !0,
|
|
@@ -2251,7 +2251,7 @@ function eE(o) {
|
|
|
2251
2251
|
required: !0,
|
|
2252
2252
|
file: (A == null ? void 0 : A.license) || null,
|
|
2253
2253
|
onFileChange: (L) => {
|
|
2254
|
-
|
|
2254
|
+
IA();
|
|
2255
2255
|
},
|
|
2256
2256
|
error: null,
|
|
2257
2257
|
accept: "image/png, image/jpeg, image/jpg, .pdf"
|
|
@@ -2304,7 +2304,7 @@ function eE(o) {
|
|
|
2304
2304
|
c("errorInvalidEmail", "Email không hợp lệ")
|
|
2305
2305
|
);
|
|
2306
2306
|
}
|
|
2307
|
-
}),
|
|
2307
|
+
}), Y = kA({
|
|
2308
2308
|
name: "phone",
|
|
2309
2309
|
label: c("phone"),
|
|
2310
2310
|
required: !0,
|
|
@@ -2316,12 +2316,12 @@ function eE(o) {
|
|
|
2316
2316
|
let O = L.target.value;
|
|
2317
2317
|
const gA = O.replace(/[^\d+().\-\s]/g, ""), tA = gA.replace(/[\s.\-()]/g, "");
|
|
2318
2318
|
if (gA !== O && (L.target.value = gA, O = gA), tA.trim() === "") {
|
|
2319
|
-
|
|
2319
|
+
Y.setError(
|
|
2320
2320
|
c("errorRequired", "Số điện thoại bắt buộc")
|
|
2321
2321
|
);
|
|
2322
2322
|
return;
|
|
2323
2323
|
}
|
|
2324
|
-
/^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(tA) ?
|
|
2324
|
+
/^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(tA) ? Y.setError(null) : Y.setError(
|
|
2325
2325
|
c("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
|
|
2326
2326
|
);
|
|
2327
2327
|
}
|
|
@@ -2363,10 +2363,10 @@ function eE(o) {
|
|
|
2363
2363
|
isRenewal: a,
|
|
2364
2364
|
initialValue: u || ((AC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : AC.invoiceSymbol) || "1C25TYY",
|
|
2365
2365
|
onChange: (L) => {
|
|
2366
|
-
XA.inputEl.value = L,
|
|
2366
|
+
XA.inputEl.value = L, IA();
|
|
2367
2367
|
}
|
|
2368
2368
|
}), l = document.createElement("input"), l.type = "checkbox", l.name = "hasUsedEInvoiceCB", l.className = "wgt:cursor-pointer", l.checked = (gC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : gC.hasUsedEInvoice, l.addEventListener("change", (L) => {
|
|
2369
|
-
L.target.checked ? (
|
|
2369
|
+
L.target.checked ? (W.appendChild(cA), W.appendChild(sA)) : (F.checked = !1, M.inputEl.value = "", M.setError(null), b && (b.inputEl.value = "", b.setError(null), sA.contains(b.container) && sA.removeChild(b.container)), W.removeChild(cA), W.removeChild(sA));
|
|
2370
2370
|
}), F = document.createElement("input"), F.type = "checkbox", F.name = "hasUsedEInvoiceBeforeCB", F.className = "wgt:cursor-pointer", F.checked = (BC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : BC.isUsedEInvoiceBefore, F.addEventListener("change", (L) => {
|
|
2371
2371
|
L.target.checked ? sA.appendChild(b.container) : (b.inputEl.value = "", b.setError(null), sA.contains(b.container) && sA.removeChild(b.container));
|
|
2372
2372
|
}), b = kA({
|
|
@@ -2420,7 +2420,7 @@ function eE(o) {
|
|
|
2420
2420
|
});
|
|
2421
2421
|
let FA = 0;
|
|
2422
2422
|
function OA(L) {
|
|
2423
|
-
return
|
|
2423
|
+
return Z(this, null, function* () {
|
|
2424
2424
|
const O = ++FA;
|
|
2425
2425
|
D.setError(null);
|
|
2426
2426
|
try {
|
|
@@ -2436,9 +2436,9 @@ function eE(o) {
|
|
|
2436
2436
|
if (gA.error)
|
|
2437
2437
|
return R.inputEl.value = "", T.inputEl.value = "", m.setValue && m.setValue("", "", ""), m.setDisabled(!1), D.setError(c("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), tA;
|
|
2438
2438
|
if (D.setError(null), R.inputEl.value = gA.ten_cty || "", T.inputEl.value = gA.dia_chi || "", gA.cqthue_ql) {
|
|
2439
|
-
const mA = (
|
|
2440
|
-
const ug = mA(
|
|
2441
|
-
return ug.includes(
|
|
2439
|
+
const mA = (LA) => LA.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), wA = mA(gA.cqthue_ql), PA = uA.find((LA) => {
|
|
2440
|
+
const ug = mA(LA.label);
|
|
2441
|
+
return ug.includes(wA) || wA.includes(ug);
|
|
2442
2442
|
});
|
|
2443
2443
|
PA && (m.setValue && m.setValue(
|
|
2444
2444
|
PA.value,
|
|
@@ -2460,7 +2460,7 @@ function eE(o) {
|
|
|
2460
2460
|
c("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
|
|
2461
2461
|
));
|
|
2462
2462
|
} finally {
|
|
2463
|
-
O === FA &&
|
|
2463
|
+
O === FA && IA();
|
|
2464
2464
|
}
|
|
2465
2465
|
});
|
|
2466
2466
|
}
|
|
@@ -2479,72 +2479,72 @@ function eE(o) {
|
|
|
2479
2479
|
"legalRepInfo",
|
|
2480
2480
|
"2. Thông tin người đại diện pháp luật:"
|
|
2481
2481
|
), RA.appendChild(WA);
|
|
2482
|
-
const
|
|
2483
|
-
|
|
2484
|
-
let TA = !1,
|
|
2485
|
-
const
|
|
2482
|
+
const bA = document.createElement("div");
|
|
2483
|
+
bA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:space-y-2";
|
|
2484
|
+
let TA = !1, jA = !1;
|
|
2485
|
+
const yA = document.createElement("div");
|
|
2486
2486
|
function _A() {
|
|
2487
|
-
|
|
2487
|
+
yA.className = "wgt:text-yellow-500 wgt:text-sm wgt:font-medium wgt:text-center", TA ? yA.innerText = c(
|
|
2488
2488
|
"warningIdCard",
|
|
2489
2489
|
"Vui lòng tải lên ảnh CMND/CCCD hợp lệ"
|
|
2490
|
-
) :
|
|
2490
|
+
) : jA ? yA.innerText = c(
|
|
2491
2491
|
"warningIdCardSuccess",
|
|
2492
2492
|
"Vui lòng kiểm tra thông tin trước khi chuyển sang bước tiếp theo"
|
|
2493
|
-
) :
|
|
2493
|
+
) : yA.innerText = "", og.appendChild(yA);
|
|
2494
2494
|
}
|
|
2495
2495
|
function wg(L) {
|
|
2496
2496
|
return new Promise((O) => {
|
|
2497
|
-
TA = !1,
|
|
2497
|
+
TA = !1, jA = !1, _A();
|
|
2498
2498
|
const gA = () => {
|
|
2499
|
-
y.inputEl.value = "",
|
|
2500
|
-
}, tA = (
|
|
2501
|
-
if (!
|
|
2502
|
-
if (/^\d{8}$/.test(
|
|
2503
|
-
const sg =
|
|
2499
|
+
y.inputEl.value = "", J.inputEl.value = "", q.inputEl.value = "", w.inputEl.value = "", N.selectEl.value = "", i.selectEl.value = "", y.setError(null), J.setError(null), q.setError(null), w.setError(null), N.setError(null), i.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
|
|
2500
|
+
}, tA = (wA) => {
|
|
2501
|
+
if (!wA) return "";
|
|
2502
|
+
if (/^\d{8}$/.test(wA)) {
|
|
2503
|
+
const sg = wA.slice(0, 2), Sg = wA.slice(2, 4), tQ = wA.slice(4, 8);
|
|
2504
2504
|
return `${sg}/${Sg}/${tQ}`;
|
|
2505
2505
|
}
|
|
2506
|
-
const [PA,
|
|
2506
|
+
const [PA, LA, ug] = wA.split("/"), lg = new Date(+ug, +LA - 1, +PA);
|
|
2507
2507
|
if (isNaN(lg)) return "";
|
|
2508
2508
|
const Ug = String(lg.getDate()).padStart(2, "0"), Hg = String(lg.getMonth() + 1).padStart(2, "0"), Jg = lg.getFullYear();
|
|
2509
2509
|
return `${Ug}/${Hg}/${Jg}`;
|
|
2510
2510
|
}, mA = new Image();
|
|
2511
|
-
mA.src = URL.createObjectURL(L), mA.onload = () =>
|
|
2511
|
+
mA.src = URL.createObjectURL(L), mA.onload = () => Z(null, null, function* () {
|
|
2512
2512
|
try {
|
|
2513
|
-
const
|
|
2514
|
-
if (
|
|
2515
|
-
TA = !1,
|
|
2516
|
-
const
|
|
2517
|
-
gA(),
|
|
2513
|
+
const wA = yield cE(mA).then((PA) => JSON.parse(PA).status !== "success" ? (TA = !0, jA = !1, gA(), _A(), null) : JSON.parse(PA).data);
|
|
2514
|
+
if (wA || O({ success: !1, reason: "No data detected" }), wA) {
|
|
2515
|
+
TA = !1, jA = !0, _A();
|
|
2516
|
+
const LA = Object.values(wA).every((sg) => !sg);
|
|
2517
|
+
gA(), LA && ($A(
|
|
2518
2518
|
c("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
2519
2519
|
), gA(), O({ success: !1, reason: "Invalid card data" }));
|
|
2520
|
-
const { address: ug, date_of_birth: lg, full_name: Ug, id_number: Hg, sex: Jg } =
|
|
2520
|
+
const { address: ug, date_of_birth: lg, full_name: Ug, id_number: Hg, sex: Jg } = wA;
|
|
2521
2521
|
if (!Hg || !/^\d{12}$/.test(Hg) ? ($A(
|
|
2522
2522
|
c("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
2523
|
-
), y.inputEl.value = "") : (y.inputEl.value = Hg, y.setError(null)),
|
|
2523
|
+
), y.inputEl.value = "") : (y.inputEl.value = Hg, y.setError(null)), J.inputEl.value = Ug || "", q.inputEl.value = tA(lg), w.inputEl.value = ug || "", Jg) {
|
|
2524
2524
|
const sg = oC.find(
|
|
2525
2525
|
(Sg) => Sg.label.toLowerCase() === Jg.toLowerCase()
|
|
2526
2526
|
);
|
|
2527
2527
|
N.selectEl.value = (sg == null ? void 0 : sg.value) || "";
|
|
2528
2528
|
}
|
|
2529
2529
|
}
|
|
2530
|
-
O({ success: !0, data:
|
|
2531
|
-
} catch (
|
|
2532
|
-
console.error("readIdentityCard failed",
|
|
2530
|
+
O({ success: !0, data: wA });
|
|
2531
|
+
} catch (wA) {
|
|
2532
|
+
console.error("readIdentityCard failed", wA);
|
|
2533
2533
|
} finally {
|
|
2534
|
-
|
|
2534
|
+
IA();
|
|
2535
2535
|
}
|
|
2536
2536
|
});
|
|
2537
2537
|
});
|
|
2538
2538
|
}
|
|
2539
2539
|
function Pg(L, O, gA) {
|
|
2540
2540
|
const tA = new Image();
|
|
2541
|
-
tA.src = URL.createObjectURL(L), tA.onload = () =>
|
|
2541
|
+
tA.src = URL.createObjectURL(L), tA.onload = () => Z(null, null, function* () {
|
|
2542
2542
|
yield QE(tA).then((mA) => {
|
|
2543
|
-
var PA,
|
|
2544
|
-
const
|
|
2545
|
-
O && !((PA =
|
|
2543
|
+
var PA, LA;
|
|
2544
|
+
const wA = JSON.parse(mA);
|
|
2545
|
+
O && !((PA = wA == null ? void 0 : wA.data) != null && PA.isFront) ? $A(
|
|
2546
2546
|
c("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
2547
|
-
) : gA && !((
|
|
2547
|
+
) : gA && !((LA = wA == null ? void 0 : wA.data) != null && LA.isBack) && Kg(
|
|
2548
2548
|
c("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
2549
2549
|
);
|
|
2550
2550
|
});
|
|
@@ -2561,39 +2561,39 @@ function eE(o) {
|
|
|
2561
2561
|
} = YQ({
|
|
2562
2562
|
frontFile: A == null ? void 0 : A.idCard,
|
|
2563
2563
|
backFile: A == null ? void 0 : A.idCardBack,
|
|
2564
|
-
onFrontChange: (L) =>
|
|
2564
|
+
onFrontChange: (L) => Z(null, null, function* () {
|
|
2565
2565
|
var gA, tA;
|
|
2566
2566
|
if (K = L, Pg(L, !0, !1), UA() || qg() || !vg()) {
|
|
2567
|
-
TA = !1,
|
|
2567
|
+
TA = !1, jA = !1, _A(), IA();
|
|
2568
2568
|
return;
|
|
2569
2569
|
}
|
|
2570
2570
|
if ((tA = (gA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : gA.legalRepresentative) == null ? void 0 : tA.idCard) {
|
|
2571
|
-
|
|
2571
|
+
IA();
|
|
2572
2572
|
return;
|
|
2573
2573
|
}
|
|
2574
2574
|
wg(L);
|
|
2575
2575
|
}),
|
|
2576
|
-
onBackChange: (L) =>
|
|
2576
|
+
onBackChange: (L) => Z(null, null, function* () {
|
|
2577
2577
|
var tA, mA;
|
|
2578
|
-
if (
|
|
2579
|
-
TA = !1,
|
|
2578
|
+
if (V = L, Pg(L, !1, !0), UA() || qg() || !ag()) {
|
|
2579
|
+
TA = !1, jA = !1, _A(), IA();
|
|
2580
2580
|
return;
|
|
2581
2581
|
}
|
|
2582
2582
|
if ((mA = (tA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : tA.legalRepresentative) == null ? void 0 : mA.idCardBack) {
|
|
2583
|
-
|
|
2583
|
+
IA();
|
|
2584
2584
|
return;
|
|
2585
2585
|
}
|
|
2586
2586
|
(yield wg(ag())).success || wg(L);
|
|
2587
2587
|
}),
|
|
2588
2588
|
theme: E
|
|
2589
2589
|
});
|
|
2590
|
-
|
|
2590
|
+
bA.appendChild(og);
|
|
2591
2591
|
const JA = document.createElement("div");
|
|
2592
|
-
JA.className = "wgt:space-y-4", JA.appendChild(
|
|
2592
|
+
JA.className = "wgt:space-y-4", JA.appendChild(J.container);
|
|
2593
2593
|
const Qg = document.createElement("div");
|
|
2594
|
-
Qg.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", JA.appendChild(Qg), Qg.appendChild(q.container), Qg.appendChild(N.container),
|
|
2594
|
+
Qg.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", JA.appendChild(Qg), Qg.appendChild(q.container), Qg.appendChild(N.container), bA.appendChild(JA);
|
|
2595
2595
|
const Ag = document.createElement("div");
|
|
2596
|
-
Ag.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", Ag.appendChild(y.container), Ag.appendChild(p.container), Ag.appendChild(U.container), Ag.appendChild(i.container), RA.appendChild(
|
|
2596
|
+
Ag.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", Ag.appendChild(y.container), Ag.appendChild(p.container), Ag.appendChild(U.container), Ag.appendChild(i.container), RA.appendChild(bA), RA.appendChild(Ag), RA.appendChild(w.container), RA.appendChild(G.container);
|
|
2597
2597
|
const SA = document.createElement("ul");
|
|
2598
2598
|
SA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
2599
2599
|
const dA = document.createElement("li");
|
|
@@ -2606,35 +2606,35 @@ function eE(o) {
|
|
|
2606
2606
|
const EA = document.createElement("h3");
|
|
2607
2607
|
EA.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", EA.innerText = c("contactInfo", "3. Thông tin người liên hệ:"), S.appendChild(EA);
|
|
2608
2608
|
const _ = document.createElement("div");
|
|
2609
|
-
_.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:items-start", _.appendChild(P.container), _.appendChild(v.container), _.appendChild(
|
|
2609
|
+
_.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:items-start", _.appendChild(P.container), _.appendChild(v.container), _.appendChild(Y.container), _.appendChild(x.container), S.appendChild(_), r.appendChild(S);
|
|
2610
2610
|
const $ = document.createElement("div");
|
|
2611
2611
|
$.className = "wgt:space-y-4";
|
|
2612
|
-
const
|
|
2613
|
-
|
|
2612
|
+
const nA = document.createElement("h3");
|
|
2613
|
+
nA.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", nA.innerText = c("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), $.appendChild(nA), r.appendChild($);
|
|
2614
2614
|
const BA = document.createElement("div");
|
|
2615
2615
|
BA.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:@max-4xl:flex-col", BA.appendChild(H.container), BA.appendChild(XA.container), $.appendChild(BA);
|
|
2616
|
-
const
|
|
2617
|
-
|
|
2616
|
+
const W = document.createElement("div");
|
|
2617
|
+
W.className = "wgt:flex wgt:flex-col wgt:space-y-4 wgt:border wgt:border-soft-200 wgt:px-6 wgt:py-4 wgt:rounded-xl", a || r.appendChild(W);
|
|
2618
2618
|
const AA = document.createElement("div");
|
|
2619
2619
|
AA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", AA.appendChild(l);
|
|
2620
2620
|
const fA = document.createElement("h4");
|
|
2621
2621
|
fA.className = "wgt:font-semibold wgt:italic", fA.innerText = c(
|
|
2622
2622
|
"hasUsedEInvoice",
|
|
2623
2623
|
"Bạn đã sử dụng hoá đơn điện tử?"
|
|
2624
|
-
), AA.appendChild(fA), a ||
|
|
2625
|
-
const
|
|
2626
|
-
if (
|
|
2627
|
-
|
|
2624
|
+
), AA.appendChild(fA), a || W.appendChild(AA), l.checked = a, l.disabled = a;
|
|
2625
|
+
const cA = document.createElement("div");
|
|
2626
|
+
if (cA.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", !a) {
|
|
2627
|
+
cA.appendChild(F);
|
|
2628
2628
|
const L = document.createElement("h4");
|
|
2629
2629
|
L.className = "wgt:font-semibold wgt:italic", L.innerText = c(
|
|
2630
2630
|
"hasUsedEInvoiceBefore",
|
|
2631
2631
|
"Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?"
|
|
2632
|
-
),
|
|
2632
|
+
), cA.appendChild(L);
|
|
2633
2633
|
}
|
|
2634
2634
|
const sA = document.createElement("div");
|
|
2635
2635
|
sA.className = "wgt:w-full wgt:flex wgt:flex-row-reverse wgt:space-x-4 wgt:gap-4 wgt:items-start wgt:justify-start wgt:@max-2xl:flex-col wgt:@max-2xl:flex-col-reverse", sA.appendChild(M.container);
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2636
|
+
const GA = document.createElement("div");
|
|
2637
|
+
GA.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:mt-4";
|
|
2638
2638
|
let ig = !0;
|
|
2639
2639
|
const gg = document.createElement("div");
|
|
2640
2640
|
gg.className = [
|
|
@@ -2670,8 +2670,8 @@ function eE(o) {
|
|
|
2670
2670
|
}, z = kQ(E);
|
|
2671
2671
|
Ig.appendChild(
|
|
2672
2672
|
Yg(c("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
|
|
2673
|
-
), Ig.appendChild(document.createTextNode(` ${c("of", "của")} ${z}.`)),
|
|
2674
|
-
ig = !ig, ig ? (gg.classList.add("wgt:bg-primary"), Bg.classList.remove("wgt:hidden")) : (gg.classList.remove("wgt:bg-primary"), Bg.classList.add("wgt:hidden")),
|
|
2673
|
+
), Ig.appendChild(document.createTextNode(` ${c("of", "của")} ${z}.`)), GA.appendChild(gg), GA.appendChild(Ig), r.appendChild(GA), gg.addEventListener("click", () => {
|
|
2674
|
+
ig = !ig, ig ? (gg.classList.add("wgt:bg-primary"), Bg.classList.remove("wgt:hidden")) : (gg.classList.remove("wgt:bg-primary"), Bg.classList.add("wgt:hidden")), IA();
|
|
2675
2675
|
});
|
|
2676
2676
|
const CA = document.createElement("div");
|
|
2677
2677
|
CA.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", QA.type = "submit", QA.innerText = c("next"), QA.className = [
|
|
@@ -2686,7 +2686,7 @@ function eE(o) {
|
|
|
2686
2686
|
"wgt:cursor-pointer",
|
|
2687
2687
|
"wgt:hover:text-primary-hover-text"
|
|
2688
2688
|
].join(" "), CA.appendChild(QA), d.appendChild(CA);
|
|
2689
|
-
function
|
|
2689
|
+
function eA() {
|
|
2690
2690
|
const L = hA(), O = L.eInvoiceRegistration;
|
|
2691
2691
|
if (!O.contactPerson.address || !O.organization.name || !O.organization.address || !O.organization.taxCode || !O.organization.taxAuthority || !O.contactPerson.name || !O.contactPerson.email || !O.contactPerson.phone || !O.legalRepresentative.name || !O.legalRepresentative.dob || !O.legalRepresentative.gender || !O.legalRepresentative.phone || !O.legalRepresentative.idCard || !O.legalRepresentative.permanentAddress || !O.invoiceSymbol || !a && O.hasUsedEInvoice && !O.taxAuthorityCode || O.isUsedEInvoiceBefore && !O.previousEInvoiceProvider || !Fg(O.contactPerson.name) || !Fg(O.legalRepresentative.name) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(O.contactPerson.address) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(
|
|
2692
2692
|
O.legalRepresentative.permanentAddress
|
|
@@ -2698,12 +2698,12 @@ function eE(o) {
|
|
|
2698
2698
|
).replace(
|
|
2699
2699
|
/[\s.\-()]/g,
|
|
2700
2700
|
""
|
|
2701
|
-
), PA = O.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""),
|
|
2702
|
-
return !(!
|
|
2701
|
+
), PA = O.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), LA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
|
|
2702
|
+
return !(!LA.test(mA) || !LA.test(PA) || !/^\d{12}$/.test(O.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(O.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(O.invoiceSymbol) || !L.license || !L.idCard || !L.idCardBack);
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2704
|
+
function IA() {
|
|
2705
2705
|
const L = E === "bvb" && !a && !A._userHasEditedTaxCode;
|
|
2706
|
-
QA.disabled = !
|
|
2706
|
+
QA.disabled = !eA() || !ig || UA() || qg() || j.getError() || G.getError() || L;
|
|
2707
2707
|
}
|
|
2708
2708
|
function hA() {
|
|
2709
2709
|
var L, O;
|
|
@@ -2721,10 +2721,10 @@ function eE(o) {
|
|
|
2721
2721
|
name: P == null ? void 0 : P.getValue(),
|
|
2722
2722
|
address: x == null ? void 0 : x.getValue(),
|
|
2723
2723
|
email: v == null ? void 0 : v.getValue(),
|
|
2724
|
-
phone:
|
|
2724
|
+
phone: Y == null ? void 0 : Y.getValue()
|
|
2725
2725
|
},
|
|
2726
2726
|
legalRepresentative: {
|
|
2727
|
-
name:
|
|
2727
|
+
name: J == null ? void 0 : J.getValue(),
|
|
2728
2728
|
dob: q == null ? void 0 : q.getValue(),
|
|
2729
2729
|
gender: N == null ? void 0 : N.getValue(),
|
|
2730
2730
|
phone: U == null ? void 0 : U.getValue(),
|
|
@@ -2740,7 +2740,7 @@ function eE(o) {
|
|
|
2740
2740
|
license: G == null ? void 0 : G.getValues(),
|
|
2741
2741
|
logo: j == null ? void 0 : j.getValues(),
|
|
2742
2742
|
idCard: K,
|
|
2743
|
-
idCardBack:
|
|
2743
|
+
idCardBack: V
|
|
2744
2744
|
};
|
|
2745
2745
|
}
|
|
2746
2746
|
[
|
|
@@ -2749,9 +2749,9 @@ function eE(o) {
|
|
|
2749
2749
|
T,
|
|
2750
2750
|
P,
|
|
2751
2751
|
v,
|
|
2752
|
-
J,
|
|
2753
|
-
x,
|
|
2754
2752
|
Y,
|
|
2753
|
+
x,
|
|
2754
|
+
J,
|
|
2755
2755
|
q,
|
|
2756
2756
|
U,
|
|
2757
2757
|
y,
|
|
@@ -2759,13 +2759,13 @@ function eE(o) {
|
|
|
2759
2759
|
M,
|
|
2760
2760
|
b
|
|
2761
2761
|
].forEach((L) => {
|
|
2762
|
-
L.inputEl.addEventListener("input",
|
|
2762
|
+
L.inputEl.addEventListener("input", IA);
|
|
2763
2763
|
}), [N, m].forEach((L) => {
|
|
2764
|
-
L.selectEl.addEventListener("change",
|
|
2764
|
+
L.selectEl.addEventListener("change", IA);
|
|
2765
2765
|
}), [l, F].forEach((L) => {
|
|
2766
|
-
L.addEventListener("change",
|
|
2767
|
-
}), QA.addEventListener("click", (L) =>
|
|
2768
|
-
if (L.preventDefault(), !
|
|
2766
|
+
L.addEventListener("change", IA);
|
|
2767
|
+
}), QA.addEventListener("click", (L) => Z(null, null, function* () {
|
|
2768
|
+
if (L.preventDefault(), !eA()) return;
|
|
2769
2769
|
const O = D.getValue().trim();
|
|
2770
2770
|
if (O.length < 10) {
|
|
2771
2771
|
hg.error(c("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
|
|
@@ -2808,15 +2808,15 @@ function eE(o) {
|
|
|
2808
2808
|
}
|
|
2809
2809
|
tA || gA === !1 || gA === !0 && g(hA());
|
|
2810
2810
|
}));
|
|
2811
|
-
const
|
|
2812
|
-
return
|
|
2811
|
+
const oA = (((IC = (EC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : EC.organization) == null ? void 0 : IC.taxCode) || "").trim();
|
|
2812
|
+
return oA.length >= 10 && OA(oA), $C(MB(), vB().invoiceHubBaseUrl), A != null && A.idCard && (K = A == null ? void 0 : A.idCard), IA(), {
|
|
2813
2813
|
container: d,
|
|
2814
2814
|
getValues: hA
|
|
2815
2815
|
};
|
|
2816
2816
|
});
|
|
2817
2817
|
}
|
|
2818
2818
|
function wE(B) {
|
|
2819
|
-
return
|
|
2819
|
+
return Z(this, arguments, function* ({
|
|
2820
2820
|
providerProps: g,
|
|
2821
2821
|
formProps: A,
|
|
2822
2822
|
isRenewal: E,
|
|
@@ -2993,10 +2993,10 @@ function iC({
|
|
|
2993
2993
|
}
|
|
2994
2994
|
};
|
|
2995
2995
|
}
|
|
2996
|
-
const iE = "1.105.
|
|
2996
|
+
const iE = "1.105.1";
|
|
2997
2997
|
function uE(E) {
|
|
2998
|
-
return
|
|
2999
|
-
return (yield
|
|
2998
|
+
return Z(this, arguments, function* ({ search: g, bank: A }) {
|
|
2999
|
+
return (yield NA.get(`${jg}`, {
|
|
3000
3000
|
params: {
|
|
3001
3001
|
isActive: !0,
|
|
3002
3002
|
search: g || null,
|
|
@@ -3007,8 +3007,8 @@ function uE(E) {
|
|
|
3007
3007
|
});
|
|
3008
3008
|
}
|
|
3009
3009
|
function sE(A) {
|
|
3010
|
-
return
|
|
3011
|
-
return (yield
|
|
3010
|
+
return Z(this, arguments, function* ({ bank: g }) {
|
|
3011
|
+
return (yield NA.get(`${jg}`, {
|
|
3012
3012
|
params: {
|
|
3013
3013
|
isActive: !0,
|
|
3014
3014
|
type: "initial_fee",
|
|
@@ -3018,8 +3018,8 @@ function sE(A) {
|
|
|
3018
3018
|
});
|
|
3019
3019
|
}
|
|
3020
3020
|
function DE(E) {
|
|
3021
|
-
return
|
|
3022
|
-
return (yield
|
|
3021
|
+
return Z(this, arguments, function* ({ bank: g, hasRenew: A }) {
|
|
3022
|
+
return (yield NA.get(`${jg}`, {
|
|
3023
3023
|
params: {
|
|
3024
3024
|
isActive: !0,
|
|
3025
3025
|
type: "service",
|
|
@@ -3031,8 +3031,8 @@ function DE(E) {
|
|
|
3031
3031
|
});
|
|
3032
3032
|
}
|
|
3033
3033
|
function fE(A) {
|
|
3034
|
-
return
|
|
3035
|
-
return (yield
|
|
3034
|
+
return Z(this, arguments, function* ({ bank: g }) {
|
|
3035
|
+
return (yield NA.get(`${jg}`, {
|
|
3036
3036
|
params: {
|
|
3037
3037
|
isActive: !0,
|
|
3038
3038
|
type: "signature",
|
|
@@ -3043,7 +3043,7 @@ function fE(A) {
|
|
|
3043
3043
|
});
|
|
3044
3044
|
}
|
|
3045
3045
|
function gQ(g) {
|
|
3046
|
-
return
|
|
3046
|
+
return Z(this, null, function* () {
|
|
3047
3047
|
const A = new FormData();
|
|
3048
3048
|
return A.append(
|
|
3049
3049
|
"eInvoiceRegistration",
|
|
@@ -3053,7 +3053,7 @@ function gQ(g) {
|
|
|
3053
3053
|
g.organizationRegistrationCert
|
|
3054
3054
|
), g.legalRepresentativeIdCard.forEach((C) => {
|
|
3055
3055
|
A.append("legalRepresentativeIdCard", C);
|
|
3056
|
-
}), A.append("isRenew", g.isRenew), yield
|
|
3056
|
+
}), A.append("isRenew", g.isRenew), yield NA.post(sQ, A, {
|
|
3057
3057
|
headers: {
|
|
3058
3058
|
"Content-Type": "multipart/form-data",
|
|
3059
3059
|
"X-Invoice-Widget-Mode": MB(),
|
|
@@ -3063,18 +3063,18 @@ function gQ(g) {
|
|
|
3063
3063
|
});
|
|
3064
3064
|
}
|
|
3065
3065
|
function rE(g) {
|
|
3066
|
-
return
|
|
3067
|
-
return yield
|
|
3066
|
+
return Z(this, null, function* () {
|
|
3067
|
+
return yield NA.get(`${fQ}/${g}/status`);
|
|
3068
3068
|
});
|
|
3069
3069
|
}
|
|
3070
3070
|
function mE() {
|
|
3071
|
-
return
|
|
3072
|
-
return (yield
|
|
3071
|
+
return Z(this, null, function* () {
|
|
3072
|
+
return (yield NA.get(`${DQ}`)).data;
|
|
3073
3073
|
});
|
|
3074
3074
|
}
|
|
3075
3075
|
function PE(g) {
|
|
3076
|
-
return
|
|
3077
|
-
return yield
|
|
3076
|
+
return Z(this, null, function* () {
|
|
3077
|
+
return yield NA.post(`${rQ}/${g}`);
|
|
3078
3078
|
});
|
|
3079
3079
|
}
|
|
3080
3080
|
function qE({ name: g, value: A, feeLabel: E, required: C, description: B, isChecked: Q = !0 }) {
|
|
@@ -3202,8 +3202,8 @@ function ME({
|
|
|
3202
3202
|
const h = document.createElement("span");
|
|
3203
3203
|
h.className = "wgt:text-sm wgt:text-red-500 wgt:ml-1", h.innerText = "*", I.appendChild(h), n.appendChild(I);
|
|
3204
3204
|
function e() {
|
|
3205
|
-
return
|
|
3206
|
-
A && clearTimeout(A), E !== "" ? A = setTimeout(() =>
|
|
3205
|
+
return Z(this, null, function* () {
|
|
3206
|
+
A && clearTimeout(A), E !== "" ? A = setTimeout(() => Z(null, null, function* () {
|
|
3207
3207
|
try {
|
|
3208
3208
|
const d = E.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), r = yield uE({ search: d, bank: g });
|
|
3209
3209
|
r && (Q = r), C && C();
|
|
@@ -3351,7 +3351,7 @@ function TE() {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
const dE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFmSURBVHgBjVJLUsJAEH2dTAzu4gmEG+gNYKFxGU9gbqAuLaEqVVDllhuAJyDuQBfEE1CeADiBcaESyWTsJCKfIOXbzPT3db9qAkN5VQvG3iUUVUEoYxcUJlDJC+TcIy8IReY0zA4STKHp15gnYeYTKuCGLiQXrEJnAmK/MHts1Uh5jgXxMab648EaUcv2EUduyrJ1kJb9yvGKgDmzEFMhieoDB7vxBpQsDVEphMYdm/Y402LB0Dxpr9ob7Ff8HKZ/jTw/pNtBBaSeeS93OYLmpAyF4uapw0KmgtfI60/EWjShrftu4IgTH6jxFKSGyEQ0PkdI1BTJzF9SqS4QFRtqwkciezxJCPnVJnV3VkashtTgNf6JrEaqEYt/nItIqrhry+78JSLd9Cf5bxbST/KQH74weQ8Z50Fh8iFJ99dewDAsKO2Cqyp8O04uYrx/Dv3d4wU9LiwvqfQuhL5OnyhuSAFk5KbmN7eYmgg1dFx4AAAAAElFTkSuQmCC";
|
|
3353
3353
|
function xE(R) {
|
|
3354
|
-
return
|
|
3354
|
+
return Z(this, arguments, function* ({
|
|
3355
3355
|
onNext: g,
|
|
3356
3356
|
onPrev: A,
|
|
3357
3357
|
selectedInitPackage: E,
|
|
@@ -3374,7 +3374,7 @@ function xE(R) {
|
|
|
3374
3374
|
savedQuantities: r,
|
|
3375
3375
|
setSavedQuantities: D
|
|
3376
3376
|
}) {
|
|
3377
|
-
let T = "", m = C ? C._id : null, P = B ? B._id : null, v = o ? o.map((S) => S) : [],
|
|
3377
|
+
let T = "", m = C ? C._id : null, P = B ? B._id : null, v = o ? o.map((S) => S) : [], Y = [], x = [], J = [], q = [], N = null, U = (r == null ? void 0 : r.qtyRegFee) || 1, y = (r == null ? void 0 : r.qtyInvoicePkg) || 1, p = (r == null ? void 0 : r.qtySignaturePkg) || 1;
|
|
3378
3378
|
function i() {
|
|
3379
3379
|
D && D({
|
|
3380
3380
|
qtyRegFee: U,
|
|
@@ -3383,7 +3383,7 @@ function xE(R) {
|
|
|
3383
3383
|
});
|
|
3384
3384
|
}
|
|
3385
3385
|
function w(S) {
|
|
3386
|
-
return
|
|
3386
|
+
return Y.find((EA) => EA._id === S) || null;
|
|
3387
3387
|
}
|
|
3388
3388
|
const H = document.createElement("div");
|
|
3389
3389
|
H.className = "wgt:relative wgt:flex wgt:w-full wgt:h-full wgt:flex-col wgt:gap-8 wgt:py-8";
|
|
@@ -3399,9 +3399,9 @@ function xE(R) {
|
|
|
3399
3399
|
container: j,
|
|
3400
3400
|
invoiceSelectorWrapper: G,
|
|
3401
3401
|
setInvoicePackages: K,
|
|
3402
|
-
getInvoicePackages:
|
|
3402
|
+
getInvoicePackages: V,
|
|
3403
3403
|
getFilteredInvoiceOptions: QA,
|
|
3404
|
-
setFilteredInvoiceOptions:
|
|
3404
|
+
setFilteredInvoiceOptions: uA,
|
|
3405
3405
|
findInvoiceById: KA,
|
|
3406
3406
|
removeLoading: XA
|
|
3407
3407
|
} = ME({
|
|
@@ -3426,41 +3426,41 @@ function xE(R) {
|
|
|
3426
3426
|
RA.className = "wgt:hidden wgt:@max-2xl:flex wgt:items-center wgt:justify-between wgt:w-full wgt:bg-white wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:px-6 wgt:py-5 wgt:shadow-lg";
|
|
3427
3427
|
const WA = document.createElement("span");
|
|
3428
3428
|
WA.className = "wgt:text-lg wgt:font-bold wgt:text-strong-950", WA.innerText = c("total"), RA.appendChild(WA);
|
|
3429
|
-
const
|
|
3430
|
-
|
|
3429
|
+
const bA = document.createElement("span");
|
|
3430
|
+
bA.className = "wgt:text-xl wgt:font-bold wgt:text-primary", bA.innerText = "0 VND", RA.appendChild(bA);
|
|
3431
3431
|
const TA = document.createElement("div");
|
|
3432
3432
|
TA.className = "wgt:flex wgt:justify-between wgt:gap-2", H.appendChild(TA);
|
|
3433
|
-
const
|
|
3433
|
+
const jA = cg({
|
|
3434
3434
|
type: "button",
|
|
3435
3435
|
title: c("back"),
|
|
3436
3436
|
className: "wgt:bg-transparent wgt:text-text-primary wgt:hover:bg-transparent wgt:underline",
|
|
3437
3437
|
handleClick: A
|
|
3438
3438
|
});
|
|
3439
|
-
TA.appendChild(
|
|
3440
|
-
const
|
|
3439
|
+
TA.appendChild(jA);
|
|
3440
|
+
const yA = (S, EA, _, $) => Z(null, null, function* () {
|
|
3441
3441
|
F();
|
|
3442
|
-
const AA = s.eInvoiceRegistration, { isUsedEInvoiceBefore:
|
|
3443
|
-
let
|
|
3442
|
+
const AA = s.eInvoiceRegistration, { isUsedEInvoiceBefore: nA } = AA, BA = pg(AA, ["isUsedEInvoiceBefore"]);
|
|
3443
|
+
let W = [
|
|
3444
3444
|
{
|
|
3445
3445
|
code: EA.code,
|
|
3446
3446
|
quantity: EA.quantity
|
|
3447
3447
|
}
|
|
3448
3448
|
];
|
|
3449
|
-
_ &&
|
|
3449
|
+
_ && W.push({
|
|
3450
3450
|
code: _.code,
|
|
3451
3451
|
quantity: _.quantity
|
|
3452
|
-
}), S &&
|
|
3452
|
+
}), S && W.push({
|
|
3453
3453
|
code: S.code,
|
|
3454
3454
|
quantity: S.quantity
|
|
3455
3455
|
}), $.length > 0 && $.forEach((fA) => {
|
|
3456
|
-
const
|
|
3457
|
-
|
|
3458
|
-
|
|
3456
|
+
const cA = J[fA];
|
|
3457
|
+
cA.reward.packageCodes.length > 0 && cA.reward.packageCodes.forEach((sA) => {
|
|
3458
|
+
W.push({
|
|
3459
3459
|
code: sA,
|
|
3460
3460
|
quantity: 1
|
|
3461
3461
|
});
|
|
3462
3462
|
});
|
|
3463
|
-
}), k(
|
|
3463
|
+
}), k(W), X($);
|
|
3464
3464
|
try {
|
|
3465
3465
|
const fA = yield gQ({
|
|
3466
3466
|
eInvoiceRegistration: lA({}, BA),
|
|
@@ -3472,11 +3472,11 @@ function xE(R) {
|
|
|
3472
3472
|
s.idCard,
|
|
3473
3473
|
s.idCardBack
|
|
3474
3474
|
],
|
|
3475
|
-
packages:
|
|
3475
|
+
packages: W,
|
|
3476
3476
|
promotionCodes: $,
|
|
3477
3477
|
isRenew: !d
|
|
3478
|
-
}),
|
|
3479
|
-
I(
|
|
3478
|
+
}), cA = fA.orderId, sA = fA.amount || 0;
|
|
3479
|
+
I(cA), e ? e(sA) : console.warn("setOrderAmount is not defined!"), yield new Promise((GA) => setTimeout(GA, 100)), b(), g();
|
|
3480
3480
|
} catch (fA) {
|
|
3481
3481
|
tg(c("errorCreatingOrder") || "Failed to create order"), b();
|
|
3482
3482
|
return;
|
|
@@ -3485,10 +3485,10 @@ function xE(R) {
|
|
|
3485
3485
|
type: "button",
|
|
3486
3486
|
title: c("next"),
|
|
3487
3487
|
className: "wgt:text-text-primary wgt:bg-primary",
|
|
3488
|
-
handleClick: () =>
|
|
3489
|
-
const S =
|
|
3488
|
+
handleClick: () => Z(null, null, function* () {
|
|
3489
|
+
const S = V().find(
|
|
3490
3490
|
(BA) => BA._id === m
|
|
3491
|
-
), EA =
|
|
3491
|
+
), EA = Y.find(
|
|
3492
3492
|
(BA) => BA._id === P
|
|
3493
3493
|
);
|
|
3494
3494
|
if (d && !EA) {
|
|
@@ -3496,31 +3496,31 @@ function xE(R) {
|
|
|
3496
3496
|
return;
|
|
3497
3497
|
}
|
|
3498
3498
|
let _ = null;
|
|
3499
|
-
d && !(S != null && S.withoutInitialFee) ? (_ =
|
|
3499
|
+
d && !(S != null && S.withoutInitialFee) ? (_ = zA(lA({}, x[0]), {
|
|
3500
3500
|
quantity: U
|
|
3501
3501
|
}), Q(_)) : Q(null);
|
|
3502
|
-
let $ =
|
|
3503
|
-
t($), n(
|
|
3502
|
+
let $ = zA(lA({}, S), { quantity: y }), nA = EA ? zA(lA({}, EA), { quantity: p }) : null;
|
|
3503
|
+
t($), n(nA), f(v), i(), D && D({
|
|
3504
3504
|
qtyRegFee: U,
|
|
3505
3505
|
qtyInvoicePkg: y,
|
|
3506
3506
|
qtySignaturePkg: p
|
|
3507
|
-
}), yield
|
|
3507
|
+
}), yield yA(
|
|
3508
3508
|
_,
|
|
3509
3509
|
$,
|
|
3510
|
-
|
|
3510
|
+
nA,
|
|
3511
3511
|
v
|
|
3512
3512
|
);
|
|
3513
3513
|
})
|
|
3514
3514
|
});
|
|
3515
3515
|
TA.appendChild(_A);
|
|
3516
3516
|
function wg() {
|
|
3517
|
-
return
|
|
3517
|
+
return Z(this, null, function* () {
|
|
3518
3518
|
var S, EA;
|
|
3519
3519
|
try {
|
|
3520
3520
|
const [
|
|
3521
3521
|
_,
|
|
3522
3522
|
$,
|
|
3523
|
-
|
|
3523
|
+
nA,
|
|
3524
3524
|
BA
|
|
3525
3525
|
] = yield Promise.allSettled([
|
|
3526
3526
|
mE(),
|
|
@@ -3533,46 +3533,52 @@ function xE(R) {
|
|
|
3533
3533
|
$.reason
|
|
3534
3534
|
), hg.error(
|
|
3535
3535
|
c("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
3536
|
-
), x = []), _.status === "fulfilled" ? (((S = _ == null ? void 0 : _.value) == null ? void 0 : S.length) > 0 && _.value.forEach((
|
|
3537
|
-
|
|
3538
|
-
id:
|
|
3539
|
-
name:
|
|
3540
|
-
nameEn:
|
|
3541
|
-
appliedPackages:
|
|
3542
|
-
code:
|
|
3543
|
-
limit:
|
|
3544
|
-
used:
|
|
3545
|
-
bank:
|
|
3546
|
-
isActive:
|
|
3547
|
-
type:
|
|
3548
|
-
expiredAt:
|
|
3536
|
+
), x = []), _.status === "fulfilled" ? (((S = _ == null ? void 0 : _.value) == null ? void 0 : S.length) > 0 && _.value.forEach((W) => {
|
|
3537
|
+
W.codes.length > 0 && (J[W.codes[0].code] = {
|
|
3538
|
+
id: W.id,
|
|
3539
|
+
name: W.name,
|
|
3540
|
+
nameEn: W.nameEn,
|
|
3541
|
+
appliedPackages: W.condition.packageCodes,
|
|
3542
|
+
code: W.codes[0].code,
|
|
3543
|
+
limit: W.codes[0].limit,
|
|
3544
|
+
used: W.codes[0].used,
|
|
3545
|
+
bank: W.campaign.bank,
|
|
3546
|
+
isActive: W.isActive,
|
|
3547
|
+
type: W.type,
|
|
3548
|
+
expiredAt: W.toDate,
|
|
3549
3549
|
isDisabled: !1,
|
|
3550
|
-
reward:
|
|
3550
|
+
reward: W.reward
|
|
3551
3551
|
});
|
|
3552
|
-
}), Object.keys(
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3552
|
+
}), Object.keys(J).length > 0 && (v = o ? [...o] : (
|
|
3553
|
+
// : Object.keys(promotions).filter(
|
|
3554
|
+
// (p) =>
|
|
3555
|
+
// promotions[p].bank === theme &&
|
|
3556
|
+
// promotions[p].expiredAt >= new Date().toISOString() &&
|
|
3557
|
+
// promotions[p].limit > promotions[p].used,
|
|
3558
|
+
// );
|
|
3559
|
+
[]
|
|
3560
|
+
), Ag())) : console.error("Failed to load promotions:", _.reason), nA.status === "fulfilled") {
|
|
3561
|
+
const W = d ? nA.value : nA.value.filter((AA) => AA.renewPrice !== 0);
|
|
3562
|
+
if (K(W || []), nA.value.length > 0) {
|
|
3563
|
+
const AA = nA.value.find(
|
|
3558
3564
|
(fA) => q.includes(fA.code)
|
|
3559
3565
|
);
|
|
3560
|
-
m = C ? C._id : AA ? AA._id :
|
|
3566
|
+
m = C ? C._id : AA ? AA._id : W == null ? void 0 : W[0]._id, uA(W);
|
|
3561
3567
|
}
|
|
3562
3568
|
XA();
|
|
3563
3569
|
} else
|
|
3564
3570
|
console.error(
|
|
3565
3571
|
"Failed to load invoice packages:",
|
|
3566
|
-
|
|
3572
|
+
nA.reason
|
|
3567
3573
|
), hg.error(
|
|
3568
3574
|
c("errorLoadingInvoicePackages") || "Failed to load invoice packages"
|
|
3569
3575
|
), K([]), XA();
|
|
3570
3576
|
if (BA.status === "fulfilled")
|
|
3571
|
-
if (
|
|
3572
|
-
const
|
|
3577
|
+
if (Y = BA.value || [], Y.length > 0) {
|
|
3578
|
+
const W = Y.find(
|
|
3573
3579
|
(AA) => q.includes(AA.code)
|
|
3574
3580
|
);
|
|
3575
|
-
d ? P = B ? B._id :
|
|
3581
|
+
d ? P = B ? B._id : W ? W._id : d ? (EA = Y == null ? void 0 : Y.filter((AA) => !AA.isBonusPackage)[0]) == null ? void 0 : EA._id : null : P = B ? B._id : (
|
|
3576
3582
|
// : promotionPkg
|
|
3577
3583
|
// ? promotionPkg._id
|
|
3578
3584
|
// : signaturePackages?.filter((p) => !p.isBonusPackage)[0]?._id;
|
|
@@ -3584,7 +3590,7 @@ function xE(R) {
|
|
|
3584
3590
|
BA.reason
|
|
3585
3591
|
), hg.error(
|
|
3586
3592
|
c("errorLoadingSignaturePackages") || "Failed to load signature packages"
|
|
3587
|
-
),
|
|
3593
|
+
), Y = [];
|
|
3588
3594
|
Pg();
|
|
3589
3595
|
} catch (_) {
|
|
3590
3596
|
console.error("Unexpected error during data loading:", _), hg.error(c("errorLoadingData") || "Failed to load data", {
|
|
@@ -3599,12 +3605,12 @@ function xE(R) {
|
|
|
3599
3605
|
qg(), Kg(), vg(), SA(), dA();
|
|
3600
3606
|
}
|
|
3601
3607
|
function og(S, EA, _) {
|
|
3602
|
-
const $ = Object.values(
|
|
3608
|
+
const $ = Object.values(J).find(
|
|
3603
3609
|
(AA) => AA.bank === u && AA.appliedPackages.includes(S)
|
|
3604
|
-
),
|
|
3610
|
+
), nA = $ && !$.isDisabled && !($.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && $.limit !== $.used, BA = Object.values(J).find(
|
|
3605
3611
|
(AA) => AA.bank === u && AA.appliedPackages.includes(EA)
|
|
3606
|
-
),
|
|
3607
|
-
if (
|
|
3612
|
+
), W = BA && !BA.isDisabled && !(BA.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && BA.limit !== BA.used;
|
|
3613
|
+
if (nA && !W) {
|
|
3608
3614
|
const { container: AA, open: fA } = Ng({
|
|
3609
3615
|
message: c("errorDiscountPackage"),
|
|
3610
3616
|
okLabel: c("ok"),
|
|
@@ -3627,10 +3633,10 @@ function xE(R) {
|
|
|
3627
3633
|
selectedPackageId: m,
|
|
3628
3634
|
isRenew: !d,
|
|
3629
3635
|
handlePackageSelect: (S) => {
|
|
3630
|
-
var $,
|
|
3631
|
-
let EA = ($ =
|
|
3636
|
+
var $, nA;
|
|
3637
|
+
let EA = ($ = V().find(
|
|
3632
3638
|
(BA) => BA._id === m
|
|
3633
|
-
)) == null ? void 0 : $.code, _ = (
|
|
3639
|
+
)) == null ? void 0 : $.code, _ = (nA = V().find((BA) => BA._id === S)) == null ? void 0 : nA.code;
|
|
3634
3640
|
og(EA, _, () => {
|
|
3635
3641
|
m = S, UA.setSelectedPackageId(S), Qg(), vg(), SA(), dA();
|
|
3636
3642
|
});
|
|
@@ -3643,25 +3649,25 @@ function xE(R) {
|
|
|
3643
3649
|
}
|
|
3644
3650
|
let $A = null;
|
|
3645
3651
|
function Kg() {
|
|
3646
|
-
if (OA.innerHTML = "",
|
|
3652
|
+
if (OA.innerHTML = "", Y.length > 0)
|
|
3647
3653
|
$A = iC({
|
|
3648
3654
|
type: "signature",
|
|
3649
|
-
packageOptions:
|
|
3655
|
+
packageOptions: Y.filter((S) => !S.isBonusPackage),
|
|
3650
3656
|
disCountedPackages: q,
|
|
3651
3657
|
promotion: c("gift"),
|
|
3652
3658
|
selectedPackageId: P,
|
|
3653
3659
|
allowDeselect: !d,
|
|
3654
3660
|
handlePackageSelect: (S) => {
|
|
3655
|
-
var $,
|
|
3656
|
-
let EA = ($ =
|
|
3661
|
+
var $, nA;
|
|
3662
|
+
let EA = ($ = Y.find(
|
|
3657
3663
|
(BA) => BA._id === P
|
|
3658
|
-
)) == null ? void 0 : $.code, _ = (
|
|
3664
|
+
)) == null ? void 0 : $.code, _ = (nA = Y.find((BA) => BA._id === S)) == null ? void 0 : nA.code;
|
|
3659
3665
|
if (!d && P === S) {
|
|
3660
3666
|
P = null, $A.setSelectedPackageId(null), Qg(), vg(), SA(), dA();
|
|
3661
3667
|
return;
|
|
3662
3668
|
}
|
|
3663
3669
|
og(EA, _, () => {
|
|
3664
|
-
P = S, $A.setSelectedPackageId(S),
|
|
3670
|
+
P = S, $A.setSelectedPackageId(S), uA(V()), Qg(), vg(), SA(), dA();
|
|
3665
3671
|
});
|
|
3666
3672
|
}
|
|
3667
3673
|
}), OA.appendChild($A.container);
|
|
@@ -3674,7 +3680,7 @@ function xE(R) {
|
|
|
3674
3680
|
ag.className = "wgt:w-full", M.appendChild(ag);
|
|
3675
3681
|
function vg() {
|
|
3676
3682
|
DA.remove(), ag.innerHTML = "";
|
|
3677
|
-
const S =
|
|
3683
|
+
const S = V().find(
|
|
3678
3684
|
(EA) => EA._id === m
|
|
3679
3685
|
);
|
|
3680
3686
|
if (x.length > 0) {
|
|
@@ -3697,32 +3703,36 @@ function xE(R) {
|
|
|
3697
3703
|
const JA = document.createElement("div");
|
|
3698
3704
|
JA.className = "promotion-wrapper wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
3699
3705
|
function Qg() {
|
|
3700
|
-
const S =
|
|
3706
|
+
const S = V().find(
|
|
3701
3707
|
(_) => _._id === m
|
|
3702
|
-
), EA =
|
|
3708
|
+
), EA = Y.find(
|
|
3703
3709
|
(_) => _._id === P
|
|
3704
3710
|
);
|
|
3705
|
-
Object.keys(
|
|
3706
|
-
const $ =
|
|
3707
|
-
if ($.bank !== u)
|
|
3711
|
+
Object.keys(J).forEach((_) => {
|
|
3712
|
+
const $ = J[_];
|
|
3713
|
+
if ($.bank !== u) {
|
|
3714
|
+
$.isDisabled = !0, v = v.filter(
|
|
3715
|
+
(BA) => BA != $.code
|
|
3716
|
+
);
|
|
3708
3717
|
return;
|
|
3709
|
-
|
|
3718
|
+
}
|
|
3719
|
+
let nA = !1;
|
|
3710
3720
|
if ($.code === "INITFEE-KM-500")
|
|
3711
|
-
|
|
3721
|
+
nA = !(S && S.withoutInitialFee);
|
|
3712
3722
|
else {
|
|
3713
|
-
const BA = S == null ? void 0 : S.code,
|
|
3714
|
-
|
|
3723
|
+
const BA = S == null ? void 0 : S.code, W = EA == null ? void 0 : EA.code;
|
|
3724
|
+
nA = $.appliedPackages.includes(BA) || $.appliedPackages.includes(W);
|
|
3715
3725
|
}
|
|
3716
|
-
$.isDisabled = !
|
|
3726
|
+
$.isDisabled = !nA || isExpired || isOutOfLimit || isInactive, $.isDisabled && (v = v.filter(
|
|
3717
3727
|
(BA) => BA !== $.code
|
|
3718
|
-
)
|
|
3728
|
+
));
|
|
3719
3729
|
}), Ag();
|
|
3720
3730
|
}
|
|
3721
3731
|
function Ag() {
|
|
3722
|
-
q = Object.values(
|
|
3732
|
+
q = Object.values(J).filter((S) => S.bank === u).map((S) => S.appliedPackages[0]);
|
|
3723
3733
|
}
|
|
3724
3734
|
function SA() {
|
|
3725
|
-
if (Object.values(
|
|
3735
|
+
if (Object.values(J).filter(
|
|
3726
3736
|
(AA) => AA.bank === u
|
|
3727
3737
|
).length === 0) {
|
|
3728
3738
|
M.contains(JA) && M.removeChild(JA);
|
|
@@ -3735,19 +3745,19 @@ function xE(R) {
|
|
|
3735
3745
|
_.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
|
|
3736
3746
|
const $ = document.createElement("div");
|
|
3737
3747
|
$.className = "wgt:flex wgt:min-w-[500px] wgt:h-11 wgt:items-center wgt:gap-3 wgt:px-3 wgt:py-2 wgt:rounded-lg wgt:bg-white wgt:border wgt:border-[#E4E7EC] wgt:@max-2xl:min-w-full wgt:@max-2xl:flex-wrap wgt:@max-2xl:h-fit", _.appendChild($), v && v.length > 0 && v.filter((fA) => {
|
|
3738
|
-
const
|
|
3748
|
+
const cA = Object.values(J).find(
|
|
3739
3749
|
(sA) => sA.code === fA
|
|
3740
3750
|
);
|
|
3741
|
-
return
|
|
3751
|
+
return cA && cA.bank === u;
|
|
3742
3752
|
}).forEach((fA) => {
|
|
3743
|
-
const
|
|
3744
|
-
|
|
3753
|
+
const cA = document.createElement("div");
|
|
3754
|
+
cA.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", cA.innerText = fA;
|
|
3745
3755
|
const sA = cg({
|
|
3746
3756
|
type: "button",
|
|
3747
3757
|
title: "x",
|
|
3748
3758
|
handleClick: () => {
|
|
3749
3759
|
v = v.filter(
|
|
3750
|
-
(
|
|
3760
|
+
(GA) => GA !== fA
|
|
3751
3761
|
), SA(), dA();
|
|
3752
3762
|
}
|
|
3753
3763
|
});
|
|
@@ -3755,9 +3765,9 @@ function xE(R) {
|
|
|
3755
3765
|
<path d="M1.17157 1.17163L6.82842 6.82848" stroke="#0E121B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3756
3766
|
<path d="M1.17158 6.82849L6.82843 1.17163" stroke="#0E121B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3757
3767
|
</svg>
|
|
3758
|
-
`,
|
|
3768
|
+
`, cA.appendChild(sA), $.appendChild(cA);
|
|
3759
3769
|
});
|
|
3760
|
-
const
|
|
3770
|
+
const nA = cg({
|
|
3761
3771
|
type: "button",
|
|
3762
3772
|
title: c("apply"),
|
|
3763
3773
|
className: "wgt:text-white wgt:bg-primary",
|
|
@@ -3765,20 +3775,22 @@ function xE(R) {
|
|
|
3765
3775
|
console.log("Apply promotion");
|
|
3766
3776
|
}
|
|
3767
3777
|
});
|
|
3768
|
-
_.appendChild(
|
|
3778
|
+
_.appendChild(nA), JA.appendChild(_);
|
|
3769
3779
|
const BA = document.createElement("div");
|
|
3770
3780
|
BA.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", JA.appendChild(BA);
|
|
3771
|
-
const
|
|
3781
|
+
const W = Object.values(J).filter(
|
|
3772
3782
|
(AA) => AA.bank === u
|
|
3773
3783
|
);
|
|
3774
|
-
if (
|
|
3775
|
-
|
|
3784
|
+
if (W.length > 0)
|
|
3785
|
+
W.forEach((AA) => {
|
|
3776
3786
|
const { container: fA } = vE({
|
|
3777
|
-
promotion:
|
|
3787
|
+
promotion: zA(lA({}, AA), {
|
|
3778
3788
|
isSelected: v.includes(AA.code)
|
|
3779
3789
|
}),
|
|
3780
|
-
onSelect: (
|
|
3781
|
-
sA
|
|
3790
|
+
onSelect: (cA, sA) => {
|
|
3791
|
+
sA ? v.includes(cA) || v.push(cA) : v = v.filter(
|
|
3792
|
+
(GA) => GA !== cA
|
|
3793
|
+
), SA(), dA();
|
|
3782
3794
|
},
|
|
3783
3795
|
isDisabled: AA.isDisabled || AA.expiredAt < (/* @__PURE__ */ new Date()).toISOString() || AA.limit === AA.used
|
|
3784
3796
|
});
|
|
@@ -3790,8 +3802,8 @@ function xE(R) {
|
|
|
3790
3802
|
}
|
|
3791
3803
|
}
|
|
3792
3804
|
function dA() {
|
|
3793
|
-
var sA,
|
|
3794
|
-
if (i(), YA.innerHTML = "", M.appendChild(vA), M.appendChild(RA), M.appendChild(Cg),
|
|
3805
|
+
var sA, GA, ig, gg, xg, Bg, Eg, Ig, Yg;
|
|
3806
|
+
if (i(), YA.innerHTML = "", M.appendChild(vA), M.appendChild(RA), M.appendChild(Cg), V().length === 0 && Y.length === 0) {
|
|
3795
3807
|
const z = document.createElement("tr");
|
|
3796
3808
|
z.innerHTML = `
|
|
3797
3809
|
<td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600 wgt:@max-2xl:col-span-5">
|
|
@@ -3800,7 +3812,7 @@ function xE(R) {
|
|
|
3800
3812
|
`, YA.appendChild(z), h(0);
|
|
3801
3813
|
return;
|
|
3802
3814
|
}
|
|
3803
|
-
const S =
|
|
3815
|
+
const S = V().find(
|
|
3804
3816
|
(z) => z._id === m
|
|
3805
3817
|
);
|
|
3806
3818
|
if (d && (x == null ? void 0 : x.length) > 0 && !(S != null && S.withoutInitialFee)) {
|
|
@@ -3808,26 +3820,26 @@ function xE(R) {
|
|
|
3808
3820
|
z.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
|
|
3809
3821
|
const CA = document.createElement("td");
|
|
3810
3822
|
CA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", CA.innerText = Dg() === "vi" ? x[0].name : x[0].nameEn, z.appendChild(CA);
|
|
3811
|
-
const
|
|
3812
|
-
|
|
3813
|
-
const
|
|
3814
|
-
|
|
3823
|
+
const eA = document.createElement("td");
|
|
3824
|
+
eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", eA.innerText = c("package"), z.appendChild(eA);
|
|
3825
|
+
const IA = document.createElement("td");
|
|
3826
|
+
IA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-2.5 wgt:text-center wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2";
|
|
3815
3827
|
const hA = document.createElement("div");
|
|
3816
3828
|
hA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3829
|
+
const oA = document.createElement("button");
|
|
3830
|
+
oA.type = "button", oA.ariaLabel = c("decrease"), oA.disabled = !0, oA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", oA.innerText = "–", oA.addEventListener("click", () => {
|
|
3819
3831
|
U > 1 && (U -= 1, dA());
|
|
3820
|
-
}), hA.appendChild(
|
|
3821
|
-
const
|
|
3822
|
-
|
|
3823
|
-
const
|
|
3824
|
-
|
|
3832
|
+
}), hA.appendChild(oA);
|
|
3833
|
+
const aA = document.createElement("span");
|
|
3834
|
+
aA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", aA.innerText = U, hA.appendChild(aA);
|
|
3835
|
+
const iA = document.createElement("button");
|
|
3836
|
+
iA.type = "button", iA.ariaLabel = c("increase"), iA.disabled = !0, iA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:cursor-not-allowed wgt:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", iA.innerText = "+", iA.addEventListener("click", () => {
|
|
3825
3837
|
U += 1, dA();
|
|
3826
|
-
}), hA.appendChild(
|
|
3838
|
+
}), hA.appendChild(iA), IA.appendChild(hA), z.appendChild(IA);
|
|
3827
3839
|
const MA = document.createElement("td");
|
|
3828
3840
|
MA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", MA.innerText = HA((sA = x[0]) == null ? void 0 : sA.price) + " VND", z.appendChild(MA);
|
|
3829
3841
|
const rA = document.createElement("td");
|
|
3830
|
-
rA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:min-w-[16rem] wgt:@max-2xl:hidden", rA.innerText = HA(((
|
|
3842
|
+
rA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:min-w-[16rem] wgt:@max-2xl:hidden", rA.innerText = HA(((GA = x[0]) == null ? void 0 : GA.price) * U) + " VND", z.appendChild(rA);
|
|
3831
3843
|
const xA = document.createElement("div");
|
|
3832
3844
|
xA.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", xA.innerHTML = `
|
|
3833
3845
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
@@ -3849,46 +3861,46 @@ function xE(R) {
|
|
|
3849
3861
|
if (z) {
|
|
3850
3862
|
const CA = document.createElement("tr");
|
|
3851
3863
|
CA.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
|
|
3852
|
-
const
|
|
3853
|
-
|
|
3854
|
-
CA.appendChild(
|
|
3855
|
-
const
|
|
3856
|
-
|
|
3864
|
+
const eA = document.createElement("td");
|
|
3865
|
+
eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", eA.innerText = z[Rg(Dg())], // getCurrentLanguage() === "vi" ? invPkg?.name : invPkg?.nameEn;
|
|
3866
|
+
CA.appendChild(eA);
|
|
3867
|
+
const IA = document.createElement("td");
|
|
3868
|
+
IA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", IA.innerText = c("package"), CA.appendChild(IA);
|
|
3857
3869
|
const hA = document.createElement("td");
|
|
3858
3870
|
hA.className = "wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2";
|
|
3859
|
-
const
|
|
3860
|
-
|
|
3861
|
-
const
|
|
3862
|
-
|
|
3863
|
-
const
|
|
3864
|
-
|
|
3871
|
+
const oA = document.createElement("div");
|
|
3872
|
+
oA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
|
|
3873
|
+
const aA = document.createElement("button");
|
|
3874
|
+
aA.type = "button", aA.ariaLabel = c("decrease");
|
|
3875
|
+
const iA = d ? (xg = z == null ? void 0 : z.price) != null ? xg : 0 : (Bg = z == null ? void 0 : z.renewPrice) != null ? Bg : 0;
|
|
3876
|
+
aA.disabled = y <= 1 || iA === 0, aA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", aA.innerText = "–", aA.addEventListener("click", () => {
|
|
3865
3877
|
y > 1 && (y -= 1, dA());
|
|
3866
|
-
}),
|
|
3878
|
+
}), oA.appendChild(aA);
|
|
3867
3879
|
const MA = document.createElement("span");
|
|
3868
|
-
MA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", MA.innerText =
|
|
3880
|
+
MA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", MA.innerText = iA === 0 ? 1 : y, oA.appendChild(MA);
|
|
3869
3881
|
const rA = document.createElement("button");
|
|
3870
3882
|
rA.type = "button", rA.ariaLabel = c("increase"), rA.disabled = (z == null ? void 0 : z.price) === 0, rA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:disabled:cursor-not-allowed wgt:disabled:opacity-50 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", rA.innerText = "+", rA.addEventListener("click", () => {
|
|
3871
|
-
|
|
3872
|
-
}),
|
|
3883
|
+
iA !== 0 && (y += 1, dA());
|
|
3884
|
+
}), oA.appendChild(rA), hA.appendChild(oA), CA.appendChild(hA);
|
|
3873
3885
|
const xA = document.createElement("td");
|
|
3874
|
-
xA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", xA.innerText = HA(
|
|
3886
|
+
xA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", xA.innerText = HA(iA * (z == null ? void 0 : z.limit)) + " VND", CA.appendChild(xA);
|
|
3875
3887
|
const pA = document.createElement("td");
|
|
3876
|
-
pA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", pA.innerText = HA(
|
|
3888
|
+
pA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", pA.innerText = HA(iA * (z == null ? void 0 : z.limit) * y) + " VND", CA.appendChild(pA);
|
|
3877
3889
|
const Mg = document.createElement("div");
|
|
3878
3890
|
Mg.className = "wgt:hidden wgt:@max-2xl:flex wgt:flex-col wgt:gap-1 wgt:mt-2 wgt:pt-2 wgt:border-t wgt:border-soft-200", Mg.innerHTML = `
|
|
3879
3891
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
3880
3892
|
<span>${c("unitPrice")}:</span>
|
|
3881
3893
|
<span class="wgt:font-medium">${HA(
|
|
3882
|
-
|
|
3894
|
+
iA * (z == null ? void 0 : z.limit)
|
|
3883
3895
|
)} VND</span>
|
|
3884
3896
|
</div>
|
|
3885
3897
|
<div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
|
|
3886
3898
|
<span>${c("total")}:</span>
|
|
3887
3899
|
<span class="wgt:text-primary">${HA(
|
|
3888
|
-
|
|
3900
|
+
iA * (z == null ? void 0 : z.limit) * y
|
|
3889
3901
|
)} VND</span>
|
|
3890
3902
|
</div>
|
|
3891
|
-
`,
|
|
3903
|
+
`, eA.appendChild(Mg), YA.appendChild(CA);
|
|
3892
3904
|
}
|
|
3893
3905
|
}
|
|
3894
3906
|
{
|
|
@@ -3896,25 +3908,25 @@ function xE(R) {
|
|
|
3896
3908
|
if (z) {
|
|
3897
3909
|
const CA = document.createElement("tr");
|
|
3898
3910
|
CA.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
|
|
3899
|
-
const
|
|
3900
|
-
|
|
3901
|
-
CA.appendChild(
|
|
3902
|
-
const
|
|
3903
|
-
|
|
3911
|
+
const eA = document.createElement("td");
|
|
3912
|
+
eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", eA.innerText = z[Rg(Dg())], // getCurrentLanguage() === "vi" ? sigPkg?.name : sigPkg?.nameEn;
|
|
3913
|
+
CA.appendChild(eA);
|
|
3914
|
+
const IA = document.createElement("td");
|
|
3915
|
+
IA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", IA.innerText = c("package"), CA.appendChild(IA);
|
|
3904
3916
|
const hA = document.createElement("td");
|
|
3905
3917
|
hA.className = "wgt:whitespace-nowrap wgt:px-4 wgt:py-3 wgt:text-center wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2";
|
|
3906
|
-
const
|
|
3907
|
-
|
|
3908
|
-
const
|
|
3909
|
-
|
|
3918
|
+
const oA = document.createElement("div");
|
|
3919
|
+
oA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
|
|
3920
|
+
const aA = document.createElement("button");
|
|
3921
|
+
aA.type = "button", aA.ariaLabel = c("decrease"), aA.disabled = p <= 1, aA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold" + (p <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), aA.innerText = "–", aA.addEventListener("click", () => {
|
|
3910
3922
|
p > 1 && (p -= 1, dA());
|
|
3911
|
-
}),
|
|
3912
|
-
const
|
|
3913
|
-
|
|
3923
|
+
}), oA.appendChild(aA);
|
|
3924
|
+
const iA = document.createElement("span");
|
|
3925
|
+
iA.className = "wgt:max-w-10 wgt:text-center wgt:text-sm wgt:font-medium wgt:text-text-black wgt:focus:outline-none wgt:@max-2xl:text-lg wgt:@max-2xl:min-w-[60px] wgt:@max-2xl:font-semibold", iA.innerText = p, oA.appendChild(iA);
|
|
3914
3926
|
const MA = document.createElement("button");
|
|
3915
3927
|
MA.type = "button", MA.ariaLabel = c("increase"), MA.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:items-center wgt:justify-center wgt:rounded-lg wgt:bg-weak-50 wgt:text-strong-950 wgt:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", MA.innerText = "+", MA.addEventListener("click", () => {
|
|
3916
3928
|
p += 1, dA();
|
|
3917
|
-
}),
|
|
3929
|
+
}), oA.appendChild(MA), hA.appendChild(oA), CA.appendChild(hA);
|
|
3918
3930
|
const rA = document.createElement("td");
|
|
3919
3931
|
rA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", rA.innerText = HA((z == null ? void 0 : z.limit) * (z == null ? void 0 : z.price)) + " VND", CA.appendChild(rA);
|
|
3920
3932
|
const xA = document.createElement("td");
|
|
@@ -3933,46 +3945,46 @@ function xE(R) {
|
|
|
3933
3945
|
(z == null ? void 0 : z.limit) * (z == null ? void 0 : z.price) * p
|
|
3934
3946
|
)} VND</span>
|
|
3935
3947
|
</div>
|
|
3936
|
-
`,
|
|
3948
|
+
`, eA.appendChild(pA), YA.appendChild(CA);
|
|
3937
3949
|
}
|
|
3938
3950
|
}
|
|
3939
3951
|
const EA = v.map(
|
|
3940
|
-
(z) => Object.values(
|
|
3952
|
+
(z) => Object.values(J).find(
|
|
3941
3953
|
(CA) => CA.code === z && CA.bank === u
|
|
3942
3954
|
)
|
|
3943
3955
|
).filter((z) => z !== void 0);
|
|
3944
3956
|
let _ = 0;
|
|
3945
3957
|
EA.length > 0 && EA.forEach((z) => {
|
|
3946
|
-
var
|
|
3958
|
+
var oA, aA, iA, MA, rA, xA;
|
|
3947
3959
|
const CA = document.createElement("tr");
|
|
3948
3960
|
CA.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-3 wgt:@max-2xl:p-3 wgt:@max-2xl:bg-weak-50 wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200";
|
|
3949
|
-
const
|
|
3950
|
-
|
|
3961
|
+
const eA = document.createElement("td");
|
|
3962
|
+
eA.colSpan = 3, eA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:col-span-3 wgt:@max-2xl:col-span-5 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-1", eA.innerHTML = `
|
|
3951
3963
|
<div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:@max-2xl:justify-start">
|
|
3952
3964
|
<img src="${dE}" alt="ticket" class="wgt:w-4 wgt:@max-2xl:w-5">
|
|
3953
3965
|
<span class="wgt:text-text-sub-600 wgt:@max-2xl:text-sm wgt:@max-2xl:font-medium">${z[Rg(Dg())] || (z == null ? void 0 : z.code)}</span>
|
|
3954
3966
|
</div>
|
|
3955
|
-
`, CA.appendChild(
|
|
3956
|
-
const
|
|
3957
|
-
|
|
3967
|
+
`, CA.appendChild(eA);
|
|
3968
|
+
const IA = document.createElement("td");
|
|
3969
|
+
IA.className = "wgt:@max-2xl:hidden", CA.appendChild(IA);
|
|
3958
3970
|
const hA = document.createElement("td");
|
|
3959
3971
|
hA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:font-semibold wgt:@max-2xl:text-base wgt:@max-2xl:font-bold wgt:@max-2xl:p-0", z.type === "discount" ? (hA.innerText = `-${HA(
|
|
3960
|
-
(
|
|
3961
|
-
)} VND`, hA.style.color = "#F04438", _ += (
|
|
3972
|
+
(oA = z == null ? void 0 : z.reward) == null ? void 0 : oA.discountAmount
|
|
3973
|
+
)} VND`, hA.style.color = "#F04438", _ += (aA = z == null ? void 0 : z.reward) == null ? void 0 : aA.discountAmount) : (z == null ? void 0 : z.type) === "free_item" ? (hA.innerText = `+${(MA = (iA = z == null ? void 0 : z.reward) == null ? void 0 : iA.packageCodes) == null ? void 0 : MA.length} ${c(
|
|
3962
3974
|
"package"
|
|
3963
3975
|
)} ${(xA = (rA = z == null ? void 0 : z.reward) == null ? void 0 : rA.packageCodes) == null ? void 0 : xA.join(", ")}`, hA.style.color = "#12B76A") : hA.innerText = "", CA.appendChild(hA), YA.appendChild(CA);
|
|
3964
3976
|
});
|
|
3965
|
-
const $ = d && x.length > 0 && !(S != null && S.withoutInitialFee) ? ((Eg = x[0]) == null ? void 0 : Eg.price) * U : 0,
|
|
3966
|
-
h(
|
|
3977
|
+
const $ = d && x.length > 0 && !(S != null && S.withoutInitialFee) ? ((Eg = x[0]) == null ? void 0 : Eg.price) * U : 0, nA = KA(m), BA = nA ? d ? (Ig = nA.price) != null ? Ig : 0 : (Yg = nA.renewPrice) != null ? Yg : 0 : 0, W = nA ? BA * nA.limit * y : 0, AA = w(P), fA = AA ? AA.price * AA.limit * p : 0, cA = $ + W + fA - _;
|
|
3978
|
+
h(cA);
|
|
3967
3979
|
{
|
|
3968
3980
|
const z = document.createElement("tr");
|
|
3969
3981
|
z.className = "wgt:@max-2xl:hidden";
|
|
3970
3982
|
const CA = document.createElement("td");
|
|
3971
3983
|
CA.colSpan = 4, CA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950 wgt:col-span-4", CA.innerText = c("total"), z.appendChild(CA);
|
|
3972
|
-
const
|
|
3973
|
-
|
|
3984
|
+
const eA = document.createElement("td");
|
|
3985
|
+
eA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", eA.innerText = HA(cA) + " VND", z.appendChild(eA), YA.appendChild(z);
|
|
3974
3986
|
}
|
|
3975
|
-
|
|
3987
|
+
bA.innerText = HA(cA) + " VND";
|
|
3976
3988
|
}
|
|
3977
3989
|
return wg(), { container: H };
|
|
3978
3990
|
});
|
|
@@ -3996,8 +4008,8 @@ function HE({
|
|
|
3996
4008
|
a.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
|
|
3997
4009
|
const o = document.createElement("div");
|
|
3998
4010
|
o.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((x) => {
|
|
3999
|
-
const
|
|
4000
|
-
|
|
4011
|
+
const J = document.createElement("img");
|
|
4012
|
+
J.src = x, J.alt = "Logo", J.className = "wgt:w-14 wgt:object-contain", o.appendChild(J);
|
|
4001
4013
|
}), a.appendChild(o));
|
|
4002
4014
|
const s = document.createElement("div");
|
|
4003
4015
|
s.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
|
|
@@ -4005,8 +4017,8 @@ function HE({
|
|
|
4005
4017
|
f.src = g, f.alt = "QR code", f.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", s.appendChild(f), a.appendChild(s);
|
|
4006
4018
|
const k = document.createElement("div");
|
|
4007
4019
|
k.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((x) => {
|
|
4008
|
-
const
|
|
4009
|
-
|
|
4020
|
+
const J = document.createElement("img");
|
|
4021
|
+
J.src = x, J.alt = "Logo", J.className = `wgt:w-${I === "ocb" ? "28" : "8"} wgt:object-contain`, k.appendChild(J);
|
|
4010
4022
|
}), a.appendChild(k);
|
|
4011
4023
|
const X = document.createElement("div");
|
|
4012
4024
|
X.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
|
|
@@ -4025,7 +4037,7 @@ function HE({
|
|
|
4025
4037
|
const T = document.createElement("div"), m = document.createElement("h3");
|
|
4026
4038
|
m.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", m.innerText = c("paymentInstructionsTitle"), T.appendChild(m);
|
|
4027
4039
|
const P = document.createElement("ol");
|
|
4028
|
-
P.className = "wgt:space-y-4", t.forEach((x,
|
|
4040
|
+
P.className = "wgt:space-y-4", t.forEach((x, J) => {
|
|
4029
4041
|
const q = document.createElement("li");
|
|
4030
4042
|
q.className = "wgt:flex wgt:items-start";
|
|
4031
4043
|
const N = document.createElement("div");
|
|
@@ -4033,24 +4045,24 @@ function HE({
|
|
|
4033
4045
|
const U = document.createElement("div");
|
|
4034
4046
|
U.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
|
|
4035
4047
|
const y = document.createElement("span");
|
|
4036
|
-
y.className = "wgt:text-white wgt:text-sm wgt:font-semibold", y.innerText = String(
|
|
4048
|
+
y.className = "wgt:text-white wgt:text-sm wgt:font-semibold", y.innerText = String(J + 1), U.appendChild(y), N.appendChild(U);
|
|
4037
4049
|
const p = document.createElement("p");
|
|
4038
4050
|
p.className = "wgt:ml-3 wgt:text-text-sub-600", p.innerText = x, q.appendChild(N), q.appendChild(p), P.appendChild(q);
|
|
4039
4051
|
}), T.appendChild(P), R.appendChild(T);
|
|
4040
4052
|
const v = document.createElement("div");
|
|
4041
4053
|
v.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
|
|
4042
|
-
const
|
|
4043
|
-
return
|
|
4054
|
+
const Y = document.createElement("img");
|
|
4055
|
+
return Y.src = n, Y.alt = "QR payment illustration", Y.className = "wgt:h-full wgt:object-contain", v.appendChild(Y), R.appendChild(v), h.appendChild(R), {
|
|
4044
4056
|
container: h,
|
|
4045
4057
|
update(x = {}) {
|
|
4046
|
-
x.qrSrc != null && (f.src = x.qrSrc), x.logos && (k.innerHTML = "", x.logos.forEach((
|
|
4058
|
+
x.qrSrc != null && (f.src = x.qrSrc), x.logos && (k.innerHTML = "", x.logos.forEach((J) => {
|
|
4047
4059
|
const q = document.createElement("img");
|
|
4048
|
-
q.src =
|
|
4060
|
+
q.src = J, q.alt = "Logo", q.className = "wgt:w-8 wgt:object-contain", k.appendChild(q);
|
|
4049
4061
|
})), x.accountName != null && (d.innerText = x.accountName), x.accountNumber != null && (r.innerHTML = `${c(
|
|
4050
4062
|
"accountNumber"
|
|
4051
4063
|
)}: <span class="wgt:font-medium">${x.accountNumber}</span>`), x.bankName != null && (D.innerHTML = `${c(
|
|
4052
4064
|
"beneficiaryBank"
|
|
4053
|
-
)}: <span class="wgt:font-medium">${x.bankName}</span>`), x.instructions && (P.innerHTML = "", x.instructions.forEach((
|
|
4065
|
+
)}: <span class="wgt:font-medium">${x.bankName}</span>`), x.instructions && (P.innerHTML = "", x.instructions.forEach((J, q) => {
|
|
4054
4066
|
const N = document.createElement("li");
|
|
4055
4067
|
N.className = "wgt:flex wgt:items-start";
|
|
4056
4068
|
const U = document.createElement("div");
|
|
@@ -4060,8 +4072,8 @@ function HE({
|
|
|
4060
4072
|
const p = document.createElement("span");
|
|
4061
4073
|
p.className = "wgt:text-white wgt:text-sm wgt:font-semibold", p.innerText = String(q + 1), y.appendChild(p), U.appendChild(y);
|
|
4062
4074
|
const i = document.createElement("p");
|
|
4063
|
-
i.className = "wgt:ml-3 wgt:text-text-sub-600", i.innerText =
|
|
4064
|
-
})), x.illustrationSrc != null && (
|
|
4075
|
+
i.className = "wgt:ml-3 wgt:text-text-sub-600", i.innerText = J, N.appendChild(U), N.appendChild(i), P.appendChild(N);
|
|
4076
|
+
})), x.illustrationSrc != null && (Y.src = x.illustrationSrc);
|
|
4065
4077
|
}
|
|
4066
4078
|
};
|
|
4067
4079
|
}
|
|
@@ -4170,22 +4182,22 @@ function JE({
|
|
|
4170
4182
|
P.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", P.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", T.appendChild(m), T.appendChild(P), X.appendChild(T);
|
|
4171
4183
|
const v = document.createElement("div");
|
|
4172
4184
|
v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4173
|
-
const
|
|
4174
|
-
|
|
4185
|
+
const Y = document.createElement("h4");
|
|
4186
|
+
Y.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", Y.innerText = c("digitalSignaturePackage");
|
|
4175
4187
|
const x = document.createElement("span");
|
|
4176
|
-
if (x.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", x.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(
|
|
4188
|
+
if (x.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", x.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(Y), v.appendChild(x), X.appendChild(v), Q && Q.length > 0) {
|
|
4177
4189
|
const M = document.createElement("div");
|
|
4178
4190
|
M.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
4179
4191
|
const j = document.createElement("h4");
|
|
4180
4192
|
j.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", j.innerText = c("promotion");
|
|
4181
4193
|
const G = document.createElement("div");
|
|
4182
4194
|
G.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((K) => {
|
|
4183
|
-
const
|
|
4184
|
-
|
|
4195
|
+
const V = document.createElement("div");
|
|
4196
|
+
V.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", V.innerText = K, G.appendChild(V);
|
|
4185
4197
|
}), M.appendChild(j), M.appendChild(G), X.appendChild(M);
|
|
4186
4198
|
}
|
|
4187
|
-
const
|
|
4188
|
-
X.appendChild(
|
|
4199
|
+
const J = document.createElement("hr");
|
|
4200
|
+
X.appendChild(J);
|
|
4189
4201
|
const q = document.createElement("div");
|
|
4190
4202
|
q.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
|
|
4191
4203
|
const N = document.createElement("h4");
|
|
@@ -4220,7 +4232,7 @@ function JE({
|
|
|
4220
4232
|
const M = Ng({
|
|
4221
4233
|
message: c("transactionCanceled"),
|
|
4222
4234
|
okLabel: c("ok"),
|
|
4223
|
-
onClose: () =>
|
|
4235
|
+
onClose: () => Z(null, null, function* () {
|
|
4224
4236
|
I = 3600, h && (clearInterval(h), h = null), typeof t == "function" && (yield t());
|
|
4225
4237
|
}),
|
|
4226
4238
|
preventClose: !0
|
|
@@ -4228,7 +4240,7 @@ function JE({
|
|
|
4228
4240
|
n.appendChild(M.container), M.open();
|
|
4229
4241
|
}
|
|
4230
4242
|
});
|
|
4231
|
-
return k.appendChild(b), n.appendChild(k), window.addEventListener("beforeunload", () =>
|
|
4243
|
+
return k.appendChild(b), n.appendChild(k), window.addEventListener("beforeunload", () => Z(null, null, function* () {
|
|
4232
4244
|
h && (clearInterval(h), h = null);
|
|
4233
4245
|
})), {
|
|
4234
4246
|
container: n,
|
|
@@ -4246,14 +4258,14 @@ function JE({
|
|
|
4246
4258
|
j && (j.innerText = M ? String((K = (G = M.code) != null ? G : M.limit) != null ? K : "") : "");
|
|
4247
4259
|
},
|
|
4248
4260
|
setSelectedSignaturePackage(M) {
|
|
4249
|
-
var K,
|
|
4261
|
+
var K, V, QA;
|
|
4250
4262
|
E = M;
|
|
4251
4263
|
const j = n.querySelectorAll(
|
|
4252
4264
|
".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
|
|
4253
4265
|
), G = j == null ? void 0 : j[1];
|
|
4254
4266
|
if (G) {
|
|
4255
|
-
const
|
|
4256
|
-
G.innerText =
|
|
4267
|
+
const uA = M ? String((QA = (V = M.code) != null ? V : (K = M.name) == null ? void 0 : K.split("-")[1]) != null ? QA : "") : "";
|
|
4268
|
+
G.innerText = uA;
|
|
4257
4269
|
}
|
|
4258
4270
|
},
|
|
4259
4271
|
setTotalAmountText(M) {
|
|
@@ -4319,17 +4331,17 @@ function XE({
|
|
|
4319
4331
|
P.className = "wgt:flex wgt:items-start";
|
|
4320
4332
|
const v = document.createElement("div");
|
|
4321
4333
|
v.className = "wgt:flex-shrink-0 wgt:mt-0.5";
|
|
4322
|
-
const
|
|
4323
|
-
|
|
4334
|
+
const Y = document.createElement("div");
|
|
4335
|
+
Y.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
|
|
4324
4336
|
const x = document.createElement("span");
|
|
4325
|
-
x.className = "wgt:text-white wgt:text-sm wgt:font-semibold", x.innerText = String(m + 1),
|
|
4326
|
-
const
|
|
4327
|
-
|
|
4337
|
+
x.className = "wgt:text-white wgt:text-sm wgt:font-semibold", x.innerText = String(m + 1), Y.appendChild(x), v.appendChild(Y);
|
|
4338
|
+
const J = document.createElement("p");
|
|
4339
|
+
J.className = "wgt:ml-3 wgt:text-text-sub-600", J.innerText = T, P.appendChild(v), P.appendChild(J), r.appendChild(P);
|
|
4328
4340
|
}), k.appendChild(r), f.appendChild(k);
|
|
4329
4341
|
const D = document.createElement("button");
|
|
4330
4342
|
D.className = `wgt:w-full wgt:py-3 wgt:px-6 wgt:rounded-lg wgt:font-semibold wgt:text-white wgt:transition-all wgt:duration-200 ${B === "ocb" ? "wgt:bg-[#0066cc] hover:wgt:bg-[#0052a3]" : "wgt:bg-primary hover:wgt:bg-primary-dark"} wgt:disabled:opacity-50 wgt:disabled:cursor-not-allowed`, D.innerText = c("confirmFreeOrder") || "Xác nhận đơn hàng";
|
|
4331
4343
|
let R = !1;
|
|
4332
|
-
return D.onclick = () =>
|
|
4344
|
+
return D.onclick = () => Z(null, null, function* () {
|
|
4333
4345
|
if (R) return;
|
|
4334
4346
|
R = !0;
|
|
4335
4347
|
const T = D.innerText;
|
|
@@ -5537,11 +5549,11 @@ function _E() {
|
|
|
5537
5549
|
for (let T = 0; T < X.length; T++) {
|
|
5538
5550
|
const m = X[T], P = [];
|
|
5539
5551
|
for (let v = 0; v < m.length; v++) {
|
|
5540
|
-
const
|
|
5541
|
-
P.push(x), r[x] = { node:
|
|
5542
|
-
for (let
|
|
5543
|
-
const q = R[
|
|
5544
|
-
r[q] && r[q].node.mode ===
|
|
5552
|
+
const Y = m[v], x = "" + T + v;
|
|
5553
|
+
P.push(x), r[x] = { node: Y, lastCount: 0 }, D[x] = {};
|
|
5554
|
+
for (let J = 0; J < R.length; J++) {
|
|
5555
|
+
const q = R[J];
|
|
5556
|
+
r[q] && r[q].node.mode === Y.mode ? (D[q][x] = a(r[q].lastCount + Y.length, Y.mode) - a(r[q].lastCount, Y.mode), r[q].lastCount += Y.length) : (r[q] && (r[q].lastCount = Y.length), D[q][x] = a(Y.length, Y.mode) + 4 + A.getCharCountIndicator(Y.mode, d));
|
|
5545
5557
|
}
|
|
5546
5558
|
}
|
|
5547
5559
|
R = P;
|
|
@@ -5590,12 +5602,12 @@ function $E() {
|
|
|
5590
5602
|
const g = rg(), A = TB(), E = OE(), C = GE(), B = LE(), Q = zE(), t = NE(), n = BQ(), I = yE(), h = KE(), e = UE(), u = mg(), a = _E();
|
|
5591
5603
|
function o(T, m) {
|
|
5592
5604
|
const P = T.size, v = Q.getPositions(m);
|
|
5593
|
-
for (let
|
|
5594
|
-
const x = v[
|
|
5605
|
+
for (let Y = 0; Y < v.length; Y++) {
|
|
5606
|
+
const x = v[Y][0], J = v[Y][1];
|
|
5595
5607
|
for (let q = -1; q <= 7; q++)
|
|
5596
5608
|
if (!(x + q <= -1 || P <= x + q))
|
|
5597
5609
|
for (let N = -1; N <= 7; N++)
|
|
5598
|
-
|
|
5610
|
+
J + N <= -1 || P <= J + N || (q >= 0 && q <= 6 && (N === 0 || N === 6) || N >= 0 && N <= 6 && (q === 0 || q === 6) || q >= 2 && q <= 4 && N >= 2 && N <= 4 ? T.set(x + q, J + N, !0, !0) : T.set(x + q, J + N, !1, !0));
|
|
5599
5611
|
}
|
|
5600
5612
|
}
|
|
5601
5613
|
function s(T) {
|
|
@@ -5608,37 +5620,37 @@ function $E() {
|
|
|
5608
5620
|
function f(T, m) {
|
|
5609
5621
|
const P = B.getPositions(m);
|
|
5610
5622
|
for (let v = 0; v < P.length; v++) {
|
|
5611
|
-
const
|
|
5612
|
-
for (let
|
|
5623
|
+
const Y = P[v][0], x = P[v][1];
|
|
5624
|
+
for (let J = -2; J <= 2; J++)
|
|
5613
5625
|
for (let q = -2; q <= 2; q++)
|
|
5614
|
-
|
|
5626
|
+
J === -2 || J === 2 || q === -2 || q === 2 || J === 0 && q === 0 ? T.set(Y + J, x + q, !0, !0) : T.set(Y + J, x + q, !1, !0);
|
|
5615
5627
|
}
|
|
5616
5628
|
}
|
|
5617
5629
|
function k(T, m) {
|
|
5618
5630
|
const P = T.size, v = h.getEncodedBits(m);
|
|
5619
|
-
let
|
|
5631
|
+
let Y, x, J;
|
|
5620
5632
|
for (let q = 0; q < 18; q++)
|
|
5621
|
-
|
|
5633
|
+
Y = Math.floor(q / 3), x = q % 3 + P - 8 - 3, J = (v >> q & 1) === 1, T.set(Y, x, J, !0), T.set(x, Y, J, !0);
|
|
5622
5634
|
}
|
|
5623
5635
|
function X(T, m, P) {
|
|
5624
|
-
const v = T.size,
|
|
5625
|
-
let x,
|
|
5636
|
+
const v = T.size, Y = e.getEncodedBits(m, P);
|
|
5637
|
+
let x, J;
|
|
5626
5638
|
for (x = 0; x < 15; x++)
|
|
5627
|
-
|
|
5639
|
+
J = (Y >> x & 1) === 1, x < 6 ? T.set(x, 8, J, !0) : x < 8 ? T.set(x + 1, 8, J, !0) : T.set(v - 15 + x, 8, J, !0), x < 8 ? T.set(8, v - x - 1, J, !0) : x < 9 ? T.set(8, 15 - x - 1 + 1, J, !0) : T.set(8, 15 - x - 1, J, !0);
|
|
5628
5640
|
T.set(v - 8, 8, 1, !0);
|
|
5629
5641
|
}
|
|
5630
5642
|
function d(T, m) {
|
|
5631
5643
|
const P = T.size;
|
|
5632
|
-
let v = -1,
|
|
5644
|
+
let v = -1, Y = P - 1, x = 7, J = 0;
|
|
5633
5645
|
for (let q = P - 1; q > 0; q -= 2)
|
|
5634
5646
|
for (q === 6 && q--; ; ) {
|
|
5635
5647
|
for (let N = 0; N < 2; N++)
|
|
5636
|
-
if (!T.isReserved(
|
|
5648
|
+
if (!T.isReserved(Y, q - N)) {
|
|
5637
5649
|
let U = !1;
|
|
5638
|
-
|
|
5650
|
+
J < m.length && (U = (m[J] >>> x & 1) === 1), T.set(Y, q - N, U), x--, x === -1 && (J++, x = 7);
|
|
5639
5651
|
}
|
|
5640
|
-
if (
|
|
5641
|
-
|
|
5652
|
+
if (Y += v, Y < 0 || P <= Y) {
|
|
5653
|
+
Y -= v, v = -v;
|
|
5642
5654
|
break;
|
|
5643
5655
|
}
|
|
5644
5656
|
}
|
|
@@ -5648,48 +5660,48 @@ function $E() {
|
|
|
5648
5660
|
P.forEach(function(N) {
|
|
5649
5661
|
v.put(N.mode.bit, 4), v.put(N.getLength(), u.getCharCountIndicator(N.mode, T)), N.write(v);
|
|
5650
5662
|
});
|
|
5651
|
-
const
|
|
5652
|
-
for (v.getLengthInBits() + 4 <=
|
|
5663
|
+
const Y = g.getSymbolTotalCodewords(T), x = n.getTotalCodewordsCount(T, m), J = (Y - x) * 8;
|
|
5664
|
+
for (v.getLengthInBits() + 4 <= J && v.put(0, 4); v.getLengthInBits() % 8 !== 0; )
|
|
5653
5665
|
v.putBit(0);
|
|
5654
|
-
const q = (
|
|
5666
|
+
const q = (J - v.getLengthInBits()) / 8;
|
|
5655
5667
|
for (let N = 0; N < q; N++)
|
|
5656
5668
|
v.put(N % 2 ? 17 : 236, 8);
|
|
5657
5669
|
return D(v, T, m);
|
|
5658
5670
|
}
|
|
5659
5671
|
function D(T, m, P) {
|
|
5660
|
-
const v = g.getSymbolTotalCodewords(m),
|
|
5672
|
+
const v = g.getSymbolTotalCodewords(m), Y = n.getTotalCodewordsCount(m, P), x = v - Y, J = n.getBlocksCount(m, P), q = v % J, N = J - q, U = Math.floor(v / J), y = Math.floor(x / J), p = y + 1, i = U - y, w = new I(i);
|
|
5661
5673
|
let H = 0;
|
|
5662
|
-
const l = new Array(
|
|
5674
|
+
const l = new Array(J), F = new Array(J);
|
|
5663
5675
|
let b = 0;
|
|
5664
5676
|
const M = new Uint8Array(T.buffer);
|
|
5665
|
-
for (let QA = 0; QA <
|
|
5666
|
-
const
|
|
5667
|
-
l[QA] = M.slice(H, H +
|
|
5677
|
+
for (let QA = 0; QA < J; QA++) {
|
|
5678
|
+
const uA = QA < N ? y : p;
|
|
5679
|
+
l[QA] = M.slice(H, H + uA), F[QA] = w.encode(l[QA]), H += uA, b = Math.max(b, uA);
|
|
5668
5680
|
}
|
|
5669
5681
|
const j = new Uint8Array(v);
|
|
5670
|
-
let G = 0, K,
|
|
5682
|
+
let G = 0, K, V;
|
|
5671
5683
|
for (K = 0; K < b; K++)
|
|
5672
|
-
for (
|
|
5673
|
-
K < l[
|
|
5684
|
+
for (V = 0; V < J; V++)
|
|
5685
|
+
K < l[V].length && (j[G++] = l[V][K]);
|
|
5674
5686
|
for (K = 0; K < i; K++)
|
|
5675
|
-
for (
|
|
5676
|
-
j[G++] = F[
|
|
5687
|
+
for (V = 0; V < J; V++)
|
|
5688
|
+
j[G++] = F[V][K];
|
|
5677
5689
|
return j;
|
|
5678
5690
|
}
|
|
5679
5691
|
function R(T, m, P, v) {
|
|
5680
|
-
let
|
|
5692
|
+
let Y;
|
|
5681
5693
|
if (Array.isArray(T))
|
|
5682
|
-
|
|
5694
|
+
Y = a.fromArray(T);
|
|
5683
5695
|
else if (typeof T == "string") {
|
|
5684
5696
|
let U = m;
|
|
5685
5697
|
if (!U) {
|
|
5686
5698
|
const y = a.rawSplit(T);
|
|
5687
5699
|
U = h.getBestVersionForData(y, P);
|
|
5688
5700
|
}
|
|
5689
|
-
|
|
5701
|
+
Y = a.fromString(T, U || 40);
|
|
5690
5702
|
} else
|
|
5691
5703
|
throw new Error("Invalid data");
|
|
5692
|
-
const x = h.getBestVersionForData(
|
|
5704
|
+
const x = h.getBestVersionForData(Y, P);
|
|
5693
5705
|
if (!x)
|
|
5694
5706
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
5695
5707
|
if (!m)
|
|
@@ -5701,8 +5713,8 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
5701
5713
|
Minimum version required to store current data is: ` + x + `.
|
|
5702
5714
|
`
|
|
5703
5715
|
);
|
|
5704
|
-
const
|
|
5705
|
-
return o(N, m), s(N), f(N, m), X(N, P, 0), m >= 7 && k(N, m), d(N,
|
|
5716
|
+
const J = r(m, P, Y), q = g.getSymbolSize(m), N = new C(q);
|
|
5717
|
+
return o(N, m), s(N), f(N, m), X(N, P, 0), m >= 7 && k(N, m), d(N, J), isNaN(v) && (v = t.getBestMask(
|
|
5706
5718
|
N,
|
|
5707
5719
|
X.bind(null, N, P)
|
|
5708
5720
|
)), t.applyMask(v, N), X(N, P, v), {
|
|
@@ -5710,14 +5722,14 @@ Minimum version required to store current data is: ` + x + `.
|
|
|
5710
5722
|
version: m,
|
|
5711
5723
|
errorCorrectionLevel: P,
|
|
5712
5724
|
maskPattern: v,
|
|
5713
|
-
segments:
|
|
5725
|
+
segments: Y
|
|
5714
5726
|
};
|
|
5715
5727
|
}
|
|
5716
5728
|
return _g.create = function(m, P) {
|
|
5717
5729
|
if (typeof m == "undefined" || m === "")
|
|
5718
5730
|
throw new Error("No input text");
|
|
5719
|
-
let v = A.M,
|
|
5720
|
-
return typeof P != "undefined" && (v = A.from(P.errorCorrectionLevel, A.M),
|
|
5731
|
+
let v = A.M, Y, x;
|
|
5732
|
+
return typeof P != "undefined" && (v = A.from(P.errorCorrectionLevel, A.M), Y = h.from(P.version), x = t.from(P.maskPattern), P.toSJISFunc && g.setToSJISFunction(P.toSJISFunc)), R(m, Y, v, x);
|
|
5721
5733
|
}, _g;
|
|
5722
5734
|
}
|
|
5723
5735
|
var sB = {}, DB = {}, NC;
|
|
@@ -5938,7 +5950,7 @@ function tI({
|
|
|
5938
5950
|
"mouseleave",
|
|
5939
5951
|
() => q.style.color = "#9ca3af"
|
|
5940
5952
|
), q.addEventListener("click", () => {
|
|
5941
|
-
E ||
|
|
5953
|
+
E || J();
|
|
5942
5954
|
}), n.appendChild(q);
|
|
5943
5955
|
}
|
|
5944
5956
|
const I = document.createElement("div");
|
|
@@ -6063,25 +6075,25 @@ function tI({
|
|
|
6063
6075
|
), D.addEventListener(
|
|
6064
6076
|
"focus",
|
|
6065
6077
|
() => D.style.outline = "none"
|
|
6066
|
-
), D.addEventListener("click", () =>
|
|
6078
|
+
), D.addEventListener("click", () => J()), n.appendChild(D);
|
|
6067
6079
|
let R = !1, T = !1;
|
|
6068
6080
|
const m = (q) => {
|
|
6069
|
-
q.target === t && !E &&
|
|
6081
|
+
q.target === t && !E && J();
|
|
6070
6082
|
}, P = (q) => {
|
|
6071
|
-
q.key === "Escape" && !E &&
|
|
6083
|
+
q.key === "Escape" && !E && J();
|
|
6072
6084
|
};
|
|
6073
6085
|
function v() {
|
|
6074
6086
|
t.addEventListener("click", m), window.addEventListener("keydown", P);
|
|
6075
6087
|
}
|
|
6076
|
-
function
|
|
6088
|
+
function Y() {
|
|
6077
6089
|
t.removeEventListener("click", m), window.removeEventListener("keydown", P);
|
|
6078
6090
|
}
|
|
6079
6091
|
function x() {
|
|
6080
6092
|
R || (R = !0, document.body.appendChild(t), t.style.display = "flex", setTimeout(() => D.focus(), 0), v());
|
|
6081
6093
|
}
|
|
6082
|
-
function
|
|
6094
|
+
function J() {
|
|
6083
6095
|
if (!(!R || T)) {
|
|
6084
|
-
T = !0, R = !1,
|
|
6096
|
+
T = !0, R = !1, Y();
|
|
6085
6097
|
try {
|
|
6086
6098
|
t.remove();
|
|
6087
6099
|
} catch (q) {
|
|
@@ -6089,11 +6101,11 @@ function tI({
|
|
|
6089
6101
|
typeof g == "function" && g();
|
|
6090
6102
|
}
|
|
6091
6103
|
}
|
|
6092
|
-
return { container: t, open: x, close:
|
|
6104
|
+
return { container: t, open: x, close: J };
|
|
6093
6105
|
}
|
|
6094
6106
|
const hI = 5;
|
|
6095
6107
|
function cI(n) {
|
|
6096
|
-
return
|
|
6108
|
+
return Z(this, arguments, function* ({
|
|
6097
6109
|
onNext: g,
|
|
6098
6110
|
onPrev: A,
|
|
6099
6111
|
step: E,
|
|
@@ -6116,12 +6128,12 @@ function cI(n) {
|
|
|
6116
6128
|
const R = document.createElement("div");
|
|
6117
6129
|
R.className = "wgt:flex-1 wgt:@max-2xl:w-full";
|
|
6118
6130
|
const T = c("paymentInstructions"), m = Array.isArray(T) ? T : [T];
|
|
6119
|
-
let P, v,
|
|
6131
|
+
let P, v, Y;
|
|
6120
6132
|
function x() {
|
|
6121
6133
|
if (R.innerHTML = "", s)
|
|
6122
|
-
|
|
6134
|
+
Y = XE({
|
|
6123
6135
|
orderId: u,
|
|
6124
|
-
onSuccess: () =>
|
|
6136
|
+
onSuccess: () => Z(null, null, function* () {
|
|
6125
6137
|
y();
|
|
6126
6138
|
}),
|
|
6127
6139
|
onError: (F) => {
|
|
@@ -6131,9 +6143,9 @@ function cI(n) {
|
|
|
6131
6143
|
},
|
|
6132
6144
|
illustrationSrc: (C == null ? void 0 : C.illustrationSrc) || "",
|
|
6133
6145
|
theme: t
|
|
6134
|
-
}), R.appendChild(
|
|
6146
|
+
}), R.appendChild(Y.container);
|
|
6135
6147
|
else {
|
|
6136
|
-
const F = kE(
|
|
6148
|
+
const F = kE(zA(lA({
|
|
6137
6149
|
qrSrc: "",
|
|
6138
6150
|
accountName: "",
|
|
6139
6151
|
accountNumber: "",
|
|
@@ -6146,13 +6158,13 @@ function cI(n) {
|
|
|
6146
6158
|
}
|
|
6147
6159
|
}
|
|
6148
6160
|
x(), D.appendChild(R);
|
|
6149
|
-
const { container:
|
|
6161
|
+
const { container: J, resetCountdown: q } = JE(zA(lA({}, B), {
|
|
6150
6162
|
selectedPromotions: (B == null ? void 0 : B.selectedPromotions) || [],
|
|
6151
6163
|
onResetToStep1: () => {
|
|
6152
6164
|
e && (clearInterval(e), e = null), B != null && B.onResetToStep1 && B.onResetToStep1();
|
|
6153
6165
|
}
|
|
6154
6166
|
}));
|
|
6155
|
-
D.appendChild(
|
|
6167
|
+
D.appendChild(J), k.appendChild(D);
|
|
6156
6168
|
const N = document.createElement("div");
|
|
6157
6169
|
N.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
|
|
6158
6170
|
const U = cg({
|
|
@@ -6173,14 +6185,14 @@ function cI(n) {
|
|
|
6173
6185
|
onClose: () => {
|
|
6174
6186
|
g();
|
|
6175
6187
|
},
|
|
6176
|
-
preventClose: !
|
|
6188
|
+
preventClose: !0
|
|
6177
6189
|
});
|
|
6178
6190
|
k.appendChild(F.container), F.open(), setTimeout(() => {
|
|
6179
6191
|
F.close && F.close(), g();
|
|
6180
6192
|
}, 2e3);
|
|
6181
6193
|
}
|
|
6182
6194
|
function p() {
|
|
6183
|
-
return
|
|
6195
|
+
return Z(this, null, function* () {
|
|
6184
6196
|
const { registrationData: F } = B, j = F.eInvoiceRegistration, { isUsedEInvoiceBefore: b } = j, M = pg(j, ["isUsedEInvoiceBefore"]);
|
|
6185
6197
|
try {
|
|
6186
6198
|
const G = yield gQ({
|
|
@@ -6195,8 +6207,8 @@ function cI(n) {
|
|
|
6195
6207
|
],
|
|
6196
6208
|
packages: F.packages,
|
|
6197
6209
|
promotionCodes: F.promotionCodes
|
|
6198
|
-
}), K = G.orderId,
|
|
6199
|
-
f =
|
|
6210
|
+
}), K = G.orderId, V = G.amount || 0;
|
|
6211
|
+
f = V, s = V === 0, K !== u && (u = K, Q(K), x(), s ? console.log("") : yield w(K), q());
|
|
6200
6212
|
} catch (G) {
|
|
6201
6213
|
console.error("Error creating order:", G), tg(c("errorCreatingOrder") || "Failed to create order");
|
|
6202
6214
|
return;
|
|
@@ -6206,13 +6218,13 @@ function cI(n) {
|
|
|
6206
6218
|
});
|
|
6207
6219
|
}
|
|
6208
6220
|
function i() {
|
|
6209
|
-
return
|
|
6221
|
+
return Z(this, null, function* () {
|
|
6210
6222
|
const F = (B == null ? void 0 : B.totalAmountText) || 0;
|
|
6211
6223
|
f = F, s = F === 0, x(), s ? r() : u && (yield w(u));
|
|
6212
6224
|
});
|
|
6213
6225
|
}
|
|
6214
6226
|
function w(F) {
|
|
6215
|
-
return
|
|
6227
|
+
return Z(this, null, function* () {
|
|
6216
6228
|
var b, M, j, G;
|
|
6217
6229
|
if (!a && !s) {
|
|
6218
6230
|
a = !0, d();
|
|
@@ -6276,7 +6288,7 @@ function cI(n) {
|
|
|
6276
6288
|
function H() {
|
|
6277
6289
|
}
|
|
6278
6290
|
function l() {
|
|
6279
|
-
s || (e && (clearInterval(e), e = null), e = setInterval(() =>
|
|
6291
|
+
s || (e && (clearInterval(e), e = null), e = setInterval(() => Z(null, null, function* () {
|
|
6280
6292
|
var F, b;
|
|
6281
6293
|
try {
|
|
6282
6294
|
const M = yield rE(u);
|
|
@@ -6307,21 +6319,21 @@ function cI(n) {
|
|
|
6307
6319
|
!navigator.onLine || !M.response ? tg(c("errorNetwork"), {
|
|
6308
6320
|
okLabel: c("tryAgain"),
|
|
6309
6321
|
onClose: function() {
|
|
6310
|
-
return
|
|
6322
|
+
return Z(this, null, function* () {
|
|
6311
6323
|
});
|
|
6312
6324
|
},
|
|
6313
6325
|
isOffline: !0
|
|
6314
6326
|
}) : ((F = M.response) == null ? void 0 : F.status) === 404 ? tg(c("errorOrderNotFound"), {
|
|
6315
6327
|
okLabel: c("tryAgain"),
|
|
6316
6328
|
onClose: function() {
|
|
6317
|
-
return
|
|
6329
|
+
return Z(this, null, function* () {
|
|
6318
6330
|
clearInterval(e), e = null, yield p();
|
|
6319
6331
|
});
|
|
6320
6332
|
}
|
|
6321
6333
|
}) : ((b = M.response) == null ? void 0 : b.status) === 410 ? tg(c("paymentTimeoutMessage"), {
|
|
6322
6334
|
okLabel: c("tryAgain"),
|
|
6323
6335
|
onClose: function() {
|
|
6324
|
-
return
|
|
6336
|
+
return Z(this, null, function* () {
|
|
6325
6337
|
clearInterval(e), e = null, yield p();
|
|
6326
6338
|
});
|
|
6327
6339
|
}
|
|
@@ -6429,12 +6441,12 @@ function eI({
|
|
|
6429
6441
|
</defs>
|
|
6430
6442
|
</svg>
|
|
6431
6443
|
`, P.appendChild(v), P.appendChild(document.createTextNode(c("website") + ": "));
|
|
6432
|
-
const
|
|
6433
|
-
|
|
6444
|
+
const Y = document.createElement("a");
|
|
6445
|
+
Y.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", Y.innerHTML = `<b>${(r == null ? void 0 : r.link) || ""}</b>`, Y.href = (r == null ? void 0 : r.link) || "#", Y.target = "_blank", P.appendChild(Y);
|
|
6434
6446
|
const x = document.createElement("div");
|
|
6435
6447
|
x.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(x);
|
|
6436
|
-
const
|
|
6437
|
-
|
|
6448
|
+
const J = document.createElement("div");
|
|
6449
|
+
J.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", J.innerText = "3", x.appendChild(J);
|
|
6438
6450
|
const q = document.createElement("p");
|
|
6439
6451
|
q.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", q.appendChild(document.createTextNode(c("notice3.1") + " "));
|
|
6440
6452
|
const N = document.createElement("a");
|
|
@@ -6523,7 +6535,7 @@ function fI() {
|
|
|
6523
6535
|
};
|
|
6524
6536
|
}
|
|
6525
6537
|
function UC(C) {
|
|
6526
|
-
return
|
|
6538
|
+
return Z(this, arguments, function* ({
|
|
6527
6539
|
orderId: g,
|
|
6528
6540
|
callbackUrl: A,
|
|
6529
6541
|
onCompleteSignature: E
|
|
@@ -6683,7 +6695,7 @@ function qI({
|
|
|
6683
6695
|
"mouseleave",
|
|
6684
6696
|
() => q.style.color = "#6b7280"
|
|
6685
6697
|
), q.addEventListener("click", () => {
|
|
6686
|
-
C ||
|
|
6698
|
+
C || J(!1);
|
|
6687
6699
|
}), o.appendChild(q);
|
|
6688
6700
|
}
|
|
6689
6701
|
const s = document.createElement("div");
|
|
@@ -6765,22 +6777,22 @@ function qI({
|
|
|
6765
6777
|
}), D.addEventListener("focus", () => D.style.outline = "none"), d.appendChild(D);
|
|
6766
6778
|
let R = !1, T = !1;
|
|
6767
6779
|
const m = (q) => {
|
|
6768
|
-
q.target === a && !C &&
|
|
6780
|
+
q.target === a && !C && J(!1);
|
|
6769
6781
|
}, P = (q) => {
|
|
6770
|
-
q.key === "Escape" && !C &&
|
|
6782
|
+
q.key === "Escape" && !C && J(!1);
|
|
6771
6783
|
};
|
|
6772
6784
|
function v() {
|
|
6773
|
-
a.addEventListener("click", m), window.addEventListener("keydown", P), r.addEventListener("click", () =>
|
|
6785
|
+
a.addEventListener("click", m), window.addEventListener("keydown", P), r.addEventListener("click", () => J(!0)), D.addEventListener("click", () => J(!1));
|
|
6774
6786
|
}
|
|
6775
|
-
function
|
|
6787
|
+
function Y() {
|
|
6776
6788
|
a.removeEventListener("click", m), window.removeEventListener("keydown", P);
|
|
6777
6789
|
}
|
|
6778
6790
|
function x() {
|
|
6779
6791
|
R || (R = !0, document.body.appendChild(a), a.style.display = "flex", setTimeout(() => r.focus(), 0), v());
|
|
6780
6792
|
}
|
|
6781
|
-
function
|
|
6793
|
+
function J(q = !1) {
|
|
6782
6794
|
if (!(!R || T)) {
|
|
6783
|
-
T = !0, R = !1,
|
|
6795
|
+
T = !0, R = !1, Y();
|
|
6784
6796
|
try {
|
|
6785
6797
|
a.remove();
|
|
6786
6798
|
} catch (N) {
|
|
@@ -6788,10 +6800,10 @@ function qI({
|
|
|
6788
6800
|
q ? B ? window.location.href = B : typeof g == "function" && g() : !q && typeof A == "function" && A();
|
|
6789
6801
|
}
|
|
6790
6802
|
}
|
|
6791
|
-
return { container: a, open: x, close:
|
|
6803
|
+
return { container: a, open: x, close: J };
|
|
6792
6804
|
}
|
|
6793
6805
|
function rB(g, A, E, C = !1, B = "ocb", Q = "") {
|
|
6794
|
-
return
|
|
6806
|
+
return Z(this, null, function* () {
|
|
6795
6807
|
var t, n;
|
|
6796
6808
|
try {
|
|
6797
6809
|
if (B !== "bvb") {
|
|
@@ -6812,7 +6824,7 @@ function rB(g, A, E, C = !1, B = "ocb", Q = "") {
|
|
|
6812
6824
|
// },
|
|
6813
6825
|
onCancel: () => {
|
|
6814
6826
|
},
|
|
6815
|
-
onConfirm: () =>
|
|
6827
|
+
onConfirm: () => Z(null, null, function* () {
|
|
6816
6828
|
const a = yield Lg(g, A);
|
|
6817
6829
|
E(!1, a);
|
|
6818
6830
|
}),
|
|
@@ -6828,7 +6840,7 @@ function rB(g, A, E, C = !1, B = "ocb", Q = "") {
|
|
|
6828
6840
|
});
|
|
6829
6841
|
}
|
|
6830
6842
|
function TI(g, A, E, C, B, Q) {
|
|
6831
|
-
return
|
|
6843
|
+
return Z(this, null, function* () {
|
|
6832
6844
|
var F, b;
|
|
6833
6845
|
const n = [
|
|
6834
6846
|
{ name: "M-Invoice", route: "m-invoice", logoUrl: vQ },
|
|
@@ -6885,12 +6897,12 @@ function TI(g, A, E, C, B, Q) {
|
|
|
6885
6897
|
idCardBack: null,
|
|
6886
6898
|
packages: [],
|
|
6887
6899
|
promotionCodes: []
|
|
6888
|
-
}, k = !0, X = null, d = null, r = null, D = null, R = null, T = 0, m = 0, P = null, v = null,
|
|
6900
|
+
}, k = !0, X = null, d = null, r = null, D = null, R = null, T = 0, m = 0, P = null, v = null, Y = null, x = {
|
|
6889
6901
|
qtyRegFee: 1,
|
|
6890
6902
|
qtyInvoicePkg: 1,
|
|
6891
6903
|
qtySignaturePkg: 1
|
|
6892
6904
|
};
|
|
6893
|
-
function
|
|
6905
|
+
function J() {
|
|
6894
6906
|
s = n[0], f = {
|
|
6895
6907
|
eInvoiceRegistration: {
|
|
6896
6908
|
taxAuthorityCode: "",
|
|
@@ -6929,7 +6941,7 @@ function TI(g, A, E, C, B, Q) {
|
|
|
6929
6941
|
idCardBack: null,
|
|
6930
6942
|
packages: [],
|
|
6931
6943
|
promotionCodes: []
|
|
6932
|
-
}, d = null, r = null, D = null, R = null, T = 0,
|
|
6944
|
+
}, d = null, r = null, D = null, R = null, T = 0, Y = null, x = {
|
|
6933
6945
|
qtyRegFee: 1,
|
|
6934
6946
|
qtyInvoicePkg: 1,
|
|
6935
6947
|
qtySignaturePkg: 1
|
|
@@ -6941,7 +6953,7 @@ function TI(g, A, E, C, B, Q) {
|
|
|
6941
6953
|
address: "",
|
|
6942
6954
|
taxCode: (C == null ? void 0 : C.taxCode) || "",
|
|
6943
6955
|
taxAuthority: ""
|
|
6944
|
-
}), f =
|
|
6956
|
+
}), f = zA(lA({}, f), {
|
|
6945
6957
|
eInvoiceRegistration: {
|
|
6946
6958
|
organization: {
|
|
6947
6959
|
name: (M == null ? void 0 : M.name) || "",
|
|
@@ -6979,7 +6991,7 @@ function TI(g, A, E, C, B, Q) {
|
|
|
6979
6991
|
});
|
|
6980
6992
|
}
|
|
6981
6993
|
function N() {
|
|
6982
|
-
|
|
6994
|
+
J(), o = 1, u(o, I()), p(o);
|
|
6983
6995
|
}
|
|
6984
6996
|
function U() {
|
|
6985
6997
|
typeof window != "undefined" && window.scrollTo({
|
|
@@ -6988,8 +7000,8 @@ function TI(g, A, E, C, B, Q) {
|
|
|
6988
7000
|
});
|
|
6989
7001
|
}
|
|
6990
7002
|
function y(M, j) {
|
|
6991
|
-
return
|
|
6992
|
-
M ? f =
|
|
7003
|
+
return Z(this, null, function* () {
|
|
7004
|
+
M ? f = zA(lA({}, f), {
|
|
6993
7005
|
eInvoiceRegistration: {
|
|
6994
7006
|
organization: lA({}, M.organization),
|
|
6995
7007
|
contactPerson: Q ? lA({}, M.contactPerson) : f.eInvoiceRegistration.contactPerson,
|
|
@@ -7002,7 +7014,7 @@ function TI(g, A, E, C, B, Q) {
|
|
|
7002
7014
|
});
|
|
7003
7015
|
}
|
|
7004
7016
|
function p(M) {
|
|
7005
|
-
return
|
|
7017
|
+
return Z(this, null, function* () {
|
|
7006
7018
|
if (M === 1) {
|
|
7007
7019
|
const { container: j } = yield wE({
|
|
7008
7020
|
isNewCustomer: X,
|
|
@@ -7010,13 +7022,13 @@ function TI(g, A, E, C, B, Q) {
|
|
|
7010
7022
|
providerProps: {
|
|
7011
7023
|
providers: n,
|
|
7012
7024
|
selectedRoute: s.route,
|
|
7013
|
-
onProviderChange: (G) =>
|
|
7014
|
-
var K,
|
|
7025
|
+
onProviderChange: (G) => Z(null, null, function* () {
|
|
7026
|
+
var K, V;
|
|
7015
7027
|
s = G, yield rB(
|
|
7016
7028
|
G.route,
|
|
7017
|
-
(
|
|
7018
|
-
(QA,
|
|
7019
|
-
X = QA, y(
|
|
7029
|
+
(V = (K = f == null ? void 0 : f.eInvoiceRegistration) == null ? void 0 : K.organization) == null ? void 0 : V.taxCode,
|
|
7030
|
+
(QA, uA) => {
|
|
7031
|
+
X = QA, y(uA);
|
|
7020
7032
|
},
|
|
7021
7033
|
Q,
|
|
7022
7034
|
B,
|
|
@@ -7057,16 +7069,16 @@ function TI(g, A, E, C, B, Q) {
|
|
|
7057
7069
|
setSelectedTaxAuthority: (G) => {
|
|
7058
7070
|
P = G;
|
|
7059
7071
|
},
|
|
7060
|
-
dobPicker:
|
|
7072
|
+
dobPicker: Y,
|
|
7061
7073
|
setDobPicker: (G) => {
|
|
7062
|
-
|
|
7074
|
+
Y = G;
|
|
7063
7075
|
}
|
|
7064
7076
|
}
|
|
7065
7077
|
});
|
|
7066
7078
|
a(j);
|
|
7067
7079
|
} else if (M === 2) {
|
|
7068
7080
|
const { container: j } = yield xE({
|
|
7069
|
-
onNext: () =>
|
|
7081
|
+
onNext: () => Z(null, null, function* () {
|
|
7070
7082
|
o = 3, u(o, I()), p(o), U();
|
|
7071
7083
|
}),
|
|
7072
7084
|
onPrev: () => {
|
|
@@ -7173,7 +7185,7 @@ function TI(g, A, E, C, B, Q) {
|
|
|
7173
7185
|
k && (a(i), w()), yield rB(
|
|
7174
7186
|
s.route,
|
|
7175
7187
|
(b = (F = f == null ? void 0 : f.eInvoiceRegistration) == null ? void 0 : F.organization) == null ? void 0 : b.taxCode,
|
|
7176
|
-
(M, j) =>
|
|
7188
|
+
(M, j) => Z(null, null, function* () {
|
|
7177
7189
|
k = !1, X = M, y(j), h.updateTitle(
|
|
7178
7190
|
Q ? c("eInvoiceRenewal") : c("eInvoiceRegister")
|
|
7179
7191
|
);
|
|
@@ -7189,17 +7201,17 @@ function TI(g, A, E, C, B, Q) {
|
|
|
7189
7201
|
{ includeHash: !1 }
|
|
7190
7202
|
);
|
|
7191
7203
|
function l() {
|
|
7192
|
-
|
|
7204
|
+
Y && typeof Y.destroy == "function" && Y.destroy(), H(), g && g.parentNode && (g.innerHTML = "");
|
|
7193
7205
|
}
|
|
7194
7206
|
});
|
|
7195
7207
|
}
|
|
7196
7208
|
function dI(g, A, E, C) {
|
|
7197
|
-
return
|
|
7209
|
+
return Z(this, null, function* () {
|
|
7198
7210
|
const { container: B, setContent: Q } = fI(), t = E == null ? void 0 : E.orderId, n = (E == null ? void 0 : E.callbackUrl) || `${window.location.origin}/dashboard`, { container: I } = yield UC({
|
|
7199
7211
|
orderId: t,
|
|
7200
7212
|
callbackUrl: n,
|
|
7201
7213
|
// onCompleteSignature,
|
|
7202
|
-
onCompleteSignature: (...a) =>
|
|
7214
|
+
onCompleteSignature: (...a) => Z(null, null, function* () {
|
|
7203
7215
|
C && (yield C(...a)), u();
|
|
7204
7216
|
})
|
|
7205
7217
|
});
|