@atomsolution/invoice-widget 1.67.1 → 1.67.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ var TI = Object.defineProperty, HI = Object.defineProperties;
|
|
|
2
2
|
var kI = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var Sg = Object.getOwnPropertySymbols;
|
|
4
4
|
var jB = Object.prototype.hasOwnProperty, KB = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var Hg = (A, g) => (g = Symbol[A]) ? g : Symbol.for("Symbol." + A), YI = (A) => {
|
|
6
6
|
throw TypeError(A);
|
|
7
7
|
};
|
|
8
8
|
var bB = (A, g, B) => g in A ? TI(A, g, { enumerable: !0, configurable: !0, writable: !0, value: B }) : A[g] = B, qA = (A, g) => {
|
|
@@ -37,37 +37,37 @@ var p = (A, g, B) => new Promise((C, Q) => {
|
|
|
37
37
|
}
|
|
38
38
|
}, n = (t) => t.done ? C(t.value) : Promise.resolve(t.value).then(I, E);
|
|
39
39
|
n((B = B.apply(A, g)).next());
|
|
40
|
-
}),
|
|
40
|
+
}), Dg = function(A, g) {
|
|
41
41
|
this[0] = A, this[1] = g;
|
|
42
42
|
}, sC = (A, g, B) => {
|
|
43
43
|
var C = (E, n, t, c) => {
|
|
44
44
|
try {
|
|
45
|
-
var h = B[E](n), a = (n = h.value) instanceof
|
|
45
|
+
var h = B[E](n), a = (n = h.value) instanceof Dg, e = h.done;
|
|
46
46
|
Promise.resolve(a ? n[0] : n).then((w) => a ? C(E === "return" ? E : "next", n[1] ? { done: w.done, value: w.value } : w, t, c) : t({ value: w, done: e })).catch((w) => C("throw", w, t, c));
|
|
47
47
|
} catch (w) {
|
|
48
48
|
c(w);
|
|
49
49
|
}
|
|
50
50
|
}, Q = (E) => I[E] = (n) => new Promise((t, c) => C(E, n, t, c)), I = {};
|
|
51
|
-
return B = B.apply(A, g), I[
|
|
51
|
+
return B = B.apply(A, g), I[Hg("asyncIterator")] = () => I, Q("next"), Q("throw"), Q("return"), I;
|
|
52
52
|
}, DC = (A) => {
|
|
53
|
-
var g = A[
|
|
54
|
-
return g == null ? (g = A[
|
|
53
|
+
var g = A[Hg("asyncIterator")], B = !1, C, Q = {};
|
|
54
|
+
return g == null ? (g = A[Hg("iterator")](), C = (I) => Q[I] = (E) => g[I](E)) : (g = g.call(A), C = (I) => Q[I] = (E) => {
|
|
55
55
|
if (B) {
|
|
56
56
|
if (B = !1, I === "throw") throw E;
|
|
57
57
|
return E;
|
|
58
58
|
}
|
|
59
59
|
return B = !0, {
|
|
60
60
|
done: !1,
|
|
61
|
-
value: new
|
|
61
|
+
value: new Dg(new Promise((n) => {
|
|
62
62
|
var t = g[I](E);
|
|
63
63
|
t instanceof Object || YI("Object expected"), n(t);
|
|
64
64
|
}), 1)
|
|
65
65
|
};
|
|
66
|
-
}), Q[
|
|
66
|
+
}), Q[Hg("iterator")] = () => Q, C("next"), "throw" in g ? C("throw") : Q.throw = (I) => {
|
|
67
67
|
throw I;
|
|
68
68
|
}, "return" in g && C("return"), Q;
|
|
69
|
-
}, SB = (A, g, B) => (g = A[
|
|
70
|
-
import { t as u, g as $C, a as AB, b as
|
|
69
|
+
}, SB = (A, g, B) => (g = A[Hg("asyncIterator")]) ? g.call(A) : (A = A[Hg("iterator")](), g = {}, B = (C, Q) => (Q = A[C]) && (g[C] = (I) => new Promise((E, n, t) => (I = Q.call(A, I), t = I.done, Promise.resolve(I.value).then((c) => E({ value: c, done: t }), n)))), B("next"), B("return"), g);
|
|
70
|
+
import { t as u, g as $C, a as AB, b as Eg, c as RI, m as xI, d as GI, f as zI, v as XI, r as yQ, u as bQ } from "./index-mz6qiFK8.js";
|
|
71
71
|
import { g as jQ } from "./_commonjsHelpers-bAxELxBV.js";
|
|
72
72
|
function UB({ steps: A = [], currentStep: g = 1 } = {}) {
|
|
73
73
|
const B = document.createElement("div");
|
|
@@ -575,7 +575,7 @@ function rC({
|
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function ng({
|
|
579
579
|
title: A,
|
|
580
580
|
isDisabled: g = !1,
|
|
581
581
|
handleClick: B = null,
|
|
@@ -645,7 +645,7 @@ function pB({
|
|
|
645
645
|
function s(m) {
|
|
646
646
|
w = m, m ? (e.innerText = m, e.style.display = "block") : (e.innerText = "", e.style.display = "none");
|
|
647
647
|
}
|
|
648
|
-
const D =
|
|
648
|
+
const D = ng({
|
|
649
649
|
title: "Upload file",
|
|
650
650
|
className: "wgt:bg-primary wgt:hover:bg-primary-dark wgt:text-white wgt:px-6 wgt:py-1 wgt:rounded-md wgt:cursor-pointer",
|
|
651
651
|
handleClick: (m) => {
|
|
@@ -1030,7 +1030,7 @@ function ZQ(A, g) {
|
|
|
1030
1030
|
return Q;
|
|
1031
1031
|
return null;
|
|
1032
1032
|
}
|
|
1033
|
-
const
|
|
1033
|
+
const mg = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, VQ = (A) => !Og(A) && A !== mg;
|
|
1034
1034
|
function SC() {
|
|
1035
1035
|
const { caseless: A } = VQ(this) && this || {}, g = {}, B = (C, Q) => {
|
|
1036
1036
|
const I = A && ZQ(g, Q) || Q;
|
|
@@ -1139,14 +1139,14 @@ const YE = (A) => {
|
|
|
1139
1139
|
return C;
|
|
1140
1140
|
};
|
|
1141
1141
|
return B(A, 0);
|
|
1142
|
-
}, RE = UA("AsyncFunction"), xE = (A) => A && (Lg(A) || FA(A)) && FA(A.then) && FA(A.catch), _Q = ((A, g) => A ? setImmediate : g ? ((B, C) => (
|
|
1143
|
-
Q ===
|
|
1142
|
+
}, RE = UA("AsyncFunction"), xE = (A) => A && (Lg(A) || FA(A)) && FA(A.then) && FA(A.catch), _Q = ((A, g) => A ? setImmediate : g ? ((B, C) => (mg.addEventListener("message", ({ source: Q, data: I }) => {
|
|
1143
|
+
Q === mg && I === B && C.length && C.shift()();
|
|
1144
1144
|
}, !1), (Q) => {
|
|
1145
|
-
C.push(Q),
|
|
1145
|
+
C.push(Q), mg.postMessage(B, "*");
|
|
1146
1146
|
}))(`axios@${Math.random()}`, []) : (B) => setTimeout(B))(
|
|
1147
1147
|
typeof setImmediate == "function",
|
|
1148
|
-
FA(
|
|
1149
|
-
), GE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(
|
|
1148
|
+
FA(mg.postMessage)
|
|
1149
|
+
), GE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(mg) : typeof process != "undefined" && process.nextTick || _Q, zE = (A) => A != null && FA(A[EC]), H = {
|
|
1150
1150
|
isArray: Yg,
|
|
1151
1151
|
isArrayBuffer: UQ,
|
|
1152
1152
|
isBuffer: Fg,
|
|
@@ -1196,7 +1196,7 @@ const YE = (A) => {
|
|
|
1196
1196
|
noop: TE,
|
|
1197
1197
|
toFiniteNumber: HE,
|
|
1198
1198
|
findKey: ZQ,
|
|
1199
|
-
global:
|
|
1199
|
+
global: mg,
|
|
1200
1200
|
isContextDefined: VQ,
|
|
1201
1201
|
isSpecCompliantForm: kE,
|
|
1202
1202
|
toJSONObject: YE,
|
|
@@ -1898,7 +1898,7 @@ function tI(A, g, B) {
|
|
|
1898
1898
|
return A && (C || B == !1) ? wn(A, g) : g;
|
|
1899
1899
|
}
|
|
1900
1900
|
const BQ = (A) => A instanceof LA ? qA({}, A) : A;
|
|
1901
|
-
function
|
|
1901
|
+
function Pg(A, g) {
|
|
1902
1902
|
g = g || {};
|
|
1903
1903
|
const B = {};
|
|
1904
1904
|
function C(c, h, a, e) {
|
|
@@ -1963,7 +1963,7 @@ function Mg(A, g) {
|
|
|
1963
1963
|
}), B;
|
|
1964
1964
|
}
|
|
1965
1965
|
const hI = (A) => {
|
|
1966
|
-
const g =
|
|
1966
|
+
const g = Pg({}, A);
|
|
1967
1967
|
let { data: B, withXSRFToken: C, xsrfHeaderName: Q, xsrfCookieName: I, headers: E, auth: n } = g;
|
|
1968
1968
|
g.headers = E = LA.from(E), g.url = BI(tI(g.baseURL, g.url, g.allowAbsoluteUrls), A.params, A.paramsSerializer), n && E.set(
|
|
1969
1969
|
"Authorization",
|
|
@@ -2075,7 +2075,7 @@ const hI = (A) => {
|
|
|
2075
2075
|
}, sn = function(A, g) {
|
|
2076
2076
|
return sC(this, null, function* () {
|
|
2077
2077
|
try {
|
|
2078
|
-
for (var B = SB(Dn(A)), C, Q, I; C = !(Q = yield new
|
|
2078
|
+
for (var B = SB(Dn(A)), C, Q, I; C = !(Q = yield new Dg(B.next())).done; C = !1) {
|
|
2079
2079
|
const E = Q.value;
|
|
2080
2080
|
yield* DC(un(E, g));
|
|
2081
2081
|
}
|
|
@@ -2083,7 +2083,7 @@ const hI = (A) => {
|
|
|
2083
2083
|
I = [Q];
|
|
2084
2084
|
} finally {
|
|
2085
2085
|
try {
|
|
2086
|
-
C && (Q = B.return) && (yield new
|
|
2086
|
+
C && (Q = B.return) && (yield new Dg(Q.call(B)));
|
|
2087
2087
|
} finally {
|
|
2088
2088
|
if (I)
|
|
2089
2089
|
throw I[0];
|
|
@@ -2099,13 +2099,13 @@ const hI = (A) => {
|
|
|
2099
2099
|
const g = A.getReader();
|
|
2100
2100
|
try {
|
|
2101
2101
|
for (; ; ) {
|
|
2102
|
-
const { done: B, value: C } = yield new
|
|
2102
|
+
const { done: B, value: C } = yield new Dg(g.read());
|
|
2103
2103
|
if (B)
|
|
2104
2104
|
break;
|
|
2105
2105
|
yield C;
|
|
2106
2106
|
}
|
|
2107
2107
|
} finally {
|
|
2108
|
-
yield new
|
|
2108
|
+
yield new Dg(g.cancel());
|
|
2109
2109
|
}
|
|
2110
2110
|
});
|
|
2111
2111
|
}, QQ = (A, g, B, C) => {
|
|
@@ -2384,7 +2384,7 @@ const _g = {
|
|
|
2384
2384
|
assertOptions: vn,
|
|
2385
2385
|
validators: wC
|
|
2386
2386
|
}, gg = _g.validators;
|
|
2387
|
-
let
|
|
2387
|
+
let Mg = class {
|
|
2388
2388
|
constructor(g) {
|
|
2389
2389
|
this.defaults = g || {}, this.interceptors = {
|
|
2390
2390
|
request: new $B(),
|
|
@@ -2419,7 +2419,7 @@ let fg = class {
|
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
2421
2421
|
_request(g, B) {
|
|
2422
|
-
typeof g == "string" ? (B = B || {}, B.url = g) : B = g || {}, B =
|
|
2422
|
+
typeof g == "string" ? (B = B || {}, B.url = g) : B = g || {}, B = Pg(this.defaults, B);
|
|
2423
2423
|
const { transitional: C, paramsSerializer: Q, headers: I } = B;
|
|
2424
2424
|
C !== void 0 && _g.assertOptions(C, {
|
|
2425
2425
|
silentJSONParsing: gg.transitional(gg.boolean),
|
|
@@ -2481,14 +2481,14 @@ let fg = class {
|
|
|
2481
2481
|
return h;
|
|
2482
2482
|
}
|
|
2483
2483
|
getUri(g) {
|
|
2484
|
-
g =
|
|
2484
|
+
g = Pg(this.defaults, g);
|
|
2485
2485
|
const B = tI(g.baseURL, g.url, g.allowAbsoluteUrls);
|
|
2486
2486
|
return BI(B, g.params, g.paramsSerializer);
|
|
2487
2487
|
}
|
|
2488
2488
|
};
|
|
2489
2489
|
H.forEach(["delete", "get", "head", "options"], function(g) {
|
|
2490
|
-
|
|
2491
|
-
return this.request(
|
|
2490
|
+
Mg.prototype[g] = function(B, C) {
|
|
2491
|
+
return this.request(Pg(C || {}, {
|
|
2492
2492
|
method: g,
|
|
2493
2493
|
url: B,
|
|
2494
2494
|
data: (C || {}).data
|
|
@@ -2498,7 +2498,7 @@ H.forEach(["delete", "get", "head", "options"], function(g) {
|
|
|
2498
2498
|
H.forEach(["post", "put", "patch"], function(g) {
|
|
2499
2499
|
function B(C) {
|
|
2500
2500
|
return function(I, E, n) {
|
|
2501
|
-
return this.request(
|
|
2501
|
+
return this.request(Pg(n || {}, {
|
|
2502
2502
|
method: g,
|
|
2503
2503
|
headers: C ? {
|
|
2504
2504
|
"Content-Type": "multipart/form-data"
|
|
@@ -2508,7 +2508,7 @@ H.forEach(["post", "put", "patch"], function(g) {
|
|
|
2508
2508
|
}));
|
|
2509
2509
|
};
|
|
2510
2510
|
}
|
|
2511
|
-
|
|
2511
|
+
Mg.prototype[g] = B(), Mg.prototype[g + "Form"] = B(!0);
|
|
2512
2512
|
});
|
|
2513
2513
|
let dn = class aI {
|
|
2514
2514
|
constructor(g) {
|
|
@@ -2660,13 +2660,13 @@ Object.entries(WC).forEach(([A, g]) => {
|
|
|
2660
2660
|
WC[g] = A;
|
|
2661
2661
|
});
|
|
2662
2662
|
function iI(A) {
|
|
2663
|
-
const g = new
|
|
2664
|
-
return H.extend(B,
|
|
2665
|
-
return iI(
|
|
2663
|
+
const g = new Mg(A), B = KQ(Mg.prototype.request, g);
|
|
2664
|
+
return H.extend(B, Mg.prototype, g, { allOwnKeys: !0 }), H.extend(B, g, null, { allOwnKeys: !0 }), B.create = function(Q) {
|
|
2665
|
+
return iI(Pg(A, Q));
|
|
2666
2666
|
}, B;
|
|
2667
2667
|
}
|
|
2668
2668
|
const rA = iI(yg);
|
|
2669
|
-
rA.Axios =
|
|
2669
|
+
rA.Axios = Mg;
|
|
2670
2670
|
rA.CanceledError = Rg;
|
|
2671
2671
|
rA.CancelToken = dn;
|
|
2672
2672
|
rA.isCancel = EI;
|
|
@@ -2679,7 +2679,7 @@ rA.all = function(g) {
|
|
|
2679
2679
|
};
|
|
2680
2680
|
rA.spread = Jn;
|
|
2681
2681
|
rA.isAxiosError = ln;
|
|
2682
|
-
rA.mergeConfig =
|
|
2682
|
+
rA.mergeConfig = Pg;
|
|
2683
2683
|
rA.AxiosHeaders = LA;
|
|
2684
2684
|
rA.formToJSON = (A) => II(H.isHTMLForm(A) ? new FormData(A) : A);
|
|
2685
2685
|
rA.getAdapter = eI.getAdapter;
|
|
@@ -2703,7 +2703,7 @@ const {
|
|
|
2703
2703
|
getAdapter: d0,
|
|
2704
2704
|
mergeConfig: J0
|
|
2705
2705
|
} = rA;
|
|
2706
|
-
let
|
|
2706
|
+
let tg = [], PA = null, qg = null;
|
|
2707
2707
|
const Tn = 3;
|
|
2708
2708
|
function Hn() {
|
|
2709
2709
|
!PA && document.body && uI();
|
|
@@ -2717,11 +2717,11 @@ function uI() {
|
|
|
2717
2717
|
console.warn("Document body not available for notification container");
|
|
2718
2718
|
return;
|
|
2719
2719
|
}
|
|
2720
|
-
PA && PA.parentNode && PA.parentNode.removeChild(PA), PA = document.createElement("div"), PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", window.innerWidth >= 768 ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4", document.body.appendChild(PA),
|
|
2720
|
+
PA && PA.parentNode && PA.parentNode.removeChild(PA), PA = document.createElement("div"), PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", window.innerWidth >= 768 ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4", document.body.appendChild(PA), qg && window.removeEventListener("resize", qg), qg = () => {
|
|
2721
2721
|
if (!PA) return;
|
|
2722
2722
|
const g = window.innerWidth >= 768;
|
|
2723
2723
|
PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", g ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4";
|
|
2724
|
-
}, window.addEventListener("resize",
|
|
2724
|
+
}, window.addEventListener("resize", qg);
|
|
2725
2725
|
}
|
|
2726
2726
|
function pg(A, g = {}) {
|
|
2727
2727
|
if (Hn(), !PA)
|
|
@@ -2733,7 +2733,7 @@ function pg(A, g = {}) {
|
|
|
2733
2733
|
icon: I = !1,
|
|
2734
2734
|
type: E = "info"
|
|
2735
2735
|
} = g;
|
|
2736
|
-
|
|
2736
|
+
tg.length >= Tn && CC(tg[0].id);
|
|
2737
2737
|
const n = Date.now() + Math.random(), t = kn(n, A, {
|
|
2738
2738
|
autoClose: B,
|
|
2739
2739
|
hideProgressBar: C,
|
|
@@ -2741,7 +2741,7 @@ function pg(A, g = {}) {
|
|
|
2741
2741
|
icon: I,
|
|
2742
2742
|
type: E
|
|
2743
2743
|
});
|
|
2744
|
-
return
|
|
2744
|
+
return tg.push({ id: n, element: t }), PA.appendChild(t), requestAnimationFrame(() => {
|
|
2745
2745
|
t.classList.remove("wgt:translate-x-full", "wgt:opacity-0"), t.classList.add("wgt:translate-x-0", "wgt:opacity-100");
|
|
2746
2746
|
}), B > 0 && setTimeout(() => {
|
|
2747
2747
|
CC(n);
|
|
@@ -2810,20 +2810,20 @@ function kn(A, g, B) {
|
|
|
2810
2810
|
return t;
|
|
2811
2811
|
}
|
|
2812
2812
|
function CC(A) {
|
|
2813
|
-
const g =
|
|
2813
|
+
const g = tg.findIndex((C) => C.id === A);
|
|
2814
2814
|
if (g === -1) return;
|
|
2815
|
-
const { element: B } =
|
|
2815
|
+
const { element: B } = tg[g];
|
|
2816
2816
|
B.classList.remove("wgt:translate-x-0", "wgt:opacity-100"), B.classList.add("wgt:translate-x-full", "wgt:opacity-0"), setTimeout(() => {
|
|
2817
|
-
B.parentNode && B.parentNode.removeChild(B),
|
|
2817
|
+
B.parentNode && B.parentNode.removeChild(B), tg.splice(g, 1);
|
|
2818
2818
|
}, 300);
|
|
2819
2819
|
}
|
|
2820
2820
|
function sI() {
|
|
2821
|
-
|
|
2821
|
+
tg.forEach(({ id: A }) => CC(A));
|
|
2822
2822
|
}
|
|
2823
2823
|
function Yn() {
|
|
2824
|
-
sI(), PA && PA.parentNode && PA.parentNode.removeChild(PA),
|
|
2824
|
+
sI(), PA && PA.parentNode && PA.parentNode.removeChild(PA), qg && window.removeEventListener("resize", qg), PA = null, qg = null, tg = [];
|
|
2825
2825
|
}
|
|
2826
|
-
const
|
|
2826
|
+
const rg = {
|
|
2827
2827
|
info: (A, g = {}) => pg(A, yA(qA({}, g), { type: "info" })),
|
|
2828
2828
|
success: (A, g = {}) => pg(A, yA(qA({}, g), { type: "success" })),
|
|
2829
2829
|
warning: (A, g = {}) => pg(A, yA(qA({}, g), { type: "warning" })),
|
|
@@ -2935,7 +2935,7 @@ function QB(A, g = {}) {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
);
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2938
|
+
function Ig(A, g = {}) {
|
|
2939
2939
|
const { okLabel: B = u("ok"), onClose: C = null, isOffline: Q = !1 } = g, { container: I, open: E } = eC({
|
|
2940
2940
|
message: A,
|
|
2941
2941
|
okLabel: B,
|
|
@@ -3422,17 +3422,17 @@ function Ln() {
|
|
|
3422
3422
|
zA -= 7;
|
|
3423
3423
|
OA += 7 - zA;
|
|
3424
3424
|
for (var fA = !1, vA = 0, NA = 0; vA < OA; vA++) {
|
|
3425
|
-
var dA = new Date(o, i, 1 + (vA - y)), ZA = s(this._d) ? m(dA, this._d) : !1,
|
|
3426
|
-
|
|
3425
|
+
var dA = new Date(o, i, 1 + (vA - y)), ZA = s(this._d) ? m(dA, this._d) : !1, hg = m(dA, L), cg = v.events.indexOf(dA.toDateString()) !== -1, wg = vA < y || vA >= N + y, VA = 1 + (vA - y), eg = i, bA = o, jA = v.startRange && m(v.startRange, dA), KA = v.endRange && m(v.endRange, dA), WA = v.startRange && v.endRange && v.startRange < dA && dA < v.endRange, og = v.minDate && dA < v.minDate || v.maxDate && dA > v.maxDate || v.disableWeekends && D(dA) || v.disableDayFn && v.disableDayFn(dA);
|
|
3426
|
+
wg && (vA < y ? (VA = XA + VA, eg = U, bA = oA) : (VA = VA - N, eg = tA, bA = wA));
|
|
3427
3427
|
var SA = {
|
|
3428
3428
|
day: VA,
|
|
3429
|
-
month:
|
|
3429
|
+
month: eg,
|
|
3430
3430
|
year: bA,
|
|
3431
|
-
hasEvent:
|
|
3431
|
+
hasEvent: cg,
|
|
3432
3432
|
isSelected: ZA,
|
|
3433
|
-
isToday:
|
|
3434
|
-
isDisabled:
|
|
3435
|
-
isEmpty:
|
|
3433
|
+
isToday: hg,
|
|
3434
|
+
isDisabled: og,
|
|
3435
|
+
isEmpty: wg,
|
|
3436
3436
|
isStartRange: jA,
|
|
3437
3437
|
isEndRange: KA,
|
|
3438
3438
|
isInRange: WA,
|
|
@@ -3502,11 +3502,11 @@ function jn(A = "dev") {
|
|
|
3502
3502
|
};
|
|
3503
3503
|
return g[A] || g.dev;
|
|
3504
3504
|
}
|
|
3505
|
-
let
|
|
3505
|
+
let fg = null, _C = null, Xg = null;
|
|
3506
3506
|
function Kn() {
|
|
3507
3507
|
return oC(this, null, function* () {
|
|
3508
3508
|
try {
|
|
3509
|
-
|
|
3509
|
+
fg || (fg = yield import("https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.mjs")), _C || (_C = (yield import("https://cdn.jsdelivr.net/npm/@undecaf/zbar-wasm@0.11.0/dist/index.mjs")).scanImageData), console.log("✅ All modules loaded successfully");
|
|
3510
3510
|
} catch (A) {
|
|
3511
3511
|
throw new Error(`Failed to initialize required modules: ${A.message}`);
|
|
3512
3512
|
}
|
|
@@ -3515,16 +3515,16 @@ function Kn() {
|
|
|
3515
3515
|
function DI(A) {
|
|
3516
3516
|
return oC(this, null, function* () {
|
|
3517
3517
|
try {
|
|
3518
|
-
if (yield Kn(), !
|
|
3518
|
+
if (yield Kn(), !fg || !fg.InferenceSession)
|
|
3519
3519
|
throw new Error(
|
|
3520
3520
|
"ONNX Runtime is not properly loaded. Please check your internet connection and try again."
|
|
3521
3521
|
);
|
|
3522
3522
|
const g = jn(A).modelUrl;
|
|
3523
|
-
if (typeof
|
|
3523
|
+
if (typeof fg.InferenceSession.create != "function")
|
|
3524
3524
|
throw new Error(
|
|
3525
3525
|
"InferenceSession.create is not available. ONNX Runtime may not be properly initialized."
|
|
3526
3526
|
);
|
|
3527
|
-
return Xg = yield
|
|
3527
|
+
return Xg = yield fg.InferenceSession.create(g), Xg;
|
|
3528
3528
|
} catch (g) {
|
|
3529
3529
|
throw new Error(`Failed to initialize ONNX model: ${g.message}`);
|
|
3530
3530
|
}
|
|
@@ -3609,7 +3609,7 @@ function Zn(A, g = 640) {
|
|
|
3609
3609
|
const c = n * g + t;
|
|
3610
3610
|
E[c] = I[c * 3], E[c + g * g] = I[c * 3 + 1], E[c + 2 * g * g] = I[c * 3 + 2];
|
|
3611
3611
|
}
|
|
3612
|
-
return new
|
|
3612
|
+
return new fg.Tensor("float32", E, [1, 3, g, g]);
|
|
3613
3613
|
}
|
|
3614
3614
|
function Vn(A, g, B, C, Q = 0.5) {
|
|
3615
3615
|
const I = [], E = A.dims[1];
|
|
@@ -4124,9 +4124,9 @@ function Ct(t) {
|
|
|
4124
4124
|
), e.inputEl.value = "", w.inputEl.value = "", s.setValue && s.setValue("", "", ""), s.setDisabled(!1);
|
|
4125
4125
|
else {
|
|
4126
4126
|
if (e.inputEl.value = EA.ten_cty || "", w.inputEl.value = EA.dia_chi || "", EA.cqthue_ql) {
|
|
4127
|
-
const DA = (
|
|
4128
|
-
const
|
|
4129
|
-
return
|
|
4127
|
+
const DA = (ug) => ug.toLowerCase().replace(/phường\s+/i, "").replace(/xã\s+/i, "").replace(/quận\s+/i, "").trim(), lA = DA(EA.cqthue_ql), Ag = v.find((ug) => {
|
|
4128
|
+
const lg = DA(ug.label);
|
|
4129
|
+
return lg.includes(lA) || lA.includes(lg);
|
|
4130
4130
|
});
|
|
4131
4131
|
Ag && (s.setValue && s.setValue(
|
|
4132
4132
|
Ag.value,
|
|
@@ -4137,7 +4137,7 @@ function Ct(t) {
|
|
|
4137
4137
|
a.setError(null);
|
|
4138
4138
|
}
|
|
4139
4139
|
} catch (EA) {
|
|
4140
|
-
X === y && (
|
|
4140
|
+
X === y && (rg.error(
|
|
4141
4141
|
u("errorFetchTaxInfo", "Lỗi khi lấy thông tin mã số thuế."),
|
|
4142
4142
|
{
|
|
4143
4143
|
autoClose: 5e3,
|
|
@@ -4187,12 +4187,12 @@ function Ct(t) {
|
|
|
4187
4187
|
}, EA = (lA) => {
|
|
4188
4188
|
if (!lA) return "";
|
|
4189
4189
|
if (/^\d{8}$/.test(lA)) {
|
|
4190
|
-
const
|
|
4191
|
-
return `${
|
|
4190
|
+
const sg = lA.slice(0, 2), iC = lA.slice(2, 4), lI = lA.slice(4, 8);
|
|
4191
|
+
return `${sg}/${iC}/${lI}`;
|
|
4192
4192
|
}
|
|
4193
|
-
const [Ag,
|
|
4194
|
-
if (isNaN(
|
|
4195
|
-
const aC = String(
|
|
4193
|
+
const [Ag, ug, lg] = lA.split("/"), Tg = new Date(+lg, +ug - 1, +Ag);
|
|
4194
|
+
if (isNaN(Tg)) return "";
|
|
4195
|
+
const aC = String(Tg.getDate()).padStart(2, "0"), xg = String(Tg.getMonth() + 1).padStart(2, "0"), Kg = Tg.getFullYear();
|
|
4196
4196
|
return `${aC}/${xg}/${Kg}`;
|
|
4197
4197
|
}, DA = new Image();
|
|
4198
4198
|
DA.src = URL.createObjectURL(F), DA.onload = () => p(null, null, function* () {
|
|
@@ -4200,21 +4200,21 @@ function Ct(t) {
|
|
|
4200
4200
|
const lA = yield At(DA).then((Ag) => JSON.parse(Ag).status !== "success" ? (zA = !0, fA = !1, NA(), null) : JSON.parse(Ag).data);
|
|
4201
4201
|
if (lA) {
|
|
4202
4202
|
zA = !1, fA = !0, NA();
|
|
4203
|
-
const
|
|
4204
|
-
if (X(),
|
|
4205
|
-
|
|
4203
|
+
const ug = Object.values(lA).every((sg) => !sg);
|
|
4204
|
+
if (X(), ug) {
|
|
4205
|
+
wg(
|
|
4206
4206
|
u("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
4207
4207
|
), X();
|
|
4208
4208
|
return;
|
|
4209
4209
|
}
|
|
4210
|
-
const { address:
|
|
4211
|
-
if (!xg || !/^\d{12}$/.test(xg) ? (
|
|
4210
|
+
const { address: lg, date_of_birth: Tg, full_name: aC, id_number: xg, sex: Kg } = lA;
|
|
4211
|
+
if (!xg || !/^\d{12}$/.test(xg) ? (wg(
|
|
4212
4212
|
u("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
4213
|
-
), r.inputEl.value = "") : (r.inputEl.value = xg, r.setError(null)), m.inputEl.value = aC || "", f.inputEl.value = EA(
|
|
4214
|
-
const
|
|
4213
|
+
), r.inputEl.value = "") : (r.inputEl.value = xg, r.setError(null)), m.inputEl.value = aC || "", f.inputEl.value = EA(Tg), R.inputEl.value = lg || "", Kg) {
|
|
4214
|
+
const sg = hQ.find(
|
|
4215
4215
|
(iC) => iC.label.toLowerCase() === Kg.toLowerCase()
|
|
4216
4216
|
);
|
|
4217
|
-
J.selectEl.value = (
|
|
4217
|
+
J.selectEl.value = (sg == null ? void 0 : sg.value) || "";
|
|
4218
4218
|
}
|
|
4219
4219
|
}
|
|
4220
4220
|
} catch (lA) {
|
|
@@ -4226,17 +4226,17 @@ function Ct(t) {
|
|
|
4226
4226
|
}
|
|
4227
4227
|
const {
|
|
4228
4228
|
container: ZA,
|
|
4229
|
-
getFrontFileError:
|
|
4230
|
-
getBackFileError:
|
|
4231
|
-
setFrontFileError:
|
|
4229
|
+
getFrontFileError: hg,
|
|
4230
|
+
getBackFileError: cg,
|
|
4231
|
+
setFrontFileError: wg,
|
|
4232
4232
|
getFrontFile: VA,
|
|
4233
|
-
getBackFile:
|
|
4233
|
+
getBackFile: eg
|
|
4234
4234
|
} = bI({
|
|
4235
4235
|
frontFile: g == null ? void 0 : g.idCard,
|
|
4236
4236
|
backFile: g == null ? void 0 : g.idCardBack,
|
|
4237
4237
|
onFrontChange: (F) => p(null, null, function* () {
|
|
4238
4238
|
var EA, DA;
|
|
4239
|
-
if (o = F,
|
|
4239
|
+
if (o = F, hg() || cg() || !eg()) {
|
|
4240
4240
|
zA = !1, fA = !1, NA(), AA();
|
|
4241
4241
|
return;
|
|
4242
4242
|
}
|
|
@@ -4248,7 +4248,7 @@ function Ct(t) {
|
|
|
4248
4248
|
}),
|
|
4249
4249
|
onBackChange: (F) => p(null, null, function* () {
|
|
4250
4250
|
var EA, DA;
|
|
4251
|
-
if (i = F,
|
|
4251
|
+
if (i = F, hg() || cg() || !VA()) {
|
|
4252
4252
|
zA = !1, fA = !1, NA(), AA();
|
|
4253
4253
|
return;
|
|
4254
4254
|
}
|
|
@@ -4269,23 +4269,23 @@ function Ct(t) {
|
|
|
4269
4269
|
KA.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-4 wgt:gap-4 wgt:items-start", KA.appendChild(r.container), KA.appendChild(q.container), KA.appendChild(d.container), KA.appendChild(T.container), wA.appendChild(OA), wA.appendChild(KA), wA.appendChild(R.container), wA.appendChild(K.container);
|
|
4270
4270
|
const WA = document.createElement("ul");
|
|
4271
4271
|
WA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
4272
|
-
const
|
|
4273
|
-
|
|
4272
|
+
const og = document.createElement("li");
|
|
4273
|
+
og.className = "wgt:text-sm wgt:text-[#8C8C8C] wgt:italic", og.innerText = u(
|
|
4274
4274
|
"legalRepNote",
|
|
4275
4275
|
"Vui lòng kiểm tra và nhập đúng tên người đại diện theo Giấy phép kinh doanh đã tải lên."
|
|
4276
|
-
), WA.appendChild(
|
|
4276
|
+
), WA.appendChild(og), wA.appendChild(WA), h.appendChild(wA);
|
|
4277
4277
|
const SA = document.createElement("div");
|
|
4278
4278
|
SA.className = "wgt:space-y-4";
|
|
4279
|
-
const
|
|
4280
|
-
|
|
4279
|
+
const ag = document.createElement("h3");
|
|
4280
|
+
ag.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", ag.innerText = u("contactInfo", "3. Thông tin người liên hệ:"), SA.appendChild(ag);
|
|
4281
4281
|
const YA = document.createElement("div");
|
|
4282
4282
|
YA.className = "wgt:w-full wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-2 wgt:gap-4 wgt:items-start", YA.appendChild(D.container), YA.appendChild(M.container), YA.appendChild(k.container), YA.appendChild(l.container), SA.appendChild(YA), h.appendChild(SA);
|
|
4283
|
-
const
|
|
4284
|
-
|
|
4285
|
-
const
|
|
4286
|
-
|
|
4283
|
+
const ig = document.createElement("div");
|
|
4284
|
+
ig.className = "wgt:space-y-4";
|
|
4285
|
+
const Jg = document.createElement("h3");
|
|
4286
|
+
Jg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", Jg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ig.appendChild(Jg), h.appendChild(ig);
|
|
4287
4287
|
const _A = document.createElement("div");
|
|
4288
|
-
_A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container),
|
|
4288
|
+
_A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container), ig.appendChild(_A);
|
|
4289
4289
|
const mA = document.createElement("div");
|
|
4290
4290
|
mA.className = "wgt:flex wgt:flex-col wgt:space-y-4 wgt:border wgt:border-soft-200 wgt:px-6 wgt:py-4 wgt:rounded-xl", h.appendChild(mA);
|
|
4291
4291
|
const b = document.createElement("div");
|
|
@@ -4366,7 +4366,7 @@ function Ct(t) {
|
|
|
4366
4366
|
return !(!DA.test(X.contactPerson.phone) || !DA.test(X.legalRepresentative.phone) || !/^\d{12}$/.test(X.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(X.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(X.invoiceSymbol) || !F.license || !F.logo || !F.idCard || !F.idCardBack);
|
|
4367
4367
|
}
|
|
4368
4368
|
function AA() {
|
|
4369
|
-
P.disabled = !BA() || !cA ||
|
|
4369
|
+
P.disabled = !BA() || !cA || hg() || cg() || S.getError() || K.getError();
|
|
4370
4370
|
}
|
|
4371
4371
|
function JA() {
|
|
4372
4372
|
var F, X;
|
|
@@ -4515,7 +4515,7 @@ function It({
|
|
|
4515
4515
|
`, e.appendChild(w);
|
|
4516
4516
|
const s = document.createElement("span");
|
|
4517
4517
|
if (s.className = "wgt:ml-2 wgt:text-sm", g === "signature") {
|
|
4518
|
-
const l =
|
|
4518
|
+
const l = Eg(), m = u(A.duration.unit), f = l === "en" && A.duration.value > 1 ? m + "s" : m;
|
|
4519
4519
|
s.innerText = `${u("duration")}: ${A.duration.value} ${f} `;
|
|
4520
4520
|
} else typeof (A == null ? void 0 : A.limit) == "number" ? s.innerText = `${A == null ? void 0 : A.limit.toLocaleString(
|
|
4521
4521
|
"vi-VN"
|
|
@@ -4597,7 +4597,7 @@ function wQ({
|
|
|
4597
4597
|
}
|
|
4598
4598
|
};
|
|
4599
4599
|
}
|
|
4600
|
-
const Et = "1.67.
|
|
4600
|
+
const Et = "1.67.3";
|
|
4601
4601
|
function nt(B) {
|
|
4602
4602
|
return p(this, arguments, function* ({ search: A, bank: g }) {
|
|
4603
4603
|
return (yield pA.get(`${IC}`, {
|
|
@@ -4762,7 +4762,7 @@ function at({
|
|
|
4762
4762
|
"wgt:text-sm",
|
|
4763
4763
|
"wgt:text-text-sub-600",
|
|
4764
4764
|
"wgt:mb-2"
|
|
4765
|
-
].join(" "), t.textContent =
|
|
4765
|
+
].join(" "), t.textContent = Eg() === "vi" ? A.name : A.nameEn, E.appendChild(t);
|
|
4766
4766
|
const { container: c } = QC({
|
|
4767
4767
|
checked: A.isSelected,
|
|
4768
4768
|
onChange: () => {
|
|
@@ -4804,7 +4804,7 @@ function it({
|
|
|
4804
4804
|
const l = B.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), m = yield nt({ search: l, bank: A });
|
|
4805
4805
|
m && (I = m), C && C();
|
|
4806
4806
|
} catch (l) {
|
|
4807
|
-
console.error("Error searching packages:", l),
|
|
4807
|
+
console.error("Error searching packages:", l), rg.error(u("errorSearchingPackages"), {
|
|
4808
4808
|
autoClose: 5e3,
|
|
4809
4809
|
closeButton: !0,
|
|
4810
4810
|
icon: !0
|
|
@@ -5012,14 +5012,14 @@ function mt(k) {
|
|
|
5012
5012
|
dA.className = "wgt:text-xl wgt:font-bold wgt:text-primary", dA.innerText = "0 VND", vA.appendChild(dA);
|
|
5013
5013
|
const ZA = document.createElement("div");
|
|
5014
5014
|
ZA.className = "wgt:flex wgt:justify-between wgt:gap-2", S.appendChild(ZA);
|
|
5015
|
-
const
|
|
5015
|
+
const hg = ng({
|
|
5016
5016
|
type: "button",
|
|
5017
5017
|
title: u("back"),
|
|
5018
5018
|
className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
|
|
5019
5019
|
handleClick: g
|
|
5020
5020
|
});
|
|
5021
|
-
ZA.appendChild(
|
|
5022
|
-
const
|
|
5021
|
+
ZA.appendChild(hg);
|
|
5022
|
+
const cg = (b, nA, QA, W) => p(null, null, function* () {
|
|
5023
5023
|
o();
|
|
5024
5024
|
const gA = w.eInvoiceRegistration, { isUsedEInvoiceBefore: CA } = gA, $ = uC(gA, ["isUsedEInvoiceBefore"]);
|
|
5025
5025
|
let cA = [
|
|
@@ -5060,10 +5060,10 @@ function mt(k) {
|
|
|
5060
5060
|
});
|
|
5061
5061
|
t(hA.orderId), A();
|
|
5062
5062
|
} catch (hA) {
|
|
5063
|
-
console.error("Error creating order:", hA),
|
|
5063
|
+
console.error("Error creating order:", hA), Ig(u("errorCreatingOrder") || "Failed to create order"), i();
|
|
5064
5064
|
return;
|
|
5065
5065
|
}
|
|
5066
|
-
}),
|
|
5066
|
+
}), wg = ng({
|
|
5067
5067
|
type: "button",
|
|
5068
5068
|
title: u("next"),
|
|
5069
5069
|
className: "wgt:text-white wgt:bg-primary",
|
|
@@ -5078,7 +5078,7 @@ function mt(k) {
|
|
|
5078
5078
|
quantity: G
|
|
5079
5079
|
}), I(QA)) : I(null);
|
|
5080
5080
|
let W = yA(qA({}, b), { quantity: Y }), CA = yA(qA({}, nA), { quantity: z });
|
|
5081
|
-
E(W), n(CA), s(J), yield
|
|
5081
|
+
E(W), n(CA), s(J), yield cg(
|
|
5082
5082
|
QA,
|
|
5083
5083
|
W,
|
|
5084
5084
|
CA,
|
|
@@ -5086,7 +5086,7 @@ function mt(k) {
|
|
|
5086
5086
|
);
|
|
5087
5087
|
})
|
|
5088
5088
|
});
|
|
5089
|
-
ZA.appendChild(
|
|
5089
|
+
ZA.appendChild(wg);
|
|
5090
5090
|
function VA() {
|
|
5091
5091
|
return p(this, null, function* () {
|
|
5092
5092
|
var b, nA, QA, W, CA;
|
|
@@ -5110,12 +5110,12 @@ function mt(k) {
|
|
|
5110
5110
|
if ($.status === "fulfilled" ? R = ((QA = $.value) == null ? void 0 : QA.isNewCustomer) || !1 : (console.error(
|
|
5111
5111
|
"Failed to check new customer:",
|
|
5112
5112
|
$.reason
|
|
5113
|
-
),
|
|
5113
|
+
), rg.error(
|
|
5114
5114
|
u("errorCheckingCustomer") || "Failed to check customer status"
|
|
5115
5115
|
), R = !1), gA.status === "fulfilled" ? r = gA.value || [] : (console.error(
|
|
5116
5116
|
"Failed to load init packages:",
|
|
5117
5117
|
gA.reason
|
|
5118
|
-
),
|
|
5118
|
+
), rg.error(
|
|
5119
5119
|
u("errorLoadingInitPackages") || "Failed to load registration packages"
|
|
5120
5120
|
), r = []), cA.status === "fulfilled" ? (((W = cA == null ? void 0 : cA.value) == null ? void 0 : W.length) > 0 && cA.value.forEach((Z) => {
|
|
5121
5121
|
Z.codes.length > 0 && (q[Z.codes[0].code] = {
|
|
@@ -5135,7 +5135,7 @@ function mt(k) {
|
|
|
5135
5135
|
});
|
|
5136
5136
|
}), Object.keys(q).length > 0 && (J = e || Object.keys(q).filter(
|
|
5137
5137
|
(Z) => q[Z].bank === h && q[Z].expiredAt >= (/* @__PURE__ */ new Date()).toISOString() && q[Z].limit > q[Z].used
|
|
5138
|
-
),
|
|
5138
|
+
), Jg())) : console.error("Failed to load promotions:", cA.reason), hA.status === "fulfilled") {
|
|
5139
5139
|
if (N(hA.value || []), hA.value.length > 0) {
|
|
5140
5140
|
const Z = hA.value.find(
|
|
5141
5141
|
(RA) => T.includes(RA.code)
|
|
@@ -5147,7 +5147,7 @@ function mt(k) {
|
|
|
5147
5147
|
console.error(
|
|
5148
5148
|
"Failed to load invoice packages:",
|
|
5149
5149
|
hA.reason
|
|
5150
|
-
),
|
|
5150
|
+
), rg.error(
|
|
5151
5151
|
u("errorLoadingInvoicePackages") || "Failed to load invoice packages"
|
|
5152
5152
|
), N([]), tA();
|
|
5153
5153
|
if (eA.status === "fulfilled") {
|
|
@@ -5161,12 +5161,12 @@ function mt(k) {
|
|
|
5161
5161
|
console.error(
|
|
5162
5162
|
"Failed to load signature packages:",
|
|
5163
5163
|
eA.reason
|
|
5164
|
-
),
|
|
5164
|
+
), rg.error(
|
|
5165
5165
|
u("errorLoadingSignaturePackages") || "Failed to load signature packages"
|
|
5166
5166
|
), d = [];
|
|
5167
|
-
|
|
5167
|
+
eg();
|
|
5168
5168
|
} catch ($) {
|
|
5169
|
-
console.error("Unexpected error during data loading:", $),
|
|
5169
|
+
console.error("Unexpected error during data loading:", $), rg.error(u("errorLoadingData") || "Failed to load data", {
|
|
5170
5170
|
autoClose: 5e3,
|
|
5171
5171
|
closeButton: !0,
|
|
5172
5172
|
icon: !0
|
|
@@ -5174,8 +5174,8 @@ function mt(k) {
|
|
|
5174
5174
|
}
|
|
5175
5175
|
});
|
|
5176
5176
|
}
|
|
5177
|
-
function
|
|
5178
|
-
KA(),
|
|
5177
|
+
function eg() {
|
|
5178
|
+
KA(), og(), ag(), _A(), mA();
|
|
5179
5179
|
}
|
|
5180
5180
|
function bA(b, nA, QA) {
|
|
5181
5181
|
const W = Object.values(q).find(
|
|
@@ -5210,7 +5210,7 @@ function mt(k) {
|
|
|
5210
5210
|
($) => $._id === m
|
|
5211
5211
|
)) == null ? void 0 : W.code, QA = (CA = y().find(($) => $._id === b)) == null ? void 0 : CA.code;
|
|
5212
5212
|
bA(nA, QA, () => {
|
|
5213
|
-
m = b, jA.setSelectedPackageId(b), V(y()),
|
|
5213
|
+
m = b, jA.setSelectedPackageId(b), V(y()), ig(), ag(), _A(), Y = 1, mA();
|
|
5214
5214
|
});
|
|
5215
5215
|
}
|
|
5216
5216
|
}), L.appendChild(jA.container);
|
|
@@ -5220,7 +5220,7 @@ function mt(k) {
|
|
|
5220
5220
|
}
|
|
5221
5221
|
}
|
|
5222
5222
|
let WA = null;
|
|
5223
|
-
function
|
|
5223
|
+
function og() {
|
|
5224
5224
|
if (wA.innerHTML = "", d.length > 0)
|
|
5225
5225
|
WA = wQ({
|
|
5226
5226
|
type: "signature",
|
|
@@ -5234,7 +5234,7 @@ function mt(k) {
|
|
|
5234
5234
|
($) => $._id === f
|
|
5235
5235
|
)) == null ? void 0 : W.code, QA = (CA = d.find(($) => $._id === b)) == null ? void 0 : CA.code;
|
|
5236
5236
|
bA(nA, QA, () => {
|
|
5237
|
-
f = b, WA.setSelectedPackageId(b),
|
|
5237
|
+
f = b, WA.setSelectedPackageId(b), ig(), ag(), _A(), z = 1, mA();
|
|
5238
5238
|
});
|
|
5239
5239
|
}
|
|
5240
5240
|
}), wA.appendChild(WA.container);
|
|
@@ -5245,7 +5245,7 @@ function mt(k) {
|
|
|
5245
5245
|
}
|
|
5246
5246
|
const SA = document.createElement("div");
|
|
5247
5247
|
SA.className = "wgt:w-full", P.appendChild(SA);
|
|
5248
|
-
function
|
|
5248
|
+
function ag() {
|
|
5249
5249
|
XA.remove(), SA.innerHTML = "";
|
|
5250
5250
|
const b = y().find(
|
|
5251
5251
|
(nA) => nA._id === m
|
|
@@ -5258,7 +5258,7 @@ function mt(k) {
|
|
|
5258
5258
|
r[0].price
|
|
5259
5259
|
)} VND`,
|
|
5260
5260
|
required: !0,
|
|
5261
|
-
description:
|
|
5261
|
+
description: Eg() === "vi" ? r[0].name : r[0].nameEn,
|
|
5262
5262
|
isChecked: R && !(b != null && b.withoutInitialFee)
|
|
5263
5263
|
});
|
|
5264
5264
|
SA.appendChild(nA);
|
|
@@ -5266,7 +5266,7 @@ function mt(k) {
|
|
|
5266
5266
|
}
|
|
5267
5267
|
const YA = document.createElement("div");
|
|
5268
5268
|
YA.className = "promotion-wrapper wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
5269
|
-
function
|
|
5269
|
+
function ig() {
|
|
5270
5270
|
const b = y().find(
|
|
5271
5271
|
(QA) => QA._id === m
|
|
5272
5272
|
), nA = d.find(
|
|
@@ -5286,9 +5286,9 @@ function mt(k) {
|
|
|
5286
5286
|
W.isDisabled = !CA, !CA && J.includes(W.code) ? J = J.filter(
|
|
5287
5287
|
($) => $ !== W.code
|
|
5288
5288
|
) : CA && !J.includes(W.code) && J.push(W.code);
|
|
5289
|
-
}),
|
|
5289
|
+
}), Jg();
|
|
5290
5290
|
}
|
|
5291
|
-
function
|
|
5291
|
+
function Jg() {
|
|
5292
5292
|
T = Object.values(q).filter((b) => b.bank === h).map((b) => b.appliedPackages[0]);
|
|
5293
5293
|
}
|
|
5294
5294
|
function _A() {
|
|
@@ -5312,7 +5312,7 @@ function mt(k) {
|
|
|
5312
5312
|
}).forEach((hA) => {
|
|
5313
5313
|
const eA = document.createElement("div");
|
|
5314
5314
|
eA.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", eA.innerText = hA;
|
|
5315
|
-
const Z =
|
|
5315
|
+
const Z = ng({
|
|
5316
5316
|
type: "button",
|
|
5317
5317
|
title: "x",
|
|
5318
5318
|
handleClick: () => {
|
|
@@ -5327,7 +5327,7 @@ function mt(k) {
|
|
|
5327
5327
|
</svg>
|
|
5328
5328
|
`, eA.appendChild(Z), W.appendChild(eA);
|
|
5329
5329
|
});
|
|
5330
|
-
const CA =
|
|
5330
|
+
const CA = ng({
|
|
5331
5331
|
type: "button",
|
|
5332
5332
|
title: u("apply"),
|
|
5333
5333
|
className: "wgt:text-white wgt:bg-primary",
|
|
@@ -5377,7 +5377,7 @@ function mt(k) {
|
|
|
5377
5377
|
const x = document.createElement("tr");
|
|
5378
5378
|
x.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5379
5379
|
const BA = document.createElement("td");
|
|
5380
|
-
BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText =
|
|
5380
|
+
BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText = Eg() === "vi" ? r[0].name : r[0].nameEn, x.appendChild(BA);
|
|
5381
5381
|
const AA = document.createElement("td");
|
|
5382
5382
|
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", AA.innerText = u("package"), x.appendChild(AA);
|
|
5383
5383
|
const JA = document.createElement("td");
|
|
@@ -5420,7 +5420,7 @@ function mt(k) {
|
|
|
5420
5420
|
const BA = document.createElement("tr");
|
|
5421
5421
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5422
5422
|
const AA = document.createElement("td");
|
|
5423
|
-
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText =
|
|
5423
|
+
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Eg() === "vi" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(AA);
|
|
5424
5424
|
const JA = document.createElement("td");
|
|
5425
5425
|
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", JA.innerText = u("package"), BA.appendChild(JA);
|
|
5426
5426
|
const uA = document.createElement("td");
|
|
@@ -5464,7 +5464,7 @@ function mt(k) {
|
|
|
5464
5464
|
const BA = document.createElement("tr");
|
|
5465
5465
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5466
5466
|
const AA = document.createElement("td");
|
|
5467
|
-
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText =
|
|
5467
|
+
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Eg() === "vi" ? x == null ? void 0 : x.name : x == null ? void 0 : x.nameEn, BA.appendChild(AA);
|
|
5468
5468
|
const JA = document.createElement("td");
|
|
5469
5469
|
JA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", JA.innerText = u("package"), BA.appendChild(JA);
|
|
5470
5470
|
const uA = document.createElement("td");
|
|
@@ -5516,7 +5516,7 @@ function mt(k) {
|
|
|
5516
5516
|
AA.colSpan = 3, AA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:col-span-3 wgt:max-sm:col-span-5 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-1", AA.innerHTML = `
|
|
5517
5517
|
<div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:max-sm:justify-start">
|
|
5518
5518
|
<img src="${rt}" alt="ticket" class="wgt:w-4 wgt:max-sm:w-5">
|
|
5519
|
-
<span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${
|
|
5519
|
+
<span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${Eg() === "vi" ? x == null ? void 0 : x.name : (x == null ? void 0 : x.nameEn) || (x == null ? void 0 : x.code)}</span>
|
|
5520
5520
|
</div>
|
|
5521
5521
|
`, BA.appendChild(AA);
|
|
5522
5522
|
const JA = document.createElement("td");
|
|
@@ -5676,7 +5676,7 @@ function Mt({
|
|
|
5676
5676
|
k();
|
|
5677
5677
|
const l = () => {
|
|
5678
5678
|
w = setInterval(() => {
|
|
5679
|
-
e--, k(), e <= 0 &&
|
|
5679
|
+
e--, k(), e <= 0 && Bg(w);
|
|
5680
5680
|
}, 1e3), dI(w);
|
|
5681
5681
|
};
|
|
5682
5682
|
l(), s.appendChild(D);
|
|
@@ -5723,7 +5723,7 @@ function Mt({
|
|
|
5723
5723
|
const z = document.createElement("h4");
|
|
5724
5724
|
z.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", z.innerText = u("digitalSignaturePackage");
|
|
5725
5725
|
const j = document.createElement("span");
|
|
5726
|
-
if (j.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black",
|
|
5726
|
+
if (j.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", Eg(), u(B.duration.unit), j.innerText = B ? `${String(B == null ? void 0 : B.code)}` : "", Y.appendChild(z), Y.appendChild(j), J.appendChild(Y), c && c.length > 0) {
|
|
5727
5727
|
const v = document.createElement("div");
|
|
5728
5728
|
v.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
5729
5729
|
const L = document.createElement("h4");
|
|
@@ -5742,16 +5742,16 @@ function Mt({
|
|
|
5742
5742
|
o.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", o.innerText = u("paymentAmount");
|
|
5743
5743
|
const i = document.createElement("span");
|
|
5744
5744
|
i.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", i.innerText = I.toLocaleString("vi-VN") + " VND", K.appendChild(o), K.appendChild(i), J.appendChild(K), f.appendChild(J);
|
|
5745
|
-
const P =
|
|
5745
|
+
const P = ng({
|
|
5746
5746
|
title: u("cancelTransaction"),
|
|
5747
5747
|
className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
|
|
5748
5748
|
handleClick: () => {
|
|
5749
|
-
w &&
|
|
5749
|
+
w && Bg(w);
|
|
5750
5750
|
const { container: v, open: L } = eC({
|
|
5751
5751
|
message: u("transactionCanceled"),
|
|
5752
5752
|
okLabel: u("ok"),
|
|
5753
5753
|
onClose: () => {
|
|
5754
|
-
e = 3600,
|
|
5754
|
+
e = 3600, Bg(w), typeof h == "function" && h();
|
|
5755
5755
|
},
|
|
5756
5756
|
preventClose: !0
|
|
5757
5757
|
});
|
|
@@ -5759,7 +5759,7 @@ function Mt({
|
|
|
5759
5759
|
}
|
|
5760
5760
|
});
|
|
5761
5761
|
return f.appendChild(P), a.appendChild(f), window.addEventListener("beforeunload", () => {
|
|
5762
|
-
w &&
|
|
5762
|
+
w && Bg(w);
|
|
5763
5763
|
}), {
|
|
5764
5764
|
container: a,
|
|
5765
5765
|
setSelectedProvider(v) {
|
|
@@ -5812,15 +5812,15 @@ function Pt(A) {
|
|
|
5812
5812
|
)).data;
|
|
5813
5813
|
});
|
|
5814
5814
|
}
|
|
5815
|
-
var
|
|
5815
|
+
var kg = {}, MC, eQ;
|
|
5816
5816
|
function vt() {
|
|
5817
5817
|
return eQ || (eQ = 1, MC = function() {
|
|
5818
5818
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
5819
5819
|
}), MC;
|
|
5820
5820
|
}
|
|
5821
|
-
var PC = {},
|
|
5822
|
-
function
|
|
5823
|
-
if (oQ) return
|
|
5821
|
+
var PC = {}, Qg = {}, oQ;
|
|
5822
|
+
function vg() {
|
|
5823
|
+
if (oQ) return Qg;
|
|
5824
5824
|
oQ = 1;
|
|
5825
5825
|
let A;
|
|
5826
5826
|
const g = [
|
|
@@ -5867,26 +5867,26 @@ function Pg() {
|
|
|
5867
5867
|
3532,
|
|
5868
5868
|
3706
|
|
5869
5869
|
];
|
|
5870
|
-
return
|
|
5870
|
+
return Qg.getSymbolSize = function(C) {
|
|
5871
5871
|
if (!C) throw new Error('"version" cannot be null or undefined');
|
|
5872
5872
|
if (C < 1 || C > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
5873
5873
|
return C * 4 + 17;
|
|
5874
|
-
},
|
|
5874
|
+
}, Qg.getSymbolTotalCodewords = function(C) {
|
|
5875
5875
|
return g[C];
|
|
5876
|
-
},
|
|
5876
|
+
}, Qg.getBCHDigit = function(B) {
|
|
5877
5877
|
let C = 0;
|
|
5878
5878
|
for (; B !== 0; )
|
|
5879
5879
|
C++, B >>>= 1;
|
|
5880
5880
|
return C;
|
|
5881
|
-
},
|
|
5881
|
+
}, Qg.setToSJISFunction = function(C) {
|
|
5882
5882
|
if (typeof C != "function")
|
|
5883
5883
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
5884
5884
|
A = C;
|
|
5885
|
-
},
|
|
5885
|
+
}, Qg.isKanjiModeEnabled = function() {
|
|
5886
5886
|
return typeof A != "undefined";
|
|
5887
|
-
},
|
|
5887
|
+
}, Qg.toSJIS = function(C) {
|
|
5888
5888
|
return A(C);
|
|
5889
|
-
},
|
|
5889
|
+
}, Qg;
|
|
5890
5890
|
}
|
|
5891
5891
|
var vC = {}, aQ;
|
|
5892
5892
|
function EB() {
|
|
@@ -5973,7 +5973,7 @@ function Jt() {
|
|
|
5973
5973
|
var lC = {}, sQ;
|
|
5974
5974
|
function lt() {
|
|
5975
5975
|
return sQ || (sQ = 1, function(A) {
|
|
5976
|
-
const g =
|
|
5976
|
+
const g = vg().getSymbolSize;
|
|
5977
5977
|
A.getRowColCoords = function(C) {
|
|
5978
5978
|
if (C === 1) return [];
|
|
5979
5979
|
const Q = Math.floor(C / 7) + 2, I = g(C), E = I === 145 ? 26 : Math.ceil((I - 13) / (2 * Q - 2)) * 2, n = [I - 7];
|
|
@@ -5995,7 +5995,7 @@ var TC = {}, DQ;
|
|
|
5995
5995
|
function Tt() {
|
|
5996
5996
|
if (DQ) return TC;
|
|
5997
5997
|
DQ = 1;
|
|
5998
|
-
const A =
|
|
5998
|
+
const A = vg().getSymbolSize, g = 7;
|
|
5999
5999
|
return TC.getPositions = function(C) {
|
|
6000
6000
|
const Q = A(C);
|
|
6001
6001
|
return [
|
|
@@ -6561,7 +6561,7 @@ function MI() {
|
|
|
6561
6561
|
}, Cg;
|
|
6562
6562
|
}
|
|
6563
6563
|
var dQ;
|
|
6564
|
-
function
|
|
6564
|
+
function dg() {
|
|
6565
6565
|
return dQ || (dQ = 1, function(A) {
|
|
6566
6566
|
const g = fI(), B = MI();
|
|
6567
6567
|
A.NUMERIC = {
|
|
@@ -6625,7 +6625,7 @@ function vg() {
|
|
|
6625
6625
|
var JQ;
|
|
6626
6626
|
function xt() {
|
|
6627
6627
|
return JQ || (JQ = 1, function(A) {
|
|
6628
|
-
const g =
|
|
6628
|
+
const g = vg(), B = qI(), C = EB(), Q = dg(), I = fI(), E = 7973, n = g.getBCHDigit(E);
|
|
6629
6629
|
function t(e, w, s) {
|
|
6630
6630
|
for (let D = 1; D <= 40; D++)
|
|
6631
6631
|
if (w <= A.getCapacity(D, s, e))
|
|
@@ -6692,7 +6692,7 @@ var zC = {}, lQ;
|
|
|
6692
6692
|
function Gt() {
|
|
6693
6693
|
if (lQ) return zC;
|
|
6694
6694
|
lQ = 1;
|
|
6695
|
-
const A =
|
|
6695
|
+
const A = vg(), g = 1335, B = 21522, C = A.getBCHDigit(g);
|
|
6696
6696
|
return zC.getEncodedBits = function(I, E) {
|
|
6697
6697
|
const n = I.bit << 3 | E;
|
|
6698
6698
|
let t = n << 10;
|
|
@@ -6705,7 +6705,7 @@ var XC = {}, OC, TQ;
|
|
|
6705
6705
|
function zt() {
|
|
6706
6706
|
if (TQ) return OC;
|
|
6707
6707
|
TQ = 1;
|
|
6708
|
-
const A =
|
|
6708
|
+
const A = dg();
|
|
6709
6709
|
function g(B) {
|
|
6710
6710
|
this.mode = A.NUMERIC, this.data = B.toString();
|
|
6711
6711
|
}
|
|
@@ -6727,7 +6727,7 @@ var FC, HQ;
|
|
|
6727
6727
|
function Xt() {
|
|
6728
6728
|
if (HQ) return FC;
|
|
6729
6729
|
HQ = 1;
|
|
6730
|
-
const A =
|
|
6730
|
+
const A = dg(), g = [
|
|
6731
6731
|
"0",
|
|
6732
6732
|
"1",
|
|
6733
6733
|
"2",
|
|
@@ -6796,7 +6796,7 @@ var LC, kQ;
|
|
|
6796
6796
|
function Ot() {
|
|
6797
6797
|
if (kQ) return LC;
|
|
6798
6798
|
kQ = 1;
|
|
6799
|
-
const A =
|
|
6799
|
+
const A = dg();
|
|
6800
6800
|
function g(B) {
|
|
6801
6801
|
this.mode = A.BYTE, typeof B == "string" ? this.data = new TextEncoder().encode(B) : this.data = new Uint8Array(B);
|
|
6802
6802
|
}
|
|
@@ -6815,7 +6815,7 @@ var NC, YQ;
|
|
|
6815
6815
|
function Ft() {
|
|
6816
6816
|
if (YQ) return NC;
|
|
6817
6817
|
YQ = 1;
|
|
6818
|
-
const A =
|
|
6818
|
+
const A = dg(), g = vg();
|
|
6819
6819
|
function B(C) {
|
|
6820
6820
|
this.mode = A.KANJI, this.data = C;
|
|
6821
6821
|
}
|
|
@@ -6913,7 +6913,7 @@ function Lt() {
|
|
|
6913
6913
|
var xQ;
|
|
6914
6914
|
function Nt() {
|
|
6915
6915
|
return xQ || (xQ = 1, function(A) {
|
|
6916
|
-
const g =
|
|
6916
|
+
const g = dg(), B = zt(), C = Xt(), Q = Ot(), I = Ft(), E = MI(), n = vg(), t = Lt();
|
|
6917
6917
|
function c(k) {
|
|
6918
6918
|
return unescape(encodeURIComponent(k)).length;
|
|
6919
6919
|
}
|
|
@@ -7048,7 +7048,7 @@ var GQ;
|
|
|
7048
7048
|
function yt() {
|
|
7049
7049
|
if (GQ) return PC;
|
|
7050
7050
|
GQ = 1;
|
|
7051
|
-
const A =
|
|
7051
|
+
const A = vg(), g = EB(), B = dt(), C = Jt(), Q = lt(), I = Tt(), E = Ht(), n = qI(), t = Rt(), c = xt(), h = Gt(), a = dg(), e = Nt();
|
|
7052
7052
|
function w(d, r) {
|
|
7053
7053
|
const q = d.size, T = I.getPositions(r);
|
|
7054
7054
|
for (let R = 0; R < T.length; R++) {
|
|
@@ -7291,7 +7291,7 @@ function jt() {
|
|
|
7291
7291
|
}
|
|
7292
7292
|
var FQ;
|
|
7293
7293
|
function Kt() {
|
|
7294
|
-
if (FQ) return
|
|
7294
|
+
if (FQ) return kg;
|
|
7295
7295
|
FQ = 1;
|
|
7296
7296
|
const A = vt(), g = yt(), B = bt(), C = jt();
|
|
7297
7297
|
function Q(I, E, n, t, c) {
|
|
@@ -7321,9 +7321,9 @@ function Kt() {
|
|
|
7321
7321
|
c(w);
|
|
7322
7322
|
}
|
|
7323
7323
|
}
|
|
7324
|
-
return
|
|
7324
|
+
return kg.create = g.create, kg.toCanvas = Q.bind(null, B.render), kg.toDataURL = Q.bind(null, B.renderToDataURL), kg.toString = Q.bind(null, function(I, E, n) {
|
|
7325
7325
|
return C.render(I, n);
|
|
7326
|
-
}),
|
|
7326
|
+
}), kg;
|
|
7327
7327
|
}
|
|
7328
7328
|
var St = Kt();
|
|
7329
7329
|
const Ut = /* @__PURE__ */ jQ(St), pt = 5;
|
|
@@ -7365,18 +7365,18 @@ function Zt(n) {
|
|
|
7365
7365
|
theme: I,
|
|
7366
7366
|
selectedPromotions: (Q == null ? void 0 : Q.selectedPromotions) || [],
|
|
7367
7367
|
onResetToStep1: () => {
|
|
7368
|
-
Q != null && Q.onResetToStep1 && Q.onResetToStep1();
|
|
7368
|
+
Q != null && Q.onResetToStep1 && Q.onResetToStep1(), Bg(h);
|
|
7369
7369
|
}
|
|
7370
7370
|
}));
|
|
7371
7371
|
l.appendChild(q), s.appendChild(l);
|
|
7372
7372
|
const R = document.createElement("div");
|
|
7373
7373
|
R.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
|
|
7374
|
-
const O =
|
|
7374
|
+
const O = ng({
|
|
7375
7375
|
type: "button",
|
|
7376
7376
|
title: u("back"),
|
|
7377
7377
|
className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
|
|
7378
7378
|
handleClick: () => {
|
|
7379
|
-
g && g();
|
|
7379
|
+
g && (g(), Bg(h));
|
|
7380
7380
|
}
|
|
7381
7381
|
});
|
|
7382
7382
|
R.appendChild(O), s.appendChild(R);
|
|
@@ -7400,9 +7400,9 @@ function Zt(n) {
|
|
|
7400
7400
|
packages: o.packages,
|
|
7401
7401
|
promotionCodes: o.promotionCodes
|
|
7402
7402
|
})).orderId;
|
|
7403
|
-
N !== a && (a = N, E(N), yield z(N),
|
|
7403
|
+
N !== a && (a = N, E(N), yield z(N), T());
|
|
7404
7404
|
} catch (L) {
|
|
7405
|
-
console.error("Error creating order:", L),
|
|
7405
|
+
console.error("Error creating order:", L), Ig(u("errorCreatingOrder") || "Failed to create order");
|
|
7406
7406
|
return;
|
|
7407
7407
|
} finally {
|
|
7408
7408
|
k();
|
|
@@ -7438,11 +7438,11 @@ function Zt(n) {
|
|
|
7438
7438
|
accountName: (t == null ? void 0 : t.merchant_name) || "",
|
|
7439
7439
|
accountNumber: (t == null ? void 0 : t.va_account_no) || "",
|
|
7440
7440
|
bankName: (t == null ? void 0 : t.bank_code) || ""
|
|
7441
|
-
});
|
|
7441
|
+
}), K();
|
|
7442
7442
|
} catch (N) {
|
|
7443
7443
|
if (((P = (i = N.response) == null ? void 0 : i.data) == null ? void 0 : P.error_code) === "BILL_ID_EXISTED") {
|
|
7444
7444
|
if (console.log("Bill ID existed, recalling createOrder..."), e = !1, w++, w >= pt) {
|
|
7445
|
-
|
|
7445
|
+
Ig(u("errorQRGeneration"), {
|
|
7446
7446
|
okLabel: u("ok"),
|
|
7447
7447
|
onClose: () => {
|
|
7448
7448
|
g();
|
|
@@ -7453,7 +7453,7 @@ function Zt(n) {
|
|
|
7453
7453
|
yield Y();
|
|
7454
7454
|
return;
|
|
7455
7455
|
} else if (((L = (v = N.response) == null ? void 0 : v.data) == null ? void 0 : L.error_code) === "AUTHEN_FAIL") {
|
|
7456
|
-
|
|
7456
|
+
Ig(u("errorQRGeneration"), {
|
|
7457
7457
|
okLabel: u("ok"),
|
|
7458
7458
|
onClose: () => {
|
|
7459
7459
|
G();
|
|
@@ -7461,7 +7461,7 @@ function Zt(n) {
|
|
|
7461
7461
|
});
|
|
7462
7462
|
return;
|
|
7463
7463
|
} else
|
|
7464
|
-
|
|
7464
|
+
Ig(
|
|
7465
7465
|
u(
|
|
7466
7466
|
"errorQRGeneration",
|
|
7467
7467
|
"Không thể tạo mã QR thanh toán. Vui lòng thử lại."
|
|
@@ -7484,13 +7484,15 @@ function Zt(n) {
|
|
|
7484
7484
|
j = !navigator.onLine;
|
|
7485
7485
|
}
|
|
7486
7486
|
function K() {
|
|
7487
|
-
h &&
|
|
7487
|
+
h && Bg(h), h = setInterval(() => p(null, null, function* () {
|
|
7488
7488
|
var o, i;
|
|
7489
7489
|
try {
|
|
7490
7490
|
const P = yield wt(a);
|
|
7491
7491
|
if (P.paymentStatus === "pending")
|
|
7492
7492
|
return;
|
|
7493
|
-
const v = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed")
|
|
7493
|
+
const v = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed");
|
|
7494
|
+
Bg(h);
|
|
7495
|
+
const L = eC({
|
|
7494
7496
|
message: v,
|
|
7495
7497
|
okLabel: "OK",
|
|
7496
7498
|
isSuccess: P.paymentStatus === "paid",
|
|
@@ -7501,7 +7503,7 @@ function Zt(n) {
|
|
|
7501
7503
|
});
|
|
7502
7504
|
s.appendChild(L.container), L.open();
|
|
7503
7505
|
} catch (P) {
|
|
7504
|
-
j ?
|
|
7506
|
+
j ? Ig(u("errorNetwork"), {
|
|
7505
7507
|
okLabel: u("tryAgain"),
|
|
7506
7508
|
onClose: function() {
|
|
7507
7509
|
return p(this, null, function* () {
|
|
@@ -7509,14 +7511,14 @@ function Zt(n) {
|
|
|
7509
7511
|
});
|
|
7510
7512
|
},
|
|
7511
7513
|
isOffline: j
|
|
7512
|
-
}) : ((o = P.response) == null ? void 0 : o.status) === 404 ?
|
|
7514
|
+
}) : ((o = P.response) == null ? void 0 : o.status) === 404 ? Ig(u("errorOrderNotFound"), {
|
|
7513
7515
|
okLabel: u("tryAgain"),
|
|
7514
7516
|
onClose: function() {
|
|
7515
7517
|
return p(this, null, function* () {
|
|
7516
7518
|
yield Y();
|
|
7517
7519
|
});
|
|
7518
7520
|
}
|
|
7519
|
-
}) : ((i = P.response) == null ? void 0 : i.status) === 410 ?
|
|
7521
|
+
}) : ((i = P.response) == null ? void 0 : i.status) === 410 ? Ig(u("paymentTimeoutMessage"), {
|
|
7520
7522
|
okLabel: u("tryAgain"),
|
|
7521
7523
|
onClose: function() {
|
|
7522
7524
|
return p(this, null, function* () {
|
|
@@ -7527,8 +7529,8 @@ function Zt(n) {
|
|
|
7527
7529
|
}
|
|
7528
7530
|
}), 5e3), dI(h);
|
|
7529
7531
|
}
|
|
7530
|
-
return
|
|
7531
|
-
h &&
|
|
7532
|
+
return window.addEventListener("online", S), window.addEventListener("offline", S), window.addEventListener("beforeunload", function() {
|
|
7533
|
+
h && Bg(h);
|
|
7532
7534
|
}), { container: s };
|
|
7533
7535
|
});
|
|
7534
7536
|
}
|
|
@@ -7650,7 +7652,7 @@ function Vt({
|
|
|
7650
7652
|
K.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", K.appendChild(document.createTextNode(u("informationSent"))), j.appendChild(S), j.appendChild(K);
|
|
7651
7653
|
const o = document.createElement("div");
|
|
7652
7654
|
o.className = "wgt:w-full wgt:flex wgt:justify-center", n.appendChild(o);
|
|
7653
|
-
const i =
|
|
7655
|
+
const i = ng({
|
|
7654
7656
|
type: "button",
|
|
7655
7657
|
title: u("completeRegistration"),
|
|
7656
7658
|
className: "wgt:text-white",
|
|
@@ -7843,7 +7845,7 @@ let BC = /* @__PURE__ */ new Set();
|
|
|
7843
7845
|
function dI(A) {
|
|
7844
7846
|
A && BC.add(A);
|
|
7845
7847
|
}
|
|
7846
|
-
function
|
|
7848
|
+
function Bg(A) {
|
|
7847
7849
|
A && (BC.delete(A), window.clearInterval(A));
|
|
7848
7850
|
}
|
|
7849
7851
|
function E0() {
|
|
@@ -8131,5 +8133,5 @@ export {
|
|
|
8131
8133
|
l0 as InvoiceRegisterWidget,
|
|
8132
8134
|
dI as registerWidgetInterval,
|
|
8133
8135
|
E0 as stopAllIntervals,
|
|
8134
|
-
|
|
8136
|
+
Bg as unregisterWidgetInterval
|
|
8135
8137
|
};
|