@invoice-sdk/widget 1.69.2 → 1.69.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ var HI = Object.defineProperty, kI = Object.defineProperties;
|
|
|
2
2
|
var YI = 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), xI = (A) => {
|
|
6
6
|
throw TypeError(A);
|
|
7
7
|
};
|
|
8
8
|
var bB = (A, g, B) => g in A ? HI(A, g, { enumerable: !0, configurable: !0, writable: !0, value: B }) : A[g] = B, qA = (A, g) => {
|
|
@@ -37,37 +37,37 @@ var U = (A, g, B) => new Promise((C, Q) => {
|
|
|
37
37
|
}
|
|
38
38
|
}, n = (t) => t.done ? C(t.value) : Promise.resolve(t.value).then(I, E);
|
|
39
39
|
n((B = B.apply(A, g)).next());
|
|
40
|
-
}),
|
|
40
|
+
}), Dg = function(A, g) {
|
|
41
41
|
this[0] = A, this[1] = g;
|
|
42
42
|
}, DC = (A, g, B) => {
|
|
43
43
|
var C = (E, n, t, c) => {
|
|
44
44
|
try {
|
|
45
|
-
var h = B[E](n), a = (n = h.value) instanceof
|
|
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
|
}, rC = (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 || xI("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 AB, a as gB, 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 AB, a as gB, b as Eg, c as RI, m as GI, d as zI, f as XI, v as OI, r as bQ, u as jQ } from "./index-BzUJtmw5.js";
|
|
71
71
|
import { g as KQ } from "./_commonjsHelpers-bAxELxBV.js";
|
|
72
72
|
function UB({ steps: A = [], currentStep: g = 1 } = {}) {
|
|
73
73
|
const B = document.createElement("div");
|
|
@@ -575,7 +575,7 @@ function mC({
|
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
function
|
|
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 VQ(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, WQ = (A) => !Og(A) && A !== mg;
|
|
1034
1034
|
function UC() {
|
|
1035
1035
|
const { caseless: A } = WQ(this) && this || {}, g = {}, B = (C, Q) => {
|
|
1036
1036
|
const I = A && VQ(g, Q) || Q;
|
|
@@ -1139,14 +1139,14 @@ const RE = (A) => {
|
|
|
1139
1139
|
return C;
|
|
1140
1140
|
};
|
|
1141
1141
|
return B(A, 0);
|
|
1142
|
-
}, GE = UA("AsyncFunction"), zE = (A) => A && (Lg(A) || FA(A)) && FA(A.then) && FA(A.catch), $Q = ((A, g) => A ? setImmediate : g ? ((B, C) => (
|
|
1143
|
-
Q ===
|
|
1142
|
+
}, GE = UA("AsyncFunction"), zE = (A) => A && (Lg(A) || FA(A)) && FA(A.then) && FA(A.catch), $Q = ((A, g) => A ? setImmediate : g ? ((B, C) => (mg.addEventListener("message", ({ source: Q, data: I }) => {
|
|
1143
|
+
Q === mg && I === B && C.length && C.shift()();
|
|
1144
1144
|
}, !1), (Q) => {
|
|
1145
|
-
C.push(Q),
|
|
1145
|
+
C.push(Q), mg.postMessage(B, "*");
|
|
1146
1146
|
}))(`axios@${Math.random()}`, []) : (B) => setTimeout(B))(
|
|
1147
1147
|
typeof setImmediate == "function",
|
|
1148
|
-
FA(
|
|
1149
|
-
), XE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(
|
|
1148
|
+
FA(mg.postMessage)
|
|
1149
|
+
), XE = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(mg) : typeof process != "undefined" && process.nextTick || $Q, OE = (A) => A != null && FA(A[EC]), H = {
|
|
1150
1150
|
isArray: Yg,
|
|
1151
1151
|
isArrayBuffer: pQ,
|
|
1152
1152
|
isBuffer: Fg,
|
|
@@ -1196,7 +1196,7 @@ const RE = (A) => {
|
|
|
1196
1196
|
noop: kE,
|
|
1197
1197
|
toFiniteNumber: YE,
|
|
1198
1198
|
findKey: VQ,
|
|
1199
|
-
global:
|
|
1199
|
+
global: mg,
|
|
1200
1200
|
isContextDefined: WQ,
|
|
1201
1201
|
isSpecCompliantForm: xE,
|
|
1202
1202
|
toJSONObject: RE,
|
|
@@ -1898,7 +1898,7 @@ function hI(A, g, B) {
|
|
|
1898
1898
|
return A && (C || B == !1) ? on(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 cI = (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 = QI(hI(g.baseURL, g.url, g.allowAbsoluteUrls), A.params, A.paramsSerializer), n && E.set(
|
|
1969
1969
|
"Authorization",
|
|
@@ -2075,7 +2075,7 @@ const cI = (A) => {
|
|
|
2075
2075
|
}, rn = function(A, g) {
|
|
2076
2076
|
return DC(this, null, function* () {
|
|
2077
2077
|
try {
|
|
2078
|
-
for (var B = SB(mn(A)), C, Q, I; C = !(Q = yield new
|
|
2078
|
+
for (var B = SB(mn(A)), C, Q, I; C = !(Q = yield new Dg(B.next())).done; C = !1) {
|
|
2079
2079
|
const E = Q.value;
|
|
2080
2080
|
yield* rC(Dn(E, g));
|
|
2081
2081
|
}
|
|
@@ -2083,7 +2083,7 @@ const cI = (A) => {
|
|
|
2083
2083
|
I = [Q];
|
|
2084
2084
|
} finally {
|
|
2085
2085
|
try {
|
|
2086
|
-
C && (Q = B.return) && (yield new
|
|
2086
|
+
C && (Q = B.return) && (yield new Dg(Q.call(B)));
|
|
2087
2087
|
} finally {
|
|
2088
2088
|
if (I)
|
|
2089
2089
|
throw I[0];
|
|
@@ -2099,13 +2099,13 @@ const cI = (A) => {
|
|
|
2099
2099
|
const g = A.getReader();
|
|
2100
2100
|
try {
|
|
2101
2101
|
for (; ; ) {
|
|
2102
|
-
const { done: B, value: C } = yield new
|
|
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: ln,
|
|
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 = hI(g.baseURL, g.url, g.allowAbsoluteUrls);
|
|
2486
2486
|
return QI(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 Jn = class iI {
|
|
2514
2514
|
constructor(g) {
|
|
@@ -2660,13 +2660,13 @@ Object.entries(_C).forEach(([A, g]) => {
|
|
|
2660
2660
|
_C[g] = A;
|
|
2661
2661
|
});
|
|
2662
2662
|
function uI(A) {
|
|
2663
|
-
const g = new
|
|
2664
|
-
return H.extend(B,
|
|
2665
|
-
return uI(
|
|
2663
|
+
const g = new Mg(A), B = SQ(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 uI(Pg(A, Q));
|
|
2666
2666
|
}, B;
|
|
2667
2667
|
}
|
|
2668
2668
|
const rA = uI(yg);
|
|
2669
|
-
rA.Axios =
|
|
2669
|
+
rA.Axios = Mg;
|
|
2670
2670
|
rA.CanceledError = xg;
|
|
2671
2671
|
rA.CancelToken = Jn;
|
|
2672
2672
|
rA.isCancel = nI;
|
|
@@ -2679,7 +2679,7 @@ rA.all = function(g) {
|
|
|
2679
2679
|
};
|
|
2680
2680
|
rA.spread = Tn;
|
|
2681
2681
|
rA.isAxiosError = Hn;
|
|
2682
|
-
rA.mergeConfig =
|
|
2682
|
+
rA.mergeConfig = Pg;
|
|
2683
2683
|
rA.AxiosHeaders = LA;
|
|
2684
2684
|
rA.formToJSON = (A) => EI(H.isHTMLForm(A) ? new FormData(A) : A);
|
|
2685
2685
|
rA.getAdapter = oI.getAdapter;
|
|
@@ -2703,7 +2703,7 @@ const {
|
|
|
2703
2703
|
getAdapter: H0,
|
|
2704
2704
|
mergeConfig: k0
|
|
2705
2705
|
} = rA;
|
|
2706
|
-
let
|
|
2706
|
+
let tg = [], PA = null, qg = null;
|
|
2707
2707
|
const kn = 3;
|
|
2708
2708
|
function Yn() {
|
|
2709
2709
|
!PA && document.body && sI();
|
|
@@ -2717,11 +2717,11 @@ function sI() {
|
|
|
2717
2717
|
console.warn("Document body not available for notification container");
|
|
2718
2718
|
return;
|
|
2719
2719
|
}
|
|
2720
|
-
PA && PA.parentNode && PA.parentNode.removeChild(PA), PA = document.createElement("div"), PA.className = "wgt:fixed wgt:z-[99999] wgt:pointer-events-none", window.innerWidth >= 768 ? PA.className += " wgt:bottom-4 wgt:right-4" : PA.className += " wgt:top-4 wgt:right-4", document.body.appendChild(PA),
|
|
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 (Yn(), !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 >= kn && CC(tg[0].id);
|
|
2737
2737
|
const n = Date.now() + Math.random(), t = xn(n, A, {
|
|
2738
2738
|
autoClose: B,
|
|
2739
2739
|
hideProgressBar: C,
|
|
@@ -2741,7 +2741,7 @@ function pg(A, g = {}) {
|
|
|
2741
2741
|
icon: I,
|
|
2742
2742
|
type: E
|
|
2743
2743
|
});
|
|
2744
|
-
return
|
|
2744
|
+
return tg.push({ id: n, element: t }), PA.appendChild(t), requestAnimationFrame(() => {
|
|
2745
2745
|
t.classList.remove("wgt:translate-x-full", "wgt:opacity-0"), t.classList.add("wgt:translate-x-0", "wgt:opacity-100");
|
|
2746
2746
|
}), B > 0 && setTimeout(() => {
|
|
2747
2747
|
CC(n);
|
|
@@ -2810,20 +2810,20 @@ function xn(A, g, B) {
|
|
|
2810
2810
|
return t;
|
|
2811
2811
|
}
|
|
2812
2812
|
function CC(A) {
|
|
2813
|
-
const g =
|
|
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 DI() {
|
|
2821
|
-
|
|
2821
|
+
tg.forEach(({ id: A }) => CC(A));
|
|
2822
2822
|
}
|
|
2823
2823
|
function Rn() {
|
|
2824
|
-
DI(), PA && PA.parentNode && PA.parentNode.removeChild(PA),
|
|
2824
|
+
DI(), 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 IB(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 yn() {
|
|
|
3422
3422
|
zA -= 7;
|
|
3423
3423
|
OA += 7 - zA;
|
|
3424
3424
|
for (var fA = !1, dA = 0, NA = 0; dA < OA; dA++) {
|
|
3425
|
-
var vA = new Date(o, i, 1 + (dA - y)), ZA = s(this._d) ? m(vA, this._d) : !1,
|
|
3426
|
-
|
|
3425
|
+
var vA = new Date(o, i, 1 + (dA - y)), ZA = s(this._d) ? m(vA, this._d) : !1, hg = m(vA, L), cg = d.events.indexOf(vA.toDateString()) !== -1, wg = dA < y || dA >= N + y, VA = 1 + (dA - y), eg = i, bA = o, jA = d.startRange && m(d.startRange, vA), KA = d.endRange && m(d.endRange, vA), WA = d.startRange && d.endRange && d.startRange < vA && vA < d.endRange, og = d.minDate && vA < d.minDate || d.maxDate && vA > d.maxDate || d.disableWeekends && D(vA) || d.disableDayFn && d.disableDayFn(vA);
|
|
3426
|
+
wg && (dA < y ? (VA = XA + VA, eg = p, bA = oA) : (VA = VA - N, eg = tA, bA = wA));
|
|
3427
3427
|
var SA = {
|
|
3428
3428
|
day: VA,
|
|
3429
|
-
month:
|
|
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 Sn(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 Un() {
|
|
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 Un() {
|
|
|
3515
3515
|
function rI(A) {
|
|
3516
3516
|
return oC(this, null, function* () {
|
|
3517
3517
|
try {
|
|
3518
|
-
if (yield Un(), !
|
|
3518
|
+
if (yield Un(), !fg || !fg.InferenceSession)
|
|
3519
3519
|
throw new Error(
|
|
3520
3520
|
"ONNX Runtime is not properly loaded. Please check your internet connection and try again."
|
|
3521
3521
|
);
|
|
3522
3522
|
const g = Sn(A).modelUrl;
|
|
3523
|
-
if (typeof
|
|
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 Wn(A, g = 640) {
|
|
|
3609
3609
|
const c = n * g + t;
|
|
3610
3610
|
E[c] = I[c * 3], E[c + g * g] = I[c * 3 + 1], E[c + 2 * g * g] = I[c * 3 + 2];
|
|
3611
3611
|
}
|
|
3612
|
-
return new
|
|
3612
|
+
return new fg.Tensor("float32", E, [1, 3, g, g]);
|
|
3613
3613
|
}
|
|
3614
3614
|
function _n(A, g, B, C, Q = 0.5) {
|
|
3615
3615
|
const I = [], E = A.dims[1];
|
|
@@ -4124,9 +4124,9 @@ function Qt(t) {
|
|
|
4124
4124
|
), e.inputEl.value = "", w.inputEl.value = "", s.setValue && s.setValue("", "", ""), s.setDisabled(!1);
|
|
4125
4125
|
else {
|
|
4126
4126
|
if (e.inputEl.value = EA.ten_cty || "", w.inputEl.value = EA.dia_chi || "", EA.cqthue_ql) {
|
|
4127
|
-
const DA = (
|
|
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(), JA = DA(EA.cqthue_ql), Ag = d.find((ug) => {
|
|
4128
|
+
const Jg = DA(ug.label);
|
|
4129
|
+
return Jg.includes(JA) || JA.includes(Jg);
|
|
4130
4130
|
});
|
|
4131
4131
|
Ag && (s.setValue && s.setValue(
|
|
4132
4132
|
Ag.value,
|
|
@@ -4137,7 +4137,7 @@ function Qt(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 Qt(t) {
|
|
|
4187
4187
|
}, EA = (JA) => {
|
|
4188
4188
|
if (!JA) return "";
|
|
4189
4189
|
if (/^\d{8}$/.test(JA)) {
|
|
4190
|
-
const
|
|
4191
|
-
return `${
|
|
4190
|
+
const sg = JA.slice(0, 2), uC = JA.slice(2, 4), TI = JA.slice(4, 8);
|
|
4191
|
+
return `${sg}/${uC}/${TI}`;
|
|
4192
4192
|
}
|
|
4193
|
-
const [Ag,
|
|
4194
|
-
if (isNaN(
|
|
4195
|
-
const iC = String(
|
|
4193
|
+
const [Ag, ug, Jg] = JA.split("/"), Tg = new Date(+Jg, +ug - 1, +Ag);
|
|
4194
|
+
if (isNaN(Tg)) return "";
|
|
4195
|
+
const iC = String(Tg.getDate()).padStart(2, "0"), Rg = String(Tg.getMonth() + 1).padStart(2, "0"), Kg = Tg.getFullYear();
|
|
4196
4196
|
return `${iC}/${Rg}/${Kg}`;
|
|
4197
4197
|
}, DA = new Image();
|
|
4198
4198
|
DA.src = URL.createObjectURL(F), DA.onload = () => U(null, null, function* () {
|
|
@@ -4200,21 +4200,21 @@ function Qt(t) {
|
|
|
4200
4200
|
const JA = yield Ct(DA).then((Ag) => JSON.parse(Ag).status !== "success" ? (zA = !0, fA = !1, NA(), null) : JSON.parse(Ag).data);
|
|
4201
4201
|
if (JA) {
|
|
4202
4202
|
zA = !1, fA = !0, NA();
|
|
4203
|
-
const
|
|
4204
|
-
if (X(),
|
|
4205
|
-
|
|
4203
|
+
const ug = Object.values(JA).every((sg) => !sg);
|
|
4204
|
+
if (X(), ug) {
|
|
4205
|
+
wg(
|
|
4206
4206
|
u("errorInvalidCard", "Vui lòng tải lên ảnh CMND/CCCD hợp lệ")
|
|
4207
4207
|
), X();
|
|
4208
4208
|
return;
|
|
4209
4209
|
}
|
|
4210
|
-
const { address:
|
|
4211
|
-
if (!Rg || !/^\d{12}$/.test(Rg) ? (
|
|
4210
|
+
const { address: Jg, date_of_birth: Tg, full_name: iC, id_number: Rg, sex: Kg } = JA;
|
|
4211
|
+
if (!Rg || !/^\d{12}$/.test(Rg) ? (wg(
|
|
4212
4212
|
u("errorInvalidCard", "Số CCCD phải có 12 chữ số")
|
|
4213
|
-
), r.inputEl.value = "") : (r.inputEl.value = Rg, r.setError(null)), m.inputEl.value = iC || "", f.inputEl.value = EA(
|
|
4214
|
-
const
|
|
4213
|
+
), r.inputEl.value = "") : (r.inputEl.value = Rg, r.setError(null)), m.inputEl.value = iC || "", f.inputEl.value = EA(Tg), x.inputEl.value = Jg || "", Kg) {
|
|
4214
|
+
const sg = hQ.find(
|
|
4215
4215
|
(uC) => uC.label.toLowerCase() === Kg.toLowerCase()
|
|
4216
4216
|
);
|
|
4217
|
-
l.selectEl.value = (
|
|
4217
|
+
l.selectEl.value = (sg == null ? void 0 : sg.value) || "";
|
|
4218
4218
|
}
|
|
4219
4219
|
}
|
|
4220
4220
|
} catch (JA) {
|
|
@@ -4226,17 +4226,17 @@ function Qt(t) {
|
|
|
4226
4226
|
}
|
|
4227
4227
|
const {
|
|
4228
4228
|
container: ZA,
|
|
4229
|
-
getFrontFileError:
|
|
4230
|
-
getBackFileError:
|
|
4231
|
-
setFrontFileError:
|
|
4229
|
+
getFrontFileError: hg,
|
|
4230
|
+
getBackFileError: cg,
|
|
4231
|
+
setFrontFileError: wg,
|
|
4232
4232
|
getFrontFile: VA,
|
|
4233
|
-
getBackFile:
|
|
4233
|
+
getBackFile: eg
|
|
4234
4234
|
} = jI({
|
|
4235
4235
|
frontFile: g == null ? void 0 : g.idCard,
|
|
4236
4236
|
backFile: g == null ? void 0 : g.idCardBack,
|
|
4237
4237
|
onFrontChange: (F) => U(null, null, function* () {
|
|
4238
4238
|
var EA, DA;
|
|
4239
|
-
if (o = F,
|
|
4239
|
+
if (o = F, hg() || cg() || !eg()) {
|
|
4240
4240
|
zA = !1, fA = !1, NA(), AA();
|
|
4241
4241
|
return;
|
|
4242
4242
|
}
|
|
@@ -4248,7 +4248,7 @@ function Qt(t) {
|
|
|
4248
4248
|
}),
|
|
4249
4249
|
onBackChange: (F) => U(null, null, function* () {
|
|
4250
4250
|
var EA, DA;
|
|
4251
|
-
if (i = F,
|
|
4251
|
+
if (i = F, hg() || cg() || !VA()) {
|
|
4252
4252
|
zA = !1, fA = !1, NA(), AA();
|
|
4253
4253
|
return;
|
|
4254
4254
|
}
|
|
@@ -4269,23 +4269,23 @@ function Qt(t) {
|
|
|
4269
4269
|
KA.className = "wgt:grid wgt:grid-cols-1 wgt:md:grid-cols-4 wgt:gap-4 wgt:items-start", KA.appendChild(r.container), KA.appendChild(q.container), KA.appendChild(v.container), KA.appendChild(T.container), wA.appendChild(OA), wA.appendChild(KA), wA.appendChild(x.container), wA.appendChild(K.container);
|
|
4270
4270
|
const WA = document.createElement("ul");
|
|
4271
4271
|
WA.className = "wgt:list-inside wgt:list-disc wgt:-mt-2";
|
|
4272
|
-
const
|
|
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(J.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 lg = document.createElement("h3");
|
|
4286
|
+
lg.className = "wgt:text-lg wgt:font-semibold wgt:mb-2", lg.innerText = u("invoiceUsageInfo", "4. THÔNG TIN SỬ DỤNG HDDT:"), ig.appendChild(lg), h.appendChild(ig);
|
|
4287
4287
|
const _A = document.createElement("div");
|
|
4288
|
-
_A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container),
|
|
4288
|
+
_A.className = "wgt:w-full wgt:flex wgt:gap-4 wgt:items-start wgt:flex-row wgt:max-xl:flex-col", _A.appendChild(O.container), _A.appendChild(N.container), ig.appendChild(_A);
|
|
4289
4289
|
const mA = document.createElement("div");
|
|
4290
4290
|
mA.className = "wgt:flex wgt:flex-col wgt:space-y-4 wgt:border wgt:border-soft-200 wgt:px-6 wgt:py-4 wgt:rounded-xl", h.appendChild(mA);
|
|
4291
4291
|
const b = document.createElement("div");
|
|
@@ -4366,7 +4366,7 @@ function Qt(t) {
|
|
|
4366
4366
|
return !(!DA.test(X.contactPerson.phone) || !DA.test(X.legalRepresentative.phone) || !/^\d{12}$/.test(X.legalRepresentative.idCard) || !new RegExp("^(?!\\.)(?!.*\\.\\.)[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}(?<!\\.)@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z0-9-]{2,63}$").test(X.contactPerson.email) || !/^[1-9][CK]\d{2}[TDLMNBGHX][A-Z]{2}$/.test(X.invoiceSymbol) || !F.license || !F.logo || !F.idCard || !F.idCardBack);
|
|
4367
4367
|
}
|
|
4368
4368
|
function AA() {
|
|
4369
|
-
P.disabled = !BA() || !cA ||
|
|
4369
|
+
P.disabled = !BA() || !cA || hg() || cg() || S.getError() || K.getError();
|
|
4370
4370
|
}
|
|
4371
4371
|
function lA() {
|
|
4372
4372
|
var F, X;
|
|
@@ -4515,7 +4515,7 @@ function nt({
|
|
|
4515
4515
|
`, e.appendChild(w);
|
|
4516
4516
|
const s = document.createElement("span");
|
|
4517
4517
|
if (s.className = "wgt:ml-2 wgt:text-sm", g === "signature") {
|
|
4518
|
-
const J =
|
|
4518
|
+
const J = Eg(), m = u(A.duration.unit), f = J === "en" && A.duration.value > 1 ? m + "s" : m;
|
|
4519
4519
|
s.innerText = `${u("duration")}: ${A.duration.value} ${f} `;
|
|
4520
4520
|
} else typeof (A == null ? void 0 : A.limit) == "number" ? s.innerText = `${A == null ? void 0 : A.limit.toLocaleString(
|
|
4521
4521
|
"vi-VN"
|
|
@@ -4597,7 +4597,7 @@ function wQ({
|
|
|
4597
4597
|
}
|
|
4598
4598
|
};
|
|
4599
4599
|
}
|
|
4600
|
-
const tt = "1.69.
|
|
4600
|
+
const tt = "1.69.4";
|
|
4601
4601
|
function ht(B) {
|
|
4602
4602
|
return U(this, arguments, function* ({ search: A, bank: g }) {
|
|
4603
4603
|
return (yield pA.get(`${IC}`, {
|
|
@@ -4762,7 +4762,7 @@ function ut({
|
|
|
4762
4762
|
"wgt:text-sm",
|
|
4763
4763
|
"wgt:text-text-sub-600",
|
|
4764
4764
|
"wgt:mb-2"
|
|
4765
|
-
].join(" "), t.textContent =
|
|
4765
|
+
].join(" "), t.textContent = Eg() === "vi" ? A.name : A.nameEn, E.appendChild(t);
|
|
4766
4766
|
const { container: c } = QC({
|
|
4767
4767
|
checked: A.isSelected,
|
|
4768
4768
|
onChange: () => {
|
|
@@ -4804,7 +4804,7 @@ function st({
|
|
|
4804
4804
|
const J = B.trim().toLowerCase().replace(/\B(?=(\d{3})+(?!\d))/g, "."), m = yield ht({ search: J, bank: A });
|
|
4805
4805
|
m && (I = m), C && C();
|
|
4806
4806
|
} catch (J) {
|
|
4807
|
-
console.error("Error searching packages:", J),
|
|
4807
|
+
console.error("Error searching packages:", J), rg.error(u("errorSearchingPackages"), {
|
|
4808
4808
|
autoClose: 5e3,
|
|
4809
4809
|
closeButton: !0,
|
|
4810
4810
|
icon: !0
|
|
@@ -5012,14 +5012,14 @@ function ft(k) {
|
|
|
5012
5012
|
vA.className = "wgt:text-xl wgt:font-bold wgt:text-primary", vA.innerText = "0 VND", dA.appendChild(vA);
|
|
5013
5013
|
const ZA = document.createElement("div");
|
|
5014
5014
|
ZA.className = "wgt:flex wgt:justify-between wgt:gap-2", S.appendChild(ZA);
|
|
5015
|
-
const
|
|
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) => U(null, null, function* () {
|
|
5023
5023
|
o();
|
|
5024
5024
|
const gA = w.eInvoiceRegistration, { isUsedEInvoiceBefore: CA } = gA, $ = sC(gA, ["isUsedEInvoiceBefore"]);
|
|
5025
5025
|
let cA = [
|
|
@@ -5060,10 +5060,10 @@ function ft(k) {
|
|
|
5060
5060
|
});
|
|
5061
5061
|
t(hA.orderId), A();
|
|
5062
5062
|
} catch (hA) {
|
|
5063
|
-
console.error("Error creating order:", hA),
|
|
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 ft(k) {
|
|
|
5078
5078
|
quantity: G
|
|
5079
5079
|
}), I(QA)) : I(null);
|
|
5080
5080
|
let W = yA(qA({}, b), { quantity: Y }), CA = yA(qA({}, nA), { quantity: z });
|
|
5081
|
-
E(W), n(CA), s(l), yield
|
|
5081
|
+
E(W), n(CA), s(l), yield cg(
|
|
5082
5082
|
QA,
|
|
5083
5083
|
W,
|
|
5084
5084
|
CA,
|
|
@@ -5086,7 +5086,7 @@ function ft(k) {
|
|
|
5086
5086
|
);
|
|
5087
5087
|
})
|
|
5088
5088
|
});
|
|
5089
|
-
ZA.appendChild(
|
|
5089
|
+
ZA.appendChild(wg);
|
|
5090
5090
|
function VA() {
|
|
5091
5091
|
return U(this, null, function* () {
|
|
5092
5092
|
var b, nA, QA, W, CA;
|
|
@@ -5110,12 +5110,12 @@ function ft(k) {
|
|
|
5110
5110
|
if ($.status === "fulfilled" ? x = ((QA = $.value) == null ? void 0 : QA.isNewCustomer) || !1 : (console.error(
|
|
5111
5111
|
"Failed to check new customer:",
|
|
5112
5112
|
$.reason
|
|
5113
|
-
),
|
|
5113
|
+
), rg.error(
|
|
5114
5114
|
u("errorCheckingCustomer") || "Failed to check customer status"
|
|
5115
5115
|
), x = !1), gA.status === "fulfilled" ? r = gA.value || [] : (console.error(
|
|
5116
5116
|
"Failed to load init packages:",
|
|
5117
5117
|
gA.reason
|
|
5118
|
-
),
|
|
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 ft(k) {
|
|
|
5135
5135
|
});
|
|
5136
5136
|
}), Object.keys(q).length > 0 && (l = 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
|
+
), lg())) : 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
|
(xA) => T.includes(xA.code)
|
|
@@ -5147,7 +5147,7 @@ function ft(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 ft(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
|
), v = [];
|
|
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 ft(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 ft(k) {
|
|
|
5210
5210
|
($) => $._id === m
|
|
5211
5211
|
)) == null ? void 0 : W.code, QA = (CA = y().find(($) => $._id === b)) == null ? void 0 : CA.code;
|
|
5212
5212
|
bA(nA, QA, () => {
|
|
5213
|
-
m = b, jA.setSelectedPackageId(b), V(y()),
|
|
5213
|
+
m = b, jA.setSelectedPackageId(b), V(y()), ig(), ag(), _A(), Y = 1, mA();
|
|
5214
5214
|
});
|
|
5215
5215
|
}
|
|
5216
5216
|
}), L.appendChild(jA.container);
|
|
@@ -5220,7 +5220,7 @@ function ft(k) {
|
|
|
5220
5220
|
}
|
|
5221
5221
|
}
|
|
5222
5222
|
let WA = null;
|
|
5223
|
-
function
|
|
5223
|
+
function og() {
|
|
5224
5224
|
if (wA.innerHTML = "", v.length > 0)
|
|
5225
5225
|
WA = wQ({
|
|
5226
5226
|
type: "signature",
|
|
@@ -5234,7 +5234,7 @@ function ft(k) {
|
|
|
5234
5234
|
($) => $._id === f
|
|
5235
5235
|
)) == null ? void 0 : W.code, QA = (CA = v.find(($) => $._id === b)) == null ? void 0 : CA.code;
|
|
5236
5236
|
bA(nA, QA, () => {
|
|
5237
|
-
f = b, WA.setSelectedPackageId(b),
|
|
5237
|
+
f = b, WA.setSelectedPackageId(b), ig(), ag(), _A(), z = 1, mA();
|
|
5238
5238
|
});
|
|
5239
5239
|
}
|
|
5240
5240
|
}), wA.appendChild(WA.container);
|
|
@@ -5245,7 +5245,7 @@ function ft(k) {
|
|
|
5245
5245
|
}
|
|
5246
5246
|
const SA = document.createElement("div");
|
|
5247
5247
|
SA.className = "wgt:w-full", P.appendChild(SA);
|
|
5248
|
-
function
|
|
5248
|
+
function ag() {
|
|
5249
5249
|
XA.remove(), SA.innerHTML = "";
|
|
5250
5250
|
const b = y().find(
|
|
5251
5251
|
(nA) => nA._id === m
|
|
@@ -5258,7 +5258,7 @@ function ft(k) {
|
|
|
5258
5258
|
r[0].price
|
|
5259
5259
|
)} VND`,
|
|
5260
5260
|
required: !0,
|
|
5261
|
-
description:
|
|
5261
|
+
description: Eg() === "vi" ? r[0].name : r[0].nameEn,
|
|
5262
5262
|
isChecked: x && !(b != null && b.withoutInitialFee)
|
|
5263
5263
|
});
|
|
5264
5264
|
SA.appendChild(nA);
|
|
@@ -5266,7 +5266,7 @@ function ft(k) {
|
|
|
5266
5266
|
}
|
|
5267
5267
|
const YA = document.createElement("div");
|
|
5268
5268
|
YA.className = "promotion-wrapper wgt:w-full wgt:flex wgt:flex-col wgt:gap-4";
|
|
5269
|
-
function
|
|
5269
|
+
function ig() {
|
|
5270
5270
|
const b = y().find(
|
|
5271
5271
|
(QA) => QA._id === m
|
|
5272
5272
|
), nA = v.find(
|
|
@@ -5286,9 +5286,9 @@ function ft(k) {
|
|
|
5286
5286
|
W.isDisabled = !CA, !CA && l.includes(W.code) ? l = l.filter(
|
|
5287
5287
|
($) => $ !== W.code
|
|
5288
5288
|
) : CA && !l.includes(W.code) && l.push(W.code);
|
|
5289
|
-
}),
|
|
5289
|
+
}), lg();
|
|
5290
5290
|
}
|
|
5291
|
-
function
|
|
5291
|
+
function lg() {
|
|
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 ft(k) {
|
|
|
5312
5312
|
}).forEach((hA) => {
|
|
5313
5313
|
const eA = document.createElement("div");
|
|
5314
5314
|
eA.className = "wgt:flex wgt:w-fit wgt:h-fit wgt:items-center wgt:gap-2 wgt:px-2 wgt:py-1.5 wgt:rounded-md wgt:bg-primary/10 wgt:border wgt:border-primary wgt:text-sm wgt:font-medium wgt:text-primary", eA.innerText = hA;
|
|
5315
|
-
const Z =
|
|
5315
|
+
const Z = ng({
|
|
5316
5316
|
type: "button",
|
|
5317
5317
|
title: "x",
|
|
5318
5318
|
handleClick: () => {
|
|
@@ -5327,7 +5327,7 @@ function ft(k) {
|
|
|
5327
5327
|
</svg>
|
|
5328
5328
|
`, eA.appendChild(Z), W.appendChild(eA);
|
|
5329
5329
|
});
|
|
5330
|
-
const CA =
|
|
5330
|
+
const CA = ng({
|
|
5331
5331
|
type: "button",
|
|
5332
5332
|
title: u("apply"),
|
|
5333
5333
|
className: "wgt:text-white wgt:bg-primary",
|
|
@@ -5377,7 +5377,7 @@ function ft(k) {
|
|
|
5377
5377
|
const R = document.createElement("tr");
|
|
5378
5378
|
R.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5379
5379
|
const BA = document.createElement("td");
|
|
5380
|
-
BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText =
|
|
5380
|
+
BA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", BA.innerText = Eg() === "vi" ? r[0].name : r[0].nameEn, R.appendChild(BA);
|
|
5381
5381
|
const AA = document.createElement("td");
|
|
5382
5382
|
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", AA.innerText = u("package"), R.appendChild(AA);
|
|
5383
5383
|
const lA = document.createElement("td");
|
|
@@ -5420,7 +5420,7 @@ function ft(k) {
|
|
|
5420
5420
|
const BA = document.createElement("tr");
|
|
5421
5421
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5422
5422
|
const AA = document.createElement("td");
|
|
5423
|
-
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText =
|
|
5423
|
+
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Eg() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
|
|
5424
5424
|
const lA = document.createElement("td");
|
|
5425
5425
|
lA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", lA.innerText = u("package"), BA.appendChild(lA);
|
|
5426
5426
|
const uA = document.createElement("td");
|
|
@@ -5464,7 +5464,7 @@ function ft(k) {
|
|
|
5464
5464
|
const BA = document.createElement("tr");
|
|
5465
5465
|
BA.className = "wgt:max-sm:block wgt:max-sm:mb-4 wgt:max-sm:p-4 wgt:max-sm:bg-white wgt:max-sm:rounded-lg wgt:max-sm:border wgt:max-sm:border-soft-200 wgt:max-sm:shadow-sm";
|
|
5466
5466
|
const AA = document.createElement("td");
|
|
5467
|
-
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText =
|
|
5467
|
+
AA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:col-span-2 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-2 wgt:max-sm:text-base wgt:max-sm:font-semibold", AA.innerText = Eg() === "vi" ? R == null ? void 0 : R.name : R == null ? void 0 : R.nameEn, BA.appendChild(AA);
|
|
5468
5468
|
const lA = document.createElement("td");
|
|
5469
5469
|
lA.className = "wgt:whitespace-nowrap wgt:px-3 wgt:py-5 wgt:text-left wgt:text-sm wgt:text-strong-950 wgt:font-medium wgt:max-sm:hidden", lA.innerText = u("package"), BA.appendChild(lA);
|
|
5470
5470
|
const uA = document.createElement("td");
|
|
@@ -5516,7 +5516,7 @@ function ft(k) {
|
|
|
5516
5516
|
AA.colSpan = 3, AA.className = "wgt:px-3 wgt:py-2 wgt:text-sm wgt:col-span-3 wgt:max-sm:col-span-5 wgt:max-sm:block wgt:max-sm:px-0 wgt:max-sm:py-1", AA.innerHTML = `
|
|
5517
5517
|
<div class="wgt:flex wgt:flex-row wgt:items-center wgt:gap-2 wgt:max-sm:justify-start">
|
|
5518
5518
|
<img src="${qt}" alt="ticket" class="wgt:w-4 wgt:max-sm:w-5">
|
|
5519
|
-
<span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${
|
|
5519
|
+
<span class="wgt:text-text-sub-600 wgt:max-sm:text-sm wgt:max-sm:font-medium">${Eg() === "vi" ? R == null ? void 0 : R.name : (R == null ? void 0 : R.nameEn) || (R == null ? void 0 : R.code)}</span>
|
|
5520
5520
|
</div>
|
|
5521
5521
|
`, BA.appendChild(AA);
|
|
5522
5522
|
const lA = document.createElement("td");
|
|
@@ -5669,15 +5669,15 @@ function dt(A) {
|
|
|
5669
5669
|
)).data;
|
|
5670
5670
|
});
|
|
5671
5671
|
}
|
|
5672
|
-
var
|
|
5672
|
+
var kg = {}, PC, eQ;
|
|
5673
5673
|
function vt() {
|
|
5674
5674
|
return eQ || (eQ = 1, PC = function() {
|
|
5675
5675
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
5676
5676
|
}), PC;
|
|
5677
5677
|
}
|
|
5678
|
-
var dC = {},
|
|
5679
|
-
function
|
|
5680
|
-
if (oQ) return
|
|
5678
|
+
var dC = {}, Qg = {}, oQ;
|
|
5679
|
+
function dg() {
|
|
5680
|
+
if (oQ) return Qg;
|
|
5681
5681
|
oQ = 1;
|
|
5682
5682
|
let A;
|
|
5683
5683
|
const g = [
|
|
@@ -5724,26 +5724,26 @@ function Pg() {
|
|
|
5724
5724
|
3532,
|
|
5725
5725
|
3706
|
|
5726
5726
|
];
|
|
5727
|
-
return
|
|
5727
|
+
return Qg.getSymbolSize = function(C) {
|
|
5728
5728
|
if (!C) throw new Error('"version" cannot be null or undefined');
|
|
5729
5729
|
if (C < 1 || C > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
5730
5730
|
return C * 4 + 17;
|
|
5731
|
-
},
|
|
5731
|
+
}, Qg.getSymbolTotalCodewords = function(C) {
|
|
5732
5732
|
return g[C];
|
|
5733
|
-
},
|
|
5733
|
+
}, Qg.getBCHDigit = function(B) {
|
|
5734
5734
|
let C = 0;
|
|
5735
5735
|
for (; B !== 0; )
|
|
5736
5736
|
C++, B >>>= 1;
|
|
5737
5737
|
return C;
|
|
5738
|
-
},
|
|
5738
|
+
}, Qg.setToSJISFunction = function(C) {
|
|
5739
5739
|
if (typeof C != "function")
|
|
5740
5740
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
5741
5741
|
A = C;
|
|
5742
|
-
},
|
|
5742
|
+
}, Qg.isKanjiModeEnabled = function() {
|
|
5743
5743
|
return typeof A != "undefined";
|
|
5744
|
-
},
|
|
5744
|
+
}, Qg.toSJIS = function(C) {
|
|
5745
5745
|
return A(C);
|
|
5746
|
-
},
|
|
5746
|
+
}, Qg;
|
|
5747
5747
|
}
|
|
5748
5748
|
var vC = {}, aQ;
|
|
5749
5749
|
function nB() {
|
|
@@ -5830,7 +5830,7 @@ function Jt() {
|
|
|
5830
5830
|
var TC = {}, sQ;
|
|
5831
5831
|
function Tt() {
|
|
5832
5832
|
return sQ || (sQ = 1, function(A) {
|
|
5833
|
-
const g =
|
|
5833
|
+
const g = dg().getSymbolSize;
|
|
5834
5834
|
A.getRowColCoords = function(C) {
|
|
5835
5835
|
if (C === 1) return [];
|
|
5836
5836
|
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];
|
|
@@ -5852,7 +5852,7 @@ var HC = {}, DQ;
|
|
|
5852
5852
|
function Ht() {
|
|
5853
5853
|
if (DQ) return HC;
|
|
5854
5854
|
DQ = 1;
|
|
5855
|
-
const A =
|
|
5855
|
+
const A = dg().getSymbolSize, g = 7;
|
|
5856
5856
|
return HC.getPositions = function(C) {
|
|
5857
5857
|
const Q = A(C);
|
|
5858
5858
|
return [
|
|
@@ -6418,7 +6418,7 @@ function PI() {
|
|
|
6418
6418
|
}, Cg;
|
|
6419
6419
|
}
|
|
6420
6420
|
var vQ;
|
|
6421
|
-
function
|
|
6421
|
+
function vg() {
|
|
6422
6422
|
return vQ || (vQ = 1, function(A) {
|
|
6423
6423
|
const g = MI(), B = PI();
|
|
6424
6424
|
A.NUMERIC = {
|
|
@@ -6482,7 +6482,7 @@ function dg() {
|
|
|
6482
6482
|
var lQ;
|
|
6483
6483
|
function Gt() {
|
|
6484
6484
|
return lQ || (lQ = 1, function(A) {
|
|
6485
|
-
const g =
|
|
6485
|
+
const g = dg(), B = fI(), C = nB(), Q = vg(), I = MI(), E = 7973, n = g.getBCHDigit(E);
|
|
6486
6486
|
function t(e, w, s) {
|
|
6487
6487
|
for (let D = 1; D <= 40; D++)
|
|
6488
6488
|
if (w <= A.getCapacity(D, s, e))
|
|
@@ -6549,7 +6549,7 @@ var XC = {}, JQ;
|
|
|
6549
6549
|
function zt() {
|
|
6550
6550
|
if (JQ) return XC;
|
|
6551
6551
|
JQ = 1;
|
|
6552
|
-
const A =
|
|
6552
|
+
const A = dg(), g = 1335, B = 21522, C = A.getBCHDigit(g);
|
|
6553
6553
|
return XC.getEncodedBits = function(I, E) {
|
|
6554
6554
|
const n = I.bit << 3 | E;
|
|
6555
6555
|
let t = n << 10;
|
|
@@ -6562,7 +6562,7 @@ var OC = {}, FC, TQ;
|
|
|
6562
6562
|
function Xt() {
|
|
6563
6563
|
if (TQ) return FC;
|
|
6564
6564
|
TQ = 1;
|
|
6565
|
-
const A =
|
|
6565
|
+
const A = vg();
|
|
6566
6566
|
function g(B) {
|
|
6567
6567
|
this.mode = A.NUMERIC, this.data = B.toString();
|
|
6568
6568
|
}
|
|
@@ -6584,7 +6584,7 @@ var LC, HQ;
|
|
|
6584
6584
|
function Ot() {
|
|
6585
6585
|
if (HQ) return LC;
|
|
6586
6586
|
HQ = 1;
|
|
6587
|
-
const A =
|
|
6587
|
+
const A = vg(), g = [
|
|
6588
6588
|
"0",
|
|
6589
6589
|
"1",
|
|
6590
6590
|
"2",
|
|
@@ -6653,7 +6653,7 @@ var NC, kQ;
|
|
|
6653
6653
|
function Ft() {
|
|
6654
6654
|
if (kQ) return NC;
|
|
6655
6655
|
kQ = 1;
|
|
6656
|
-
const A =
|
|
6656
|
+
const A = vg();
|
|
6657
6657
|
function g(B) {
|
|
6658
6658
|
this.mode = A.BYTE, typeof B == "string" ? this.data = new TextEncoder().encode(B) : this.data = new Uint8Array(B);
|
|
6659
6659
|
}
|
|
@@ -6672,7 +6672,7 @@ var yC, YQ;
|
|
|
6672
6672
|
function Lt() {
|
|
6673
6673
|
if (YQ) return yC;
|
|
6674
6674
|
YQ = 1;
|
|
6675
|
-
const A =
|
|
6675
|
+
const A = vg(), g = dg();
|
|
6676
6676
|
function B(C) {
|
|
6677
6677
|
this.mode = A.KANJI, this.data = C;
|
|
6678
6678
|
}
|
|
@@ -6770,7 +6770,7 @@ function Nt() {
|
|
|
6770
6770
|
var RQ;
|
|
6771
6771
|
function yt() {
|
|
6772
6772
|
return RQ || (RQ = 1, function(A) {
|
|
6773
|
-
const g =
|
|
6773
|
+
const g = vg(), B = Xt(), C = Ot(), Q = Ft(), I = Lt(), E = PI(), n = dg(), t = Nt();
|
|
6774
6774
|
function c(k) {
|
|
6775
6775
|
return unescape(encodeURIComponent(k)).length;
|
|
6776
6776
|
}
|
|
@@ -6905,7 +6905,7 @@ var GQ;
|
|
|
6905
6905
|
function bt() {
|
|
6906
6906
|
if (GQ) return dC;
|
|
6907
6907
|
GQ = 1;
|
|
6908
|
-
const A =
|
|
6908
|
+
const A = dg(), g = nB(), B = lt(), C = Jt(), Q = Tt(), I = Ht(), E = kt(), n = fI(), t = Rt(), c = Gt(), h = zt(), a = vg(), e = yt();
|
|
6909
6909
|
function w(v, r) {
|
|
6910
6910
|
const q = v.size, T = I.getPositions(r);
|
|
6911
6911
|
for (let x = 0; x < T.length; x++) {
|
|
@@ -7148,7 +7148,7 @@ function Kt() {
|
|
|
7148
7148
|
}
|
|
7149
7149
|
var FQ;
|
|
7150
7150
|
function St() {
|
|
7151
|
-
if (FQ) return
|
|
7151
|
+
if (FQ) return kg;
|
|
7152
7152
|
FQ = 1;
|
|
7153
7153
|
const A = vt(), g = bt(), B = jt(), C = Kt();
|
|
7154
7154
|
function Q(I, E, n, t, c) {
|
|
@@ -7178,9 +7178,9 @@ function St() {
|
|
|
7178
7178
|
c(w);
|
|
7179
7179
|
}
|
|
7180
7180
|
}
|
|
7181
|
-
return
|
|
7181
|
+
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) {
|
|
7182
7182
|
return C.render(I, n);
|
|
7183
|
-
}),
|
|
7183
|
+
}), kg;
|
|
7184
7184
|
}
|
|
7185
7185
|
var Ut = St();
|
|
7186
7186
|
const pt = /* @__PURE__ */ KQ(Ut);
|
|
@@ -7224,7 +7224,7 @@ function Zt({
|
|
|
7224
7224
|
k();
|
|
7225
7225
|
const J = () => {
|
|
7226
7226
|
w = setInterval(() => {
|
|
7227
|
-
e--, k(), e <= 0 &&
|
|
7227
|
+
e--, k(), e <= 0 && Bg(w);
|
|
7228
7228
|
}, 1e3), lI(w);
|
|
7229
7229
|
};
|
|
7230
7230
|
J(), s.appendChild(D);
|
|
@@ -7271,7 +7271,7 @@ function Zt({
|
|
|
7271
7271
|
const z = document.createElement("h4");
|
|
7272
7272
|
z.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", z.innerText = u("digitalSignaturePackage");
|
|
7273
7273
|
const j = document.createElement("span");
|
|
7274
|
-
if (j.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black",
|
|
7274
|
+
if (j.className = "wgt:text-base wgt:font-semibold wgt:leading-6 wgt:text-text-black", Eg(), u(B.duration.unit), j.innerText = B ? `${String(B == null ? void 0 : B.code)}` : "", Y.appendChild(z), Y.appendChild(j), l.appendChild(Y), c && c.length > 0) {
|
|
7275
7275
|
const d = document.createElement("div");
|
|
7276
7276
|
d.className = "wgt:w-full wgt:flex wgt:items-start wgt:justify-between wgt:gap-[0.5rem]";
|
|
7277
7277
|
const L = document.createElement("h4");
|
|
@@ -7290,16 +7290,16 @@ function Zt({
|
|
|
7290
7290
|
o.className = "wgt:text-sm wgt:font-normal wgt:leading-5 wgt:text-[#475467]", o.innerText = u("paymentAmount");
|
|
7291
7291
|
const i = document.createElement("span");
|
|
7292
7292
|
i.className = "wgt:text-2xl wgt:font-bold wgt:leading-6 wgt:text-[#ED1C24]", i.innerText = I.toLocaleString("vi-VN") + " VND", K.appendChild(o), K.appendChild(i), l.appendChild(K), f.appendChild(l);
|
|
7293
|
-
const P =
|
|
7293
|
+
const P = ng({
|
|
7294
7294
|
title: u("cancelTransaction"),
|
|
7295
7295
|
className: "wgt:bg-transparent wgt:border wgt:border-primary wgt:text-primary wgt:hover:bg-transparent",
|
|
7296
7296
|
handleClick: () => {
|
|
7297
|
-
w &&
|
|
7297
|
+
w && Bg(w);
|
|
7298
7298
|
const { container: d, open: L } = eC({
|
|
7299
7299
|
message: u("transactionCanceled"),
|
|
7300
7300
|
okLabel: u("ok"),
|
|
7301
7301
|
onClose: () => {
|
|
7302
|
-
e = 3600,
|
|
7302
|
+
e = 3600, Bg(w), typeof h == "function" && h();
|
|
7303
7303
|
},
|
|
7304
7304
|
preventClose: !0
|
|
7305
7305
|
});
|
|
@@ -7307,7 +7307,7 @@ function Zt({
|
|
|
7307
7307
|
}
|
|
7308
7308
|
});
|
|
7309
7309
|
return f.appendChild(P), a.appendChild(f), window.addEventListener("beforeunload", () => {
|
|
7310
|
-
w &&
|
|
7310
|
+
w && Bg(w);
|
|
7311
7311
|
}), {
|
|
7312
7312
|
container: a,
|
|
7313
7313
|
setSelectedProvider(d) {
|
|
@@ -7366,18 +7366,18 @@ function Wt(n) {
|
|
|
7366
7366
|
theme: I,
|
|
7367
7367
|
selectedPromotions: (Q == null ? void 0 : Q.selectedPromotions) || [],
|
|
7368
7368
|
onResetToStep1: () => {
|
|
7369
|
-
Q != null && Q.onResetToStep1 && Q.onResetToStep1();
|
|
7369
|
+
Q != null && Q.onResetToStep1 && Q.onResetToStep1(), Bg(h);
|
|
7370
7370
|
}
|
|
7371
7371
|
}));
|
|
7372
7372
|
J.appendChild(q), s.appendChild(J);
|
|
7373
7373
|
const x = document.createElement("div");
|
|
7374
7374
|
x.className = "wgt:flex wgt:items-center wgt:justify-between wgt:gap-2";
|
|
7375
|
-
const O =
|
|
7375
|
+
const O = ng({
|
|
7376
7376
|
type: "button",
|
|
7377
7377
|
title: u("back"),
|
|
7378
7378
|
className: "wgt:bg-transparent wgt:!text-primary wgt:hover:bg-transparent wgt:underline",
|
|
7379
7379
|
handleClick: () => {
|
|
7380
|
-
g && g();
|
|
7380
|
+
g && (g(), Bg(h));
|
|
7381
7381
|
}
|
|
7382
7382
|
});
|
|
7383
7383
|
x.appendChild(O), s.appendChild(x);
|
|
@@ -7401,9 +7401,9 @@ function Wt(n) {
|
|
|
7401
7401
|
packages: o.packages,
|
|
7402
7402
|
promotionCodes: o.promotionCodes
|
|
7403
7403
|
})).orderId;
|
|
7404
|
-
N !== a && (a = N, E(N), yield z(N),
|
|
7404
|
+
N !== a && (a = N, E(N), yield z(N), T());
|
|
7405
7405
|
} catch (L) {
|
|
7406
|
-
console.error("Error creating order:", L),
|
|
7406
|
+
console.error("Error creating order:", L), Ig(u("errorCreatingOrder") || "Failed to create order");
|
|
7407
7407
|
return;
|
|
7408
7408
|
} finally {
|
|
7409
7409
|
k();
|
|
@@ -7439,11 +7439,11 @@ function Wt(n) {
|
|
|
7439
7439
|
accountName: (t == null ? void 0 : t.merchant_name) || "",
|
|
7440
7440
|
accountNumber: (t == null ? void 0 : t.va_account_no) || "",
|
|
7441
7441
|
bankName: (t == null ? void 0 : t.bank_code) || ""
|
|
7442
|
-
});
|
|
7442
|
+
}), K();
|
|
7443
7443
|
} catch (N) {
|
|
7444
7444
|
if (((P = (i = N.response) == null ? void 0 : i.data) == null ? void 0 : P.error_code) === "BILL_ID_EXISTED") {
|
|
7445
7445
|
if (console.log("Bill ID existed, recalling createOrder..."), e = !1, w++, w >= Vt) {
|
|
7446
|
-
|
|
7446
|
+
Ig(u("errorQRGeneration"), {
|
|
7447
7447
|
okLabel: u("ok"),
|
|
7448
7448
|
onClose: () => {
|
|
7449
7449
|
g();
|
|
@@ -7454,7 +7454,7 @@ function Wt(n) {
|
|
|
7454
7454
|
yield Y();
|
|
7455
7455
|
return;
|
|
7456
7456
|
} else if (((L = (d = N.response) == null ? void 0 : d.data) == null ? void 0 : L.error_code) === "AUTHEN_FAIL") {
|
|
7457
|
-
|
|
7457
|
+
Ig(u("errorQRGeneration"), {
|
|
7458
7458
|
okLabel: u("ok"),
|
|
7459
7459
|
onClose: () => {
|
|
7460
7460
|
G();
|
|
@@ -7462,7 +7462,7 @@ function Wt(n) {
|
|
|
7462
7462
|
});
|
|
7463
7463
|
return;
|
|
7464
7464
|
} else
|
|
7465
|
-
|
|
7465
|
+
Ig(
|
|
7466
7466
|
u(
|
|
7467
7467
|
"errorQRGeneration",
|
|
7468
7468
|
"Không thể tạo mã QR thanh toán. Vui lòng thử lại."
|
|
@@ -7485,13 +7485,15 @@ function Wt(n) {
|
|
|
7485
7485
|
j = !navigator.onLine;
|
|
7486
7486
|
}
|
|
7487
7487
|
function K() {
|
|
7488
|
-
h &&
|
|
7488
|
+
h && Bg(h), h = setInterval(() => U(null, null, function* () {
|
|
7489
7489
|
var o, i;
|
|
7490
7490
|
try {
|
|
7491
7491
|
const P = yield ot(a);
|
|
7492
7492
|
if (P.paymentStatus === "pending")
|
|
7493
7493
|
return;
|
|
7494
|
-
const d = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed")
|
|
7494
|
+
const d = P.paymentStatus === "paid" ? u("paymentSuccess") : u("paymentFailed");
|
|
7495
|
+
Bg(h);
|
|
7496
|
+
const L = eC({
|
|
7495
7497
|
message: d,
|
|
7496
7498
|
okLabel: "OK",
|
|
7497
7499
|
isSuccess: P.paymentStatus === "paid",
|
|
@@ -7502,7 +7504,7 @@ function Wt(n) {
|
|
|
7502
7504
|
});
|
|
7503
7505
|
s.appendChild(L.container), L.open();
|
|
7504
7506
|
} catch (P) {
|
|
7505
|
-
j ?
|
|
7507
|
+
j ? Ig(u("errorNetwork"), {
|
|
7506
7508
|
okLabel: u("tryAgain"),
|
|
7507
7509
|
onClose: function() {
|
|
7508
7510
|
return U(this, null, function* () {
|
|
@@ -7510,14 +7512,14 @@ function Wt(n) {
|
|
|
7510
7512
|
});
|
|
7511
7513
|
},
|
|
7512
7514
|
isOffline: j
|
|
7513
|
-
}) : ((o = P.response) == null ? void 0 : o.status) === 404 ?
|
|
7515
|
+
}) : ((o = P.response) == null ? void 0 : o.status) === 404 ? Ig(u("errorOrderNotFound"), {
|
|
7514
7516
|
okLabel: u("tryAgain"),
|
|
7515
7517
|
onClose: function() {
|
|
7516
7518
|
return U(this, null, function* () {
|
|
7517
7519
|
yield Y();
|
|
7518
7520
|
});
|
|
7519
7521
|
}
|
|
7520
|
-
}) : ((i = P.response) == null ? void 0 : i.status) === 410 ?
|
|
7522
|
+
}) : ((i = P.response) == null ? void 0 : i.status) === 410 ? Ig(u("paymentTimeoutMessage"), {
|
|
7521
7523
|
okLabel: u("tryAgain"),
|
|
7522
7524
|
onClose: function() {
|
|
7523
7525
|
return U(this, null, function* () {
|
|
@@ -7528,8 +7530,8 @@ function Wt(n) {
|
|
|
7528
7530
|
}
|
|
7529
7531
|
}), 5e3), lI(h);
|
|
7530
7532
|
}
|
|
7531
|
-
return
|
|
7532
|
-
h &&
|
|
7533
|
+
return window.addEventListener("online", S), window.addEventListener("offline", S), window.addEventListener("beforeunload", function() {
|
|
7534
|
+
h && Bg(h);
|
|
7533
7535
|
}), { container: s };
|
|
7534
7536
|
});
|
|
7535
7537
|
}
|
|
@@ -7651,7 +7653,7 @@ function _t({
|
|
|
7651
7653
|
K.className = "wgt:text-sm wgt:font-medium wgt:text-strong-950 wgt:leading-tight", K.appendChild(document.createTextNode(u("informationSent"))), j.appendChild(S), j.appendChild(K);
|
|
7652
7654
|
const o = document.createElement("div");
|
|
7653
7655
|
o.className = "wgt:w-full wgt:flex wgt:justify-center", n.appendChild(o);
|
|
7654
|
-
const i =
|
|
7656
|
+
const i = ng({
|
|
7655
7657
|
type: "button",
|
|
7656
7658
|
title: u("completeRegistration"),
|
|
7657
7659
|
className: "wgt:text-white",
|
|
@@ -7941,7 +7943,7 @@ let BC = /* @__PURE__ */ new Set();
|
|
|
7941
7943
|
function lI(A) {
|
|
7942
7944
|
A && BC.add(A);
|
|
7943
7945
|
}
|
|
7944
|
-
function
|
|
7946
|
+
function Bg(A) {
|
|
7945
7947
|
A && (BC.delete(A), window.clearInterval(A));
|
|
7946
7948
|
}
|
|
7947
7949
|
function c0() {
|
|
@@ -8229,5 +8231,5 @@ export {
|
|
|
8229
8231
|
Y0 as InvoiceRegisterWidget,
|
|
8230
8232
|
lI as registerWidgetInterval,
|
|
8231
8233
|
c0 as stopAllIntervals,
|
|
8232
|
-
|
|
8234
|
+
Bg as unregisterWidgetInterval
|
|
8233
8235
|
};
|