@invoice-sdk/widget 1.97.0 → 1.97.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ var W = (g, A, E) => new Promise((B, C) => {
35
35
  }, n = (I) => I.done ? B(I.value) : Promise.resolve(I.value).then(Q, t);
36
36
  n((E = E.apply(g, A)).next());
37
37
  });
38
- import { t as a, g as mB, a as cQ, b as wQ, C as eQ, G as oQ, c as aQ, d as rB, e as ag, f as DQ, h as uQ, i as zg, O as SC, s as og, 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-Cd6iwxdU.js";
38
+ import { t as a, g as mB, a as cQ, b as wQ, C as eQ, G as oQ, c as aQ, d as rB, e as ag, f as DQ, h as uQ, i as zg, O as SC, s as og, 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-D4WgVrRp.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");
@@ -62,10 +62,10 @@ function tC({ steps: g = [], currentStep: A = 1 } = {}) {
62
62
  const Q = [];
63
63
  function t(I) {
64
64
  g.forEach((c, w) => {
65
- const i = w + 1, D = I === g.length + 1 ? i < g.length : I !== i, o = document.createElement("div");
65
+ const s = w + 1, D = I === g.length + 1 ? s < g.length : I !== s, o = document.createElement("div");
66
66
  o.setAttribute("role", "listitem"), o.setAttribute(
67
67
  "aria-label",
68
- `Step ${i} of ${g.length}: ${c.label}`
68
+ `Step ${s} of ${g.length}: ${c.label}`
69
69
  ), o.className = [
70
70
  "wgt:flex-1",
71
71
  "wgt:flex",
@@ -76,8 +76,8 @@ function tC({ steps: g = [], currentStep: A = 1 } = {}) {
76
76
  w < g.length - 1 ? "wgt:pr-9 wgt:@max-2xl:pr-0" : "",
77
77
  D ? "wgt:@max-2xl:hidden" : "wgt:@max-2xl:bg-primary/15"
78
78
  ].filter(Boolean).join(" ");
79
- const s = document.createElement("div");
80
- s.className = [
79
+ const i = document.createElement("div");
80
+ i.className = [
81
81
  "wgt:flex",
82
82
  "wgt:items-center",
83
83
  "wgt:justify-center",
@@ -87,16 +87,16 @@ function tC({ steps: g = [], currentStep: A = 1 } = {}) {
87
87
  "wgt:mr-4"
88
88
  ].join(" ");
89
89
  const u = document.createElement("span");
90
- u.innerText = String(i), u.className = "wgt:text-white wgt:font-medium", s.appendChild(u);
91
- const Y = document.createElement("span");
92
- Y.innerText = c.label, Y.className = "wgt:font-medium wgt:whitespace-nowrap", o.append(s, Y), C.append(o), Q.push({ wrap: o, circle: s, label: Y });
90
+ u.innerText = String(s), u.className = "wgt:text-white wgt:font-medium", i.appendChild(u);
91
+ const R = document.createElement("span");
92
+ R.innerText = c.label, R.className = "wgt:font-medium wgt:whitespace-nowrap", o.append(i, R), C.append(o), Q.push({ wrap: o, circle: i, label: R });
93
93
  }), E.append(B, C);
94
94
  }
95
95
  t(A);
96
96
  function n(I) {
97
- const c = g.length, w = Math.max(0, Math.min(I, c)), i = w / c * 100;
98
- B.style.width = `${i}%`, w === c ? (B.style.clipPath = "none", B.style.borderTopRightRadius = "10px", B.style.borderBottomRightRadius = "10px") : (B.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)", B.style.borderTopRightRadius = "0", B.style.borderBottomRightRadius = "0"), Q.forEach(({ circle: D, label: o }, s) => {
99
- s + 1 <= w ? (D.classList.add("wgt:bg-icon-primary"), D.classList.remove("wgt:bg-icon-soft-400"), o.classList.add("wgt:text-primary-dark"), o.classList.remove("wgt:text-soft-400")) : (D.classList.add("wgt:bg-icon-soft-400"), D.classList.remove("wgt:bg-icon-primary"), o.classList.add("wgt:text-soft-400"), o.classList.remove("wgt:text-primary-dark"));
97
+ const c = g.length, w = Math.max(0, Math.min(I, c)), s = w / c * 100;
98
+ B.style.width = `${s}%`, w === c ? (B.style.clipPath = "none", B.style.borderTopRightRadius = "10px", B.style.borderBottomRightRadius = "10px") : (B.style.clipPath = "polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%)", B.style.borderTopRightRadius = "0", B.style.borderBottomRightRadius = "0"), Q.forEach(({ circle: D, label: o }, i) => {
99
+ i + 1 <= w ? (D.classList.add("wgt:bg-icon-primary"), D.classList.remove("wgt:bg-icon-soft-400"), o.classList.add("wgt:text-primary-dark"), o.classList.remove("wgt:text-soft-400")) : (D.classList.add("wgt:bg-icon-soft-400"), D.classList.remove("wgt:bg-icon-primary"), o.classList.add("wgt:text-soft-400"), o.classList.remove("wgt:text-primary-dark"));
100
100
  });
101
101
  }
102
102
  return n(A), {
@@ -193,7 +193,7 @@ function Ng({
193
193
  }) {
194
194
  const n = document.createElement("div");
195
195
  if (n.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:cursor-pointer", t) {
196
- let i = function(D) {
196
+ let s = function(D) {
197
197
  D ? (c.classList.add("wgt:bg-primary", "wgt:border-primary"), c.classList.remove("wgt:border-weak-50")) : (c.classList.remove("wgt:bg-primary", "wgt:border-primary"), c.classList.add("wgt:border-weak-50")), w.innerHTML = D ? `<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
198
198
  <mask id="path-1-inside-1_14170_92697" fill="white">
199
199
  <path d="M3.58055 7.58156C3.38055 7.58156 3.19055 7.50156 3.05055 7.36156L0.220552 4.53156C-0.0694482 4.24156 -0.0694482 3.76156 0.220552 3.47156C0.510552 3.18156 0.990552 3.18156 1.28055 3.47156L3.58055 5.77156L8.72055 0.631563C9.01055 0.341563 9.49055 0.341563 9.78055 0.631563C10.0706 0.921563 10.0706 1.40156 9.78055 1.69156L4.11055 7.36156C3.97055 7.50156 3.78055 7.58156 3.58055 7.58156Z"/>
@@ -228,8 +228,8 @@ function Ng({
228
228
  Q ? "wgt:cursor-not-allowed" : "wgt:cursor-pointer"
229
229
  ].join(" ");
230
230
  const w = document.createElement("div");
231
- i(B), c.appendChild(w), c.addEventListener("click", (D) => {
232
- D.stopPropagation(), !Q && (I = !I, i(I), C(I));
231
+ s(B), c.appendChild(w), c.addEventListener("click", (D) => {
232
+ D.stopPropagation(), !Q && (I = !I, s(I), C(I));
233
233
  }), n.append(c);
234
234
  } else {
235
235
  const I = document.createElement("div");
@@ -240,11 +240,11 @@ function Ng({
240
240
  w.className = `wgt:absolute wgt:w-5 wgt:h-5 wgt:rounded-full wgt:border wgt:border-white wgt:border-3 wgt:transition-all wgt:duration-200 wgt:ring-2
241
241
 
242
242
  ${B ? "wgt:ring-primary wgt:bg-primary" : "wgt:ring-grey-6 wgt:bg-grey-6"}`;
243
- const i = document.createElement("span");
244
- i.innerText = E, c.addEventListener("change", (D) => {
243
+ const s = document.createElement("span");
244
+ s.innerText = E, c.addEventListener("change", (D) => {
245
245
  const o = D.target.checked;
246
246
  typeof C == "function" && C(o), c.checked = !1;
247
- }), I.append(c, i), I.append(w), n.append(I);
247
+ }), I.append(c, s), I.append(w), n.append(I);
248
248
  }
249
249
  return {
250
250
  container: n
@@ -276,8 +276,8 @@ function MQ({
276
276
  ].join(" "), Q.style.scrollSnapType = "x mandatory", Q.style.overflowX = "auto", Q.style.scrollBehavior = "smooth", Q.style.scrollbarWidth = "none", Q.style.msOverflowStyle = "none", Q.style.WebkitOverflowScrolling = "touch", Q.style.overflowY = "hidden", B.appendChild(Q);
277
277
  function t() {
278
278
  Q.innerHTML = "", g.forEach((w) => {
279
- const i = w.route === A, D = document.createElement("div");
280
- D.dataset.checked = i ? "true" : "false", D.className = [
279
+ const s = w.route === A, D = document.createElement("div");
280
+ D.dataset.checked = s ? "true" : "false", D.className = [
281
281
  "wgt:flex",
282
282
  "wgt:items-center",
283
283
  "wgt:justify-between",
@@ -290,26 +290,26 @@ function MQ({
290
290
  "wgt:cursor-pointer",
291
291
  "wgt:transition-colors",
292
292
  "wgt:duration-200",
293
- i ? "wgt:border-primary" : ""
293
+ s ? "wgt:border-primary" : ""
294
294
  ].filter(Boolean).join(" "), D.addEventListener("click", () => {
295
295
  A = w.route, typeof E == "function" && E(w), t();
296
296
  });
297
297
  const o = document.createElement("div");
298
298
  o.className = "wgt:flex wgt:items-center wgt:gap-3";
299
- const s = document.createElement("img");
300
- s.src = w.logoUrl, s.alt = w.name, s.className = "wgt:h-8 wgt:object-contain";
299
+ const i = document.createElement("img");
300
+ i.src = w.logoUrl, i.alt = w.name, i.className = "wgt:h-8 wgt:object-contain";
301
301
  const u = document.createElement("div");
302
302
  u.className = "wgt:w-[1px] wgt:h-8 wgt:bg-border-light";
303
- const Y = document.createElement("label");
304
- Y.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-black wgt:uppercase", Y.innerText = w.name, o.appendChild(s), o.appendChild(u), o.appendChild(Y);
305
- const { container: T } = Ng({
306
- checked: i,
307
- onChange: (M) => {
308
- M && (A = w.route, typeof E == "function" && E(w), t());
303
+ const R = document.createElement("label");
304
+ R.className = "wgt:text-base wgt:font-semibold wgt:leading-5 wgt:text-black wgt:uppercase", R.innerText = w.name, o.appendChild(i), o.appendChild(u), o.appendChild(R);
305
+ const { container: M } = Ng({
306
+ checked: s,
307
+ onChange: (d) => {
308
+ d && (A = w.route, typeof E == "function" && E(w), t());
309
309
  },
310
310
  disabled: !1
311
311
  });
312
- D.appendChild(o), D.appendChild(T), Q.appendChild(D);
312
+ D.appendChild(o), D.appendChild(M), Q.appendChild(D);
313
313
  });
314
314
  }
315
315
  t();
@@ -347,17 +347,17 @@ function HA({
347
347
  horizontal: c = !1,
348
348
  note: w = null
349
349
  }) {
350
- const i = document.createElement("div");
351
- if (i.className = "wgt:w-full " + (c ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), C) {
350
+ const s = document.createElement("div");
351
+ if (s.className = "wgt:w-full " + (c ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-1 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2"), C) {
352
352
  const u = document.createElement("label");
353
353
  if (u.htmlFor = g, u.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal", u.innerText = C, Q) {
354
- const Y = document.createElement("span");
355
- Y.className = "wgt:text-red-500 wgt:ml-1", Y.innerText = "*", u.appendChild(Y);
354
+ const R = document.createElement("span");
355
+ R.className = "wgt:text-red-500 wgt:ml-1", R.innerText = "*", u.appendChild(R);
356
356
  }
357
- i.appendChild(u);
357
+ s.appendChild(u);
358
358
  }
359
359
  const D = document.createElement("div");
360
- D.className = "wgt:relative wgt:w-full wgt:col-span-4 wgt:flex wgt:flex-col wgt:gap-2", i.appendChild(D);
360
+ D.className = "wgt:relative wgt:w-full wgt:col-span-4 wgt:flex wgt:flex-col wgt:gap-2", s.appendChild(D);
361
361
  const o = document.createElement("input");
362
362
  o.type = E, o.name = g, o.id = g, o.value = A, o.placeholder = B, o.readOnly = I, o.autocomplete = "off", o.autocapitalize = "off", o.spellcheck = !1, o.className = [
363
363
  "wgt:col-span-4",
@@ -372,18 +372,18 @@ function HA({
372
372
  ].join(" "), Q && o.setAttribute("required", "true"), typeof n == "function" && o.addEventListener("input", n), E === "number" && o.addEventListener("wheel", (u) => {
373
373
  u.preventDefault();
374
374
  }, { passive: !1 });
375
- const s = document.createElement("span");
376
- if (s.className = "wgt:w-fit wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", s.innerText = t || "", t || (s.style.display = "none"), D.appendChild(o), w) {
375
+ const i = document.createElement("span");
376
+ if (i.className = "wgt:w-fit wgt:text-red-500 wgt:text-sm wgt:whitespace-nowrap", i.innerText = t || "", t || (i.style.display = "none"), D.appendChild(o), w) {
377
377
  const u = document.createElement("ul");
378
378
  u.className = "wgt:list-outside wgt:@max-5xl:list-inside wgt:list-disc wgt:text-sm wgt:text-[#8C8C8C] wgt:italic";
379
- const Y = document.createElement("li");
380
- Y.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic wgt:whitespace-nowrap wgt:@max-2xl:whitespace-normal", Y.innerText = w, u.appendChild(Y), D.appendChild(u);
379
+ const R = document.createElement("li");
380
+ R.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic wgt:whitespace-nowrap wgt:@max-2xl:whitespace-normal", R.innerText = w, u.appendChild(R), D.appendChild(u);
381
381
  }
382
- return D.appendChild(s), {
383
- container: i,
382
+ return D.appendChild(i), {
383
+ container: s,
384
384
  inputEl: o,
385
385
  setError(u) {
386
- u ? (s.innerText = u, s.style.display = "block", o.classList.remove("wgt:border-gray-300", "wgt:focus:border-primary"), o.classList.add("wgt:border-red-500", "wgt:focus:border-red-500")) : (s.innerText = "", s.style.display = "none", o.classList.remove("wgt:border-red-500", "wgt:focus:border-red-500"), o.classList.add("wgt:border-gray-300", "wgt:focus:border-primary"));
386
+ u ? (i.innerText = u, i.style.display = "block", o.classList.remove("wgt:border-gray-300", "wgt:focus:border-primary"), o.classList.add("wgt:border-red-500", "wgt:focus:border-red-500")) : (i.innerText = "", i.style.display = "none", o.classList.remove("wgt:border-red-500", "wgt:focus:border-red-500"), o.classList.add("wgt:border-gray-300", "wgt:focus:border-primary"));
387
387
  },
388
388
  getValue() {
389
389
  return o.value;
@@ -404,10 +404,10 @@ function Kg({
404
404
  }) {
405
405
  const w = document.createElement("div");
406
406
  w.className = "wgt:w-full " + (I ? "wgt:@max-5xl:flex wgt:@max-5xl:flex-col wgt:@max-5xl:items-start wgt:@max-5xl:gap-2 wgt:grid wgt:grid-cols-6 wgt:items-start wgt:gap-2" : "wgt:flex wgt:flex-col wgt:gap-2");
407
- const i = document.createElement("label");
408
- if (i.htmlFor = g, i.className = "wgt:font-medium wgt:text-text-sub-600 wgt:whitespace-nowrap wgt:col-span-2", i.innerText = B, w.appendChild(i), n) {
407
+ const s = document.createElement("label");
408
+ if (s.htmlFor = g, s.className = "wgt:font-medium wgt:text-text-sub-600 wgt:whitespace-nowrap wgt:col-span-2", s.innerText = B, w.appendChild(s), n) {
409
409
  const D = document.createElement("span");
410
- D.className = "wgt:text-red-500 wgt:ml-1", D.innerText = "*", i.appendChild(D);
410
+ D.className = "wgt:text-red-500 wgt:ml-1", D.innerText = "*", s.appendChild(D);
411
411
  }
412
412
  if (c) {
413
413
  const D = document.createElement("div");
@@ -428,17 +428,17 @@ function Kg({
428
428
  "wgt:bg-white",
429
429
  Q ? "wgt:border-red-500" : "wgt:border-gray-300"
430
430
  ].join(" ");
431
- const s = document.createElement("div");
432
- s.className = "wgt:absolute wgt:top-full wgt:left-0 wgt:right-0 wgt:bg-white wgt:border wgt:border-gray-300 wgt:rounded wgt:shadow-lg wgt:z-50 wgt:hidden wgt:max-h-[500px] wgt:overflow-y-auto";
431
+ const i = document.createElement("div");
432
+ i.className = "wgt:absolute wgt:top-full wgt:left-0 wgt:right-0 wgt:bg-white wgt:border wgt:border-gray-300 wgt:rounded wgt:shadow-lg wgt:z-50 wgt:hidden wgt:max-h-[500px] wgt:overflow-y-auto";
433
433
  const u = document.createElement("div");
434
434
  u.className = "wgt:divide-y wgt:divide-gray-200";
435
- let Y = A, T = null, M = [...E];
435
+ let R = A, M = null, d = [...E];
436
436
  const r = () => {
437
- const m = E.find((f) => f.id ? f.id === T : f.value === Y);
437
+ const m = E.find((f) => f.id ? f.id === M : f.value === R);
438
438
  return m ? m.label : "";
439
439
  };
440
440
  o.value = r();
441
- const P = (m = M) => {
441
+ const P = (m = d) => {
442
442
  if (u.innerHTML = "", m.length === 0) {
443
443
  const f = document.createElement("div");
444
444
  f.className = "wgt:px-3 wgt:py-2 wgt:text-gray-500 wgt:text-sm", f.innerText = `${a("noResults", "Không tìm thấy kết quả")}`, u.appendChild(f);
@@ -452,57 +452,57 @@ function Kg({
452
452
  "wgt:cursor-pointer",
453
453
  "wgt:hover:bg-gray-100",
454
454
  "wgt:text-sm",
455
- f.id ? T === f.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : Y === f.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
455
+ f.id ? M === f.id ? "wgt:bg-blue-50 wgt:text-blue-700" : "" : R === f.value ? "wgt:bg-blue-50 wgt:text-blue-700" : ""
456
456
  ].filter(Boolean).join(" "), v.innerText = f.label, v.dataset.value = f.value, v.addEventListener("click", () => {
457
- if (f.id && (T = f.id), Y = f.value, o.value = f.label, s.classList.add("wgt:hidden"), typeof t == "function") {
458
- const H = { target: { value: f.value } };
459
- f.id && (H.target.id = f.id), t(H);
457
+ if (f.id && (M = f.id), R = f.value, o.value = f.label, i.classList.add("wgt:hidden"), typeof t == "function") {
458
+ const k = { target: { value: f.value } };
459
+ f.id && (k.target.id = f.id), t(k);
460
460
  }
461
461
  }), u.appendChild(v);
462
462
  });
463
463
  };
464
464
  o.addEventListener("input", (m) => {
465
465
  const f = m.target.value.toLowerCase();
466
- M = E.filter(
466
+ d = E.filter(
467
467
  (v) => v.label.toLowerCase().includes(f)
468
- ), P(M), s.classList.contains("wgt:hidden") || s.classList.remove("wgt:hidden");
468
+ ), P(d), i.classList.contains("wgt:hidden") || i.classList.remove("wgt:hidden");
469
469
  }), o.addEventListener("focus", () => {
470
- s.classList.remove("wgt:hidden"), P();
470
+ i.classList.remove("wgt:hidden"), P();
471
471
  }), document.addEventListener("click", (m) => {
472
- D.contains(m.target) || s.classList.add("wgt:hidden");
472
+ D.contains(m.target) || i.classList.add("wgt:hidden");
473
473
  }), o.addEventListener("keydown", (m) => {
474
- m.key === "Escape" && s.classList.add("wgt:hidden");
475
- }), s.appendChild(u), D.appendChild(o), D.appendChild(s), P();
476
- const J = document.createElement("select");
477
- J.style.display = "none", J.name = g, J.id = g, E.forEach((m) => {
474
+ m.key === "Escape" && i.classList.add("wgt:hidden");
475
+ }), i.appendChild(u), D.appendChild(o), D.appendChild(i), P();
476
+ const Y = document.createElement("select");
477
+ Y.style.display = "none", Y.name = g, Y.id = g, E.forEach((m) => {
478
478
  const f = document.createElement("option");
479
- f.value = m.value, f.innerText = m.label, m.value === A && (f.selected = !0), J.appendChild(f);
480
- }), w.appendChild(D), w.appendChild(J);
481
- const l = document.createElement("span");
482
- return l.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", l.innerText = Q || "", Q || (l.style.display = "none"), w.appendChild(l), {
479
+ f.value = m.value, f.innerText = m.label, m.value === A && (f.selected = !0), Y.appendChild(f);
480
+ }), w.appendChild(D), w.appendChild(Y);
481
+ const T = document.createElement("span");
482
+ return T.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", T.innerText = Q || "", Q || (T.style.display = "none"), w.appendChild(T), {
483
483
  container: w,
484
- selectEl: J,
484
+ selectEl: Y,
485
485
  setError(m) {
486
- m ? (l.innerText = m, l.style.display = "block", o.classList.remove("wgt:border-gray-300"), o.classList.add("wgt:border-red-500")) : (l.innerText = "", l.style.display = "none", o.classList.remove("wgt:border-red-500"), o.classList.add("wgt:border-gray-300"));
486
+ m ? (T.innerText = m, T.style.display = "block", o.classList.remove("wgt:border-gray-300"), o.classList.add("wgt:border-red-500")) : (T.innerText = "", T.style.display = "none", o.classList.remove("wgt:border-red-500"), o.classList.add("wgt:border-gray-300"));
487
487
  },
488
488
  getValue() {
489
- return Y;
489
+ return R;
490
490
  },
491
491
  setValue(m, f, v) {
492
- T = v || null, Y = m || "";
493
- const H = E.find((x) => x.id ? x.id === v : x.value === m);
494
- H ? (o.value = H.label, J.value = m, P()) : (o.value = f || "", J.value = m || "", P());
492
+ M = v || null, R = m || "";
493
+ const k = E.find((H) => H.id ? H.id === v : H.value === m);
494
+ k ? (o.value = k.label, Y.value = m, P()) : (o.value = f || "", Y.value = m || "", P());
495
495
  },
496
496
  setOptions(m) {
497
- for (E.splice(0, E.length, ...m), M = [...m]; J.options.length > 0; )
498
- J.remove(0);
497
+ for (E.splice(0, E.length, ...m), d = [...m]; Y.options.length > 0; )
498
+ Y.remove(0);
499
499
  m.forEach((f) => {
500
500
  const v = document.createElement("option");
501
- v.value = f.value, v.innerText = f.label, J.appendChild(v);
501
+ v.value = f.value, v.innerText = f.label, Y.appendChild(v);
502
502
  }), P();
503
503
  },
504
504
  setDisabled(m) {
505
- o.disabled = !!m, J.disabled = !!m, m ? (D.classList.add("wgt:opacity-75"), s.classList.add("wgt:hidden")) : D.classList.remove("wgt:opacity-75");
505
+ o.disabled = !!m, Y.disabled = !!m, m ? (D.classList.add("wgt:opacity-75"), i.classList.add("wgt:hidden")) : D.classList.remove("wgt:opacity-75");
506
506
  }
507
507
  };
508
508
  } else {
@@ -525,15 +525,15 @@ function Kg({
525
525
  "select",
526
526
  "Chọn"
527
527
  )} ${B.toLowerCase()} --`, D.appendChild(o), E.forEach((u) => {
528
- const Y = document.createElement("option");
529
- Y.value = u.value, Y.innerText = u.label, u.value === A && (Y.selected = !0), D.appendChild(Y);
528
+ const R = document.createElement("option");
529
+ R.value = u.value, R.innerText = u.label, u.value === A && (R.selected = !0), D.appendChild(R);
530
530
  }), typeof t == "function" && D.addEventListener("change", t), w.appendChild(D);
531
- const s = document.createElement("span");
532
- return s.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", s.innerText = Q || "", Q || (s.style.display = "none"), w.appendChild(s), {
531
+ const i = document.createElement("span");
532
+ return i.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", i.innerText = Q || "", Q || (i.style.display = "none"), w.appendChild(i), {
533
533
  container: w,
534
534
  selectEl: D,
535
535
  setError(u) {
536
- u ? (s.innerText = u, s.style.display = "block", D.classList.remove("wgt:border-gray-300"), D.classList.add("wgt:border-red-500")) : (s.innerText = "", s.style.display = "none", D.classList.remove("wgt:border-red-500"), D.classList.add("wgt:border-gray-300"));
536
+ u ? (i.innerText = u, i.style.display = "block", D.classList.remove("wgt:border-gray-300"), D.classList.add("wgt:border-red-500")) : (i.innerText = "", i.style.display = "none", D.classList.remove("wgt:border-red-500"), D.classList.add("wgt:border-gray-300"));
537
537
  },
538
538
  getValue() {
539
539
  return D.value;
@@ -541,9 +541,9 @@ function Kg({
541
541
  setOptions(u) {
542
542
  for (; D.options.length > 1; )
543
543
  D.remove(1);
544
- u.forEach((Y) => {
545
- const T = document.createElement("option");
546
- T.value = Y.value, T.innerText = Y.label, D.appendChild(T);
544
+ u.forEach((R) => {
545
+ const M = document.createElement("option");
546
+ M.value = R.value, M.innerText = R.label, D.appendChild(M);
547
547
  });
548
548
  },
549
549
  setDisabled(u) {
@@ -614,12 +614,12 @@ function hC({
614
614
  ].join(" ");
615
615
  const w = document.createElement("input");
616
616
  w.accept = Q || "image/png, image/jpeg, .jpg, .jpeg, .png", w.id = "upload", w.type = "file", w.className = "wgt:hidden";
617
- const i = document.createElement("div");
618
- i.className = "wgt:w-full wgt:flex wgt:gap-1 wgt:items-start wgt:justify-start";
617
+ const s = document.createElement("div");
618
+ s.className = "wgt:w-full wgt:flex wgt:gap-1 wgt:items-start wgt:justify-start";
619
619
  const D = document.createElement("span");
620
620
  D.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", D.innerText = C || "", C || (D.style.display = "none");
621
621
  let o = null;
622
- function s(r) {
622
+ function i(r) {
623
623
  o = r, r ? (D.innerText = r, D.style.display = "block") : (D.innerText = "", D.style.display = "none");
624
624
  }
625
625
  const u = ng({
@@ -629,49 +629,49 @@ function hC({
629
629
  r.stopPropagation(), w.click();
630
630
  }
631
631
  });
632
- function Y(r, P = 2) {
632
+ function R(r, P = 2) {
633
633
  if (r === 0) return "0 Bytes";
634
- const J = 1024, l = Math.max(0, P), m = ["Bytes", "KB", "MB", "GB", "TB"], f = Math.floor(Math.log(r) / Math.log(J));
635
- return parseFloat((r / Math.pow(J, f)).toFixed(l)) + " " + m[f];
636
- }
637
- function T(r) {
638
- const P = r.type.toLowerCase(), J = "." + r.name.split(".").pop().toLowerCase();
639
- return w.accept.split(",").map((m) => m.trim().toLowerCase()).filter(Boolean).some((m) => m.startsWith(".") ? m === J : m.endsWith("/*") ? P.startsWith(m.replace("/*", "")) : P === m);
634
+ const Y = 1024, T = Math.max(0, P), m = ["Bytes", "KB", "MB", "GB", "TB"], f = Math.floor(Math.log(r) / Math.log(Y));
635
+ return parseFloat((r / Math.pow(Y, f)).toFixed(T)) + " " + m[f];
640
636
  }
641
637
  function M(r) {
642
- if (i.innerHTML = "", s(null), r) {
643
- T(r) || s(`File không hợp lệ. Chỉ chấp nhận: ${w.accept}`), r.size <= 500 * 1024 || s("Dung lượng file vượt quá 500KB.");
644
- const J = document.createElement("div");
645
- if (J.className = "wgt:flex wgt:items-center wgt:gap-4", J.addEventListener("click", () => {
638
+ const P = r.type.toLowerCase(), Y = "." + r.name.split(".").pop().toLowerCase();
639
+ return w.accept.split(",").map((m) => m.trim().toLowerCase()).filter(Boolean).some((m) => m.startsWith(".") ? m === Y : m.endsWith("/*") ? P.startsWith(m.replace("/*", "")) : P === m);
640
+ }
641
+ function d(r) {
642
+ if (s.innerHTML = "", i(null), r) {
643
+ M(r) || i(`File không hợp lệ. Chỉ chấp nhận: ${w.accept}`), r.size <= 500 * 1024 || i("Dung lượng file vượt quá 500KB.");
644
+ const Y = document.createElement("div");
645
+ if (Y.className = "wgt:flex wgt:items-center wgt:gap-4", Y.addEventListener("click", () => {
646
646
  w.click();
647
647
  }), r.type.startsWith("image/")) {
648
648
  const v = document.createElement("img");
649
- v.src = URL.createObjectURL(r), v.alt = "Preview", v.className = "wgt:h-20 wgt:w-20 wgt:rounded wgt:object-contain wgt:rounded", J.appendChild(v);
649
+ v.src = URL.createObjectURL(r), v.alt = "Preview", v.className = "wgt:h-20 wgt:w-20 wgt:rounded wgt:object-contain wgt:rounded", Y.appendChild(v);
650
650
  }
651
- const l = document.createElement("div");
652
- l.className = "wgt:flex wgt:flex-col";
651
+ const T = document.createElement("div");
652
+ T.className = "wgt:flex wgt:flex-col";
653
653
  const m = document.createElement("p");
654
654
  m.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", m.innerText = r.name;
655
655
  const f = document.createElement("p");
656
- f.className = "wgt:text-sm wgt:text-gray-500", f.innerText = Y(r.size), l.appendChild(m), l.appendChild(f), J.appendChild(l), i.appendChild(J), E = r, typeof B == "function" && B(r);
656
+ f.className = "wgt:text-sm wgt:text-gray-500", f.innerText = R(r.size), T.appendChild(m), T.appendChild(f), Y.appendChild(T), s.appendChild(Y), E = r, typeof B == "function" && B(r);
657
657
  } else {
658
658
  const P = document.createElement("div");
659
- P.className = "wgt:flex wgt:items-center", P.appendChild(u), i.appendChild(P);
659
+ P.className = "wgt:flex wgt:items-center", P.appendChild(u), s.appendChild(P);
660
660
  }
661
661
  }
662
662
  return w.addEventListener("change", (r) => {
663
663
  const P = r.target.files && r.target.files[0] ? r.target.files[0] : null;
664
- P && (M(P), typeof B == "function" && B(P));
665
- }), M(E), c.appendChild(i), c.appendChild(w), t.appendChild(c), t.appendChild(D), {
664
+ P && (d(P), typeof B == "function" && B(P));
665
+ }), d(E), c.appendChild(s), c.appendChild(w), t.appendChild(c), t.appendChild(D), {
666
666
  container: t,
667
667
  getValues() {
668
668
  return E;
669
669
  },
670
670
  setFile(r) {
671
- E = r, M(r), typeof B == "function" && B(r);
671
+ E = r, d(r), typeof B == "function" && B(r);
672
672
  },
673
673
  clearFile() {
674
- E = null, M(null), typeof B == "function" && B(null);
674
+ E = null, d(null), typeof B == "function" && B(null);
675
675
  },
676
676
  getError: () => o
677
677
  };
@@ -758,30 +758,30 @@ function cC({
758
758
  <path d="M1.09676 8.74653H18.0836C18.2184 8.74653 18.2858 8.81094 18.2858 8.93976V10.389C18.2858 10.5179 18.2184 10.5823 18.0836 10.5823H1.09676C0.961939 10.5823 0.894531 10.5179 0.894531 10.389V8.93976C0.894531 8.81094 0.961939 8.74653 1.09676 8.74653Z" fill="${w}"/>
759
759
  </svg>
760
760
  `;
761
- const i = document.createElement("div");
762
- i.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", i.innerText = A, n.append(c, i);
761
+ const s = document.createElement("div");
762
+ s.className = "wgt:text-sm wgt:font-semibold wgt:text-text-sub-600", s.innerText = A, n.append(c, s);
763
763
  const D = document.createElement("div");
764
764
  D.className = "wgt:text-sm wgt:font-medium wgt:text-soft-400", D.innerText = E, t.append(D);
765
765
  const o = document.createElement("span");
766
766
  o.className = "wgt:text-red-500 wgt:text-sm wgt:mt-1", o.style.display = "none", t.append(o);
767
- let s = null;
767
+ let i = null;
768
768
  function u(P) {
769
- s = P, P ? (o.innerText = P, o.style.display = "block", typeof C == "function" && C(P)) : (o.innerText = "", o.style.display = "none", typeof C == "function" && C(null));
769
+ i = P, P ? (o.innerText = P, o.style.display = "block", typeof C == "function" && C(P)) : (o.innerText = "", o.style.display = "none", typeof C == "function" && C(null));
770
770
  }
771
- let Y = g || null;
772
- function T(P, J = 2) {
771
+ let R = g || null;
772
+ function M(P, Y = 2) {
773
773
  if (P === 0) return "0 Bytes";
774
- const l = 1024, m = Math.max(0, J), f = ["Bytes", "KB", "MB", "GB", "TB"], v = Math.floor(Math.log(P) / Math.log(l));
775
- return parseFloat((P / Math.pow(l, v)).toFixed(m)) + " " + f[v];
774
+ const T = 1024, m = Math.max(0, Y), f = ["Bytes", "KB", "MB", "GB", "TB"], v = Math.floor(Math.log(P) / Math.log(T));
775
+ return parseFloat((P / Math.pow(T, v)).toFixed(m)) + " " + f[v];
776
776
  }
777
- function M(P) {
777
+ function d(P) {
778
778
  n.innerHTML = "", u(null);
779
- const J = document.createElement("img");
780
- if (J.alt = A, J.className = "wgt:max-w-full wgt:max-h-full wgt:object-contain", r(P) || u(`File không hợp lệ. Chỉ chấp nhận: ${I.accept}`), P.size <= 500 * 1024 || u("Dung lượng file vượt quá 500KB."), P.type.startsWith("image/")) {
779
+ const Y = document.createElement("img");
780
+ if (Y.alt = A, Y.className = "wgt:max-w-full wgt:max-h-full wgt:object-contain", r(P) || u(`File không hợp lệ. Chỉ chấp nhận: ${I.accept}`), P.size <= 500 * 1024 || u("Dung lượng file vượt quá 500KB."), P.type.startsWith("image/")) {
781
781
  const m = new FileReader();
782
782
  m.onload = () => {
783
- J.src = m.result, typeof B == "function" && B(P);
784
- }, m.readAsDataURL(P), n.appendChild(J);
783
+ Y.src = m.result, typeof B == "function" && B(P);
784
+ }, m.readAsDataURL(P), n.appendChild(Y);
785
785
  } else {
786
786
  const m = document.createElement("div");
787
787
  m.className = "wgt:flex wgt:items-center wgt:gap-4";
@@ -789,22 +789,22 @@ function cC({
789
789
  f.className = "wgt:flex wgt:flex-col";
790
790
  const v = document.createElement("p");
791
791
  v.className = "wgt:text-sm wgt:font-medium wgt:text-gray-800", v.innerText = P.name;
792
- const H = document.createElement("p");
793
- H.className = "wgt:text-sm wgt:text-gray-500", H.innerText = T(P.size), f.appendChild(v), f.appendChild(H), m.appendChild(f), n.appendChild(m), typeof B == "function" && B(null, P);
792
+ const k = document.createElement("p");
793
+ k.className = "wgt:text-sm wgt:text-gray-500", k.innerText = M(P.size), f.appendChild(v), f.appendChild(k), m.appendChild(f), n.appendChild(m), typeof B == "function" && B(null, P);
794
794
  }
795
795
  }
796
796
  function r(P) {
797
- const J = P.type.toLowerCase(), l = "." + P.name.split(".").pop().toLowerCase();
798
- return I.accept.split(",").map((f) => f.trim().toLowerCase()).filter(Boolean).some((f) => f.startsWith(".") ? f === l : f.endsWith("/*") ? J.startsWith(f.replace("/*", "")) : J === f);
797
+ const Y = P.type.toLowerCase(), T = "." + P.name.split(".").pop().toLowerCase();
798
+ return I.accept.split(",").map((f) => f.trim().toLowerCase()).filter(Boolean).some((f) => f.startsWith(".") ? f === T : f.endsWith("/*") ? Y.startsWith(f.replace("/*", "")) : Y === f);
799
799
  }
800
800
  return I.addEventListener("change", () => {
801
- var J;
802
- const P = (J = I.files) == null ? void 0 : J[0];
803
- P && (Y = P, M(P));
804
- }), n.addEventListener("click", () => I.click()), g && M(g), {
801
+ var Y;
802
+ const P = (Y = I.files) == null ? void 0 : Y[0];
803
+ P && (R = P, d(P));
804
+ }), n.addEventListener("click", () => I.click()), g && d(g), {
805
805
  container: t,
806
- getFile: () => Y,
807
- getError: () => s,
806
+ getFile: () => R,
807
+ getError: () => i,
808
808
  setError: u
809
809
  };
810
810
  }
@@ -846,11 +846,11 @@ const HQ = ({
846
846
  } = {}) => {
847
847
  Array.from(
848
848
  { length: 26 },
849
- (q, d) => String.fromCharCode(65 + d)
849
+ (q, l) => String.fromCharCode(65 + l)
850
850
  );
851
851
  const E = (/* @__PURE__ */ new Date()).getFullYear(), B = Array.from(
852
852
  { length: 2 },
853
- (q, d) => String(E + d).slice(-2)
853
+ (q, l) => String(E + l).slice(-2)
854
854
  ), C = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], Q = ["C", "K"], t = ["T", "D", "L", "M", "N", "B", "G", "H", "X"], n = document.createElement("div");
855
855
  n.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
856
856
  const I = document.createElement("span");
@@ -871,15 +871,15 @@ const HQ = ({
871
871
  "wgt:@max-2xl:p-2",
872
872
  "wgt:@max-2xl:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-3 wgt:@max-2xl:space-y-2 wgt:@max-2xl:rounded-xl wgt:@max-2xl:bg-weak-50"
873
873
  ].join(" "), w.style.scrollSnapType = "x mandatory", w.style.overflowX = "auto", w.style.scrollBehavior = "smooth", w.style.scrollbarWidth = "none", w.style.msOverflowStyle = "none", w.style.WebkitOverflowScrolling = "touch", w.style.overflowY = "hidden", n.append(w);
874
- const i = "wgt:border wgt:border-gray-300 wgt:bg-white wgt:rounded-lg wgt:px-3 wgt:py-2 wgt:text-start wgt:cursor-pointer wgt:outline-none", D = document.createElement("div");
874
+ const s = "wgt:border wgt:border-gray-300 wgt:bg-white wgt:rounded-lg wgt:px-3 wgt:py-2 wgt:text-start wgt:cursor-pointer wgt:outline-none", D = document.createElement("div");
875
875
  D.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
876
876
  const o = document.createElement("span");
877
877
  o.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", o.textContent = a("sampleNumber");
878
- const s = document.createElement("span");
879
- s.className = "wgt:text-red-500 wgt:ml-1", s.innerText = "*", o.appendChild(s), D.appendChild(o);
878
+ const i = document.createElement("span");
879
+ i.className = "wgt:text-red-500 wgt:ml-1", i.innerText = "*", o.appendChild(i), D.appendChild(o);
880
880
  const u = document.createElement("select");
881
- u.className = `${i} wgt:@max-2xl:w-full wgt:w-48`, u.title = a("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
882
- const Y = {
881
+ u.className = `${s} wgt:@max-2xl:w-full wgt:w-48`, u.title = a("sampleNumberTooltip", "Mẫu số hóa đơn (1-9)");
882
+ const R = {
883
883
  1: a("invoiceTemplateTypes.1"),
884
884
  2: a("invoiceTemplateTypes.2"),
885
885
  3: a("invoiceTemplateTypes.3"),
@@ -891,36 +891,36 @@ const HQ = ({
891
891
  9: a("invoiceTemplateTypes.9")
892
892
  };
893
893
  C.forEach((q) => {
894
- u.append(new Option(Y[q], q));
894
+ u.append(new Option(R[q], q));
895
895
  }), D.appendChild(u), w.append(D);
896
- const T = document.createElement("div");
897
- T.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
898
- const M = document.createElement("span");
899
- M.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", M.textContent = a("codeType");
896
+ const M = document.createElement("div");
897
+ M.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
898
+ const d = document.createElement("span");
899
+ d.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", d.textContent = a("codeType");
900
900
  const r = document.createElement("span");
901
- r.className = "wgt:text-red-500 wgt:ml-1", r.innerText = "*", M.appendChild(r), T.appendChild(M);
901
+ r.className = "wgt:text-red-500 wgt:ml-1", r.innerText = "*", d.appendChild(r), M.appendChild(d);
902
902
  const P = document.createElement("select");
903
- P.className = `${i} wgt:@max-2xl:w-full wgt:w-40`, P.title = a("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((q) => {
904
- const d = q === "C" ? a("codeTypeC", "C (Có mã CQT)") : a("codeTypeK", "K (Không mã)");
905
- P.append(new Option(d, q));
906
- }), T.appendChild(P), w.append(T);
907
- const J = document.createElement("div");
908
- J.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
909
- const l = document.createElement("span");
910
- l.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", l.textContent = a("invoiceIssuanceYear");
903
+ P.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, P.title = a("codeTypeTooltip", "C: Có mã CQT, K: Không mã"), Q.forEach((q) => {
904
+ const l = q === "C" ? a("codeTypeC", "C (Có mã CQT)") : a("codeTypeK", "K (Không mã)");
905
+ P.append(new Option(l, q));
906
+ }), M.appendChild(P), w.append(M);
907
+ const Y = document.createElement("div");
908
+ Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
909
+ const T = document.createElement("span");
910
+ T.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", T.textContent = a("invoiceIssuanceYear");
911
911
  const m = document.createElement("span");
912
- m.className = "wgt:text-red-500 wgt:ml-1", m.innerText = "*", l.appendChild(m), J.appendChild(l);
912
+ m.className = "wgt:text-red-500 wgt:ml-1", m.innerText = "*", T.appendChild(m), Y.appendChild(T);
913
913
  const f = document.createElement("select");
914
- f.className = `${i} wgt:@max-2xl:w-full wgt:w-16`, f.title = a("yearTooltip", "Năm phát hành (2 chữ số cuối)"), B.forEach((q) => f.append(new Option(q, q))), f.value = String(E).slice(-2), J.appendChild(f), w.append(J);
914
+ f.className = `${s} wgt:@max-2xl:w-full wgt:w-16`, f.title = a("yearTooltip", "Năm phát hành (2 chữ số cuối)"), B.forEach((q) => f.append(new Option(q, q))), f.value = String(E).slice(-2), Y.appendChild(f), w.append(Y);
915
915
  const v = document.createElement("div");
916
916
  v.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
917
+ const k = document.createElement("span");
918
+ k.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", k.textContent = a("typeOfEInvoice");
917
919
  const H = document.createElement("span");
918
- H.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", H.textContent = a("typeOfEInvoice");
919
- const x = document.createElement("span");
920
- x.className = "wgt:text-red-500 wgt:ml-1", x.innerText = "*", H.appendChild(x), v.appendChild(H);
921
- const k = document.createElement("select");
922
- k.className = `${i} wgt:@max-2xl:w-full wgt:w-40`, k.title = a("invoiceTypeTooltip", "Loại hóa đơn");
923
- const R = {
920
+ H.className = "wgt:text-red-500 wgt:ml-1", H.innerText = "*", k.appendChild(H), v.appendChild(k);
921
+ const F = document.createElement("select");
922
+ F.className = `${s} wgt:@max-2xl:w-full wgt:w-40`, F.title = a("invoiceTypeTooltip", "Loại hóa đơn");
923
+ const x = {
924
924
  T: a("invoiceTypeT", "T (Đăng ký)"),
925
925
  D: a("invoiceTypeD", "D (Tài sản)"),
926
926
  L: a("invoiceTypeL", "L (CQT)"),
@@ -932,29 +932,29 @@ const HQ = ({
932
932
  X: a("invoiceTypeX", "X (Thương mại)")
933
933
  };
934
934
  t.forEach((q) => {
935
- k.append(new Option(R[q], q));
936
- }), v.appendChild(k), w.append(v);
937
- const F = document.createElement("div");
938
- F.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
935
+ F.append(new Option(x[q], q));
936
+ }), v.appendChild(F), w.append(v);
937
+ const X = document.createElement("div");
938
+ X.className = "wgt:w-full wgt:flex wgt:flex-col wgt:items-start wgt:space-y-2";
939
939
  const U = document.createElement("span");
940
940
  U.className = "wgt:font-medium wgt:text-text-black wgt:whitespace-nowrap wgt:col-span-2 wgt:@max-2xl:whitespace-normal wgt:@max-2xl:block wgt:hidden", U.textContent = a("formDifferentiationCode");
941
941
  const j = document.createElement("span");
942
- j.className = "wgt:text-red-500 wgt:ml-1", j.innerText = "*", U.appendChild(j), F.appendChild(U);
942
+ j.className = "wgt:text-red-500 wgt:ml-1", j.innerText = "*", U.appendChild(j), X.appendChild(U);
943
943
  const O = document.createElement("input");
944
- O.type = "text", O.maxLength = 2, O.placeholder = "AB", O.defaultValue = "YY", O.className = `${i} wgt:@max-2xl:w-full wgt:w-16`, O.title = a("customLettersTooltip"), F.appendChild(O), w.append(F);
944
+ O.type = "text", O.maxLength = 2, O.placeholder = "AB", O.defaultValue = "YY", O.className = `${s} wgt:@max-2xl:w-full wgt:w-16`, O.title = a("customLettersTooltip"), X.appendChild(O), w.append(X);
945
945
  function e() {
946
- return u.value + P.value + f.value + k.value + O.value.toUpperCase();
946
+ return u.value + P.value + f.value + F.value + O.value.toUpperCase();
947
947
  }
948
948
  function h() {
949
949
  O.value = O.value.toUpperCase().replace(/[^A-Z]/g, "").slice(0, 2), typeof g == "function" && g(e());
950
950
  }
951
- return [u, P, f, k].forEach(
951
+ return [u, P, f, F].forEach(
952
952
  (q) => q.addEventListener("change", h)
953
- ), O.addEventListener("input", h), O.addEventListener("blur", h), /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(A) ? (u.value = A[0], P.value = A[1], f.value = A.slice(2, 4), k.value = A[4], O.value = A.slice(5, 7)) : (u.value = "1", P.value = "C", k.value = "T", O.value = "YY"), h(), {
953
+ ), O.addEventListener("input", h), O.addEventListener("blur", h), /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(A) ? (u.value = A[0], P.value = A[1], f.value = A.slice(2, 4), F.value = A[4], O.value = A.slice(5, 7)) : (u.value = "1", P.value = "C", F.value = "T", O.value = "YY"), h(), {
954
954
  container: n,
955
955
  getValue: e,
956
956
  setValue: (q) => {
957
- typeof q != "string" || q.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(q) && (u.value = q[0], P.value = q[1], f.value = q.slice(2, 4), k.value = q[4], O.value = q.slice(5, 7), h());
957
+ typeof q != "string" || q.length !== 7 || /^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(q) && (u.value = q[0], P.value = q[1], f.value = q.slice(2, 4), F.value = q[4], O.value = q.slice(5, 7), h());
958
958
  }
959
959
  };
960
960
  }, LA = cQ.create({
@@ -1036,42 +1036,42 @@ function FQ() {
1036
1036
  g.exports = B(C);
1037
1037
  }
1038
1038
  })(XQ, function(E) {
1039
- var B = typeof E == "function", C = !!window.addEventListener, Q = window.document, t = window.setTimeout, n = function(e, h, q, d) {
1040
- C ? e.addEventListener(h, q, !!d) : e.attachEvent("on" + h, q);
1041
- }, I = function(e, h, q, d) {
1042
- C ? e.removeEventListener(h, q, !!d) : e.detachEvent("on" + h, q);
1039
+ var B = typeof E == "function", C = !!window.addEventListener, Q = window.document, t = window.setTimeout, n = function(e, h, q, l) {
1040
+ C ? e.addEventListener(h, q, !!l) : e.attachEvent("on" + h, q);
1041
+ }, I = function(e, h, q, l) {
1042
+ C ? e.removeEventListener(h, q, !!l) : e.detachEvent("on" + h, q);
1043
1043
  }, c = function(e) {
1044
1044
  return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
1045
1045
  }, w = function(e, h) {
1046
1046
  return (" " + e.className + " ").indexOf(" " + h + " ") !== -1;
1047
- }, i = function(e, h) {
1047
+ }, s = function(e, h) {
1048
1048
  w(e, h) || (e.className = e.className === "" ? h : e.className + " " + h);
1049
1049
  }, D = function(e, h) {
1050
1050
  e.className = c((" " + e.className + " ").replace(" " + h + " ", " "));
1051
1051
  }, o = function(e) {
1052
1052
  return /Array/.test(Object.prototype.toString.call(e));
1053
- }, s = function(e) {
1053
+ }, i = function(e) {
1054
1054
  return /Date/.test(Object.prototype.toString.call(e)) && !isNaN(e.getTime());
1055
1055
  }, u = function(e) {
1056
1056
  var h = e.getDay();
1057
1057
  return h === 0 || h === 6;
1058
- }, Y = function(e) {
1058
+ }, R = function(e) {
1059
1059
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
1060
- }, T = function(e, h) {
1061
- return [31, Y(e) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][h];
1062
- }, M = function(e) {
1063
- s(e) && e.setHours(0, 0, 0, 0);
1060
+ }, M = function(e, h) {
1061
+ return [31, R(e) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][h];
1062
+ }, d = function(e) {
1063
+ i(e) && e.setHours(0, 0, 0, 0);
1064
1064
  }, r = function(e, h) {
1065
1065
  return e.getTime() === h.getTime();
1066
1066
  }, P = function(e, h, q) {
1067
- var d, N;
1068
- for (d in h)
1069
- N = e[d] !== void 0, N && typeof h[d] == "object" && h[d] !== null && h[d].nodeName === void 0 ? s(h[d]) ? q && (e[d] = new Date(h[d].getTime())) : o(h[d]) ? q && (e[d] = h[d].slice(0)) : e[d] = P({}, h[d], q) : (q || !N) && (e[d] = h[d]);
1067
+ var l, N;
1068
+ for (l in h)
1069
+ N = e[l] !== void 0, N && typeof h[l] == "object" && h[l] !== null && h[l].nodeName === void 0 ? i(h[l]) ? q && (e[l] = new Date(h[l].getTime())) : o(h[l]) ? q && (e[l] = h[l].slice(0)) : e[l] = P({}, h[l], q) : (q || !N) && (e[l] = h[l]);
1070
1070
  return e;
1071
- }, J = function(e, h, q) {
1072
- var d;
1073
- Q.createEvent ? (d = Q.createEvent("HTMLEvents"), d.initEvent(h, !0, !1), d = P(d, q), e.dispatchEvent(d)) : Q.createEventObject && (d = Q.createEventObject(), d = P(d, q), e.fireEvent("on" + h, d));
1074
- }, l = function(e) {
1071
+ }, Y = function(e, h, q) {
1072
+ var l;
1073
+ Q.createEvent ? (l = Q.createEvent("HTMLEvents"), l.initEvent(h, !0, !1), l = P(l, q), e.dispatchEvent(l)) : Q.createEventObject && (l = Q.createEventObject(), l = P(l, q), e.fireEvent("on" + h, l));
1074
+ }, T = function(e) {
1075
1075
  return e.month < 0 && (e.year -= Math.ceil(Math.abs(e.month) / 12), e.month += 12), e.month > 11 && (e.year += Math.floor(Math.abs(e.month) / 12), e.month -= 12), e;
1076
1076
  }, m = {
1077
1077
  // bind the picker to a form field
@@ -1169,35 +1169,35 @@ function FQ() {
1169
1169
  else
1170
1170
  return '<td class="is-empty"></td>';
1171
1171
  return e.isDisabled && h.push("is-disabled"), e.isToday && h.push("is-today"), e.isSelected && (h.push("is-selected"), q = "true"), e.hasEvent && h.push("has-event"), e.isInRange && h.push("is-inrange"), e.isStartRange && h.push("is-startrange"), e.isEndRange && h.push("is-endrange"), '<td data-day="' + e.day + '" class="' + h.join(" ") + '" aria-selected="' + q + '"><button class="pika-button pika-day" type="button" data-pika-year="' + e.year + '" data-pika-month="' + e.month + '" data-pika-day="' + e.day + '">' + e.day + "</button></td>";
1172
- }, H = function(e, h) {
1172
+ }, k = function(e, h) {
1173
1173
  e.setHours(0, 0, 0, 0);
1174
- var q = e.getDate(), d = e.getDay(), N = h, L = N - 1, b = 7, y = function(uA) {
1174
+ var q = e.getDate(), l = e.getDay(), N = h, L = N - 1, b = 7, y = function(uA) {
1175
1175
  return (uA + b - 1) % b;
1176
1176
  };
1177
- e.setDate(q + L - y(d));
1177
+ e.setDate(q + L - y(l));
1178
1178
  var AA = new Date(e.getFullYear(), 0, N), S = 1440 * 60 * 1e3, IA = (e.getTime() - AA.getTime()) / S, nA = 1 + Math.round((IA - L + y(AA.getDay())) / b);
1179
1179
  return nA;
1180
- }, x = function(e, h, q, d) {
1181
- var N = new Date(q, h, e), L = B ? E(N).isoWeek() : H(N, d);
1180
+ }, H = function(e, h, q, l) {
1181
+ var N = new Date(q, h, e), L = B ? E(N).isoWeek() : k(N, l);
1182
1182
  return '<td class="pika-week">' + L + "</td>";
1183
- }, k = function(e, h, q, d) {
1184
- return '<tr class="pika-row' + (q ? " pick-whole-week" : "") + (d ? " is-selected" : "") + '">' + (h ? e.reverse() : e).join("") + "</tr>";
1185
- }, R = function(e) {
1183
+ }, F = function(e, h, q, l) {
1184
+ return '<tr class="pika-row' + (q ? " pick-whole-week" : "") + (l ? " is-selected" : "") + '">' + (h ? e.reverse() : e).join("") + "</tr>";
1185
+ }, x = function(e) {
1186
1186
  return "<tbody>" + e.join("") + "</tbody>";
1187
- }, F = function(e) {
1187
+ }, X = function(e) {
1188
1188
  var h, q = [];
1189
1189
  for (e.showWeekNumber && q.push("<th></th>"), h = 0; h < 7; h++)
1190
1190
  q.push('<th scope="col"><abbr title="' + f(e, h) + '">' + f(e, h, !0) + "</abbr></th>");
1191
1191
  return "<thead><tr>" + (e.isRTL ? q.reverse() : q).join("") + "</tr></thead>";
1192
- }, U = function(e, h, q, d, N, L) {
1192
+ }, U = function(e, h, q, l, N, L) {
1193
1193
  var b, y, AA, S = e._o, IA = q === S.minYear, nA = q === S.maxYear, uA = '<div id="' + L + '" class="pika-title" role="heading" aria-live="assertive">', zA, dA, kA = !0, mA = !0;
1194
1194
  for (AA = [], b = 0; b < 12; b++)
1195
- AA.push('<option value="' + (q === N ? b - h : 12 + b - h) + '"' + (b === d ? ' selected="selected"' : "") + (IA && b < S.minMonth || nA && b > S.maxMonth ? ' disabled="disabled"' : "") + ">" + S.i18n.months[b] + "</option>");
1196
- for (zA = '<div class="pika-label">' + S.i18n.months[d] + '<select class="pika-select pika-select-month" tabindex="-1">' + AA.join("") + "</select></div>", o(S.yearRange) ? (b = S.yearRange[0], y = S.yearRange[1] + 1) : (b = q - S.yearRange, y = 1 + q + S.yearRange), AA = []; b < y && b <= S.maxYear; b++)
1195
+ AA.push('<option value="' + (q === N ? b - h : 12 + b - h) + '"' + (b === l ? ' selected="selected"' : "") + (IA && b < S.minMonth || nA && b > S.maxMonth ? ' disabled="disabled"' : "") + ">" + S.i18n.months[b] + "</option>");
1196
+ for (zA = '<div class="pika-label">' + S.i18n.months[l] + '<select class="pika-select pika-select-month" tabindex="-1">' + AA.join("") + "</select></div>", o(S.yearRange) ? (b = S.yearRange[0], y = S.yearRange[1] + 1) : (b = q - S.yearRange, y = 1 + q + S.yearRange), AA = []; b < y && b <= S.maxYear; b++)
1197
1197
  b >= S.minYear && AA.push('<option value="' + b + '"' + (b === q ? ' selected="selected"' : "") + ">" + b + "</option>");
1198
- return dA = '<div class="pika-label">' + q + S.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + AA.join("") + "</select></div>", S.showMonthAfterYear ? uA += dA + zA : uA += zA + dA, IA && (d === 0 || S.minMonth >= d) && (kA = !1), nA && (d === 11 || S.maxMonth <= d) && (mA = !1), h === 0 && (uA += '<button class="pika-prev' + (kA ? "" : " is-disabled") + '" type="button">' + S.i18n.previousMonth + "</button>"), h === e._o.numberOfMonths - 1 && (uA += '<button class="pika-next' + (mA ? "" : " is-disabled") + '" type="button">' + S.i18n.nextMonth + "</button>"), uA += "</div>";
1198
+ return dA = '<div class="pika-label">' + q + S.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + AA.join("") + "</select></div>", S.showMonthAfterYear ? uA += dA + zA : uA += zA + dA, IA && (l === 0 || S.minMonth >= l) && (kA = !1), nA && (l === 11 || S.maxMonth <= l) && (mA = !1), h === 0 && (uA += '<button class="pika-prev' + (kA ? "" : " is-disabled") + '" type="button">' + S.i18n.previousMonth + "</button>"), h === e._o.numberOfMonths - 1 && (uA += '<button class="pika-next' + (mA ? "" : " is-disabled") + '" type="button">' + S.i18n.nextMonth + "</button>"), uA += "</div>";
1199
1199
  }, j = function(e, h, q) {
1200
- return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + q + '">' + F(e) + R(h) + "</table>";
1200
+ return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + q + '">' + X(e) + x(h) + "</table>";
1201
1201
  }, O = function(e) {
1202
1202
  var h = this, q = h.config(e);
1203
1203
  h._onMouseDown = function(N) {
@@ -1252,7 +1252,7 @@ function FQ() {
1252
1252
  return new Date(Date.parse(q.field.value));
1253
1253
  }, h._onInputChange = function(N) {
1254
1254
  var L;
1255
- N.firedBy !== h && (L = h._parseFieldValue(), s(L) && h.setDate(L), h._v || h.show());
1255
+ N.firedBy !== h && (L = h._parseFieldValue(), i(L) && h.setDate(L), h._v || h.show());
1256
1256
  }, h._onInputFocus = function() {
1257
1257
  h.show();
1258
1258
  }, h._onInputClick = function() {
@@ -1278,8 +1278,8 @@ function FQ() {
1278
1278
  h._v && L !== q.trigger && b !== q.trigger && h.hide();
1279
1279
  }
1280
1280
  }, h.el = Q.createElement("div"), h.el.className = "pika-single" + (q.isRTL ? " is-rtl" : "") + (q.theme ? " " + q.theme : ""), n(h.el, "mousedown", h._onMouseDown, !0), n(h.el, "touchend", h._onMouseDown, !0), n(h.el, "change", h._onChange), q.keyboardInput && n(Q, "keydown", h._onKeyChange), q.field && (q.container ? q.container.appendChild(h.el) : q.bound ? Q.body.appendChild(h.el) : q.field.parentNode.insertBefore(h.el, q.field.nextSibling), n(q.field, "change", h._onInputChange), q.defaultDate || (q.defaultDate = h._parseFieldValue(), q.setDefaultDate = !0));
1281
- var d = q.defaultDate;
1282
- s(d) ? q.setDefaultDate ? h.setDate(d, !0) : h.gotoDate(d) : h.gotoDate(/* @__PURE__ */ new Date()), q.bound ? (this.hide(), h.el.className += " is-bound", n(q.trigger, "click", h._onInputClick), n(q.trigger, "focus", h._onInputFocus), n(q.trigger, "blur", h._onInputBlur)) : this.show();
1281
+ var l = q.defaultDate;
1282
+ i(l) ? q.setDefaultDate ? h.setDate(l, !0) : h.gotoDate(l) : h.gotoDate(/* @__PURE__ */ new Date()), q.bound ? (this.hide(), h.el.className += " is-bound", n(q.trigger, "click", h._onInputClick), n(q.trigger, "focus", h._onInputFocus), n(q.trigger, "blur", h._onInputBlur)) : this.show();
1283
1283
  };
1284
1284
  return O.prototype = {
1285
1285
  /**
@@ -1290,9 +1290,9 @@ function FQ() {
1290
1290
  var h = P(this._o, e, !0);
1291
1291
  h.isRTL = !!h.isRTL, h.field = h.field && h.field.nodeName ? h.field : null, h.theme = typeof h.theme == "string" && h.theme ? h.theme : null, h.bound = !!(h.bound !== void 0 ? h.field && h.bound : h.field), h.trigger = h.trigger && h.trigger.nodeName ? h.trigger : h.field, h.disableWeekends = !!h.disableWeekends, h.disableDayFn = typeof h.disableDayFn == "function" ? h.disableDayFn : null;
1292
1292
  var q = parseInt(h.numberOfMonths, 10) || 1;
1293
- if (h.numberOfMonths = q > 4 ? 4 : q, s(h.minDate) || (h.minDate = !1), s(h.maxDate) || (h.maxDate = !1), h.minDate && h.maxDate && h.maxDate < h.minDate && (h.maxDate = h.minDate = !1), h.minDate && this.setMinDate(h.minDate), h.maxDate && this.setMaxDate(h.maxDate), o(h.yearRange)) {
1294
- var d = (/* @__PURE__ */ new Date()).getFullYear() - 10;
1295
- h.yearRange[0] = parseInt(h.yearRange[0], 10) || d, h.yearRange[1] = parseInt(h.yearRange[1], 10) || d;
1293
+ if (h.numberOfMonths = q > 4 ? 4 : q, i(h.minDate) || (h.minDate = !1), i(h.maxDate) || (h.maxDate = !1), h.minDate && h.maxDate && h.maxDate < h.minDate && (h.maxDate = h.minDate = !1), h.minDate && this.setMinDate(h.minDate), h.maxDate && this.setMaxDate(h.maxDate), o(h.yearRange)) {
1294
+ var l = (/* @__PURE__ */ new Date()).getFullYear() - 10;
1295
+ h.yearRange[0] = parseInt(h.yearRange[0], 10) || l, h.yearRange[1] = parseInt(h.yearRange[1], 10) || l;
1296
1296
  } else
1297
1297
  h.yearRange = Math.abs(parseInt(h.yearRange, 10)) || m.yearRange, h.yearRange > 100 && (h.yearRange = 100);
1298
1298
  return h;
@@ -1301,7 +1301,7 @@ function FQ() {
1301
1301
  * return a formatted string of the current selection (using Moment.js if available)
1302
1302
  */
1303
1303
  toString: function(e) {
1304
- return e = e || this._o.format, s(this._d) ? this._o.toString ? this._o.toString(this._d, e) : B ? E(this._d).format(e) : this._d.toDateString() : "";
1304
+ return e = e || this._o.format, i(this._d) ? this._o.toString ? this._o.toString(this._d, e) : B ? E(this._d).format(e) : this._d.toDateString() : "";
1305
1305
  },
1306
1306
  /**
1307
1307
  * return a Moment.js object of the current selection (if available)
@@ -1319,17 +1319,17 @@ function FQ() {
1319
1319
  * return a Date object of the current selection
1320
1320
  */
1321
1321
  getDate: function() {
1322
- return s(this._d) ? new Date(this._d.getTime()) : null;
1322
+ return i(this._d) ? new Date(this._d.getTime()) : null;
1323
1323
  },
1324
1324
  /**
1325
1325
  * set the current selection
1326
1326
  */
1327
1327
  setDate: function(e, h) {
1328
1328
  if (!e)
1329
- return this._d = null, this._o.field && (this._o.field.value = "", J(this._o.field, "change", { firedBy: this })), this.draw();
1330
- if (typeof e == "string" && (e = new Date(Date.parse(e))), !!s(e)) {
1331
- var q = this._o.minDate, d = this._o.maxDate;
1332
- s(q) && e < q ? e = q : s(d) && e > d && (e = d), this._d = new Date(e.getTime()), M(this._d), this.gotoDate(this._d), this._o.field && (this._o.field.value = this.toString(), J(this._o.field, "change", { firedBy: this })), !h && typeof this._o.onSelect == "function" && this._o.onSelect.call(this, this.getDate());
1329
+ return this._d = null, this._o.field && (this._o.field.value = "", Y(this._o.field, "change", { firedBy: this })), this.draw();
1330
+ if (typeof e == "string" && (e = new Date(Date.parse(e))), !!i(e)) {
1331
+ var q = this._o.minDate, l = this._o.maxDate;
1332
+ i(q) && e < q ? e = q : i(l) && e > l && (e = l), this._d = new Date(e.getTime()), d(this._d), this.gotoDate(this._d), this._o.field && (this._o.field.value = this.toString(), Y(this._o.field, "change", { firedBy: this })), !h && typeof this._o.onSelect == "function" && this._o.onSelect.call(this, this.getDate());
1333
1333
  }
1334
1334
  },
1335
1335
  /**
@@ -1343,10 +1343,10 @@ function FQ() {
1343
1343
  */
1344
1344
  gotoDate: function(e) {
1345
1345
  var h = !0;
1346
- if (s(e)) {
1346
+ if (i(e)) {
1347
1347
  if (this.calendars) {
1348
- var q = new Date(this.calendars[0].year, this.calendars[0].month, 1), d = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1), N = e.getTime();
1349
- d.setMonth(d.getMonth() + 1), d.setDate(d.getDate() - 1), h = N < q.getTime() || d.getTime() < N;
1348
+ var q = new Date(this.calendars[0].year, this.calendars[0].month, 1), l = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1), N = e.getTime();
1349
+ l.setMonth(l.getMonth() + 1), l.setDate(l.getDate() - 1), h = N < q.getTime() || l.getTime() < N;
1350
1350
  }
1351
1351
  h && (this.calendars = [{
1352
1352
  month: e.getMonth(),
@@ -1355,13 +1355,13 @@ function FQ() {
1355
1355
  }
1356
1356
  },
1357
1357
  adjustDate: function(e, h) {
1358
- var q = this.getDate() || /* @__PURE__ */ new Date(), d = parseInt(h) * 24 * 60 * 60 * 1e3, N;
1359
- e === "add" ? N = new Date(q.valueOf() + d) : e === "subtract" && (N = new Date(q.valueOf() - d)), this.setDate(N);
1358
+ var q = this.getDate() || /* @__PURE__ */ new Date(), l = parseInt(h) * 24 * 60 * 60 * 1e3, N;
1359
+ e === "add" ? N = new Date(q.valueOf() + l) : e === "subtract" && (N = new Date(q.valueOf() - l)), this.setDate(N);
1360
1360
  },
1361
1361
  adjustCalendars: function() {
1362
- this.calendars[0] = l(this.calendars[0]);
1362
+ this.calendars[0] = T(this.calendars[0]);
1363
1363
  for (var e = 1; e < this._o.numberOfMonths; e++)
1364
- this.calendars[e] = l({
1364
+ this.calendars[e] = T({
1365
1365
  month: this.calendars[0].month + e,
1366
1366
  year: this.calendars[0].year
1367
1367
  });
@@ -1392,13 +1392,13 @@ function FQ() {
1392
1392
  * change the minDate
1393
1393
  */
1394
1394
  setMinDate: function(e) {
1395
- e instanceof Date ? (M(e), this._o.minDate = e, this._o.minYear = e.getFullYear(), this._o.minMonth = e.getMonth()) : (this._o.minDate = m.minDate, this._o.minYear = m.minYear, this._o.minMonth = m.minMonth, this._o.startRange = m.startRange), this.draw();
1395
+ e instanceof Date ? (d(e), this._o.minDate = e, this._o.minYear = e.getFullYear(), this._o.minMonth = e.getMonth()) : (this._o.minDate = m.minDate, this._o.minYear = m.minYear, this._o.minMonth = m.minMonth, this._o.startRange = m.startRange), this.draw();
1396
1396
  },
1397
1397
  /**
1398
1398
  * change the maxDate
1399
1399
  */
1400
1400
  setMaxDate: function(e) {
1401
- e instanceof Date ? (M(e), this._o.maxDate = e, this._o.maxYear = e.getFullYear(), this._o.maxMonth = e.getMonth()) : (this._o.maxDate = m.maxDate, this._o.maxYear = m.maxYear, this._o.maxMonth = m.maxMonth, this._o.endRange = m.endRange), this.draw();
1401
+ e instanceof Date ? (d(e), this._o.maxDate = e, this._o.maxYear = e.getFullYear(), this._o.maxMonth = e.getMonth()) : (this._o.maxDate = m.maxDate, this._o.maxYear = m.maxYear, this._o.maxMonth = m.maxMonth, this._o.endRange = m.endRange), this.draw();
1402
1402
  },
1403
1403
  setStartRange: function(e) {
1404
1404
  this._o.startRange = e;
@@ -1411,8 +1411,8 @@ function FQ() {
1411
1411
  */
1412
1412
  draw: function(e) {
1413
1413
  if (!(!this._v && !e)) {
1414
- var h = this._o, q = h.minYear, d = h.maxYear, N = h.minMonth, L = h.maxMonth, b = "", y;
1415
- this._y <= q && (this._y = q, !isNaN(N) && this._m < N && (this._m = N)), this._y >= d && (this._y = d, !isNaN(L) && this._m > L && (this._m = L));
1414
+ var h = this._o, q = h.minYear, l = h.maxYear, N = h.minMonth, L = h.maxMonth, b = "", y;
1415
+ this._y <= q && (this._y = q, !isNaN(N) && this._m < N && (this._m = N)), this._y >= l && (this._y = l, !isNaN(L) && this._m > L && (this._m = L));
1416
1416
  for (var AA = 0; AA < h.numberOfMonths; AA++)
1417
1417
  y = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2), b += '<div class="pika-lendar">' + U(this, AA, this.calendars[AA].year, this.calendars[AA].month, this.calendars[0].year, y) + this.render(this.calendars[AA].year, this.calendars[AA].month, y) + "</div>";
1418
1418
  this.el.innerHTML = b, h.bound && h.field.type !== "hidden" && t(function() {
@@ -1421,27 +1421,27 @@ function FQ() {
1421
1421
  }
1422
1422
  },
1423
1423
  adjustPosition: function() {
1424
- var e, h, q, d, N, L, b, y, AA, S, IA, nA;
1424
+ var e, h, q, l, N, L, b, y, AA, S, IA, nA;
1425
1425
  if (!this._o.container) {
1426
- if (this.el.style.position = "absolute", e = this._o.trigger, h = e, q = this.el.offsetWidth, d = this.el.offsetHeight, N = window.innerWidth || Q.documentElement.clientWidth, L = window.innerHeight || Q.documentElement.clientHeight, b = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, IA = !0, nA = !0, typeof e.getBoundingClientRect == "function")
1426
+ if (this.el.style.position = "absolute", e = this._o.trigger, h = e, q = this.el.offsetWidth, l = this.el.offsetHeight, N = window.innerWidth || Q.documentElement.clientWidth, L = window.innerHeight || Q.documentElement.clientHeight, b = window.pageYOffset || Q.body.scrollTop || Q.documentElement.scrollTop, IA = !0, nA = !0, typeof e.getBoundingClientRect == "function")
1427
1427
  S = e.getBoundingClientRect(), y = S.left + window.pageXOffset, AA = S.bottom + window.pageYOffset;
1428
1428
  else
1429
1429
  for (y = h.offsetLeft, AA = h.offsetTop + h.offsetHeight; h = h.offsetParent; )
1430
1430
  y += h.offsetLeft, AA += h.offsetTop;
1431
- (this._o.reposition && y + q > N || this._o.position.indexOf("right") > -1 && y - q + e.offsetWidth > 0) && (y = y - q + e.offsetWidth, IA = !1), (this._o.reposition && AA + d > L + b || this._o.position.indexOf("top") > -1 && AA - d - e.offsetHeight > 0) && (AA = AA - d - e.offsetHeight, nA = !1), this.el.style.left = y + "px", this.el.style.top = AA + "px", i(this.el, IA ? "left-aligned" : "right-aligned"), i(this.el, nA ? "bottom-aligned" : "top-aligned"), D(this.el, IA ? "right-aligned" : "left-aligned"), D(this.el, nA ? "top-aligned" : "bottom-aligned");
1431
+ (this._o.reposition && y + q > N || this._o.position.indexOf("right") > -1 && y - q + e.offsetWidth > 0) && (y = y - q + e.offsetWidth, IA = !1), (this._o.reposition && AA + l > L + b || this._o.position.indexOf("top") > -1 && AA - l - e.offsetHeight > 0) && (AA = AA - l - e.offsetHeight, nA = !1), this.el.style.left = y + "px", this.el.style.top = AA + "px", s(this.el, IA ? "left-aligned" : "right-aligned"), s(this.el, nA ? "bottom-aligned" : "top-aligned"), D(this.el, IA ? "right-aligned" : "left-aligned"), D(this.el, nA ? "top-aligned" : "bottom-aligned");
1432
1432
  }
1433
1433
  },
1434
1434
  /**
1435
1435
  * render HTML for a particular month
1436
1436
  */
1437
1437
  render: function(e, h, q) {
1438
- var d = this._o, N = /* @__PURE__ */ new Date(), L = T(e, h), b = new Date(e, h, 1).getDay(), y = [], AA = [];
1439
- M(N), d.firstDay > 0 && (b -= d.firstDay, b < 0 && (b += 7));
1440
- for (var S = h === 0 ? 11 : h - 1, IA = h === 11 ? 0 : h + 1, nA = h === 0 ? e - 1 : e, uA = h === 11 ? e + 1 : e, zA = T(nA, S), dA = L + b, kA = dA; kA > 7; )
1438
+ var l = this._o, N = /* @__PURE__ */ new Date(), L = M(e, h), b = new Date(e, h, 1).getDay(), y = [], AA = [];
1439
+ d(N), l.firstDay > 0 && (b -= l.firstDay, b < 0 && (b += 7));
1440
+ for (var S = h === 0 ? 11 : h - 1, IA = h === 11 ? 0 : h + 1, nA = h === 0 ? e - 1 : e, uA = h === 11 ? e + 1 : e, zA = M(nA, S), dA = L + b, kA = dA; kA > 7; )
1441
1441
  kA -= 7;
1442
1442
  dA += 7 - kA;
1443
1443
  for (var mA = !1, RA = 0, WA = 0; RA < dA; RA++) {
1444
- var tA = new Date(e, h, 1 + (RA - b)), YA = s(this._d) ? r(tA, this._d) : !1, bA = r(tA, N), NA = d.events.indexOf(tA.toDateString()) !== -1, yA = RA < b || RA >= L + b, KA = 1 + (RA - b), gg = h, _A = e, hg = d.startRange && r(d.startRange, tA), cg = d.endRange && r(d.endRange, tA), fg = d.startRange && d.endRange && d.startRange < tA && tA < d.endRange, $A = d.minDate && tA < d.minDate || d.maxDate && tA > d.maxDate || d.disableWeekends && u(tA) || d.disableDayFn && d.disableDayFn(tA);
1444
+ var tA = new Date(e, h, 1 + (RA - b)), YA = i(this._d) ? r(tA, this._d) : !1, bA = r(tA, N), NA = l.events.indexOf(tA.toDateString()) !== -1, yA = RA < b || RA >= L + b, KA = 1 + (RA - b), gg = h, _A = e, hg = l.startRange && r(l.startRange, tA), cg = l.endRange && r(l.endRange, tA), fg = l.startRange && l.endRange && l.startRange < tA && tA < l.endRange, $A = l.minDate && tA < l.minDate || l.maxDate && tA > l.maxDate || l.disableWeekends && u(tA) || l.disableDayFn && l.disableDayFn(tA);
1445
1445
  yA && (RA < b ? (KA = zA + KA, gg = S, _A = nA) : (KA = KA - L, gg = IA, _A = uA));
1446
1446
  var mg = {
1447
1447
  day: KA,
@@ -1455,12 +1455,12 @@ function FQ() {
1455
1455
  isStartRange: hg,
1456
1456
  isEndRange: cg,
1457
1457
  isInRange: fg,
1458
- showDaysInNextAndPreviousMonths: d.showDaysInNextAndPreviousMonths,
1459
- enableSelectionDaysInNextAndPreviousMonths: d.enableSelectionDaysInNextAndPreviousMonths
1458
+ showDaysInNextAndPreviousMonths: l.showDaysInNextAndPreviousMonths,
1459
+ enableSelectionDaysInNextAndPreviousMonths: l.enableSelectionDaysInNextAndPreviousMonths
1460
1460
  };
1461
- d.pickWholeWeek && YA && (mA = !0), AA.push(v(mg)), ++WA === 7 && (d.showWeekNumber && AA.unshift(x(RA - b, h, e, d.firstWeekOfYearMinDays)), y.push(k(AA, d.isRTL, d.pickWholeWeek, mA)), AA = [], WA = 0, mA = !1);
1461
+ l.pickWholeWeek && YA && (mA = !0), AA.push(v(mg)), ++WA === 7 && (l.showWeekNumber && AA.unshift(H(RA - b, h, e, l.firstWeekOfYearMinDays)), y.push(F(AA, l.isRTL, l.pickWholeWeek, mA)), AA = [], WA = 0, mA = !1);
1462
1462
  }
1463
- return j(d, y, q);
1463
+ return j(l, y, q);
1464
1464
  },
1465
1465
  isVisible: function() {
1466
1466
  return this._v;
@@ -1470,7 +1470,7 @@ function FQ() {
1470
1470
  },
1471
1471
  hide: function() {
1472
1472
  var e = this._v;
1473
- e !== !1 && (this._o.bound && I(Q, "click", this._onClick), this._o.container || (this.el.style.position = "static", this.el.style.left = "auto", this.el.style.top = "auto"), i(this.el, "is-hidden"), this._v = !1, e !== void 0 && typeof this._o.onClose == "function" && this._o.onClose.call(this));
1473
+ e !== !1 && (this._o.bound && I(Q, "click", this._onClick), this._o.container || (this.el.style.position = "static", this.el.style.left = "auto", this.el.style.top = "auto"), s(this.el, "is-hidden"), this._v = !1, e !== void 0 && typeof this._o.onClose == "function" && this._o.onClose.call(this));
1474
1474
  },
1475
1475
  /**
1476
1476
  * GAME OVER
@@ -1571,8 +1571,8 @@ function bQ(g, A, E) {
1571
1571
  };
1572
1572
  D.className = `wgt:flex-shrink-0 wgt:w-5 wgt:h-5 wgt:rounded-full wgt:flex wgt:items-center wgt:justify-center wgt:mt-0.5 ${o[t] || o.info}`, D.innerHTML = '<span class="wgt:text-white wgt:text-xs wgt:font-bold">!</span>', w.appendChild(D);
1573
1573
  }
1574
- const i = document.createElement("div");
1575
- if (i.className = "wgt:text-sm wgt:font-medium wgt:text-gray-700 wgt:leading-5 wgt:flex-1", i.innerText = A, w.appendChild(i), C) {
1574
+ const s = document.createElement("div");
1575
+ if (s.className = "wgt:text-sm wgt:font-medium wgt:text-gray-700 wgt:leading-5 wgt:flex-1", s.innerText = A, w.appendChild(s), C) {
1576
1576
  const D = document.createElement("button");
1577
1577
  D.className = "wgt:flex-shrink-0 wgt:ml-2 wgt:text-gray-400 wgt:hover:text-gray-600 wgt:text-lg wgt:leading-none", D.innerHTML = "×", D.addEventListener("click", () => {
1578
1578
  Lg(g);
@@ -1723,8 +1723,8 @@ function WQ(g, A = 640) {
1723
1723
  function _Q(g, A, E) {
1724
1724
  const [B, C] = A, [Q, t] = E, n = Math.min(t / C, Q / B), I = (t - C * n) / 2, c = (Q - B * n) / 2, w = JSON.parse(JSON.stringify(g));
1725
1725
  if (Array.isArray(g[0]))
1726
- for (let i = 0; i < g.length; i++)
1727
- w[i][0] = (g[i][0] - I) / n, w[i][1] = (g[i][1] - c) / n;
1726
+ for (let s = 0; s < g.length; s++)
1727
+ w[s][0] = (g[s][0] - I) / n, w[s][1] = (g[s][1] - c) / n;
1728
1728
  else if (g.length === 4)
1729
1729
  w[0] = (g[0] - I) / n, w[1] = (g[1] - c) / n, w[2] = (g[2] - I) / n, w[3] = (g[3] - c) / n;
1730
1730
  else
@@ -1760,13 +1760,13 @@ function $Q(g, A, E = 200) {
1760
1760
  const o = AE();
1761
1761
  t.setTransform(...o), t.drawImage(B, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0);
1762
1762
  } else if (A.length === 4) {
1763
- const [o, s, u, Y] = A, T = u - o, M = Y - s, r = T * 0.05, P = M * 0.05, J = Math.max(0, o - r), l = Math.max(0, s - P), m = Math.min(B.width, u + r), f = Math.min(B.height, Y + P), v = m - J, H = f - l;
1763
+ const [o, i, u, R] = A, M = u - o, d = R - i, r = M * 0.05, P = d * 0.05, Y = Math.max(0, o - r), T = Math.max(0, i - P), m = Math.min(B.width, u + r), f = Math.min(B.height, R + P), v = m - Y, k = f - T;
1764
1764
  t.drawImage(
1765
1765
  B,
1766
- J,
1767
- l,
1766
+ Y,
1767
+ T,
1768
1768
  v,
1769
- H,
1769
+ k,
1770
1770
  0,
1771
1771
  0,
1772
1772
  E,
@@ -1781,14 +1781,14 @@ function $Q(g, A, E = 200) {
1781
1781
  E
1782
1782
  ), I = new ImageData(E, E), c = n.data, w = I.data;
1783
1783
  for (let o = 0; o < c.length; o += 4) {
1784
- const s = c[o], u = c[o + 1], Y = c[o + 2], T = 0.2989 * s + 0.587 * u + 0.114 * Y;
1785
- w[o] = w[o + 1] = w[o + 2] = T, w[o + 3] = 255;
1784
+ const i = c[o], u = c[o + 1], R = c[o + 2], M = 0.2989 * i + 0.587 * u + 0.114 * R;
1785
+ w[o] = w[o + 1] = w[o + 2] = M, w[o + 3] = 255;
1786
1786
  }
1787
- const i = new ImageData(E, E), D = gE(w, E, E, 10);
1788
- return i.data.set(D), {
1787
+ const s = new ImageData(E, E), D = gE(w, E, E, 10);
1788
+ return s.data.set(D), {
1789
1789
  original: n,
1790
1790
  grayscale: I,
1791
- threshold: i
1791
+ threshold: s
1792
1792
  };
1793
1793
  }
1794
1794
  function AE(g, A) {
@@ -1798,14 +1798,14 @@ function gE(g, A, E, B) {
1798
1798
  const C = new Uint8ClampedArray(g.length), Q = new Uint32Array(A * E);
1799
1799
  for (let n = 0; n < E; n++)
1800
1800
  for (let I = 0; I < A; I++) {
1801
- const c = (n * A + I) * 4, w = g[c], i = n * A + I;
1802
- Q[i] = w + (I > 0 ? Q[i - 1] : 0) + (n > 0 ? Q[i - A] : 0) - (I > 0 && n > 0 ? Q[i - A - 1] : 0);
1801
+ const c = (n * A + I) * 4, w = g[c], s = n * A + I;
1802
+ Q[s] = w + (I > 0 ? Q[s - 1] : 0) + (n > 0 ? Q[s - A] : 0) - (I > 0 && n > 0 ? Q[s - A - 1] : 0);
1803
1803
  }
1804
1804
  const t = Math.floor(B / 2);
1805
1805
  for (let n = 0; n < E; n++)
1806
1806
  for (let I = 0; I < A; I++) {
1807
- const c = (n * A + I) * 4, w = Math.max(I - t, 0), i = Math.max(n - t, 0), D = Math.min(I + t, A - 1), o = Math.min(n + t, E - 1), s = (D - w + 1) * (o - i + 1), u = (Q[o * A + D] - (w > 0 ? Q[o * A + w - 1] : 0) - (i > 0 ? Q[(i - 1) * A + D] : 0) + (w > 0 && i > 0 ? Q[(i - 1) * A + w - 1] : 0)) / s * 0.9, Y = g[c] > u ? 255 : 0;
1808
- C[c] = C[c + 1] = C[c + 2] = Y, C[c + 3] = 255;
1807
+ const c = (n * A + I) * 4, w = Math.max(I - t, 0), s = Math.max(n - t, 0), D = Math.min(I + t, A - 1), o = Math.min(n + t, E - 1), i = (D - w + 1) * (o - s + 1), u = (Q[o * A + D] - (w > 0 ? Q[o * A + w - 1] : 0) - (s > 0 ? Q[(s - 1) * A + D] : 0) + (w > 0 && s > 0 ? Q[(s - 1) * A + w - 1] : 0)) / i * 0.9, R = g[c] > u ? 255 : 0;
1808
+ C[c] = C[c + 1] = C[c + 2] = R, C[c + 3] = 255;
1809
1809
  }
1810
1810
  return C;
1811
1811
  }
@@ -1844,20 +1844,20 @@ function QE(g, A, E, B, C = 0.5) {
1844
1844
  for (let n = 0; n < t; n++) {
1845
1845
  const I = g.data[n * 37 + 4];
1846
1846
  if (I < C) continue;
1847
- const c = g.data[n * 37], w = g.data[n * 37 + 1], i = g.data[n * 37 + 2], D = g.data[n * 37 + 3], o = 1, s = 1, u = [c, w, i, D], Y = g.data.slice(n * 37 + 5, n * 37 + 37), T = new Float32Array(25600);
1848
- for (let R = 0; R < 160; R++)
1849
- for (let F = 0; F < 160; F++) {
1847
+ const c = g.data[n * 37], w = g.data[n * 37 + 1], s = g.data[n * 37 + 2], D = g.data[n * 37 + 3], o = 1, i = 1, u = [c, w, s, D], R = g.data.slice(n * 37 + 5, n * 37 + 37), M = new Float32Array(25600);
1848
+ for (let x = 0; x < 160; x++)
1849
+ for (let X = 0; X < 160; X++) {
1850
1850
  let U = 0;
1851
1851
  for (let j = 0; j < 32; j++)
1852
- U += Y[j] * A.data[j * 160 * 160 + R * 160 + F];
1853
- T[R * 160 + F] = U > 0 ? 1 : 0;
1852
+ U += R[j] * A.data[j * 160 * 160 + x * 160 + X];
1853
+ M[x * 160 + X] = U > 0 ? 1 : 0;
1854
1854
  }
1855
- const M = CE();
1856
- let r = M.length > 0 ? M[0] : [], P = r.length >= 4 ? r.slice(0, 4) : u;
1857
- P = P.map((R) => [R[0] * o, R[1] * s]);
1858
- const J = 0.1, l = Math.min(...P.map((R) => R[0])), m = Math.max(...P.map((R) => R[0])), f = Math.min(...P.map((R) => R[1])), v = Math.max(...P.map((R) => R[1])), H = m - l, x = v - f, k = P.map((R) => [
1859
- R[0] + (R[0] < (l + m) / 2 ? -J * H : J * H),
1860
- R[1] + (R[1] < (f + v) / 2 ? -J * x : J * x)
1855
+ const d = CE();
1856
+ let r = d.length > 0 ? d[0] : [], P = r.length >= 4 ? r.slice(0, 4) : u;
1857
+ P = P.map((x) => [x[0] * o, x[1] * i]);
1858
+ const Y = 0.1, T = Math.min(...P.map((x) => x[0])), m = Math.max(...P.map((x) => x[0])), f = Math.min(...P.map((x) => x[1])), v = Math.max(...P.map((x) => x[1])), k = m - T, H = v - f, F = P.map((x) => [
1859
+ x[0] + (x[0] < (T + m) / 2 ? -Y * k : Y * k),
1860
+ x[1] + (x[1] < (f + v) / 2 ? -Y * H : Y * H)
1861
1861
  ]);
1862
1862
  Q.push({
1863
1863
  bbox_xyxy: u,
@@ -1867,9 +1867,9 @@ function QE(g, A, E, B, C = 0.5) {
1867
1867
  (u[1] + u[3]) / 2
1868
1868
  ],
1869
1869
  wh: [u[2] - u[0], u[3] - u[1]],
1870
- polygon_xy: r.map((R) => [R[0] * o, R[1] * s]),
1870
+ polygon_xy: r.map((x) => [x[0] * o, x[1] * i]),
1871
1871
  quad_xy: P,
1872
- padded_quad_xy: k,
1872
+ padded_quad_xy: F,
1873
1873
  image_shape: [B, E]
1874
1874
  });
1875
1875
  }
@@ -1935,15 +1935,15 @@ function tE(g, A = "sourceCanvas") {
1935
1935
  g.height
1936
1936
  );
1937
1937
  for (const c of I) {
1938
- const { _: w, bbox_xyxy: i } = c, D = _Q(
1939
- i,
1938
+ const { _: w, bbox_xyxy: s } = c, D = _Q(
1939
+ s,
1940
1940
  [g.height, g.width],
1941
1941
  [640, 640]
1942
- ), o = $Q(B, D), s = yield IE(o);
1943
- if (s)
1942
+ ), o = $Q(B, D), i = yield IE(o);
1943
+ if (i)
1944
1944
  return JSON.stringify({
1945
1945
  status: "success",
1946
- data: EE(s)
1946
+ data: EE(i)
1947
1947
  });
1948
1948
  }
1949
1949
  return JSON.stringify({
@@ -1978,18 +1978,18 @@ function cE(D) {
1978
1978
  isNewCustomer: I,
1979
1979
  handleCheckNewCustomer: c,
1980
1980
  updateRegistrationData: w,
1981
- serial: i
1981
+ serial: s
1982
1982
  }) {
1983
1983
  var MA, oA, cA, wA, eA, rA, sA, TA, SA, Mg, MB, TB, lB, dB, xB, HB, kB, RB, YB, JB, XB, FB, OB, GB, LB, zB, NB, bB, jB, yB, KB, UB, SB, pB, ZB, VB, WB, _B, $B, AC, gC, BC, CC, QC;
1984
1984
  const o = document.createElement("div");
1985
1985
  o.className = "wgt:flex wgt:flex-col wgt:gap-4 wgt:w-full";
1986
- const s = document.createElement("form");
1987
- s.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", s.addEventListener("submit", (z) => {
1986
+ const i = document.createElement("form");
1987
+ i.className = "wgt:w-full wgt:max-w-[1072px] wgt:mx-auto wgt:space-y-4", i.addEventListener("submit", (z) => {
1988
1988
  if (z.preventDefault(), !vg()) return;
1989
1989
  const G = BA();
1990
1990
  typeof g == "function" && g(G);
1991
- }), o.appendChild(s);
1992
- let u, Y, T, M, r, P, J, l, m, f, v, H, x, k, R, F, U, j, O, e, h, q, d, N, L;
1991
+ }), o.appendChild(i);
1992
+ let u, R, M, d, r, P, Y, T, m, f, v, k, H, F, x, X, U, j, O, e, h, q, l, N, L;
1993
1993
  const b = document.createElement("button");
1994
1994
  u = HA({
1995
1995
  name: "taxCode",
@@ -2027,7 +2027,7 @@ function cE(D) {
2027
2027
  u.setError(a("errorInvalidTaxCode", "Mã số thuế không hợp lệ"));
2028
2028
  }), 1e3),
2029
2029
  horizontal: !0
2030
- }), Y = HA({
2030
+ }), R = HA({
2031
2031
  name: "companyName",
2032
2032
  label: a("companyName"),
2033
2033
  required: !0,
@@ -2037,7 +2037,7 @@ function cE(D) {
2037
2037
  value: ((wA = (cA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : cA.organization) == null ? void 0 : wA.name) || "",
2038
2038
  readOnly: !1,
2039
2039
  horizontal: !0
2040
- }), T = HA({
2040
+ }), M = HA({
2041
2041
  name: "companyAddressDetail",
2042
2042
  label: a("address"),
2043
2043
  required: !0,
@@ -2053,7 +2053,7 @@ function cE(D) {
2053
2053
  label: z["tên cqt"],
2054
2054
  id: z["ma xa"]
2055
2055
  }));
2056
- if (M = Kg({
2056
+ if (d = Kg({
2057
2057
  name: "companyTaxManagement",
2058
2058
  label: a("taxAuthority"),
2059
2059
  value: ((TA = (sA = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : sA.organization) == null ? void 0 : TA.taxAuthority) || "",
@@ -2063,13 +2063,13 @@ function cE(D) {
2063
2063
  horizontal: !0,
2064
2064
  searchable: !0,
2065
2065
  onChange: (z) => {
2066
- z.target.id && Q(z.target.id), X();
2066
+ z.target.id && Q(z.target.id), J();
2067
2067
  }
2068
2068
  }), C) {
2069
2069
  const z = y.find(
2070
2070
  (G) => G.id === C
2071
2071
  );
2072
- z && M.setValue && M.setValue(
2072
+ z && d.setValue && d.setValue(
2073
2073
  z.value,
2074
2074
  z.label,
2075
2075
  z.id
@@ -2080,7 +2080,7 @@ function cE(D) {
2080
2080
  required: !1,
2081
2081
  file: (A == null ? void 0 : A.logo) || null,
2082
2082
  onFileChange: (z) => {
2083
- X();
2083
+ J();
2084
2084
  },
2085
2085
  error: null
2086
2086
  }), m = HA({
@@ -2117,10 +2117,10 @@ function cE(D) {
2117
2117
  return `${$}/${G}/${EA}`;
2118
2118
  },
2119
2119
  onSelect: (z) => {
2120
- f.setError(null), X();
2120
+ f.setError(null), J();
2121
2121
  },
2122
2122
  onClose: () => {
2123
- f.inputEl.value ? f.setError(null) : f.setError(a("errorRequired")), X();
2123
+ f.inputEl.value ? f.setError(null) : f.setError(a("errorRequired")), J();
2124
2124
  },
2125
2125
  maxDate: /* @__PURE__ */ new Date(),
2126
2126
  showMonthDropdown: !0,
@@ -2141,7 +2141,7 @@ function cE(D) {
2141
2141
  onChange: (z) => {
2142
2142
  z.target.value;
2143
2143
  }
2144
- }), x = HA({
2144
+ }), H = HA({
2145
2145
  name: "repIdCardField",
2146
2146
  label: a("idNumber"),
2147
2147
  required: !0,
@@ -2153,14 +2153,14 @@ function cE(D) {
2153
2153
  let G = z.target.value;
2154
2154
  const $ = G.replace(/[^0-9]/g, "");
2155
2155
  if ($ !== G && (z.target.value = $, G = $), G.trim() === "") {
2156
- x.setError(a("errorRequired"));
2156
+ H.setError(a("errorRequired"));
2157
2157
  return;
2158
2158
  }
2159
- /^\d{12}$/.test(G) ? x.setError(null) : x.setError(
2159
+ /^\d{12}$/.test(G) ? H.setError(null) : H.setError(
2160
2160
  a("errorInvalidIdCard", "Số CCCD phải có 12 chữ số")
2161
2161
  );
2162
2162
  }
2163
- }), k = HA({
2163
+ }), F = HA({
2164
2164
  name: "repPassportNumberField",
2165
2165
  label: a("passport", "Hộ chiếu"),
2166
2166
  required: !1,
@@ -2168,7 +2168,7 @@ function cE(D) {
2168
2168
  placeholder: a("enterPassport", "Nhập số hộ chiếu"),
2169
2169
  type: "text",
2170
2170
  value: ((RB = (kB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : kB.legalRepresentative) == null ? void 0 : RB.passportNumber) || ""
2171
- }), H = HA({
2171
+ }), k = HA({
2172
2172
  name: "repPhone",
2173
2173
  label: a("phone"),
2174
2174
  required: !0,
@@ -2180,14 +2180,14 @@ function cE(D) {
2180
2180
  let G = z.target.value;
2181
2181
  const $ = G.replace(/[^\d+().\-\s]/g, ""), EA = $.replace(/[\s.\-()]/g, "");
2182
2182
  if ($ !== G && (z.target.value = $, G = $), EA.trim() === "") {
2183
- H.setError(a("errorRequired", "Số điện thoại bắt buộc"));
2183
+ k.setError(a("errorRequired", "Số điện thoại bắt buộc"));
2184
2184
  return;
2185
2185
  }
2186
- /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(EA) ? H.setError(null) : H.setError(
2186
+ /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(EA) ? k.setError(null) : k.setError(
2187
2187
  a("errorInvalidPhone", "Số điện thoại không hợp lệ.")
2188
2188
  );
2189
2189
  }
2190
- }), R = Kg({
2190
+ }), x = Kg({
2191
2191
  name: "repNationality",
2192
2192
  label: a("country"),
2193
2193
  options: JQ,
@@ -2197,7 +2197,7 @@ function cE(D) {
2197
2197
  onChange: (z) => {
2198
2198
  z.target.value;
2199
2199
  }
2200
- }), F = HA({
2200
+ }), X = HA({
2201
2201
  name: "contactAddressDetail",
2202
2202
  label: a("permanentAddress"),
2203
2203
  required: !0,
@@ -2209,21 +2209,21 @@ function cE(D) {
2209
2209
  onInput: (z) => {
2210
2210
  const G = z.target.value;
2211
2211
  if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2212
- F.setError(
2212
+ X.setError(
2213
2213
  a("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2214
2214
  );
2215
2215
  return;
2216
2216
  }
2217
- G.trim() === "" ? F.setError(
2217
+ G.trim() === "" ? X.setError(
2218
2218
  a("errorRequired", "Địa chỉ thường trú bắt buộc")
2219
- ) : F.setError(null);
2219
+ ) : X.setError(null);
2220
2220
  }
2221
- }), d = hC({
2221
+ }), l = hC({
2222
2222
  label: a("businessLicense", "Giấy phép đăng ký kinh doanh"),
2223
2223
  required: !0,
2224
2224
  file: (A == null ? void 0 : A.license) || null,
2225
2225
  onFileChange: (z) => {
2226
- X();
2226
+ J();
2227
2227
  },
2228
2228
  error: null,
2229
2229
  accept: "image/png, image/jpeg, image/jpg, .pdf"
@@ -2276,7 +2276,7 @@ function cE(D) {
2276
2276
  a("errorInvalidEmail", "Email không hợp lệ")
2277
2277
  );
2278
2278
  }
2279
- }), J = HA({
2279
+ }), Y = HA({
2280
2280
  name: "phone",
2281
2281
  label: a("phone"),
2282
2282
  required: !0,
@@ -2288,16 +2288,16 @@ function cE(D) {
2288
2288
  let G = z.target.value;
2289
2289
  const $ = G.replace(/[^\d+().\-\s]/g, ""), EA = $.replace(/[\s.\-()]/g, "");
2290
2290
  if ($ !== G && (z.target.value = $, G = $), EA.trim() === "") {
2291
- J.setError(
2291
+ Y.setError(
2292
2292
  a("errorRequired", "Số điện thoại bắt buộc")
2293
2293
  );
2294
2294
  return;
2295
2295
  }
2296
- /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(EA) ? J.setError(null) : J.setError(
2296
+ /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/.test(EA) ? Y.setError(null) : Y.setError(
2297
2297
  a("errorInvalidPhone", "Số điện thoại Việt Nam không hợp lệ.")
2298
2298
  );
2299
2299
  }
2300
- }), l = HA({
2300
+ }), T = HA({
2301
2301
  name: "contactAddressDetail",
2302
2302
  label: a("permanentAddress"),
2303
2303
  required: !0,
@@ -2309,14 +2309,14 @@ function cE(D) {
2309
2309
  onInput: (z) => {
2310
2310
  const G = z.target.value;
2311
2311
  if (!/^[\p{L}0-9\s,.\-/()]*$/u.test(G)) {
2312
- l.setError(
2312
+ T.setError(
2313
2313
  a("errorInvalidAddress", "Địa chỉ không được chứa ký tự đặc biệt")
2314
2314
  );
2315
2315
  return;
2316
2316
  }
2317
- G.trim() === "" ? l.setError(
2317
+ G.trim() === "" ? T.setError(
2318
2318
  a("errorRequired", "Địa chỉ liên hệ bắt buộc")
2319
- ) : l.setError(null);
2319
+ ) : T.setError(null);
2320
2320
  }
2321
2321
  });
2322
2322
  const S = HA({
@@ -2334,9 +2334,9 @@ function cE(D) {
2334
2334
  U = HQ({
2335
2335
  // initialValue:
2336
2336
  // registrationData?.eInvoiceRegistration?.invoiceSymbol || "1C25TYY",
2337
- initialValue: i || ((pB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : pB.invoiceSymbol) || "1C25TYY",
2337
+ initialValue: s || ((pB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : pB.invoiceSymbol) || "1C25TYY",
2338
2338
  onChange: (z) => {
2339
- S.inputEl.value = z, X();
2339
+ S.inputEl.value = z, J();
2340
2340
  }
2341
2341
  }), j = document.createElement("input"), j.type = "checkbox", j.name = "hasUsedEInvoiceCB", j.className = "wgt:cursor-pointer", j.checked = (ZB = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : ZB.hasUsedEInvoice, j.addEventListener("change", (z) => {
2342
2342
  z.target.checked ? (Z.appendChild(gA), Z.appendChild(p)) : (O.checked = !1, h.inputEl.value = "", h.setError(null), e && (e.inputEl.value = "", e.setError(null), p.contains(e.container) && p.removeChild(e.container)), Z.removeChild(gA), Z.removeChild(p));
@@ -2407,19 +2407,19 @@ function cE(D) {
2407
2407
  if (G !== IA)
2408
2408
  return;
2409
2409
  if ($.error)
2410
- return Y.inputEl.value = "", T.inputEl.value = "", M.setValue && M.setValue("", "", ""), M.setDisabled(!1), u.setError(a("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), EA;
2411
- if (u.setError(null), Y.inputEl.value = $.ten_cty || "", T.inputEl.value = $.dia_chi || "", $.cqthue_ql) {
2410
+ return R.inputEl.value = "", M.inputEl.value = "", d.setValue && d.setValue("", "", ""), d.setDisabled(!1), u.setError(a("errorInvalidTaxCode", "Mã số thuế không hợp lệ")), EA;
2411
+ if (u.setError(null), R.inputEl.value = $.ten_cty || "", M.inputEl.value = $.dia_chi || "", $.cqthue_ql) {
2412
2412
  const DA = (OA) => OA.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), xA = DA($.cqthue_ql), JA = y.find((OA) => {
2413
2413
  const pA = DA(OA.label);
2414
2414
  return pA.includes(xA) || xA.includes(pA);
2415
2415
  });
2416
- JA && (M.setValue && M.setValue(
2416
+ JA && (d.setValue && d.setValue(
2417
2417
  JA.value,
2418
2418
  JA.label,
2419
2419
  JA.id
2420
- ), EA.taxAuthority = JA.id || "", M.setDisabled(!1));
2420
+ ), EA.taxAuthority = JA.id || "", d.setDisabled(!1));
2421
2421
  } else
2422
- M.setValue && M.setValue("", "", ""), M.setDisabled(!1);
2422
+ d.setValue && d.setValue("", "", ""), d.setDisabled(!1);
2423
2423
  return EA.name = $.ten_cty || "", EA.address = $.dia_chi || "", EA.taxCode = z, u.setError(null), EA;
2424
2424
  } catch ($) {
2425
2425
  G === IA && (Dg.error(
@@ -2433,7 +2433,7 @@ function cE(D) {
2433
2433
  a("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế.")
2434
2434
  ));
2435
2435
  } finally {
2436
- G === IA && X();
2436
+ G === IA && J();
2437
2437
  }
2438
2438
  });
2439
2439
  }
@@ -2442,9 +2442,9 @@ function cE(D) {
2442
2442
  const zA = document.createElement("h3");
2443
2443
  zA.className = "wgt:text-lg wgt:font-semibold wgt:mb-4", zA.innerText = a("unitInfo", "1. Thông tin đơn vị"), uA.appendChild(zA);
2444
2444
  const dA = document.createElement("div");
2445
- dA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(dA), dA.appendChild(u.container), dA.appendChild(Y.container), dA.appendChild(T.container), dA.appendChild(M.container);
2445
+ dA.className = "wgt:grid wgt:@max-2xl:grid-cols-1 wgt:@max-2xl:p-4 wgt:@max-2xl:gap-y-3 wgt:grid-cols-2 wgt:gap-y-2 wgt:gap-x-4 wgt:px-6 wgt:py-4 wgt:rounded-xl wgt:bg-weak-50", uA.appendChild(dA), dA.appendChild(u.container), dA.appendChild(R.container), dA.appendChild(M.container), dA.appendChild(d.container);
2446
2446
  const kA = document.createElement("div");
2447
- kA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", uA.appendChild(kA), kA.appendChild(q.container), s.appendChild(uA);
2447
+ kA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:space-x-4", uA.appendChild(kA), kA.appendChild(q.container), i.appendChild(uA);
2448
2448
  const mA = document.createElement("div");
2449
2449
  mA.className = "wgt:space-y-4";
2450
2450
  const RA = document.createElement("h3");
@@ -2468,7 +2468,7 @@ function cE(D) {
2468
2468
  function yA(z) {
2469
2469
  tA = !1, YA = !1, NA();
2470
2470
  const G = () => {
2471
- x.inputEl.value = "", m.inputEl.value = "", f.inputEl.value = "", F.inputEl.value = "", v.selectEl.value = "", R.selectEl.value = "", x.setError(null), m.setError(null), f.setError(null), F.setError(null), v.setError(null), R.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
2471
+ H.inputEl.value = "", m.inputEl.value = "", f.inputEl.value = "", X.inputEl.value = "", v.selectEl.value = "", x.selectEl.value = "", H.setError(null), m.setError(null), f.setError(null), X.setError(null), v.setError(null), x.setError(null), t && typeof t.setDate == "function" && t.setDate(null);
2472
2472
  }, $ = (DA) => {
2473
2473
  if (!DA) return "";
2474
2474
  if (/^\d{8}$/.test(DA)) {
@@ -2495,7 +2495,7 @@ function cE(D) {
2495
2495
  const { address: OA, date_of_birth: pA, full_name: bg, id_number: dg, sex: Yg } = DA;
2496
2496
  if (!dg || !/^\d{12}$/.test(dg) ? (cg(
2497
2497
  a("errorInvalidCard", "Số CCCD phải có 12 chữ số")
2498
- ), x.inputEl.value = "") : (x.inputEl.value = dg, x.setError(null)), m.inputEl.value = bg || "", f.inputEl.value = $(pA), F.inputEl.value = OA || "", Yg) {
2498
+ ), H.inputEl.value = "") : (H.inputEl.value = dg, H.setError(null)), m.inputEl.value = bg || "", f.inputEl.value = $(pA), X.inputEl.value = OA || "", Yg) {
2499
2499
  const eg = wC.find(
2500
2500
  (jg) => jg.label.toLowerCase() === Yg.toLowerCase()
2501
2501
  );
@@ -2505,7 +2505,7 @@ function cE(D) {
2505
2505
  } catch (DA) {
2506
2506
  console.error("readIdentityCard failed", DA);
2507
2507
  } finally {
2508
- X();
2508
+ J();
2509
2509
  }
2510
2510
  });
2511
2511
  }
@@ -2537,11 +2537,11 @@ function cE(D) {
2537
2537
  onFrontChange: (z) => W(null, null, function* () {
2538
2538
  var $, EA;
2539
2539
  if (N = z, KA(z, !0, !1), _A() || hg() || !mg()) {
2540
- tA = !1, YA = !1, NA(), X();
2540
+ tA = !1, YA = !1, NA(), J();
2541
2541
  return;
2542
2542
  }
2543
2543
  if ((EA = ($ = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $.legalRepresentative) == null ? void 0 : EA.idCard) {
2544
- X();
2544
+ J();
2545
2545
  return;
2546
2546
  }
2547
2547
  yA(z);
@@ -2549,11 +2549,11 @@ function cE(D) {
2549
2549
  onBackChange: (z) => W(null, null, function* () {
2550
2550
  var $, EA;
2551
2551
  if (L = z, KA(z, !1, !0), _A() || hg() || !$A()) {
2552
- tA = !1, YA = !1, NA(), X();
2552
+ tA = !1, YA = !1, NA(), J();
2553
2553
  return;
2554
2554
  }
2555
2555
  if ((EA = ($ = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $.legalRepresentative) == null ? void 0 : EA.idCardBack) {
2556
- X();
2556
+ J();
2557
2557
  return;
2558
2558
  }
2559
2559
  yA($A());
@@ -2566,28 +2566,28 @@ function cE(D) {
2566
2566
  const rg = document.createElement("div");
2567
2567
  rg.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4", UA.appendChild(rg), rg.appendChild(f.container), rg.appendChild(v.container), WA.appendChild(UA);
2568
2568
  const jA = document.createElement("div");
2569
- jA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", jA.appendChild(x.container), jA.appendChild(k.container), jA.appendChild(H.container), jA.appendChild(R.container), mA.appendChild(WA), mA.appendChild(jA), mA.appendChild(F.container), mA.appendChild(d.container);
2569
+ jA.className = "wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-4 wgt:gap-4 wgt:items-start", jA.appendChild(H.container), jA.appendChild(F.container), jA.appendChild(k.container), jA.appendChild(x.container), mA.appendChild(WA), mA.appendChild(jA), mA.appendChild(X.container), mA.appendChild(l.container);
2570
2570
  const Bg = document.createElement("ul");
2571
2571
  Bg.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
2572
2572
  const XA = document.createElement("li");
2573
2573
  XA.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", XA.innerText = a(
2574
2574
  "legalRepNote",
2575
2575
  "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."
2576
- ), Bg.appendChild(XA), mA.appendChild(Bg), s.appendChild(mA);
2576
+ ), Bg.appendChild(XA), mA.appendChild(Bg), i.appendChild(mA);
2577
2577
  const Cg = document.createElement("div");
2578
2578
  Cg.className = "wgt:space-y-4";
2579
2579
  const Pg = document.createElement("h3");
2580
2580
  Pg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", Pg.innerText = a("contactInfo", "3. Thông tin người liên hệ:"), Cg.appendChild(Pg);
2581
2581
  const FA = document.createElement("div");
2582
- FA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:items-start", FA.appendChild(r.container), FA.appendChild(P.container), FA.appendChild(J.container), FA.appendChild(l.container), Cg.appendChild(FA), s.appendChild(Cg);
2582
+ FA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:@min-2xl:grid-cols-2 wgt:gap-4 wgt:items-start", FA.appendChild(r.container), FA.appendChild(P.container), FA.appendChild(Y.container), FA.appendChild(T.container), Cg.appendChild(FA), i.appendChild(Cg);
2583
2583
  const vA = document.createElement("div");
2584
2584
  vA.className = "wgt:space-y-4";
2585
2585
  const K = document.createElement("h3");
2586
- K.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", K.innerText = a("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), vA.appendChild(K), s.appendChild(vA);
2586
+ K.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", K.innerText = a("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), vA.appendChild(K), i.appendChild(vA);
2587
2587
  const CA = document.createElement("div");
2588
2588
  CA.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:@max-4xl:flex-col", CA.appendChild(U.container), CA.appendChild(S.container), vA.appendChild(CA);
2589
2589
  const Z = document.createElement("div");
2590
- Z.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", s.appendChild(Z);
2590
+ Z.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", i.appendChild(Z);
2591
2591
  const _ = document.createElement("div");
2592
2592
  _.className = "wgt:flex wgt:gap-3 wgt:items-center wgt:text-sm wgt:text-strong-950 ", _.appendChild(j);
2593
2593
  const QA = document.createElement("h4");
@@ -2641,8 +2641,8 @@ function cE(D) {
2641
2641
  }, Rg = lQ(E);
2642
2642
  Eg.appendChild(
2643
2643
  kg(a("termsAndUsagePolicy", "Điều khoản và Chính sách sử dụng"))
2644
- ), Eg.appendChild(document.createTextNode(` ${a("of", "của")} ${Rg}.`)), aA.appendChild(qA), aA.appendChild(Eg), s.appendChild(aA), qA.addEventListener("click", () => {
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")), X();
2644
+ ), Eg.appendChild(document.createTextNode(` ${a("of", "của")} ${Rg}.`)), aA.appendChild(qA), aA.appendChild(Eg), i.appendChild(aA), qA.addEventListener("click", () => {
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")), J();
2646
2646
  });
2647
2647
  const qg = document.createElement("div");
2648
2648
  qg.className = "wgt:flex wgt:mt-6 wgt:items-center wgt:justify-end wgt:gap-2 ", b.type = "submit", b.innerText = a("next"), b.className = [
@@ -2671,8 +2671,8 @@ function cE(D) {
2671
2671
  ), JA = G.legalRepresentative.phone.replace(/[^\d+().\-\s]/g, "").replace(/[\s.\-()]/g, ""), OA = /^(?:\+84|0)(?:2\d|3\d|5\d|7\d|8\d|9\d)\d{7}$/;
2672
2672
  return !(!OA.test(DA) || !OA.test(JA) || !/^\d{12}$/.test(G.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(G.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(G.invoiceSymbol) || !z.license || !z.idCard || !z.idCardBack);
2673
2673
  }
2674
- function X() {
2675
- b.disabled = !vg() || !iA || _A() || hg() || q.getError() || d.getError();
2674
+ function J() {
2675
+ b.disabled = !vg() || !iA || _A() || hg() || q.getError() || l.getError();
2676
2676
  }
2677
2677
  function BA() {
2678
2678
  var z, G;
@@ -2681,65 +2681,65 @@ function cE(D) {
2681
2681
  taxAuthorityCode: (z = h == null ? void 0 : h.getValue()) != null ? z : "",
2682
2682
  previousEInvoiceProvider: (G = e == null ? void 0 : e.getValue()) != null ? G : "",
2683
2683
  organization: {
2684
- name: Y == null ? void 0 : Y.getValue(),
2685
- address: T == null ? void 0 : T.getValue(),
2684
+ name: R == null ? void 0 : R.getValue(),
2685
+ address: M == null ? void 0 : M.getValue(),
2686
2686
  taxCode: u == null ? void 0 : u.getValue(),
2687
- taxAuthority: M == null ? void 0 : M.getValue()
2687
+ taxAuthority: d == null ? void 0 : d.getValue()
2688
2688
  },
2689
2689
  contactPerson: {
2690
2690
  name: r == null ? void 0 : r.getValue(),
2691
- address: l == null ? void 0 : l.getValue(),
2691
+ address: T == null ? void 0 : T.getValue(),
2692
2692
  email: P == null ? void 0 : P.getValue(),
2693
- phone: J == null ? void 0 : J.getValue()
2693
+ phone: Y == null ? void 0 : Y.getValue()
2694
2694
  },
2695
2695
  legalRepresentative: {
2696
2696
  name: m == null ? void 0 : m.getValue(),
2697
2697
  dob: f == null ? void 0 : f.getValue(),
2698
2698
  gender: v == null ? void 0 : v.getValue(),
2699
- phone: H == null ? void 0 : H.getValue(),
2700
- idCard: x == null ? void 0 : x.getValue(),
2701
- passportNumber: k == null ? void 0 : k.getValue(),
2702
- nationality: R == null ? void 0 : R.getValue(),
2703
- permanentAddress: F == null ? void 0 : F.getValue()
2699
+ phone: k == null ? void 0 : k.getValue(),
2700
+ idCard: H == null ? void 0 : H.getValue(),
2701
+ passportNumber: F == null ? void 0 : F.getValue(),
2702
+ nationality: x == null ? void 0 : x.getValue(),
2703
+ permanentAddress: X == null ? void 0 : X.getValue()
2704
2704
  },
2705
2705
  hasUsedEInvoice: j == null ? void 0 : j.checked,
2706
2706
  isUsedEInvoiceBefore: O == null ? void 0 : O.checked,
2707
2707
  invoiceSymbol: U == null ? void 0 : U.getValue()
2708
2708
  },
2709
- license: d == null ? void 0 : d.getValues(),
2709
+ license: l == null ? void 0 : l.getValues(),
2710
2710
  logo: q == null ? void 0 : q.getValues(),
2711
2711
  idCard: N,
2712
2712
  idCardBack: L
2713
2713
  };
2714
2714
  }
2715
2715
  [
2716
- Y,
2716
+ R,
2717
2717
  u,
2718
- T,
2718
+ M,
2719
2719
  r,
2720
2720
  P,
2721
- J,
2722
- l,
2721
+ Y,
2722
+ T,
2723
2723
  m,
2724
2724
  f,
2725
+ k,
2725
2726
  H,
2726
- x,
2727
- F,
2727
+ X,
2728
2728
  h,
2729
2729
  e
2730
2730
  ].forEach((z) => {
2731
- z.inputEl.addEventListener("input", X);
2732
- }), [v, M].forEach((z) => {
2733
- z.selectEl.addEventListener("change", X);
2731
+ z.inputEl.addEventListener("input", J);
2732
+ }), [v, d].forEach((z) => {
2733
+ z.selectEl.addEventListener("change", J);
2734
2734
  }), [j, O].forEach((z) => {
2735
- z.addEventListener("change", X);
2735
+ z.addEventListener("change", J);
2736
2736
  }), b.addEventListener("click", (z) => {
2737
2737
  if (z.preventDefault(), !vg()) return;
2738
2738
  const G = BA();
2739
2739
  typeof g == "function" && g(G);
2740
2740
  });
2741
2741
  const hA = (((AC = ($B = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : $B.organization) == null ? void 0 : AC.taxCode) || "").trim();
2742
- return hA.length >= 10 && nA(hA), _C(rB(), mB().invoiceHubBaseUrl), A != null && A.idCard && (N = A == null ? void 0 : A.idCard), (gC = A == null ? void 0 : A.eInvoiceRegistration) != null && gC.hasUsedEInvoice && (Z.appendChild(gA), Z.appendChild(p), (BC = A == null ? void 0 : A.eInvoiceRegistration) != null && BC.isUsedEInvoiceBefore ? (O.checked = !0, p.appendChild(e.container), e.inputEl.value = (CC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : CC.previousEInvoiceProvider) : e.inputEl.value = "", h.inputEl.value = (QC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : QC.taxAuthorityCode), X(), {
2742
+ return hA.length >= 10 && nA(hA), _C(rB(), mB().invoiceHubBaseUrl), A != null && A.idCard && (N = A == null ? void 0 : A.idCard), (gC = A == null ? void 0 : A.eInvoiceRegistration) != null && gC.hasUsedEInvoice && (Z.appendChild(gA), Z.appendChild(p), (BC = A == null ? void 0 : A.eInvoiceRegistration) != null && BC.isUsedEInvoiceBefore ? (O.checked = !0, p.appendChild(e.container), e.inputEl.value = (CC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : CC.previousEInvoiceProvider) : e.inputEl.value = "", h.inputEl.value = (QC = A == null ? void 0 : A.eInvoiceRegistration) == null ? void 0 : QC.taxAuthorityCode), J(), {
2743
2743
  container: o,
2744
2744
  getValues: BA
2745
2745
  };
@@ -2777,7 +2777,7 @@ function oE({
2777
2777
  onSelect: Q,
2778
2778
  isRenew: t
2779
2779
  }) {
2780
- var P, J;
2780
+ var P, Y;
2781
2781
  const n = document.createElement("div");
2782
2782
  n.className = [
2783
2783
  "wgt:relative",
@@ -2798,50 +2798,50 @@ function oE({
2798
2798
  c.className = "wgt:w-full wgt:flex wgt:justify-between wgt:items-center";
2799
2799
  const w = document.createElement("div");
2800
2800
  w.className = "wgt:flex wgt:items-center wgt:gap-2";
2801
- const i = document.createElement("span");
2802
- if (i.className = [
2801
+ const s = document.createElement("span");
2802
+ if (s.className = [
2803
2803
  "wgt:text-base",
2804
2804
  "wgt:font-semibold",
2805
2805
  C ? "wgt:text-primary" : "wgt:text-text-sub-600"
2806
- ].join(" "), i.innerText = g.code, w.appendChild(i), E) {
2807
- const l = document.createElement("div");
2808
- l.className = "wgt:w-fit wgt:px-2 wgt:py-0.5 wgt:rounded wgt:bg-primary wgt:text-white wgt:bg-gradient-to-r wgt:from-[#FF8447] wgt:to-[#F6B51E] wgt:text-sm wgt:font-semibold", l.innerText = B, w.appendChild(l);
2806
+ ].join(" "), s.innerText = g.code, w.appendChild(s), E) {
2807
+ const T = document.createElement("div");
2808
+ T.className = "wgt:w-fit wgt:px-2 wgt:py-0.5 wgt:rounded wgt:bg-primary wgt:text-white wgt:bg-gradient-to-r wgt:from-[#FF8447] wgt:to-[#F6B51E] wgt:text-sm wgt:font-semibold", T.innerText = B, w.appendChild(T);
2809
2809
  }
2810
2810
  c.appendChild(w);
2811
2811
  const { container: D } = Ng({
2812
2812
  checked: C,
2813
- onChange: (l) => {
2813
+ onChange: (T) => {
2814
2814
  }
2815
2815
  });
2816
2816
  c.appendChild(D), I.appendChild(c);
2817
2817
  const o = document.createElement("div");
2818
2818
  o.className = "wgt:flex wgt:items-center wgt:text-gray-600 wgt:mt-2";
2819
- const s = document.createElement("div");
2820
- s.innerHTML = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2819
+ const i = document.createElement("div");
2820
+ i.innerHTML = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2821
2821
  <path d="M15.384 5.76968L6.95352 13.5705C6.6518 13.8497 6.26133 13.9811 5.85312 13.9811C5.46265 13.9811 5.07219 13.8497 4.77047 13.5705L0.546335 9.67832C-0.0571118 9.10352 -0.0571118 8.20026 0.546335 7.64188C1.14978 7.08351 2.1437 7.08351 2.74714 7.64188L5.85312 10.5159L13.1832 3.73324C13.7867 3.17486 14.7806 3.17486 15.384 3.73324C15.9875 4.30804 15.9875 5.2113 15.384 5.76968Z" fill="#008C4F"/>
2822
2822
  </svg>
2823
- `, o.appendChild(s);
2823
+ `, o.appendChild(i);
2824
2824
  const u = document.createElement("span");
2825
2825
  if (u.className = "wgt:ml-2 wgt:text-sm", A === "signature") {
2826
- const l = ag(), m = a(g.duration.unit), f = l === "en" && g.duration.value > 1 ? m + "s" : m;
2826
+ const T = ag(), m = a(g.duration.unit), f = T === "en" && g.duration.value > 1 ? m + "s" : m;
2827
2827
  u.innerText = `${a("duration")}: ${g.duration.value} ${f} `;
2828
2828
  } else typeof (g == null ? void 0 : g.limit) == "number" ? u.innerText = `${g == null ? void 0 : g.limit.toLocaleString(
2829
2829
  "vi-VN"
2830
2830
  )} ${a("searchUnits")}` : u.innerText = "";
2831
2831
  o.appendChild(u), I.appendChild(o);
2832
- const Y = document.createElement("div");
2833
- Y.className = "wgt:mt-4";
2834
- const T = document.createElement("span");
2835
- T.className = [
2832
+ const R = document.createElement("div");
2833
+ R.className = "wgt:mt-4";
2834
+ const M = document.createElement("span");
2835
+ M.className = [
2836
2836
  "wgt:block",
2837
2837
  "wgt:text-2xl",
2838
2838
  "wgt:font-bold",
2839
2839
  C ? "wgt:text-primary" : "wgt:text-text-sub-600"
2840
2840
  ].join(" ");
2841
- let M = t ? (P = g == null ? void 0 : g.renewPrice) != null ? P : 0 : (J = g == null ? void 0 : g.price) != null ? J : 0;
2842
- T.innerText = lA((g == null ? void 0 : g.limit) * M), Y.appendChild(T);
2841
+ let d = t ? (P = g == null ? void 0 : g.renewPrice) != null ? P : 0 : (Y = g == null ? void 0 : g.price) != null ? Y : 0;
2842
+ M.innerText = lA((g == null ? void 0 : g.limit) * d), R.appendChild(M);
2843
2843
  const r = document.createElement("span");
2844
- return r.className = "wgt:text-sm wgt:text-text-sub-600", r.innerText = `VND/${a("package")}`, Y.appendChild(r), n.appendChild(Y), { container: n };
2844
+ return r.className = "wgt:text-sm wgt:text-text-sub-600", r.innerText = `VND/${a("package")}`, R.appendChild(r), n.appendChild(R), { container: n };
2845
2845
  }
2846
2846
  function oC({
2847
2847
  type: g = "service",
@@ -2871,44 +2871,44 @@ function oC({
2871
2871
  "wgt:select-none"
2872
2872
  ].join(" "), c.style.scrollSnapType = "x mandatory", c.style.overflowX = "auto", c.style.scrollBehavior = "smooth", c.style.scrollbarWidth = "none", c.style.msOverflowStyle = "none", c.style.WebkitOverflowScrolling = "touch", c.style.scrollbarWidth = "none", c.style.overflowY = "hidden", I.appendChild(c);
2873
2873
  function w() {
2874
- c.innerHTML = "", A.forEach((s) => {
2875
- const u = s._id === C, Y = E.includes(s.code), { container: T } = oE({
2876
- pkg: s,
2874
+ c.innerHTML = "", A.forEach((i) => {
2875
+ const u = i._id === C, R = E.includes(i.code), { container: M } = oE({
2876
+ pkg: i,
2877
2877
  type: g,
2878
- isDiscounted: Y,
2878
+ isDiscounted: R,
2879
2879
  promotion: B,
2880
2880
  isSelected: u,
2881
2881
  isRenew: n,
2882
2882
  onSelect: () => {
2883
- typeof t == "function" && t((Q || n) && u ? "" : s._id);
2883
+ typeof t == "function" && t((Q || n) && u ? "" : i._id);
2884
2884
  }
2885
2885
  });
2886
- c.appendChild(T);
2886
+ c.appendChild(M);
2887
2887
  });
2888
2888
  }
2889
2889
  w();
2890
- let i = !1, D, o;
2891
- return c.addEventListener("mousedown", (s) => {
2892
- i = !0, c.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), D = s.pageX - c.offsetLeft, o = c.scrollLeft;
2890
+ let s = !1, D, o;
2891
+ return c.addEventListener("mousedown", (i) => {
2892
+ s = !0, c.classList.replace("wgt:cursor-grab", "wgt:cursor-grabbing"), D = i.pageX - c.offsetLeft, o = c.scrollLeft;
2893
2893
  }), document.addEventListener("mouseup", () => {
2894
- i = !1, c.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2894
+ s = !1, c.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2895
2895
  }), c.addEventListener("mouseleave", () => {
2896
- i = !1, c.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2897
- }), c.addEventListener("mousemove", (s) => {
2898
- if (!i) return;
2899
- s.preventDefault();
2900
- const Y = (s.pageX - c.offsetLeft - D) * 1.5;
2901
- c.scrollLeft = o - Y;
2902
- }), c.addEventListener("wheel", (s) => {
2903
- s.preventDefault(), c.scrollLeft += s.deltaY;
2896
+ s = !1, c.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
2897
+ }), c.addEventListener("mousemove", (i) => {
2898
+ if (!s) return;
2899
+ i.preventDefault();
2900
+ const R = (i.pageX - c.offsetLeft - D) * 1.5;
2901
+ c.scrollLeft = o - R;
2902
+ }), c.addEventListener("wheel", (i) => {
2903
+ i.preventDefault(), c.scrollLeft += i.deltaY;
2904
2904
  }), {
2905
2905
  container: I,
2906
- setSelectedPackageId(s) {
2907
- C = s, w();
2906
+ setSelectedPackageId(i) {
2907
+ C = i, w();
2908
2908
  }
2909
2909
  };
2910
2910
  }
2911
- const aE = "1.97.0";
2911
+ const aE = "1.97.2";
2912
2912
  function DE(E) {
2913
2913
  return W(this, arguments, function* ({ search: g, bank: A }) {
2914
2914
  return (yield LA.get(`${zg}`, {
@@ -3031,8 +3031,8 @@ function rE({ name: g, value: A, feeLabel: E, required: B, description: C, isChe
3031
3031
  ].join(" "), D.textContent = a("required"), c.appendChild(D);
3032
3032
  }
3033
3033
  I.appendChild(c);
3034
- const i = document.createElement("p");
3035
- return i.className = "wgt:text-text-soft-400 wgt:text-sm", i.textContent = C, I.appendChild(i), t.appendChild(I), { container: t };
3034
+ const s = document.createElement("p");
3035
+ return s.className = "wgt:text-text-soft-400 wgt:text-sm", s.textContent = C, I.appendChild(s), t.appendChild(I), { container: t };
3036
3036
  }
3037
3037
  function qB() {
3038
3038
  const g = document.createElement("div");
@@ -3092,14 +3092,14 @@ function PE({
3092
3092
  disabled: E || g.isSelected
3093
3093
  });
3094
3094
  w.className = "wgt:absolute wgt:top-0 wgt:right-0", t.appendChild(w), Q.appendChild(t);
3095
- const i = document.createElement("p");
3096
- return i.className = [
3095
+ const s = document.createElement("p");
3096
+ return s.className = [
3097
3097
  "wgt:text-xs",
3098
3098
  "wgt:font-normal",
3099
3099
  "wgt:text-right",
3100
3100
  "wgt:text-[#335CFF]",
3101
3101
  "wgt:italic"
3102
- ].join(" "), i.textContent = `${a("validityPeriod")}: ${a("expiredDate")} ${g.expiredAt.split("T")[0]}`, Q.appendChild(i), B.appendChild(C), B.appendChild(Q), { container: B };
3102
+ ].join(" "), s.textContent = `${a("validityPeriod")}: ${a("expiredDate")} ${g.expiredAt.split("T")[0]}`, Q.appendChild(s), B.appendChild(C), B.appendChild(Q), { container: B };
3103
3103
  }
3104
3104
  function qE({
3105
3105
  theme: g,
@@ -3120,10 +3120,10 @@ function qE({
3120
3120
  return W(this, null, function* () {
3121
3121
  A && clearTimeout(A), E !== "" ? A = setTimeout(() => W(null, null, function* () {
3122
3122
  try {
3123
- const M = E.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), r = yield DE({ search: M, bank: g });
3123
+ const d = E.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), r = yield DE({ search: d, bank: g });
3124
3124
  r && (Q = r), B && B();
3125
- } catch (M) {
3126
- console.error("Error searching packages:", M), Dg.error(a("errorSearchingPackages"), {
3125
+ } catch (d) {
3126
+ console.error("Error searching packages:", d), Dg.error(a("errorSearchingPackages"), {
3127
3127
  autoClose: 5e3,
3128
3128
  closeButton: !0,
3129
3129
  icon: !0
@@ -3132,46 +3132,46 @@ function qE({
3132
3132
  }), 500) : (Q = C, B && B());
3133
3133
  });
3134
3134
  }
3135
- const i = eE({
3135
+ const s = eE({
3136
3136
  value: "",
3137
3137
  placeholder: a("searchUnits"),
3138
- onInputChange: (M) => {
3139
- E = M.target.value.replace(/\D/g, ""), w();
3138
+ onInputChange: (d) => {
3139
+ E = d.target.value.replace(/\D/g, ""), w();
3140
3140
  }
3141
3141
  });
3142
- n.appendChild(i.container);
3142
+ n.appendChild(s.container);
3143
3143
  const D = document.createElement("div");
3144
3144
  D.className = "wgt:flex wgt:flex-col wgt:gap-2", t.appendChild(D);
3145
3145
  const o = document.createElement("h3");
3146
3146
  o.className = "wgt:text-sm wgt:font-semibold wgt:text-[#525866]", o.innerText = a("mostSuitablePackage"), D.appendChild(o);
3147
- const s = document.createElement("div");
3148
- D.appendChild(s);
3147
+ const i = document.createElement("div");
3148
+ D.appendChild(i);
3149
3149
  const u = document.createElement("div");
3150
3150
  u.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-8", u.innerHTML = `
3151
3151
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
3152
3152
  <div class="wgt:h-8 wgt:w-8 wgt:animate-spin wgt:rounded-full wgt:border-2 wgt:border-solid wgt:border-primary wgt:border-t-transparent"></div>
3153
3153
  <span class="wgt:text-sm wgt:text-text-sub-600">${a("loading")}...</span>
3154
3154
  </div>
3155
- `, s.appendChild(u);
3156
- function Y(M) {
3157
- return C.find((r) => r._id === M) || null;
3155
+ `, i.appendChild(u);
3156
+ function R(d) {
3157
+ return C.find((r) => r._id === d) || null;
3158
3158
  }
3159
- function T() {
3160
- s.contains(u) && s.removeChild(u);
3159
+ function M() {
3160
+ i.contains(u) && i.removeChild(u);
3161
3161
  }
3162
3162
  return {
3163
3163
  container: t,
3164
- invoiceSelectorWrapper: s,
3165
- setInvoicePackages: (M) => {
3166
- C = M;
3164
+ invoiceSelectorWrapper: i,
3165
+ setInvoicePackages: (d) => {
3166
+ C = d;
3167
3167
  },
3168
- setFilteredInvoiceOptions: (M) => {
3169
- Q = M;
3168
+ setFilteredInvoiceOptions: (d) => {
3169
+ Q = d;
3170
3170
  },
3171
3171
  getInvoicePackages: () => C,
3172
3172
  getFilteredInvoiceOptions: () => Q,
3173
- findInvoiceById: Y,
3174
- removeLoading: T
3173
+ findInvoiceById: R,
3174
+ removeLoading: M
3175
3175
  };
3176
3176
  }
3177
3177
  function DC(g = !1) {
@@ -3278,20 +3278,20 @@ function lE(P) {
3278
3278
  setOrderId: I,
3279
3279
  setTotalAmount: c,
3280
3280
  theme: w,
3281
- selectedProvider: i,
3281
+ selectedProvider: s,
3282
3282
  selectedPromotions: D,
3283
3283
  registrationData: o,
3284
- setSelectedPromotions: s,
3284
+ setSelectedPromotions: i,
3285
3285
  setPackages: u,
3286
- setPromotionCodes: Y,
3287
- isNewCustomer: T,
3288
- savedQuantities: M,
3286
+ setPromotionCodes: R,
3287
+ isNewCustomer: M,
3288
+ savedQuantities: d,
3289
3289
  setSavedQuantities: r
3290
3290
  }) {
3291
- let J = "", l = B ? B._id : null, m = C ? C._id : null, f = D ? D.map((K) => K) : [], v = [], H = [], x = [], k = [], R = null, F = (M == null ? void 0 : M.qtyRegFee) || 1, U = (M == null ? void 0 : M.qtyInvoicePkg) || 1, j = (M == null ? void 0 : M.qtySignaturePkg) || 1;
3291
+ let Y = "", T = B ? B._id : null, m = C ? C._id : null, f = D ? D.map((K) => K) : [], v = [], k = [], H = [], F = [], x = null, X = (d == null ? void 0 : d.qtyRegFee) || 1, U = (d == null ? void 0 : d.qtyInvoicePkg) || 1, j = (d == null ? void 0 : d.qtySignaturePkg) || 1;
3292
3292
  function O() {
3293
3293
  r && r({
3294
- qtyRegFee: F,
3294
+ qtyRegFee: X,
3295
3295
  qtyInvoicePkg: U,
3296
3296
  qtySignaturePkg: j
3297
3297
  });
@@ -3303,7 +3303,7 @@ function lE(P) {
3303
3303
  h.className = "wgt:relative wgt:flex wgt:w-full wgt:h-full wgt:flex-col wgt:gap-8 wgt:py-8";
3304
3304
  const {
3305
3305
  container: q,
3306
- open: d,
3306
+ open: l,
3307
3307
  close: N
3308
3308
  } = qB();
3309
3309
  h.appendChild(q);
@@ -3320,15 +3320,15 @@ function lE(P) {
3320
3320
  removeLoading: zA
3321
3321
  } = qE({
3322
3322
  theme: w,
3323
- debounceTimer: R,
3324
- typedUnits: J,
3323
+ debounceTimer: x,
3324
+ typedUnits: Y,
3325
3325
  onSearchComplete: () => {
3326
3326
  mg(), vA();
3327
3327
  }
3328
3328
  });
3329
3329
  L.appendChild(b);
3330
- const { container: dA, signatureSelectorWrapper: kA } = DC(!T);
3331
- DC(!T), L.appendChild(dA);
3330
+ const { container: dA, signatureSelectorWrapper: kA } = DC(!M);
3331
+ DC(!M), L.appendChild(dA);
3332
3332
  const mA = document.createElement("div");
3333
3333
  mA.className = "wgt:flex wgt:items-center wgt:justify-center wgt:py-4", mA.innerHTML = `
3334
3334
  <div class="wgt:flex wgt:flex-col wgt:items-center wgt:gap-2">
@@ -3352,7 +3352,7 @@ function lE(P) {
3352
3352
  });
3353
3353
  yA.appendChild(KA);
3354
3354
  const gg = (K, CA, Z, _) => W(null, null, function* () {
3355
- d();
3355
+ l();
3356
3356
  const p = o.eInvoiceRegistration, { isUsedEInvoiceBefore: QA } = p, gA = yg(p, ["isUsedEInvoiceBefore"]);
3357
3357
  let V = [
3358
3358
  {
@@ -3367,19 +3367,19 @@ function lE(P) {
3367
3367
  code: K.code,
3368
3368
  quantity: K.quantity
3369
3369
  }), _.length > 0 && _.forEach((aA) => {
3370
- const iA = x[aA];
3370
+ const iA = H[aA];
3371
3371
  iA.reward.packageCodes.length > 0 && iA.reward.packageCodes.forEach((qA) => {
3372
3372
  V.push({
3373
3373
  code: qA,
3374
3374
  quantity: 1
3375
3375
  });
3376
3376
  });
3377
- }), u(V), Y(_);
3377
+ }), u(V), R(_);
3378
3378
  try {
3379
3379
  const aA = yield AQ({
3380
3380
  eInvoiceRegistration: PA({}, gA),
3381
3381
  bank: o.bank,
3382
- provider: i.route,
3382
+ provider: s.route,
3383
3383
  logo: o.logo,
3384
3384
  organizationRegistrationCert: o.license,
3385
3385
  legalRepresentativeIdCard: [
@@ -3388,7 +3388,7 @@ function lE(P) {
3388
3388
  ],
3389
3389
  packages: V,
3390
3390
  promotionCodes: _,
3391
- isRenew: !T
3391
+ isRenew: !M
3392
3392
  });
3393
3393
  I(aA.orderId), g();
3394
3394
  } catch (aA) {
@@ -3401,21 +3401,21 @@ function lE(P) {
3401
3401
  className: "wgt:text-white wgt:bg-primary",
3402
3402
  handleClick: () => W(null, null, function* () {
3403
3403
  const K = S().find(
3404
- (gA) => gA._id === l
3404
+ (gA) => gA._id === T
3405
3405
  ), CA = v.find(
3406
3406
  (gA) => gA._id === m
3407
3407
  );
3408
- if (T && !CA) {
3408
+ if (M && !CA) {
3409
3409
  Dg.error(a("errorSelectSignature") || "Vui lòng chọn gói chữ ký số");
3410
3410
  return;
3411
3411
  }
3412
3412
  let Z = null;
3413
- T && !(K != null && K.withoutInitialFee) ? (Z = GA(PA({}, H[0]), {
3414
- quantity: F
3413
+ M && !(K != null && K.withoutInitialFee) ? (Z = GA(PA({}, k[0]), {
3414
+ quantity: X
3415
3415
  }), Q(Z)) : Q(null);
3416
3416
  let _ = GA(PA({}, K), { quantity: U }), QA = CA ? GA(PA({}, CA), { quantity: j }) : null;
3417
- t(_), n(QA), s(f), O(), r && r({
3418
- qtyRegFee: F,
3417
+ t(_), n(QA), i(f), O(), r && r({
3418
+ qtyRegFee: X,
3419
3419
  qtyInvoicePkg: U,
3420
3420
  qtySignaturePkg: j
3421
3421
  }), yield gg(
@@ -3439,16 +3439,16 @@ function lE(P) {
3439
3439
  ] = yield Promise.allSettled([
3440
3440
  mE(),
3441
3441
  uE({ bank: w }),
3442
- iE({ bank: w, hasRenew: !T }),
3442
+ iE({ bank: w, hasRenew: !M }),
3443
3443
  sE({ bank: w })
3444
3444
  ]);
3445
- if (_.status === "fulfilled" ? H = _.value || [] : (console.error(
3445
+ if (_.status === "fulfilled" ? k = _.value || [] : (console.error(
3446
3446
  "Failed to load init packages:",
3447
3447
  _.reason
3448
3448
  ), Dg.error(
3449
3449
  a("errorLoadingInitPackages") || "Failed to load registration packages"
3450
- ), H = []), Z.status === "fulfilled" ? (((K = Z == null ? void 0 : Z.value) == null ? void 0 : K.length) > 0 && Z.value.forEach((V) => {
3451
- V.codes.length > 0 && (x[V.codes[0].code] = {
3450
+ ), k = []), Z.status === "fulfilled" ? (((K = Z == null ? void 0 : Z.value) == null ? void 0 : K.length) > 0 && Z.value.forEach((V) => {
3451
+ V.codes.length > 0 && (H[V.codes[0].code] = {
3452
3452
  id: V.id,
3453
3453
  name: V.name,
3454
3454
  nameEn: V.nameEn,
@@ -3463,15 +3463,15 @@ function lE(P) {
3463
3463
  isDisabled: !1,
3464
3464
  reward: V.reward
3465
3465
  });
3466
- }), Object.keys(x).length > 0 && (f = D || Object.keys(x).filter(
3467
- (V) => x[V].bank === w && x[V].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && x[V].limit > x[V].used
3466
+ }), Object.keys(H).length > 0 && (f = D || Object.keys(H).filter(
3467
+ (V) => H[V].bank === w && H[V].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && H[V].limit > H[V].used
3468
3468
  ), Pg())) : console.error("Failed to load promotions:", Z.reason), QA.status === "fulfilled") {
3469
- const V = T ? QA.value : QA.value.filter((p) => p.renewPrice !== 0);
3469
+ const V = M ? QA.value : QA.value.filter((p) => p.renewPrice !== 0);
3470
3470
  if (AA(V || []), QA.value.length > 0) {
3471
3471
  const p = QA.value.find(
3472
- (aA) => k.includes(aA.code)
3472
+ (aA) => F.includes(aA.code)
3473
3473
  );
3474
- l = B ? B._id : p ? p._id : V == null ? void 0 : V[0]._id, nA(V);
3474
+ T = B ? B._id : p ? p._id : V == null ? void 0 : V[0]._id, nA(V);
3475
3475
  }
3476
3476
  zA();
3477
3477
  } else
@@ -3484,9 +3484,9 @@ function lE(P) {
3484
3484
  if (gA.status === "fulfilled")
3485
3485
  if (v = gA.value || [], v.length > 0) {
3486
3486
  const V = v.find(
3487
- (p) => k.includes(p.code)
3487
+ (p) => F.includes(p.code)
3488
3488
  );
3489
- T ? m = C ? C._id : V ? V._id : T ? (CA = v == null ? void 0 : v.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : CA._id : null : m = C ? C._id : (
3489
+ M ? m = C ? C._id : V ? V._id : M ? (CA = v == null ? void 0 : v.filter((p) => !p.isBonusPackage)[0]) == null ? void 0 : CA._id : null : m = C ? C._id : (
3490
3490
  // : promotionPkg
3491
3491
  // ? promotionPkg._id
3492
3492
  // : signaturePackages?.filter((p) => !p.isBonusPackage)[0]?._id;
@@ -3513,9 +3513,9 @@ function lE(P) {
3513
3513
  mg(), rg(), Bg(), FA(), vA();
3514
3514
  }
3515
3515
  function fg(K, CA, Z) {
3516
- const _ = Object.values(x).find(
3516
+ const _ = Object.values(H).find(
3517
3517
  (p) => p.bank === w && p.appliedPackages.includes(K)
3518
- ), QA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used, gA = Object.values(x).find(
3518
+ ), QA = _ && !_.isDisabled && !(_.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && _.limit !== _.used, gA = Object.values(H).find(
3519
3519
  (p) => p.bank === w && p.appliedPackages.includes(CA)
3520
3520
  ), V = gA && !gA.isDisabled && !(gA.expiredAt < (/* @__PURE__ */ new Date()).toISOString()) && gA.limit !== gA.used;
3521
3521
  if (QA && !V) {
@@ -3536,17 +3536,17 @@ function lE(P) {
3536
3536
  $A = oC({
3537
3537
  type: "service",
3538
3538
  packageOptions: IA(),
3539
- disCountedPackages: k,
3539
+ disCountedPackages: F,
3540
3540
  promotion: a("discount"),
3541
- selectedPackageId: l,
3542
- isRenew: !T,
3541
+ selectedPackageId: T,
3542
+ isRenew: !M,
3543
3543
  handlePackageSelect: (K) => {
3544
3544
  var _, QA;
3545
3545
  let CA = (_ = S().find(
3546
- (gA) => gA._id === l
3546
+ (gA) => gA._id === T
3547
3547
  )) == null ? void 0 : _.code, Z = (QA = S().find((gA) => gA._id === K)) == null ? void 0 : QA.code;
3548
3548
  fg(CA, Z, () => {
3549
- l = K, $A.setSelectedPackageId(K), Cg(), Bg(), FA(), vA();
3549
+ T = K, $A.setSelectedPackageId(K), Cg(), Bg(), FA(), vA();
3550
3550
  });
3551
3551
  }
3552
3552
  }), y.appendChild($A.container);
@@ -3561,16 +3561,16 @@ function lE(P) {
3561
3561
  UA = oC({
3562
3562
  type: "signature",
3563
3563
  packageOptions: v.filter((K) => !K.isBonusPackage),
3564
- disCountedPackages: k,
3564
+ disCountedPackages: F,
3565
3565
  promotion: a("gift"),
3566
3566
  selectedPackageId: m,
3567
- allowDeselect: !T,
3567
+ allowDeselect: !M,
3568
3568
  handlePackageSelect: (K) => {
3569
3569
  var _, QA;
3570
3570
  let CA = (_ = v.find(
3571
3571
  (gA) => gA._id === m
3572
3572
  )) == null ? void 0 : _.code, Z = (QA = v.find((gA) => gA._id === K)) == null ? void 0 : QA.code;
3573
- if (!T && m === K) {
3573
+ if (!M && m === K) {
3574
3574
  m = null, UA.setSelectedPackageId(null), Cg(), Bg(), FA(), vA();
3575
3575
  return;
3576
3576
  }
@@ -3589,21 +3589,21 @@ function lE(P) {
3589
3589
  function Bg() {
3590
3590
  mA.remove(), jA.innerHTML = "";
3591
3591
  const K = S().find(
3592
- (CA) => CA._id === l
3592
+ (CA) => CA._id === T
3593
3593
  );
3594
- if (H.length > 0) {
3594
+ if (k.length > 0) {
3595
3595
  const { container: CA } = rE({
3596
3596
  name: "registrationFee",
3597
3597
  value: "standard",
3598
3598
  feeLabel: `${a("registrationFee")}: ${lA(
3599
- H[0].price
3599
+ k[0].price
3600
3600
  )} VND`,
3601
3601
  required: !0,
3602
- description: H[0][Hg(ag())],
3602
+ description: k[0][Hg(ag())],
3603
3603
  // getCurrentLanguage() === "vi"
3604
3604
  // ? initPackages[0].name
3605
3605
  // : initPackages[0].nameEn,
3606
- isChecked: T && !(K != null && K.withoutInitialFee)
3606
+ isChecked: M && !(K != null && K.withoutInitialFee)
3607
3607
  });
3608
3608
  jA.appendChild(CA);
3609
3609
  }
@@ -3612,12 +3612,12 @@ function lE(P) {
3612
3612
  XA.className = "promotion-wrapper wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
3613
3613
  function Cg() {
3614
3614
  const K = S().find(
3615
- (Z) => Z._id === l
3615
+ (Z) => Z._id === T
3616
3616
  ), CA = v.find(
3617
3617
  (Z) => Z._id === m
3618
3618
  );
3619
- Object.keys(x).forEach((Z) => {
3620
- const _ = x[Z];
3619
+ Object.keys(H).forEach((Z) => {
3620
+ const _ = H[Z];
3621
3621
  if (_.bank !== w)
3622
3622
  return;
3623
3623
  let QA = !1;
@@ -3633,10 +3633,10 @@ function lE(P) {
3633
3633
  }), Pg();
3634
3634
  }
3635
3635
  function Pg() {
3636
- k = Object.values(x).filter((K) => K.bank === w).map((K) => K.appliedPackages[0]);
3636
+ F = Object.values(H).filter((K) => K.bank === w).map((K) => K.appliedPackages[0]);
3637
3637
  }
3638
3638
  function FA() {
3639
- if (Object.values(x).filter(
3639
+ if (Object.values(H).filter(
3640
3640
  (p) => p.bank === w
3641
3641
  ).length === 0) {
3642
3642
  L.contains(XA) && L.removeChild(XA);
@@ -3649,7 +3649,7 @@ function lE(P) {
3649
3649
  Z.className = "wgt:w-full wgt:flex wgt:items-center wgt:gap-2 wgt:@max-2xl:flex-col wgt:@max-2xl:items-start";
3650
3650
  const _ = document.createElement("div");
3651
3651
  _.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(_), f && f.length > 0 && f.filter((aA) => {
3652
- const iA = Object.values(x).find(
3652
+ const iA = Object.values(H).find(
3653
3653
  (qA) => qA.code === aA
3654
3654
  );
3655
3655
  return iA && iA.bank === w;
@@ -3682,7 +3682,7 @@ function lE(P) {
3682
3682
  Z.appendChild(QA), XA.appendChild(Z);
3683
3683
  const gA = document.createElement("div");
3684
3684
  gA.className = "wgt:w-full wgt:grid wgt:grid-cols-3 wgt:gap-4 wgt:@max-2xl:flex wgt:@max-2xl:flex-col", XA.appendChild(gA);
3685
- const V = Object.values(x).filter(
3685
+ const V = Object.values(H).filter(
3686
3686
  (p) => p.bank === w
3687
3687
  );
3688
3688
  if (V.length > 0)
@@ -3706,65 +3706,65 @@ function lE(P) {
3706
3706
  function vA() {
3707
3707
  var qA, wg, Ag, Qg, Eg, kg, Rg, qg, vg;
3708
3708
  if (O(), tA.innerHTML = "", L.appendChild(WA), L.appendChild(YA), L.appendChild(RA), S().length === 0 && v.length === 0) {
3709
- const X = document.createElement("tr");
3710
- X.innerHTML = `
3709
+ const J = document.createElement("tr");
3710
+ J.innerHTML = `
3711
3711
  <td colspan="5" class="wgt:px-3 wgt:py-8 wgt:text-center wgt:text-text-sub-600 wgt:@max-2xl:col-span-5">
3712
3712
  ${a("noDataAvailable") || "No data available"}
3713
3713
  </td>
3714
- `, tA.appendChild(X), c(0);
3714
+ `, tA.appendChild(J), c(0);
3715
3715
  return;
3716
3716
  }
3717
3717
  const K = S().find(
3718
- (X) => X._id === l
3718
+ (J) => J._id === T
3719
3719
  );
3720
- if (T && (H == null ? void 0 : H.length) > 0 && !(K != null && K.withoutInitialFee)) {
3721
- const X = document.createElement("tr");
3722
- X.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
3720
+ if (M && (k == null ? void 0 : k.length) > 0 && !(K != null && K.withoutInitialFee)) {
3721
+ const J = document.createElement("tr");
3722
+ J.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
3723
3723
  const BA = document.createElement("td");
3724
- BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", BA.innerText = ag() === "vi" ? H[0].name : H[0].nameEn, X.appendChild(BA);
3724
+ BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", BA.innerText = ag() === "vi" ? k[0].name : k[0].nameEn, J.appendChild(BA);
3725
3725
  const hA = document.createElement("td");
3726
- 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 = a("package"), X.appendChild(hA);
3726
+ 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 = a("package"), J.appendChild(hA);
3727
3727
  const MA = document.createElement("td");
3728
3728
  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";
3729
3729
  const oA = document.createElement("div");
3730
3730
  oA.className = "wgt:w-full wgt:justify-between wgt:inline-flex wgt:items-center wgt:border wgt:border-soft-200 wgt:rounded-lg wgt:@max-2xl:w-full wgt:@max-2xl:max-w-[200px] wgt:@max-2xl:mx-auto";
3731
3731
  const cA = document.createElement("button");
3732
3732
  cA.type = "button", cA.ariaLabel = a("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", () => {
3733
- F > 1 && (F -= 1, vA());
3733
+ X > 1 && (X -= 1, vA());
3734
3734
  }), oA.appendChild(cA);
3735
3735
  const wA = document.createElement("span");
3736
- 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 = F, oA.appendChild(wA);
3736
+ 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, oA.appendChild(wA);
3737
3737
  const eA = document.createElement("button");
3738
3738
  eA.type = "button", eA.ariaLabel = a("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", () => {
3739
- F += 1, vA();
3740
- }), oA.appendChild(eA), MA.appendChild(oA), X.appendChild(MA);
3739
+ X += 1, vA();
3740
+ }), oA.appendChild(eA), MA.appendChild(oA), J.appendChild(MA);
3741
3741
  const rA = document.createElement("td");
3742
- 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 = H[0]) == null ? void 0 : qA.price) + " VND", X.appendChild(rA);
3742
+ 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 = k[0]) == null ? void 0 : qA.price) + " VND", J.appendChild(rA);
3743
3743
  const sA = document.createElement("td");
3744
- 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:min-w-[16rem] wgt:@max-2xl:hidden", sA.innerText = lA(((wg = H[0]) == null ? void 0 : wg.price) * F) + " VND", X.appendChild(sA);
3744
+ 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:min-w-[16rem] wgt:@max-2xl:hidden", sA.innerText = lA(((wg = k[0]) == null ? void 0 : wg.price) * X) + " VND", J.appendChild(sA);
3745
3745
  const TA = document.createElement("div");
3746
3746
  TA.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", TA.innerHTML = `
3747
3747
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3748
3748
  <span>${a("unitPrice")}:</span>
3749
3749
  <span class="wgt:font-medium">${lA(
3750
- (Ag = H[0]) == null ? void 0 : Ag.price
3750
+ (Ag = k[0]) == null ? void 0 : Ag.price
3751
3751
  )} VND</span>
3752
3752
  </div>
3753
3753
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3754
3754
  <span>${a("total")}:</span>
3755
3755
  <span class="wgt:text-primary">${lA(
3756
- ((Qg = H[0]) == null ? void 0 : Qg.price) * F
3756
+ ((Qg = k[0]) == null ? void 0 : Qg.price) * X
3757
3757
  )} VND</span>
3758
3758
  </div>
3759
- `, BA.appendChild(TA), tA.appendChild(X);
3759
+ `, BA.appendChild(TA), tA.appendChild(J);
3760
3760
  }
3761
3761
  {
3762
- const X = uA(l);
3763
- if (X) {
3762
+ const J = uA(T);
3763
+ if (J) {
3764
3764
  const BA = document.createElement("tr");
3765
3765
  BA.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
3766
3766
  const hA = document.createElement("td");
3767
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", hA.innerText = X[Hg(ag())], // getCurrentLanguage() === "vi" ? invPkg?.name : invPkg?.nameEn;
3767
+ hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", hA.innerText = J[Hg(ag())], // getCurrentLanguage() === "vi" ? invPkg?.name : invPkg?.nameEn;
3768
3768
  BA.appendChild(hA);
3769
3769
  const MA = document.createElement("td");
3770
3770
  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 = a("package"), BA.appendChild(MA);
@@ -3774,44 +3774,44 @@ function lE(P) {
3774
3774
  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";
3775
3775
  const wA = document.createElement("button");
3776
3776
  wA.type = "button", wA.ariaLabel = a("decrease");
3777
- const eA = T ? (Eg = X == null ? void 0 : X.price) != null ? Eg : 0 : (kg = X == null ? void 0 : X.renewPrice) != null ? kg : 0;
3777
+ const eA = M ? (Eg = J == null ? void 0 : J.price) != null ? Eg : 0 : (kg = J == null ? void 0 : J.renewPrice) != null ? kg : 0;
3778
3778
  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", () => {
3779
3779
  U > 1 && (U -= 1, vA());
3780
3780
  }), cA.appendChild(wA);
3781
3781
  const rA = document.createElement("span");
3782
3782
  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);
3783
3783
  const sA = document.createElement("button");
3784
- sA.type = "button", sA.ariaLabel = a("increase"), sA.disabled = (X == null ? void 0 : X.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
+ sA.type = "button", sA.ariaLabel = a("increase"), sA.disabled = (J == null ? void 0 : J.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", () => {
3785
3785
  eA !== 0 && (U += 1, vA());
3786
3786
  }), cA.appendChild(sA), oA.appendChild(cA), BA.appendChild(oA);
3787
3787
  const TA = document.createElement("td");
3788
- 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 * (X == null ? void 0 : X.limit)) + " VND", BA.appendChild(TA);
3788
+ 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 * (J == null ? void 0 : J.limit)) + " VND", BA.appendChild(TA);
3789
3789
  const SA = document.createElement("td");
3790
- 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 * (X == null ? void 0 : X.limit) * U) + " VND", BA.appendChild(SA);
3790
+ 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 * (J == null ? void 0 : J.limit) * U) + " VND", BA.appendChild(SA);
3791
3791
  const Mg = document.createElement("div");
3792
3792
  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 = `
3793
3793
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3794
3794
  <span>${a("unitPrice")}:</span>
3795
3795
  <span class="wgt:font-medium">${lA(
3796
- eA * (X == null ? void 0 : X.limit)
3796
+ eA * (J == null ? void 0 : J.limit)
3797
3797
  )} VND</span>
3798
3798
  </div>
3799
3799
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3800
3800
  <span>${a("total")}:</span>
3801
3801
  <span class="wgt:text-primary">${lA(
3802
- eA * (X == null ? void 0 : X.limit) * U
3802
+ eA * (J == null ? void 0 : J.limit) * U
3803
3803
  )} VND</span>
3804
3804
  </div>
3805
3805
  `, hA.appendChild(Mg), tA.appendChild(BA);
3806
3806
  }
3807
3807
  }
3808
3808
  {
3809
- const X = e(m);
3810
- if (X) {
3809
+ const J = e(m);
3810
+ if (J) {
3811
3811
  const BA = document.createElement("tr");
3812
3812
  BA.className = "wgt:@max-2xl:block wgt:@max-2xl:mb-4 wgt:@max-2xl:p-4 wgt:@max-2xl:bg-white wgt:@max-2xl:rounded-lg wgt:@max-2xl:border wgt:@max-2xl:border-soft-200 wgt:@max-2xl:shadow-sm";
3813
3813
  const hA = document.createElement("td");
3814
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", hA.innerText = X[Hg(ag())], // getCurrentLanguage() === "vi" ? sigPkg?.name : sigPkg?.nameEn;
3814
+ hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:@max-2xl:col-span-2 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-2 wgt:@max-2xl:text-base wgt:@max-2xl:font-semibold", hA.innerText = J[Hg(ag())], // getCurrentLanguage() === "vi" ? sigPkg?.name : sigPkg?.nameEn;
3815
3815
  BA.appendChild(hA);
3816
3816
  const MA = document.createElement("td");
3817
3817
  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 = a("package"), BA.appendChild(MA);
@@ -3830,33 +3830,33 @@ function lE(P) {
3830
3830
  j += 1, vA();
3831
3831
  }), cA.appendChild(rA), oA.appendChild(cA), BA.appendChild(oA);
3832
3832
  const sA = document.createElement("td");
3833
- 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((X == null ? void 0 : X.limit) * (X == null ? void 0 : X.price)), BA.appendChild(sA);
3833
+ 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((J == null ? void 0 : J.limit) * (J == null ? void 0 : J.price)), BA.appendChild(sA);
3834
3834
  const TA = document.createElement("td");
3835
- 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((X == null ? void 0 : X.limit) * (X == null ? void 0 : X.price) * j) + " VND", BA.appendChild(TA);
3835
+ 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((J == null ? void 0 : J.limit) * (J == null ? void 0 : J.price) * j) + " VND", BA.appendChild(TA);
3836
3836
  const SA = document.createElement("div");
3837
3837
  SA.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", SA.innerHTML = `
3838
3838
  <div class="wgt:flex wgt:justify-between wgt:text-sm wgt:text-text-sub-600">
3839
3839
  <span>${a("unitPrice")}:</span>
3840
3840
  <span class="wgt:font-medium">${lA(
3841
- (X == null ? void 0 : X.limit) * (X == null ? void 0 : X.price)
3841
+ (J == null ? void 0 : J.limit) * (J == null ? void 0 : J.price)
3842
3842
  )} VND</span>
3843
3843
  </div>
3844
3844
  <div class="wgt:flex wgt:justify-between wgt:text-base wgt:font-semibold wgt:text-strong-950">
3845
3845
  <span>${a("total")}:</span>
3846
3846
  <span class="wgt:text-primary">${lA(
3847
- (X == null ? void 0 : X.limit) * (X == null ? void 0 : X.price) * j
3847
+ (J == null ? void 0 : J.limit) * (J == null ? void 0 : J.price) * j
3848
3848
  )} VND</span>
3849
3849
  </div>
3850
3850
  `, hA.appendChild(SA), tA.appendChild(BA);
3851
3851
  }
3852
3852
  }
3853
3853
  const CA = f.map(
3854
- (X) => Object.values(x).find(
3855
- (BA) => BA.code === X && BA.bank === w
3854
+ (J) => Object.values(H).find(
3855
+ (BA) => BA.code === J && BA.bank === w
3856
3856
  )
3857
- ).filter((X) => X !== void 0);
3857
+ ).filter((J) => J !== void 0);
3858
3858
  let Z = 0;
3859
- CA.length > 0 && CA.forEach((X) => {
3859
+ CA.length > 0 && CA.forEach((J) => {
3860
3860
  var cA, wA, eA, rA, sA, TA;
3861
3861
  const BA = document.createElement("tr");
3862
3862
  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";
@@ -3864,27 +3864,27 @@ function lE(P) {
3864
3864
  hA.colSpan = 3, hA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:col-span-3 wgt:@max-2xl:col-span-5 wgt:@max-2xl:block wgt:@max-2xl:px-0 wgt:@max-2xl:py-1", hA.innerHTML = `
3865
3865
  <div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:@max-2xl:justify-start">
3866
3866
  <img src="${TE}" alt="ticket" class="wgt:w-4 wgt:@max-2xl:w-5">
3867
- <span class="wgt:text-text-sub-600 wgt:@max-2xl:text-sm wgt:@max-2xl:font-medium">${X[Hg(ag())] || (X == null ? void 0 : X.code)}</span>
3867
+ <span class="wgt:text-text-sub-600 wgt:@max-2xl:text-sm wgt:@max-2xl:font-medium">${J[Hg(ag())] || (J == null ? void 0 : J.code)}</span>
3868
3868
  </div>
3869
3869
  `, BA.appendChild(hA);
3870
3870
  const MA = document.createElement("td");
3871
3871
  MA.className = "wgt:@max-2xl:hidden", BA.appendChild(MA);
3872
3872
  const oA = document.createElement("td");
3873
- oA.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", X.type === "discount" ? (oA.innerText = `-${lA(
3874
- (cA = X == null ? void 0 : X.reward) == null ? void 0 : cA.discountAmount
3875
- )} VND`, oA.style.color = "#F04438", Z += (wA = X == null ? void 0 : X.reward) == null ? void 0 : wA.discountAmount) : (X == null ? void 0 : X.type) === "free_item" ? (oA.innerText = `+${(rA = (eA = X == null ? void 0 : X.reward) == null ? void 0 : eA.packageCodes) == null ? void 0 : rA.length} ${a(
3873
+ oA.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", J.type === "discount" ? (oA.innerText = `-${lA(
3874
+ (cA = J == null ? void 0 : J.reward) == null ? void 0 : cA.discountAmount
3875
+ )} VND`, oA.style.color = "#F04438", Z += (wA = J == null ? void 0 : J.reward) == null ? void 0 : wA.discountAmount) : (J == null ? void 0 : J.type) === "free_item" ? (oA.innerText = `+${(rA = (eA = J == null ? void 0 : J.reward) == null ? void 0 : eA.packageCodes) == null ? void 0 : rA.length} ${a(
3876
3876
  "package"
3877
- )} ${(TA = (sA = X == null ? void 0 : X.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`, oA.style.color = "#12B76A") : oA.innerText = "", BA.appendChild(oA), tA.appendChild(BA);
3877
+ )} ${(TA = (sA = J == null ? void 0 : J.reward) == null ? void 0 : sA.packageCodes) == null ? void 0 : TA.join(", ")}`, oA.style.color = "#12B76A") : oA.innerText = "", BA.appendChild(oA), tA.appendChild(BA);
3878
3878
  });
3879
- const _ = T && H.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = H[0]) == null ? void 0 : Rg.price) * F : 0, QA = uA(l), gA = QA ? T ? (qg = QA.price) != null ? qg : 0 : (vg = QA.renewPrice) != null ? vg : 0 : 0, V = QA ? gA * QA.limit * U : 0, p = e(m), aA = p ? p.price * p.limit * j : 0, iA = _ + V + aA - Z;
3879
+ const _ = M && k.length > 0 && !(K != null && K.withoutInitialFee) ? ((Rg = k[0]) == null ? void 0 : Rg.price) * X : 0, QA = uA(T), gA = QA ? M ? (qg = QA.price) != null ? qg : 0 : (vg = QA.renewPrice) != null ? vg : 0 : 0, V = QA ? gA * QA.limit * U : 0, p = e(m), aA = p ? p.price * p.limit * j : 0, iA = _ + V + aA - Z;
3880
3880
  c(iA);
3881
3881
  {
3882
- const X = document.createElement("tr");
3883
- X.className = "wgt:@max-2xl:hidden";
3882
+ const J = document.createElement("tr");
3883
+ J.className = "wgt:@max-2xl:hidden";
3884
3884
  const BA = document.createElement("td");
3885
- BA.colSpan = 4, BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950 wgt:col-span-4", BA.innerText = a("total"), X.appendChild(BA);
3885
+ BA.colSpan = 4, BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950 wgt:col-span-4", BA.innerText = a("total"), J.appendChild(BA);
3886
3886
  const hA = document.createElement("td");
3887
- hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", hA.innerText = lA(iA) + " VND", X.appendChild(hA), tA.appendChild(X);
3887
+ hA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-3 wgt:text-left wgt:text-base wgt:font-semibold wgt:text-strong-950", hA.innerText = lA(iA) + " VND", J.appendChild(hA), tA.appendChild(J);
3888
3888
  }
3889
3889
  NA.innerText = lA(iA) + " VND";
3890
3890
  }
@@ -3904,78 +3904,78 @@ function dE({
3904
3904
  } = {}) {
3905
3905
  const c = document.createElement("div");
3906
3906
  c.className = "wgt:flex wgt:flex-col wgt:@min-2xl:flex-row wgt:gap-6 wgt:p-6 wgt:bg-gray-50 wgt:rounded-xl";
3907
- const w = document.createElement("div"), i = document.createElement("h3");
3908
- i.className = "wgt:text-sm wgt:font-bold wgt:text-text-black wgt:mb-4 wgt:text-center", i.innerText = a("qrPaymentTitle"), w.appendChild(i);
3907
+ const w = document.createElement("div"), s = document.createElement("h3");
3908
+ s.className = "wgt:text-sm wgt:font-bold wgt:text-text-black wgt:mb-4 wgt:text-center", s.innerText = a("qrPaymentTitle"), w.appendChild(s);
3909
3909
  const D = document.createElement("div");
3910
3910
  D.className = "wgt:bg-white wgt:rounded-md wgt:p-6 wgt:flex wgt:flex-col wgt:gap-3 wgt:border wgt:border-[#E4E7EC]";
3911
3911
  const o = document.createElement("div");
3912
- o.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((x) => {
3913
- const k = document.createElement("img");
3914
- k.src = x, k.alt = "Logo", k.className = "wgt:w-14 wgt:object-contain", o.appendChild(k);
3912
+ o.className = "wgt:flex wgt:justify-between wgt:items-center wgt:gap-4 wgt:flex-wrap", (E == null ? void 0 : E.length) > 0 && (E.forEach((H) => {
3913
+ const F = document.createElement("img");
3914
+ F.src = H, F.alt = "Logo", F.className = "wgt:w-14 wgt:object-contain", o.appendChild(F);
3915
3915
  }), D.appendChild(o));
3916
- const s = document.createElement("div");
3917
- s.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
3916
+ const i = document.createElement("div");
3917
+ i.className = "wgt:flex wgt:justify-center wgt:w-[17.5rem] wgt:@max-2xl:w-[12.5rem] wgt:mx-auto";
3918
3918
  const u = document.createElement("img");
3919
- u.src = g, u.alt = "QR code", u.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", s.appendChild(u), D.appendChild(s);
3920
- const Y = document.createElement("div");
3921
- Y.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((x) => {
3922
- const k = document.createElement("img");
3923
- k.src = x, k.alt = "Logo", k.className = `wgt:w-${I === "ocb" ? "28" : "8"} wgt:object-contain`, Y.appendChild(k);
3924
- }), D.appendChild(Y);
3925
- const T = document.createElement("div");
3926
- T.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
3927
- const M = document.createElement("h3");
3928
- M.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", M.innerText = B, T.appendChild(M);
3919
+ u.src = g, u.alt = "QR code", u.className = "wgt:w-full wgt:w-full wgt:aspect-square wgt:object-contain", i.appendChild(u), D.appendChild(i);
3920
+ const R = document.createElement("div");
3921
+ R.className = "wgt:flex wgt:justify-center wgt:items-center wgt:gap-4 wgt:flex-wrap", A.forEach((H) => {
3922
+ const F = document.createElement("img");
3923
+ F.src = H, F.alt = "Logo", F.className = `wgt:w-${I === "ocb" ? "28" : "8"} wgt:object-contain`, R.appendChild(F);
3924
+ }), D.appendChild(R);
3925
+ const M = document.createElement("div");
3926
+ M.className = "wgt:text-center wgt:flex wgt:flex-col wgt:gap-1";
3927
+ const d = document.createElement("h3");
3928
+ d.className = "wgt:text-lg wgt:font-bold wgt:text-text-black", d.innerText = B, M.appendChild(d);
3929
3929
  const r = document.createElement("p");
3930
3930
  r.className = "wgt:text-sm wgt:text-grey-8", r.innerHTML = `${a(
3931
3931
  "accountNumber"
3932
- )}: <span class="wgt:font-medium">${C}</span>`, T.appendChild(r);
3932
+ )}: <span class="wgt:font-medium">${C}</span>`, M.appendChild(r);
3933
3933
  const P = document.createElement("p");
3934
3934
  P.className = "wgt:text-sm wgt:text-grey-8", P.innerHTML = `${a(
3935
3935
  "beneficiaryBank"
3936
- )}: <span class="wgt:font-medium">${Q}</span>`, T.appendChild(P), D.appendChild(T), w.appendChild(D), c.appendChild(w);
3937
- const J = document.createElement("div");
3938
- J.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:@min-2xl:w-1/2";
3939
- const l = document.createElement("div"), m = document.createElement("h3");
3940
- m.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", m.innerText = a("paymentInstructionsTitle"), l.appendChild(m);
3936
+ )}: <span class="wgt:font-medium">${Q}</span>`, M.appendChild(P), D.appendChild(M), w.appendChild(D), c.appendChild(w);
3937
+ const Y = document.createElement("div");
3938
+ Y.className = "wgt:flex wgt:flex-col wgt:justify-between wgt:@min-2xl:w-1/2";
3939
+ const T = document.createElement("div"), m = document.createElement("h3");
3940
+ m.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", m.innerText = a("paymentInstructionsTitle"), T.appendChild(m);
3941
3941
  const f = document.createElement("ol");
3942
- f.className = "wgt:space-y-4", t.forEach((x, k) => {
3943
- const R = document.createElement("li");
3944
- R.className = "wgt:flex wgt:items-start";
3945
- const F = document.createElement("div");
3946
- F.className = "wgt:flex-shrink-0 wgt:mt-0.5";
3942
+ f.className = "wgt:space-y-4", t.forEach((H, F) => {
3943
+ const x = document.createElement("li");
3944
+ x.className = "wgt:flex wgt:items-start";
3945
+ const X = document.createElement("div");
3946
+ X.className = "wgt:flex-shrink-0 wgt:mt-0.5";
3947
3947
  const U = document.createElement("div");
3948
3948
  U.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
3949
3949
  const j = document.createElement("span");
3950
- j.className = "wgt:text-white wgt:text-sm wgt:font-semibold", j.innerText = String(k + 1), U.appendChild(j), F.appendChild(U);
3950
+ j.className = "wgt:text-white wgt:text-sm wgt:font-semibold", j.innerText = String(F + 1), U.appendChild(j), X.appendChild(U);
3951
3951
  const O = document.createElement("p");
3952
- O.className = "wgt:ml-3 wgt:text-text-sub-600", O.innerText = x, R.appendChild(F), R.appendChild(O), f.appendChild(R);
3953
- }), l.appendChild(f), J.appendChild(l);
3952
+ O.className = "wgt:ml-3 wgt:text-text-sub-600", O.innerText = H, x.appendChild(X), x.appendChild(O), f.appendChild(x);
3953
+ }), T.appendChild(f), Y.appendChild(T);
3954
3954
  const v = document.createElement("div");
3955
3955
  v.className = "wgt:h-[300px] wgt:flex wgt:justify-center";
3956
- const H = document.createElement("img");
3957
- return H.src = n, H.alt = "QR payment illustration", H.className = "wgt:h-full wgt:object-contain", v.appendChild(H), J.appendChild(v), c.appendChild(J), {
3956
+ const k = document.createElement("img");
3957
+ return k.src = n, k.alt = "QR payment illustration", k.className = "wgt:h-full wgt:object-contain", v.appendChild(k), Y.appendChild(v), c.appendChild(Y), {
3958
3958
  container: c,
3959
- update(x = {}) {
3960
- x.qrSrc != null && (u.src = x.qrSrc), x.logos && (Y.innerHTML = "", x.logos.forEach((k) => {
3961
- const R = document.createElement("img");
3962
- R.src = k, R.alt = "Logo", R.className = "wgt:w-8 wgt:object-contain", Y.appendChild(R);
3963
- })), x.accountName != null && (M.innerText = x.accountName), x.accountNumber != null && (r.innerHTML = `${a(
3959
+ update(H = {}) {
3960
+ H.qrSrc != null && (u.src = H.qrSrc), H.logos && (R.innerHTML = "", H.logos.forEach((F) => {
3961
+ const x = document.createElement("img");
3962
+ x.src = F, x.alt = "Logo", x.className = "wgt:w-8 wgt:object-contain", R.appendChild(x);
3963
+ })), H.accountName != null && (d.innerText = H.accountName), H.accountNumber != null && (r.innerHTML = `${a(
3964
3964
  "accountNumber"
3965
- )}: <span class="wgt:font-medium">${x.accountNumber}</span>`), x.bankName != null && (P.innerHTML = `${a(
3965
+ )}: <span class="wgt:font-medium">${H.accountNumber}</span>`), H.bankName != null && (P.innerHTML = `${a(
3966
3966
  "beneficiaryBank"
3967
- )}: <span class="wgt:font-medium">${x.bankName}</span>`), x.instructions && (f.innerHTML = "", x.instructions.forEach((k, R) => {
3968
- const F = document.createElement("li");
3969
- F.className = "wgt:flex wgt:items-start";
3967
+ )}: <span class="wgt:font-medium">${H.bankName}</span>`), H.instructions && (f.innerHTML = "", H.instructions.forEach((F, x) => {
3968
+ const X = document.createElement("li");
3969
+ X.className = "wgt:flex wgt:items-start";
3970
3970
  const U = document.createElement("div");
3971
3971
  U.className = "wgt:flex-shrink-0 wgt:mt-0.5";
3972
3972
  const j = document.createElement("div");
3973
3973
  j.className = "wgt:w-6 wgt:h-6 wgt:rounded-full wgt:bg-primary wgt:flex wgt:items-center wgt:justify-center";
3974
3974
  const O = document.createElement("span");
3975
- O.className = "wgt:text-white wgt:text-sm wgt:font-semibold", O.innerText = String(R + 1), j.appendChild(O), U.appendChild(j);
3975
+ O.className = "wgt:text-white wgt:text-sm wgt:font-semibold", O.innerText = String(x + 1), j.appendChild(O), U.appendChild(j);
3976
3976
  const e = document.createElement("p");
3977
- e.className = "wgt:ml-3 wgt:text-text-sub-600", e.innerText = k, F.appendChild(U), F.appendChild(e), f.appendChild(F);
3978
- })), x.illustrationSrc != null && (H.src = x.illustrationSrc);
3977
+ e.className = "wgt:ml-3 wgt:text-text-sub-600", e.innerText = F, X.appendChild(U), X.appendChild(e), f.appendChild(X);
3978
+ })), H.illustrationSrc != null && (k.src = H.illustrationSrc);
3979
3979
  }
3980
3980
  };
3981
3981
  }
@@ -4026,23 +4026,23 @@ function HE({
4026
4026
  let I = 3600, c = null;
4027
4027
  const w = document.createElement("div");
4028
4028
  w.className = "wgt:p-4 wgt:w-full wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:bg-primary/10";
4029
- const i = document.createElement("p");
4030
- i.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
4029
+ const s = document.createElement("p");
4030
+ s.className = "wgt:text-base wgt:font-medium wgt:leading-6 wgt:text-primary";
4031
4031
  const D = (O) => {
4032
4032
  const e = Math.floor(O / 60), h = O % 60;
4033
4033
  return `${e.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}`;
4034
4034
  }, o = () => {
4035
- i.innerHTML = `${a(
4035
+ s.innerHTML = `${a(
4036
4036
  "completePaymentIn"
4037
4037
  )} <span class="wgt:font-bold">${D(I)}</span>`;
4038
4038
  };
4039
4039
  o();
4040
- const s = () => {
4040
+ const i = () => {
4041
4041
  c && (clearInterval(c), c = null), c = setInterval(() => {
4042
4042
  I = Math.max(0, I - 1), o(), I <= 0 && (c = null);
4043
4043
  }, 1e3);
4044
4044
  };
4045
- s(), w.appendChild(i);
4045
+ i(), w.appendChild(s);
4046
4046
  const u = document.createElement("svg");
4047
4047
  u.setAttribute("width", "24"), u.setAttribute("height", "24"), u.setAttribute("viewBox", "0 0 24 24"), u.setAttribute("fill", "none"), u.setAttribute("xmlns", "http://www.w3.org/2000/svg"), u.innerHTML = `
4048
4048
  <path
@@ -4056,8 +4056,8 @@ function HE({
4056
4056
  fill="#1D963E"
4057
4057
  />
4058
4058
  `, w.appendChild(u), n.appendChild(w);
4059
- const Y = document.createElement("div");
4060
- Y.className = [
4059
+ const R = document.createElement("div");
4060
+ R.className = [
4061
4061
  "wgt:p-6",
4062
4062
  "wgt:w-full",
4063
4063
  "wgt:flex",
@@ -4065,46 +4065,46 @@ function HE({
4065
4065
  "wgt:gap-10",
4066
4066
  "wgt:shadow-[0px_2px_6px_0px_rgba(31,34,41,0.04)]"
4067
4067
  ].join(" ");
4068
- const T = document.createElement("div");
4069
- T.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
4070
- const M = document.createElement("h2");
4071
- M.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", M.innerText = a("orderInfo"), T.appendChild(M);
4068
+ const M = document.createElement("div");
4069
+ M.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
4070
+ const d = document.createElement("h2");
4071
+ d.className = "wgt:text-xl wgt:font-semibold wgt:leading-6 wgt:text-black", d.innerText = a("orderInfo"), M.appendChild(d);
4072
4072
  const r = document.createElement("div");
4073
4073
  r.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4074
4074
  const P = document.createElement("h4");
4075
4075
  P.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", P.innerText = a("provider");
4076
- const J = document.createElement("img");
4077
- g && g.logoUrl && (J.src = g.logoUrl, J.alt = g.name, J.className = "wgt:h-6 wgt:object-contain"), r.appendChild(P), r.appendChild(J), T.appendChild(r);
4078
- const l = document.createElement("div");
4079
- l.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4076
+ const Y = document.createElement("img");
4077
+ g && g.logoUrl && (Y.src = g.logoUrl, Y.alt = g.name, Y.className = "wgt:h-6 wgt:object-contain"), r.appendChild(P), r.appendChild(Y), M.appendChild(r);
4078
+ const T = document.createElement("div");
4079
+ T.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4080
4080
  const m = document.createElement("h4");
4081
4081
  m.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", m.innerText = a("subscriptionPackage");
4082
4082
  const f = document.createElement("span");
4083
- f.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", f.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", l.appendChild(m), l.appendChild(f), T.appendChild(l);
4083
+ f.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", f.innerText = A ? `${String(A == null ? void 0 : A.code)}` : "", T.appendChild(m), T.appendChild(f), M.appendChild(T);
4084
4084
  const v = document.createElement("div");
4085
4085
  v.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4086
- const H = document.createElement("h4");
4087
- H.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", H.innerText = a("digitalSignaturePackage");
4088
- const x = document.createElement("span");
4089
- if (x.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", x.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(H), v.appendChild(x), T.appendChild(v), Q && Q.length > 0) {
4086
+ const k = document.createElement("h4");
4087
+ k.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", k.innerText = a("digitalSignaturePackage");
4088
+ const H = document.createElement("span");
4089
+ if (H.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", H.innerText = E ? `${String(E == null ? void 0 : E.code)}` : "", v.appendChild(k), v.appendChild(H), M.appendChild(v), Q && Q.length > 0) {
4090
4090
  const O = document.createElement("div");
4091
4091
  O.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
4092
4092
  const e = document.createElement("h4");
4093
4093
  e.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", e.innerText = a("promotion");
4094
4094
  const h = document.createElement("div");
4095
4095
  h.className = "wgt:flex wgt:items-center wgt:justify-end wgt:flex-wrap wgt:gap-2", Q.forEach((q) => {
4096
- const d = document.createElement("div");
4097
- d.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", d.innerText = q, h.appendChild(d);
4098
- }), O.appendChild(e), O.appendChild(h), T.appendChild(O);
4096
+ const l = document.createElement("div");
4097
+ l.className = "wgt:w-fit wgt:px-3 wgt:py-1 wgt:text-xs wgt:font-normal wgt:text-primary wgt:border wgt:border-primary", l.innerText = q, h.appendChild(l);
4098
+ }), O.appendChild(e), O.appendChild(h), M.appendChild(O);
4099
4099
  }
4100
- const k = document.createElement("hr");
4101
- T.appendChild(k);
4102
- const R = document.createElement("div");
4103
- R.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4104
- const F = document.createElement("h4");
4105
- F.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", F.innerText = a("paymentAmount");
4100
+ const F = document.createElement("hr");
4101
+ M.appendChild(F);
4102
+ const x = document.createElement("div");
4103
+ x.className = "wgt:w-full wgt:flex wgt:items-center wgt:justify-between";
4104
+ const X = document.createElement("h4");
4105
+ X.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", X.innerText = a("paymentAmount");
4106
4106
  const U = document.createElement("span");
4107
- U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, R.appendChild(F), R.appendChild(U), T.appendChild(R), Y.appendChild(T);
4107
+ U.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", U.innerText = typeof C == "number" ? C.toLocaleString("vi-VN") + " VND" : C, x.appendChild(X), x.appendChild(U), M.appendChild(x), R.appendChild(M);
4108
4108
  const j = ng({
4109
4109
  title: a("cancelTransaction"),
4110
4110
  className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
@@ -4121,7 +4121,7 @@ function HE({
4121
4121
  n.appendChild(O.container), O.open();
4122
4122
  }
4123
4123
  });
4124
- return Y.appendChild(j), n.appendChild(Y), window.addEventListener("beforeunload", () => W(null, null, function* () {
4124
+ return R.appendChild(j), n.appendChild(R), window.addEventListener("beforeunload", () => W(null, null, function* () {
4125
4125
  c && (clearInterval(c), c = null), yield aC(B);
4126
4126
  })), {
4127
4127
  container: n,
@@ -4139,13 +4139,13 @@ function HE({
4139
4139
  e && (e.innerText = O ? String((q = (h = O.code) != null ? h : O.limit) != null ? q : "") : "");
4140
4140
  },
4141
4141
  setSelectedSignaturePackage(O) {
4142
- var q, d, N;
4142
+ var q, l, N;
4143
4143
  E = O;
4144
4144
  const e = n.querySelectorAll(
4145
4145
  ".wgt:text-base.wgt:font-semibold.wgt:leading-6.wgt:text-text-black"
4146
4146
  ), h = e == null ? void 0 : e[1];
4147
4147
  if (h) {
4148
- const L = O ? String((N = (d = O.code) != null ? d : (q = O.name) == null ? void 0 : q.split("-")[1]) != null ? N : "") : "";
4148
+ const L = O ? String((N = (l = O.code) != null ? l : (q = O.name) == null ? void 0 : q.split("-")[1]) != null ? N : "") : "";
4149
4149
  h.innerText = L;
4150
4150
  }
4151
4151
  },
@@ -4157,7 +4157,7 @@ function HE({
4157
4157
  e && (e.innerText = typeof O == "number" ? O.toLocaleString("vi-VN") + " VND" : O);
4158
4158
  },
4159
4159
  resetCountdown() {
4160
- c && (clearInterval(c), c = null), I = 3600, o(), s();
4160
+ c && (clearInterval(c), c = null), I = 3600, o(), i();
4161
4161
  },
4162
4162
  clearCountdown() {
4163
4163
  c && (clearInterval(c), c = null);
@@ -4386,11 +4386,11 @@ function FE() {
4386
4386
  }, g.getPenaltyN1 = function(C) {
4387
4387
  const Q = C.size;
4388
4388
  let t = 0, n = 0, I = 0, c = null, w = null;
4389
- for (let i = 0; i < Q; i++) {
4389
+ for (let s = 0; s < Q; s++) {
4390
4390
  n = I = 0, c = w = null;
4391
4391
  for (let D = 0; D < Q; D++) {
4392
- let o = C.get(i, D);
4393
- o === c ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), c = o, n = 1), o = C.get(D, i), o === w ? I++ : (I >= 5 && (t += A.N1 + (I - 5)), w = o, I = 1);
4392
+ let o = C.get(s, D);
4393
+ o === c ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), c = o, n = 1), o = C.get(D, s), o === w ? I++ : (I >= 5 && (t += A.N1 + (I - 5)), w = o, I = 1);
4394
4394
  }
4395
4395
  n >= 5 && (t += A.N1 + (n - 5)), I >= 5 && (t += A.N1 + (I - 5));
4396
4396
  }
@@ -4978,35 +4978,35 @@ var kC;
4978
4978
  function zE() {
4979
4979
  return kC || (kC = 1, function(g) {
4980
4980
  const A = ig(), E = gQ(), B = vB(), C = sg(), Q = BQ(), t = 7973, n = A.getBCHDigit(t);
4981
- function I(D, o, s) {
4981
+ function I(D, o, i) {
4982
4982
  for (let u = 1; u <= 40; u++)
4983
- if (o <= g.getCapacity(u, s, D))
4983
+ if (o <= g.getCapacity(u, i, D))
4984
4984
  return u;
4985
4985
  }
4986
4986
  function c(D, o) {
4987
4987
  return C.getCharCountIndicator(D, o) + 4;
4988
4988
  }
4989
4989
  function w(D, o) {
4990
- let s = 0;
4990
+ let i = 0;
4991
4991
  return D.forEach(function(u) {
4992
- const Y = c(u.mode, o);
4993
- s += Y + u.getBitsLength();
4994
- }), s;
4992
+ const R = c(u.mode, o);
4993
+ i += R + u.getBitsLength();
4994
+ }), i;
4995
4995
  }
4996
- function i(D, o) {
4997
- for (let s = 1; s <= 40; s++)
4998
- if (w(D, s) <= g.getCapacity(s, o, C.MIXED))
4999
- return s;
4996
+ function s(D, o) {
4997
+ for (let i = 1; i <= 40; i++)
4998
+ if (w(D, i) <= g.getCapacity(i, o, C.MIXED))
4999
+ return i;
5000
5000
  }
5001
- g.from = function(o, s) {
5002
- return Q.isValid(o) ? parseInt(o, 10) : s;
5003
- }, g.getCapacity = function(o, s, u) {
5001
+ g.from = function(o, i) {
5002
+ return Q.isValid(o) ? parseInt(o, 10) : i;
5003
+ }, g.getCapacity = function(o, i, u) {
5004
5004
  if (!Q.isValid(o))
5005
5005
  throw new Error("Invalid QR Code version");
5006
5006
  typeof u == "undefined" && (u = C.BYTE);
5007
- const Y = A.getSymbolTotalCodewords(o), T = E.getTotalCodewordsCount(o, s), M = (Y - T) * 8;
5008
- if (u === C.MIXED) return M;
5009
- const r = M - c(u, o);
5007
+ const R = A.getSymbolTotalCodewords(o), M = E.getTotalCodewordsCount(o, i), d = (R - M) * 8;
5008
+ if (u === C.MIXED) return d;
5009
+ const r = d - c(u, o);
5010
5010
  switch (u) {
5011
5011
  case C.NUMERIC:
5012
5012
  return Math.floor(r / 10 * 3);
@@ -5018,25 +5018,25 @@ function zE() {
5018
5018
  default:
5019
5019
  return Math.floor(r / 8);
5020
5020
  }
5021
- }, g.getBestVersionForData = function(o, s) {
5021
+ }, g.getBestVersionForData = function(o, i) {
5022
5022
  let u;
5023
- const Y = B.from(s, B.M);
5023
+ const R = B.from(i, B.M);
5024
5024
  if (Array.isArray(o)) {
5025
5025
  if (o.length > 1)
5026
- return i(o, Y);
5026
+ return s(o, R);
5027
5027
  if (o.length === 0)
5028
5028
  return 1;
5029
5029
  u = o[0];
5030
5030
  } else
5031
5031
  u = o;
5032
- return I(u.mode, u.getLength(), Y);
5032
+ return I(u.mode, u.getLength(), R);
5033
5033
  }, g.getEncodedBits = function(o) {
5034
5034
  if (!Q.isValid(o) || o < 7)
5035
5035
  throw new Error("Invalid QR Code version");
5036
- let s = o << 12;
5037
- for (; A.getBCHDigit(s) - n >= 0; )
5038
- s ^= t << A.getBCHDigit(s) - n;
5039
- return o << 12 | s;
5036
+ let i = o << 12;
5037
+ for (; A.getBCHDigit(i) - n >= 0; )
5038
+ i ^= t << A.getBCHDigit(i) - n;
5039
+ return o << 12 | i;
5040
5040
  };
5041
5041
  }(CB)), CB;
5042
5042
  }
@@ -5203,14 +5203,14 @@ function UE() {
5203
5203
  t[B] = 0;
5204
5204
  var n = A.PriorityQueue.make();
5205
5205
  n.push(B, 0);
5206
- for (var I, c, w, i, D, o, s, u, Y; !n.empty(); ) {
5207
- I = n.pop(), c = I.value, i = I.cost, D = E[c] || {};
5206
+ for (var I, c, w, s, D, o, i, u, R; !n.empty(); ) {
5207
+ I = n.pop(), c = I.value, s = I.cost, D = E[c] || {};
5208
5208
  for (w in D)
5209
- D.hasOwnProperty(w) && (o = D[w], s = i + o, u = t[w], Y = typeof t[w] == "undefined", (Y || u > s) && (t[w] = s, n.push(w, s), Q[w] = c));
5209
+ D.hasOwnProperty(w) && (o = D[w], i = s + o, u = t[w], R = typeof t[w] == "undefined", (R || u > i) && (t[w] = i, n.push(w, i), Q[w] = c));
5210
5210
  }
5211
5211
  if (typeof C != "undefined" && typeof t[C] == "undefined") {
5212
- var T = ["Could not find a path from ", B, " to ", C, "."].join("");
5213
- throw new Error(T);
5212
+ var M = ["Could not find a path from ", B, " to ", C, "."].join("");
5213
+ throw new Error(M);
5214
5214
  }
5215
5215
  return Q;
5216
5216
  },
@@ -5266,25 +5266,25 @@ var GC;
5266
5266
  function SE() {
5267
5267
  return GC || (GC = 1, function(g) {
5268
5268
  const A = sg(), E = bE(), B = jE(), C = yE(), Q = KE(), t = CQ(), n = ig(), I = UE();
5269
- function c(T) {
5270
- return unescape(encodeURIComponent(T)).length;
5269
+ function c(M) {
5270
+ return unescape(encodeURIComponent(M)).length;
5271
5271
  }
5272
- function w(T, M, r) {
5272
+ function w(M, d, r) {
5273
5273
  const P = [];
5274
- let J;
5275
- for (; (J = T.exec(r)) !== null; )
5274
+ let Y;
5275
+ for (; (Y = M.exec(r)) !== null; )
5276
5276
  P.push({
5277
- data: J[0],
5278
- index: J.index,
5279
- mode: M,
5280
- length: J[0].length
5277
+ data: Y[0],
5278
+ index: Y.index,
5279
+ mode: d,
5280
+ length: Y[0].length
5281
5281
  });
5282
5282
  return P;
5283
5283
  }
5284
- function i(T) {
5285
- const M = w(t.NUMERIC, A.NUMERIC, T), r = w(t.ALPHANUMERIC, A.ALPHANUMERIC, T);
5286
- let P, J;
5287
- return n.isKanjiModeEnabled() ? (P = w(t.BYTE, A.BYTE, T), J = w(t.KANJI, A.KANJI, T)) : (P = w(t.BYTE_KANJI, A.BYTE, T), J = []), M.concat(r, P, J).sort(function(m, f) {
5284
+ function s(M) {
5285
+ const d = w(t.NUMERIC, A.NUMERIC, M), r = w(t.ALPHANUMERIC, A.ALPHANUMERIC, M);
5286
+ let P, Y;
5287
+ return n.isKanjiModeEnabled() ? (P = w(t.BYTE, A.BYTE, M), Y = w(t.KANJI, A.KANJI, M)) : (P = w(t.BYTE_KANJI, A.BYTE, M), Y = []), d.concat(r, P, Y).sort(function(m, f) {
5288
5288
  return m.index - f.index;
5289
5289
  }).map(function(m) {
5290
5290
  return {
@@ -5294,104 +5294,104 @@ function SE() {
5294
5294
  };
5295
5295
  });
5296
5296
  }
5297
- function D(T, M) {
5298
- switch (M) {
5297
+ function D(M, d) {
5298
+ switch (d) {
5299
5299
  case A.NUMERIC:
5300
- return E.getBitsLength(T);
5300
+ return E.getBitsLength(M);
5301
5301
  case A.ALPHANUMERIC:
5302
- return B.getBitsLength(T);
5302
+ return B.getBitsLength(M);
5303
5303
  case A.KANJI:
5304
- return Q.getBitsLength(T);
5304
+ return Q.getBitsLength(M);
5305
5305
  case A.BYTE:
5306
- return C.getBitsLength(T);
5306
+ return C.getBitsLength(M);
5307
5307
  }
5308
5308
  }
5309
- function o(T) {
5310
- return T.reduce(function(M, r) {
5311
- const P = M.length - 1 >= 0 ? M[M.length - 1] : null;
5312
- return P && P.mode === r.mode ? (M[M.length - 1].data += r.data, M) : (M.push(r), M);
5309
+ function o(M) {
5310
+ return M.reduce(function(d, r) {
5311
+ const P = d.length - 1 >= 0 ? d[d.length - 1] : null;
5312
+ return P && P.mode === r.mode ? (d[d.length - 1].data += r.data, d) : (d.push(r), d);
5313
5313
  }, []);
5314
5314
  }
5315
- function s(T) {
5316
- const M = [];
5317
- for (let r = 0; r < T.length; r++) {
5318
- const P = T[r];
5315
+ function i(M) {
5316
+ const d = [];
5317
+ for (let r = 0; r < M.length; r++) {
5318
+ const P = M[r];
5319
5319
  switch (P.mode) {
5320
5320
  case A.NUMERIC:
5321
- M.push([
5321
+ d.push([
5322
5322
  P,
5323
5323
  { data: P.data, mode: A.ALPHANUMERIC, length: P.length },
5324
5324
  { data: P.data, mode: A.BYTE, length: P.length }
5325
5325
  ]);
5326
5326
  break;
5327
5327
  case A.ALPHANUMERIC:
5328
- M.push([
5328
+ d.push([
5329
5329
  P,
5330
5330
  { data: P.data, mode: A.BYTE, length: P.length }
5331
5331
  ]);
5332
5332
  break;
5333
5333
  case A.KANJI:
5334
- M.push([
5334
+ d.push([
5335
5335
  P,
5336
5336
  { data: P.data, mode: A.BYTE, length: c(P.data) }
5337
5337
  ]);
5338
5338
  break;
5339
5339
  case A.BYTE:
5340
- M.push([
5340
+ d.push([
5341
5341
  { data: P.data, mode: A.BYTE, length: c(P.data) }
5342
5342
  ]);
5343
5343
  }
5344
5344
  }
5345
- return M;
5345
+ return d;
5346
5346
  }
5347
- function u(T, M) {
5347
+ function u(M, d) {
5348
5348
  const r = {}, P = { start: {} };
5349
- let J = ["start"];
5350
- for (let l = 0; l < T.length; l++) {
5351
- const m = T[l], f = [];
5349
+ let Y = ["start"];
5350
+ for (let T = 0; T < M.length; T++) {
5351
+ const m = M[T], f = [];
5352
5352
  for (let v = 0; v < m.length; v++) {
5353
- const H = m[v], x = "" + l + v;
5354
- f.push(x), r[x] = { node: H, lastCount: 0 }, P[x] = {};
5355
- for (let k = 0; k < J.length; k++) {
5356
- const R = J[k];
5357
- r[R] && r[R].node.mode === H.mode ? (P[R][x] = D(r[R].lastCount + H.length, H.mode) - D(r[R].lastCount, H.mode), r[R].lastCount += H.length) : (r[R] && (r[R].lastCount = H.length), P[R][x] = D(H.length, H.mode) + 4 + A.getCharCountIndicator(H.mode, M));
5353
+ const k = m[v], H = "" + T + v;
5354
+ f.push(H), r[H] = { node: k, lastCount: 0 }, P[H] = {};
5355
+ for (let F = 0; F < Y.length; F++) {
5356
+ const x = Y[F];
5357
+ r[x] && r[x].node.mode === k.mode ? (P[x][H] = D(r[x].lastCount + k.length, k.mode) - D(r[x].lastCount, k.mode), r[x].lastCount += k.length) : (r[x] && (r[x].lastCount = k.length), P[x][H] = D(k.length, k.mode) + 4 + A.getCharCountIndicator(k.mode, d));
5358
5358
  }
5359
5359
  }
5360
- J = f;
5360
+ Y = f;
5361
5361
  }
5362
- for (let l = 0; l < J.length; l++)
5363
- P[J[l]].end = 0;
5362
+ for (let T = 0; T < Y.length; T++)
5363
+ P[Y[T]].end = 0;
5364
5364
  return { map: P, table: r };
5365
5365
  }
5366
- function Y(T, M) {
5366
+ function R(M, d) {
5367
5367
  let r;
5368
- const P = A.getBestModeForData(T);
5369
- if (r = A.from(M, P), r !== A.BYTE && r.bit < P.bit)
5370
- throw new Error('"' + T + '" cannot be encoded with mode ' + A.toString(r) + `.
5368
+ const P = A.getBestModeForData(M);
5369
+ if (r = A.from(d, P), r !== A.BYTE && r.bit < P.bit)
5370
+ throw new Error('"' + M + '" cannot be encoded with mode ' + A.toString(r) + `.
5371
5371
  Suggested mode is: ` + A.toString(P));
5372
5372
  switch (r === A.KANJI && !n.isKanjiModeEnabled() && (r = A.BYTE), r) {
5373
5373
  case A.NUMERIC:
5374
- return new E(T);
5374
+ return new E(M);
5375
5375
  case A.ALPHANUMERIC:
5376
- return new B(T);
5376
+ return new B(M);
5377
5377
  case A.KANJI:
5378
- return new Q(T);
5378
+ return new Q(M);
5379
5379
  case A.BYTE:
5380
- return new C(T);
5380
+ return new C(M);
5381
5381
  }
5382
5382
  }
5383
- g.fromArray = function(M) {
5384
- return M.reduce(function(r, P) {
5385
- return typeof P == "string" ? r.push(Y(P, null)) : P.data && r.push(Y(P.data, P.mode)), r;
5383
+ g.fromArray = function(d) {
5384
+ return d.reduce(function(r, P) {
5385
+ return typeof P == "string" ? r.push(R(P, null)) : P.data && r.push(R(P.data, P.mode)), r;
5386
5386
  }, []);
5387
- }, g.fromString = function(M, r) {
5388
- const P = i(M, n.isKanjiModeEnabled()), J = s(P), l = u(J, r), m = I.find_path(l.map, "start", "end"), f = [];
5387
+ }, g.fromString = function(d, r) {
5388
+ const P = s(d, n.isKanjiModeEnabled()), Y = i(P), T = u(Y, r), m = I.find_path(T.map, "start", "end"), f = [];
5389
5389
  for (let v = 1; v < m.length - 1; v++)
5390
- f.push(l.table[m[v]].node);
5390
+ f.push(T.table[m[v]].node);
5391
5391
  return g.fromArray(o(f));
5392
- }, g.rawSplit = function(M) {
5392
+ }, g.rawSplit = function(d) {
5393
5393
  return g.fromArray(
5394
- i(M, n.isKanjiModeEnabled())
5394
+ s(d, n.isKanjiModeEnabled())
5395
5395
  );
5396
5396
  };
5397
5397
  }(nB)), nB;
@@ -5400,137 +5400,137 @@ var LC;
5400
5400
  function pE() {
5401
5401
  if (LC) return pg;
5402
5402
  LC = 1;
5403
- const g = ig(), A = vB(), E = RE(), B = YE(), C = JE(), Q = XE(), t = FE(), n = gQ(), I = LE(), c = zE(), w = NE(), i = sg(), D = SE();
5404
- function o(l, m) {
5405
- const f = l.size, v = Q.getPositions(m);
5406
- for (let H = 0; H < v.length; H++) {
5407
- const x = v[H][0], k = v[H][1];
5408
- for (let R = -1; R <= 7; R++)
5409
- if (!(x + R <= -1 || f <= x + R))
5410
- for (let F = -1; F <= 7; F++)
5411
- k + F <= -1 || f <= k + F || (R >= 0 && R <= 6 && (F === 0 || F === 6) || F >= 0 && F <= 6 && (R === 0 || R === 6) || R >= 2 && R <= 4 && F >= 2 && F <= 4 ? l.set(x + R, k + F, !0, !0) : l.set(x + R, k + F, !1, !0));
5403
+ const g = ig(), A = vB(), E = RE(), B = YE(), C = JE(), Q = XE(), t = FE(), n = gQ(), I = LE(), c = zE(), w = NE(), s = sg(), D = SE();
5404
+ function o(T, m) {
5405
+ const f = T.size, v = Q.getPositions(m);
5406
+ for (let k = 0; k < v.length; k++) {
5407
+ const H = v[k][0], F = v[k][1];
5408
+ for (let x = -1; x <= 7; x++)
5409
+ if (!(H + x <= -1 || f <= H + x))
5410
+ for (let X = -1; X <= 7; X++)
5411
+ F + X <= -1 || f <= F + X || (x >= 0 && x <= 6 && (X === 0 || X === 6) || X >= 0 && X <= 6 && (x === 0 || x === 6) || x >= 2 && x <= 4 && X >= 2 && X <= 4 ? T.set(H + x, F + X, !0, !0) : T.set(H + x, F + X, !1, !0));
5412
5412
  }
5413
5413
  }
5414
- function s(l) {
5415
- const m = l.size;
5414
+ function i(T) {
5415
+ const m = T.size;
5416
5416
  for (let f = 8; f < m - 8; f++) {
5417
5417
  const v = f % 2 === 0;
5418
- l.set(f, 6, v, !0), l.set(6, f, v, !0);
5418
+ T.set(f, 6, v, !0), T.set(6, f, v, !0);
5419
5419
  }
5420
5420
  }
5421
- function u(l, m) {
5421
+ function u(T, m) {
5422
5422
  const f = C.getPositions(m);
5423
5423
  for (let v = 0; v < f.length; v++) {
5424
- const H = f[v][0], x = f[v][1];
5425
- for (let k = -2; k <= 2; k++)
5426
- for (let R = -2; R <= 2; R++)
5427
- k === -2 || k === 2 || R === -2 || R === 2 || k === 0 && R === 0 ? l.set(H + k, x + R, !0, !0) : l.set(H + k, x + R, !1, !0);
5424
+ const k = f[v][0], H = f[v][1];
5425
+ for (let F = -2; F <= 2; F++)
5426
+ for (let x = -2; x <= 2; x++)
5427
+ F === -2 || F === 2 || x === -2 || x === 2 || F === 0 && x === 0 ? T.set(k + F, H + x, !0, !0) : T.set(k + F, H + x, !1, !0);
5428
5428
  }
5429
5429
  }
5430
- function Y(l, m) {
5431
- const f = l.size, v = c.getEncodedBits(m);
5432
- let H, x, k;
5433
- for (let R = 0; R < 18; R++)
5434
- H = Math.floor(R / 3), x = R % 3 + f - 8 - 3, k = (v >> R & 1) === 1, l.set(H, x, k, !0), l.set(x, H, k, !0);
5430
+ function R(T, m) {
5431
+ const f = T.size, v = c.getEncodedBits(m);
5432
+ let k, H, F;
5433
+ for (let x = 0; x < 18; x++)
5434
+ k = Math.floor(x / 3), H = x % 3 + f - 8 - 3, F = (v >> x & 1) === 1, T.set(k, H, F, !0), T.set(H, k, F, !0);
5435
5435
  }
5436
- function T(l, m, f) {
5437
- const v = l.size, H = w.getEncodedBits(m, f);
5438
- let x, k;
5439
- for (x = 0; x < 15; x++)
5440
- k = (H >> x & 1) === 1, x < 6 ? l.set(x, 8, k, !0) : x < 8 ? l.set(x + 1, 8, k, !0) : l.set(v - 15 + x, 8, k, !0), x < 8 ? l.set(8, v - x - 1, k, !0) : x < 9 ? l.set(8, 15 - x - 1 + 1, k, !0) : l.set(8, 15 - x - 1, k, !0);
5441
- l.set(v - 8, 8, 1, !0);
5436
+ function M(T, m, f) {
5437
+ const v = T.size, k = w.getEncodedBits(m, f);
5438
+ let H, F;
5439
+ for (H = 0; H < 15; H++)
5440
+ F = (k >> H & 1) === 1, H < 6 ? T.set(H, 8, F, !0) : H < 8 ? T.set(H + 1, 8, F, !0) : T.set(v - 15 + H, 8, F, !0), H < 8 ? T.set(8, v - H - 1, F, !0) : H < 9 ? T.set(8, 15 - H - 1 + 1, F, !0) : T.set(8, 15 - H - 1, F, !0);
5441
+ T.set(v - 8, 8, 1, !0);
5442
5442
  }
5443
- function M(l, m) {
5444
- const f = l.size;
5445
- let v = -1, H = f - 1, x = 7, k = 0;
5446
- for (let R = f - 1; R > 0; R -= 2)
5447
- for (R === 6 && R--; ; ) {
5448
- for (let F = 0; F < 2; F++)
5449
- if (!l.isReserved(H, R - F)) {
5443
+ function d(T, m) {
5444
+ const f = T.size;
5445
+ let v = -1, k = f - 1, H = 7, F = 0;
5446
+ for (let x = f - 1; x > 0; x -= 2)
5447
+ for (x === 6 && x--; ; ) {
5448
+ for (let X = 0; X < 2; X++)
5449
+ if (!T.isReserved(k, x - X)) {
5450
5450
  let U = !1;
5451
- k < m.length && (U = (m[k] >>> x & 1) === 1), l.set(H, R - F, U), x--, x === -1 && (k++, x = 7);
5451
+ F < m.length && (U = (m[F] >>> H & 1) === 1), T.set(k, x - X, U), H--, H === -1 && (F++, H = 7);
5452
5452
  }
5453
- if (H += v, H < 0 || f <= H) {
5454
- H -= v, v = -v;
5453
+ if (k += v, k < 0 || f <= k) {
5454
+ k -= v, v = -v;
5455
5455
  break;
5456
5456
  }
5457
5457
  }
5458
5458
  }
5459
- function r(l, m, f) {
5459
+ function r(T, m, f) {
5460
5460
  const v = new E();
5461
- f.forEach(function(F) {
5462
- v.put(F.mode.bit, 4), v.put(F.getLength(), i.getCharCountIndicator(F.mode, l)), F.write(v);
5461
+ f.forEach(function(X) {
5462
+ v.put(X.mode.bit, 4), v.put(X.getLength(), s.getCharCountIndicator(X.mode, T)), X.write(v);
5463
5463
  });
5464
- const H = g.getSymbolTotalCodewords(l), x = n.getTotalCodewordsCount(l, m), k = (H - x) * 8;
5465
- for (v.getLengthInBits() + 4 <= k && v.put(0, 4); v.getLengthInBits() % 8 !== 0; )
5464
+ const k = g.getSymbolTotalCodewords(T), H = n.getTotalCodewordsCount(T, m), F = (k - H) * 8;
5465
+ for (v.getLengthInBits() + 4 <= F && v.put(0, 4); v.getLengthInBits() % 8 !== 0; )
5466
5466
  v.putBit(0);
5467
- const R = (k - v.getLengthInBits()) / 8;
5468
- for (let F = 0; F < R; F++)
5469
- v.put(F % 2 ? 17 : 236, 8);
5470
- return P(v, l, m);
5467
+ const x = (F - v.getLengthInBits()) / 8;
5468
+ for (let X = 0; X < x; X++)
5469
+ v.put(X % 2 ? 17 : 236, 8);
5470
+ return P(v, T, m);
5471
5471
  }
5472
- function P(l, m, f) {
5473
- const v = g.getSymbolTotalCodewords(m), H = n.getTotalCodewordsCount(m, f), x = v - H, k = n.getBlocksCount(m, f), R = v % k, F = k - R, U = Math.floor(v / k), j = Math.floor(x / k), O = j + 1, e = U - j, h = new I(e);
5472
+ function P(T, m, f) {
5473
+ const v = g.getSymbolTotalCodewords(m), k = n.getTotalCodewordsCount(m, f), H = v - k, F = n.getBlocksCount(m, f), x = v % F, X = F - x, U = Math.floor(v / F), j = Math.floor(H / F), O = j + 1, e = U - j, h = new I(e);
5474
5474
  let q = 0;
5475
- const d = new Array(k), N = new Array(k);
5475
+ const l = new Array(F), N = new Array(F);
5476
5476
  let L = 0;
5477
- const b = new Uint8Array(l.buffer);
5478
- for (let nA = 0; nA < k; nA++) {
5479
- const uA = nA < F ? j : O;
5480
- d[nA] = b.slice(q, q + uA), N[nA] = h.encode(d[nA]), q += uA, L = Math.max(L, uA);
5477
+ const b = new Uint8Array(T.buffer);
5478
+ for (let nA = 0; nA < F; nA++) {
5479
+ const uA = nA < X ? j : O;
5480
+ l[nA] = b.slice(q, q + uA), N[nA] = h.encode(l[nA]), q += uA, L = Math.max(L, uA);
5481
5481
  }
5482
5482
  const y = new Uint8Array(v);
5483
5483
  let AA = 0, S, IA;
5484
5484
  for (S = 0; S < L; S++)
5485
- for (IA = 0; IA < k; IA++)
5486
- S < d[IA].length && (y[AA++] = d[IA][S]);
5485
+ for (IA = 0; IA < F; IA++)
5486
+ S < l[IA].length && (y[AA++] = l[IA][S]);
5487
5487
  for (S = 0; S < e; S++)
5488
- for (IA = 0; IA < k; IA++)
5488
+ for (IA = 0; IA < F; IA++)
5489
5489
  y[AA++] = N[IA][S];
5490
5490
  return y;
5491
5491
  }
5492
- function J(l, m, f, v) {
5493
- let H;
5494
- if (Array.isArray(l))
5495
- H = D.fromArray(l);
5496
- else if (typeof l == "string") {
5492
+ function Y(T, m, f, v) {
5493
+ let k;
5494
+ if (Array.isArray(T))
5495
+ k = D.fromArray(T);
5496
+ else if (typeof T == "string") {
5497
5497
  let U = m;
5498
5498
  if (!U) {
5499
- const j = D.rawSplit(l);
5499
+ const j = D.rawSplit(T);
5500
5500
  U = c.getBestVersionForData(j, f);
5501
5501
  }
5502
- H = D.fromString(l, U || 40);
5502
+ k = D.fromString(T, U || 40);
5503
5503
  } else
5504
5504
  throw new Error("Invalid data");
5505
- const x = c.getBestVersionForData(H, f);
5506
- if (!x)
5505
+ const H = c.getBestVersionForData(k, f);
5506
+ if (!H)
5507
5507
  throw new Error("The amount of data is too big to be stored in a QR Code");
5508
5508
  if (!m)
5509
- m = x;
5510
- else if (m < x)
5509
+ m = H;
5510
+ else if (m < H)
5511
5511
  throw new Error(
5512
5512
  `
5513
5513
  The chosen QR Code version cannot contain this amount of data.
5514
- Minimum version required to store current data is: ` + x + `.
5514
+ Minimum version required to store current data is: ` + H + `.
5515
5515
  `
5516
5516
  );
5517
- const k = r(m, f, H), R = g.getSymbolSize(m), F = new B(R);
5518
- return o(F, m), s(F), u(F, m), T(F, f, 0), m >= 7 && Y(F, m), M(F, k), isNaN(v) && (v = t.getBestMask(
5519
- F,
5520
- T.bind(null, F, f)
5521
- )), t.applyMask(v, F), T(F, f, v), {
5522
- modules: F,
5517
+ const F = r(m, f, k), x = g.getSymbolSize(m), X = new B(x);
5518
+ return o(X, m), i(X), u(X, m), M(X, f, 0), m >= 7 && R(X, m), d(X, F), isNaN(v) && (v = t.getBestMask(
5519
+ X,
5520
+ M.bind(null, X, f)
5521
+ )), t.applyMask(v, X), M(X, f, v), {
5522
+ modules: X,
5523
5523
  version: m,
5524
5524
  errorCorrectionLevel: f,
5525
5525
  maskPattern: v,
5526
- segments: H
5526
+ segments: k
5527
5527
  };
5528
5528
  }
5529
5529
  return pg.create = function(m, f) {
5530
5530
  if (typeof m == "undefined" || m === "")
5531
5531
  throw new Error("No input text");
5532
- let v = A.M, H, x;
5533
- return typeof f != "undefined" && (v = A.from(f.errorCorrectionLevel, A.M), H = c.from(f.version), x = t.from(f.maskPattern), f.toSJISFunc && g.setToSJISFunction(f.toSJISFunc)), J(m, H, v, x);
5532
+ let v = A.M, k, H;
5533
+ return typeof f != "undefined" && (v = A.from(f.errorCorrectionLevel, A.M), k = c.from(f.version), H = t.from(f.maskPattern), f.toSJISFunc && g.setToSJISFunction(f.toSJISFunc)), Y(m, k, v, H);
5534
5534
  }, pg;
5535
5535
  }
5536
5536
  var oB = {}, aB = {}, zC;
@@ -5574,15 +5574,15 @@ function QQ() {
5574
5574
  const Q = g.getScale(B, C);
5575
5575
  return Math.floor((B + C.margin * 2) * Q);
5576
5576
  }, g.qrToImageData = function(B, C, Q) {
5577
- const t = C.modules.size, n = C.modules.data, I = g.getScale(t, Q), c = Math.floor((t + Q.margin * 2) * I), w = Q.margin * I, i = [Q.color.light, Q.color.dark];
5577
+ const t = C.modules.size, n = C.modules.data, I = g.getScale(t, Q), c = Math.floor((t + Q.margin * 2) * I), w = Q.margin * I, s = [Q.color.light, Q.color.dark];
5578
5578
  for (let D = 0; D < c; D++)
5579
5579
  for (let o = 0; o < c; o++) {
5580
- let s = (D * c + o) * 4, u = Q.color.light;
5580
+ let i = (D * c + o) * 4, u = Q.color.light;
5581
5581
  if (D >= w && o >= w && D < c - w && o < c - w) {
5582
- const Y = Math.floor((D - w) / I), T = Math.floor((o - w) / I);
5583
- u = i[n[Y * t + T] ? 1 : 0];
5582
+ const R = Math.floor((D - w) / I), M = Math.floor((o - w) / I);
5583
+ u = s[n[R * t + M] ? 1 : 0];
5584
5584
  }
5585
- B[s++] = u.r, B[s++] = u.g, B[s++] = u.b, B[s] = u.a;
5585
+ B[i++] = u.r, B[i++] = u.g, B[i++] = u.b, B[i] = u.a;
5586
5586
  }
5587
5587
  };
5588
5588
  }(aB)), aB;
@@ -5604,13 +5604,13 @@ function ZE() {
5604
5604
  g.render = function(Q, t, n) {
5605
5605
  let I = n, c = t;
5606
5606
  typeof I == "undefined" && (!t || !t.getContext) && (I = t, t = void 0), t || (c = B()), I = A.getOptions(I);
5607
- const w = A.getImageWidth(Q.modules.size, I), i = c.getContext("2d"), D = i.createImageData(w, w);
5608
- return A.qrToImageData(D.data, Q, I), E(i, c, w), i.putImageData(D, 0, 0), c;
5607
+ const w = A.getImageWidth(Q.modules.size, I), s = c.getContext("2d"), D = s.createImageData(w, w);
5608
+ return A.qrToImageData(D.data, Q, I), E(s, c, w), s.putImageData(D, 0, 0), c;
5609
5609
  }, g.renderToDataURL = function(Q, t, n) {
5610
5610
  let I = n;
5611
5611
  typeof I == "undefined" && (!t || !t.getContext) && (I = t, t = void 0), I || (I = {});
5612
- const c = g.render(Q, t, I), w = I.type || "image/png", i = I.rendererOpts || {};
5613
- return c.toDataURL(w, i.quality);
5612
+ const c = g.render(Q, t, I), w = I.type || "image/png", s = I.rendererOpts || {};
5613
+ return c.toDataURL(w, s.quality);
5614
5614
  };
5615
5615
  }(oB)), oB;
5616
5616
  }
@@ -5629,16 +5629,16 @@ function VE() {
5629
5629
  }
5630
5630
  function B(C, Q, t) {
5631
5631
  let n = "", I = 0, c = !1, w = 0;
5632
- for (let i = 0; i < C.length; i++) {
5633
- const D = Math.floor(i % Q), o = Math.floor(i / Q);
5634
- !D && !c && (c = !0), C[i] ? (w++, i > 0 && D > 0 && C[i - 1] || (n += c ? E("M", D + t, 0.5 + o + t) : E("m", I, 0), I = 0, c = !1), D + 1 < Q && C[i + 1] || (n += E("h", w), w = 0)) : I++;
5632
+ for (let s = 0; s < C.length; s++) {
5633
+ const D = Math.floor(s % Q), o = Math.floor(s / Q);
5634
+ !D && !c && (c = !0), C[s] ? (w++, s > 0 && D > 0 && C[s - 1] || (n += c ? E("M", D + t, 0.5 + o + t) : E("m", I, 0), I = 0, c = !1), D + 1 < Q && C[s + 1] || (n += E("h", w), w = 0)) : I++;
5635
5635
  }
5636
5636
  return n;
5637
5637
  }
5638
5638
  return DB.render = function(Q, t, n) {
5639
- const I = g.getOptions(t), c = Q.modules.size, w = Q.modules.data, i = c + I.margin * 2, D = I.color.light.a ? "<path " + A(I.color.light, "fill") + ' d="M0 0h' + i + "v" + i + 'H0z"/>' : "", o = "<path " + A(I.color.dark, "stroke") + ' d="' + B(w, c, I.margin) + '"/>', s = 'viewBox="0 0 ' + i + " " + i + '"', Y = '<svg xmlns="http://www.w3.org/2000/svg" ' + (I.width ? 'width="' + I.width + '" height="' + I.width + '" ' : "") + s + ' shape-rendering="crispEdges">' + D + o + `</svg>
5639
+ const I = g.getOptions(t), c = Q.modules.size, w = Q.modules.data, s = c + I.margin * 2, D = I.color.light.a ? "<path " + A(I.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", o = "<path " + A(I.color.dark, "stroke") + ' d="' + B(w, c, I.margin) + '"/>', i = 'viewBox="0 0 ' + s + " " + s + '"', R = '<svg xmlns="http://www.w3.org/2000/svg" ' + (I.width ? 'width="' + I.width + '" height="' + I.width + '" ' : "") + i + ' shape-rendering="crispEdges">' + D + o + `</svg>
5640
5640
  `;
5641
- return typeof n == "function" && n(null, Y), Y;
5641
+ return typeof n == "function" && n(null, R), R;
5642
5642
  }, DB;
5643
5643
  }
5644
5644
  var jC;
@@ -5647,22 +5647,22 @@ function WE() {
5647
5647
  jC = 1;
5648
5648
  const g = kE(), A = pE(), E = ZE(), B = VE();
5649
5649
  function C(Q, t, n, I, c) {
5650
- const w = [].slice.call(arguments, 1), i = w.length, D = typeof w[i - 1] == "function";
5650
+ const w = [].slice.call(arguments, 1), s = w.length, D = typeof w[s - 1] == "function";
5651
5651
  if (!D && !g())
5652
5652
  throw new Error("Callback required as last argument");
5653
5653
  if (D) {
5654
- if (i < 2)
5654
+ if (s < 2)
5655
5655
  throw new Error("Too few arguments provided");
5656
- i === 2 ? (c = n, n = t, t = I = void 0) : i === 3 && (t.getContext && typeof c == "undefined" ? (c = I, I = void 0) : (c = I, I = n, n = t, t = void 0));
5656
+ s === 2 ? (c = n, n = t, t = I = void 0) : s === 3 && (t.getContext && typeof c == "undefined" ? (c = I, I = void 0) : (c = I, I = n, n = t, t = void 0));
5657
5657
  } else {
5658
- if (i < 1)
5658
+ if (s < 1)
5659
5659
  throw new Error("Too few arguments provided");
5660
- return i === 1 ? (n = t, t = I = void 0) : i === 2 && !t.getContext && (I = n, n = t, t = void 0), new Promise(function(o, s) {
5660
+ return s === 1 ? (n = t, t = I = void 0) : s === 2 && !t.getContext && (I = n, n = t, t = void 0), new Promise(function(o, i) {
5661
5661
  try {
5662
5662
  const u = A.create(n, I);
5663
5663
  o(Q(u, t, I));
5664
5664
  } catch (u) {
5665
- s(u);
5665
+ i(u);
5666
5666
  }
5667
5667
  });
5668
5668
  }
@@ -5689,39 +5689,39 @@ function gI(n) {
5689
5689
  setOrderId: Q,
5690
5690
  theme: t = "ocb"
5691
5691
  }) {
5692
- let I = null, c = "", w = null, i = (C == null ? void 0 : C.orderId) || null, D = !1, o = 0;
5693
- const s = document.createElement("div");
5694
- s.className = "wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";
5692
+ let I = null, c = "", w = null, s = (C == null ? void 0 : C.orderId) || null, D = !1, o = 0;
5693
+ const i = document.createElement("div");
5694
+ i.className = "wgt:flex wgt:flex-col wgt:gap-6 wgt:relative";
5695
5695
  const {
5696
5696
  container: u,
5697
- open: Y,
5698
- close: T
5697
+ open: R,
5698
+ close: M
5699
5699
  } = qB();
5700
- s.appendChild(u);
5701
- const M = document.createElement("div");
5702
- M.className = "wgt:w-full wgt:flex wgt:items-start wgt:gap-6 wgt:@max-2xl:flex-col-reverse";
5700
+ i.appendChild(u);
5701
+ const d = document.createElement("div");
5702
+ d.className = "wgt:w-full wgt:flex wgt:items-start wgt:gap-6 wgt:@max-2xl:flex-col-reverse";
5703
5703
  const r = document.createElement("div");
5704
5704
  r.className = "wgt:flex-1 wgt:@max-2xl:w-full";
5705
- const P = a("paymentInstructions"), J = Array.isArray(P) ? P : [P], { container: l, update: m } = xE(GA(PA({
5705
+ const P = a("paymentInstructions"), Y = Array.isArray(P) ? P : [P], { container: T, update: m } = xE(GA(PA({
5706
5706
  qrSrc: "",
5707
5707
  accountName: "",
5708
5708
  accountNumber: "",
5709
5709
  bankName: ""
5710
5710
  }, B), {
5711
- instructions: J,
5711
+ instructions: Y,
5712
5712
  theme: t
5713
5713
  }));
5714
- r.appendChild(l), M.appendChild(r);
5714
+ r.appendChild(T), d.appendChild(r);
5715
5715
  const { container: f, resetCountdown: v } = HE(GA(PA({}, C), {
5716
5716
  selectedPromotions: (C == null ? void 0 : C.selectedPromotions) || [],
5717
5717
  onResetToStep1: () => {
5718
5718
  w && (clearInterval(w), w = null), C != null && C.onResetToStep1 && C.onResetToStep1();
5719
5719
  }
5720
5720
  }));
5721
- M.appendChild(f), s.appendChild(M);
5722
- const H = document.createElement("div");
5723
- H.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
5724
- const x = ng({
5721
+ d.appendChild(f), i.appendChild(d);
5722
+ const k = document.createElement("div");
5723
+ k.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
5724
+ const H = ng({
5725
5725
  type: "button",
5726
5726
  title: a("back"),
5727
5727
  className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
@@ -5729,8 +5729,8 @@ function gI(n) {
5729
5729
  A && (clearInterval(w), w = null, A());
5730
5730
  }
5731
5731
  });
5732
- H.appendChild(x), s.appendChild(H);
5733
- function k() {
5732
+ k.appendChild(H), i.appendChild(k);
5733
+ function F() {
5734
5734
  return W(this, null, function* () {
5735
5735
  const { registrationData: O } = C, q = O.eInvoiceRegistration, { isUsedEInvoiceBefore: e } = q, h = yg(q, ["isUsedEInvoiceBefore"]);
5736
5736
  try {
@@ -5747,23 +5747,23 @@ function gI(n) {
5747
5747
  packages: O.packages,
5748
5748
  promotionCodes: O.promotionCodes
5749
5749
  })).orderId;
5750
- N !== i && (i = N, Q(N), yield R(N), v());
5751
- } catch (d) {
5752
- console.error("Error creating order:", d), og(a("errorCreatingOrder") || "Failed to create order");
5750
+ N !== s && (s = N, Q(N), yield x(N), v());
5751
+ } catch (l) {
5752
+ console.error("Error creating order:", l), og(a("errorCreatingOrder") || "Failed to create order");
5753
5753
  return;
5754
5754
  } finally {
5755
- T();
5755
+ M();
5756
5756
  }
5757
5757
  });
5758
5758
  }
5759
- function R(O) {
5759
+ function x(O) {
5760
5760
  return W(this, null, function* () {
5761
- var e, h, q, d;
5761
+ var e, h, q, l;
5762
5762
  if (D) {
5763
5763
  console.log("Already fetching QR data, skipping...");
5764
5764
  return;
5765
5765
  }
5766
- D = !0, Y();
5766
+ D = !0, R();
5767
5767
  try {
5768
5768
  if (I = yield iQ({
5769
5769
  orderId: O != null ? O : C == null ? void 0 : C.orderId,
@@ -5798,9 +5798,9 @@ function gI(n) {
5798
5798
  });
5799
5799
  return;
5800
5800
  }
5801
- D = !1, yield k();
5801
+ D = !1, yield F();
5802
5802
  return;
5803
- } else if (((q = N.response) == null ? void 0 : q.status) === 401 || ((d = N.response) == null ? void 0 : d.status) === 403) {
5803
+ } else if (((q = N.response) == null ? void 0 : q.status) === 401 || ((l = N.response) == null ? void 0 : l.status) === 403) {
5804
5804
  console.log("Token refresh in progress, not showing error popup");
5805
5805
  return;
5806
5806
  } else
@@ -5817,34 +5817,35 @@ function gI(n) {
5817
5817
  }
5818
5818
  );
5819
5819
  } finally {
5820
- T(), D = !1;
5820
+ M(), D = !1;
5821
5821
  }
5822
5822
  });
5823
5823
  }
5824
- i && (yield R(i));
5825
- let F = !1;
5824
+ s && (yield x(s));
5825
+ let X = !1;
5826
5826
  function U() {
5827
- F = !navigator.onLine, console.log("Network status changed:", F ? "offline" : "online");
5827
+ X = !navigator.onLine, console.log("Network status changed:", X ? "offline" : "online");
5828
5828
  }
5829
5829
  function j() {
5830
5830
  w && (clearInterval(w), w = null), w = setInterval(() => W(null, null, function* () {
5831
5831
  var O, e;
5832
5832
  try {
5833
- const h = yield fE(i);
5833
+ const h = yield fE(s);
5834
5834
  if (h.paymentStatus === "pending")
5835
5835
  return;
5836
- const q = h.paymentStatus === "paid" ? a("paymentSuccess") : a("paymentFailed"), d = PB({
5836
+ const q = h.paymentStatus === "paid" ? a("paymentSuccess") : a("paymentFailed"), l = PB({
5837
5837
  message: q,
5838
5838
  okLabel: "OK",
5839
+ theme: t,
5839
5840
  isSuccess: h.paymentStatus === "paid",
5840
5841
  onClose: function() {
5841
5842
  clearInterval(w), w = null, g();
5842
5843
  },
5843
5844
  preventClose: !0
5844
5845
  });
5845
- s.appendChild(d.container), d.open();
5846
+ i.appendChild(l.container), l.open();
5846
5847
  } catch (h) {
5847
- !navigator.onLine || !h.response ? (F = !0, og(a("errorNetwork"), {
5848
+ !navigator.onLine || !h.response ? (X = !0, og(a("errorNetwork"), {
5848
5849
  okLabel: a("tryAgain"),
5849
5850
  onClose: function() {
5850
5851
  return W(this, null, function* () {
@@ -5855,14 +5856,14 @@ function gI(n) {
5855
5856
  okLabel: a("tryAgain"),
5856
5857
  onClose: function() {
5857
5858
  return W(this, null, function* () {
5858
- clearInterval(w), w = null, yield k();
5859
+ clearInterval(w), w = null, yield F();
5859
5860
  });
5860
5861
  }
5861
5862
  }) : ((e = h.response) == null ? void 0 : e.status) === 410 ? og(a("paymentTimeoutMessage"), {
5862
5863
  okLabel: a("tryAgain"),
5863
5864
  onClose: function() {
5864
5865
  return W(this, null, function* () {
5865
- clearInterval(w), w = null, yield k();
5866
+ clearInterval(w), w = null, yield F();
5866
5867
  });
5867
5868
  }
5868
5869
  }) : j();
@@ -5871,7 +5872,7 @@ function gI(n) {
5871
5872
  }
5872
5873
  return window.addEventListener("online", U), window.addEventListener("offline", U), window.addEventListener("beforeunload", function() {
5873
5874
  w && (clearInterval(w), w = null);
5874
- }), { container: s };
5875
+ }), { container: i };
5875
5876
  });
5876
5877
  }
5877
5878
  function BI({
@@ -5896,22 +5897,22 @@ function BI({
5896
5897
  c.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(c);
5897
5898
  const w = document.createElement("div");
5898
5899
  w.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", w.innerText = "1", c.appendChild(w);
5899
- const i = document.createElement("p");
5900
- i.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", i.innerText = a("notice1"), c.appendChild(i);
5900
+ const s = document.createElement("p");
5901
+ s.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", s.innerText = a("notice1"), c.appendChild(s);
5901
5902
  const D = document.createElement("div");
5902
5903
  D.className = "wgt:flex wgt:items-start wgt:gap-4", n.appendChild(D);
5903
5904
  const o = document.createElement("div");
5904
5905
  o.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", o.innerText = "2", D.appendChild(o);
5905
- const s = document.createElement("div");
5906
- s.className = "wgt:flex wgt:flex-col wgt:gap-2", D.appendChild(s);
5906
+ const i = document.createElement("div");
5907
+ i.className = "wgt:flex wgt:flex-col wgt:gap-2", D.appendChild(i);
5907
5908
  const u = document.createElement("p");
5908
- u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = a("notice2"), s.appendChild(u);
5909
- const Y = document.createElement("div");
5910
- Y.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3", s.appendChild(Y);
5911
- const T = document.createElement("div");
5912
- T.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(T);
5909
+ u.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", u.innerText = a("notice2"), i.appendChild(u);
5910
+ const R = document.createElement("div");
5911
+ R.className = "wgt:w-full wgt:flex wgt:flex-col wgt:gap-2 wgt:rounded-lg wgt:bg-weak-50 wgt:px-4 wgt:py-3", i.appendChild(R);
5913
5912
  const M = document.createElement("div");
5914
- M.innerHTML = `
5913
+ M.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", R.appendChild(M);
5914
+ const d = document.createElement("div");
5915
+ d.innerHTML = `
5915
5916
  <svg
5916
5917
  width="14"
5917
5918
  height="14"
@@ -5929,13 +5930,13 @@ function BI({
5929
5930
  stroke-linejoin="round"
5930
5931
  />
5931
5932
  </svg>
5932
- `, T.appendChild(M);
5933
+ `, M.appendChild(d);
5933
5934
  const r = sQ(rB(), B, Q), P = document.createElement("span");
5934
- P.innerHTML = `${a("hotlineDomestic")} <b>${(r == null ? void 0 : r.hotline) || ""}</b> ${a("hotlineDesc")} `, T.appendChild(P);
5935
- const J = document.createElement("div");
5936
- J.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(J);
5937
- const l = document.createElement("div");
5938
- l.innerHTML = `
5935
+ P.innerHTML = `${a("hotlineDomestic")} <b>${(r == null ? void 0 : r.hotline) || ""}</b> ${a("hotlineDesc")} `, M.appendChild(P);
5936
+ const Y = document.createElement("div");
5937
+ Y.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", R.appendChild(Y);
5938
+ const T = document.createElement("div");
5939
+ T.innerHTML = `
5939
5940
  <svg
5940
5941
  width="14"
5941
5942
  height="12"
@@ -5951,11 +5952,11 @@ function BI({
5951
5952
  stroke-linejoin="round"
5952
5953
  />
5953
5954
  </svg>
5954
- `, J.appendChild(l);
5955
+ `, Y.appendChild(T);
5955
5956
  const m = document.createElement("span");
5956
- m.innerHTML = `${a("email")}: <b>${(r == null ? void 0 : r.email) || ""}</b>`, J.appendChild(m);
5957
+ m.innerHTML = `${a("email")}: <b>${(r == null ? void 0 : r.email) || ""}</b>`, Y.appendChild(m);
5957
5958
  const f = document.createElement("div");
5958
- f.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", Y.appendChild(f);
5959
+ f.className = "wgt:flex wgt:items-center wgt:gap-2 wgt:text-sm wgt:text-strong-950", R.appendChild(f);
5959
5960
  const v = document.createElement("div");
5960
5961
  v.innerHTML = `
5961
5962
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -5969,16 +5970,16 @@ function BI({
5969
5970
  </defs>
5970
5971
  </svg>
5971
5972
  `, f.appendChild(v), f.appendChild(document.createTextNode(a("website") + ": "));
5972
- const H = document.createElement("a");
5973
- H.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", H.innerHTML = `<b>${(r == null ? void 0 : r.link) || ""}</b>`, H.href = (r == null ? void 0 : r.link) || "#", H.target = "_blank", f.appendChild(H);
5974
- const x = document.createElement("div");
5975
- x.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(x);
5976
- const k = document.createElement("div");
5977
- k.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", k.innerText = "3", x.appendChild(k);
5978
- const R = document.createElement("p");
5979
- R.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", R.appendChild(document.createTextNode(a("notice3.1") + " "));
5980
- const F = document.createElement("a");
5981
- F.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", F.textContent = a("settings") + " ", F.href = C, F.target = "_blank", R.appendChild(F), R.appendChild(document.createTextNode(a("notice3.2") + " ")), x.appendChild(R);
5973
+ const k = document.createElement("a");
5974
+ k.className = "wgt:text-strong-950 wgt:hover:underline wgt:cursor-pointer", k.innerHTML = `<b>${(r == null ? void 0 : r.link) || ""}</b>`, k.href = (r == null ? void 0 : r.link) || "#", k.target = "_blank", f.appendChild(k);
5975
+ const H = document.createElement("div");
5976
+ H.className = "wgt:flex wgt:items-center wgt:gap-4", n.appendChild(H);
5977
+ const F = document.createElement("div");
5978
+ F.className = "wgt:flex wgt:h-8 wgt:w-8 wgt:shrink-0 wgt:items-center wgt:justify-center wgt:rounded-full wgt:bg-primary wgt:text-xs wgt:font-semibold wgt:text-white", F.innerText = "3", H.appendChild(F);
5979
+ const x = document.createElement("p");
5980
+ x.className = "wgt:text-sm wgt:leading-relaxed wgt:text-strong-950", x.appendChild(document.createTextNode(a("notice3.1") + " "));
5981
+ const X = document.createElement("a");
5982
+ X.className = "wgt:text-primary wgt:font-semibold wgt:hover:underline wgt:cursor-pointer", X.textContent = a("settings") + " ", X.href = C, X.target = "_blank", x.appendChild(X), x.appendChild(document.createTextNode(a("notice3.2") + " ")), H.appendChild(x);
5982
5983
  const U = document.createElement("div");
5983
5984
  U.className = "wgt:flex wgt:items-center wgt:justify-center wgt:gap-2 wgt:py-3 wgt:px-5 wgt:bg-primary/15 wgt:rounded-[10px] wgt:w-fit wgt:mx-auto", n.appendChild(U);
5984
5985
  const j = document.createElement("div");
@@ -6161,18 +6162,19 @@ function DI({
6161
6162
  onConfirm: g,
6162
6163
  onCancel: A,
6163
6164
  showCloseButton: E = !0,
6164
- preventClose: B = !1
6165
+ preventClose: B = !1,
6166
+ settingUrl: C = ""
6165
6167
  } = {}) {
6166
- const C = `Mã số thuế đã được đăng ký với
6167
- M-Invoice.`, Q = "Thiết lập", t = "Tiếp tục";
6168
- document.querySelectorAll('[data-wgt-warning-popup="true"]').forEach((k) => {
6168
+ const Q = `Mã số thuế đã được đăng ký với
6169
+ M-Invoice.`, t = "Thiết lập", n = "Tiếp tục";
6170
+ document.querySelectorAll('[data-wgt-warning-popup="true"]').forEach((x) => {
6169
6171
  try {
6170
- k.remove();
6171
- } catch (R) {
6172
+ x.remove();
6173
+ } catch (X) {
6172
6174
  }
6173
6175
  });
6174
- const I = oI(), c = aI(I), w = `Bạn có thể vào <strong style="color: ${c} !important;">Thiết lập</strong> để sử dụng dịch vụ, <br> hoặc chọn <strong style="color: ${c} !important;">Tiếp tục</strong> để đăng ký mới (có thể phát sinh phí).`, i = document.createElement("div");
6175
- i.style.cssText = `
6176
+ const c = oI(), w = aI(c), s = `Bạn có thể vào <strong style="color: ${w} !important;">Thiết lập</strong> để sử dụng dịch vụ, <br> hoặc chọn <strong style="color: ${w} !important;">Tiếp tục</strong> để đăng ký mới (có thể phát sinh phí).`, D = document.createElement("div");
6177
+ D.style.cssText = `
6176
6178
  position: fixed;
6177
6179
  inset: 0;
6178
6180
  z-index: 50;
@@ -6181,9 +6183,9 @@ function DI({
6181
6183
  justify-content: center;
6182
6184
  background-color: rgba(0, 0, 0, 0.5);
6183
6185
  backdrop-filter: blur(4px);
6184
- `, i.setAttribute("role", "dialog"), i.setAttribute("aria-modal", "true"), i.setAttribute("data-wgt-warning-popup", "true"), i.setAttribute("data-theme", I);
6185
- const D = document.createElement("div");
6186
- if (D.style.cssText = `
6186
+ `, D.setAttribute("role", "dialog"), D.setAttribute("aria-modal", "true"), D.setAttribute("data-wgt-warning-popup", "true"), D.setAttribute("data-theme", c);
6187
+ const o = document.createElement("div");
6188
+ if (o.style.cssText = `
6187
6189
  position: relative;
6188
6190
  margin: 0 1rem;
6189
6191
  width: 100%;
@@ -6192,9 +6194,9 @@ function DI({
6192
6194
  background-color: white;
6193
6195
  padding: 1.5rem;
6194
6196
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
6195
- `, i.appendChild(D), E) {
6196
- const k = document.createElement("button");
6197
- k.type = "button", k.innerHTML = "✕", k.style.cssText = `
6197
+ `, D.appendChild(o), E) {
6198
+ const x = document.createElement("button");
6199
+ x.type = "button", x.innerHTML = "✕", x.style.cssText = `
6198
6200
  position: absolute;
6199
6201
  top: 1rem;
6200
6202
  right: 1rem;
@@ -6210,29 +6212,29 @@ function DI({
6210
6212
  line-height: 1;
6211
6213
  cursor: pointer;
6212
6214
  transition: color 0.2s ease;
6213
- `, k.addEventListener(
6215
+ `, x.addEventListener(
6214
6216
  "mouseenter",
6215
- () => k.style.color = "#374151"
6216
- ), k.addEventListener(
6217
+ () => x.style.color = "#374151"
6218
+ ), x.addEventListener(
6217
6219
  "mouseleave",
6218
- () => k.style.color = "#6b7280"
6219
- ), k.addEventListener("click", () => {
6220
- B || x(!1);
6221
- }), D.appendChild(k);
6220
+ () => x.style.color = "#6b7280"
6221
+ ), x.addEventListener("click", () => {
6222
+ B || F(!1);
6223
+ }), o.appendChild(x);
6222
6224
  }
6223
- const o = document.createElement("div");
6224
- o.style.cssText = `
6225
+ const i = document.createElement("div");
6226
+ i.style.cssText = `
6225
6227
  display: flex;
6226
6228
  justify-content: center;
6227
6229
  margin-bottom: 1rem;
6228
- `, D.appendChild(o);
6229
- const s = document.createElement("img");
6230
- s.src = eI, s.alt = "Warning", s.style.cssText = `
6230
+ `, o.appendChild(i);
6231
+ const u = document.createElement("img");
6232
+ u.src = eI, u.alt = "Warning", u.style.cssText = `
6231
6233
  width:40px;
6232
6234
  height: 40px;
6233
- `, o.appendChild(s);
6234
- const u = document.createElement("h2");
6235
- u.style.cssText = `
6235
+ `, i.appendChild(u);
6236
+ const R = document.createElement("h2");
6237
+ R.style.cssText = `
6236
6238
  margin: 0 0 1rem 0;
6237
6239
  text-align: center;
6238
6240
  font-size: 1.25rem;
@@ -6241,23 +6243,23 @@ function DI({
6241
6243
  line-height: 1.4;
6242
6244
  word-wrap: break-word;
6243
6245
  white-space: normal;
6244
- `, u.innerText = C, D.appendChild(u);
6245
- const Y = document.createElement("div");
6246
- Y.style.cssText = `
6246
+ `, R.innerText = Q, o.appendChild(R);
6247
+ const M = document.createElement("div");
6248
+ M.style.cssText = `
6247
6249
  margin: 0 0 1.5rem 0;
6248
6250
  text-align: center;
6249
6251
  font-size: 0.9rem;
6250
6252
  color: #4b5563;
6251
6253
  line-height: 1.6;
6252
- `, Y.innerHTML = w, D.appendChild(Y);
6253
- const T = document.createElement("div");
6254
- T.style.cssText = `
6254
+ `, M.innerHTML = s, o.appendChild(M);
6255
+ const d = document.createElement("div");
6256
+ d.style.cssText = `
6255
6257
  display: flex;
6256
6258
  gap: 0.75rem;
6257
6259
  justify-content: center;
6258
- `, D.appendChild(T);
6259
- const M = document.createElement("button");
6260
- M.type = "button", M.innerText = Q, M.style.cssText = `
6260
+ `, o.appendChild(d);
6261
+ const r = document.createElement("button");
6262
+ r.type = "button", r.innerText = t, r.style.cssText = `
6261
6263
  flex: 1;
6262
6264
  max-width: 12rem;
6263
6265
  border-radius: 0.375rem;
@@ -6267,20 +6269,20 @@ function DI({
6267
6269
  border: none;
6268
6270
  font-size: 1rem;
6269
6271
  font-weight: 500;
6270
- background-color: ${c};
6272
+ background-color: ${w};
6271
6273
  transition: opacity 0.2s ease;
6272
- `, M.addEventListener(
6274
+ `, r.addEventListener(
6273
6275
  "mouseenter",
6274
- () => M.style.opacity = "0.9"
6275
- ), M.addEventListener(
6276
+ () => r.style.opacity = "0.9"
6277
+ ), r.addEventListener(
6276
6278
  "mouseleave",
6277
- () => M.style.opacity = "1"
6278
- ), M.addEventListener(
6279
+ () => r.style.opacity = "1"
6280
+ ), r.addEventListener(
6279
6281
  "focus",
6280
- () => M.style.outline = "none"
6281
- ), T.appendChild(M);
6282
- const r = document.createElement("button");
6283
- r.type = "button", r.innerText = t, r.style.cssText = `
6282
+ () => r.style.outline = "none"
6283
+ ), d.appendChild(r);
6284
+ const P = document.createElement("button");
6285
+ P.type = "button", P.innerText = n, P.style.cssText = `
6284
6286
  flex: 1;
6285
6287
  max-width: 12rem;
6286
6288
  border-radius: 0.375rem;
@@ -6292,58 +6294,55 @@ function DI({
6292
6294
  font-weight: 500;
6293
6295
  background-color: white;
6294
6296
  transition: background-color 0.2s ease, color 0.2s ease;
6295
- `, r.addEventListener("mouseenter", () => {
6296
- r.style.backgroundColor = `${c}10`;
6297
- }), r.addEventListener("mouseleave", () => {
6298
- r.style.backgroundColor = "white";
6299
- }), r.addEventListener("focus", () => r.style.outline = "none"), T.appendChild(r);
6300
- let P = !1, J = !1;
6301
- const l = (k) => {
6302
- k.target === i && !B && x(!1);
6303
- }, m = (k) => {
6304
- k.key === "Escape" && !B && x(!1);
6297
+ `, P.addEventListener("mouseenter", () => {
6298
+ P.style.backgroundColor = `${w}10`;
6299
+ }), P.addEventListener("mouseleave", () => {
6300
+ P.style.backgroundColor = "white";
6301
+ }), P.addEventListener("focus", () => P.style.outline = "none"), d.appendChild(P);
6302
+ let Y = !1, T = !1;
6303
+ const m = (x) => {
6304
+ x.target === D && !B && F(!1);
6305
+ }, f = (x) => {
6306
+ x.key === "Escape" && !B && F(!1);
6305
6307
  };
6306
- function f() {
6307
- i.addEventListener("click", l), window.addEventListener("keydown", m), M.addEventListener("click", () => x(!0)), r.addEventListener("click", () => x(!1));
6308
- }
6309
6308
  function v() {
6310
- i.removeEventListener("click", l), window.removeEventListener("keydown", m);
6309
+ D.addEventListener("click", m), window.addEventListener("keydown", f), r.addEventListener("click", () => F(!0)), P.addEventListener("click", () => F(!1));
6310
+ }
6311
+ function k() {
6312
+ D.removeEventListener("click", m), window.removeEventListener("keydown", f);
6311
6313
  }
6312
6314
  function H() {
6313
- P || (P = !0, document.body.appendChild(i), i.style.display = "flex", setTimeout(() => M.focus(), 0), f());
6315
+ Y || (Y = !0, document.body.appendChild(D), D.style.display = "flex", setTimeout(() => r.focus(), 0), v());
6314
6316
  }
6315
- function x(k = !1) {
6316
- if (!(!P || J)) {
6317
- J = !0, P = !1, v();
6317
+ function F(x = !1) {
6318
+ if (!(!Y || T)) {
6319
+ T = !0, Y = !1, k();
6318
6320
  try {
6319
- i.remove();
6320
- } catch (R) {
6321
+ D.remove();
6322
+ } catch (X) {
6321
6323
  }
6322
- k && typeof g == "function" ? g() : !k && typeof A == "function" && A();
6324
+ x ? C ? window.location.href = C : typeof g == "function" && g() : !x && typeof A == "function" && A();
6323
6325
  }
6324
6326
  }
6325
- return { container: i, open: H, close: x };
6327
+ return { container: D, open: H, close: F };
6326
6328
  }
6327
- function uB(g, A, E, B = !1, C = "ocb") {
6329
+ function uB(g, A, E, B = !1, C = "ocb", Q = "") {
6328
6330
  return W(this, null, function* () {
6331
+ var t, n;
6329
6332
  try {
6330
6333
  if (C !== "bvb") {
6331
6334
  E(!0, null);
6332
6335
  return;
6333
6336
  }
6334
- const Q = yield RQ(g, A, "HDTT");
6335
- let t = null;
6337
+ const I = yield RQ(g, A, "HDTT");
6338
+ let c = null;
6336
6339
  if (B) {
6337
- E(Q.isNewCustomer, null);
6340
+ E(I.isNewCustomer, null);
6338
6341
  return;
6339
6342
  }
6340
- if (!Q.isNewCustomer) {
6341
- t = yield YQ(g, A);
6342
- const n = document.body.getAttribute("data-setting-url") || "";
6343
- DI({
6344
- onConfirm: () => {
6345
- n && (window.location.href = n);
6346
- },
6343
+ if (!I.isNewCustomer) {
6344
+ c = yield YQ(g, A), yield E(I.isNewCustomer, c), yield new Promise((s) => setTimeout(s, 1e3)), (((t = c == null ? void 0 : c.organization) == null ? void 0 : t.name) || ((n = c == null ? void 0 : c.organization) == null ? void 0 : n.taxCode)) && DI({
6345
+ settingUrl: Q,
6347
6346
  onCancel: () => {
6348
6347
  E(!0, null);
6349
6348
  },
@@ -6353,14 +6352,14 @@ function uB(g, A, E, B = !1, C = "ocb") {
6353
6352
  return;
6354
6353
  }
6355
6354
  E(!0, null);
6356
- } catch (Q) {
6357
- console.error("Error checking new customer:", Q), E(!0, null);
6355
+ } catch (I) {
6356
+ console.error("Error checking new customer:", I), E(!0, null);
6358
6357
  }
6359
6358
  });
6360
6359
  }
6361
6360
  function fI(g, A, E, B, C, Q) {
6362
6361
  return W(this, null, function* () {
6363
- var d, N;
6362
+ var l, N;
6364
6363
  const n = [
6365
6364
  { name: "M-Invoice", route: "m-invoice", logoUrl: mQ },
6366
6365
  { name: "Misa", route: "misa", logoUrl: rQ },
@@ -6375,9 +6374,9 @@ function fI(g, A, E, B, C, Q) {
6375
6374
  let c = vQ({
6376
6375
  steps: I(),
6377
6376
  currentStep: 1
6378
- }), { container: w, setStep: i, setContent: D } = c;
6377
+ }), { container: w, setStep: s, setContent: D } = c;
6379
6378
  g.dataset.theme = C || "default", g.classList.add("wgt:mx-auto", "wgt:@container"), g.appendChild(w);
6380
- let o = 1, s = n[0], u = {
6379
+ let o = 1, i = n[0], u = {
6381
6380
  eInvoiceRegistration: {
6382
6381
  taxAuthorityCode: "",
6383
6382
  invoiceSymbol: "",
@@ -6407,21 +6406,21 @@ function fI(g, A, E, B, C, Q) {
6407
6406
  hasUsedEInvoice: !1,
6408
6407
  isUsedEInvoiceBefore: !1
6409
6408
  },
6410
- bank: C || "ocb",
6411
- provider: s.route,
6409
+ bank: C,
6410
+ provider: i.route,
6412
6411
  logo: null,
6413
6412
  license: null,
6414
6413
  idCard: null,
6415
6414
  idCardBack: null,
6416
6415
  packages: [],
6417
6416
  promotionCodes: []
6418
- }, Y = !0, T = !Q, M = null, r = null, P = null, J = null, l = 0, m = null, f = null, v = null, H = {
6417
+ }, R = !0, M = !Q, d = null, r = null, P = null, Y = null, T = 0, m = null, f = null, v = null, k = {
6419
6418
  qtyRegFee: 1,
6420
6419
  qtyInvoicePkg: 1,
6421
6420
  qtySignaturePkg: 1
6422
6421
  };
6423
- function x() {
6424
- s = n[0], u = {
6422
+ function H() {
6423
+ i = n[0], u = {
6425
6424
  eInvoiceRegistration: {
6426
6425
  taxAuthorityCode: "",
6427
6426
  invoiceSymbol: "",
@@ -6452,20 +6451,20 @@ function fI(g, A, E, B, C, Q) {
6452
6451
  isUsedEInvoiceBefore: !1
6453
6452
  },
6454
6453
  bank: C || "ocb",
6455
- provider: s.route,
6454
+ provider: i.route,
6456
6455
  logo: null,
6457
6456
  license: null,
6458
6457
  idCard: null,
6459
6458
  idCardBack: null,
6460
6459
  packages: [],
6461
6460
  promotionCodes: []
6462
- }, M = null, r = null, P = null, J = null, l = 0, v = null, H = {
6461
+ }, d = null, r = null, P = null, Y = null, T = 0, v = null, k = {
6463
6462
  qtyRegFee: 1,
6464
6463
  qtyInvoicePkg: 1,
6465
6464
  qtySignaturePkg: 1
6466
6465
  };
6467
6466
  }
6468
- function k(L) {
6467
+ function F(L) {
6469
6468
  L || (L = {
6470
6469
  name: "",
6471
6470
  address: "",
@@ -6508,10 +6507,10 @@ function fI(g, A, E, B, C, Q) {
6508
6507
  promotionCodes: []
6509
6508
  });
6510
6509
  }
6511
- function R() {
6512
- x(), o = 1, i(o, I()), j(o);
6510
+ function x() {
6511
+ H(), o = 1, s(o, I()), j(o);
6513
6512
  }
6514
- function F() {
6513
+ function X() {
6515
6514
  typeof window != "undefined" && window.scrollTo({
6516
6515
  top: 0,
6517
6516
  behavior: "smooth"
@@ -6528,7 +6527,7 @@ function fI(g, A, E, B, C, Q) {
6528
6527
  invoiceSymbol: L.invoiceSymbol,
6529
6528
  previousEInvoiceProvider: L.previousEInvoiceProvider
6530
6529
  }
6531
- }) : b && k(b), yield j(o);
6530
+ }) : b && F(b), yield j(o);
6532
6531
  });
6533
6532
  }
6534
6533
  function j(L) {
@@ -6537,17 +6536,18 @@ function fI(g, A, E, B, C, Q) {
6537
6536
  const { container: b } = yield wE({
6538
6537
  providerProps: {
6539
6538
  providers: n,
6540
- selectedRoute: s.route,
6539
+ selectedRoute: i.route,
6541
6540
  onProviderChange: (y) => W(null, null, function* () {
6542
6541
  var AA, S;
6543
- s = y, yield uB(
6542
+ i = y, yield uB(
6544
6543
  y.route,
6545
6544
  (S = (AA = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : AA.organization) == null ? void 0 : S.taxCode,
6546
6545
  (IA, nA) => {
6547
- T = IA, U(nA);
6546
+ M = IA, U(nA);
6548
6547
  },
6549
6548
  Q,
6550
- C
6549
+ C,
6550
+ (B == null ? void 0 : B.settingUrl) || ""
6551
6551
  );
6552
6552
  })
6553
6553
  },
@@ -6568,12 +6568,12 @@ function fI(g, A, E, B, C, Q) {
6568
6568
  // ...data.eInvoiceRegistration,
6569
6569
  // };
6570
6570
  formProps: {
6571
- isNewCustomer: T,
6571
+ isNewCustomer: M,
6572
6572
  handleCheckNewCustomer: uB,
6573
6573
  updateRegistrationData: U,
6574
6574
  serial: (B == null ? void 0 : B.serial) || "",
6575
6575
  onSubmit: (y) => {
6576
- u.eInvoiceRegistration = PA(PA({}, u.eInvoiceRegistration), y.eInvoiceRegistration), u.logo = y.logo || null, u.license = y.license || null, u.idCard = y.idCard || null, u.idCardBack = y.idCardBack || null, u.provider = s.route, o = 2, i(o, I()), j(o), F();
6576
+ u.eInvoiceRegistration = PA(PA({}, u.eInvoiceRegistration), y.eInvoiceRegistration), u.logo = y.logo || null, u.license = y.license || null, u.idCard = y.idCard || null, u.idCardBack = y.idCardBack || null, u.provider = i.route, o = 2, s(o, I()), j(o), X();
6577
6577
  },
6578
6578
  registrationData: u,
6579
6579
  theme: C || "default",
@@ -6593,10 +6593,10 @@ function fI(g, A, E, B, C, Q) {
6593
6593
  } else if (L === 2) {
6594
6594
  const { container: b } = yield lE({
6595
6595
  onNext: () => W(null, null, function* () {
6596
- o = 3, i(o, I()), j(o), F();
6596
+ o = 3, s(o, I()), j(o), X();
6597
6597
  }),
6598
6598
  onPrev: () => {
6599
- o = 1, i(o, I()), j(o), F();
6599
+ o = 1, s(o, I()), j(o), X();
6600
6600
  },
6601
6601
  setSelectedInitPackage: (y) => {
6602
6602
  r = y;
@@ -6605,13 +6605,13 @@ function fI(g, A, E, B, C, Q) {
6605
6605
  P = y;
6606
6606
  },
6607
6607
  setSelectedSignatureOtp: (y) => {
6608
- J = y;
6608
+ Y = y;
6609
6609
  },
6610
6610
  setOrderId: (y) => {
6611
- M = y;
6611
+ d = y;
6612
6612
  },
6613
6613
  setTotalAmount: (y) => {
6614
- l = y;
6614
+ T = y;
6615
6615
  },
6616
6616
  setSelectedPromotions: (y) => {
6617
6617
  f = y;
@@ -6624,25 +6624,25 @@ function fI(g, A, E, B, C, Q) {
6624
6624
  },
6625
6625
  selectedInitPackage: r,
6626
6626
  selectedInvoiceOtp: P,
6627
- selectedSignatureOtp: J,
6627
+ selectedSignatureOtp: Y,
6628
6628
  selectedPromotions: f,
6629
6629
  theme: C,
6630
- selectedProvider: s,
6630
+ selectedProvider: i,
6631
6631
  registrationData: u,
6632
- isNewCustomer: T,
6633
- savedQuantities: H,
6632
+ isNewCustomer: M,
6633
+ savedQuantities: k,
6634
6634
  setSavedQuantities: (y) => {
6635
- H = y;
6635
+ k = y;
6636
6636
  }
6637
6637
  });
6638
6638
  D(b);
6639
6639
  } else if (L === 3) {
6640
6640
  const { container: b } = yield gI({
6641
6641
  onNext: () => {
6642
- o = 4, i(o, I()), j(o), F();
6642
+ o = 4, s(o, I()), j(o), X();
6643
6643
  },
6644
6644
  onPrev: () => {
6645
- o = 2, i(o, I()), j(o), F();
6645
+ o = 2, s(o, I()), j(o), X();
6646
6646
  },
6647
6647
  step: 3,
6648
6648
  checkoutProps: {
@@ -6653,51 +6653,52 @@ function fI(g, A, E, B, C, Q) {
6653
6653
  theme: C || "ocb",
6654
6654
  orderInfoProps: {
6655
6655
  registrationData: u,
6656
- orderId: M || "",
6657
- selectedProvider: s || { name: "", logo: "" },
6656
+ orderId: d || "",
6657
+ selectedProvider: i || { name: "", logo: "" },
6658
6658
  selectedInvoiceOtp: P || { unitsPerMonth: 0 },
6659
- selectedSignatureOtp: J || { durationYears: 0 },
6659
+ selectedSignatureOtp: Y || { durationYears: 0 },
6660
6660
  selectedPromotions: f,
6661
- totalAmountText: l,
6661
+ totalAmountText: T,
6662
6662
  onCancel: () => {
6663
- o = 2, i(o, I()), j(o), F();
6663
+ o = 2, s(o, I()), j(o), X();
6664
6664
  },
6665
- onResetToStep1: R
6665
+ onResetToStep1: x
6666
6666
  },
6667
6667
  setOrderId: (y) => {
6668
- M = y;
6668
+ d = y;
6669
6669
  }
6670
6670
  });
6671
6671
  D(b);
6672
6672
  } else if (L === 4) {
6673
6673
  const { container: b } = BI({
6674
- orderId: M || "",
6674
+ orderId: d || "",
6675
6675
  onPrev: () => {
6676
- o = 3, i(o, I()), j(o), F();
6676
+ o = 3, s(o, I()), j(o), X();
6677
6677
  },
6678
6678
  onReturnHome: A || (() => {
6679
6679
  }),
6680
6680
  theme: C || "ocb",
6681
6681
  settingUrl: (B == null ? void 0 : B.settingUrl) || "",
6682
6682
  serial: (B == null ? void 0 : B.serial) || "1C25TYY",
6683
- provider: s.route
6683
+ provider: i.route
6684
6684
  });
6685
6685
  D(b);
6686
6686
  }
6687
6687
  });
6688
6688
  }
6689
6689
  c.updateTitle(
6690
- T ? a("eInvoiceRegister") : a("eInvoiceRenewal")
6690
+ M ? a("eInvoiceRegister") : a("eInvoiceRenewal")
6691
6691
  );
6692
6692
  const { container: O, open: e } = qB();
6693
- Y && (D(O), e()), yield uB(
6694
- s.route,
6695
- (N = (d = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : d.organization) == null ? void 0 : N.taxCode,
6693
+ R && (D(O), e()), yield uB(
6694
+ i.route,
6695
+ (N = (l = u == null ? void 0 : u.eInvoiceRegistration) == null ? void 0 : l.organization) == null ? void 0 : N.taxCode,
6696
6696
  (L, b) => W(null, null, function* () {
6697
- Y = !1, T = L, U(b);
6697
+ R = !1, M = L, U(b);
6698
6698
  }),
6699
6699
  Q,
6700
- C
6700
+ C,
6701
+ (B == null ? void 0 : B.settingUrl) || ""
6701
6702
  );
6702
6703
  const h = EQ(
6703
6704
  () => {
@@ -6726,14 +6727,14 @@ function mI(g, A, E, B) {
6726
6727
  Q(c);
6727
6728
  const w = EQ(
6728
6729
  () => {
6729
- i();
6730
+ s();
6730
6731
  },
6731
6732
  { includeHash: !1 }
6732
6733
  );
6733
- function i() {
6734
+ function s() {
6734
6735
  w(), g && g.parentNode && (g.innerHTML = "");
6735
6736
  }
6736
- return { destroy: i };
6737
+ return { destroy: s };
6737
6738
  });
6738
6739
  }
6739
6740
  export {