@invoice-sdk/widget 1.105.7 → 1.105.9

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 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 e, g as TB, a as wQ, b as oQ, C as aQ, G as iQ, c as sQ, d as dB, e as ig, f as uQ, h as DQ, i as Sg, O as fQ, j as rQ, s as tg, k as Kg, l as mQ, m as PQ, n as qQ, o as vQ, p as MQ, q as lQ, v as TQ } from "./index-BQxcSCh1.js";
38
+ import { t as e, g as TB, a as wQ, b as oQ, C as aQ, G as iQ, c as sQ, d as dB, e as ig, f as uQ, h as DQ, i as Sg, O as fQ, j as rQ, s as tg, k as Kg, l as mQ, m as PQ, n as qQ, o as vQ, p as MQ, q as lQ, v as TQ } from "./index-B5L0a7AO.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");
@@ -552,7 +552,7 @@ function _g({
552
552
  };
553
553
  }
554
554
  }
555
- function ug({
555
+ function xg({
556
556
  title: g,
557
557
  isDisabled: A = !1,
558
558
  handleClick: E = null,
@@ -625,9 +625,9 @@ function eC({
625
625
  function u(r) {
626
626
  o = r, r ? (i.innerText = r, i.style.display = "block") : (i.innerText = "", i.style.display = "none");
627
627
  }
628
- const f = ug({
628
+ const f = xg({
629
629
  title: e("uploadFile"),
630
- className: "wgt:bg-primary wgt:hover:bg-primary-dark wgt:text-text-primary wgt:px-6 wgt:py-1 wgt:rounded-md wgt:cursor-pointer wgt:hover:text-primary-hover-text",
630
+ className: "wgt:bg-primary wgt:hover:bg-primary-dark wgt:text-text-color wgt:px-6 wgt:py-1 wgt:rounded-md wgt:cursor-pointer wgt:hover:text-primary-hover-text",
631
631
  handleClick: (r) => {
632
632
  r.stopPropagation(), c.click();
633
633
  }
@@ -1456,7 +1456,7 @@ function GQ() {
1456
1456
  OA -= 7;
1457
1457
  LA += 7 - OA;
1458
1458
  for (var jA = !1, uA = 0, yA = 0; uA < LA; uA++) {
1459
- var qA = new Date(a, w, 1 + (uA - l)), Bg = u(this._d) ? r(qA, this._d) : !1, lA = r(qA, X), pA = v.events.indexOf(qA.toDateString()) !== -1, KA = uA < l || uA >= j + l, dA = 1 + (uA - l), JA = w, XA = a, $A = v.startRange && r(v.startRange, qA), eg = v.endRange && r(v.endRange, qA), rg = v.startRange && v.endRange && v.startRange < qA && qA < v.endRange, mg = v.minDate && qA < v.minDate || v.maxDate && qA > v.maxDate || v.disableWeekends && f(qA) || v.disableDayFn && v.disableDayFn(qA);
1459
+ var qA = new Date(a, w, 1 + (uA - l)), Bg = u(this._d) ? r(qA, this._d) : !1, lA = r(qA, X), pA = v.events.indexOf(qA.toDateString()) !== -1, KA = uA < l || uA >= j + l, dA = 1 + (uA - l), JA = w, XA = a, $A = v.startRange && r(v.startRange, qA), eg = v.endRange && r(v.endRange, qA), fg = v.startRange && v.endRange && v.startRange < qA && qA < v.endRange, rg = v.minDate && qA < v.minDate || v.maxDate && qA > v.maxDate || v.disableWeekends && f(qA) || v.disableDayFn && v.disableDayFn(qA);
1460
1460
  KA && (uA < l ? (dA = SA + dA, JA = y, XA = $) : (dA = dA - j, JA = CA, XA = iA));
1461
1461
  var Cg = {
1462
1462
  day: dA,
@@ -1465,11 +1465,11 @@ function GQ() {
1465
1465
  hasEvent: pA,
1466
1466
  isSelected: Bg,
1467
1467
  isToday: lA,
1468
- isDisabled: mg,
1468
+ isDisabled: rg,
1469
1469
  isEmpty: KA,
1470
1470
  isStartRange: $A,
1471
1471
  isEndRange: eg,
1472
- isInRange: rg,
1472
+ isInRange: fg,
1473
1473
  showDaysInNextAndPreviousMonths: v.showDaysInNextAndPreviousMonths,
1474
1474
  enableSelectionDaysInNextAndPreviousMonths: v.enableSelectionDaysInNextAndPreviousMonths
1475
1475
  };
@@ -1989,7 +1989,7 @@ function eE(o) {
1989
1989
  serial: s,
1990
1990
  isRenewal: i = !1
1991
1991
  }) {
1992
- var HA, sA, wA, oA, aA, vA, fA, kA, VA, Tg, kB, RB, YB, JB, XB, FB, OB, GB, LB, NB, zB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B, AC, gC, BC, CC, QC, EC, IC;
1992
+ var HA, sA, wA, oA, aA, vA, fA, kA, VA, lg, kB, RB, YB, JB, XB, FB, OB, GB, LB, NB, zB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B, AC, gC, BC, CC, QC, EC, IC;
1993
1993
  let u = null;
1994
1994
  function f() {
1995
1995
  if (u || A._userHasEditedTaxCode || I !== !1 || i)
@@ -2024,7 +2024,7 @@ function eE(o) {
2024
2024
  F.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", (N) => {
2027
- if (N.preventDefault(), !lg()) return;
2027
+ if (N.preventDefault(), !Mg()) return;
2028
2028
  const G = BA();
2029
2029
  typeof g == "function" && g(G);
2030
2030
  }), F.appendChild(r);
@@ -2118,7 +2118,7 @@ function eE(o) {
2118
2118
  error: null,
2119
2119
  placeholder: "",
2120
2120
  type: "text",
2121
- value: ((Tg = (VA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : VA.legalRepresentative) == null ? void 0 : Tg.name) || "",
2121
+ value: ((lg = (VA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : VA.legalRepresentative) == null ? void 0 : lg.name) || "",
2122
2122
  onInput: (N) => {
2123
2123
  const G = N.target.value;
2124
2124
  if (G.trim() === "") {
@@ -2490,7 +2490,7 @@ function eE(o) {
2490
2490
  ) : JA ? XA.innerText = e(
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
- ) : XA.innerText = "", mg.appendChild(XA);
2493
+ ) : XA.innerText = "", rg.appendChild(XA);
2494
2494
  }
2495
2495
  function eg(N) {
2496
2496
  return new Promise((G) => {
@@ -2503,9 +2503,9 @@ function eE(o) {
2503
2503
  const ag = cA.slice(0, 2), Vg = cA.slice(2, 4), tQ = cA.slice(4, 8);
2504
2504
  return `${ag}/${Vg}/${tQ}`;
2505
2505
  }
2506
- const [mA, NA, og] = cA.split("/"), dg = new Date(+og, +NA - 1, +mA);
2507
- if (isNaN(dg)) return "";
2508
- const Zg = String(dg.getDate()).padStart(2, "0"), Rg = String(dg.getMonth() + 1).padStart(2, "0"), Gg = dg.getFullYear();
2506
+ const [mA, NA, og] = cA.split("/"), Tg = new Date(+og, +NA - 1, +mA);
2507
+ if (isNaN(Tg)) return "";
2508
+ const Zg = String(Tg.getDate()).padStart(2, "0"), Rg = String(Tg.getMonth() + 1).padStart(2, "0"), Gg = Tg.getFullYear();
2509
2509
  return `${Zg}/${Rg}/${Gg}`;
2510
2510
  }, rA = new Image();
2511
2511
  rA.src = URL.createObjectURL(N), rA.onload = () => V(null, null, function* () {
@@ -2514,13 +2514,13 @@ function eE(o) {
2514
2514
  if (cA || G({ success: !1, reason: "No data detected" }), cA) {
2515
2515
  dA = !1, JA = !0, $A();
2516
2516
  const NA = Object.values(cA).every((ag) => !ag);
2517
- _(), NA && (Pg(
2517
+ _(), NA && (mg(
2518
2518
  e("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2519
2519
  ), _(), G({ success: !1, reason: "Invalid card data" }));
2520
- const { address: og, date_of_birth: dg, full_name: Zg, id_number: Rg, sex: Gg } = cA;
2521
- if (!Rg || !/^\d{12}$/.test(Rg) ? (Pg(
2520
+ const { address: og, date_of_birth: Tg, full_name: Zg, id_number: Rg, sex: Gg } = cA;
2521
+ if (!Rg || !/^\d{12}$/.test(Rg) ? (mg(
2522
2522
  e("errorInvalidCard", "Số CCCD phải có 12 chữ số")
2523
- ), K.inputEl.value = "") : (K.inputEl.value = Rg, K.setError(null)), k.inputEl.value = Zg || "", m.inputEl.value = nA(dg), w.inputEl.value = og || "", Gg) {
2523
+ ), K.inputEl.value = "") : (K.inputEl.value = Rg, K.setError(null)), k.inputEl.value = Zg || "", m.inputEl.value = nA(Tg), w.inputEl.value = og || "", Gg) {
2524
2524
  const ag = oC.find(
2525
2525
  (Vg) => Vg.label.toLowerCase() === Gg.toLowerCase()
2526
2526
  );
@@ -2536,13 +2536,13 @@ function eE(o) {
2536
2536
  });
2537
2537
  });
2538
2538
  }
2539
- function rg(N, G, _) {
2539
+ function fg(N, G, _) {
2540
2540
  const nA = new Image();
2541
2541
  nA.src = URL.createObjectURL(N), nA.onload = () => V(null, null, function* () {
2542
2542
  yield QE(nA).then((rA) => {
2543
2543
  var mA, NA;
2544
2544
  const cA = JSON.parse(rA);
2545
- G && !((mA = cA == null ? void 0 : cA.data) != null && mA.isFront) ? Pg(
2545
+ G && !((mA = cA == null ? void 0 : cA.data) != null && mA.isFront) ? mg(
2546
2546
  e("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
2547
2547
  ) : _ && !((NA = cA == null ? void 0 : cA.data) != null && NA.isBack) && wg(
2548
2548
  e("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
@@ -2551,19 +2551,19 @@ function eE(o) {
2551
2551
  });
2552
2552
  }
2553
2553
  const {
2554
- container: mg,
2554
+ container: rg,
2555
2555
  getFrontFileError: Cg,
2556
2556
  getBackFileError: Qg,
2557
- setFrontFileError: Pg,
2557
+ setFrontFileError: mg,
2558
2558
  setBackFileError: wg,
2559
2559
  getFrontFile: Xg,
2560
- getBackFile: qg
2560
+ getBackFile: Pg
2561
2561
  } = YQ({
2562
2562
  frontFile: A == null ? void 0 : A.idCard,
2563
2563
  backFile: A == null ? void 0 : A.idCardBack,
2564
2564
  onFrontChange: (N) => V(null, null, function* () {
2565
2565
  var _, nA;
2566
- if (y = N, rg(N, !0, !1), Cg() || Qg() || !qg()) {
2566
+ if (y = N, fg(N, !0, !1), Cg() || Qg() || !Pg()) {
2567
2567
  dA = !1, JA = !1, $A(), O();
2568
2568
  return;
2569
2569
  }
@@ -2575,7 +2575,7 @@ function eE(o) {
2575
2575
  }),
2576
2576
  onBackChange: (N) => V(null, null, function* () {
2577
2577
  var nA, rA;
2578
- if (CA = N, rg(N, !1, !0), Cg() || Qg() || !Xg()) {
2578
+ if (CA = N, fg(N, !1, !0), Cg() || Qg() || !Xg()) {
2579
2579
  dA = !1, JA = !1, $A(), O();
2580
2580
  return;
2581
2581
  }
@@ -2587,20 +2587,20 @@ function eE(o) {
2587
2587
  }),
2588
2588
  theme: E
2589
2589
  });
2590
- KA.appendChild(mg);
2590
+ KA.appendChild(rg);
2591
2591
  const Ag = document.createElement("div");
2592
2592
  Ag.className = "wgt:space-y-4", Ag.appendChild(k.container);
2593
2593
  const GA = document.createElement("div");
2594
2594
  GA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", Ag.appendChild(GA), GA.appendChild(m.container), GA.appendChild(z.container), KA.appendChild(Ag);
2595
2595
  const UA = document.createElement("div");
2596
2596
  UA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", UA.appendChild(K.container), UA.appendChild(p.container), UA.appendChild(S.container), UA.appendChild(a.container), lA.appendChild(KA), lA.appendChild(UA), lA.appendChild(w.container), lA.appendChild(L.container);
2597
- const vg = document.createElement("ul");
2598
- vg.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
2597
+ const qg = document.createElement("ul");
2598
+ qg.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
2599
2599
  const ZA = document.createElement("li");
2600
2600
  ZA.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", ZA.innerText = e(
2601
2601
  "legalRepNote",
2602
2602
  "Vui lòng kiểm tra và nhập đúng tên người đại diện theo Giấy phép kinh doanh đã tải lên."
2603
- ), vg.appendChild(ZA), lA.appendChild(vg), r.appendChild(lA);
2603
+ ), qg.appendChild(ZA), lA.appendChild(qg), r.appendChild(lA);
2604
2604
  const TA = document.createElement("div");
2605
2605
  TA.className = "wgt:space-y-4";
2606
2606
  const U = document.createElement("h3");
@@ -2673,11 +2673,11 @@ function eE(o) {
2673
2673
  ), Ig.appendChild(document.createTextNode(` ${e("of", "của")} ${Og}.`)), DA.appendChild(FA), DA.appendChild(Ig), r.appendChild(DA), FA.addEventListener("click", () => {
2674
2674
  xA = !xA, xA ? (FA.classList.add("wgt:bg-primary"), gg.classList.remove("wgt:hidden")) : (FA.classList.remove("wgt:bg-primary"), gg.classList.add("wgt:hidden")), O();
2675
2675
  });
2676
- const Mg = document.createElement("div");
2677
- Mg.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", $.type = "submit", $.innerText = e("next"), $.className = [
2676
+ const vg = document.createElement("div");
2677
+ vg.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", $.type = "submit", $.innerText = e("next"), $.className = [
2678
2678
  "wgt:bg-primary",
2679
2679
  "wgt:hover:bg-primary-dark",
2680
- "wgt:text-text-primary",
2680
+ "wgt:text-text-color",
2681
2681
  "wgt:px-6",
2682
2682
  "wgt:py-2",
2683
2683
  "wgt:rounded",
@@ -2685,8 +2685,8 @@ function eE(o) {
2685
2685
  "wgt:disabled:cursor-not-allowed",
2686
2686
  "wgt:cursor-pointer",
2687
2687
  "wgt:hover:text-primary-hover-text"
2688
- ].join(" "), Mg.appendChild($), F.appendChild(Mg);
2689
- function lg() {
2688
+ ].join(" "), vg.appendChild($), F.appendChild(vg);
2689
+ function Mg() {
2690
2690
  const N = BA(), G = N.eInvoiceRegistration;
2691
2691
  if (!G.contactPerson.address || !G.organization.name || !G.organization.address || !G.organization.taxCode || !G.organization.taxAuthority || !G.contactPerson.name || !G.contactPerson.email || !G.contactPerson.phone || !G.legalRepresentative.name || !G.legalRepresentative.dob || !G.legalRepresentative.gender || !G.legalRepresentative.phone || !G.legalRepresentative.idCard || !G.legalRepresentative.permanentAddress || !G.invoiceSymbol || !i && G.hasUsedEInvoice && !G.taxAuthorityCode || G.isUsedEInvoiceBefore && !G.previousEInvoiceProvider || !Ng(G.contactPerson.name) || !Ng(G.legalRepresentative.name) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(G.contactPerson.address) || !/^[\p{L}0-9\s,.\-/()]*$/u.test(
2692
2692
  G.legalRepresentative.permanentAddress
@@ -2703,7 +2703,7 @@ function eE(o) {
2703
2703
  }
2704
2704
  function O() {
2705
2705
  const N = E === "bvb" && !i && !A._userHasEditedTaxCode;
2706
- $.disabled = !lg() || !xA || Cg() || Qg() || b.getError() || L.getError() || N;
2706
+ $.disabled = !Mg() || !xA || Cg() || Qg() || b.getError() || L.getError() || N;
2707
2707
  }
2708
2708
  function BA() {
2709
2709
  var N, G;
@@ -2765,7 +2765,7 @@ function eE(o) {
2765
2765
  }), [v, X].forEach((N) => {
2766
2766
  N.addEventListener("change", O);
2767
2767
  }), $.addEventListener("click", (N) => V(null, null, function* () {
2768
- if (N.preventDefault(), !lg()) return;
2768
+ if (N.preventDefault(), !Mg()) return;
2769
2769
  const G = D.getValue().trim();
2770
2770
  if (G.length < 10) {
2771
2771
  hg.error(e("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
@@ -2993,7 +2993,7 @@ function iC({
2993
2993
  }
2994
2994
  };
2995
2995
  }
2996
- const iE = "1.105.7";
2996
+ const iE = "1.105.9";
2997
2997
  function sE(E) {
2998
2998
  return V(this, arguments, function* ({ search: g, bank: A }) {
2999
2999
  return (yield bA.get(`${Sg}`, {
@@ -3420,7 +3420,7 @@ function xE(d) {
3420
3420
  debounceTimer: S,
3421
3421
  typedUnits: P,
3422
3422
  onSearchComplete: () => {
3423
- Pg(), TA();
3423
+ mg(), TA();
3424
3424
  }
3425
3425
  });
3426
3426
  b.appendChild(L);
@@ -3491,10 +3491,10 @@ function xE(d) {
3491
3491
  tg(e("errorCreatingOrder") || "Failed to create order"), l();
3492
3492
  return;
3493
3493
  }
3494
- }), eg = ug({
3494
+ }), eg = xg({
3495
3495
  type: "button",
3496
3496
  title: e("next"),
3497
- className: "wgt:text-text-primary wgt:bg-primary",
3497
+ className: "wgt:text-text-color wgt:bg-primary",
3498
3498
  handleClick: () => V(null, null, function* () {
3499
3499
  const U = $().find(
3500
3500
  (Z) => Z._id === q
@@ -3523,7 +3523,7 @@ function xE(d) {
3523
3523
  })
3524
3524
  });
3525
3525
  JA.appendChild(eg);
3526
- function rg() {
3526
+ function fg() {
3527
3527
  return V(this, null, function* () {
3528
3528
  var U, gA;
3529
3529
  try {
@@ -3562,7 +3562,7 @@ function xE(d) {
3562
3562
  isDisabled: !1,
3563
3563
  reward: AA.reward
3564
3564
  });
3565
- }), Object.keys(m).length > 0 && (Y = o ? [...o] : [], vg())) : console.error("Failed to load promotions:", QA.reason), IA.status === "fulfilled") {
3565
+ }), Object.keys(m).length > 0 && (Y = o ? [...o] : [], qg())) : console.error("Failed to load promotions:", QA.reason), IA.status === "fulfilled") {
3566
3566
  const AA = T ? IA.value.filter((W) => W.renewPrice !== 0) : IA.value;
3567
3567
  if (CA(AA || []), IA.value.length > 0) {
3568
3568
  const W = IA.value.find(
@@ -3599,7 +3599,7 @@ function xE(d) {
3599
3599
  ), hg.error(
3600
3600
  e("errorLoadingSignaturePackages") || "Failed to load signature packages"
3601
3601
  ), x = [];
3602
- mg();
3602
+ rg();
3603
3603
  } catch (QA) {
3604
3604
  console.error("Unexpected error during data loading:", QA), hg.error(e("errorLoadingData") || "Failed to load data", {
3605
3605
  autoClose: 5e3,
@@ -3609,8 +3609,8 @@ function xE(d) {
3609
3609
  }
3610
3610
  });
3611
3611
  }
3612
- function mg() {
3613
- UA(), Pg(), Xg(), Ag(), ZA(), TA();
3612
+ function rg() {
3613
+ UA(), mg(), Xg(), Ag(), ZA(), TA();
3614
3614
  }
3615
3615
  function Cg(U, gA, QA) {
3616
3616
  const EA = Object.values(m).find(
@@ -3631,7 +3631,7 @@ function xE(d) {
3631
3631
  QA();
3632
3632
  }
3633
3633
  let Qg = null;
3634
- function Pg() {
3634
+ function mg() {
3635
3635
  if (y.innerHTML = "", iA().length > 0)
3636
3636
  Qg = iC({
3637
3637
  type: "service",
@@ -3686,10 +3686,10 @@ function xE(d) {
3686
3686
  U.className = "wgt:text-text-sub-600", U.innerText = e("noPackageFound"), uA.appendChild(U), wg = null;
3687
3687
  }
3688
3688
  }
3689
- const qg = document.createElement("div");
3690
- qg.className = "wgt:w-full", b.appendChild(qg);
3689
+ const Pg = document.createElement("div");
3690
+ Pg.className = "wgt:w-full", b.appendChild(Pg);
3691
3691
  function Ag() {
3692
- yA.remove(), qg.innerHTML = "";
3692
+ yA.remove(), Pg.innerHTML = "";
3693
3693
  const U = $().find(
3694
3694
  (gA) => gA._id === q
3695
3695
  );
@@ -3708,7 +3708,7 @@ function xE(d) {
3708
3708
  // isChecked: isNewCustomer && !currentInvoicePkg?.withoutInitialFee,
3709
3709
  isChecked: !T && !(U != null && U.withoutInitialFee)
3710
3710
  });
3711
- qg.appendChild(gA);
3711
+ Pg.appendChild(gA);
3712
3712
  }
3713
3713
  }
3714
3714
  const GA = document.createElement("div");
@@ -3734,9 +3734,9 @@ function xE(d) {
3734
3734
  Z.isDisabled = !DA, DA ? DA && !Y.includes(Z.code) && Y.push(Z.code) : Y = Y.filter(
3735
3735
  (FA) => FA !== Z.code
3736
3736
  );
3737
- }), vg();
3737
+ }), qg();
3738
3738
  }
3739
- function vg() {
3739
+ function qg() {
3740
3740
  z = Object.values(m).filter((U) => U.bank === s && !U.isDisabled).flatMap(
3741
3741
  (U) => U.appliedPackages.filter((gA) => gA !== "INITIAL_FEE")
3742
3742
  );
@@ -3762,7 +3762,7 @@ function xE(d) {
3762
3762
  }).forEach((hA) => {
3763
3763
  const tA = document.createElement("div");
3764
3764
  tA.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", tA.innerText = hA;
3765
- const DA = ug({
3765
+ const DA = xg({
3766
3766
  type: "button",
3767
3767
  title: "x",
3768
3768
  handleClick: () => {
@@ -3777,7 +3777,7 @@ function xE(d) {
3777
3777
  </svg>
3778
3778
  `, tA.appendChild(DA), EA.appendChild(tA);
3779
3779
  });
3780
- const IA = ug({
3780
+ const IA = xg({
3781
3781
  type: "button",
3782
3782
  title: e("apply"),
3783
3783
  className: "wgt:text-white wgt:bg-primary",
@@ -3812,7 +3812,7 @@ function xE(d) {
3812
3812
  }
3813
3813
  }
3814
3814
  function TA() {
3815
- var FA, kg, gg, Eg, Ig, Fg, Og, Mg, lg;
3815
+ var FA, kg, gg, Eg, Ig, Fg, Og, vg, Mg;
3816
3816
  if (w(), lA.innerHTML = "", b.appendChild(Bg), b.appendChild(pA), b.appendChild(qA), $().length === 0 && x.length === 0) {
3817
3817
  const O = document.createElement("tr");
3818
3818
  O.innerHTML = `
@@ -3896,8 +3896,8 @@ function xE(d) {
3896
3896
  kA.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", kA.innerText = RA(aA * (O == null ? void 0 : O.limit)) + " VND", BA.appendChild(kA);
3897
3897
  const VA = document.createElement("td");
3898
3898
  VA.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", VA.innerText = RA(aA * (O == null ? void 0 : O.limit) * p) + " VND", BA.appendChild(VA);
3899
- const Tg = document.createElement("div");
3900
- Tg.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", Tg.innerHTML = `
3899
+ const lg = document.createElement("div");
3900
+ lg.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", lg.innerHTML = `
3901
3901
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3902
3902
  <span>${e("unitPrice")}:</span>
3903
3903
  <span class="wgt:font-medium">${RA(
@@ -3910,7 +3910,7 @@ function xE(d) {
3910
3910
  aA * (O == null ? void 0 : O.limit) * p
3911
3911
  )} VND</span>
3912
3912
  </div>
3913
- `, eA.appendChild(Tg), lA.appendChild(BA);
3913
+ `, eA.appendChild(lg), lA.appendChild(BA);
3914
3914
  }
3915
3915
  }
3916
3916
  {
@@ -3984,7 +3984,7 @@ function xE(d) {
3984
3984
  "package"
3985
3985
  )} ${(kA = (fA = O == null ? void 0 : O.reward) == null ? void 0 : fA.packageCodes) == null ? void 0 : kA.join(", ")}`, sA.style.color = "#12B76A") : sA.innerText = "", BA.appendChild(sA), lA.appendChild(BA);
3986
3986
  });
3987
- const EA = !T && k.length > 0 && !(U != null && U.withoutInitialFee) ? ((Og = k[0]) == null ? void 0 : Og.price) * K : 0, IA = LA(q), Z = IA ? T ? (lg = IA.renewPrice) != null ? lg : 0 : (Mg = IA.price) != null ? Mg : 0 : 0, AA = IA ? Z * IA.limit * p : 0, W = R(M), hA = W ? W.price * W.limit * a : 0, tA = EA + AA + hA, DA = Math.min(QA, tA), xA = Math.max(tA - DA, 0);
3987
+ const EA = !T && k.length > 0 && !(U != null && U.withoutInitialFee) ? ((Og = k[0]) == null ? void 0 : Og.price) * K : 0, IA = LA(q), Z = IA ? T ? (Mg = IA.renewPrice) != null ? Mg : 0 : (vg = IA.price) != null ? vg : 0 : 0, AA = IA ? Z * IA.limit * p : 0, W = R(M), hA = W ? W.price * W.limit * a : 0, tA = EA + AA + hA, DA = Math.min(QA, tA), xA = Math.max(tA - DA, 0);
3988
3988
  h(xA);
3989
3989
  {
3990
3990
  const O = document.createElement("tr");
@@ -3996,7 +3996,7 @@ function xE(d) {
3996
3996
  }
3997
3997
  dA.innerText = RA(xA) + " VND";
3998
3998
  }
3999
- return rg(), { container: v };
3999
+ return fg(), { container: v };
4000
4000
  });
4001
4001
  }
4002
4002
  function HE({
@@ -4234,7 +4234,7 @@ function JE({
4234
4234
  "contact_info",
4235
4235
  'Thông tin liên hệ: <a href="mailto:hotro247@atomsolution.vn" class="wgt:font-semibold wgt:underline">hotro247@atomsolution.vn</a>'
4236
4236
  ), R.appendChild(v), R.appendChild(X), K.appendChild(p), K.appendChild(R), J.appendChild(K);
4237
- const j = ug({
4237
+ const j = xg({
4238
4238
  title: e("cancelTransaction"),
4239
4239
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
4240
4240
  handleClick: () => {
@@ -4373,14 +4373,14 @@ function XE({
4373
4373
  }
4374
4374
  };
4375
4375
  }
4376
- var xg = {}, AB, uC;
4376
+ var dg = {}, AB, uC;
4377
4377
  function FE() {
4378
4378
  return uC || (uC = 1, AB = function() {
4379
4379
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
4380
4380
  }), AB;
4381
4381
  }
4382
4382
  var gB = {}, ng = {}, DC;
4383
- function Dg() {
4383
+ function ug() {
4384
4384
  if (DC) return ng;
4385
4385
  DC = 1;
4386
4386
  let g;
@@ -4534,7 +4534,7 @@ function GE() {
4534
4534
  var EB = {}, PC;
4535
4535
  function LE() {
4536
4536
  return PC || (PC = 1, function(g) {
4537
- const A = Dg().getSymbolSize;
4537
+ const A = ug().getSymbolSize;
4538
4538
  g.getRowColCoords = function(C) {
4539
4539
  if (C === 1) return [];
4540
4540
  const B = Math.floor(C / 7) + 2, Q = A(C), t = Q === 145 ? 26 : Math.ceil((Q - 13) / (2 * B - 2)) * 2, n = [Q - 7];
@@ -4556,7 +4556,7 @@ var IB = {}, qC;
4556
4556
  function NE() {
4557
4557
  if (qC) return IB;
4558
4558
  qC = 1;
4559
- const g = Dg().getSymbolSize, A = 7;
4559
+ const g = ug().getSymbolSize, A = 7;
4560
4560
  return IB.getPositions = function(C) {
4561
4561
  const B = g(C);
4562
4562
  return [
@@ -5122,7 +5122,7 @@ function QQ() {
5122
5122
  }, WA;
5123
5123
  }
5124
5124
  var kC;
5125
- function fg() {
5125
+ function Dg() {
5126
5126
  return kC || (kC = 1, function(g) {
5127
5127
  const A = CQ(), E = QQ();
5128
5128
  g.NUMERIC = {
@@ -5186,7 +5186,7 @@ function fg() {
5186
5186
  var RC;
5187
5187
  function KE() {
5188
5188
  return RC || (RC = 1, function(g) {
5189
- const A = Dg(), E = BQ(), C = HB(), B = fg(), Q = CQ(), t = 7973, n = A.getBCHDigit(t);
5189
+ const A = ug(), E = BQ(), C = HB(), B = Dg(), Q = CQ(), t = 7973, n = A.getBCHDigit(t);
5190
5190
  function I(i, o, u) {
5191
5191
  for (let f = 1; f <= 40; f++)
5192
5192
  if (o <= g.getCapacity(f, u, i))
@@ -5253,7 +5253,7 @@ var oB = {}, YC;
5253
5253
  function UE() {
5254
5254
  if (YC) return oB;
5255
5255
  YC = 1;
5256
- const g = Dg(), A = 1335, E = 21522, C = g.getBCHDigit(A);
5256
+ const g = ug(), A = 1335, E = 21522, C = g.getBCHDigit(A);
5257
5257
  return oB.getEncodedBits = function(Q, t) {
5258
5258
  const n = Q.bit << 3 | t;
5259
5259
  let I = n << 10;
@@ -5266,7 +5266,7 @@ var aB = {}, iB, JC;
5266
5266
  function SE() {
5267
5267
  if (JC) return iB;
5268
5268
  JC = 1;
5269
- const g = fg();
5269
+ const g = Dg();
5270
5270
  function A(E) {
5271
5271
  this.mode = g.NUMERIC, this.data = E.toString();
5272
5272
  }
@@ -5288,7 +5288,7 @@ var sB, XC;
5288
5288
  function pE() {
5289
5289
  if (XC) return sB;
5290
5290
  XC = 1;
5291
- const g = fg(), A = [
5291
+ const g = Dg(), A = [
5292
5292
  "0",
5293
5293
  "1",
5294
5294
  "2",
@@ -5357,7 +5357,7 @@ var uB, FC;
5357
5357
  function ZE() {
5358
5358
  if (FC) return uB;
5359
5359
  FC = 1;
5360
- const g = fg();
5360
+ const g = Dg();
5361
5361
  function A(E) {
5362
5362
  this.mode = g.BYTE, typeof E == "string" ? this.data = new TextEncoder().encode(E) : this.data = new Uint8Array(E);
5363
5363
  }
@@ -5376,7 +5376,7 @@ var DB, OC;
5376
5376
  function VE() {
5377
5377
  if (OC) return DB;
5378
5378
  OC = 1;
5379
- const g = fg(), A = Dg();
5379
+ const g = Dg(), A = ug();
5380
5380
  function E(C) {
5381
5381
  this.mode = g.KANJI, this.data = C;
5382
5382
  }
@@ -5474,7 +5474,7 @@ function WE() {
5474
5474
  var LC;
5475
5475
  function _E() {
5476
5476
  return LC || (LC = 1, function(g) {
5477
- const A = fg(), E = SE(), C = pE(), B = ZE(), Q = VE(), t = QQ(), n = Dg(), I = WE();
5477
+ const A = Dg(), E = SE(), C = pE(), B = ZE(), Q = VE(), t = QQ(), n = ug(), I = WE();
5478
5478
  function h(J) {
5479
5479
  return unescape(encodeURIComponent(J)).length;
5480
5480
  }
@@ -5609,7 +5609,7 @@ var NC;
5609
5609
  function $E() {
5610
5610
  if (NC) return gB;
5611
5611
  NC = 1;
5612
- const g = Dg(), A = HB(), E = OE(), C = GE(), B = LE(), Q = NE(), t = zE(), n = BQ(), I = yE(), h = KE(), c = UE(), s = fg(), i = _E();
5612
+ const g = ug(), A = HB(), E = OE(), C = GE(), B = LE(), Q = NE(), t = zE(), n = BQ(), I = yE(), h = KE(), c = UE(), s = Dg(), i = _E();
5613
5613
  function o(d, P) {
5614
5614
  const q = d.size, M = Q.getPositions(P);
5615
5615
  for (let Y = 0; Y < M.length; Y++) {
@@ -5852,7 +5852,7 @@ function gI() {
5852
5852
  }
5853
5853
  var yC;
5854
5854
  function BI() {
5855
- if (yC) return xg;
5855
+ if (yC) return dg;
5856
5856
  yC = 1;
5857
5857
  const g = FE(), A = $E(), E = AI(), C = gI();
5858
5858
  function B(Q, t, n, I, h) {
@@ -5882,9 +5882,9 @@ function BI() {
5882
5882
  h(o);
5883
5883
  }
5884
5884
  }
5885
- return xg.create = A.create, xg.toCanvas = B.bind(null, E.render), xg.toDataURL = B.bind(null, E.renderToDataURL), xg.toString = B.bind(null, function(Q, t, n) {
5885
+ return dg.create = A.create, dg.toCanvas = B.bind(null, E.render), dg.toDataURL = B.bind(null, E.renderToDataURL), dg.toString = B.bind(null, function(Q, t, n) {
5886
5886
  return C.render(Q, n);
5887
- }), xg;
5887
+ }), dg;
5888
5888
  }
5889
5889
  var CI = BI();
5890
5890
  const QI = /* @__PURE__ */ pC(CI), IQ = "data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%2030C6.7155%2030%200%2023.2845%200%2015C0%206.7155%206.7155%200%2015%200C23.2845%200%2030%206.7155%2030%2015C30%2023.2845%2023.2845%2030%2015%2030ZM13.5%2013.5V22.5H16.5V13.5H13.5ZM13.5%207.5V10.5H16.5V7.5H13.5Z'%20fill='%23335CFF'/%3e%3c/svg%3e", EI = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.25%2010.375C4.25%2011.0653%203.69034%2011.625%203%2011.625C2.30966%2011.625%201.75%2011.0653%201.75%2010.375V8.125C1.75%207.43466%202.30966%206.875%203%206.875C3.69034%206.875%204.25%207.43466%204.25%208.125V10.375Z'%20fill='%23525866'%20stroke='%23525866'%20stroke-width='1.25'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.25%2010.375C14.25%2011.0653%2013.6903%2011.625%2013%2011.625C12.3097%2011.625%2011.75%2011.0653%2011.75%2010.375V8.125C11.75%207.43466%2012.3097%206.875%2013%206.875C13.6903%206.875%2014.25%207.43466%2014.25%208.125V10.375Z'%20fill='%23525866'%20stroke='%23525866'%20stroke-width='1.25'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.75%208.125V6.875C1.75%203.42322%204.54822%200.625%208%200.625C11.4518%200.625%2014.25%203.42322%2014.25%206.875V8.125'%20stroke='%23525866'%20stroke-width='1.25'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.25%2010.375V11.625C14.25%2013.0057%2013.1429%2013.7143%2011.75%2014.125H9.25'%20stroke='%23525866'%20stroke-width='1.25'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%2015.375C8.69036%2015.375%209.25%2014.8154%209.25%2014.125C9.25%2013.4346%208.69036%2012.875%208%2012.875C7.30964%2012.875%206.75%2013.4346%206.75%2014.125C6.75%2014.8154%207.30964%2015.375%208%2015.375Z'%20fill='%23525866'%20stroke='%23525866'%20stroke-width='1.25'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
@@ -6177,15 +6177,10 @@ function cI(n) {
6177
6177
  D.appendChild(k), H.appendChild(D);
6178
6178
  const z = document.createElement("div");
6179
6179
  z.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
6180
- const S = ug({
6181
- type: "button",
6182
- title: e("back"),
6183
- className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
6184
- handleClick: () => {
6185
- A && (clearInterval(c), c = null, A());
6186
- }
6187
- });
6188
- z.appendChild(S), H.appendChild(z);
6180
+ const S = document.createElement("button");
6181
+ S.type = "button", S.className = "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline", S.textContent = e("back"), S.addEventListener("click", () => {
6182
+ A && (clearInterval(c), c = null, A());
6183
+ }), z.appendChild(S), H.appendChild(z);
6189
6184
  function K() {
6190
6185
  const X = Kg({
6191
6186
  message: e("freeOrderSuccess") || "Đơn hàng miễn phí đã được xác nhận thành công!",
@@ -6473,7 +6468,7 @@ function eI({
6473
6468
  p.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", p.appendChild(document.createTextNode(e("informationSent"))), S.appendChild(K), S.appendChild(p);
6474
6469
  const a = document.createElement("div");
6475
6470
  a.className = "wgt:w-full wgt:flex wgt:justify-center", n.appendChild(a);
6476
- const w = ug({
6471
+ const w = xg({
6477
6472
  type: "button",
6478
6473
  title: e("completeRegistration"),
6479
6474
  className: "wgt:text-white",