@invoice-sdk/widget 1.96.2 → 1.96.3
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.
|
@@ -35,7 +35,7 @@ var W = (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 o, g as mB, a as cQ, b as wQ, C as eQ, G as aQ, c as oQ, d as rB, e as og, f as DQ, h as uQ, i as zg, O as SC, s as ag, j as PB, k as iQ, l as sQ, m as fQ, n as mQ, o as rQ, p as PQ, v as qQ } from "./index-
|
|
38
|
+
import { t as o, g as mB, a as cQ, b as wQ, C as eQ, G as aQ, c as oQ, d as rB, e as og, f as DQ, h as uQ, i as zg, O as SC, s as ag, j as PB, k as iQ, l as sQ, m as fQ, n as mQ, o as rQ, p as PQ, v as qQ } from "./index-CJtyYPyh.js";
|
|
39
39
|
import { g as pC } from "./_commonjsHelpers-bAxELxBV.js";
|
|
40
40
|
function tC({ steps: g = [], currentStep: A = 1 } = {}) {
|
|
41
41
|
const E = document.createElement("div");
|
|
@@ -1980,7 +1980,7 @@ function cE(D) {
|
|
|
1980
1980
|
updateRegistrationData: w,
|
|
1981
1981
|
serial: f
|
|
1982
1982
|
}) {
|
|
1983
|
-
var MA,
|
|
1983
|
+
var MA, aA, cA, wA, eA, rA, sA, TA, SA, Mg, MB, TB, lB, HB, xB, dB, 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;
|
|
1984
1984
|
const a = document.createElement("div");
|
|
1985
1985
|
a.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
|
|
1986
1986
|
const i = document.createElement("form");
|
|
@@ -1997,7 +1997,7 @@ function cE(D) {
|
|
|
1997
1997
|
required: !0,
|
|
1998
1998
|
placeholder: "",
|
|
1999
1999
|
type: "text",
|
|
2000
|
-
value: ((
|
|
2000
|
+
value: ((aA = (MA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : MA.organization) == null ? void 0 : aA.taxCode) || "",
|
|
2001
2001
|
readOnly: !1,
|
|
2002
2002
|
error: null,
|
|
2003
2003
|
note: o(
|
|
@@ -2044,7 +2044,7 @@ function cE(D) {
|
|
|
2044
2044
|
error: null,
|
|
2045
2045
|
placeholder: "",
|
|
2046
2046
|
type: "text",
|
|
2047
|
-
value: ((rA = (
|
|
2047
|
+
value: ((rA = (eA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : eA.organization) == null ? void 0 : rA.address) || "",
|
|
2048
2048
|
readOnly: !1,
|
|
2049
2049
|
horizontal: !0
|
|
2050
2050
|
});
|
|
@@ -2604,8 +2604,8 @@ function cE(D) {
|
|
|
2604
2604
|
), gA.appendChild(V);
|
|
2605
2605
|
const p = document.createElement("div");
|
|
2606
2606
|
p.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", p.appendChild(h.container);
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2607
|
+
const oA = document.createElement("div");
|
|
2608
|
+
oA.className = "wgt:flex wgt:items-center wgt:space-x-2 wgt:mt-4";
|
|
2609
2609
|
let iA = !0;
|
|
2610
2610
|
const qA = document.createElement("div");
|
|
2611
2611
|
qA.className = [
|
|
@@ -2641,7 +2641,7 @@ function cE(D) {
|
|
|
2641
2641
|
}, Rg = lQ(E);
|
|
2642
2642
|
Eg.appendChild(
|
|
2643
2643
|
kg(o("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
|
|
2644
|
-
), Eg.appendChild(document.createTextNode(` ${o("of", "của")} ${Rg}.`)),
|
|
2644
|
+
), Eg.appendChild(document.createTextNode(` ${o("of", "của")} ${Rg}.`)), oA.appendChild(qA), oA.appendChild(Eg), i.appendChild(oA), qA.addEventListener("click", () => {
|
|
2645
2645
|
iA = !iA, iA ? (qA.classList.add("wgt:bg-primary"), Ag.classList.remove("wgt:hidden")) : (qA.classList.remove("wgt:bg-primary"), Ag.classList.add("wgt:hidden")), Y();
|
|
2646
2646
|
});
|
|
2647
2647
|
const qg = document.createElement("div");
|
|
@@ -2908,7 +2908,7 @@ function aC({
|
|
|
2908
2908
|
}
|
|
2909
2909
|
};
|
|
2910
2910
|
}
|
|
2911
|
-
const oE = "1.96.
|
|
2911
|
+
const oE = "1.96.3";
|
|
2912
2912
|
function DE(E) {
|
|
2913
2913
|
return W(this, arguments, function* ({ search: g, bank: A }) {
|
|
2914
2914
|
return (yield LA.get(`${zg}`, {
|
|
@@ -3365,8 +3365,8 @@ function lE(q) {
|
|
|
3365
3365
|
}), K && V.push({
|
|
3366
3366
|
code: K.code,
|
|
3367
3367
|
quantity: K.quantity
|
|
3368
|
-
}), _.length > 0 && _.forEach((
|
|
3369
|
-
const iA = x[
|
|
3368
|
+
}), _.length > 0 && _.forEach((oA) => {
|
|
3369
|
+
const iA = x[oA];
|
|
3370
3370
|
iA.reward.packageCodes.length > 0 && iA.reward.packageCodes.forEach((qA) => {
|
|
3371
3371
|
V.push({
|
|
3372
3372
|
code: qA,
|
|
@@ -3375,7 +3375,7 @@ function lE(q) {
|
|
|
3375
3375
|
});
|
|
3376
3376
|
}), u(V), R(_);
|
|
3377
3377
|
try {
|
|
3378
|
-
const
|
|
3378
|
+
const oA = yield AQ({
|
|
3379
3379
|
eInvoiceRegistration: PA({}, gA),
|
|
3380
3380
|
bank: a.bank,
|
|
3381
3381
|
provider: f.route,
|
|
@@ -3389,9 +3389,9 @@ function lE(q) {
|
|
|
3389
3389
|
promotionCodes: _,
|
|
3390
3390
|
isRenew: !l
|
|
3391
3391
|
});
|
|
3392
|
-
I(
|
|
3393
|
-
} catch (
|
|
3394
|
-
console.error("Error creating order:",
|
|
3392
|
+
I(oA.orderId), g();
|
|
3393
|
+
} catch (oA) {
|
|
3394
|
+
console.error("Error creating order:", oA), ag(o("errorCreatingOrder") || "Failed to create order"), N();
|
|
3395
3395
|
return;
|
|
3396
3396
|
}
|
|
3397
3397
|
}), _A = ng({
|
|
@@ -3468,7 +3468,7 @@ function lE(q) {
|
|
|
3468
3468
|
const V = l ? QA.value : QA.value.filter((p) => p.renewPrice !== 0);
|
|
3469
3469
|
if (AA(V || []), QA.value.length > 0) {
|
|
3470
3470
|
const p = QA.value.find(
|
|
3471
|
-
(
|
|
3471
|
+
(oA) => G.includes(oA.code)
|
|
3472
3472
|
);
|
|
3473
3473
|
M = C ? C._id : p ? p._id : V == null ? void 0 : V[0]._id, nA(V);
|
|
3474
3474
|
}
|
|
@@ -3518,14 +3518,14 @@ function lE(q) {
|
|
|
3518
3518
|
(p) => p.bank === w && p.appliedPackages.includes(CA)
|
|
3519
3519
|
), V = gA && !gA.isDisabled && !(gA.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && gA.limit !== gA.used;
|
|
3520
3520
|
if (QA && !V) {
|
|
3521
|
-
const { container: p, open:
|
|
3521
|
+
const { container: p, open: oA } = PB({
|
|
3522
3522
|
message: o("errorDiscountPackage"),
|
|
3523
3523
|
okLabel: o("ok"),
|
|
3524
3524
|
cancelLabel: o("cancel"),
|
|
3525
3525
|
onClose: Z,
|
|
3526
3526
|
isSuccess: !1
|
|
3527
3527
|
});
|
|
3528
|
-
h.appendChild(p),
|
|
3528
|
+
h.appendChild(p), oA();
|
|
3529
3529
|
} else
|
|
3530
3530
|
Z();
|
|
3531
3531
|
}
|
|
@@ -3647,20 +3647,20 @@ function lE(q) {
|
|
|
3647
3647
|
const Z = document.createElement("div");
|
|
3648
3648
|
Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
|
|
3649
3649
|
const _ = document.createElement("div");
|
|
3650
|
-
_.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", Z.appendChild(_), s && s.length > 0 && s.filter((
|
|
3650
|
+
_.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", Z.appendChild(_), s && s.length > 0 && s.filter((oA) => {
|
|
3651
3651
|
const iA = Object.values(x).find(
|
|
3652
|
-
(qA) => qA.code ===
|
|
3652
|
+
(qA) => qA.code === oA
|
|
3653
3653
|
);
|
|
3654
3654
|
return iA && iA.bank === w;
|
|
3655
|
-
}).forEach((
|
|
3655
|
+
}).forEach((oA) => {
|
|
3656
3656
|
const iA = document.createElement("div");
|
|
3657
|
-
iA.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", iA.innerText =
|
|
3657
|
+
iA.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", iA.innerText = oA;
|
|
3658
3658
|
const qA = ng({
|
|
3659
3659
|
type: "button",
|
|
3660
3660
|
title: "x",
|
|
3661
3661
|
handleClick: () => {
|
|
3662
3662
|
s = s.filter(
|
|
3663
|
-
(wg) => wg !==
|
|
3663
|
+
(wg) => wg !== oA
|
|
3664
3664
|
), FA(), vA();
|
|
3665
3665
|
}
|
|
3666
3666
|
});
|
|
@@ -3686,7 +3686,7 @@ function lE(q) {
|
|
|
3686
3686
|
);
|
|
3687
3687
|
if (V.length > 0)
|
|
3688
3688
|
V.forEach((p) => {
|
|
3689
|
-
const { container:
|
|
3689
|
+
const { container: oA } = PE({
|
|
3690
3690
|
promotion: GA(PA({}, p), {
|
|
3691
3691
|
isSelected: s.includes(p.code)
|
|
3692
3692
|
}),
|
|
@@ -3695,7 +3695,7 @@ function lE(q) {
|
|
|
3695
3695
|
},
|
|
3696
3696
|
isDisabled: p.isDisabled || p.expiredAt < (/* @__PURE__ */ new Date()).toISOString() || p.limit === p.used
|
|
3697
3697
|
});
|
|
3698
|
-
gA.appendChild(
|
|
3698
|
+
gA.appendChild(oA);
|
|
3699
3699
|
});
|
|
3700
3700
|
else {
|
|
3701
3701
|
const p = document.createElement("span");
|
|
@@ -3725,18 +3725,18 @@ function lE(q) {
|
|
|
3725
3725
|
hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:hidden", hA.innerText = o("package"), Y.appendChild(hA);
|
|
3726
3726
|
const MA = document.createElement("td");
|
|
3727
3727
|
MA.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";
|
|
3728
|
-
const
|
|
3729
|
-
|
|
3728
|
+
const aA = document.createElement("div");
|
|
3729
|
+
aA.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";
|
|
3730
3730
|
const cA = document.createElement("button");
|
|
3731
3731
|
cA.type = "button", cA.ariaLabel = o("decrease"), cA.disabled = !0, cA.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", cA.innerText = "–", cA.addEventListener("click", () => {
|
|
3732
3732
|
X > 1 && (X -= 1, vA());
|
|
3733
|
-
}),
|
|
3733
|
+
}), aA.appendChild(cA);
|
|
3734
3734
|
const wA = document.createElement("span");
|
|
3735
|
-
wA.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", wA.innerText = X,
|
|
3736
|
-
const
|
|
3737
|
-
|
|
3735
|
+
wA.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", wA.innerText = X, aA.appendChild(wA);
|
|
3736
|
+
const eA = document.createElement("button");
|
|
3737
|
+
eA.type = "button", eA.ariaLabel = o("increase"), eA.disabled = !0, eA.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", eA.innerText = "+", eA.addEventListener("click", () => {
|
|
3738
3738
|
X += 1, vA();
|
|
3739
|
-
}),
|
|
3739
|
+
}), aA.appendChild(eA), MA.appendChild(aA), Y.appendChild(MA);
|
|
3740
3740
|
const rA = document.createElement("td");
|
|
3741
3741
|
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 = lA((qA = d[0]) == null ? void 0 : qA.price) + " VND", Y.appendChild(rA);
|
|
3742
3742
|
const sA = document.createElement("td");
|
|
@@ -3767,38 +3767,38 @@ function lE(q) {
|
|
|
3767
3767
|
BA.appendChild(hA);
|
|
3768
3768
|
const MA = document.createElement("td");
|
|
3769
3769
|
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 = o("package"), BA.appendChild(MA);
|
|
3770
|
-
const
|
|
3771
|
-
|
|
3770
|
+
const aA = document.createElement("td");
|
|
3771
|
+
aA.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";
|
|
3772
3772
|
const cA = document.createElement("div");
|
|
3773
3773
|
cA.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";
|
|
3774
3774
|
const wA = document.createElement("button");
|
|
3775
3775
|
wA.type = "button", wA.ariaLabel = o("decrease");
|
|
3776
|
-
const
|
|
3777
|
-
wA.disabled = U <= 1 ||
|
|
3776
|
+
const eA = l ? (Eg = Y == null ? void 0 : Y.price) != null ? Eg : 0 : (kg = Y == null ? void 0 : Y.renewPrice) != null ? kg : 0;
|
|
3777
|
+
wA.disabled = U <= 1 || eA === 0, wA.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", wA.innerText = "–", wA.addEventListener("click", () => {
|
|
3778
3778
|
U > 1 && (U -= 1, vA());
|
|
3779
3779
|
}), cA.appendChild(wA);
|
|
3780
3780
|
const rA = document.createElement("span");
|
|
3781
|
-
rA.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", rA.innerText = U, cA.appendChild(rA);
|
|
3781
|
+
rA.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", rA.innerText = eA === 0 ? 1 : U, cA.appendChild(rA);
|
|
3782
3782
|
const sA = document.createElement("button");
|
|
3783
3783
|
sA.type = "button", sA.ariaLabel = o("increase"), sA.disabled = (Y == null ? void 0 : Y.price) === 0, sA.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", sA.innerText = "+", sA.addEventListener("click", () => {
|
|
3784
|
-
U += 1, vA();
|
|
3785
|
-
}), cA.appendChild(sA),
|
|
3784
|
+
eA !== 0 && (U += 1, vA());
|
|
3785
|
+
}), cA.appendChild(sA), aA.appendChild(cA), BA.appendChild(aA);
|
|
3786
3786
|
const TA = document.createElement("td");
|
|
3787
|
-
TA.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", TA.innerText = lA(
|
|
3787
|
+
TA.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", TA.innerText = lA(eA * (Y == null ? void 0 : Y.limit)) + " VND", BA.appendChild(TA);
|
|
3788
3788
|
const SA = document.createElement("td");
|
|
3789
|
-
SA.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", SA.innerText = lA(
|
|
3789
|
+
SA.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", SA.innerText = lA(eA * (Y == null ? void 0 : Y.limit) * U) + " VND", BA.appendChild(SA);
|
|
3790
3790
|
const Mg = document.createElement("div");
|
|
3791
3791
|
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 = `
|
|
3792
3792
|
<div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
|
|
3793
3793
|
<span>${o("unitPrice")}:</span>
|
|
3794
3794
|
<span class="wgt:font-medium">${lA(
|
|
3795
|
-
|
|
3795
|
+
eA * (Y == null ? void 0 : Y.limit)
|
|
3796
3796
|
)} VND</span>
|
|
3797
3797
|
</div>
|
|
3798
3798
|
<div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
|
|
3799
3799
|
<span>${o("total")}:</span>
|
|
3800
3800
|
<span class="wgt:text-primary">${lA(
|
|
3801
|
-
|
|
3801
|
+
eA * (Y == null ? void 0 : Y.limit) * U
|
|
3802
3802
|
)} VND</span>
|
|
3803
3803
|
</div>
|
|
3804
3804
|
`, hA.appendChild(Mg), tA.appendChild(BA);
|
|
@@ -3814,20 +3814,20 @@ function lE(q) {
|
|
|
3814
3814
|
BA.appendChild(hA);
|
|
3815
3815
|
const MA = document.createElement("td");
|
|
3816
3816
|
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 = o("package"), BA.appendChild(MA);
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3817
|
+
const aA = document.createElement("td");
|
|
3818
|
+
aA.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";
|
|
3819
3819
|
const cA = document.createElement("div");
|
|
3820
3820
|
cA.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";
|
|
3821
3821
|
const wA = document.createElement("button");
|
|
3822
3822
|
wA.type = "button", wA.ariaLabel = o("decrease"), wA.disabled = j <= 1, wA.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" + (j <= 1 ? " wgt:cursor-not-allowed wgt:opacity-50" : ""), wA.innerText = "–", wA.addEventListener("click", () => {
|
|
3823
3823
|
j > 1 && (j -= 1, vA());
|
|
3824
3824
|
}), cA.appendChild(wA);
|
|
3825
|
-
const
|
|
3826
|
-
|
|
3825
|
+
const eA = document.createElement("span");
|
|
3826
|
+
eA.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", eA.innerText = j, cA.appendChild(eA);
|
|
3827
3827
|
const rA = document.createElement("button");
|
|
3828
3828
|
rA.type = "button", rA.ariaLabel = o("increase"), 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:@max-2xl:h-12 wgt:@max-2xl:w-12 wgt:@max-2xl:text-lg wgt:@max-2xl:font-bold", rA.innerText = "+", rA.addEventListener("click", () => {
|
|
3829
3829
|
j += 1, vA();
|
|
3830
|
-
}), cA.appendChild(rA),
|
|
3830
|
+
}), cA.appendChild(rA), aA.appendChild(cA), BA.appendChild(aA);
|
|
3831
3831
|
const sA = document.createElement("td");
|
|
3832
3832
|
sA.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", sA.innerText = lA((Y == null ? void 0 : Y.limit) * (Y == null ? void 0 : Y.price)), BA.appendChild(sA);
|
|
3833
3833
|
const TA = document.createElement("td");
|
|
@@ -3856,7 +3856,7 @@ function lE(q) {
|
|
|
3856
3856
|
).filter((Y) => Y !== void 0);
|
|
3857
3857
|
let Z = 0;
|
|
3858
3858
|
CA.length > 0 && CA.forEach((Y) => {
|
|
3859
|
-
var cA, wA,
|
|
3859
|
+
var cA, wA, eA, rA, sA, TA;
|
|
3860
3860
|
const BA = document.createElement("tr");
|
|
3861
3861
|
BA.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";
|
|
3862
3862
|
const hA = document.createElement("td");
|
|
@@ -3868,14 +3868,14 @@ function lE(q) {
|
|
|
3868
3868
|
`, BA.appendChild(hA);
|
|
3869
3869
|
const MA = document.createElement("td");
|
|
3870
3870
|
MA.className = "wgt:@max-2xl:hidden", BA.appendChild(MA);
|
|
3871
|
-
const
|
|
3872
|
-
|
|
3871
|
+
const aA = document.createElement("td");
|
|
3872
|
+
aA.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", Y.type === "discount" ? (aA.innerText = `-${lA(
|
|
3873
3873
|
(cA = Y == null ? void 0 : Y.reward) == null ? void 0 : cA.discountAmount
|
|
3874
|
-
)} VND`,
|
|
3874
|
+
)} VND`, aA.style.color = "#F04438", Z += (wA = Y == null ? void 0 : Y.reward) == null ? void 0 : wA.discountAmount) : (Y == null ? void 0 : Y.type) === "free_item" ? (aA.innerText = `+${(rA = (eA = Y == null ? void 0 : Y.reward) == null ? void 0 : eA.packageCodes) == null ? void 0 : rA.length} ${o(
|
|
3875
3875
|
"package"
|
|
3876
|
-
)} ${(TA = (sA = Y == null ? void 0 : Y.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`,
|
|
3876
|
+
)} ${(TA = (sA = Y == null ? void 0 : Y.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`, aA.style.color = "#12B76A") : aA.innerText = "", BA.appendChild(aA), tA.appendChild(BA);
|
|
3877
3877
|
});
|
|
3878
|
-
const _ = l && d.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = d[0]) == null ? void 0 : Rg.price) * X : 0, QA = uA(M), gA = QA ? l ? (qg = QA.price) != null ? qg : 0 : (vg = QA.renewPrice) != null ? vg : 0 : 0, V = QA ? gA * QA.limit * U : 0, p = e(m),
|
|
3878
|
+
const _ = l && d.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = d[0]) == null ? void 0 : Rg.price) * X : 0, QA = uA(M), gA = QA ? l ? (qg = QA.price) != null ? qg : 0 : (vg = QA.renewPrice) != null ? vg : 0 : 0, V = QA ? gA * QA.limit * U : 0, p = e(m), oA = p ? p.price * p.limit * j : 0, iA = _ + V + oA - Z;
|
|
3879
3879
|
c(iA);
|
|
3880
3880
|
{
|
|
3881
3881
|
const Y = document.createElement("tr");
|