@invoice-sdk/widget 1.69.3 → 1.69.4

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.
@@ -37,12 +37,12 @@ var U = (A, g, B) => new Promise((C, Q) => {
37
37
  }
38
38
  }, n = (t) => t.done ? C(t.value) : Promise.resolve(t.value).then(I, E);
39
39
  n((B = B.apply(A, g)).next());
40
- }), sg = function(A, g) {
40
+ }), Dg = function(A, g) {
41
41
  this[0] = A, this[1] = g;
42
42
  }, DC = (A, g, B) => {
43
43
  var C = (E, n, t, c) => {
44
44
  try {
45
- var h = B[E](n), a = (n = h.value) instanceof sg, e = h.done;
45
+ var h = B[E](n), a = (n = h.value) instanceof Dg, e = h.done;
46
46
  Promise.resolve(a ? n[0] : n).then((w) => a ? C(E === "return" ? E : "next", n[1] ? { done: w.done, value: w.value } : w, t, c) : t({ value: w, done: e })).catch((w) => C("throw", w, t, c));
47
47
  } catch (w) {
48
48
  c(w);
@@ -58,7 +58,7 @@ var U = (A, g, B) => new Promise((C, Q) => {
58
58
  }
59
59
  return B = !0, {
60
60
  done: !1,
61
- value: new sg(new Promise((n) => {
61
+ value: new Dg(new Promise((n) => {
62
62
  var t = g[I](E);
63
63
  t instanceof Object || xI("Object expected"), n(t);
64
64
  }), 1)
@@ -67,7 +67,7 @@ var U = (A, g, B) => new Promise((C, Q) => {
67
67
  throw I;
68
68
  }, "return" in g && C("return"), Q;
69
69
  }, SB = (A, g, B) => (g = A[Hg("asyncIterator")]) ? g.call(A) : (A = A[Hg("iterator")](), g = {}, B = (C, Q) => (Q = A[C]) && (g[C] = (I) => new Promise((E, n, t) => (I = Q.call(A, I), t = I.done, Promise.resolve(I.value).then((c) => E({ value: c, done: t }), n)))), B("next"), B("return"), g);
70
- import { t as u, g as AB, a as gB, b as Ig, c as RI, m as GI, d as zI, f as XI, v as OI, r as bQ, u as jQ } from "./index-BnQCNbqf.js";
70
+ import { t as u, g as AB, a as gB, b as Eg, c as RI, m as GI, d as zI, f as XI, v as OI, r as bQ, u as jQ } from "./index-BzUJtmw5.js";
71
71
  import { g as KQ } from "./_commonjsHelpers-bAxELxBV.js";
72
72
  function UB({ steps: A = [], currentStep: g = 1 } = {}) {
73
73
  const B = document.createElement("div");
@@ -575,7 +575,7 @@ function mC({
575
575
  };
576
576
  }
577
577
  }
578
- function Eg({
578
+ function ng({
579
579
  title: A,
580
580
  isDisabled: g = !1,
581
581
  handleClick: B = null,
@@ -645,7 +645,7 @@ function pB({
645
645
  function s(m) {
646
646
  w = m, m ? (e.innerText = m, e.style.display = "block") : (e.innerText = "", e.style.display = "none");
647
647
  }
648
- const D = Eg({
648
+ const D = ng({
649
649
  title: "Upload file",
650
650
  className: "wgt:bg-primary wgt:hover:bg-primary-dark wgt:text-white wgt:px-6 wgt:py-1 wgt:rounded-md wgt:cursor-pointer",
651
651
  handleClick: (m) => {
@@ -1030,7 +1030,7 @@ function VQ(A, g) {
1030
1030
  return Q;
1031
1031
  return null;
1032
1032
  }
1033
- const rg = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, WQ = (A) => !Og(A) && A !== rg;
1033
+ const mg = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, WQ = (A) => !Og(A) && A !== mg;
1034
1034
  function UC() {
1035
1035
  const { caseless: A } = WQ(this) && this || {}, g = {}, B = (C, Q) => {
1036
1036
  const I = A && VQ(g, Q) || Q;
@@ -1139,14 +1139,14 @@ const RE = (A) => {
1139
1139
  return C;
1140
1140
  };
1141
1141
  return B(A, 0);
1142
- }, GE = UA("AsyncFunction"), zE = (A) => A && (Lg(A) || FA(A)) && FA(A.then) && FA(A.catch), $Q = ((A, g) => A ? setImmediate : g ? ((B, C) => (rg.addEventListener("message", ({ source: Q, data: I }) => {
1143
- Q === rg && I === B && C.length && C.shift()();
1142
+ }, GE = UA("AsyncFunction"), zE = (A) => A && (Lg(A) || FA(A)) && FA(A.then) && FA(A.catch), $Q = ((A, g) => A ? setImmediate : g ? ((B, C) => (mg.addEventListener("message", ({ source: Q, data: I }) => {
1143
+ Q === mg && I === B && C.length && C.shift()();
1144
1144
  }, !1), (Q) => {
1145
- C.push(Q), rg.postMessage(B, "*");
1145
+ C.push(Q), mg.postMessage(B, "*");
1146
1146
  }))(`axios@${Math.random()}`, []) : (B) => setTimeout(B))(
1147
1147
  typeof setImmediate == "function",
1148
- FA(rg.postMessage)
1149
- ), XE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(rg) : typeof process != "undefined" && process.nextTick || $Q, OE = (A) => A != null && FA(A[EC]), H = {
1148
+ FA(mg.postMessage)
1149
+ ), XE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(mg) : typeof process != "undefined" && process.nextTick || $Q, OE = (A) => A != null && FA(A[EC]), H = {
1150
1150
  isArray: Yg,
1151
1151
  isArrayBuffer: pQ,
1152
1152
  isBuffer: Fg,
@@ -1196,7 +1196,7 @@ const RE = (A) => {
1196
1196
  noop: kE,
1197
1197
  toFiniteNumber: YE,
1198
1198
  findKey: VQ,
1199
- global: rg,
1199
+ global: mg,
1200
1200
  isContextDefined: WQ,
1201
1201
  isSpecCompliantForm: xE,
1202
1202
  toJSONObject: RE,
@@ -2075,7 +2075,7 @@ const cI = (A) => {
2075
2075
  }, rn = function(A, g) {
2076
2076
  return DC(this, null, function* () {
2077
2077
  try {
2078
- for (var B = SB(mn(A)), C, Q, I; C = !(Q = yield new sg(B.next())).done; C = !1) {
2078
+ for (var B = SB(mn(A)), C, Q, I; C = !(Q = yield new Dg(B.next())).done; C = !1) {
2079
2079
  const E = Q.value;
2080
2080
  yield* rC(Dn(E, g));
2081
2081
  }
@@ -2083,7 +2083,7 @@ const cI = (A) => {
2083
2083
  I = [Q];
2084
2084
  } finally {
2085
2085
  try {
2086
- C && (Q = B.return) && (yield new sg(Q.call(B)));
2086
+ C && (Q = B.return) && (yield new Dg(Q.call(B)));
2087
2087
  } finally {
2088
2088
  if (I)
2089
2089
  throw I[0];
@@ -2099,13 +2099,13 @@ const cI = (A) => {
2099
2099
  const g = A.getReader();
2100
2100
  try {
2101
2101
  for (; ; ) {
2102
- const { done: B, value: C } = yield new sg(g.read());
2102
+ const { done: B, value: C } = yield new Dg(g.read());
2103
2103
  if (B)
2104
2104
  break;
2105
2105
  yield C;
2106
2106
  }
2107
2107
  } finally {
2108
- yield new sg(g.cancel());
2108
+ yield new Dg(g.cancel());
2109
2109
  }
2110
2110
  });
2111
2111
  }, QQ = (A, g, B, C) => {
@@ -2703,7 +2703,7 @@ const {
2703
2703
  getAdapter: H0,
2704
2704
  mergeConfig: k0
2705
2705
  } = rA;
2706
- let ng = [], PA = null, mg = null;
2706
+ let tg = [], PA = null, qg = null;
2707
2707
  const kn = 3;
2708
2708
  function Yn() {
2709
2709
  !PA && document.body && sI();
@@ -2717,11 +2717,11 @@ function sI() {
2717
2717
  console.warn("Document body not available for notification container");
2718
2718
  return;
2719
2719
  }
2720
- PA && PA.parentNode && PA.parentNode.removeChild(PA), PA = document.createElement("div"), PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", window.innerWidth >= 768 ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4", document.body.appendChild(PA), mg && window.removeEventListener("resize", mg), mg = () => {
2720
+ PA && PA.parentNode && PA.parentNode.removeChild(PA), PA = document.createElement("div"), PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", window.innerWidth >= 768 ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4", document.body.appendChild(PA), qg && window.removeEventListener("resize", qg), qg = () => {
2721
2721
  if (!PA) return;
2722
2722
  const g = window.innerWidth >= 768;
2723
2723
  PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", g ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4";
2724
- }, window.addEventListener("resize", mg);
2724
+ }, window.addEventListener("resize", qg);
2725
2725
  }
2726
2726
  function pg(A, g = {}) {
2727
2727
  if (Yn(), !PA)
@@ -2733,7 +2733,7 @@ function pg(A, g = {}) {
2733
2733
  icon: I = !1,
2734
2734
  type: E = "info"
2735
2735
  } = g;
2736
- ng.length >= kn && CC(ng[0].id);
2736
+ tg.length >= kn && CC(tg[0].id);
2737
2737
  const n = Date.now() + Math.random(), t = xn(n, A, {
2738
2738
  autoClose: B,
2739
2739
  hideProgressBar: C,
@@ -2741,7 +2741,7 @@ function pg(A, g = {}) {
2741
2741
  icon: I,
2742
2742
  type: E
2743
2743
  });
2744
- return ng.push({ id: n, element: t }), PA.appendChild(t), requestAnimationFrame(() => {
2744
+ return tg.push({ id: n, element: t }), PA.appendChild(t), requestAnimationFrame(() => {
2745
2745
  t.classList.remove("wgt:translate-x-full", "wgt:opacity-0"), t.classList.add("wgt:translate-x-0", "wgt:opacity-100");
2746
2746
  }), B > 0 && setTimeout(() => {
2747
2747
  CC(n);
@@ -2810,20 +2810,20 @@ function xn(A, g, B) {
2810
2810
  return t;
2811
2811
  }
2812
2812
  function CC(A) {
2813
- const g = ng.findIndex((C) => C.id === A);
2813
+ const g = tg.findIndex((C) => C.id === A);
2814
2814
  if (g === -1) return;
2815
- const { element: B } = ng[g];
2815
+ const { element: B } = tg[g];
2816
2816
  B.classList.remove("wgt:translate-x-0", "wgt:opacity-100"), B.classList.add("wgt:translate-x-full", "wgt:opacity-0"), setTimeout(() => {
2817
- B.parentNode && B.parentNode.removeChild(B), ng.splice(g, 1);
2817
+ B.parentNode && B.parentNode.removeChild(B), tg.splice(g, 1);
2818
2818
  }, 300);
2819
2819
  }
2820
2820
  function DI() {
2821
- ng.forEach(({ id: A }) => CC(A));
2821
+ tg.forEach(({ id: A }) => CC(A));
2822
2822
  }
2823
2823
  function Rn() {
2824
- DI(), PA && PA.parentNode && PA.parentNode.removeChild(PA), mg && window.removeEventListener("resize", mg), PA = null, mg = null, ng = [];
2824
+ DI(), PA && PA.parentNode && PA.parentNode.removeChild(PA), qg && window.removeEventListener("resize", qg), PA = null, qg = null, tg = [];
2825
2825
  }
2826
- const Dg = {
2826
+ const rg = {
2827
2827
  info: (A, g = {}) => pg(A, yA(qA({}, g), { type: "info" })),
2828
2828
  success: (A, g = {}) => pg(A, yA(qA({}, g), { type: "success" })),
2829
2829
  warning: (A, g = {}) => pg(A, yA(qA({}, g), { type: "warning" })),
@@ -2935,7 +2935,7 @@ function IB(A, g = {}) {
2935
2935
  }
2936
2936
  );
2937
2937
  }
2938
- function Qg(A, g = {}) {
2938
+ function Ig(A, g = {}) {
2939
2939
  const { okLabel: B = u("ok"), onClose: C = null, isOffline: Q = !1 } = g, { container: I, open: E } = eC({
2940
2940
  message: A,
2941
2941
  okLabel: B,
@@ -3422,17 +3422,17 @@ function yn() {
3422
3422
  zA -= 7;
3423
3423
  OA += 7 - zA;
3424
3424
  for (var fA = !1, dA = 0, NA = 0; dA < OA; dA++) {
3425
- var vA = new Date(o, i, 1 + (dA - y)), ZA = s(this._d) ? m(vA, this._d) : !1, tg = m(vA, L), hg = d.events.indexOf(vA.toDateString()) !== -1, cg = dA < y || dA >= N + y, VA = 1 + (dA - y), wg = i, bA = o, jA = d.startRange && m(d.startRange, vA), KA = d.endRange && m(d.endRange, vA), WA = d.startRange && d.endRange && d.startRange < vA && vA < d.endRange, eg = d.minDate && vA < d.minDate || d.maxDate && vA > d.maxDate || d.disableWeekends && D(vA) || d.disableDayFn && d.disableDayFn(vA);
3426
- cg && (dA < y ? (VA = XA + VA, wg = p, bA = oA) : (VA = VA - N, wg = tA, bA = wA));
3425
+ var vA = new Date(o, i, 1 + (dA - y)), ZA = s(this._d) ? m(vA, this._d) : !1, hg = m(vA, L), cg = d.events.indexOf(vA.toDateString()) !== -1, wg = dA < y || dA >= N + y, VA = 1 + (dA - y), eg = i, bA = o, jA = d.startRange && m(d.startRange, vA), KA = d.endRange && m(d.endRange, vA), WA = d.startRange && d.endRange && d.startRange < vA && vA < d.endRange, og = d.minDate && vA < d.minDate || d.maxDate && vA > d.maxDate || d.disableWeekends && D(vA) || d.disableDayFn && d.disableDayFn(vA);
3426
+ wg && (dA < y ? (VA = XA + VA, eg = p, bA = oA) : (VA = VA - N, eg = tA, bA = wA));
3427
3427
  var SA = {
3428
3428
  day: VA,
3429
- month: wg,
3429
+ month: eg,
3430
3430
  year: bA,
3431
- hasEvent: hg,
3431
+ hasEvent: cg,
3432
3432
  isSelected: ZA,
3433
- isToday: tg,
3434
- isDisabled: eg,
3435
- isEmpty: cg,
3433
+ isToday: hg,
3434
+ isDisabled: og,
3435
+ isEmpty: wg,
3436
3436
  isStartRange: jA,
3437
3437
  isEndRange: KA,
3438
3438
  isInRange: WA,
@@ -3502,11 +3502,11 @@ function Sn(A = "dev") {
3502
3502
  };
3503
3503
  return g[A] || g.dev;
3504
3504
  }
3505
- let qg = null, $C = null, Xg = null;
3505
+ let fg = null, $C = null, Xg = null;
3506
3506
  function Un() {
3507
3507
  return oC(this, null, function* () {
3508
3508
  try {
3509
- qg || (qg = yield import("https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.mjs")), $C || ($C = (yield import("https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.11.0/dist/index.mjs")).scanImageData), console.log("✅ All modules loaded successfully");
3509
+ fg || (fg = yield import("https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.mjs")), $C || ($C = (yield import("https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.11.0/dist/index.mjs")).scanImageData), console.log("✅ All modules loaded successfully");
3510
3510
  } catch (A) {
3511
3511
  throw new Error(`Failed to initialize required modules: ${A.message}`);
3512
3512
  }
@@ -3515,16 +3515,16 @@ function Un() {
3515
3515
  function rI(A) {
3516
3516
  return oC(this, null, function* () {
3517
3517
  try {
3518
- if (yield Un(), !qg || !qg.InferenceSession)
3518
+ if (yield Un(), !fg || !fg.InferenceSession)
3519
3519
  throw new Error(
3520
3520
  "ONNX Runtime is not properly loaded. Please check your internet connection and try again."
3521
3521
  );
3522
3522
  const g = Sn(A).modelUrl;
3523
- if (typeof qg.InferenceSession.create != "function")
3523
+ if (typeof fg.InferenceSession.create != "function")
3524
3524
  throw new Error(
3525
3525
  "InferenceSession.create is not available. ONNX Runtime may not be properly initialized."
3526
3526
  );
3527
- return Xg = yield qg.InferenceSession.create(g), Xg;
3527
+ return Xg = yield fg.InferenceSession.create(g), Xg;
3528
3528
  } catch (g) {
3529
3529
  throw new Error(`Failed to initialize ONNX model: ${g.message}`);
3530
3530
  }
@@ -3609,7 +3609,7 @@ function Wn(A, g = 640) {
3609
3609
  const c = n * g + t;
3610
3610
  E[c] = I[c * 3], E[c + g * g] = I[c * 3 + 1], E[c + 2 * g * g] = I[c * 3 + 2];
3611
3611
  }
3612
- return new qg.Tensor("float32", E, [1, 3, g, g]);
3612
+ return new fg.Tensor("float32", E, [1, 3, g, g]);
3613
3613
  }
3614
3614
  function _n(A, g, B, C, Q = 0.5) {
3615
3615
  const I = [], E = A.dims[1];
@@ -4124,8 +4124,8 @@ function Qt(t) {
4124
4124
  ), e.inputEl.value = "", w.inputEl.value = "", s.setValue && s.setValue("", "", ""), s.setDisabled(!1);
4125
4125
  else {
4126
4126
  if (e.inputEl.value = EA.ten_cty || "", w.inputEl.value = EA.dia_chi || "", EA.cqthue_ql) {
4127
- const DA = (ig) => ig.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), JA = DA(EA.cqthue_ql), Ag = d.find((ig) => {
4128
- const Jg = DA(ig.label);
4127
+ const DA = (ug) => ug.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), JA = DA(EA.cqthue_ql), Ag = d.find((ug) => {
4128
+ const Jg = DA(ug.label);
4129
4129
  return Jg.includes(JA) || JA.includes(Jg);
4130
4130
  });
4131
4131
  Ag && (s.setValue && s.setValue(
@@ -4137,7 +4137,7 @@ function Qt(t) {
4137
4137
  a.setError(null);
4138
4138
  }
4139
4139
  } catch (EA) {
4140
- X === y && (Dg.error(
4140
+ X === y && (rg.error(
4141
4141
  u("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
4142
4142
  {
4143
4143
  autoClose: 5e3,
@@ -4187,10 +4187,10 @@ function Qt(t) {
4187
4187
  }, EA = (JA) => {
4188
4188
  if (!JA) return "";
4189
4189
  if (/^\d{8}$/.test(JA)) {
4190
- const ug = JA.slice(0, 2), uC = JA.slice(2, 4), TI = JA.slice(4, 8);
4191
- return `${ug}/${uC}/${TI}`;
4190
+ const sg = JA.slice(0, 2), uC = JA.slice(2, 4), TI = JA.slice(4, 8);
4191
+ return `${sg}/${uC}/${TI}`;
4192
4192
  }
4193
- const [Ag, ig, Jg] = JA.split("/"), Tg = new Date(+Jg, +ig - 1, +Ag);
4193
+ const [Ag, ug, Jg] = JA.split("/"), Tg = new Date(+Jg, +ug - 1, +Ag);
4194
4194
  if (isNaN(Tg)) return "";
4195
4195
  const iC = String(Tg.getDate()).padStart(2, "0"), Rg = String(Tg.getMonth() + 1).padStart(2, "0"), Kg = Tg.getFullYear();
4196
4196
  return `${iC}/${Rg}/${Kg}`;
@@ -4200,21 +4200,21 @@ function Qt(t) {
4200
4200
  const JA = yield Ct(DA).then((Ag) => JSON.parse(Ag).status !== "success" ? (zA = !0, fA = !1, NA(), null) : JSON.parse(Ag).data);
4201
4201
  if (JA) {
4202
4202
  zA = !1, fA = !0, NA();
4203
- const ig = Object.values(JA).every((ug) => !ug);
4204
- if (X(), ig) {
4205
- cg(
4203
+ const ug = Object.values(JA).every((sg) => !sg);
4204
+ if (X(), ug) {
4205
+ wg(
4206
4206
  u("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
4207
4207
  ), X();
4208
4208
  return;
4209
4209
  }
4210
4210
  const { address: Jg, date_of_birth: Tg, full_name: iC, id_number: Rg, sex: Kg } = JA;
4211
- if (!Rg || !/^\d{12}$/.test(Rg) ? (cg(
4211
+ if (!Rg || !/^\d{12}$/.test(Rg) ? (wg(
4212
4212
  u("errorInvalidCard", "Số CCCD phải có 12 chữ số")
4213
4213
  ), r.inputEl.value = "") : (r.inputEl.value = Rg, r.setError(null)), m.inputEl.value = iC || "", f.inputEl.value = EA(Tg), x.inputEl.value = Jg || "", Kg) {
4214
- const ug = hQ.find(
4214
+ const sg = hQ.find(
4215
4215
  (uC) => uC.label.toLowerCase() === Kg.toLowerCase()
4216
4216
  );
4217
- l.selectEl.value = (ug == null ? void 0 : ug.value) || "";
4217
+ l.selectEl.value = (sg == null ? void 0 : sg.value) || "";
4218
4218
  }
4219
4219
  }
4220
4220
  } catch (JA) {
@@ -4226,17 +4226,17 @@ function Qt(t) {
4226
4226
  }
4227
4227
  const {
4228
4228
  container: ZA,
4229
- getFrontFileError: tg,
4230
- getBackFileError: hg,
4231
- setFrontFileError: cg,
4229
+ getFrontFileError: hg,
4230
+ getBackFileError: cg,
4231
+ setFrontFileError: wg,
4232
4232
  getFrontFile: VA,
4233
- getBackFile: wg
4233
+ getBackFile: eg
4234
4234
  } = jI({
4235
4235
  frontFile: g == null ? void 0 : g.idCard,
4236
4236
  backFile: g == null ? void 0 : g.idCardBack,
4237
4237
  onFrontChange: (F) => U(null, null, function* () {
4238
4238
  var EA, DA;
4239
- if (o = F, tg() || hg() || !wg()) {
4239
+ if (o = F, hg() || cg() || !eg()) {
4240
4240
  zA = !1, fA = !1, NA(), AA();
4241
4241
  return;
4242
4242
  }
@@ -4248,7 +4248,7 @@ function Qt(t) {
4248
4248
  }),
4249
4249
  onBackChange: (F) => U(null, null, function* () {
4250
4250
  var EA, DA;
4251
- if (i = F, tg() || hg() || !VA()) {
4251
+ if (i = F, hg() || cg() || !VA()) {
4252
4252
  zA = !1, fA = !1, NA(), AA();
4253
4253
  return;
4254
4254
  }
@@ -4269,23 +4269,23 @@ function Qt(t) {
4269
4269
  KA.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-4 wgt:gap-4 wgt:items-start", KA.appendChild(r.container), KA.appendChild(q.container), KA.appendChild(v.container), KA.appendChild(T.container), wA.appendChild(OA), wA.appendChild(KA), wA.appendChild(x.container), wA.appendChild(K.container);
4270
4270
  const WA = document.createElement("ul");
4271
4271
  WA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
4272
- const eg = document.createElement("li");
4273
- eg.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", eg.innerText = u(
4272
+ const og = document.createElement("li");
4273
+ og.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", og.innerText = u(
4274
4274
  "legalRepNote",
4275
4275
  "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."
4276
- ), WA.appendChild(eg), wA.appendChild(WA), h.appendChild(wA);
4276
+ ), WA.appendChild(og), wA.appendChild(WA), h.appendChild(wA);
4277
4277
  const SA = document.createElement("div");
4278
4278
  SA.className = "wgt:space-y-4";
4279
- const og = document.createElement("h3");
4280
- og.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", og.innerText = u("contactInfo", "3. Thông tin người liên hệ:"), SA.appendChild(og);
4279
+ const ag = document.createElement("h3");
4280
+ ag.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", ag.innerText = u("contactInfo", "3. Thông tin người liên hệ:"), SA.appendChild(ag);
4281
4281
  const YA = document.createElement("div");
4282
4282
  YA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:items-start", YA.appendChild(D.container), YA.appendChild(M.container), YA.appendChild(k.container), YA.appendChild(J.container), SA.appendChild(YA), h.appendChild(SA);
4283
- const ag = document.createElement("div");
4284
- ag.className = "wgt:space-y-4";
4283
+ const ig = document.createElement("div");
4284
+ ig.className = "wgt:space-y-4";
4285
4285
  const lg = document.createElement("h3");
4286
- lg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", lg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ag.appendChild(lg), h.appendChild(ag);
4286
+ lg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", lg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ig.appendChild(lg), h.appendChild(ig);
4287
4287
  const _A = document.createElement("div");
4288
- _A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container), ag.appendChild(_A);
4288
+ _A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container), ig.appendChild(_A);
4289
4289
  const mA = document.createElement("div");
4290
4290
  mA.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", h.appendChild(mA);
4291
4291
  const b = document.createElement("div");
@@ -4366,7 +4366,7 @@ function Qt(t) {
4366
4366
  return !(!DA.test(X.contactPerson.phone) || !DA.test(X.legalRepresentative.phone) || !/^\d{12}$/.test(X.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(X.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(X.invoiceSymbol) || !F.license || !F.logo || !F.idCard || !F.idCardBack);
4367
4367
  }
4368
4368
  function AA() {
4369
- P.disabled = !BA() || !cA || tg() || hg() || S.getError() || K.getError();
4369
+ P.disabled = !BA() || !cA || hg() || cg() || S.getError() || K.getError();
4370
4370
  }
4371
4371
  function lA() {
4372
4372
  var F, X;
@@ -4515,7 +4515,7 @@ function nt({
4515
4515
  `, e.appendChild(w);
4516
4516
  const s = document.createElement("span");
4517
4517
  if (s.className = "wgt:ml-2 wgt:text-sm", g === "signature") {
4518
- const J = Ig(), m = u(A.duration.unit), f = J === "en" && A.duration.value > 1 ? m + "s" : m;
4518
+ const J = Eg(), m = u(A.duration.unit), f = J === "en" && A.duration.value > 1 ? m + "s" : m;
4519
4519
  s.innerText = `${u("duration")}: ${A.duration.value} ${f} `;
4520
4520
  } else typeof (A == null ? void 0 : A.limit) == "number" ? s.innerText = `${A == null ? void 0 : A.limit.toLocaleString(
4521
4521
  "vi-VN"
@@ -4597,7 +4597,7 @@ function wQ({
4597
4597
  }
4598
4598
  };
4599
4599
  }
4600
- const tt = "1.69.3";
4600
+ const tt = "1.69.4";
4601
4601
  function ht(B) {
4602
4602
  return U(this, arguments, function* ({ search: A, bank: g }) {
4603
4603
  return (yield pA.get(`${IC}`, {
@@ -4762,7 +4762,7 @@ function ut({
4762
4762
  "wgt:text-sm",
4763
4763
  "wgt:text-text-sub-600",
4764
4764
  "wgt:mb-2"
4765
- ].join(" "), t.textContent = Ig() === "vi" ? A.name : A.nameEn, E.appendChild(t);
4765
+ ].join(" "), t.textContent = Eg() === "vi" ? A.name : A.nameEn, E.appendChild(t);
4766
4766
  const { container: c } = QC({
4767
4767
  checked: A.isSelected,
4768
4768
  onChange: () => {
@@ -4804,7 +4804,7 @@ function st({
4804
4804
  const J = B.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), m = yield ht({ search: J, bank: A });
4805
4805
  m && (I = m), C && C();
4806
4806
  } catch (J) {
4807
- console.error("Error searching packages:", J), Dg.error(u("errorSearchingPackages"), {
4807
+ console.error("Error searching packages:", J), rg.error(u("errorSearchingPackages"), {
4808
4808
  autoClose: 5e3,
4809
4809
  closeButton: !0,
4810
4810
  icon: !0
@@ -5012,14 +5012,14 @@ function ft(k) {
5012
5012
  vA.className = "wgt:text-xl wgt:font-bold wgt:text-primary", vA.innerText = "0 VND", dA.appendChild(vA);
5013
5013
  const ZA = document.createElement("div");
5014
5014
  ZA.className = "wgt:flex wgt:justify-between wgt:gap-2", S.appendChild(ZA);
5015
- const tg = Eg({
5015
+ const hg = ng({
5016
5016
  type: "button",
5017
5017
  title: u("back"),
5018
5018
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
5019
5019
  handleClick: g
5020
5020
  });
5021
- ZA.appendChild(tg);
5022
- const hg = (b, nA, QA, W) => U(null, null, function* () {
5021
+ ZA.appendChild(hg);
5022
+ const cg = (b, nA, QA, W) => U(null, null, function* () {
5023
5023
  o();
5024
5024
  const gA = w.eInvoiceRegistration, { isUsedEInvoiceBefore: CA } = gA, $ = sC(gA, ["isUsedEInvoiceBefore"]);
5025
5025
  let cA = [
@@ -5060,10 +5060,10 @@ function ft(k) {
5060
5060
  });
5061
5061
  t(hA.orderId), A();
5062
5062
  } catch (hA) {
5063
- console.error("Error creating order:", hA), Qg(u("errorCreatingOrder") || "Failed to create order"), i();
5063
+ console.error("Error creating order:", hA), Ig(u("errorCreatingOrder") || "Failed to create order"), i();
5064
5064
  return;
5065
5065
  }
5066
- }), cg = Eg({
5066
+ }), wg = ng({
5067
5067
  type: "button",
5068
5068
  title: u("next"),
5069
5069
  className: "wgt:text-white wgt:bg-primary",
@@ -5078,7 +5078,7 @@ function ft(k) {
5078
5078
  quantity: G
5079
5079
  }), I(QA)) : I(null);
5080
5080
  let W = yA(qA({}, b), { quantity: Y }), CA = yA(qA({}, nA), { quantity: z });
5081
- E(W), n(CA), s(l), yield hg(
5081
+ E(W), n(CA), s(l), yield cg(
5082
5082
  QA,
5083
5083
  W,
5084
5084
  CA,
@@ -5086,7 +5086,7 @@ function ft(k) {
5086
5086
  );
5087
5087
  })
5088
5088
  });
5089
- ZA.appendChild(cg);
5089
+ ZA.appendChild(wg);
5090
5090
  function VA() {
5091
5091
  return U(this, null, function* () {
5092
5092
  var b, nA, QA, W, CA;
@@ -5110,12 +5110,12 @@ function ft(k) {
5110
5110
  if ($.status === "fulfilled" ? x = ((QA = $.value) == null ? void 0 : QA.isNewCustomer) || !1 : (console.error(
5111
5111
  "Failed to check new customer:",
5112
5112
  $.reason
5113
- ), Dg.error(
5113
+ ), rg.error(
5114
5114
  u("errorCheckingCustomer") || "Failed to check customer status"
5115
5115
  ), x = !1), gA.status === "fulfilled" ? r = gA.value || [] : (console.error(
5116
5116
  "Failed to load init packages:",
5117
5117
  gA.reason
5118
- ), Dg.error(
5118
+ ), rg.error(
5119
5119
  u("errorLoadingInitPackages") || "Failed to load registration packages"
5120
5120
  ), r = []), cA.status === "fulfilled" ? (((W = cA == null ? void 0 : cA.value) == null ? void 0 : W.length) > 0 && cA.value.forEach((Z) => {
5121
5121
  Z.codes.length > 0 && (q[Z.codes[0].code] = {
@@ -5147,7 +5147,7 @@ function ft(k) {
5147
5147
  console.error(
5148
5148
  "Failed to load invoice packages:",
5149
5149
  hA.reason
5150
- ), Dg.error(
5150
+ ), rg.error(
5151
5151
  u("errorLoadingInvoicePackages") || "Failed to load invoice packages"
5152
5152
  ), N([]), tA();
5153
5153
  if (eA.status === "fulfilled") {
@@ -5161,12 +5161,12 @@ function ft(k) {
5161
5161
  console.error(
5162
5162
  "Failed to load signature packages:",
5163
5163
  eA.reason
5164
- ), Dg.error(
5164
+ ), rg.error(
5165
5165
  u("errorLoadingSignaturePackages") || "Failed to load signature packages"
5166
5166
  ), v = [];
5167
- wg();
5167
+ eg();
5168
5168
  } catch ($) {
5169
- console.error("Unexpected error during data loading:", $), Dg.error(u("errorLoadingData") || "Failed to load data", {
5169
+ console.error("Unexpected error during data loading:", $), rg.error(u("errorLoadingData") || "Failed to load data", {
5170
5170
  autoClose: 5e3,
5171
5171
  closeButton: !0,
5172
5172
  icon: !0
@@ -5174,8 +5174,8 @@ function ft(k) {
5174
5174
  }
5175
5175
  });
5176
5176
  }
5177
- function wg() {
5178
- KA(), eg(), og(), _A(), mA();
5177
+ function eg() {
5178
+ KA(), og(), ag(), _A(), mA();
5179
5179
  }
5180
5180
  function bA(b, nA, QA) {
5181
5181
  const W = Object.values(q).find(
@@ -5210,7 +5210,7 @@ function ft(k) {
5210
5210
  ($) => $._id === m
5211
5211
  )) == null ? void 0 : W.code, QA = (CA = y().find(($) => $._id === b)) == null ? void 0 : CA.code;
5212
5212
  bA(nA, QA, () => {
5213
- m = b, jA.setSelectedPackageId(b), V(y()), ag(), og(), _A(), Y = 1, mA();
5213
+ m = b, jA.setSelectedPackageId(b), V(y()), ig(), ag(), _A(), Y = 1, mA();
5214
5214
  });
5215
5215
  }
5216
5216
  }), L.appendChild(jA.container);
@@ -5220,7 +5220,7 @@ function ft(k) {
5220
5220
  }
5221
5221
  }
5222
5222
  let WA = null;
5223
- function eg() {
5223
+ function og() {
5224
5224
  if (wA.innerHTML = "", v.length > 0)
5225
5225
  WA = wQ({
5226
5226
  type: "signature",
@@ -5234,7 +5234,7 @@ function ft(k) {
5234
5234
  ($) => $._id === f
5235
5235
  )) == null ? void 0 : W.code, QA = (CA = v.find(($) => $._id === b)) == null ? void 0 : CA.code;
5236
5236
  bA(nA, QA, () => {
5237
- f = b, WA.setSelectedPackageId(b), ag(), og(), _A(), z = 1, mA();
5237
+ f = b, WA.setSelectedPackageId(b), ig(), ag(), _A(), z = 1, mA();
5238
5238
  });
5239
5239
  }
5240
5240
  }), wA.appendChild(WA.container);
@@ -5245,7 +5245,7 @@ function ft(k) {
5245
5245
  }
5246
5246
  const SA = document.createElement("div");
5247
5247
  SA.className = "wgt:w-full", P.appendChild(SA);
5248
- function og() {
5248
+ function ag() {
5249
5249
  XA.remove(), SA.innerHTML = "";
5250
5250
  const b = y().find(
5251
5251
  (nA) => nA._id === m
@@ -5258,7 +5258,7 @@ function ft(k) {
5258
5258
  r[0].price
5259
5259
  )} VND`,
5260
5260
  required: !0,
5261
- description: Ig() === "vi" ? r[0].name : r[0].nameEn,
5261
+ description: Eg() === "vi" ? r[0].name : r[0].nameEn,
5262
5262
  isChecked: x && !(b != null && b.withoutInitialFee)
5263
5263
  });
5264
5264
  SA.appendChild(nA);
@@ -5266,7 +5266,7 @@ function ft(k) {
5266
5266
  }
5267
5267
  const YA = document.createElement("div");
5268
5268
  YA.className = "promotion-wrapper wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
5269
- function ag() {
5269
+ function ig() {
5270
5270
  const b = y().find(
5271
5271
  (QA) => QA._id === m
5272
5272
  ), nA = v.find(
@@ -5312,7 +5312,7 @@ function ft(k) {
5312
5312
  }).forEach((hA) => {
5313
5313
  const eA = document.createElement("div");
5314
5314
  eA.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", eA.innerText = hA;
5315
- const Z = Eg({
5315
+ const Z = ng({
5316
5316
  type: "button",
5317
5317
  title: "x",
5318
5318
  handleClick: () => {
@@ -5327,7 +5327,7 @@ function ft(k) {
5327
5327
  </svg>
5328
5328
  `, eA.appendChild(Z), W.appendChild(eA);
5329
5329
  });
5330
- const CA = Eg({
5330
+ const CA = ng({
5331
5331
  type: "button",
5332
5332
  title: u("apply"),
5333
5333
  className: "wgt:text-white wgt:bg-primary",
@@ -5377,7 +5377,7 @@ function ft(k) {
5377
5377
  const R = document.createElement("tr");
5378
5378
  R.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
5379
5379
  const BA = document.createElement("td");
5380
- BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText = Ig() === "vi" ? r[0].name : r[0].nameEn, R.appendChild(BA);
5380
+ BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText = Eg() === "vi" ? r[0].name : r[0].nameEn, R.appendChild(BA);
5381
5381
  const AA = document.createElement("td");
5382
5382
  AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", AA.innerText = u("package"), R.appendChild(AA);
5383
5383
  const lA = document.createElement("td");
@@ -5420,7 +5420,7 @@ function ft(k) {
5420
5420
  const BA = document.createElement("tr");
5421
5421
  BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
5422
5422
  const AA = document.createElement("td");
5423
- AA.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-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Ig() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
5423
+ AA.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-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Eg() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
5424
5424
  const lA = document.createElement("td");
5425
5425
  lA.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-sm:hidden", lA.innerText = u("package"), BA.appendChild(lA);
5426
5426
  const uA = document.createElement("td");
@@ -5464,7 +5464,7 @@ function ft(k) {
5464
5464
  const BA = document.createElement("tr");
5465
5465
  BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
5466
5466
  const AA = document.createElement("td");
5467
- AA.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-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Ig() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
5467
+ AA.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-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Eg() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
5468
5468
  const lA = document.createElement("td");
5469
5469
  lA.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-sm:hidden", lA.innerText = u("package"), BA.appendChild(lA);
5470
5470
  const uA = document.createElement("td");
@@ -5516,7 +5516,7 @@ function ft(k) {
5516
5516
  AA.colSpan = 3, AA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:col-span-3 wgt:max-sm:col-span-5 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-1", AA.innerHTML = `
5517
5517
  <div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:max-sm:justify-start">
5518
5518
  <img src="${qt}" alt="ticket" class="wgt:w-4 wgt:max-sm:w-5">
5519
- <span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${Ig() === "vi" ? R == null ? void 0 : R.name : (R == null ? void 0 : R.nameEn) || (R == null ? void 0 : R.code)}</span>
5519
+ <span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${Eg() === "vi" ? R == null ? void 0 : R.name : (R == null ? void 0 : R.nameEn) || (R == null ? void 0 : R.code)}</span>
5520
5520
  </div>
5521
5521
  `, BA.appendChild(AA);
5522
5522
  const lA = document.createElement("td");
@@ -5675,9 +5675,9 @@ function vt() {
5675
5675
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
5676
5676
  }), PC;
5677
5677
  }
5678
- var dC = {}, Bg = {}, oQ;
5678
+ var dC = {}, Qg = {}, oQ;
5679
5679
  function dg() {
5680
- if (oQ) return Bg;
5680
+ if (oQ) return Qg;
5681
5681
  oQ = 1;
5682
5682
  let A;
5683
5683
  const g = [
@@ -5724,26 +5724,26 @@ function dg() {
5724
5724
  3532,
5725
5725
  3706
5726
5726
  ];
5727
- return Bg.getSymbolSize = function(C) {
5727
+ return Qg.getSymbolSize = function(C) {
5728
5728
  if (!C) throw new Error('"version" cannot be null or undefined');
5729
5729
  if (C < 1 || C > 40) throw new Error('"version" should be in range from 1 to 40');
5730
5730
  return C * 4 + 17;
5731
- }, Bg.getSymbolTotalCodewords = function(C) {
5731
+ }, Qg.getSymbolTotalCodewords = function(C) {
5732
5732
  return g[C];
5733
- }, Bg.getBCHDigit = function(B) {
5733
+ }, Qg.getBCHDigit = function(B) {
5734
5734
  let C = 0;
5735
5735
  for (; B !== 0; )
5736
5736
  C++, B >>>= 1;
5737
5737
  return C;
5738
- }, Bg.setToSJISFunction = function(C) {
5738
+ }, Qg.setToSJISFunction = function(C) {
5739
5739
  if (typeof C != "function")
5740
5740
  throw new Error('"toSJISFunc" is not a valid function.');
5741
5741
  A = C;
5742
- }, Bg.isKanjiModeEnabled = function() {
5742
+ }, Qg.isKanjiModeEnabled = function() {
5743
5743
  return typeof A != "undefined";
5744
- }, Bg.toSJIS = function(C) {
5744
+ }, Qg.toSJIS = function(C) {
5745
5745
  return A(C);
5746
- }, Bg;
5746
+ }, Qg;
5747
5747
  }
5748
5748
  var vC = {}, aQ;
5749
5749
  function nB() {
@@ -7224,7 +7224,7 @@ function Zt({
7224
7224
  k();
7225
7225
  const J = () => {
7226
7226
  w = setInterval(() => {
7227
- e--, k(), e <= 0 && fg(w);
7227
+ e--, k(), e <= 0 && Bg(w);
7228
7228
  }, 1e3), lI(w);
7229
7229
  };
7230
7230
  J(), s.appendChild(D);
@@ -7271,7 +7271,7 @@ function Zt({
7271
7271
  const z = document.createElement("h4");
7272
7272
  z.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", z.innerText = u("digitalSignaturePackage");
7273
7273
  const j = document.createElement("span");
7274
- if (j.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", Ig(), u(B.duration.unit), j.innerText = B ? `${String(B == null ? void 0 : B.code)}` : "", Y.appendChild(z), Y.appendChild(j), l.appendChild(Y), c && c.length > 0) {
7274
+ if (j.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", Eg(), u(B.duration.unit), j.innerText = B ? `${String(B == null ? void 0 : B.code)}` : "", Y.appendChild(z), Y.appendChild(j), l.appendChild(Y), c && c.length > 0) {
7275
7275
  const d = document.createElement("div");
7276
7276
  d.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
7277
7277
  const L = document.createElement("h4");
@@ -7290,16 +7290,16 @@ function Zt({
7290
7290
  o.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", o.innerText = u("paymentAmount");
7291
7291
  const i = document.createElement("span");
7292
7292
  i.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", i.innerText = I.toLocaleString("vi-VN") + " VND", K.appendChild(o), K.appendChild(i), l.appendChild(K), f.appendChild(l);
7293
- const P = Eg({
7293
+ const P = ng({
7294
7294
  title: u("cancelTransaction"),
7295
7295
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
7296
7296
  handleClick: () => {
7297
- w && fg(w);
7297
+ w && Bg(w);
7298
7298
  const { container: d, open: L } = eC({
7299
7299
  message: u("transactionCanceled"),
7300
7300
  okLabel: u("ok"),
7301
7301
  onClose: () => {
7302
- e = 3600, fg(w), typeof h == "function" && h();
7302
+ e = 3600, Bg(w), typeof h == "function" && h();
7303
7303
  },
7304
7304
  preventClose: !0
7305
7305
  });
@@ -7307,7 +7307,7 @@ function Zt({
7307
7307
  }
7308
7308
  });
7309
7309
  return f.appendChild(P), a.appendChild(f), window.addEventListener("beforeunload", () => {
7310
- w && fg(w);
7310
+ w && Bg(w);
7311
7311
  }), {
7312
7312
  container: a,
7313
7313
  setSelectedProvider(d) {
@@ -7366,18 +7366,18 @@ function Wt(n) {
7366
7366
  theme: I,
7367
7367
  selectedPromotions: (Q == null ? void 0 : Q.selectedPromotions) || [],
7368
7368
  onResetToStep1: () => {
7369
- Q != null && Q.onResetToStep1 && Q.onResetToStep1();
7369
+ Q != null && Q.onResetToStep1 && Q.onResetToStep1(), Bg(h);
7370
7370
  }
7371
7371
  }));
7372
7372
  J.appendChild(q), s.appendChild(J);
7373
7373
  const x = document.createElement("div");
7374
7374
  x.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
7375
- const O = Eg({
7375
+ const O = ng({
7376
7376
  type: "button",
7377
7377
  title: u("back"),
7378
7378
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
7379
7379
  handleClick: () => {
7380
- g && g();
7380
+ g && (g(), Bg(h));
7381
7381
  }
7382
7382
  });
7383
7383
  x.appendChild(O), s.appendChild(x);
@@ -7401,9 +7401,9 @@ function Wt(n) {
7401
7401
  packages: o.packages,
7402
7402
  promotionCodes: o.promotionCodes
7403
7403
  })).orderId;
7404
- N !== a && (a = N, E(N), yield z(N), K(), T());
7404
+ N !== a && (a = N, E(N), yield z(N), T());
7405
7405
  } catch (L) {
7406
- console.error("Error creating order:", L), Qg(u("errorCreatingOrder") || "Failed to create order");
7406
+ console.error("Error creating order:", L), Ig(u("errorCreatingOrder") || "Failed to create order");
7407
7407
  return;
7408
7408
  } finally {
7409
7409
  k();
@@ -7439,11 +7439,11 @@ function Wt(n) {
7439
7439
  accountName: (t == null ? void 0 : t.merchant_name) || "",
7440
7440
  accountNumber: (t == null ? void 0 : t.va_account_no) || "",
7441
7441
  bankName: (t == null ? void 0 : t.bank_code) || ""
7442
- });
7442
+ }), K();
7443
7443
  } catch (N) {
7444
7444
  if (((P = (i = N.response) == null ? void 0 : i.data) == null ? void 0 : P.error_code) === "BILL_ID_EXISTED") {
7445
7445
  if (console.log("Bill ID existed, recalling createOrder..."), e = !1, w++, w >= Vt) {
7446
- Qg(u("errorQRGeneration"), {
7446
+ Ig(u("errorQRGeneration"), {
7447
7447
  okLabel: u("ok"),
7448
7448
  onClose: () => {
7449
7449
  g();
@@ -7454,7 +7454,7 @@ function Wt(n) {
7454
7454
  yield Y();
7455
7455
  return;
7456
7456
  } else if (((L = (d = N.response) == null ? void 0 : d.data) == null ? void 0 : L.error_code) === "AUTHEN_FAIL") {
7457
- Qg(u("errorQRGeneration"), {
7457
+ Ig(u("errorQRGeneration"), {
7458
7458
  okLabel: u("ok"),
7459
7459
  onClose: () => {
7460
7460
  G();
@@ -7462,7 +7462,7 @@ function Wt(n) {
7462
7462
  });
7463
7463
  return;
7464
7464
  } else
7465
- Qg(
7465
+ Ig(
7466
7466
  u(
7467
7467
  "errorQRGeneration",
7468
7468
  "Không thể tạo mã QR thanh toán. Vui lòng thử lại."
@@ -7485,14 +7485,14 @@ function Wt(n) {
7485
7485
  j = !navigator.onLine;
7486
7486
  }
7487
7487
  function K() {
7488
- h && fg(h), h = setInterval(() => U(null, null, function* () {
7488
+ h && Bg(h), h = setInterval(() => U(null, null, function* () {
7489
7489
  var o, i;
7490
7490
  try {
7491
7491
  const P = yield ot(a);
7492
7492
  if (P.paymentStatus === "pending")
7493
7493
  return;
7494
7494
  const d = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed");
7495
- fg(h);
7495
+ Bg(h);
7496
7496
  const L = eC({
7497
7497
  message: d,
7498
7498
  okLabel: "OK",
@@ -7504,7 +7504,7 @@ function Wt(n) {
7504
7504
  });
7505
7505
  s.appendChild(L.container), L.open();
7506
7506
  } catch (P) {
7507
- j ? Qg(u("errorNetwork"), {
7507
+ j ? Ig(u("errorNetwork"), {
7508
7508
  okLabel: u("tryAgain"),
7509
7509
  onClose: function() {
7510
7510
  return U(this, null, function* () {
@@ -7512,14 +7512,14 @@ function Wt(n) {
7512
7512
  });
7513
7513
  },
7514
7514
  isOffline: j
7515
- }) : ((o = P.response) == null ? void 0 : o.status) === 404 ? Qg(u("errorOrderNotFound"), {
7515
+ }) : ((o = P.response) == null ? void 0 : o.status) === 404 ? Ig(u("errorOrderNotFound"), {
7516
7516
  okLabel: u("tryAgain"),
7517
7517
  onClose: function() {
7518
7518
  return U(this, null, function* () {
7519
7519
  yield Y();
7520
7520
  });
7521
7521
  }
7522
- }) : ((i = P.response) == null ? void 0 : i.status) === 410 ? Qg(u("paymentTimeoutMessage"), {
7522
+ }) : ((i = P.response) == null ? void 0 : i.status) === 410 ? Ig(u("paymentTimeoutMessage"), {
7523
7523
  okLabel: u("tryAgain"),
7524
7524
  onClose: function() {
7525
7525
  return U(this, null, function* () {
@@ -7530,8 +7530,8 @@ function Wt(n) {
7530
7530
  }
7531
7531
  }), 5e3), lI(h);
7532
7532
  }
7533
- return t && K(), window.addEventListener("online", S), window.addEventListener("offline", S), window.addEventListener("beforeunload", function() {
7534
- h && fg(h);
7533
+ return window.addEventListener("online", S), window.addEventListener("offline", S), window.addEventListener("beforeunload", function() {
7534
+ h && Bg(h);
7535
7535
  }), { container: s };
7536
7536
  });
7537
7537
  }
@@ -7653,7 +7653,7 @@ function _t({
7653
7653
  K.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", K.appendChild(document.createTextNode(u("informationSent"))), j.appendChild(S), j.appendChild(K);
7654
7654
  const o = document.createElement("div");
7655
7655
  o.className = "wgt:w-full wgt:flex wgt:justify-center", n.appendChild(o);
7656
- const i = Eg({
7656
+ const i = ng({
7657
7657
  type: "button",
7658
7658
  title: u("completeRegistration"),
7659
7659
  className: "wgt:text-white",
@@ -7943,7 +7943,7 @@ let BC = /* @__PURE__ */ new Set();
7943
7943
  function lI(A) {
7944
7944
  A && BC.add(A);
7945
7945
  }
7946
- function fg(A) {
7946
+ function Bg(A) {
7947
7947
  A && (BC.delete(A), window.clearInterval(A));
7948
7948
  }
7949
7949
  function c0() {
@@ -8231,5 +8231,5 @@ export {
8231
8231
  Y0 as InvoiceRegisterWidget,
8232
8232
  lI as registerWidgetInterval,
8233
8233
  c0 as stopAllIntervals,
8234
- fg as unregisterWidgetInterval
8234
+ Bg as unregisterWidgetInterval
8235
8235
  };