@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.
- package/dist/{index-Cd6iwxdU.js → index-D4WgVrRp.js} +734 -740
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +57 -64
- package/dist/{widget-C-aOg7zM.js → widget-DxwfypOQ.js} +993 -992
- package/dist/widget.css +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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
|
|
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 ${
|
|
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
|
|
80
|
-
|
|
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(
|
|
91
|
-
const
|
|
92
|
-
|
|
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)),
|
|
98
|
-
B.style.width = `${
|
|
99
|
-
|
|
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
|
|
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
|
-
|
|
232
|
-
D.stopPropagation(), !Q && (I = !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
|
|
244
|
-
|
|
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,
|
|
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
|
|
280
|
-
D.dataset.checked =
|
|
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
|
-
|
|
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
|
|
300
|
-
|
|
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
|
|
304
|
-
|
|
305
|
-
const { container:
|
|
306
|
-
checked:
|
|
307
|
-
onChange: (
|
|
308
|
-
|
|
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(
|
|
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
|
|
351
|
-
if (
|
|
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
|
|
355
|
-
|
|
354
|
+
const R = document.createElement("span");
|
|
355
|
+
R.className = "wgt:text-red-500 wgt:ml-1", R.innerText = "*", u.appendChild(R);
|
|
356
356
|
}
|
|
357
|
-
|
|
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",
|
|
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
|
|
376
|
-
if (
|
|
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
|
|
380
|
-
|
|
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(
|
|
383
|
-
container:
|
|
382
|
+
return D.appendChild(i), {
|
|
383
|
+
container: s,
|
|
384
384
|
inputEl: o,
|
|
385
385
|
setError(u) {
|
|
386
|
-
u ? (
|
|
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
|
|
408
|
-
if (
|
|
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 = "*",
|
|
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
|
|
432
|
-
|
|
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
|
|
435
|
+
let R = A, M = null, d = [...E];
|
|
436
436
|
const r = () => {
|
|
437
|
-
const m = E.find((f) => f.id ? f.id ===
|
|
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 =
|
|
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 ?
|
|
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 && (
|
|
458
|
-
const
|
|
459
|
-
f.id && (
|
|
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
|
-
|
|
466
|
+
d = E.filter(
|
|
467
467
|
(v) => v.label.toLowerCase().includes(f)
|
|
468
|
-
), P(
|
|
468
|
+
), P(d), i.classList.contains("wgt:hidden") || i.classList.remove("wgt:hidden");
|
|
469
469
|
}), o.addEventListener("focus", () => {
|
|
470
|
-
|
|
470
|
+
i.classList.remove("wgt:hidden"), P();
|
|
471
471
|
}), document.addEventListener("click", (m) => {
|
|
472
|
-
D.contains(m.target) ||
|
|
472
|
+
D.contains(m.target) || i.classList.add("wgt:hidden");
|
|
473
473
|
}), o.addEventListener("keydown", (m) => {
|
|
474
|
-
m.key === "Escape" &&
|
|
475
|
-
}),
|
|
476
|
-
const
|
|
477
|
-
|
|
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),
|
|
480
|
-
}), w.appendChild(D), w.appendChild(
|
|
481
|
-
const
|
|
482
|
-
return
|
|
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:
|
|
484
|
+
selectEl: Y,
|
|
485
485
|
setError(m) {
|
|
486
|
-
m ? (
|
|
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
|
|
489
|
+
return R;
|
|
490
490
|
},
|
|
491
491
|
setValue(m, f, v) {
|
|
492
|
-
|
|
493
|
-
const
|
|
494
|
-
|
|
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),
|
|
498
|
-
|
|
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,
|
|
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,
|
|
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
|
|
529
|
-
|
|
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
|
|
532
|
-
return
|
|
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 ? (
|
|
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((
|
|
545
|
-
const
|
|
546
|
-
|
|
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
|
|
618
|
-
|
|
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
|
|
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
|
|
632
|
+
function R(r, P = 2) {
|
|
633
633
|
if (r === 0) return "0 Bytes";
|
|
634
|
-
const
|
|
635
|
-
return parseFloat((r / Math.pow(
|
|
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
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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",
|
|
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
|
|
652
|
-
|
|
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 =
|
|
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),
|
|
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 && (
|
|
665
|
-
}),
|
|
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,
|
|
671
|
+
E = r, d(r), typeof B == "function" && B(r);
|
|
672
672
|
},
|
|
673
673
|
clearFile() {
|
|
674
|
-
E = 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
|
|
762
|
-
|
|
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
|
|
767
|
+
let i = null;
|
|
768
768
|
function u(P) {
|
|
769
|
-
|
|
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
|
|
772
|
-
function
|
|
771
|
+
let R = g || null;
|
|
772
|
+
function M(P, Y = 2) {
|
|
773
773
|
if (P === 0) return "0 Bytes";
|
|
774
|
-
const
|
|
775
|
-
return parseFloat((P / Math.pow(
|
|
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
|
|
777
|
+
function d(P) {
|
|
778
778
|
n.innerHTML = "", u(null);
|
|
779
|
-
const
|
|
780
|
-
if (
|
|
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
|
-
|
|
784
|
-
}, m.readAsDataURL(P), n.appendChild(
|
|
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
|
|
793
|
-
|
|
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
|
|
798
|
-
return I.accept.split(",").map((f) => f.trim().toLowerCase()).filter(Boolean).some((f) => f.startsWith(".") ? 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
|
|
802
|
-
const P = (
|
|
803
|
-
P && (
|
|
804
|
-
}), n.addEventListener("click", () => I.click()), 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: () =>
|
|
807
|
-
getError: () =>
|
|
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,
|
|
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,
|
|
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
|
|
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
|
|
879
|
-
|
|
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 = `${
|
|
882
|
-
const
|
|
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(
|
|
894
|
+
u.append(new Option(R[q], q));
|
|
895
895
|
}), D.appendChild(u), w.append(D);
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
const
|
|
899
|
-
|
|
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 = "*",
|
|
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 = `${
|
|
904
|
-
const
|
|
905
|
-
P.append(new Option(
|
|
906
|
-
}),
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
const
|
|
910
|
-
|
|
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 = "*",
|
|
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 = `${
|
|
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:
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
const
|
|
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
|
-
|
|
936
|
-
}), v.appendChild(
|
|
937
|
-
const
|
|
938
|
-
|
|
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),
|
|
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 = `${
|
|
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 +
|
|
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,
|
|
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),
|
|
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),
|
|
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,
|
|
1040
|
-
C ? e.addEventListener(h, q, !!
|
|
1041
|
-
}, I = function(e, h, q,
|
|
1042
|
-
C ? e.removeEventListener(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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
1058
|
+
}, R = function(e) {
|
|
1059
1059
|
return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
|
|
1060
|
-
},
|
|
1061
|
-
return [31,
|
|
1062
|
-
},
|
|
1063
|
-
|
|
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
|
|
1068
|
-
for (
|
|
1069
|
-
N = e[
|
|
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
|
-
},
|
|
1072
|
-
var
|
|
1073
|
-
Q.createEvent ? (
|
|
1074
|
-
},
|
|
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
|
-
},
|
|
1172
|
+
}, k = function(e, h) {
|
|
1173
1173
|
e.setHours(0, 0, 0, 0);
|
|
1174
|
-
var q = e.getDate(),
|
|
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(
|
|
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
|
-
},
|
|
1181
|
-
var N = new Date(q, h, e), L = B ? E(N).isoWeek() :
|
|
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
|
-
},
|
|
1184
|
-
return '<tr class="pika-row' + (q ? " pick-whole-week" : "") + (
|
|
1185
|
-
},
|
|
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
|
-
},
|
|
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,
|
|
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 ===
|
|
1196
|
-
for (zA = '<div class="pika-label">' + S.i18n.months[
|
|
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 && (
|
|
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 + '">' +
|
|
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(),
|
|
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
|
|
1282
|
-
|
|
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,
|
|
1294
|
-
var
|
|
1295
|
-
h.yearRange[0] = parseInt(h.yearRange[0], 10) ||
|
|
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,
|
|
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
|
|
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 = "",
|
|
1330
|
-
if (typeof e == "string" && (e = new Date(Date.parse(e))), !!
|
|
1331
|
-
var q = this._o.minDate,
|
|
1332
|
-
|
|
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 (
|
|
1346
|
+
if (i(e)) {
|
|
1347
1347
|
if (this.calendars) {
|
|
1348
|
-
var q = new Date(this.calendars[0].year, this.calendars[0].month, 1),
|
|
1349
|
-
|
|
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(),
|
|
1359
|
-
e === "add" ? N = new Date(q.valueOf() +
|
|
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] =
|
|
1362
|
+
this.calendars[0] = T(this.calendars[0]);
|
|
1363
1363
|
for (var e = 1; e < this._o.numberOfMonths; e++)
|
|
1364
|
-
this.calendars[e] =
|
|
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 ? (
|
|
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 ? (
|
|
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,
|
|
1415
|
-
this._y <= q && (this._y = q, !isNaN(N) && this._m < N && (this._m = N)), this._y >=
|
|
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,
|
|
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,
|
|
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 +
|
|
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
|
|
1439
|
-
|
|
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 =
|
|
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 =
|
|
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:
|
|
1459
|
-
enableSelectionDaysInNextAndPreviousMonths:
|
|
1458
|
+
showDaysInNextAndPreviousMonths: l.showDaysInNextAndPreviousMonths,
|
|
1459
|
+
enableSelectionDaysInNextAndPreviousMonths: l.enableSelectionDaysInNextAndPreviousMonths
|
|
1460
1460
|
};
|
|
1461
|
-
|
|
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(
|
|
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"),
|
|
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
|
|
1575
|
-
if (
|
|
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
|
|
1727
|
-
w[
|
|
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,
|
|
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
|
-
|
|
1767
|
-
|
|
1766
|
+
Y,
|
|
1767
|
+
T,
|
|
1768
1768
|
v,
|
|
1769
|
-
|
|
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
|
|
1785
|
-
w[o] = w[o + 1] = w[o + 2] =
|
|
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
|
|
1788
|
-
return
|
|
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:
|
|
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],
|
|
1802
|
-
Q[
|
|
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),
|
|
1808
|
-
C[c] = C[c + 1] = C[c + 2] =
|
|
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],
|
|
1848
|
-
for (let
|
|
1849
|
-
for (let
|
|
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 +=
|
|
1853
|
-
|
|
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
|
|
1856
|
-
let r =
|
|
1857
|
-
P = P.map((
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1860
|
-
|
|
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((
|
|
1870
|
+
polygon_xy: r.map((x) => [x[0] * o, x[1] * i]),
|
|
1871
1871
|
quad_xy: P,
|
|
1872
|
-
padded_quad_xy:
|
|
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:
|
|
1939
|
-
|
|
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),
|
|
1943
|
-
if (
|
|
1942
|
+
), o = $Q(B, D), i = yield IE(o);
|
|
1943
|
+
if (i)
|
|
1944
1944
|
return JSON.stringify({
|
|
1945
1945
|
status: "success",
|
|
1946
|
-
data: EE(
|
|
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:
|
|
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
|
|
1987
|
-
|
|
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(
|
|
1992
|
-
let u,
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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 (
|
|
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),
|
|
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 &&
|
|
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
|
-
|
|
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),
|
|
2120
|
+
f.setError(null), J();
|
|
2121
2121
|
},
|
|
2122
2122
|
onClose: () => {
|
|
2123
|
-
f.inputEl.value ? f.setError(null) : f.setError(a("errorRequired")),
|
|
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
|
-
}),
|
|
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
|
-
|
|
2156
|
+
H.setError(a("errorRequired"));
|
|
2157
2157
|
return;
|
|
2158
2158
|
}
|
|
2159
|
-
/^\d{12}$/.test(G) ?
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
|
|
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) ?
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
|
|
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() === "" ?
|
|
2217
|
+
G.trim() === "" ? X.setError(
|
|
2218
2218
|
a("errorRequired", "Địa chỉ thường trú bắt buộc")
|
|
2219
|
-
) :
|
|
2219
|
+
) : X.setError(null);
|
|
2220
2220
|
}
|
|
2221
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
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) ?
|
|
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
|
-
}),
|
|
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
|
-
|
|
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() === "" ?
|
|
2317
|
+
G.trim() === "" ? T.setError(
|
|
2318
2318
|
a("errorRequired", "Địa chỉ liên hệ bắt buộc")
|
|
2319
|
-
) :
|
|
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:
|
|
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,
|
|
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
|
|
2411
|
-
if (u.setError(null),
|
|
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 && (
|
|
2416
|
+
JA && (d.setValue && d.setValue(
|
|
2417
2417
|
JA.value,
|
|
2418
2418
|
JA.label,
|
|
2419
2419
|
JA.id
|
|
2420
|
-
), EA.taxAuthority = JA.id || "",
|
|
2420
|
+
), EA.taxAuthority = JA.id || "", d.setDisabled(!1));
|
|
2421
2421
|
} else
|
|
2422
|
-
|
|
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 &&
|
|
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(
|
|
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),
|
|
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
|
-
|
|
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
|
-
),
|
|
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
|
-
|
|
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(),
|
|
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
|
-
|
|
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(),
|
|
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
|
-
|
|
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(
|
|
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),
|
|
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(
|
|
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),
|
|
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",
|
|
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),
|
|
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")),
|
|
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
|
|
2675
|
-
b.disabled = !vg() || !iA || _A() || hg() || q.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:
|
|
2685
|
-
address:
|
|
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:
|
|
2687
|
+
taxAuthority: d == null ? void 0 : d.getValue()
|
|
2688
2688
|
},
|
|
2689
2689
|
contactPerson: {
|
|
2690
2690
|
name: r == null ? void 0 : r.getValue(),
|
|
2691
|
-
address:
|
|
2691
|
+
address: T == null ? void 0 : T.getValue(),
|
|
2692
2692
|
email: P == null ? void 0 : P.getValue(),
|
|
2693
|
-
phone:
|
|
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:
|
|
2700
|
-
idCard:
|
|
2701
|
-
passportNumber:
|
|
2702
|
-
nationality:
|
|
2703
|
-
permanentAddress:
|
|
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:
|
|
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
|
-
|
|
2716
|
+
R,
|
|
2717
2717
|
u,
|
|
2718
|
-
|
|
2718
|
+
M,
|
|
2719
2719
|
r,
|
|
2720
2720
|
P,
|
|
2721
|
-
|
|
2722
|
-
|
|
2721
|
+
Y,
|
|
2722
|
+
T,
|
|
2723
2723
|
m,
|
|
2724
2724
|
f,
|
|
2725
|
+
k,
|
|
2725
2726
|
H,
|
|
2726
|
-
|
|
2727
|
-
F,
|
|
2727
|
+
X,
|
|
2728
2728
|
h,
|
|
2729
2729
|
e
|
|
2730
2730
|
].forEach((z) => {
|
|
2731
|
-
z.inputEl.addEventListener("input",
|
|
2732
|
-
}), [v,
|
|
2733
|
-
z.selectEl.addEventListener("change",
|
|
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",
|
|
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),
|
|
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,
|
|
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
|
|
2802
|
-
if (
|
|
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(" "),
|
|
2807
|
-
const
|
|
2808
|
-
|
|
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: (
|
|
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
|
|
2820
|
-
|
|
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(
|
|
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
|
|
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
|
|
2833
|
-
|
|
2834
|
-
const
|
|
2835
|
-
|
|
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
|
|
2842
|
-
|
|
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")}`,
|
|
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((
|
|
2875
|
-
const u =
|
|
2876
|
-
pkg:
|
|
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:
|
|
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 ? "" :
|
|
2883
|
+
typeof t == "function" && t((Q || n) && u ? "" : i._id);
|
|
2884
2884
|
}
|
|
2885
2885
|
});
|
|
2886
|
-
c.appendChild(
|
|
2886
|
+
c.appendChild(M);
|
|
2887
2887
|
});
|
|
2888
2888
|
}
|
|
2889
2889
|
w();
|
|
2890
|
-
let
|
|
2891
|
-
return c.addEventListener("mousedown", (
|
|
2892
|
-
|
|
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
|
-
|
|
2894
|
+
s = !1, c.classList.replace("wgt:cursor-grabbing", "wgt:cursor-grab");
|
|
2895
2895
|
}), c.addEventListener("mouseleave", () => {
|
|
2896
|
-
|
|
2897
|
-
}), c.addEventListener("mousemove", (
|
|
2898
|
-
if (!
|
|
2899
|
-
|
|
2900
|
-
const
|
|
2901
|
-
c.scrollLeft = o -
|
|
2902
|
-
}), c.addEventListener("wheel", (
|
|
2903
|
-
|
|
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(
|
|
2907
|
-
C =
|
|
2906
|
+
setSelectedPackageId(i) {
|
|
2907
|
+
C = i, w();
|
|
2908
2908
|
}
|
|
2909
2909
|
};
|
|
2910
2910
|
}
|
|
2911
|
-
const aE = "1.97.
|
|
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
|
|
3035
|
-
return
|
|
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
|
|
3096
|
-
return
|
|
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(" "),
|
|
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
|
|
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 (
|
|
3126
|
-
console.error("Error searching packages:",
|
|
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
|
|
3135
|
+
const s = eE({
|
|
3136
3136
|
value: "",
|
|
3137
3137
|
placeholder: a("searchUnits"),
|
|
3138
|
-
onInputChange: (
|
|
3139
|
-
E =
|
|
3138
|
+
onInputChange: (d) => {
|
|
3139
|
+
E = d.target.value.replace(/\D/g, ""), w();
|
|
3140
3140
|
}
|
|
3141
3141
|
});
|
|
3142
|
-
n.appendChild(
|
|
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
|
|
3148
|
-
D.appendChild(
|
|
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
|
-
`,
|
|
3156
|
-
function
|
|
3157
|
-
return C.find((r) => r._id ===
|
|
3155
|
+
`, i.appendChild(u);
|
|
3156
|
+
function R(d) {
|
|
3157
|
+
return C.find((r) => r._id === d) || null;
|
|
3158
3158
|
}
|
|
3159
|
-
function
|
|
3160
|
-
|
|
3159
|
+
function M() {
|
|
3160
|
+
i.contains(u) && i.removeChild(u);
|
|
3161
3161
|
}
|
|
3162
3162
|
return {
|
|
3163
3163
|
container: t,
|
|
3164
|
-
invoiceSelectorWrapper:
|
|
3165
|
-
setInvoicePackages: (
|
|
3166
|
-
C =
|
|
3164
|
+
invoiceSelectorWrapper: i,
|
|
3165
|
+
setInvoicePackages: (d) => {
|
|
3166
|
+
C = d;
|
|
3167
3167
|
},
|
|
3168
|
-
setFilteredInvoiceOptions: (
|
|
3169
|
-
Q =
|
|
3168
|
+
setFilteredInvoiceOptions: (d) => {
|
|
3169
|
+
Q = d;
|
|
3170
3170
|
},
|
|
3171
3171
|
getInvoicePackages: () => C,
|
|
3172
3172
|
getFilteredInvoiceOptions: () => Q,
|
|
3173
|
-
findInvoiceById:
|
|
3174
|
-
removeLoading:
|
|
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:
|
|
3281
|
+
selectedProvider: s,
|
|
3282
3282
|
selectedPromotions: D,
|
|
3283
3283
|
registrationData: o,
|
|
3284
|
-
setSelectedPromotions:
|
|
3284
|
+
setSelectedPromotions: i,
|
|
3285
3285
|
setPackages: u,
|
|
3286
|
-
setPromotionCodes:
|
|
3287
|
-
isNewCustomer:
|
|
3288
|
-
savedQuantities:
|
|
3286
|
+
setPromotionCodes: R,
|
|
3287
|
+
isNewCustomer: M,
|
|
3288
|
+
savedQuantities: d,
|
|
3289
3289
|
setSavedQuantities: r
|
|
3290
3290
|
}) {
|
|
3291
|
-
let
|
|
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:
|
|
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:
|
|
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:
|
|
3324
|
-
typedUnits:
|
|
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(!
|
|
3331
|
-
DC(!
|
|
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
|
-
|
|
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 =
|
|
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),
|
|
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:
|
|
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: !
|
|
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 ===
|
|
3404
|
+
(gA) => gA._id === T
|
|
3405
3405
|
), CA = v.find(
|
|
3406
3406
|
(gA) => gA._id === m
|
|
3407
3407
|
);
|
|
3408
|
-
if (
|
|
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
|
-
|
|
3414
|
-
quantity:
|
|
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),
|
|
3418
|
-
qtyRegFee:
|
|
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: !
|
|
3442
|
+
iE({ bank: w, hasRenew: !M }),
|
|
3443
3443
|
sE({ bank: w })
|
|
3444
3444
|
]);
|
|
3445
|
-
if (_.status === "fulfilled" ?
|
|
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
|
-
),
|
|
3451
|
-
V.codes.length > 0 && (
|
|
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(
|
|
3467
|
-
(V) =>
|
|
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 =
|
|
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) =>
|
|
3472
|
+
(aA) => F.includes(aA.code)
|
|
3473
3473
|
);
|
|
3474
|
-
|
|
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) =>
|
|
3487
|
+
(p) => F.includes(p.code)
|
|
3488
3488
|
);
|
|
3489
|
-
|
|
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(
|
|
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(
|
|
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:
|
|
3539
|
+
disCountedPackages: F,
|
|
3540
3540
|
promotion: a("discount"),
|
|
3541
|
-
selectedPackageId:
|
|
3542
|
-
isRenew: !
|
|
3541
|
+
selectedPackageId: T,
|
|
3542
|
+
isRenew: !M,
|
|
3543
3543
|
handlePackageSelect: (K) => {
|
|
3544
3544
|
var _, QA;
|
|
3545
3545
|
let CA = (_ = S().find(
|
|
3546
|
-
(gA) => gA._id ===
|
|
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
|
-
|
|
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:
|
|
3564
|
+
disCountedPackages: F,
|
|
3565
3565
|
promotion: a("gift"),
|
|
3566
3566
|
selectedPackageId: m,
|
|
3567
|
-
allowDeselect: !
|
|
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 (!
|
|
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 ===
|
|
3592
|
+
(CA) => CA._id === T
|
|
3593
3593
|
);
|
|
3594
|
-
if (
|
|
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
|
-
|
|
3599
|
+
k[0].price
|
|
3600
3600
|
)} VND`,
|
|
3601
3601
|
required: !0,
|
|
3602
|
-
description:
|
|
3602
|
+
description: k[0][Hg(ag())],
|
|
3603
3603
|
// getCurrentLanguage() === "vi"
|
|
3604
3604
|
// ? initPackages[0].name
|
|
3605
3605
|
// : initPackages[0].nameEn,
|
|
3606
|
-
isChecked:
|
|
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 ===
|
|
3615
|
+
(Z) => Z._id === T
|
|
3616
3616
|
), CA = v.find(
|
|
3617
3617
|
(Z) => Z._id === m
|
|
3618
3618
|
);
|
|
3619
|
-
Object.keys(
|
|
3620
|
-
const _ =
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
3710
|
-
|
|
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(
|
|
3714
|
+
`, tA.appendChild(J), c(0);
|
|
3715
3715
|
return;
|
|
3716
3716
|
}
|
|
3717
3717
|
const K = S().find(
|
|
3718
|
-
(
|
|
3718
|
+
(J) => J._id === T
|
|
3719
3719
|
);
|
|
3720
|
-
if (
|
|
3721
|
-
const
|
|
3722
|
-
|
|
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" ?
|
|
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"),
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
3740
|
-
}), oA.appendChild(eA), MA.appendChild(oA),
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
3756
|
+
((Qg = k[0]) == null ? void 0 : Qg.price) * X
|
|
3757
3757
|
)} VND</span>
|
|
3758
3758
|
</div>
|
|
3759
|
-
`, BA.appendChild(TA), tA.appendChild(
|
|
3759
|
+
`, BA.appendChild(TA), tA.appendChild(J);
|
|
3760
3760
|
}
|
|
3761
3761
|
{
|
|
3762
|
-
const
|
|
3763
|
-
if (
|
|
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 =
|
|
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 =
|
|
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 = (
|
|
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 * (
|
|
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 * (
|
|
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 * (
|
|
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 * (
|
|
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
|
|
3810
|
-
if (
|
|
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 =
|
|
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((
|
|
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((
|
|
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
|
-
(
|
|
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
|
-
(
|
|
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
|
-
(
|
|
3855
|
-
(BA) => BA.code ===
|
|
3854
|
+
(J) => Object.values(H).find(
|
|
3855
|
+
(BA) => BA.code === J && BA.bank === w
|
|
3856
3856
|
)
|
|
3857
|
-
).filter((
|
|
3857
|
+
).filter((J) => J !== void 0);
|
|
3858
3858
|
let Z = 0;
|
|
3859
|
-
CA.length > 0 && CA.forEach((
|
|
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">${
|
|
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",
|
|
3874
|
-
(cA =
|
|
3875
|
-
)} VND`, oA.style.color = "#F04438", Z += (wA =
|
|
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 =
|
|
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 _ =
|
|
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
|
|
3883
|
-
|
|
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"),
|
|
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",
|
|
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"),
|
|
3908
|
-
|
|
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((
|
|
3913
|
-
const
|
|
3914
|
-
|
|
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
|
|
3917
|
-
|
|
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",
|
|
3920
|
-
const
|
|
3921
|
-
|
|
3922
|
-
const
|
|
3923
|
-
|
|
3924
|
-
}), D.appendChild(
|
|
3925
|
-
const
|
|
3926
|
-
|
|
3927
|
-
const
|
|
3928
|
-
|
|
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>`,
|
|
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>`,
|
|
3937
|
-
const
|
|
3938
|
-
|
|
3939
|
-
const
|
|
3940
|
-
m.className = "wgt:text-lg wgt:font-semibold wgt:text-gray-800 wgt:mb-4", m.innerText = a("paymentInstructionsTitle"),
|
|
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((
|
|
3943
|
-
const
|
|
3944
|
-
|
|
3945
|
-
const
|
|
3946
|
-
|
|
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(
|
|
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 =
|
|
3953
|
-
}),
|
|
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
|
|
3957
|
-
return
|
|
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(
|
|
3960
|
-
|
|
3961
|
-
const
|
|
3962
|
-
|
|
3963
|
-
})),
|
|
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">${
|
|
3965
|
+
)}: <span class="wgt:font-medium">${H.accountNumber}</span>`), H.bankName != null && (P.innerHTML = `${a(
|
|
3966
3966
|
"beneficiaryBank"
|
|
3967
|
-
)}: <span class="wgt:font-medium">${
|
|
3968
|
-
const
|
|
3969
|
-
|
|
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(
|
|
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 =
|
|
3978
|
-
})),
|
|
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
|
|
4030
|
-
|
|
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
|
-
|
|
4035
|
+
s.innerHTML = `${a(
|
|
4036
4036
|
"completePaymentIn"
|
|
4037
4037
|
)} <span class="wgt:font-bold">${D(I)}</span>`;
|
|
4038
4038
|
};
|
|
4039
4039
|
o();
|
|
4040
|
-
const
|
|
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
|
-
|
|
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
|
|
4060
|
-
|
|
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
|
|
4069
|
-
|
|
4070
|
-
const
|
|
4071
|
-
|
|
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
|
|
4077
|
-
g && g.logoUrl && (
|
|
4078
|
-
const
|
|
4079
|
-
|
|
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)}` : "",
|
|
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
|
|
4087
|
-
|
|
4088
|
-
const
|
|
4089
|
-
if (
|
|
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
|
|
4097
|
-
|
|
4098
|
-
}), O.appendChild(e), O.appendChild(h),
|
|
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
|
|
4101
|
-
|
|
4102
|
-
const
|
|
4103
|
-
|
|
4104
|
-
const
|
|
4105
|
-
|
|
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,
|
|
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
|
|
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,
|
|
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 = (
|
|
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(),
|
|
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
|
|
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(
|
|
4393
|
-
o === c ? n++ : (n >= 5 && (t += A.N1 + (n - 5)), c = o, n = 1), o = C.get(D,
|
|
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,
|
|
4981
|
+
function I(D, o, i) {
|
|
4982
4982
|
for (let u = 1; u <= 40; u++)
|
|
4983
|
-
if (o <= g.getCapacity(u,
|
|
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
|
|
4990
|
+
let i = 0;
|
|
4991
4991
|
return D.forEach(function(u) {
|
|
4992
|
-
const
|
|
4993
|
-
|
|
4994
|
-
}),
|
|
4992
|
+
const R = c(u.mode, o);
|
|
4993
|
+
i += R + u.getBitsLength();
|
|
4994
|
+
}), i;
|
|
4995
4995
|
}
|
|
4996
|
-
function
|
|
4997
|
-
for (let
|
|
4998
|
-
if (w(D,
|
|
4999
|
-
return
|
|
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,
|
|
5002
|
-
return Q.isValid(o) ? parseInt(o, 10) :
|
|
5003
|
-
}, g.getCapacity = function(o,
|
|
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
|
|
5008
|
-
if (u === C.MIXED) return
|
|
5009
|
-
const r =
|
|
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,
|
|
5021
|
+
}, g.getBestVersionForData = function(o, i) {
|
|
5022
5022
|
let u;
|
|
5023
|
-
const
|
|
5023
|
+
const R = B.from(i, B.M);
|
|
5024
5024
|
if (Array.isArray(o)) {
|
|
5025
5025
|
if (o.length > 1)
|
|
5026
|
-
return
|
|
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(),
|
|
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
|
|
5037
|
-
for (; A.getBCHDigit(
|
|
5038
|
-
|
|
5039
|
-
return o << 12 |
|
|
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,
|
|
5207
|
-
I = n.pop(), c = I.value,
|
|
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],
|
|
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
|
|
5213
|
-
throw new Error(
|
|
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(
|
|
5270
|
-
return unescape(encodeURIComponent(
|
|
5269
|
+
function c(M) {
|
|
5270
|
+
return unescape(encodeURIComponent(M)).length;
|
|
5271
5271
|
}
|
|
5272
|
-
function w(
|
|
5272
|
+
function w(M, d, r) {
|
|
5273
5273
|
const P = [];
|
|
5274
|
-
let
|
|
5275
|
-
for (; (
|
|
5274
|
+
let Y;
|
|
5275
|
+
for (; (Y = M.exec(r)) !== null; )
|
|
5276
5276
|
P.push({
|
|
5277
|
-
data:
|
|
5278
|
-
index:
|
|
5279
|
-
mode:
|
|
5280
|
-
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
|
|
5285
|
-
const
|
|
5286
|
-
let P,
|
|
5287
|
-
return n.isKanjiModeEnabled() ? (P = w(t.BYTE, A.BYTE,
|
|
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(
|
|
5298
|
-
switch (
|
|
5297
|
+
function D(M, d) {
|
|
5298
|
+
switch (d) {
|
|
5299
5299
|
case A.NUMERIC:
|
|
5300
|
-
return E.getBitsLength(
|
|
5300
|
+
return E.getBitsLength(M);
|
|
5301
5301
|
case A.ALPHANUMERIC:
|
|
5302
|
-
return B.getBitsLength(
|
|
5302
|
+
return B.getBitsLength(M);
|
|
5303
5303
|
case A.KANJI:
|
|
5304
|
-
return Q.getBitsLength(
|
|
5304
|
+
return Q.getBitsLength(M);
|
|
5305
5305
|
case A.BYTE:
|
|
5306
|
-
return C.getBitsLength(
|
|
5306
|
+
return C.getBitsLength(M);
|
|
5307
5307
|
}
|
|
5308
5308
|
}
|
|
5309
|
-
function o(
|
|
5310
|
-
return
|
|
5311
|
-
const P =
|
|
5312
|
-
return P && P.mode === r.mode ? (
|
|
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
|
|
5316
|
-
const
|
|
5317
|
-
for (let r = 0; r <
|
|
5318
|
-
const P =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
5340
|
+
d.push([
|
|
5341
5341
|
{ data: P.data, mode: A.BYTE, length: c(P.data) }
|
|
5342
5342
|
]);
|
|
5343
5343
|
}
|
|
5344
5344
|
}
|
|
5345
|
-
return
|
|
5345
|
+
return d;
|
|
5346
5346
|
}
|
|
5347
|
-
function u(
|
|
5347
|
+
function u(M, d) {
|
|
5348
5348
|
const r = {}, P = { start: {} };
|
|
5349
|
-
let
|
|
5350
|
-
for (let
|
|
5351
|
-
const m = T
|
|
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
|
|
5354
|
-
f.push(
|
|
5355
|
-
for (let
|
|
5356
|
-
const
|
|
5357
|
-
r[
|
|
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
|
-
|
|
5360
|
+
Y = f;
|
|
5361
5361
|
}
|
|
5362
|
-
for (let
|
|
5363
|
-
P[
|
|
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
|
|
5366
|
+
function R(M, d) {
|
|
5367
5367
|
let r;
|
|
5368
|
-
const P = A.getBestModeForData(
|
|
5369
|
-
if (r = A.from(
|
|
5370
|
-
throw new Error('"' +
|
|
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(
|
|
5374
|
+
return new E(M);
|
|
5375
5375
|
case A.ALPHANUMERIC:
|
|
5376
|
-
return new B(
|
|
5376
|
+
return new B(M);
|
|
5377
5377
|
case A.KANJI:
|
|
5378
|
-
return new Q(
|
|
5378
|
+
return new Q(M);
|
|
5379
5379
|
case A.BYTE:
|
|
5380
|
-
return new C(
|
|
5380
|
+
return new C(M);
|
|
5381
5381
|
}
|
|
5382
5382
|
}
|
|
5383
|
-
g.fromArray = function(
|
|
5384
|
-
return
|
|
5385
|
-
return typeof P == "string" ? r.push(
|
|
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(
|
|
5388
|
-
const P =
|
|
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(
|
|
5390
|
+
f.push(T.table[m[v]].node);
|
|
5391
5391
|
return g.fromArray(o(f));
|
|
5392
|
-
}, g.rawSplit = function(
|
|
5392
|
+
}, g.rawSplit = function(d) {
|
|
5393
5393
|
return g.fromArray(
|
|
5394
|
-
|
|
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(),
|
|
5404
|
-
function o(
|
|
5405
|
-
const f =
|
|
5406
|
-
for (let
|
|
5407
|
-
const
|
|
5408
|
-
for (let
|
|
5409
|
-
if (!(
|
|
5410
|
-
for (let
|
|
5411
|
-
|
|
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
|
|
5415
|
-
const m =
|
|
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
|
-
|
|
5418
|
+
T.set(f, 6, v, !0), T.set(6, f, v, !0);
|
|
5419
5419
|
}
|
|
5420
5420
|
}
|
|
5421
|
-
function u(
|
|
5421
|
+
function u(T, m) {
|
|
5422
5422
|
const f = C.getPositions(m);
|
|
5423
5423
|
for (let v = 0; v < f.length; v++) {
|
|
5424
|
-
const
|
|
5425
|
-
for (let
|
|
5426
|
-
for (let
|
|
5427
|
-
|
|
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
|
|
5431
|
-
const f =
|
|
5432
|
-
let
|
|
5433
|
-
for (let
|
|
5434
|
-
|
|
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
|
|
5437
|
-
const v =
|
|
5438
|
-
let
|
|
5439
|
-
for (
|
|
5440
|
-
|
|
5441
|
-
|
|
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
|
|
5444
|
-
const f =
|
|
5445
|
-
let v = -1,
|
|
5446
|
-
for (let
|
|
5447
|
-
for (
|
|
5448
|
-
for (let
|
|
5449
|
-
if (!
|
|
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
|
-
|
|
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 (
|
|
5454
|
-
|
|
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(
|
|
5459
|
+
function r(T, m, f) {
|
|
5460
5460
|
const v = new E();
|
|
5461
|
-
f.forEach(function(
|
|
5462
|
-
v.put(
|
|
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
|
|
5465
|
-
for (v.getLengthInBits() + 4 <=
|
|
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
|
|
5468
|
-
for (let
|
|
5469
|
-
v.put(
|
|
5470
|
-
return P(v,
|
|
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(
|
|
5473
|
-
const v = g.getSymbolTotalCodewords(m),
|
|
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
|
|
5475
|
+
const l = new Array(F), N = new Array(F);
|
|
5476
5476
|
let L = 0;
|
|
5477
|
-
const b = new Uint8Array(
|
|
5478
|
-
for (let nA = 0; nA <
|
|
5479
|
-
const uA = nA <
|
|
5480
|
-
|
|
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 <
|
|
5486
|
-
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 <
|
|
5488
|
+
for (IA = 0; IA < F; IA++)
|
|
5489
5489
|
y[AA++] = N[IA][S];
|
|
5490
5490
|
return y;
|
|
5491
5491
|
}
|
|
5492
|
-
function
|
|
5493
|
-
let
|
|
5494
|
-
if (Array.isArray(
|
|
5495
|
-
|
|
5496
|
-
else if (typeof
|
|
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(
|
|
5499
|
+
const j = D.rawSplit(T);
|
|
5500
5500
|
U = c.getBestVersionForData(j, f);
|
|
5501
5501
|
}
|
|
5502
|
-
|
|
5502
|
+
k = D.fromString(T, U || 40);
|
|
5503
5503
|
} else
|
|
5504
5504
|
throw new Error("Invalid data");
|
|
5505
|
-
const
|
|
5506
|
-
if (!
|
|
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 =
|
|
5510
|
-
else if (m <
|
|
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: ` +
|
|
5514
|
+
Minimum version required to store current data is: ` + H + `.
|
|
5515
5515
|
`
|
|
5516
5516
|
);
|
|
5517
|
-
const
|
|
5518
|
-
return o(
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
)), t.applyMask(v,
|
|
5522
|
-
modules:
|
|
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:
|
|
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,
|
|
5533
|
-
return typeof f != "undefined" && (v = A.from(f.errorCorrectionLevel, A.M),
|
|
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,
|
|
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
|
|
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
|
|
5583
|
-
u =
|
|
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[
|
|
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),
|
|
5608
|
-
return A.qrToImageData(D.data, Q, I), E(
|
|
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",
|
|
5613
|
-
return c.toDataURL(w,
|
|
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
|
|
5633
|
-
const D = Math.floor(
|
|
5634
|
-
!D && !c && (c = !0), C[
|
|
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,
|
|
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,
|
|
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),
|
|
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 (
|
|
5654
|
+
if (s < 2)
|
|
5655
5655
|
throw new Error("Too few arguments provided");
|
|
5656
|
-
|
|
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 (
|
|
5658
|
+
if (s < 1)
|
|
5659
5659
|
throw new Error("Too few arguments provided");
|
|
5660
|
-
return
|
|
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
|
-
|
|
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,
|
|
5693
|
-
const
|
|
5694
|
-
|
|
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:
|
|
5698
|
-
close:
|
|
5697
|
+
open: R,
|
|
5698
|
+
close: M
|
|
5699
5699
|
} = qB();
|
|
5700
|
-
|
|
5701
|
-
const
|
|
5702
|
-
|
|
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"),
|
|
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:
|
|
5711
|
+
instructions: Y,
|
|
5712
5712
|
theme: t
|
|
5713
5713
|
}));
|
|
5714
|
-
r.appendChild(
|
|
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
|
-
|
|
5722
|
-
const
|
|
5723
|
-
|
|
5724
|
-
const
|
|
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
|
-
|
|
5733
|
-
function
|
|
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 !==
|
|
5751
|
-
} catch (
|
|
5752
|
-
console.error("Error creating 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
|
-
|
|
5755
|
+
M();
|
|
5756
5756
|
}
|
|
5757
5757
|
});
|
|
5758
5758
|
}
|
|
5759
|
-
function
|
|
5759
|
+
function x(O) {
|
|
5760
5760
|
return W(this, null, function* () {
|
|
5761
|
-
var e, h, q,
|
|
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,
|
|
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
|
|
5801
|
+
D = !1, yield F();
|
|
5802
5802
|
return;
|
|
5803
|
-
} else if (((q = N.response) == null ? void 0 : q.status) === 401 || ((
|
|
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
|
-
|
|
5820
|
+
M(), D = !1;
|
|
5821
5821
|
}
|
|
5822
5822
|
});
|
|
5823
5823
|
}
|
|
5824
|
-
|
|
5825
|
-
let
|
|
5824
|
+
s && (yield x(s));
|
|
5825
|
+
let X = !1;
|
|
5826
5826
|
function U() {
|
|
5827
|
-
|
|
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(
|
|
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"),
|
|
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
|
-
|
|
5846
|
+
i.appendChild(l.container), l.open();
|
|
5846
5847
|
} catch (h) {
|
|
5847
|
-
!navigator.onLine || !h.response ? (
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
5900
|
-
|
|
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
|
|
5906
|
-
|
|
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"),
|
|
5909
|
-
const
|
|
5910
|
-
|
|
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.
|
|
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
|
-
`,
|
|
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")} `,
|
|
5935
|
-
const
|
|
5936
|
-
|
|
5937
|
-
const
|
|
5938
|
-
|
|
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
|
-
`,
|
|
5955
|
+
`, Y.appendChild(T);
|
|
5955
5956
|
const m = document.createElement("span");
|
|
5956
|
-
m.innerHTML = `${a("email")}: <b>${(r == null ? void 0 : r.email) || ""}</b>`,
|
|
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",
|
|
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
|
|
5973
|
-
|
|
5974
|
-
const
|
|
5975
|
-
|
|
5976
|
-
const
|
|
5977
|
-
|
|
5978
|
-
const
|
|
5979
|
-
|
|
5980
|
-
const
|
|
5981
|
-
|
|
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
|
|
6167
|
-
M-Invoice.`,
|
|
6168
|
-
document.querySelectorAll('[data-wgt-warning-popup="true"]').forEach((
|
|
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
|
-
|
|
6171
|
-
} catch (
|
|
6172
|
+
x.remove();
|
|
6173
|
+
} catch (X) {
|
|
6172
6174
|
}
|
|
6173
6175
|
});
|
|
6174
|
-
const
|
|
6175
|
-
|
|
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
|
-
`,
|
|
6185
|
-
const
|
|
6186
|
-
if (
|
|
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
|
-
`,
|
|
6196
|
-
const
|
|
6197
|
-
|
|
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
|
-
`,
|
|
6215
|
+
`, x.addEventListener(
|
|
6214
6216
|
"mouseenter",
|
|
6215
|
-
() =>
|
|
6216
|
-
),
|
|
6217
|
+
() => x.style.color = "#374151"
|
|
6218
|
+
), x.addEventListener(
|
|
6217
6219
|
"mouseleave",
|
|
6218
|
-
() =>
|
|
6219
|
-
),
|
|
6220
|
-
B ||
|
|
6221
|
-
}),
|
|
6220
|
+
() => x.style.color = "#6b7280"
|
|
6221
|
+
), x.addEventListener("click", () => {
|
|
6222
|
+
B || F(!1);
|
|
6223
|
+
}), o.appendChild(x);
|
|
6222
6224
|
}
|
|
6223
|
-
const
|
|
6224
|
-
|
|
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
|
-
`,
|
|
6229
|
-
const
|
|
6230
|
-
|
|
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
|
-
`,
|
|
6234
|
-
const
|
|
6235
|
-
|
|
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
|
-
`,
|
|
6245
|
-
const
|
|
6246
|
-
|
|
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
|
-
`,
|
|
6253
|
-
const
|
|
6254
|
-
|
|
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
|
-
`,
|
|
6259
|
-
const
|
|
6260
|
-
|
|
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: ${
|
|
6272
|
+
background-color: ${w};
|
|
6271
6273
|
transition: opacity 0.2s ease;
|
|
6272
|
-
`,
|
|
6274
|
+
`, r.addEventListener(
|
|
6273
6275
|
"mouseenter",
|
|
6274
|
-
() =>
|
|
6275
|
-
),
|
|
6276
|
+
() => r.style.opacity = "0.9"
|
|
6277
|
+
), r.addEventListener(
|
|
6276
6278
|
"mouseleave",
|
|
6277
|
-
() =>
|
|
6278
|
-
),
|
|
6279
|
+
() => r.style.opacity = "1"
|
|
6280
|
+
), r.addEventListener(
|
|
6279
6281
|
"focus",
|
|
6280
|
-
() =>
|
|
6281
|
-
),
|
|
6282
|
-
const
|
|
6283
|
-
|
|
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
|
-
`,
|
|
6296
|
-
|
|
6297
|
-
}),
|
|
6298
|
-
|
|
6299
|
-
}),
|
|
6300
|
-
let
|
|
6301
|
-
const
|
|
6302
|
-
|
|
6303
|
-
},
|
|
6304
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6315
|
+
Y || (Y = !0, document.body.appendChild(D), D.style.display = "flex", setTimeout(() => r.focus(), 0), v());
|
|
6314
6316
|
}
|
|
6315
|
-
function x
|
|
6316
|
-
if (!(!
|
|
6317
|
-
|
|
6317
|
+
function F(x = !1) {
|
|
6318
|
+
if (!(!Y || T)) {
|
|
6319
|
+
T = !0, Y = !1, k();
|
|
6318
6320
|
try {
|
|
6319
|
-
|
|
6320
|
-
} catch (
|
|
6321
|
+
D.remove();
|
|
6322
|
+
} catch (X) {
|
|
6321
6323
|
}
|
|
6322
|
-
|
|
6324
|
+
x ? C ? window.location.href = C : typeof g == "function" && g() : !x && typeof A == "function" && A();
|
|
6323
6325
|
}
|
|
6324
6326
|
}
|
|
6325
|
-
return { container:
|
|
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
|
|
6335
|
-
let
|
|
6337
|
+
const I = yield RQ(g, A, "HDTT");
|
|
6338
|
+
let c = null;
|
|
6336
6339
|
if (B) {
|
|
6337
|
-
E(
|
|
6340
|
+
E(I.isNewCustomer, null);
|
|
6338
6341
|
return;
|
|
6339
6342
|
}
|
|
6340
|
-
if (!
|
|
6341
|
-
|
|
6342
|
-
|
|
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 (
|
|
6357
|
-
console.error("Error checking new customer:",
|
|
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
|
|
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:
|
|
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,
|
|
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
|
|
6411
|
-
provider:
|
|
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
|
-
},
|
|
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
|
|
6424
|
-
|
|
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:
|
|
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
|
-
},
|
|
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
|
|
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
|
|
6512
|
-
|
|
6510
|
+
function x() {
|
|
6511
|
+
H(), o = 1, s(o, I()), j(o);
|
|
6513
6512
|
}
|
|
6514
|
-
function
|
|
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 &&
|
|
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:
|
|
6539
|
+
selectedRoute: i.route,
|
|
6541
6540
|
onProviderChange: (y) => W(null, null, function* () {
|
|
6542
6541
|
var AA, S;
|
|
6543
|
-
|
|
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
|
-
|
|
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:
|
|
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 =
|
|
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,
|
|
6596
|
+
o = 3, s(o, I()), j(o), X();
|
|
6597
6597
|
}),
|
|
6598
6598
|
onPrev: () => {
|
|
6599
|
-
o = 1,
|
|
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
|
-
|
|
6608
|
+
Y = y;
|
|
6609
6609
|
},
|
|
6610
6610
|
setOrderId: (y) => {
|
|
6611
|
-
|
|
6611
|
+
d = y;
|
|
6612
6612
|
},
|
|
6613
6613
|
setTotalAmount: (y) => {
|
|
6614
|
-
|
|
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:
|
|
6627
|
+
selectedSignatureOtp: Y,
|
|
6628
6628
|
selectedPromotions: f,
|
|
6629
6629
|
theme: C,
|
|
6630
|
-
selectedProvider:
|
|
6630
|
+
selectedProvider: i,
|
|
6631
6631
|
registrationData: u,
|
|
6632
|
-
isNewCustomer:
|
|
6633
|
-
savedQuantities:
|
|
6632
|
+
isNewCustomer: M,
|
|
6633
|
+
savedQuantities: k,
|
|
6634
6634
|
setSavedQuantities: (y) => {
|
|
6635
|
-
|
|
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,
|
|
6642
|
+
o = 4, s(o, I()), j(o), X();
|
|
6643
6643
|
},
|
|
6644
6644
|
onPrev: () => {
|
|
6645
|
-
o = 2,
|
|
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:
|
|
6657
|
-
selectedProvider:
|
|
6656
|
+
orderId: d || "",
|
|
6657
|
+
selectedProvider: i || { name: "", logo: "" },
|
|
6658
6658
|
selectedInvoiceOtp: P || { unitsPerMonth: 0 },
|
|
6659
|
-
selectedSignatureOtp:
|
|
6659
|
+
selectedSignatureOtp: Y || { durationYears: 0 },
|
|
6660
6660
|
selectedPromotions: f,
|
|
6661
|
-
totalAmountText:
|
|
6661
|
+
totalAmountText: T,
|
|
6662
6662
|
onCancel: () => {
|
|
6663
|
-
o = 2,
|
|
6663
|
+
o = 2, s(o, I()), j(o), X();
|
|
6664
6664
|
},
|
|
6665
|
-
onResetToStep1:
|
|
6665
|
+
onResetToStep1: x
|
|
6666
6666
|
},
|
|
6667
6667
|
setOrderId: (y) => {
|
|
6668
|
-
|
|
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:
|
|
6674
|
+
orderId: d || "",
|
|
6675
6675
|
onPrev: () => {
|
|
6676
|
-
o = 3,
|
|
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:
|
|
6683
|
+
provider: i.route
|
|
6684
6684
|
});
|
|
6685
6685
|
D(b);
|
|
6686
6686
|
}
|
|
6687
6687
|
});
|
|
6688
6688
|
}
|
|
6689
6689
|
c.updateTitle(
|
|
6690
|
-
|
|
6690
|
+
M ? a("eInvoiceRegister") : a("eInvoiceRenewal")
|
|
6691
6691
|
);
|
|
6692
6692
|
const { container: O, open: e } = qB();
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
(N = (
|
|
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
|
-
|
|
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
|
-
|
|
6730
|
+
s();
|
|
6730
6731
|
},
|
|
6731
6732
|
{ includeHash: !1 }
|
|
6732
6733
|
);
|
|
6733
|
-
function
|
|
6734
|
+
function s() {
|
|
6734
6735
|
w(), g && g.parentNode && (g.innerHTML = "");
|
|
6735
6736
|
}
|
|
6736
|
-
return { destroy:
|
|
6737
|
+
return { destroy: s };
|
|
6737
6738
|
});
|
|
6738
6739
|
}
|
|
6739
6740
|
export {
|