@invoice-sdk/widget 1.57.1 → 1.57.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.
- package/dist/assets/viettel.svg +9 -0
- package/dist/index-SGvrfl7e.js +2669 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +40 -40
- package/dist/widget-ZihesbkG.js +9284 -0
- package/package.json +1 -1
- package/dist/index-VMoQE495.js +0 -2641
- package/dist/widget-BZ3nvlsE.js +0 -9288
package/dist/index-VMoQE495.js
DELETED
|
@@ -1,2641 +0,0 @@
|
|
|
1
|
-
var dt = Object.defineProperty, ht = Object.defineProperties;
|
|
2
|
-
var ft = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var xe = Object.getOwnPropertySymbols;
|
|
4
|
-
var gt = Object.prototype.hasOwnProperty, pt = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var ke = (o, e, t) => e in o ? dt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, p = (o, e) => {
|
|
6
|
-
for (var t in e || (e = {}))
|
|
7
|
-
gt.call(e, t) && ke(o, t, e[t]);
|
|
8
|
-
if (xe)
|
|
9
|
-
for (var t of xe(e))
|
|
10
|
-
pt.call(e, t) && ke(o, t, e[t]);
|
|
11
|
-
return o;
|
|
12
|
-
}, x = (o, e) => ht(o, ft(e));
|
|
13
|
-
var re = (o, e, t) => new Promise((n, i) => {
|
|
14
|
-
var s = (c) => {
|
|
15
|
-
try {
|
|
16
|
-
a(t.next(c));
|
|
17
|
-
} catch (l) {
|
|
18
|
-
i(l);
|
|
19
|
-
}
|
|
20
|
-
}, r = (c) => {
|
|
21
|
-
try {
|
|
22
|
-
a(t.throw(c));
|
|
23
|
-
} catch (l) {
|
|
24
|
-
i(l);
|
|
25
|
-
}
|
|
26
|
-
}, a = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(s, r);
|
|
27
|
-
a((t = t.apply(o, e)).next());
|
|
28
|
-
});
|
|
29
|
-
const m = (o) => typeof o == "string", z = () => {
|
|
30
|
-
let o, e;
|
|
31
|
-
const t = new Promise((n, i) => {
|
|
32
|
-
o = n, e = i;
|
|
33
|
-
});
|
|
34
|
-
return t.resolve = o, t.reject = e, t;
|
|
35
|
-
}, Pe = (o) => o == null ? "" : "" + o, mt = (o, e, t) => {
|
|
36
|
-
o.forEach((n) => {
|
|
37
|
-
e[n] && (t[n] = e[n]);
|
|
38
|
-
});
|
|
39
|
-
}, yt = /###/g, we = (o) => o && o.indexOf("###") > -1 ? o.replace(yt, ".") : o, Ce = (o) => !o || m(o), G = (o, e, t) => {
|
|
40
|
-
const n = m(e) ? e.split(".") : e;
|
|
41
|
-
let i = 0;
|
|
42
|
-
for (; i < n.length - 1; ) {
|
|
43
|
-
if (Ce(o)) return {};
|
|
44
|
-
const s = we(n[i]);
|
|
45
|
-
!o[s] && t && (o[s] = new t()), Object.prototype.hasOwnProperty.call(o, s) ? o = o[s] : o = {}, ++i;
|
|
46
|
-
}
|
|
47
|
-
return Ce(o) ? {} : {
|
|
48
|
-
obj: o,
|
|
49
|
-
k: we(n[i])
|
|
50
|
-
};
|
|
51
|
-
}, Te = (o, e, t) => {
|
|
52
|
-
const {
|
|
53
|
-
obj: n,
|
|
54
|
-
k: i
|
|
55
|
-
} = G(o, e, Object);
|
|
56
|
-
if (n !== void 0 || e.length === 1) {
|
|
57
|
-
n[i] = t;
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
let s = e[e.length - 1], r = e.slice(0, e.length - 1), a = G(o, r, Object);
|
|
61
|
-
for (; a.obj === void 0 && r.length; )
|
|
62
|
-
s = `${r[r.length - 1]}.${s}`, r = r.slice(0, r.length - 1), a = G(o, r, Object), a != null && a.obj && typeof a.obj[`${a.k}.${s}`] != "undefined" && (a.obj = void 0);
|
|
63
|
-
a.obj[`${a.k}.${s}`] = t;
|
|
64
|
-
}, vt = (o, e, t, n) => {
|
|
65
|
-
const {
|
|
66
|
-
obj: i,
|
|
67
|
-
k: s
|
|
68
|
-
} = G(o, e, Object);
|
|
69
|
-
i[s] = i[s] || [], i[s].push(t);
|
|
70
|
-
}, te = (o, e) => {
|
|
71
|
-
const {
|
|
72
|
-
obj: t,
|
|
73
|
-
k: n
|
|
74
|
-
} = G(o, e);
|
|
75
|
-
if (t && Object.prototype.hasOwnProperty.call(t, n))
|
|
76
|
-
return t[n];
|
|
77
|
-
}, bt = (o, e, t) => {
|
|
78
|
-
const n = te(o, t);
|
|
79
|
-
return n !== void 0 ? n : te(e, t);
|
|
80
|
-
}, Xe = (o, e, t) => {
|
|
81
|
-
for (const n in e)
|
|
82
|
-
n !== "__proto__" && n !== "constructor" && (n in o ? m(o[n]) || o[n] instanceof String || m(e[n]) || e[n] instanceof String ? t && (o[n] = e[n]) : Xe(o[n], e[n], t) : o[n] = e[n]);
|
|
83
|
-
return o;
|
|
84
|
-
}, j = (o) => o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
85
|
-
var St = {
|
|
86
|
-
"&": "&",
|
|
87
|
-
"<": "<",
|
|
88
|
-
">": ">",
|
|
89
|
-
'"': """,
|
|
90
|
-
"'": "'",
|
|
91
|
-
"/": "/"
|
|
92
|
-
};
|
|
93
|
-
const $t = (o) => m(o) ? o.replace(/[&<>"'\/]/g, (e) => St[e]) : o;
|
|
94
|
-
class xt {
|
|
95
|
-
constructor(e) {
|
|
96
|
-
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
97
|
-
}
|
|
98
|
-
getRegExp(e) {
|
|
99
|
-
const t = this.regExpMap.get(e);
|
|
100
|
-
if (t !== void 0)
|
|
101
|
-
return t;
|
|
102
|
-
const n = new RegExp(e);
|
|
103
|
-
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const kt = [" ", ",", "?", "!", ";"], Pt = new xt(20), wt = (o, e, t) => {
|
|
107
|
-
e = e || "", t = t || "";
|
|
108
|
-
const n = kt.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
|
|
109
|
-
if (n.length === 0) return !0;
|
|
110
|
-
const i = Pt.getRegExp(`(${n.map((r) => r === "?" ? "\\?" : r).join("|")})`);
|
|
111
|
-
let s = !i.test(o);
|
|
112
|
-
if (!s) {
|
|
113
|
-
const r = o.indexOf(t);
|
|
114
|
-
r > 0 && !i.test(o.substring(0, r)) && (s = !0);
|
|
115
|
-
}
|
|
116
|
-
return s;
|
|
117
|
-
}, fe = (o, e, t = ".") => {
|
|
118
|
-
if (!o) return;
|
|
119
|
-
if (o[e])
|
|
120
|
-
return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : void 0;
|
|
121
|
-
const n = e.split(t);
|
|
122
|
-
let i = o;
|
|
123
|
-
for (let s = 0; s < n.length; ) {
|
|
124
|
-
if (!i || typeof i != "object")
|
|
125
|
-
return;
|
|
126
|
-
let r, a = "";
|
|
127
|
-
for (let c = s; c < n.length; ++c)
|
|
128
|
-
if (c !== s && (a += t), a += n[c], r = i[a], r !== void 0) {
|
|
129
|
-
if (["string", "number", "boolean"].indexOf(typeof r) > -1 && c < n.length - 1)
|
|
130
|
-
continue;
|
|
131
|
-
s += c - s + 1;
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
i = r;
|
|
135
|
-
}
|
|
136
|
-
return i;
|
|
137
|
-
}, W = (o) => o == null ? void 0 : o.replace("_", "-"), Ct = {
|
|
138
|
-
type: "logger",
|
|
139
|
-
log(o) {
|
|
140
|
-
this.output("log", o);
|
|
141
|
-
},
|
|
142
|
-
warn(o) {
|
|
143
|
-
this.output("warn", o);
|
|
144
|
-
},
|
|
145
|
-
error(o) {
|
|
146
|
-
this.output("error", o);
|
|
147
|
-
},
|
|
148
|
-
output(o, e) {
|
|
149
|
-
var t, n;
|
|
150
|
-
(n = (t = console == null ? void 0 : console[o]) == null ? void 0 : t.apply) == null || n.call(t, console, e);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
class ne {
|
|
154
|
-
constructor(e, t = {}) {
|
|
155
|
-
this.init(e, t);
|
|
156
|
-
}
|
|
157
|
-
init(e, t = {}) {
|
|
158
|
-
this.prefix = t.prefix || "i18next:", this.logger = e || Ct, this.options = t, this.debug = t.debug;
|
|
159
|
-
}
|
|
160
|
-
log(...e) {
|
|
161
|
-
return this.forward(e, "log", "", !0);
|
|
162
|
-
}
|
|
163
|
-
warn(...e) {
|
|
164
|
-
return this.forward(e, "warn", "", !0);
|
|
165
|
-
}
|
|
166
|
-
error(...e) {
|
|
167
|
-
return this.forward(e, "error", "");
|
|
168
|
-
}
|
|
169
|
-
deprecate(...e) {
|
|
170
|
-
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
171
|
-
}
|
|
172
|
-
forward(e, t, n, i) {
|
|
173
|
-
return i && !this.debug ? null : (m(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
174
|
-
}
|
|
175
|
-
create(e) {
|
|
176
|
-
return new ne(this.logger, p({
|
|
177
|
-
prefix: `${this.prefix}:${e}:`
|
|
178
|
-
}, this.options));
|
|
179
|
-
}
|
|
180
|
-
clone(e) {
|
|
181
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new ne(this.logger, e);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
var I = new ne();
|
|
185
|
-
class se {
|
|
186
|
-
constructor() {
|
|
187
|
-
this.observers = {};
|
|
188
|
-
}
|
|
189
|
-
on(e, t) {
|
|
190
|
-
return e.split(" ").forEach((n) => {
|
|
191
|
-
this.observers[n] || (this.observers[n] = /* @__PURE__ */ new Map());
|
|
192
|
-
const i = this.observers[n].get(t) || 0;
|
|
193
|
-
this.observers[n].set(t, i + 1);
|
|
194
|
-
}), this;
|
|
195
|
-
}
|
|
196
|
-
off(e, t) {
|
|
197
|
-
if (this.observers[e]) {
|
|
198
|
-
if (!t) {
|
|
199
|
-
delete this.observers[e];
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
this.observers[e].delete(t);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
emit(e, ...t) {
|
|
206
|
-
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([i, s]) => {
|
|
207
|
-
for (let r = 0; r < s; r++)
|
|
208
|
-
i(...t);
|
|
209
|
-
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([i, s]) => {
|
|
210
|
-
for (let r = 0; r < s; r++)
|
|
211
|
-
i.apply(i, [e, ...t]);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
class Oe extends se {
|
|
216
|
-
constructor(e, t = {
|
|
217
|
-
ns: ["translation"],
|
|
218
|
-
defaultNS: "translation"
|
|
219
|
-
}) {
|
|
220
|
-
super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
|
|
221
|
-
}
|
|
222
|
-
addNamespaces(e) {
|
|
223
|
-
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
|
|
224
|
-
}
|
|
225
|
-
removeNamespaces(e) {
|
|
226
|
-
const t = this.options.ns.indexOf(e);
|
|
227
|
-
t > -1 && this.options.ns.splice(t, 1);
|
|
228
|
-
}
|
|
229
|
-
getResource(e, t, n, i = {}) {
|
|
230
|
-
var l, d;
|
|
231
|
-
const s = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, r = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
232
|
-
let a;
|
|
233
|
-
e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], n && (Array.isArray(n) ? a.push(...n) : m(n) && s ? a.push(...n.split(s)) : a.push(n)));
|
|
234
|
-
const c = te(this.data, a);
|
|
235
|
-
return !c && !t && !n && e.indexOf(".") > -1 && (e = a[0], t = a[1], n = a.slice(2).join(".")), c || !r || !m(n) ? c : fe((d = (l = this.data) == null ? void 0 : l[e]) == null ? void 0 : d[t], n, s);
|
|
236
|
-
}
|
|
237
|
-
addResource(e, t, n, i, s = {
|
|
238
|
-
silent: !1
|
|
239
|
-
}) {
|
|
240
|
-
const r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
|
|
241
|
-
let a = [e, t];
|
|
242
|
-
n && (a = a.concat(r ? n.split(r) : n)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), Te(this.data, a, i), s.silent || this.emit("added", e, t, n, i);
|
|
243
|
-
}
|
|
244
|
-
addResources(e, t, n, i = {
|
|
245
|
-
silent: !1
|
|
246
|
-
}) {
|
|
247
|
-
for (const s in n)
|
|
248
|
-
(m(n[s]) || Array.isArray(n[s])) && this.addResource(e, t, s, n[s], {
|
|
249
|
-
silent: !0
|
|
250
|
-
});
|
|
251
|
-
i.silent || this.emit("added", e, t, n);
|
|
252
|
-
}
|
|
253
|
-
addResourceBundle(e, t, n, i, s, r = {
|
|
254
|
-
silent: !1,
|
|
255
|
-
skipCopy: !1
|
|
256
|
-
}) {
|
|
257
|
-
let a = [e, t];
|
|
258
|
-
e.indexOf(".") > -1 && (a = e.split("."), i = n, n = t, t = a[1]), this.addNamespaces(t);
|
|
259
|
-
let c = te(this.data, a) || {};
|
|
260
|
-
r.skipCopy || (n = JSON.parse(JSON.stringify(n))), i ? Xe(c, n, s) : c = p(p({}, c), n), Te(this.data, a, c), r.silent || this.emit("added", e, t, n);
|
|
261
|
-
}
|
|
262
|
-
removeResourceBundle(e, t) {
|
|
263
|
-
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
264
|
-
}
|
|
265
|
-
hasResourceBundle(e, t) {
|
|
266
|
-
return this.getResource(e, t) !== void 0;
|
|
267
|
-
}
|
|
268
|
-
getResourceBundle(e, t) {
|
|
269
|
-
return t || (t = this.options.defaultNS), this.getResource(e, t);
|
|
270
|
-
}
|
|
271
|
-
getDataByLanguage(e) {
|
|
272
|
-
return this.data[e];
|
|
273
|
-
}
|
|
274
|
-
hasLanguageSomeTranslations(e) {
|
|
275
|
-
const t = this.getDataByLanguage(e);
|
|
276
|
-
return !!(t && Object.keys(t) || []).find((i) => t[i] && Object.keys(t[i]).length > 0);
|
|
277
|
-
}
|
|
278
|
-
toJSON() {
|
|
279
|
-
return this.data;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
var Je = {
|
|
283
|
-
processors: {},
|
|
284
|
-
addPostProcessor(o) {
|
|
285
|
-
this.processors[o.name] = o;
|
|
286
|
-
},
|
|
287
|
-
handle(o, e, t, n, i) {
|
|
288
|
-
return o.forEach((s) => {
|
|
289
|
-
var r, a;
|
|
290
|
-
e = (a = (r = this.processors[s]) == null ? void 0 : r.process(e, t, n, i)) != null ? a : e;
|
|
291
|
-
}), e;
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
const Le = {}, Ie = (o) => !m(o) && typeof o != "boolean" && typeof o != "number";
|
|
295
|
-
class ie extends se {
|
|
296
|
-
constructor(e, t = {}) {
|
|
297
|
-
super(), mt(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = I.create("translator");
|
|
298
|
-
}
|
|
299
|
-
changeLanguage(e) {
|
|
300
|
-
e && (this.language = e);
|
|
301
|
-
}
|
|
302
|
-
exists(e, t = {
|
|
303
|
-
interpolation: {}
|
|
304
|
-
}) {
|
|
305
|
-
const n = p({}, t);
|
|
306
|
-
if (e == null) return !1;
|
|
307
|
-
const i = this.resolve(e, n);
|
|
308
|
-
return (i == null ? void 0 : i.res) !== void 0;
|
|
309
|
-
}
|
|
310
|
-
extractFromKey(e, t) {
|
|
311
|
-
let n = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
|
|
312
|
-
n === void 0 && (n = ":");
|
|
313
|
-
const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
314
|
-
let s = t.ns || this.options.defaultNS || [];
|
|
315
|
-
const r = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !wt(e, n, i);
|
|
316
|
-
if (r && !a) {
|
|
317
|
-
const c = e.match(this.interpolator.nestingRegexp);
|
|
318
|
-
if (c && c.length > 0)
|
|
319
|
-
return {
|
|
320
|
-
key: e,
|
|
321
|
-
namespaces: m(s) ? [s] : s
|
|
322
|
-
};
|
|
323
|
-
const l = e.split(n);
|
|
324
|
-
(n !== i || n === i && this.options.ns.indexOf(l[0]) > -1) && (s = l.shift()), e = l.join(i);
|
|
325
|
-
}
|
|
326
|
-
return {
|
|
327
|
-
key: e,
|
|
328
|
-
namespaces: m(s) ? [s] : s
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
translate(e, t, n) {
|
|
332
|
-
let i = typeof t == "object" ? p({}, t) : t;
|
|
333
|
-
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof options == "object" && (i = p({}, i)), i || (i = {}), e == null) return "";
|
|
334
|
-
Array.isArray(e) || (e = [String(e)]);
|
|
335
|
-
const s = i.returnDetails !== void 0 ? i.returnDetails : this.options.returnDetails, r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, {
|
|
336
|
-
key: a,
|
|
337
|
-
namespaces: c
|
|
338
|
-
} = this.extractFromKey(e[e.length - 1], i), l = c[c.length - 1];
|
|
339
|
-
let d = i.nsSeparator !== void 0 ? i.nsSeparator : this.options.nsSeparator;
|
|
340
|
-
d === void 0 && (d = ":");
|
|
341
|
-
const u = i.lng || this.language, g = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
342
|
-
if ((u == null ? void 0 : u.toLowerCase()) === "cimode")
|
|
343
|
-
return g ? s ? {
|
|
344
|
-
res: `${l}${d}${a}`,
|
|
345
|
-
usedKey: a,
|
|
346
|
-
exactUsedKey: a,
|
|
347
|
-
usedLng: u,
|
|
348
|
-
usedNS: l,
|
|
349
|
-
usedParams: this.getUsedParamsDetails(i)
|
|
350
|
-
} : `${l}${d}${a}` : s ? {
|
|
351
|
-
res: a,
|
|
352
|
-
usedKey: a,
|
|
353
|
-
exactUsedKey: a,
|
|
354
|
-
usedLng: u,
|
|
355
|
-
usedNS: l,
|
|
356
|
-
usedParams: this.getUsedParamsDetails(i)
|
|
357
|
-
} : a;
|
|
358
|
-
const f = this.resolve(e, i);
|
|
359
|
-
let h = f == null ? void 0 : f.res;
|
|
360
|
-
const y = (f == null ? void 0 : f.usedKey) || a, v = (f == null ? void 0 : f.exactUsedKey) || a, C = ["[object Number]", "[object Function]", "[object RegExp]"], w = i.joinArrays !== void 0 ? i.joinArrays : this.options.joinArrays, F = !this.i18nFormat || this.i18nFormat.handleAsObject, $ = i.count !== void 0 && !m(i.count), N = ie.hasDefaultValue(i), J = $ ? this.pluralResolver.getSuffix(u, i.count, i) : "", R = i.ordinal && $ ? this.pluralResolver.getSuffix(u, i.count, {
|
|
361
|
-
ordinal: !1
|
|
362
|
-
}) : "", B = $ && !i.ordinal && i.count === 0, k = B && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${J}`] || i[`defaultValue${R}`] || i.defaultValue;
|
|
363
|
-
let S = h;
|
|
364
|
-
F && !h && N && (S = k);
|
|
365
|
-
const lt = Ie(S), ut = Object.prototype.toString.apply(S);
|
|
366
|
-
if (F && S && lt && C.indexOf(ut) < 0 && !(m(w) && Array.isArray(S))) {
|
|
367
|
-
if (!i.returnObjects && !this.options.returnObjects) {
|
|
368
|
-
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
369
|
-
const O = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(y, S, x(p({}, i), {
|
|
370
|
-
ns: c
|
|
371
|
-
})) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
372
|
-
return s ? (f.res = O, f.usedParams = this.getUsedParamsDetails(i), f) : O;
|
|
373
|
-
}
|
|
374
|
-
if (r) {
|
|
375
|
-
const O = Array.isArray(S), T = O ? [] : {}, ve = O ? v : y;
|
|
376
|
-
for (const L in S)
|
|
377
|
-
if (Object.prototype.hasOwnProperty.call(S, L)) {
|
|
378
|
-
const A = `${ve}${r}${L}`;
|
|
379
|
-
N && !h ? T[L] = this.translate(A, x(p({}, i), {
|
|
380
|
-
defaultValue: Ie(k) ? k[L] : void 0,
|
|
381
|
-
joinArrays: !1,
|
|
382
|
-
ns: c
|
|
383
|
-
})) : T[L] = this.translate(A, x(p({}, i), {
|
|
384
|
-
joinArrays: !1,
|
|
385
|
-
ns: c
|
|
386
|
-
})), T[L] === A && (T[L] = S[L]);
|
|
387
|
-
}
|
|
388
|
-
h = T;
|
|
389
|
-
}
|
|
390
|
-
} else if (F && m(w) && Array.isArray(h))
|
|
391
|
-
h = h.join(w), h && (h = this.extendTranslation(h, e, i, n));
|
|
392
|
-
else {
|
|
393
|
-
let O = !1, T = !1;
|
|
394
|
-
!this.isValidLookup(h) && N && (O = !0, h = k), this.isValidLookup(h) || (T = !0, h = a);
|
|
395
|
-
const L = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && T ? void 0 : h, A = N && k !== h && this.options.updateMissing;
|
|
396
|
-
if (T || O || A) {
|
|
397
|
-
if (this.logger.log(A ? "updateKey" : "missingKey", u, l, a, A ? k : h), r) {
|
|
398
|
-
const P = this.resolve(a, x(p({}, i), {
|
|
399
|
-
keySeparator: !1
|
|
400
|
-
}));
|
|
401
|
-
P && P.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
402
|
-
}
|
|
403
|
-
let V = [];
|
|
404
|
-
const Y = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
|
|
405
|
-
if (this.options.saveMissingTo === "fallback" && Y && Y[0])
|
|
406
|
-
for (let P = 0; P < Y.length; P++)
|
|
407
|
-
V.push(Y[P]);
|
|
408
|
-
else this.options.saveMissingTo === "all" ? V = this.languageUtils.toResolveHierarchy(i.lng || this.language) : V.push(i.lng || this.language);
|
|
409
|
-
const be = (P, D, q) => {
|
|
410
|
-
var $e;
|
|
411
|
-
const Se = N && q !== h ? q : L;
|
|
412
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(P, l, D, Se, A, i) : ($e = this.backendConnector) != null && $e.saveMissing && this.backendConnector.saveMissing(P, l, D, Se, A, i), this.emit("missingKey", P, l, D, h);
|
|
413
|
-
};
|
|
414
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && $ ? V.forEach((P) => {
|
|
415
|
-
const D = this.pluralResolver.getSuffixes(P, i);
|
|
416
|
-
B && i[`defaultValue${this.options.pluralSeparator}zero`] && D.indexOf(`${this.options.pluralSeparator}zero`) < 0 && D.push(`${this.options.pluralSeparator}zero`), D.forEach((q) => {
|
|
417
|
-
be([P], a + q, i[`defaultValue${q}`] || k);
|
|
418
|
-
});
|
|
419
|
-
}) : be(V, a, k));
|
|
420
|
-
}
|
|
421
|
-
h = this.extendTranslation(h, e, i, f, n), T && h === a && this.options.appendNamespaceToMissingKey && (h = `${l}${d}${a}`), (T || O) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${d}${a}` : a, O ? h : void 0, i));
|
|
422
|
-
}
|
|
423
|
-
return s ? (f.res = h, f.usedParams = this.getUsedParamsDetails(i), f) : h;
|
|
424
|
-
}
|
|
425
|
-
extendTranslation(e, t, n, i, s) {
|
|
426
|
-
var c, l;
|
|
427
|
-
if ((c = this.i18nFormat) != null && c.parse)
|
|
428
|
-
e = this.i18nFormat.parse(e, p(p({}, this.options.interpolation.defaultVariables), n), n.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
|
|
429
|
-
resolved: i
|
|
430
|
-
});
|
|
431
|
-
else if (!n.skipInterpolation) {
|
|
432
|
-
n.interpolation && this.interpolator.init(x(p({}, n), {
|
|
433
|
-
interpolation: p(p({}, this.options.interpolation), n.interpolation)
|
|
434
|
-
}));
|
|
435
|
-
const d = m(e) && (((l = n == null ? void 0 : n.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
436
|
-
let u;
|
|
437
|
-
if (d) {
|
|
438
|
-
const f = e.match(this.interpolator.nestingRegexp);
|
|
439
|
-
u = f && f.length;
|
|
440
|
-
}
|
|
441
|
-
let g = n.replace && !m(n.replace) ? n.replace : n;
|
|
442
|
-
if (this.options.interpolation.defaultVariables && (g = p(p({}, this.options.interpolation.defaultVariables), g)), e = this.interpolator.interpolate(e, g, n.lng || this.language || i.usedLng, n), d) {
|
|
443
|
-
const f = e.match(this.interpolator.nestingRegexp), h = f && f.length;
|
|
444
|
-
u < h && (n.nest = !1);
|
|
445
|
-
}
|
|
446
|
-
!n.lng && i && i.res && (n.lng = this.language || i.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...f) => (s == null ? void 0 : s[0]) === f[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`), null) : this.translate(...f, t), n)), n.interpolation && this.interpolator.reset();
|
|
447
|
-
}
|
|
448
|
-
const r = n.postProcess || this.options.postProcess, a = m(r) ? [r] : r;
|
|
449
|
-
return e != null && (a != null && a.length) && n.applyPostProcessor !== !1 && (e = Je.handle(a, e, t, this.options && this.options.postProcessPassResolved ? p({
|
|
450
|
-
i18nResolved: x(p({}, i), {
|
|
451
|
-
usedParams: this.getUsedParamsDetails(n)
|
|
452
|
-
})
|
|
453
|
-
}, n) : n, this)), e;
|
|
454
|
-
}
|
|
455
|
-
resolve(e, t = {}) {
|
|
456
|
-
let n, i, s, r, a;
|
|
457
|
-
return m(e) && (e = [e]), e.forEach((c) => {
|
|
458
|
-
if (this.isValidLookup(n)) return;
|
|
459
|
-
const l = this.extractFromKey(c, t), d = l.key;
|
|
460
|
-
i = d;
|
|
461
|
-
let u = l.namespaces;
|
|
462
|
-
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
463
|
-
const g = t.count !== void 0 && !m(t.count), f = g && !t.ordinal && t.count === 0, h = t.context !== void 0 && (m(t.context) || typeof t.context == "number") && t.context !== "", y = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
464
|
-
u.forEach((v) => {
|
|
465
|
-
var C, w;
|
|
466
|
-
this.isValidLookup(n) || (a = v, !Le[`${y[0]}-${v}`] && ((C = this.utils) != null && C.hasLoadedNamespace) && !((w = this.utils) != null && w.hasLoadedNamespace(a)) && (Le[`${y[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), y.forEach((F) => {
|
|
467
|
-
var J;
|
|
468
|
-
if (this.isValidLookup(n)) return;
|
|
469
|
-
r = F;
|
|
470
|
-
const $ = [d];
|
|
471
|
-
if ((J = this.i18nFormat) != null && J.addLookupKeys)
|
|
472
|
-
this.i18nFormat.addLookupKeys($, d, F, v, t);
|
|
473
|
-
else {
|
|
474
|
-
let R;
|
|
475
|
-
g && (R = this.pluralResolver.getSuffix(F, t.count, t));
|
|
476
|
-
const B = `${this.options.pluralSeparator}zero`, k = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
477
|
-
if (g && ($.push(d + R), t.ordinal && R.indexOf(k) === 0 && $.push(d + R.replace(k, this.options.pluralSeparator)), f && $.push(d + B)), h) {
|
|
478
|
-
const S = `${d}${this.options.contextSeparator}${t.context}`;
|
|
479
|
-
$.push(S), g && ($.push(S + R), t.ordinal && R.indexOf(k) === 0 && $.push(S + R.replace(k, this.options.pluralSeparator)), f && $.push(S + B));
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
let N;
|
|
483
|
-
for (; N = $.pop(); )
|
|
484
|
-
this.isValidLookup(n) || (s = N, n = this.getResource(F, v, N, t));
|
|
485
|
-
}));
|
|
486
|
-
});
|
|
487
|
-
}), {
|
|
488
|
-
res: n,
|
|
489
|
-
usedKey: i,
|
|
490
|
-
exactUsedKey: s,
|
|
491
|
-
usedLng: r,
|
|
492
|
-
usedNS: a
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
isValidLookup(e) {
|
|
496
|
-
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
497
|
-
}
|
|
498
|
-
getResource(e, t, n, i = {}) {
|
|
499
|
-
var s;
|
|
500
|
-
return (s = this.i18nFormat) != null && s.getResource ? this.i18nFormat.getResource(e, t, n, i) : this.resourceStore.getResource(e, t, n, i);
|
|
501
|
-
}
|
|
502
|
-
getUsedParamsDetails(e = {}) {
|
|
503
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !m(e.replace);
|
|
504
|
-
let i = n ? e.replace : e;
|
|
505
|
-
if (n && typeof e.count != "undefined" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = p(p({}, this.options.interpolation.defaultVariables), i)), !n) {
|
|
506
|
-
i = p({}, i);
|
|
507
|
-
for (const s of t)
|
|
508
|
-
delete i[s];
|
|
509
|
-
}
|
|
510
|
-
return i;
|
|
511
|
-
}
|
|
512
|
-
static hasDefaultValue(e) {
|
|
513
|
-
const t = "defaultValue";
|
|
514
|
-
for (const n in e)
|
|
515
|
-
if (Object.prototype.hasOwnProperty.call(e, n) && t === n.substring(0, t.length) && e[n] !== void 0)
|
|
516
|
-
return !0;
|
|
517
|
-
return !1;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
class Ne {
|
|
521
|
-
constructor(e) {
|
|
522
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = I.create("languageUtils");
|
|
523
|
-
}
|
|
524
|
-
getScriptPartFromCode(e) {
|
|
525
|
-
if (e = W(e), !e || e.indexOf("-") < 0) return null;
|
|
526
|
-
const t = e.split("-");
|
|
527
|
-
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
528
|
-
}
|
|
529
|
-
getLanguagePartFromCode(e) {
|
|
530
|
-
if (e = W(e), !e || e.indexOf("-") < 0) return e;
|
|
531
|
-
const t = e.split("-");
|
|
532
|
-
return this.formatLanguageCode(t[0]);
|
|
533
|
-
}
|
|
534
|
-
formatLanguageCode(e) {
|
|
535
|
-
if (m(e) && e.indexOf("-") > -1) {
|
|
536
|
-
let t;
|
|
537
|
-
try {
|
|
538
|
-
t = Intl.getCanonicalLocales(e)[0];
|
|
539
|
-
} catch (n) {
|
|
540
|
-
}
|
|
541
|
-
return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
|
|
542
|
-
}
|
|
543
|
-
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
544
|
-
}
|
|
545
|
-
isSupportedCode(e) {
|
|
546
|
-
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
|
|
547
|
-
}
|
|
548
|
-
getBestMatchFromCodes(e) {
|
|
549
|
-
if (!e) return null;
|
|
550
|
-
let t;
|
|
551
|
-
return e.forEach((n) => {
|
|
552
|
-
if (t) return;
|
|
553
|
-
const i = this.formatLanguageCode(n);
|
|
554
|
-
(!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i);
|
|
555
|
-
}), !t && this.options.supportedLngs && e.forEach((n) => {
|
|
556
|
-
if (t) return;
|
|
557
|
-
const i = this.getScriptPartFromCode(n);
|
|
558
|
-
if (this.isSupportedCode(i)) return t = i;
|
|
559
|
-
const s = this.getLanguagePartFromCode(n);
|
|
560
|
-
if (this.isSupportedCode(s)) return t = s;
|
|
561
|
-
t = this.options.supportedLngs.find((r) => {
|
|
562
|
-
if (r === s) return r;
|
|
563
|
-
if (!(r.indexOf("-") < 0 && s.indexOf("-") < 0) && (r.indexOf("-") > 0 && s.indexOf("-") < 0 && r.substring(0, r.indexOf("-")) === s || r.indexOf(s) === 0 && s.length > 1))
|
|
564
|
-
return r;
|
|
565
|
-
});
|
|
566
|
-
}), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
|
|
567
|
-
}
|
|
568
|
-
getFallbackCodes(e, t) {
|
|
569
|
-
if (!e) return [];
|
|
570
|
-
if (typeof e == "function" && (e = e(t)), m(e) && (e = [e]), Array.isArray(e)) return e;
|
|
571
|
-
if (!t) return e.default || [];
|
|
572
|
-
let n = e[t];
|
|
573
|
-
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
574
|
-
}
|
|
575
|
-
toResolveHierarchy(e, t) {
|
|
576
|
-
const n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), i = [], s = (r) => {
|
|
577
|
-
r && (this.isSupportedCode(r) ? i.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`));
|
|
578
|
-
};
|
|
579
|
-
return m(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(e))) : m(e) && s(this.formatLanguageCode(e)), n.forEach((r) => {
|
|
580
|
-
i.indexOf(r) < 0 && s(this.formatLanguageCode(r));
|
|
581
|
-
}), i;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
const Re = {
|
|
585
|
-
zero: 0,
|
|
586
|
-
one: 1,
|
|
587
|
-
two: 2,
|
|
588
|
-
few: 3,
|
|
589
|
-
many: 4,
|
|
590
|
-
other: 5
|
|
591
|
-
}, Ae = {
|
|
592
|
-
select: (o) => o === 1 ? "one" : "other",
|
|
593
|
-
resolvedOptions: () => ({
|
|
594
|
-
pluralCategories: ["one", "other"]
|
|
595
|
-
})
|
|
596
|
-
};
|
|
597
|
-
class Tt {
|
|
598
|
-
constructor(e, t = {}) {
|
|
599
|
-
this.languageUtils = e, this.options = t, this.logger = I.create("pluralResolver"), this.pluralRulesCache = {};
|
|
600
|
-
}
|
|
601
|
-
addRule(e, t) {
|
|
602
|
-
this.rules[e] = t;
|
|
603
|
-
}
|
|
604
|
-
clearCache() {
|
|
605
|
-
this.pluralRulesCache = {};
|
|
606
|
-
}
|
|
607
|
-
getRule(e, t = {}) {
|
|
608
|
-
const n = W(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({
|
|
609
|
-
cleanedCode: n,
|
|
610
|
-
type: i
|
|
611
|
-
});
|
|
612
|
-
if (s in this.pluralRulesCache)
|
|
613
|
-
return this.pluralRulesCache[s];
|
|
614
|
-
let r;
|
|
615
|
-
try {
|
|
616
|
-
r = new Intl.PluralRules(n, {
|
|
617
|
-
type: i
|
|
618
|
-
});
|
|
619
|
-
} catch (a) {
|
|
620
|
-
if (!Intl)
|
|
621
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"), Ae;
|
|
622
|
-
if (!e.match(/-|_/)) return Ae;
|
|
623
|
-
const c = this.languageUtils.getLanguagePartFromCode(e);
|
|
624
|
-
r = this.getRule(c, t);
|
|
625
|
-
}
|
|
626
|
-
return this.pluralRulesCache[s] = r, r;
|
|
627
|
-
}
|
|
628
|
-
needsPlural(e, t = {}) {
|
|
629
|
-
let n = this.getRule(e, t);
|
|
630
|
-
return n || (n = this.getRule("dev", t)), (n == null ? void 0 : n.resolvedOptions().pluralCategories.length) > 1;
|
|
631
|
-
}
|
|
632
|
-
getPluralFormsOfKey(e, t, n = {}) {
|
|
633
|
-
return this.getSuffixes(e, n).map((i) => `${t}${i}`);
|
|
634
|
-
}
|
|
635
|
-
getSuffixes(e, t = {}) {
|
|
636
|
-
let n = this.getRule(e, t);
|
|
637
|
-
return n || (n = this.getRule("dev", t)), n ? n.resolvedOptions().pluralCategories.sort((i, s) => Re[i] - Re[s]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
|
|
638
|
-
}
|
|
639
|
-
getSuffix(e, t, n = {}) {
|
|
640
|
-
const i = this.getRule(e, n);
|
|
641
|
-
return i ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
const Fe = (o, e, t, n = ".", i = !0) => {
|
|
645
|
-
let s = bt(o, e, t);
|
|
646
|
-
return !s && i && m(t) && (s = fe(o, t, n), s === void 0 && (s = fe(e, t, n))), s;
|
|
647
|
-
}, ae = (o) => o.replace(/\$/g, "$$$$");
|
|
648
|
-
class Ot {
|
|
649
|
-
constructor(e = {}) {
|
|
650
|
-
var t;
|
|
651
|
-
this.logger = I.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((n) => n), this.init(e);
|
|
652
|
-
}
|
|
653
|
-
init(e = {}) {
|
|
654
|
-
e.interpolation || (e.interpolation = {
|
|
655
|
-
escapeValue: !0
|
|
656
|
-
});
|
|
657
|
-
const {
|
|
658
|
-
escape: t,
|
|
659
|
-
escapeValue: n,
|
|
660
|
-
useRawValueToEscape: i,
|
|
661
|
-
prefix: s,
|
|
662
|
-
prefixEscaped: r,
|
|
663
|
-
suffix: a,
|
|
664
|
-
suffixEscaped: c,
|
|
665
|
-
formatSeparator: l,
|
|
666
|
-
unescapeSuffix: d,
|
|
667
|
-
unescapePrefix: u,
|
|
668
|
-
nestingPrefix: g,
|
|
669
|
-
nestingPrefixEscaped: f,
|
|
670
|
-
nestingSuffix: h,
|
|
671
|
-
nestingSuffixEscaped: y,
|
|
672
|
-
nestingOptionsSeparator: v,
|
|
673
|
-
maxReplaces: C,
|
|
674
|
-
alwaysFormat: w
|
|
675
|
-
} = e.interpolation;
|
|
676
|
-
this.escape = t !== void 0 ? t : $t, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = s ? j(s) : r || "{{", this.suffix = a ? j(a) : c || "}}", this.formatSeparator = l || ",", this.unescapePrefix = d ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = g ? j(g) : f || j("$t("), this.nestingSuffix = h ? j(h) : y || j(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = C || 1e3, this.alwaysFormat = w !== void 0 ? w : !1, this.resetRegExp();
|
|
677
|
-
}
|
|
678
|
-
reset() {
|
|
679
|
-
this.options && this.init(this.options);
|
|
680
|
-
}
|
|
681
|
-
resetRegExp() {
|
|
682
|
-
const e = (t, n) => (t == null ? void 0 : t.source) === n ? (t.lastIndex = 0, t) : new RegExp(n, "g");
|
|
683
|
-
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
684
|
-
}
|
|
685
|
-
interpolate(e, t, n, i) {
|
|
686
|
-
var f;
|
|
687
|
-
let s, r, a;
|
|
688
|
-
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (h) => {
|
|
689
|
-
if (h.indexOf(this.formatSeparator) < 0) {
|
|
690
|
-
const w = Fe(t, c, h, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
691
|
-
return this.alwaysFormat ? this.format(w, void 0, n, x(p(p({}, i), t), {
|
|
692
|
-
interpolationkey: h
|
|
693
|
-
})) : w;
|
|
694
|
-
}
|
|
695
|
-
const y = h.split(this.formatSeparator), v = y.shift().trim(), C = y.join(this.formatSeparator).trim();
|
|
696
|
-
return this.format(Fe(t, c, v, this.options.keySeparator, this.options.ignoreJSONStructure), C, n, x(p(p({}, i), t), {
|
|
697
|
-
interpolationkey: v
|
|
698
|
-
}));
|
|
699
|
-
};
|
|
700
|
-
this.resetRegExp();
|
|
701
|
-
const d = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, u = ((f = i == null ? void 0 : i.interpolation) == null ? void 0 : f.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
702
|
-
return [{
|
|
703
|
-
regex: this.regexpUnescape,
|
|
704
|
-
safeValue: (h) => ae(h)
|
|
705
|
-
}, {
|
|
706
|
-
regex: this.regexp,
|
|
707
|
-
safeValue: (h) => this.escapeValue ? ae(this.escape(h)) : ae(h)
|
|
708
|
-
}].forEach((h) => {
|
|
709
|
-
for (a = 0; s = h.regex.exec(e); ) {
|
|
710
|
-
const y = s[1].trim();
|
|
711
|
-
if (r = l(y), r === void 0)
|
|
712
|
-
if (typeof d == "function") {
|
|
713
|
-
const C = d(e, s, i);
|
|
714
|
-
r = m(C) ? C : "";
|
|
715
|
-
} else if (i && Object.prototype.hasOwnProperty.call(i, y))
|
|
716
|
-
r = "";
|
|
717
|
-
else if (u) {
|
|
718
|
-
r = s[0];
|
|
719
|
-
continue;
|
|
720
|
-
} else
|
|
721
|
-
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`), r = "";
|
|
722
|
-
else !m(r) && !this.useRawValueToEscape && (r = Pe(r));
|
|
723
|
-
const v = h.safeValue(r);
|
|
724
|
-
if (e = e.replace(s[0], v), u ? (h.regex.lastIndex += r.length, h.regex.lastIndex -= s[0].length) : h.regex.lastIndex = 0, a++, a >= this.maxReplaces)
|
|
725
|
-
break;
|
|
726
|
-
}
|
|
727
|
-
}), e;
|
|
728
|
-
}
|
|
729
|
-
nest(e, t, n = {}) {
|
|
730
|
-
let i, s, r;
|
|
731
|
-
const a = (c, l) => {
|
|
732
|
-
var y;
|
|
733
|
-
const d = this.nestingOptionsSeparator;
|
|
734
|
-
if (c.indexOf(d) < 0) return c;
|
|
735
|
-
const u = c.split(new RegExp(`${d}[ ]*{`));
|
|
736
|
-
let g = `{${u[1]}`;
|
|
737
|
-
c = u[0], g = this.interpolate(g, r);
|
|
738
|
-
const f = g.match(/'/g), h = g.match(/"/g);
|
|
739
|
-
(((y = f == null ? void 0 : f.length) != null ? y : 0) % 2 === 0 && !h || h.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
|
|
740
|
-
try {
|
|
741
|
-
r = JSON.parse(g), l && (r = p(p({}, l), r));
|
|
742
|
-
} catch (v) {
|
|
743
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${c}`, v), `${c}${d}${g}`;
|
|
744
|
-
}
|
|
745
|
-
return r.defaultValue && r.defaultValue.indexOf(this.prefix) > -1 && delete r.defaultValue, c;
|
|
746
|
-
};
|
|
747
|
-
for (; i = this.nestingRegexp.exec(e); ) {
|
|
748
|
-
let c = [];
|
|
749
|
-
r = p({}, n), r = r.replace && !m(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
|
|
750
|
-
const l = /{.*}/.test(i[1]) ? i[1].lastIndexOf("}") + 1 : i[1].indexOf(this.formatSeparator);
|
|
751
|
-
if (l !== -1 && (c = i[1].slice(l).split(this.formatSeparator).map((d) => d.trim()).filter(Boolean), i[1] = i[1].slice(0, l)), s = t(a.call(this, i[1].trim(), r), r), s && i[0] === e && !m(s)) return s;
|
|
752
|
-
m(s) || (s = Pe(s)), s || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), s = ""), c.length && (s = c.reduce((d, u) => this.format(d, u, n.lng, x(p({}, n), {
|
|
753
|
-
interpolationkey: i[1].trim()
|
|
754
|
-
})), s.trim())), e = e.replace(i[0], s), this.regexp.lastIndex = 0;
|
|
755
|
-
}
|
|
756
|
-
return e;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
const Lt = (o) => {
|
|
760
|
-
let e = o.toLowerCase().trim();
|
|
761
|
-
const t = {};
|
|
762
|
-
if (o.indexOf("(") > -1) {
|
|
763
|
-
const n = o.split("(");
|
|
764
|
-
e = n[0].toLowerCase().trim();
|
|
765
|
-
const i = n[1].substring(0, n[1].length - 1);
|
|
766
|
-
e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((r) => {
|
|
767
|
-
if (r) {
|
|
768
|
-
const [a, ...c] = r.split(":"), l = c.join(":").trim().replace(/^'+|'+$/g, ""), d = a.trim();
|
|
769
|
-
t[d] || (t[d] = l), l === "false" && (t[d] = !1), l === "true" && (t[d] = !0), isNaN(l) || (t[d] = parseInt(l, 10));
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
return {
|
|
774
|
-
formatName: e,
|
|
775
|
-
formatOptions: t
|
|
776
|
-
};
|
|
777
|
-
}, Ee = (o) => {
|
|
778
|
-
const e = {};
|
|
779
|
-
return (t, n, i) => {
|
|
780
|
-
let s = i;
|
|
781
|
-
i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (s = x(p({}, s), {
|
|
782
|
-
[i.interpolationkey]: void 0
|
|
783
|
-
}));
|
|
784
|
-
const r = n + JSON.stringify(s);
|
|
785
|
-
let a = e[r];
|
|
786
|
-
return a || (a = o(W(n), i), e[r] = a), a(t);
|
|
787
|
-
};
|
|
788
|
-
}, It = (o) => (e, t, n) => o(W(t), n)(e);
|
|
789
|
-
class Nt {
|
|
790
|
-
constructor(e = {}) {
|
|
791
|
-
this.logger = I.create("formatter"), this.options = e, this.init(e);
|
|
792
|
-
}
|
|
793
|
-
init(e, t = {
|
|
794
|
-
interpolation: {}
|
|
795
|
-
}) {
|
|
796
|
-
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
797
|
-
const n = t.cacheInBuiltFormats ? Ee : It;
|
|
798
|
-
this.formats = {
|
|
799
|
-
number: n((i, s) => {
|
|
800
|
-
const r = new Intl.NumberFormat(i, p({}, s));
|
|
801
|
-
return (a) => r.format(a);
|
|
802
|
-
}),
|
|
803
|
-
currency: n((i, s) => {
|
|
804
|
-
const r = new Intl.NumberFormat(i, x(p({}, s), {
|
|
805
|
-
style: "currency"
|
|
806
|
-
}));
|
|
807
|
-
return (a) => r.format(a);
|
|
808
|
-
}),
|
|
809
|
-
datetime: n((i, s) => {
|
|
810
|
-
const r = new Intl.DateTimeFormat(i, p({}, s));
|
|
811
|
-
return (a) => r.format(a);
|
|
812
|
-
}),
|
|
813
|
-
relativetime: n((i, s) => {
|
|
814
|
-
const r = new Intl.RelativeTimeFormat(i, p({}, s));
|
|
815
|
-
return (a) => r.format(a, s.range || "day");
|
|
816
|
-
}),
|
|
817
|
-
list: n((i, s) => {
|
|
818
|
-
const r = new Intl.ListFormat(i, p({}, s));
|
|
819
|
-
return (a) => r.format(a);
|
|
820
|
-
})
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
add(e, t) {
|
|
824
|
-
this.formats[e.toLowerCase().trim()] = t;
|
|
825
|
-
}
|
|
826
|
-
addCached(e, t) {
|
|
827
|
-
this.formats[e.toLowerCase().trim()] = Ee(t);
|
|
828
|
-
}
|
|
829
|
-
format(e, t, n, i = {}) {
|
|
830
|
-
const s = t.split(this.formatSeparator);
|
|
831
|
-
if (s.length > 1 && s[0].indexOf("(") > 1 && s[0].indexOf(")") < 0 && s.find((a) => a.indexOf(")") > -1)) {
|
|
832
|
-
const a = s.findIndex((c) => c.indexOf(")") > -1);
|
|
833
|
-
s[0] = [s[0], ...s.splice(1, a)].join(this.formatSeparator);
|
|
834
|
-
}
|
|
835
|
-
return s.reduce((a, c) => {
|
|
836
|
-
var u;
|
|
837
|
-
const {
|
|
838
|
-
formatName: l,
|
|
839
|
-
formatOptions: d
|
|
840
|
-
} = Lt(c);
|
|
841
|
-
if (this.formats[l]) {
|
|
842
|
-
let g = a;
|
|
843
|
-
try {
|
|
844
|
-
const f = ((u = i == null ? void 0 : i.formatParams) == null ? void 0 : u[i.interpolationkey]) || {}, h = f.locale || f.lng || i.locale || i.lng || n;
|
|
845
|
-
g = this.formats[l](a, h, p(p(p({}, d), i), f));
|
|
846
|
-
} catch (f) {
|
|
847
|
-
this.logger.warn(f);
|
|
848
|
-
}
|
|
849
|
-
return g;
|
|
850
|
-
} else
|
|
851
|
-
this.logger.warn(`there was no format function for ${l}`);
|
|
852
|
-
return a;
|
|
853
|
-
}, e);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
const Rt = (o, e) => {
|
|
857
|
-
o.pending[e] !== void 0 && (delete o.pending[e], o.pendingCount--);
|
|
858
|
-
};
|
|
859
|
-
class At extends se {
|
|
860
|
-
constructor(e, t, n, i = {}) {
|
|
861
|
-
var s, r;
|
|
862
|
-
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = i, this.logger = I.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (r = (s = this.backend) == null ? void 0 : s.init) == null || r.call(s, n, i.backend, i);
|
|
863
|
-
}
|
|
864
|
-
queueLoad(e, t, n, i) {
|
|
865
|
-
const s = {}, r = {}, a = {}, c = {};
|
|
866
|
-
return e.forEach((l) => {
|
|
867
|
-
let d = !0;
|
|
868
|
-
t.forEach((u) => {
|
|
869
|
-
const g = `${l}|${u}`;
|
|
870
|
-
!n.reload && this.store.hasResourceBundle(l, u) ? this.state[g] = 2 : this.state[g] < 0 || (this.state[g] === 1 ? r[g] === void 0 && (r[g] = !0) : (this.state[g] = 1, d = !1, r[g] === void 0 && (r[g] = !0), s[g] === void 0 && (s[g] = !0), c[u] === void 0 && (c[u] = !0)));
|
|
871
|
-
}), d || (a[l] = !0);
|
|
872
|
-
}), (Object.keys(s).length || Object.keys(r).length) && this.queue.push({
|
|
873
|
-
pending: r,
|
|
874
|
-
pendingCount: Object.keys(r).length,
|
|
875
|
-
loaded: {},
|
|
876
|
-
errors: [],
|
|
877
|
-
callback: i
|
|
878
|
-
}), {
|
|
879
|
-
toLoad: Object.keys(s),
|
|
880
|
-
pending: Object.keys(r),
|
|
881
|
-
toLoadLanguages: Object.keys(a),
|
|
882
|
-
toLoadNamespaces: Object.keys(c)
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
loaded(e, t, n) {
|
|
886
|
-
const i = e.split("|"), s = i[0], r = i[1];
|
|
887
|
-
t && this.emit("failedLoading", s, r, t), !t && n && this.store.addResourceBundle(s, r, n, void 0, void 0, {
|
|
888
|
-
skipCopy: !0
|
|
889
|
-
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
890
|
-
const a = {};
|
|
891
|
-
this.queue.forEach((c) => {
|
|
892
|
-
vt(c.loaded, [s], r), Rt(c, e), t && c.errors.push(t), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((l) => {
|
|
893
|
-
a[l] || (a[l] = {});
|
|
894
|
-
const d = c.loaded[l];
|
|
895
|
-
d.length && d.forEach((u) => {
|
|
896
|
-
a[l][u] === void 0 && (a[l][u] = !0);
|
|
897
|
-
});
|
|
898
|
-
}), c.done = !0, c.errors.length ? c.callback(c.errors) : c.callback());
|
|
899
|
-
}), this.emit("loaded", a), this.queue = this.queue.filter((c) => !c.done);
|
|
900
|
-
}
|
|
901
|
-
read(e, t, n, i = 0, s = this.retryTimeout, r) {
|
|
902
|
-
if (!e.length) return r(null, {});
|
|
903
|
-
if (this.readingCalls >= this.maxParallelReads) {
|
|
904
|
-
this.waitingReads.push({
|
|
905
|
-
lng: e,
|
|
906
|
-
ns: t,
|
|
907
|
-
fcName: n,
|
|
908
|
-
tried: i,
|
|
909
|
-
wait: s,
|
|
910
|
-
callback: r
|
|
911
|
-
});
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
this.readingCalls++;
|
|
915
|
-
const a = (l, d) => {
|
|
916
|
-
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
917
|
-
const u = this.waitingReads.shift();
|
|
918
|
-
this.read(u.lng, u.ns, u.fcName, u.tried, u.wait, u.callback);
|
|
919
|
-
}
|
|
920
|
-
if (l && d && i < this.maxRetries) {
|
|
921
|
-
setTimeout(() => {
|
|
922
|
-
this.read.call(this, e, t, n, i + 1, s * 2, r);
|
|
923
|
-
}, s);
|
|
924
|
-
return;
|
|
925
|
-
}
|
|
926
|
-
r(l, d);
|
|
927
|
-
}, c = this.backend[n].bind(this.backend);
|
|
928
|
-
if (c.length === 2) {
|
|
929
|
-
try {
|
|
930
|
-
const l = c(e, t);
|
|
931
|
-
l && typeof l.then == "function" ? l.then((d) => a(null, d)).catch(a) : a(null, l);
|
|
932
|
-
} catch (l) {
|
|
933
|
-
a(l);
|
|
934
|
-
}
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
return c(e, t, a);
|
|
938
|
-
}
|
|
939
|
-
prepareLoading(e, t, n = {}, i) {
|
|
940
|
-
if (!this.backend)
|
|
941
|
-
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
|
|
942
|
-
m(e) && (e = this.languageUtils.toResolveHierarchy(e)), m(t) && (t = [t]);
|
|
943
|
-
const s = this.queueLoad(e, t, n, i);
|
|
944
|
-
if (!s.toLoad.length)
|
|
945
|
-
return s.pending.length || i(), null;
|
|
946
|
-
s.toLoad.forEach((r) => {
|
|
947
|
-
this.loadOne(r);
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
load(e, t, n) {
|
|
951
|
-
this.prepareLoading(e, t, {}, n);
|
|
952
|
-
}
|
|
953
|
-
reload(e, t, n) {
|
|
954
|
-
this.prepareLoading(e, t, {
|
|
955
|
-
reload: !0
|
|
956
|
-
}, n);
|
|
957
|
-
}
|
|
958
|
-
loadOne(e, t = "") {
|
|
959
|
-
const n = e.split("|"), i = n[0], s = n[1];
|
|
960
|
-
this.read(i, s, "read", void 0, void 0, (r, a) => {
|
|
961
|
-
r && this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`, r), !r && a && this.logger.log(`${t}loaded namespace ${s} for language ${i}`, a), this.loaded(e, r, a);
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
saveMissing(e, t, n, i, s, r = {}, a = () => {
|
|
965
|
-
}) {
|
|
966
|
-
var c, l, d, u, g;
|
|
967
|
-
if ((l = (c = this.services) == null ? void 0 : c.utils) != null && l.hasLoadedNamespace && !((u = (d = this.services) == null ? void 0 : d.utils) != null && u.hasLoadedNamespace(t))) {
|
|
968
|
-
this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
969
|
-
return;
|
|
970
|
-
}
|
|
971
|
-
if (!(n == null || n === "")) {
|
|
972
|
-
if ((g = this.backend) != null && g.create) {
|
|
973
|
-
const f = x(p({}, r), {
|
|
974
|
-
isUpdate: s
|
|
975
|
-
}), h = this.backend.create.bind(this.backend);
|
|
976
|
-
if (h.length < 6)
|
|
977
|
-
try {
|
|
978
|
-
let y;
|
|
979
|
-
h.length === 5 ? y = h(e, t, n, i, f) : y = h(e, t, n, i), y && typeof y.then == "function" ? y.then((v) => a(null, v)).catch(a) : a(null, y);
|
|
980
|
-
} catch (y) {
|
|
981
|
-
a(y);
|
|
982
|
-
}
|
|
983
|
-
else
|
|
984
|
-
h(e, t, n, i, a, f);
|
|
985
|
-
}
|
|
986
|
-
!e || !e[0] || this.store.addResource(e[0], t, n, i);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
const De = () => ({
|
|
991
|
-
debug: !1,
|
|
992
|
-
initAsync: !0,
|
|
993
|
-
ns: ["translation"],
|
|
994
|
-
defaultNS: ["translation"],
|
|
995
|
-
fallbackLng: ["dev"],
|
|
996
|
-
fallbackNS: !1,
|
|
997
|
-
supportedLngs: !1,
|
|
998
|
-
nonExplicitSupportedLngs: !1,
|
|
999
|
-
load: "all",
|
|
1000
|
-
preload: !1,
|
|
1001
|
-
simplifyPluralSuffix: !0,
|
|
1002
|
-
keySeparator: ".",
|
|
1003
|
-
nsSeparator: ":",
|
|
1004
|
-
pluralSeparator: "_",
|
|
1005
|
-
contextSeparator: "_",
|
|
1006
|
-
partialBundledLanguages: !1,
|
|
1007
|
-
saveMissing: !1,
|
|
1008
|
-
updateMissing: !1,
|
|
1009
|
-
saveMissingTo: "fallback",
|
|
1010
|
-
saveMissingPlurals: !0,
|
|
1011
|
-
missingKeyHandler: !1,
|
|
1012
|
-
missingInterpolationHandler: !1,
|
|
1013
|
-
postProcess: !1,
|
|
1014
|
-
postProcessPassResolved: !1,
|
|
1015
|
-
returnNull: !1,
|
|
1016
|
-
returnEmptyString: !0,
|
|
1017
|
-
returnObjects: !1,
|
|
1018
|
-
joinArrays: !1,
|
|
1019
|
-
returnedObjectHandler: !1,
|
|
1020
|
-
parseMissingKeyHandler: !1,
|
|
1021
|
-
appendNamespaceToMissingKey: !1,
|
|
1022
|
-
appendNamespaceToCIMode: !1,
|
|
1023
|
-
overloadTranslationOptionHandler: (o) => {
|
|
1024
|
-
let e = {};
|
|
1025
|
-
if (typeof o[1] == "object" && (e = o[1]), m(o[1]) && (e.defaultValue = o[1]), m(o[2]) && (e.tDescription = o[2]), typeof o[2] == "object" || typeof o[3] == "object") {
|
|
1026
|
-
const t = o[3] || o[2];
|
|
1027
|
-
Object.keys(t).forEach((n) => {
|
|
1028
|
-
e[n] = t[n];
|
|
1029
|
-
});
|
|
1030
|
-
}
|
|
1031
|
-
return e;
|
|
1032
|
-
},
|
|
1033
|
-
interpolation: {
|
|
1034
|
-
escapeValue: !0,
|
|
1035
|
-
format: (o) => o,
|
|
1036
|
-
prefix: "{{",
|
|
1037
|
-
suffix: "}}",
|
|
1038
|
-
formatSeparator: ",",
|
|
1039
|
-
unescapePrefix: "-",
|
|
1040
|
-
nestingPrefix: "$t(",
|
|
1041
|
-
nestingSuffix: ")",
|
|
1042
|
-
nestingOptionsSeparator: ",",
|
|
1043
|
-
maxReplaces: 1e3,
|
|
1044
|
-
skipOnVariables: !0
|
|
1045
|
-
},
|
|
1046
|
-
cacheInBuiltFormats: !0
|
|
1047
|
-
}), Ue = (o) => {
|
|
1048
|
-
var e, t;
|
|
1049
|
-
return m(o.ns) && (o.ns = [o.ns]), m(o.fallbackLng) && (o.fallbackLng = [o.fallbackLng]), m(o.fallbackNS) && (o.fallbackNS = [o.fallbackNS]), ((t = (e = o.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (o.supportedLngs = o.supportedLngs.concat(["cimode"])), typeof o.initImmediate == "boolean" && (o.initAsync = o.initImmediate), o;
|
|
1050
|
-
}, Z = () => {
|
|
1051
|
-
}, Ft = (o) => {
|
|
1052
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((t) => {
|
|
1053
|
-
typeof o[t] == "function" && (o[t] = o[t].bind(o));
|
|
1054
|
-
});
|
|
1055
|
-
};
|
|
1056
|
-
class _ extends se {
|
|
1057
|
-
constructor(e = {}, t) {
|
|
1058
|
-
if (super(), this.options = Ue(e), this.services = {}, this.logger = I, this.modules = {
|
|
1059
|
-
external: []
|
|
1060
|
-
}, Ft(this), t && !this.isInitialized && !e.isClone) {
|
|
1061
|
-
if (!this.options.initAsync)
|
|
1062
|
-
return this.init(e, t), this;
|
|
1063
|
-
setTimeout(() => {
|
|
1064
|
-
this.init(e, t);
|
|
1065
|
-
}, 0);
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
init(e = {}, t) {
|
|
1069
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (m(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1070
|
-
const n = De();
|
|
1071
|
-
this.options = p(p(p({}, n), this.options), Ue(e)), this.options.interpolation = p(p({}, n.interpolation), this.options.interpolation), e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator);
|
|
1072
|
-
const i = (l) => l ? typeof l == "function" ? new l() : l : null;
|
|
1073
|
-
if (!this.options.isClone) {
|
|
1074
|
-
this.modules.logger ? I.init(i(this.modules.logger), this.options) : I.init(null, this.options);
|
|
1075
|
-
let l;
|
|
1076
|
-
this.modules.formatter ? l = this.modules.formatter : l = Nt;
|
|
1077
|
-
const d = new Ne(this.options);
|
|
1078
|
-
this.store = new Oe(this.options.resources, this.options);
|
|
1079
|
-
const u = this.services;
|
|
1080
|
-
u.logger = I, u.resourceStore = this.store, u.languageUtils = d, u.pluralResolver = new Tt(d, {
|
|
1081
|
-
prepend: this.options.pluralSeparator,
|
|
1082
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1083
|
-
}), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = i(l), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Ot(this.options), u.utils = {
|
|
1084
|
-
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1085
|
-
}, u.backendConnector = new At(i(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (f, ...h) => {
|
|
1086
|
-
this.emit(f, ...h);
|
|
1087
|
-
}), this.modules.languageDetector && (u.languageDetector = i(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = i(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new ie(this.services, this.options), this.translator.on("*", (f, ...h) => {
|
|
1088
|
-
this.emit(f, ...h);
|
|
1089
|
-
}), this.modules.external.forEach((f) => {
|
|
1090
|
-
f.init && f.init(this);
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
if (this.format = this.options.interpolation.format, t || (t = Z), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1094
|
-
const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1095
|
-
l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
|
|
1096
|
-
}
|
|
1097
|
-
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((l) => {
|
|
1098
|
-
this[l] = (...d) => this.store[l](...d);
|
|
1099
|
-
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((l) => {
|
|
1100
|
-
this[l] = (...d) => (this.store[l](...d), this);
|
|
1101
|
-
});
|
|
1102
|
-
const a = z(), c = () => {
|
|
1103
|
-
const l = (d, u) => {
|
|
1104
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), a.resolve(u), t(d, u);
|
|
1105
|
-
};
|
|
1106
|
-
if (this.languages && !this.isInitialized) return l(null, this.t.bind(this));
|
|
1107
|
-
this.changeLanguage(this.options.lng, l);
|
|
1108
|
-
};
|
|
1109
|
-
return this.options.resources || !this.options.initAsync ? c() : setTimeout(c, 0), a;
|
|
1110
|
-
}
|
|
1111
|
-
loadResources(e, t = Z) {
|
|
1112
|
-
var s, r;
|
|
1113
|
-
let n = t;
|
|
1114
|
-
const i = m(e) ? e : this.language;
|
|
1115
|
-
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1116
|
-
if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
1117
|
-
const a = [], c = (l) => {
|
|
1118
|
-
if (!l || l === "cimode") return;
|
|
1119
|
-
this.services.languageUtils.toResolveHierarchy(l).forEach((u) => {
|
|
1120
|
-
u !== "cimode" && a.indexOf(u) < 0 && a.push(u);
|
|
1121
|
-
});
|
|
1122
|
-
};
|
|
1123
|
-
i ? c(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((d) => c(d)), (r = (s = this.options.preload) == null ? void 0 : s.forEach) == null || r.call(s, (l) => c(l)), this.services.backendConnector.load(a, this.options.ns, (l) => {
|
|
1124
|
-
!l && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(l);
|
|
1125
|
-
});
|
|
1126
|
-
} else
|
|
1127
|
-
n(null);
|
|
1128
|
-
}
|
|
1129
|
-
reloadResources(e, t, n) {
|
|
1130
|
-
const i = z();
|
|
1131
|
-
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n = Z), this.services.backendConnector.reload(e, t, (s) => {
|
|
1132
|
-
i.resolve(), n(s);
|
|
1133
|
-
}), i;
|
|
1134
|
-
}
|
|
1135
|
-
use(e) {
|
|
1136
|
-
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1137
|
-
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1138
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Je.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1139
|
-
}
|
|
1140
|
-
setResolvedLanguage(e) {
|
|
1141
|
-
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
1142
|
-
for (let t = 0; t < this.languages.length; t++) {
|
|
1143
|
-
const n = this.languages[t];
|
|
1144
|
-
if (!(["cimode", "dev"].indexOf(n) > -1) && this.store.hasLanguageSomeTranslations(n)) {
|
|
1145
|
-
this.resolvedLanguage = n;
|
|
1146
|
-
break;
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
!this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
changeLanguage(e, t) {
|
|
1153
|
-
this.isLanguageChangingTo = e;
|
|
1154
|
-
const n = z();
|
|
1155
|
-
this.emit("languageChanging", e);
|
|
1156
|
-
const i = (a) => {
|
|
1157
|
-
this.language = a, this.languages = this.services.languageUtils.toResolveHierarchy(a), this.resolvedLanguage = void 0, this.setResolvedLanguage(a);
|
|
1158
|
-
}, s = (a, c) => {
|
|
1159
|
-
c ? this.isLanguageChangingTo === e && (i(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0, n.resolve((...l) => this.t(...l)), t && t(a, (...l) => this.t(...l));
|
|
1160
|
-
}, r = (a) => {
|
|
1161
|
-
var d, u;
|
|
1162
|
-
!e && !a && this.services.languageDetector && (a = []);
|
|
1163
|
-
const c = m(a) ? a : a && a[0], l = this.store.hasLanguageSomeTranslations(c) ? c : this.services.languageUtils.getBestMatchFromCodes(m(a) ? [a] : a);
|
|
1164
|
-
l && (this.language || i(l), this.translator.language || this.translator.changeLanguage(l), (u = (d = this.services.languageDetector) == null ? void 0 : d.cacheUserLanguage) == null || u.call(d, l)), this.loadResources(l, (g) => {
|
|
1165
|
-
s(g, l);
|
|
1166
|
-
});
|
|
1167
|
-
};
|
|
1168
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), n;
|
|
1169
|
-
}
|
|
1170
|
-
getFixedT(e, t, n) {
|
|
1171
|
-
const i = (s, r, ...a) => {
|
|
1172
|
-
let c;
|
|
1173
|
-
typeof r != "object" ? c = this.options.overloadTranslationOptionHandler([s, r].concat(a)) : c = p({}, r), c.lng = c.lng || i.lng, c.lngs = c.lngs || i.lngs, c.ns = c.ns || i.ns, c.keyPrefix !== "" && (c.keyPrefix = c.keyPrefix || n || i.keyPrefix);
|
|
1174
|
-
const l = this.options.keySeparator || ".";
|
|
1175
|
-
let d;
|
|
1176
|
-
return c.keyPrefix && Array.isArray(s) ? d = s.map((u) => `${c.keyPrefix}${l}${u}`) : d = c.keyPrefix ? `${c.keyPrefix}${l}${s}` : s, this.t(d, c);
|
|
1177
|
-
};
|
|
1178
|
-
return m(e) ? i.lng = e : i.lngs = e, i.ns = t, i.keyPrefix = n, i;
|
|
1179
|
-
}
|
|
1180
|
-
t(...e) {
|
|
1181
|
-
var t;
|
|
1182
|
-
return (t = this.translator) == null ? void 0 : t.translate(...e);
|
|
1183
|
-
}
|
|
1184
|
-
exists(...e) {
|
|
1185
|
-
var t;
|
|
1186
|
-
return (t = this.translator) == null ? void 0 : t.exists(...e);
|
|
1187
|
-
}
|
|
1188
|
-
setDefaultNamespace(e) {
|
|
1189
|
-
this.options.defaultNS = e;
|
|
1190
|
-
}
|
|
1191
|
-
hasLoadedNamespace(e, t = {}) {
|
|
1192
|
-
if (!this.isInitialized)
|
|
1193
|
-
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
1194
|
-
if (!this.languages || !this.languages.length)
|
|
1195
|
-
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1196
|
-
const n = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, s = this.languages[this.languages.length - 1];
|
|
1197
|
-
if (n.toLowerCase() === "cimode") return !0;
|
|
1198
|
-
const r = (a, c) => {
|
|
1199
|
-
const l = this.services.backendConnector.state[`${a}|${c}`];
|
|
1200
|
-
return l === -1 || l === 0 || l === 2;
|
|
1201
|
-
};
|
|
1202
|
-
if (t.precheck) {
|
|
1203
|
-
const a = t.precheck(this, r);
|
|
1204
|
-
if (a !== void 0) return a;
|
|
1205
|
-
}
|
|
1206
|
-
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(n, e) && (!i || r(s, e)));
|
|
1207
|
-
}
|
|
1208
|
-
loadNamespaces(e, t) {
|
|
1209
|
-
const n = z();
|
|
1210
|
-
return this.options.ns ? (m(e) && (e = [e]), e.forEach((i) => {
|
|
1211
|
-
this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
|
|
1212
|
-
}), this.loadResources((i) => {
|
|
1213
|
-
n.resolve(), t && t(i);
|
|
1214
|
-
}), n) : (t && t(), Promise.resolve());
|
|
1215
|
-
}
|
|
1216
|
-
loadLanguages(e, t) {
|
|
1217
|
-
const n = z();
|
|
1218
|
-
m(e) && (e = [e]);
|
|
1219
|
-
const i = this.options.preload || [], s = e.filter((r) => i.indexOf(r) < 0 && this.services.languageUtils.isSupportedCode(r));
|
|
1220
|
-
return s.length ? (this.options.preload = i.concat(s), this.loadResources((r) => {
|
|
1221
|
-
n.resolve(), t && t(r);
|
|
1222
|
-
}), n) : (t && t(), Promise.resolve());
|
|
1223
|
-
}
|
|
1224
|
-
dir(e) {
|
|
1225
|
-
var i, s;
|
|
1226
|
-
if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
1227
|
-
if (Intl.Locale) {
|
|
1228
|
-
const r = new Intl.Locale(e);
|
|
1229
|
-
if (r && r.getTextInfo) {
|
|
1230
|
-
const a = r.getTextInfo();
|
|
1231
|
-
if (a && a.direction) return a.direction;
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], n = ((s = this.services) == null ? void 0 : s.languageUtils) || new Ne(De());
|
|
1235
|
-
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1236
|
-
}
|
|
1237
|
-
static createInstance(e = {}, t) {
|
|
1238
|
-
return new _(e, t);
|
|
1239
|
-
}
|
|
1240
|
-
cloneInstance(e = {}, t = Z) {
|
|
1241
|
-
const n = e.forkResourceStore;
|
|
1242
|
-
n && delete e.forkResourceStore;
|
|
1243
|
-
const i = x(p(p({}, this.options), e), {
|
|
1244
|
-
isClone: !0
|
|
1245
|
-
}), s = new _(i);
|
|
1246
|
-
if ((e.debug !== void 0 || e.prefix !== void 0) && (s.logger = s.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
|
|
1247
|
-
s[a] = this[a];
|
|
1248
|
-
}), s.services = p({}, this.services), s.services.utils = {
|
|
1249
|
-
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
1250
|
-
}, n) {
|
|
1251
|
-
const a = Object.keys(this.store.data).reduce((c, l) => (c[l] = p({}, this.store.data[l]), c[l] = Object.keys(c[l]).reduce((d, u) => (d[u] = p({}, c[l][u]), d), c[l]), c), {});
|
|
1252
|
-
s.store = new Oe(a, i), s.services.resourceStore = s.store;
|
|
1253
|
-
}
|
|
1254
|
-
return s.translator = new ie(s.services, i), s.translator.on("*", (a, ...c) => {
|
|
1255
|
-
s.emit(a, ...c);
|
|
1256
|
-
}), s.init(i, t), s.translator.options = i, s.translator.backendConnector.services.utils = {
|
|
1257
|
-
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
1258
|
-
}, s;
|
|
1259
|
-
}
|
|
1260
|
-
toJSON() {
|
|
1261
|
-
return {
|
|
1262
|
-
options: this.options,
|
|
1263
|
-
store: this.store,
|
|
1264
|
-
language: this.language,
|
|
1265
|
-
languages: this.languages,
|
|
1266
|
-
resolvedLanguage: this.resolvedLanguage
|
|
1267
|
-
};
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
const b = _.createInstance();
|
|
1271
|
-
b.createInstance = _.createInstance;
|
|
1272
|
-
b.createInstance;
|
|
1273
|
-
b.dir;
|
|
1274
|
-
b.init;
|
|
1275
|
-
b.loadResources;
|
|
1276
|
-
b.reloadResources;
|
|
1277
|
-
b.use;
|
|
1278
|
-
b.changeLanguage;
|
|
1279
|
-
b.getFixedT;
|
|
1280
|
-
b.t;
|
|
1281
|
-
b.exists;
|
|
1282
|
-
b.setDefaultNamespace;
|
|
1283
|
-
b.hasLoadedNamespace;
|
|
1284
|
-
b.loadNamespaces;
|
|
1285
|
-
b.loadLanguages;
|
|
1286
|
-
const Et = "Account Name", Dt = "Account Number", Ut = "Unit Address", jt = "I agree with", Mt = "and", Ht = "Back", Kt = "Back ID Card", Bt = "Bank Name", Vt = "Beneficiary Bank", qt = "Business Registration License", zt = "Cancel", Qt = "Cancel Transaction", Gt = "Close", Wt = "C (With tax authority code)", _t = "K (Without code)", Xt = "C: With tax authority code, K: Without code", Jt = "Coming Soon", Yt = "Unit Name", Zt = "Complete your payment within", en = "Complete registration", tn = "Confirm", nn = "Important Notice:", on = "3. Contact Person Information:", sn = "Copy", rn = "Country", an = "2 custom characters (default: YY)", cn = "Custom quantity", ln = "Date of Birth", un = "Decrease", dn = "Digital Signature Package", hn = "District", fn = "Duration", gn = "E-Contract", pn = "Edit", mn = "e-invoices", yn = "Email", vn = "Enter ID Card Number", bn = "Enter Invoice Symbol", Sn = "Enter Passport Number", $n = "Enter Provider Name", xn = "Enter Tax Authority Code", kn = "Failed to check customer status", Pn = "Failed to create order", wn = "Error fetching tax information.", Cn = "File format not supported", Tn = "File size is too large", On = "Access denied", Ln = "Address cannot contain special characters", In = "Invalid ID card", Nn = "Invalid date of birth", Rn = "Invalid email address", An = "Invalid ID card number", Fn = "Only letters, numbers and underscores allowed", En = "Invalid phone number", Dn = "Invalid provider name", Un = "Invalid request", jn = "Invalid tax authority code", Mn = "Invalid tax code", Hn = "Failed to load data", Kn = "Failed to load registration packages", Bn = "Failed to load invoice packages", Vn = "Failed to load signature packages", qn = "Network connection error", zn = "Data not found", Qn = "Unable to check order payment status. Please try again.", Gn = "Unable to generate QR payment code. Please try again.", Wn = "This field is required", _n = "Failed to search packages", Xn = "Server error, please try again later", Jn = "Service temporarily unavailable", Yn = "Too many requests, please try again later", Zn = "Unauthorized access", ei = "An error occurred", ti = "Invalid data", ni = "Female", ii = "Format", oi = "Front ID Card", si = "Full Name", ri = "Gender", ai = "Have you used e-invoices?", ci = "Are you using another e-invoice provider other than M-invoice?", li = "(Free Consulting and Support Hotline)", ui = "Hotline:", di = "ID Card Number", hi = "Increase", fi = "Information sent to the provider", gi = "Invoice Package", pi = "Invoice Symbol", mi = "Invoice Template", yi = { 1: "1 (VAT Invoice)", 2: "2 (Sales Invoice)", 3: "3 (Public Asset Sales)", 4: "4 (National Reserve Sales)", 5: "5 (Stamps, Tickets, Other Cards)", 6: "6 (Internal Documents)", 7: "7 (Commercial Invoice)", 8: "8 (VAT with Integrated Tax)", 9: "9 (Sales with Integrated Tax)" }, vi = "B (Agent)", bi = "D (Asset)", Si = "G (VAT Stamp)", $i = "H (Sales Stamp)", xi = "L (Tax Authority)", ki = "M (Cash Register)", Pi = "N (Internal)", wi = "T (Registration)", Ci = "Invoice type", Ti = "X (Commercial)", Oi = "4. E-INVOICE USAGE INFORMATION:", Li = "invoices/month", Ii = "2. Legal Representative Information:", Ni = "Please check and enter the correct legal representative name according to the uploaded business license.", Ri = "Loading...", Ai = "Male", Fi = "Max 500KB", Ei = "Month", Di = "Most Suitable Package", Ui = "Continue", ji = "No data available", Mi = "No package found.", Hi = "Please check your email inbox regularly to receive account information notifications from the provider.", Ki = "If you have not received the email account information (username/password) within 2 hours, please contact the information below for the fastest support:", Bi = "of", Vi = "OK", qi = "Optional", zi = "or", Qi = "Order created successfully", Gi = "Order has expired", Wi = "Order Information", _i = "Order Summary", Xi = "Organization Registration Certificate", Ji = "Passport", Yi = "Payment Amount", Zi = "Payment Failed", eo = ["Open your banking app or digital wallet on your phone", "Select the QR Code scan feature in the app", "Scan the QR code on this page and make payment"], to = "QR Payment Instructions", no = "Payment Method:", io = "Payment Successful!", oo = "Payment timeout", so = "Payment timeout! Please try again.", ro = "Payment", ao = "Permanent address", co = "Phone Number", lo = "Product", uo = "Provider", ho = "Provider Name", fo = "Province/City", go = "QR Code Payment", po = "Scan QR Code to Pay", mo = "Quantity", yo = "Registration Fee", vo = "Required", bo = "Return Home", So = "Return to step 1", $o = "Invoice template number (1-9)", xo = "Save", ko = "Units per month", Po = "Select File", wo = "Select E-Invoice Package", Co = "Select Provider", To = "Select Digital Signature Package", Oo = "Select Subscription Package", Lo = "Selected Products", Io = "Settings", No = "Digital Signature Package", Ro = "E-invoice software license", Ao = "Information", Fo = "Confirmation & Payment", Eo = "Invoice Package", Do = "Subscription Package", Uo = "Tax Authority", jo = "5 characters issued by the Authority for cash register bills", Mo = "Unit Tax Code", Ho = "Terms and Usage Policy", Ko = "Time Left", Bo = "Total", Vo = "Total Amount", qo = "Total Price", zo = "Transaction has been canceled. Returning to registration page.", Qo = "Unit", Go = "1. Unit Information", Wo = "units/month", _o = "Unit Price", Xo = "units/ month", Jo = "Upload Back ID Card", Yo = "Upload File", Zo = "Upload Front ID Card", es = "Upload Logo", ts = "Usage Policy", ns = "Ward", is = "Website", os = "E-Invoice Registration", ss = "Release year (last 2 digits)", rs = {
|
|
1287
|
-
accountName: Et,
|
|
1288
|
-
accountNumber: Dt,
|
|
1289
|
-
address: Ut,
|
|
1290
|
-
agreeWith: jt,
|
|
1291
|
-
and: Mt,
|
|
1292
|
-
back: Ht,
|
|
1293
|
-
backIdCard: Kt,
|
|
1294
|
-
bankName: Bt,
|
|
1295
|
-
beneficiaryBank: Vt,
|
|
1296
|
-
businessLicense: qt,
|
|
1297
|
-
cancel: zt,
|
|
1298
|
-
cancelTransaction: Qt,
|
|
1299
|
-
close: Gt,
|
|
1300
|
-
codeTypeC: Wt,
|
|
1301
|
-
codeTypeK: _t,
|
|
1302
|
-
codeTypeTooltip: Xt,
|
|
1303
|
-
comingSoon: Jt,
|
|
1304
|
-
companyName: Yt,
|
|
1305
|
-
completePaymentIn: Zt,
|
|
1306
|
-
completeRegistration: en,
|
|
1307
|
-
confirm: tn,
|
|
1308
|
-
confirmationTitle: nn,
|
|
1309
|
-
contactInfo: on,
|
|
1310
|
-
copy: sn,
|
|
1311
|
-
country: rn,
|
|
1312
|
-
customLettersTooltip: an,
|
|
1313
|
-
customUnits: cn,
|
|
1314
|
-
dateOfBirth: ln,
|
|
1315
|
-
decrease: un,
|
|
1316
|
-
delete: "Delete",
|
|
1317
|
-
digitalSignaturePackage: dn,
|
|
1318
|
-
district: hn,
|
|
1319
|
-
duration: fn,
|
|
1320
|
-
eContractTitle: gn,
|
|
1321
|
-
edit: pn,
|
|
1322
|
-
electronicInvoices: mn,
|
|
1323
|
-
email: yn,
|
|
1324
|
-
enterIdCard: vn,
|
|
1325
|
-
enterInvoiceSymbol: bn,
|
|
1326
|
-
enterPassport: Sn,
|
|
1327
|
-
enterProviderName: $n,
|
|
1328
|
-
enterTaxAuthorityCode: xn,
|
|
1329
|
-
errorCheckingCustomer: kn,
|
|
1330
|
-
errorCreatingOrder: Pn,
|
|
1331
|
-
errorFetchTaxInfo: wn,
|
|
1332
|
-
errorFileFormat: Cn,
|
|
1333
|
-
errorFileSize: Tn,
|
|
1334
|
-
errorForbidden: On,
|
|
1335
|
-
errorInvalidAddress: Ln,
|
|
1336
|
-
errorInvalidCard: In,
|
|
1337
|
-
errorInvalidDate: Nn,
|
|
1338
|
-
errorInvalidEmail: Rn,
|
|
1339
|
-
errorInvalidIdCard: An,
|
|
1340
|
-
errorInvalidName: Fn,
|
|
1341
|
-
errorInvalidPhone: En,
|
|
1342
|
-
errorInvalidProviderName: Dn,
|
|
1343
|
-
errorInvalidRequest: Un,
|
|
1344
|
-
errorInvalidTaxAuthorityCode: jn,
|
|
1345
|
-
errorInvalidTaxCode: Mn,
|
|
1346
|
-
errorLoadingData: Hn,
|
|
1347
|
-
errorLoadingInitPackages: Kn,
|
|
1348
|
-
errorLoadingInvoicePackages: Bn,
|
|
1349
|
-
errorLoadingSignaturePackages: Vn,
|
|
1350
|
-
errorNetwork: qn,
|
|
1351
|
-
errorNotFound: zn,
|
|
1352
|
-
errorOrderStatus: Qn,
|
|
1353
|
-
errorQRGeneration: Gn,
|
|
1354
|
-
errorRequired: Wn,
|
|
1355
|
-
errorSearchingPackages: _n,
|
|
1356
|
-
errorServer: Xn,
|
|
1357
|
-
errorServiceUnavailable: Jn,
|
|
1358
|
-
errorTooManyRequests: Yn,
|
|
1359
|
-
errorUnauthorized: Zn,
|
|
1360
|
-
errorUnknown: ei,
|
|
1361
|
-
errorValidation: ti,
|
|
1362
|
-
female: ni,
|
|
1363
|
-
fileFormat: ii,
|
|
1364
|
-
frontIdCard: oi,
|
|
1365
|
-
fullName: si,
|
|
1366
|
-
gender: ri,
|
|
1367
|
-
hasUsedEInvoice: ai,
|
|
1368
|
-
hasUsedEInvoiceBefore: ci,
|
|
1369
|
-
hotlineDesc: li,
|
|
1370
|
-
hotlineDomestic: ui,
|
|
1371
|
-
idNumber: di,
|
|
1372
|
-
increase: hi,
|
|
1373
|
-
informationSent: fi,
|
|
1374
|
-
invoicePackage: gi,
|
|
1375
|
-
invoiceSymbol: pi,
|
|
1376
|
-
invoiceTemplate: mi,
|
|
1377
|
-
invoiceTemplateTypes: yi,
|
|
1378
|
-
invoiceTypeB: vi,
|
|
1379
|
-
invoiceTypeD: bi,
|
|
1380
|
-
invoiceTypeG: Si,
|
|
1381
|
-
invoiceTypeH: $i,
|
|
1382
|
-
invoiceTypeL: xi,
|
|
1383
|
-
invoiceTypeM: ki,
|
|
1384
|
-
invoiceTypeN: Pi,
|
|
1385
|
-
invoiceTypeT: wi,
|
|
1386
|
-
invoiceTypeTooltip: Ci,
|
|
1387
|
-
invoiceTypeX: Ti,
|
|
1388
|
-
invoiceUsageInfo: Oi,
|
|
1389
|
-
invoicesPerMonth: Li,
|
|
1390
|
-
legalRepInfo: Ii,
|
|
1391
|
-
legalRepNote: Ni,
|
|
1392
|
-
loading: Ri,
|
|
1393
|
-
male: Ai,
|
|
1394
|
-
maxFileSize: Fi,
|
|
1395
|
-
month: Ei,
|
|
1396
|
-
mostSuitablePackage: Di,
|
|
1397
|
-
next: Ui,
|
|
1398
|
-
noDataAvailable: ji,
|
|
1399
|
-
noPackageFound: Mi,
|
|
1400
|
-
notice1: Hi,
|
|
1401
|
-
notice2: Ki,
|
|
1402
|
-
"notice3.1": "After being granted an account, please go to the Link",
|
|
1403
|
-
"notice3.2": "to connect and use the service HDDT",
|
|
1404
|
-
of: Bi,
|
|
1405
|
-
ok: Vi,
|
|
1406
|
-
optional: qi,
|
|
1407
|
-
or: zi,
|
|
1408
|
-
orderCreated: Qi,
|
|
1409
|
-
orderExpired: Gi,
|
|
1410
|
-
orderInfo: Wi,
|
|
1411
|
-
orderSummary: _i,
|
|
1412
|
-
organizationCert: Xi,
|
|
1413
|
-
package: "Package",
|
|
1414
|
-
passport: Ji,
|
|
1415
|
-
paymentAmount: Yi,
|
|
1416
|
-
paymentFailed: Zi,
|
|
1417
|
-
paymentInstructions: eo,
|
|
1418
|
-
paymentInstructionsTitle: to,
|
|
1419
|
-
paymentMethod: no,
|
|
1420
|
-
paymentSuccess: io,
|
|
1421
|
-
paymentTimeout: oo,
|
|
1422
|
-
paymentTimeoutMessage: so,
|
|
1423
|
-
paymentTitle: ro,
|
|
1424
|
-
permanentAddress: ao,
|
|
1425
|
-
phone: co,
|
|
1426
|
-
product: lo,
|
|
1427
|
-
provider: uo,
|
|
1428
|
-
providerName: ho,
|
|
1429
|
-
province: fo,
|
|
1430
|
-
qrPayment: go,
|
|
1431
|
-
qrPaymentTitle: po,
|
|
1432
|
-
quantity: mo,
|
|
1433
|
-
registrationFee: yo,
|
|
1434
|
-
required: vo,
|
|
1435
|
-
returnHome: bo,
|
|
1436
|
-
returnToStep1: So,
|
|
1437
|
-
sampleNumberTooltip: $o,
|
|
1438
|
-
save: xo,
|
|
1439
|
-
searchUnits: ko,
|
|
1440
|
-
selectFile: Po,
|
|
1441
|
-
selectInvoicePackage: wo,
|
|
1442
|
-
selectProvider: Co,
|
|
1443
|
-
selectSignaturePackage: To,
|
|
1444
|
-
selectSubscriptionPackage: Oo,
|
|
1445
|
-
selectedProducts: Lo,
|
|
1446
|
-
settings: Io,
|
|
1447
|
-
signaturePackage: No,
|
|
1448
|
-
softwareLicense: Ro,
|
|
1449
|
-
stepInfo: Ao,
|
|
1450
|
-
stepPayment: Fo,
|
|
1451
|
-
stepPlan: Eo,
|
|
1452
|
-
subscriptionPackage: Do,
|
|
1453
|
-
taxAuthority: Uo,
|
|
1454
|
-
taxAuthorityCode: jo,
|
|
1455
|
-
taxCode: Mo,
|
|
1456
|
-
termsAndUsagePolicy: Ho,
|
|
1457
|
-
timeLeft: Ko,
|
|
1458
|
-
total: Bo,
|
|
1459
|
-
totalAmount: Vo,
|
|
1460
|
-
totalPrice: qo,
|
|
1461
|
-
transactionCanceled: zo,
|
|
1462
|
-
unit: Qo,
|
|
1463
|
-
unitInfo: Go,
|
|
1464
|
-
unitPerMonth: Wo,
|
|
1465
|
-
unitPrice: _o,
|
|
1466
|
-
unitsPerMonth: Xo,
|
|
1467
|
-
uploadBackId: Jo,
|
|
1468
|
-
uploadFile: Yo,
|
|
1469
|
-
uploadFrontId: Zo,
|
|
1470
|
-
uploadLogo: es,
|
|
1471
|
-
usagePolicy: ts,
|
|
1472
|
-
ward: ns,
|
|
1473
|
-
website: is,
|
|
1474
|
-
widgetTitle: os,
|
|
1475
|
-
yearTooltip: ss
|
|
1476
|
-
}, as = "Tên tài khoản", cs = "Số tài khoản", ls = "Địa chỉ đơn vị", us = "Tôi đồng ý với", ds = "và", hs = "Quay lại", fs = "Mặt sau CCCD", gs = "Ngân hàng", ps = "Ngân hàng thụ hưởng", ms = "Giấy phép đăng ký kinh doanh", ys = "Hủy", vs = "Hủy giao dịch", bs = "Đóng", Ss = "C (Có mã CQT)", $s = "K (Không mã)", xs = "C: Có mã CQT, K: Không mã", ks = "Sắp ra mắt", Ps = "Tên đơn vị", ws = "Hoàn tất thanh toán của bạn trong", Cs = "Hoàn tất đăng ký", Ts = "Xác nhận", Os = "Thông tin lưu ý:", Ls = "3. Thông tin người liên hệ:", Is = "Bản", Ns = "Quốc gia", Rs = "2 ký tự tùy chọn (mặc định: YY)", As = "Số lượng tùy chỉnh", Fs = "Ngày sinh", Es = "Giảm", Ds = "Gói chữ ký số", Us = "Quận/Huyện", js = "Thời hạn", Ms = "E-Contract", Hs = "Chỉnh sửa", Ks = "hóa đơn điện tử", Bs = "Email", Vs = "Nhập số CMND/CCCD", qs = "Nhập ký hiệu hóa đơn", zs = "Nhập số hộ chiếu", Qs = "Nhập tên nhà cung cấp", Gs = "Nhập mã CQT cấp", Ws = "Không thể kiểm tra trạng thái khách hàng", _s = "Không thể tạo đơn hàng", Xs = "Lỗi khi lấy thông tin mã số thuế.", Js = "Định dạng tệp không được hỗ trợ", Ys = "Kích thước tệp quá lớn", Zs = "Truy cập bị từ chối", er = "Địa chỉ không được chứa ký tự đặc biệt", tr = "CCCD không hợp lệ", nr = "Ngày sinh không hợp lệ", ir = "Email không hợp lệ", or = "Số CCCD không hợp lệ", sr = "Chỉ được dùng chữ cái, số và dấu gạch dưới", rr = "Số điện thoại không hợp lệ", ar = "Tên nhà cung cấp không hợp lệ", cr = "Yêu cầu không hợp lệ", lr = "Mã CQT cấp không hợp lệ", ur = "Mã số thuế không hợp lệ", dr = "Không thể tải dữ liệu", hr = "Không thể tải gói đăng ký", fr = "Không thể tải gói hóa đơn", gr = "Không thể tải gói chữ ký số", pr = "Lỗi kết nối mạng", mr = "Không tìm thấy dữ liệu", yr = "Không thể kiểm tra trạng thái thanh toán đơn hàng. Vui lòng thử lại.", vr = "Không thể tạo mã QR thanh toán. Vui lòng thử lại.", br = "Trường này là bắt buộc", Sr = "Không thể tìm kiếm gói", $r = "Lỗi máy chủ, vui lòng thử lại sau", xr = "Dịch vụ tạm thời không khả dụng", kr = "Quá nhiều yêu cầu, vui lòng thử lại sau", Pr = "Không có quyền truy cập", wr = "Đã xảy ra lỗi", Cr = "Dữ liệu không hợp lệ", Tr = "Nữ", Or = "Định dạng", Lr = "Mặt trước CCCD", Ir = "Họ và tên", Nr = "Giới tính", Rr = "Bạn đã sử dụng hoá đơn điện tử?", Ar = "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?", Fr = "(Tổng đài Tư vấn, Hỗ trợ miễn phí)", Er = "Hotline:", Dr = "CCCD", Ur = "Tăng", jr = "Đã gửi thông tin sang nhà cung cấp", Mr = "Gói hóa đơn", Hr = "Ký hiệu hóa đơn", Kr = "Mẫu số", Br = { 1: "1 (Hóa đơn GTGT)", 2: "2 (Hóa đơn bán hàng)", 3: "3 (Bán tài sản công)", 4: "4 (Bán dự trữ quốc gia)", 5: "5 (Tem, vé, thẻ khác)", 6: "6 (Chứng từ nội bộ)", 7: "7 (Hóa đơn thương mại)", 8: "8 (GTGT tích hợp thuế)", 9: "9 (Bán hàng tích hợp thuế)" }, Vr = "B (Đại lý)", qr = "D (Tài sản)", zr = "G (Tem GTGT)", Qr = "H (Tem bán hàng)", Gr = "L (CQT)", Wr = "M (Máy tính tiền)", _r = "N (Nội bộ)", Xr = "T (Đăng ký)", Jr = "Loại hóa đơn", Yr = "X (Thương mại)", Zr = "4. THÔNG TIN SỬ DỤNG HDDT:", ea = "hóa đơn/tháng", ta = "2. Thông tin người đại diện pháp luật:", na = "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.", ia = "Đang tải...", oa = "Nam", sa = "Tối đa 500Kb", ra = "Tháng", aa = "Gói phù hợp nhất", ca = "Tiếp tục", la = "Không có dữ liệu", ua = "Không tìm thấy gói nào.", da = "Vui lòng thường xuyên kiểm tra hộp thư Email nhận thông báo thông tin tài khoản từ nhà cung cấp", ha = "Trong vòng 2 giờ nếu chưa nhận được thông tin Email tài khoản (username/password). Bạn có thể liên hệ thông tin phía bên dưới để được hỗ trợ sớm nhất:", fa = "của", ga = "OK", pa = "Tùy chọn", ma = "hoặc", ya = "Đơn hàng đã được tạo thành công", va = "Đơn hàng đã hết hạn", ba = "Thông tin đơn hàng", Sa = "Tóm tắt đơn hàng", $a = "Giấy chứng nhận đăng ký doanh nghiệp", xa = "Hộ chiếu", ka = "Số tiền thanh toán", Pa = "Thanh toán thất bại", wa = ["Mở ứng dụng Ngân hàng hoặc Ví điện tử trên điện thoại", "Trên ứng dụng chọn tính năng Quét mã QR", "Quét mã QR ở trang này và thanh toán"], Ca = "Hướng dẫn thanh toán QR", Ta = "Hình thức thanh toán:", Oa = "Thanh toán thành công!", La = "Hết thời gian thanh toán", Ia = "Hết thời gian thanh toán! Vui lòng thử lại.", Na = "Thanh toán", Ra = "Địa chỉ thường trú", Aa = "Số điện thoại", Fa = "Sản phẩm", Ea = "Nhà cung cấp", Da = "Tên NCC", Ua = "Tỉnh/Thành phố", ja = "Thanh toán qua mã QR", Ma = "Quét mã QR để thanh toán", Ha = "Số lượng", Ka = "Phí đăng ký", Ba = "Bắt buộc", Va = "Trở về trang chủ", qa = "Quay lại bước 1", za = "Mẫu số hóa đơn (1-9)", Qa = "Lưu", Ga = "Số đơn/tháng", Wa = "Chọn tệp", _a = "Chọn gói hóa đơn điện tử", Xa = "Chọn nhà cung cấp", Ja = "Chọn gói chữ ký số", Ya = "Chọn gói đăng ký", Za = "Sản phẩm đã chọn", ec = "Thiết lập", tc = "Gói chữ ký số", nc = "Bản quyền phần mềm hóa đơn điện tử", ic = "Thông Tin", oc = "Xác Nhận Và Thanh Toán", sc = "Gói Hóa Đơn", rc = "Gói đăng ký", ac = "CQT quản lý", cc = "5 ký tự do CQT cấp cho loại hóa đơn máy tính tiền", lc = "Mã số thuế đơn vị", uc = "Điều khoản và Chính sách sử dụng", dc = "Thời gian còn lại", hc = "Tổng cộng", fc = "Tổng tiền", gc = "Thành tiền", pc = "Giao dịch đã được hủy. Quay về trang đăng ký.", mc = "Đơn vị tính", yc = "1. Thông tin đơn vị", vc = "đơn/tháng", bc = "Đơn giá", Sc = "đơn/ tháng", $c = "Tải lên mặt sau CCCD", xc = "Tải lên tệp", kc = "Tải lên mặt trước CCCD", Pc = "Tải logo lên", wc = "Chính sách sử dụng", Cc = "Phường/Xã", Tc = "Website", Oc = "Đăng ký hóa đơn điện tử", Lc = "Năm phát hành (2 chữ số cuối)", Ic = {
|
|
1477
|
-
accountName: as,
|
|
1478
|
-
accountNumber: cs,
|
|
1479
|
-
address: ls,
|
|
1480
|
-
agreeWith: us,
|
|
1481
|
-
and: ds,
|
|
1482
|
-
back: hs,
|
|
1483
|
-
backIdCard: fs,
|
|
1484
|
-
bankName: gs,
|
|
1485
|
-
beneficiaryBank: ps,
|
|
1486
|
-
businessLicense: ms,
|
|
1487
|
-
cancel: ys,
|
|
1488
|
-
cancelTransaction: vs,
|
|
1489
|
-
close: bs,
|
|
1490
|
-
codeTypeC: Ss,
|
|
1491
|
-
codeTypeK: $s,
|
|
1492
|
-
codeTypeTooltip: xs,
|
|
1493
|
-
comingSoon: ks,
|
|
1494
|
-
companyName: Ps,
|
|
1495
|
-
completePaymentIn: ws,
|
|
1496
|
-
completeRegistration: Cs,
|
|
1497
|
-
confirm: Ts,
|
|
1498
|
-
confirmationTitle: Os,
|
|
1499
|
-
contactInfo: Ls,
|
|
1500
|
-
copy: Is,
|
|
1501
|
-
country: Ns,
|
|
1502
|
-
customLettersTooltip: Rs,
|
|
1503
|
-
customUnits: As,
|
|
1504
|
-
dateOfBirth: Fs,
|
|
1505
|
-
decrease: Es,
|
|
1506
|
-
delete: "Xóa",
|
|
1507
|
-
digitalSignaturePackage: Ds,
|
|
1508
|
-
district: Us,
|
|
1509
|
-
duration: js,
|
|
1510
|
-
eContractTitle: Ms,
|
|
1511
|
-
edit: Hs,
|
|
1512
|
-
electronicInvoices: Ks,
|
|
1513
|
-
email: Bs,
|
|
1514
|
-
enterIdCard: Vs,
|
|
1515
|
-
enterInvoiceSymbol: qs,
|
|
1516
|
-
enterPassport: zs,
|
|
1517
|
-
enterProviderName: Qs,
|
|
1518
|
-
enterTaxAuthorityCode: Gs,
|
|
1519
|
-
errorCheckingCustomer: Ws,
|
|
1520
|
-
errorCreatingOrder: _s,
|
|
1521
|
-
errorFetchTaxInfo: Xs,
|
|
1522
|
-
errorFileFormat: Js,
|
|
1523
|
-
errorFileSize: Ys,
|
|
1524
|
-
errorForbidden: Zs,
|
|
1525
|
-
errorInvalidAddress: er,
|
|
1526
|
-
errorInvalidCard: tr,
|
|
1527
|
-
errorInvalidDate: nr,
|
|
1528
|
-
errorInvalidEmail: ir,
|
|
1529
|
-
errorInvalidIdCard: or,
|
|
1530
|
-
errorInvalidName: sr,
|
|
1531
|
-
errorInvalidPhone: rr,
|
|
1532
|
-
errorInvalidProviderName: ar,
|
|
1533
|
-
errorInvalidRequest: cr,
|
|
1534
|
-
errorInvalidTaxAuthorityCode: lr,
|
|
1535
|
-
errorInvalidTaxCode: ur,
|
|
1536
|
-
errorLoadingData: dr,
|
|
1537
|
-
errorLoadingInitPackages: hr,
|
|
1538
|
-
errorLoadingInvoicePackages: fr,
|
|
1539
|
-
errorLoadingSignaturePackages: gr,
|
|
1540
|
-
errorNetwork: pr,
|
|
1541
|
-
errorNotFound: mr,
|
|
1542
|
-
errorOrderStatus: yr,
|
|
1543
|
-
errorQRGeneration: vr,
|
|
1544
|
-
errorRequired: br,
|
|
1545
|
-
errorSearchingPackages: Sr,
|
|
1546
|
-
errorServer: $r,
|
|
1547
|
-
errorServiceUnavailable: xr,
|
|
1548
|
-
errorTooManyRequests: kr,
|
|
1549
|
-
errorUnauthorized: Pr,
|
|
1550
|
-
errorUnknown: wr,
|
|
1551
|
-
errorValidation: Cr,
|
|
1552
|
-
female: Tr,
|
|
1553
|
-
fileFormat: Or,
|
|
1554
|
-
frontIdCard: Lr,
|
|
1555
|
-
fullName: Ir,
|
|
1556
|
-
gender: Nr,
|
|
1557
|
-
hasUsedEInvoice: Rr,
|
|
1558
|
-
hasUsedEInvoiceBefore: Ar,
|
|
1559
|
-
hotlineDesc: Fr,
|
|
1560
|
-
hotlineDomestic: Er,
|
|
1561
|
-
idNumber: Dr,
|
|
1562
|
-
increase: Ur,
|
|
1563
|
-
informationSent: jr,
|
|
1564
|
-
invoicePackage: Mr,
|
|
1565
|
-
invoiceSymbol: Hr,
|
|
1566
|
-
invoiceTemplate: Kr,
|
|
1567
|
-
invoiceTemplateTypes: Br,
|
|
1568
|
-
invoiceTypeB: Vr,
|
|
1569
|
-
invoiceTypeD: qr,
|
|
1570
|
-
invoiceTypeG: zr,
|
|
1571
|
-
invoiceTypeH: Qr,
|
|
1572
|
-
invoiceTypeL: Gr,
|
|
1573
|
-
invoiceTypeM: Wr,
|
|
1574
|
-
invoiceTypeN: _r,
|
|
1575
|
-
invoiceTypeT: Xr,
|
|
1576
|
-
invoiceTypeTooltip: Jr,
|
|
1577
|
-
invoiceTypeX: Yr,
|
|
1578
|
-
invoiceUsageInfo: Zr,
|
|
1579
|
-
invoicesPerMonth: ea,
|
|
1580
|
-
legalRepInfo: ta,
|
|
1581
|
-
legalRepNote: na,
|
|
1582
|
-
loading: ia,
|
|
1583
|
-
male: oa,
|
|
1584
|
-
maxFileSize: sa,
|
|
1585
|
-
month: ra,
|
|
1586
|
-
mostSuitablePackage: aa,
|
|
1587
|
-
next: ca,
|
|
1588
|
-
noDataAvailable: la,
|
|
1589
|
-
noPackageFound: ua,
|
|
1590
|
-
notice1: da,
|
|
1591
|
-
notice2: ha,
|
|
1592
|
-
"notice3.1": "Sau khi được cấp tài khoản, vui lòng vào Link",
|
|
1593
|
-
"notice3.2": "để kết nối và sử dụng dịch vụ HDDT",
|
|
1594
|
-
of: fa,
|
|
1595
|
-
ok: ga,
|
|
1596
|
-
optional: pa,
|
|
1597
|
-
or: ma,
|
|
1598
|
-
orderCreated: ya,
|
|
1599
|
-
orderExpired: va,
|
|
1600
|
-
orderInfo: ba,
|
|
1601
|
-
orderSummary: Sa,
|
|
1602
|
-
organizationCert: $a,
|
|
1603
|
-
package: "Gói",
|
|
1604
|
-
passport: xa,
|
|
1605
|
-
paymentAmount: ka,
|
|
1606
|
-
paymentFailed: Pa,
|
|
1607
|
-
paymentInstructions: wa,
|
|
1608
|
-
paymentInstructionsTitle: Ca,
|
|
1609
|
-
paymentMethod: Ta,
|
|
1610
|
-
paymentSuccess: Oa,
|
|
1611
|
-
paymentTimeout: La,
|
|
1612
|
-
paymentTimeoutMessage: Ia,
|
|
1613
|
-
paymentTitle: Na,
|
|
1614
|
-
permanentAddress: Ra,
|
|
1615
|
-
phone: Aa,
|
|
1616
|
-
product: Fa,
|
|
1617
|
-
provider: Ea,
|
|
1618
|
-
providerName: Da,
|
|
1619
|
-
province: Ua,
|
|
1620
|
-
qrPayment: ja,
|
|
1621
|
-
qrPaymentTitle: Ma,
|
|
1622
|
-
quantity: Ha,
|
|
1623
|
-
registrationFee: Ka,
|
|
1624
|
-
required: Ba,
|
|
1625
|
-
returnHome: Va,
|
|
1626
|
-
returnToStep1: qa,
|
|
1627
|
-
sampleNumberTooltip: za,
|
|
1628
|
-
save: Qa,
|
|
1629
|
-
searchUnits: Ga,
|
|
1630
|
-
selectFile: Wa,
|
|
1631
|
-
selectInvoicePackage: _a,
|
|
1632
|
-
selectProvider: Xa,
|
|
1633
|
-
selectSignaturePackage: Ja,
|
|
1634
|
-
selectSubscriptionPackage: Ya,
|
|
1635
|
-
selectedProducts: Za,
|
|
1636
|
-
settings: ec,
|
|
1637
|
-
signaturePackage: tc,
|
|
1638
|
-
softwareLicense: nc,
|
|
1639
|
-
stepInfo: ic,
|
|
1640
|
-
stepPayment: oc,
|
|
1641
|
-
stepPlan: sc,
|
|
1642
|
-
subscriptionPackage: rc,
|
|
1643
|
-
taxAuthority: ac,
|
|
1644
|
-
taxAuthorityCode: cc,
|
|
1645
|
-
taxCode: lc,
|
|
1646
|
-
termsAndUsagePolicy: uc,
|
|
1647
|
-
timeLeft: dc,
|
|
1648
|
-
total: hc,
|
|
1649
|
-
totalAmount: fc,
|
|
1650
|
-
totalPrice: gc,
|
|
1651
|
-
transactionCanceled: pc,
|
|
1652
|
-
unit: mc,
|
|
1653
|
-
unitInfo: yc,
|
|
1654
|
-
unitPerMonth: vc,
|
|
1655
|
-
unitPrice: bc,
|
|
1656
|
-
unitsPerMonth: Sc,
|
|
1657
|
-
uploadBackId: $c,
|
|
1658
|
-
uploadFile: xc,
|
|
1659
|
-
uploadFrontId: kc,
|
|
1660
|
-
uploadLogo: Pc,
|
|
1661
|
-
usagePolicy: wc,
|
|
1662
|
-
ward: Cc,
|
|
1663
|
-
website: Tc,
|
|
1664
|
-
widgetTitle: Oc,
|
|
1665
|
-
yearTooltip: Lc
|
|
1666
|
-
}, {
|
|
1667
|
-
slice: Nc,
|
|
1668
|
-
forEach: Rc
|
|
1669
|
-
} = [];
|
|
1670
|
-
function Ac(o) {
|
|
1671
|
-
return Rc.call(Nc.call(arguments, 1), (e) => {
|
|
1672
|
-
if (e)
|
|
1673
|
-
for (const t in e)
|
|
1674
|
-
o[t] === void 0 && (o[t] = e[t]);
|
|
1675
|
-
}), o;
|
|
1676
|
-
}
|
|
1677
|
-
function Fc(o) {
|
|
1678
|
-
return typeof o != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((t) => t.test(o));
|
|
1679
|
-
}
|
|
1680
|
-
const je = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Ec = function(o, e) {
|
|
1681
|
-
const n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
1682
|
-
path: "/"
|
|
1683
|
-
}, i = encodeURIComponent(e);
|
|
1684
|
-
let s = `${o}=${i}`;
|
|
1685
|
-
if (n.maxAge > 0) {
|
|
1686
|
-
const r = n.maxAge - 0;
|
|
1687
|
-
if (Number.isNaN(r)) throw new Error("maxAge should be a Number");
|
|
1688
|
-
s += `; Max-Age=${Math.floor(r)}`;
|
|
1689
|
-
}
|
|
1690
|
-
if (n.domain) {
|
|
1691
|
-
if (!je.test(n.domain))
|
|
1692
|
-
throw new TypeError("option domain is invalid");
|
|
1693
|
-
s += `; Domain=${n.domain}`;
|
|
1694
|
-
}
|
|
1695
|
-
if (n.path) {
|
|
1696
|
-
if (!je.test(n.path))
|
|
1697
|
-
throw new TypeError("option path is invalid");
|
|
1698
|
-
s += `; Path=${n.path}`;
|
|
1699
|
-
}
|
|
1700
|
-
if (n.expires) {
|
|
1701
|
-
if (typeof n.expires.toUTCString != "function")
|
|
1702
|
-
throw new TypeError("option expires is invalid");
|
|
1703
|
-
s += `; Expires=${n.expires.toUTCString()}`;
|
|
1704
|
-
}
|
|
1705
|
-
if (n.httpOnly && (s += "; HttpOnly"), n.secure && (s += "; Secure"), n.sameSite)
|
|
1706
|
-
switch (typeof n.sameSite == "string" ? n.sameSite.toLowerCase() : n.sameSite) {
|
|
1707
|
-
case !0:
|
|
1708
|
-
s += "; SameSite=Strict";
|
|
1709
|
-
break;
|
|
1710
|
-
case "lax":
|
|
1711
|
-
s += "; SameSite=Lax";
|
|
1712
|
-
break;
|
|
1713
|
-
case "strict":
|
|
1714
|
-
s += "; SameSite=Strict";
|
|
1715
|
-
break;
|
|
1716
|
-
case "none":
|
|
1717
|
-
s += "; SameSite=None";
|
|
1718
|
-
break;
|
|
1719
|
-
default:
|
|
1720
|
-
throw new TypeError("option sameSite is invalid");
|
|
1721
|
-
}
|
|
1722
|
-
return n.partitioned && (s += "; Partitioned"), s;
|
|
1723
|
-
}, Me = {
|
|
1724
|
-
create(o, e, t, n) {
|
|
1725
|
-
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
1726
|
-
path: "/",
|
|
1727
|
-
sameSite: "strict"
|
|
1728
|
-
};
|
|
1729
|
-
t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), n && (i.domain = n), document.cookie = Ec(o, e, i);
|
|
1730
|
-
},
|
|
1731
|
-
read(o) {
|
|
1732
|
-
const e = `${o}=`, t = document.cookie.split(";");
|
|
1733
|
-
for (let n = 0; n < t.length; n++) {
|
|
1734
|
-
let i = t[n];
|
|
1735
|
-
for (; i.charAt(0) === " "; ) i = i.substring(1, i.length);
|
|
1736
|
-
if (i.indexOf(e) === 0) return i.substring(e.length, i.length);
|
|
1737
|
-
}
|
|
1738
|
-
return null;
|
|
1739
|
-
},
|
|
1740
|
-
remove(o, e) {
|
|
1741
|
-
this.create(o, "", -1, e);
|
|
1742
|
-
}
|
|
1743
|
-
};
|
|
1744
|
-
var Dc = {
|
|
1745
|
-
name: "cookie",
|
|
1746
|
-
// Deconstruct the options object and extract the lookupCookie property
|
|
1747
|
-
lookup(o) {
|
|
1748
|
-
let {
|
|
1749
|
-
lookupCookie: e
|
|
1750
|
-
} = o;
|
|
1751
|
-
if (e && typeof document != "undefined")
|
|
1752
|
-
return Me.read(e) || void 0;
|
|
1753
|
-
},
|
|
1754
|
-
// Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
|
|
1755
|
-
cacheUserLanguage(o, e) {
|
|
1756
|
-
let {
|
|
1757
|
-
lookupCookie: t,
|
|
1758
|
-
cookieMinutes: n,
|
|
1759
|
-
cookieDomain: i,
|
|
1760
|
-
cookieOptions: s
|
|
1761
|
-
} = e;
|
|
1762
|
-
t && typeof document != "undefined" && Me.create(t, o, n, i, s);
|
|
1763
|
-
}
|
|
1764
|
-
}, Uc = {
|
|
1765
|
-
name: "querystring",
|
|
1766
|
-
// Deconstruct the options object and extract the lookupQuerystring property
|
|
1767
|
-
lookup(o) {
|
|
1768
|
-
var n;
|
|
1769
|
-
let {
|
|
1770
|
-
lookupQuerystring: e
|
|
1771
|
-
} = o, t;
|
|
1772
|
-
if (typeof window != "undefined") {
|
|
1773
|
-
let {
|
|
1774
|
-
search: i
|
|
1775
|
-
} = window.location;
|
|
1776
|
-
!window.location.search && ((n = window.location.hash) == null ? void 0 : n.indexOf("?")) > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?")));
|
|
1777
|
-
const r = i.substring(1).split("&");
|
|
1778
|
-
for (let a = 0; a < r.length; a++) {
|
|
1779
|
-
const c = r[a].indexOf("=");
|
|
1780
|
-
c > 0 && r[a].substring(0, c) === e && (t = r[a].substring(c + 1));
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
return t;
|
|
1784
|
-
}
|
|
1785
|
-
}, jc = {
|
|
1786
|
-
name: "hash",
|
|
1787
|
-
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
|
1788
|
-
lookup(o) {
|
|
1789
|
-
var i;
|
|
1790
|
-
let {
|
|
1791
|
-
lookupHash: e,
|
|
1792
|
-
lookupFromHashIndex: t
|
|
1793
|
-
} = o, n;
|
|
1794
|
-
if (typeof window != "undefined") {
|
|
1795
|
-
const {
|
|
1796
|
-
hash: s
|
|
1797
|
-
} = window.location;
|
|
1798
|
-
if (s && s.length > 2) {
|
|
1799
|
-
const r = s.substring(1);
|
|
1800
|
-
if (e) {
|
|
1801
|
-
const a = r.split("&");
|
|
1802
|
-
for (let c = 0; c < a.length; c++) {
|
|
1803
|
-
const l = a[c].indexOf("=");
|
|
1804
|
-
l > 0 && a[c].substring(0, l) === e && (n = a[c].substring(l + 1));
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
if (n) return n;
|
|
1808
|
-
if (!n && t > -1) {
|
|
1809
|
-
const a = s.match(/\/([a-zA-Z-]*)/g);
|
|
1810
|
-
return Array.isArray(a) ? (i = a[typeof t == "number" ? t : 0]) == null ? void 0 : i.replace("/", "") : void 0;
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
return n;
|
|
1815
|
-
}
|
|
1816
|
-
};
|
|
1817
|
-
let M = null;
|
|
1818
|
-
const He = () => {
|
|
1819
|
-
if (M !== null) return M;
|
|
1820
|
-
try {
|
|
1821
|
-
if (M = typeof window != "undefined" && window.localStorage !== null, !M)
|
|
1822
|
-
return !1;
|
|
1823
|
-
const o = "i18next.translate.boo";
|
|
1824
|
-
window.localStorage.setItem(o, "foo"), window.localStorage.removeItem(o);
|
|
1825
|
-
} catch (o) {
|
|
1826
|
-
M = !1;
|
|
1827
|
-
}
|
|
1828
|
-
return M;
|
|
1829
|
-
};
|
|
1830
|
-
var Mc = {
|
|
1831
|
-
name: "localStorage",
|
|
1832
|
-
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
1833
|
-
lookup(o) {
|
|
1834
|
-
let {
|
|
1835
|
-
lookupLocalStorage: e
|
|
1836
|
-
} = o;
|
|
1837
|
-
if (e && He())
|
|
1838
|
-
return window.localStorage.getItem(e) || void 0;
|
|
1839
|
-
},
|
|
1840
|
-
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
1841
|
-
cacheUserLanguage(o, e) {
|
|
1842
|
-
let {
|
|
1843
|
-
lookupLocalStorage: t
|
|
1844
|
-
} = e;
|
|
1845
|
-
t && He() && window.localStorage.setItem(t, o);
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
|
-
let H = null;
|
|
1849
|
-
const Ke = () => {
|
|
1850
|
-
if (H !== null) return H;
|
|
1851
|
-
try {
|
|
1852
|
-
if (H = typeof window != "undefined" && window.sessionStorage !== null, !H)
|
|
1853
|
-
return !1;
|
|
1854
|
-
const o = "i18next.translate.boo";
|
|
1855
|
-
window.sessionStorage.setItem(o, "foo"), window.sessionStorage.removeItem(o);
|
|
1856
|
-
} catch (o) {
|
|
1857
|
-
H = !1;
|
|
1858
|
-
}
|
|
1859
|
-
return H;
|
|
1860
|
-
};
|
|
1861
|
-
var Hc = {
|
|
1862
|
-
name: "sessionStorage",
|
|
1863
|
-
lookup(o) {
|
|
1864
|
-
let {
|
|
1865
|
-
lookupSessionStorage: e
|
|
1866
|
-
} = o;
|
|
1867
|
-
if (e && Ke())
|
|
1868
|
-
return window.sessionStorage.getItem(e) || void 0;
|
|
1869
|
-
},
|
|
1870
|
-
cacheUserLanguage(o, e) {
|
|
1871
|
-
let {
|
|
1872
|
-
lookupSessionStorage: t
|
|
1873
|
-
} = e;
|
|
1874
|
-
t && Ke() && window.sessionStorage.setItem(t, o);
|
|
1875
|
-
}
|
|
1876
|
-
}, Kc = {
|
|
1877
|
-
name: "navigator",
|
|
1878
|
-
lookup(o) {
|
|
1879
|
-
const e = [];
|
|
1880
|
-
if (typeof navigator != "undefined") {
|
|
1881
|
-
const {
|
|
1882
|
-
languages: t,
|
|
1883
|
-
userLanguage: n,
|
|
1884
|
-
language: i
|
|
1885
|
-
} = navigator;
|
|
1886
|
-
if (t)
|
|
1887
|
-
for (let s = 0; s < t.length; s++)
|
|
1888
|
-
e.push(t[s]);
|
|
1889
|
-
n && e.push(n), i && e.push(i);
|
|
1890
|
-
}
|
|
1891
|
-
return e.length > 0 ? e : void 0;
|
|
1892
|
-
}
|
|
1893
|
-
}, Bc = {
|
|
1894
|
-
name: "htmlTag",
|
|
1895
|
-
// Deconstruct the options object and extract the htmlTag property
|
|
1896
|
-
lookup(o) {
|
|
1897
|
-
let {
|
|
1898
|
-
htmlTag: e
|
|
1899
|
-
} = o, t;
|
|
1900
|
-
const n = e || (typeof document != "undefined" ? document.documentElement : null);
|
|
1901
|
-
return n && typeof n.getAttribute == "function" && (t = n.getAttribute("lang")), t;
|
|
1902
|
-
}
|
|
1903
|
-
}, Vc = {
|
|
1904
|
-
name: "path",
|
|
1905
|
-
// Deconstruct the options object and extract the lookupFromPathIndex property
|
|
1906
|
-
lookup(o) {
|
|
1907
|
-
var i;
|
|
1908
|
-
let {
|
|
1909
|
-
lookupFromPathIndex: e
|
|
1910
|
-
} = o;
|
|
1911
|
-
if (typeof window == "undefined") return;
|
|
1912
|
-
const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
1913
|
-
return Array.isArray(t) ? (i = t[typeof e == "number" ? e : 0]) == null ? void 0 : i.replace("/", "") : void 0;
|
|
1914
|
-
}
|
|
1915
|
-
}, qc = {
|
|
1916
|
-
name: "subdomain",
|
|
1917
|
-
lookup(o) {
|
|
1918
|
-
var i, s;
|
|
1919
|
-
let {
|
|
1920
|
-
lookupFromSubdomainIndex: e
|
|
1921
|
-
} = o;
|
|
1922
|
-
const t = typeof e == "number" ? e + 1 : 1, n = typeof window != "undefined" && ((s = (i = window.location) == null ? void 0 : i.hostname) == null ? void 0 : s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));
|
|
1923
|
-
if (n)
|
|
1924
|
-
return n[t];
|
|
1925
|
-
}
|
|
1926
|
-
};
|
|
1927
|
-
let Ye = !1;
|
|
1928
|
-
try {
|
|
1929
|
-
document.cookie, Ye = !0;
|
|
1930
|
-
} catch (o) {
|
|
1931
|
-
}
|
|
1932
|
-
const Ze = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
1933
|
-
Ye || Ze.splice(1, 1);
|
|
1934
|
-
const zc = () => ({
|
|
1935
|
-
order: Ze,
|
|
1936
|
-
lookupQuerystring: "lng",
|
|
1937
|
-
lookupCookie: "i18next",
|
|
1938
|
-
lookupLocalStorage: "i18nextLng",
|
|
1939
|
-
lookupSessionStorage: "i18nextLng",
|
|
1940
|
-
// cache user language
|
|
1941
|
-
caches: ["localStorage"],
|
|
1942
|
-
excludeCacheFor: ["cimode"],
|
|
1943
|
-
// cookieMinutes: 10,
|
|
1944
|
-
// cookieDomain: 'myDomain'
|
|
1945
|
-
convertDetectedLanguage: (o) => o
|
|
1946
|
-
});
|
|
1947
|
-
class et {
|
|
1948
|
-
constructor(e) {
|
|
1949
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1950
|
-
this.type = "languageDetector", this.detectors = {}, this.init(e, t);
|
|
1951
|
-
}
|
|
1952
|
-
init() {
|
|
1953
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
1954
|
-
languageUtils: {}
|
|
1955
|
-
}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1956
|
-
this.services = e, this.options = Ac(t, this.options || {}, zc()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(Dc), this.addDetector(Uc), this.addDetector(Mc), this.addDetector(Hc), this.addDetector(Kc), this.addDetector(Bc), this.addDetector(Vc), this.addDetector(qc), this.addDetector(jc);
|
|
1957
|
-
}
|
|
1958
|
-
addDetector(e) {
|
|
1959
|
-
return this.detectors[e.name] = e, this;
|
|
1960
|
-
}
|
|
1961
|
-
detect() {
|
|
1962
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.order, t = [];
|
|
1963
|
-
return e.forEach((n) => {
|
|
1964
|
-
if (this.detectors[n]) {
|
|
1965
|
-
let i = this.detectors[n].lookup(this.options);
|
|
1966
|
-
i && typeof i == "string" && (i = [i]), i && (t = t.concat(i));
|
|
1967
|
-
}
|
|
1968
|
-
}), t = t.filter((n) => n != null && !Fc(n)).map((n) => this.options.convertDetectedLanguage(n)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null;
|
|
1969
|
-
}
|
|
1970
|
-
cacheUserLanguage(e) {
|
|
1971
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
|
|
1972
|
-
t && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(e) > -1 || t.forEach((n) => {
|
|
1973
|
-
this.detectors[n] && this.detectors[n].cacheUserLanguage(e, this.options);
|
|
1974
|
-
}));
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
et.type = "languageDetector";
|
|
1978
|
-
function ge(o) {
|
|
1979
|
-
"@babel/helpers - typeof";
|
|
1980
|
-
return ge = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1981
|
-
return typeof e;
|
|
1982
|
-
} : function(e) {
|
|
1983
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1984
|
-
}, ge(o);
|
|
1985
|
-
}
|
|
1986
|
-
function tt() {
|
|
1987
|
-
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest == "undefined" ? "undefined" : ge(XMLHttpRequest)) === "object";
|
|
1988
|
-
}
|
|
1989
|
-
function Qc(o) {
|
|
1990
|
-
return !!o && typeof o.then == "function";
|
|
1991
|
-
}
|
|
1992
|
-
function Gc(o) {
|
|
1993
|
-
return Qc(o) ? o : Promise.resolve(o);
|
|
1994
|
-
}
|
|
1995
|
-
function Be(o, e) {
|
|
1996
|
-
var t = Object.keys(o);
|
|
1997
|
-
if (Object.getOwnPropertySymbols) {
|
|
1998
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
1999
|
-
e && (n = n.filter(function(i) {
|
|
2000
|
-
return Object.getOwnPropertyDescriptor(o, i).enumerable;
|
|
2001
|
-
})), t.push.apply(t, n);
|
|
2002
|
-
}
|
|
2003
|
-
return t;
|
|
2004
|
-
}
|
|
2005
|
-
function Ve(o) {
|
|
2006
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2007
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
2008
|
-
e % 2 ? Be(Object(t), !0).forEach(function(n) {
|
|
2009
|
-
Wc(o, n, t[n]);
|
|
2010
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Be(Object(t)).forEach(function(n) {
|
|
2011
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2012
|
-
});
|
|
2013
|
-
}
|
|
2014
|
-
return o;
|
|
2015
|
-
}
|
|
2016
|
-
function Wc(o, e, t) {
|
|
2017
|
-
return (e = _c(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
|
|
2018
|
-
}
|
|
2019
|
-
function _c(o) {
|
|
2020
|
-
var e = Xc(o, "string");
|
|
2021
|
-
return U(e) == "symbol" ? e : e + "";
|
|
2022
|
-
}
|
|
2023
|
-
function Xc(o, e) {
|
|
2024
|
-
if (U(o) != "object" || !o) return o;
|
|
2025
|
-
var t = o[Symbol.toPrimitive];
|
|
2026
|
-
if (t !== void 0) {
|
|
2027
|
-
var n = t.call(o, e);
|
|
2028
|
-
if (U(n) != "object") return n;
|
|
2029
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2030
|
-
}
|
|
2031
|
-
return (e === "string" ? String : Number)(o);
|
|
2032
|
-
}
|
|
2033
|
-
function U(o) {
|
|
2034
|
-
"@babel/helpers - typeof";
|
|
2035
|
-
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2036
|
-
return typeof e;
|
|
2037
|
-
} : function(e) {
|
|
2038
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2039
|
-
}, U(o);
|
|
2040
|
-
}
|
|
2041
|
-
var E = typeof fetch == "function" ? fetch : void 0;
|
|
2042
|
-
typeof global != "undefined" && global.fetch ? E = global.fetch : typeof window != "undefined" && window.fetch && (E = window.fetch);
|
|
2043
|
-
var X;
|
|
2044
|
-
tt() && (typeof global != "undefined" && global.XMLHttpRequest ? X = global.XMLHttpRequest : typeof window != "undefined" && window.XMLHttpRequest && (X = window.XMLHttpRequest));
|
|
2045
|
-
var oe;
|
|
2046
|
-
typeof ActiveXObject == "function" && (typeof global != "undefined" && global.ActiveXObject ? oe = global.ActiveXObject : typeof window != "undefined" && window.ActiveXObject && (oe = window.ActiveXObject));
|
|
2047
|
-
typeof E != "function" && (E = void 0);
|
|
2048
|
-
if (!E && !X && !oe)
|
|
2049
|
-
try {
|
|
2050
|
-
import("./browser-ponyfill-BxQPfTD2.js").then((o) => o.b).then(function(o) {
|
|
2051
|
-
E = o.default;
|
|
2052
|
-
}).catch(function() {
|
|
2053
|
-
});
|
|
2054
|
-
} catch (o) {
|
|
2055
|
-
}
|
|
2056
|
-
var pe = function(e, t) {
|
|
2057
|
-
if (t && U(t) === "object") {
|
|
2058
|
-
var n = "";
|
|
2059
|
-
for (var i in t)
|
|
2060
|
-
n += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(t[i]);
|
|
2061
|
-
if (!n) return e;
|
|
2062
|
-
e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1);
|
|
2063
|
-
}
|
|
2064
|
-
return e;
|
|
2065
|
-
}, qe = function(e, t, n, i) {
|
|
2066
|
-
var s = function(c) {
|
|
2067
|
-
if (!c.ok) return n(c.statusText || "Error", {
|
|
2068
|
-
status: c.status
|
|
2069
|
-
});
|
|
2070
|
-
c.text().then(function(l) {
|
|
2071
|
-
n(null, {
|
|
2072
|
-
status: c.status,
|
|
2073
|
-
data: l
|
|
2074
|
-
});
|
|
2075
|
-
}).catch(n);
|
|
2076
|
-
};
|
|
2077
|
-
if (i) {
|
|
2078
|
-
var r = i(e, t);
|
|
2079
|
-
if (r instanceof Promise) {
|
|
2080
|
-
r.then(s).catch(n);
|
|
2081
|
-
return;
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
typeof fetch == "function" ? fetch(e, t).then(s).catch(n) : E(e, t).then(s).catch(n);
|
|
2085
|
-
}, ze = !1, Jc = function(e, t, n, i) {
|
|
2086
|
-
e.queryStringParams && (t = pe(t, e.queryStringParams));
|
|
2087
|
-
var s = Ve({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
|
|
2088
|
-
typeof window == "undefined" && typeof global != "undefined" && typeof global.process != "undefined" && global.process.versions && global.process.versions.node && (s["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), n && (s["Content-Type"] = "application/json");
|
|
2089
|
-
var r = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, a = Ve({
|
|
2090
|
-
method: n ? "POST" : "GET",
|
|
2091
|
-
body: n ? e.stringify(n) : void 0,
|
|
2092
|
-
headers: s
|
|
2093
|
-
}, ze ? {} : r), c = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
|
|
2094
|
-
try {
|
|
2095
|
-
qe(t, a, i, c);
|
|
2096
|
-
} catch (l) {
|
|
2097
|
-
if (!r || Object.keys(r).length === 0 || !l.message || l.message.indexOf("not implemented") < 0)
|
|
2098
|
-
return i(l);
|
|
2099
|
-
try {
|
|
2100
|
-
Object.keys(r).forEach(function(d) {
|
|
2101
|
-
delete a[d];
|
|
2102
|
-
}), qe(t, a, i, c), ze = !0;
|
|
2103
|
-
} catch (d) {
|
|
2104
|
-
i(d);
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
}, Yc = function(e, t, n, i) {
|
|
2108
|
-
n && U(n) === "object" && (n = pe("", n).slice(1)), e.queryStringParams && (t = pe(t, e.queryStringParams));
|
|
2109
|
-
try {
|
|
2110
|
-
var s = X ? new X() : new oe("MSXML2.XMLHTTP.3.0");
|
|
2111
|
-
s.open(n ? "POST" : "GET", t, 1), e.crossDomain || s.setRequestHeader("X-Requested-With", "XMLHttpRequest"), s.withCredentials = !!e.withCredentials, n && s.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), s.overrideMimeType && s.overrideMimeType("application/json");
|
|
2112
|
-
var r = e.customHeaders;
|
|
2113
|
-
if (r = typeof r == "function" ? r() : r, r)
|
|
2114
|
-
for (var a in r)
|
|
2115
|
-
s.setRequestHeader(a, r[a]);
|
|
2116
|
-
s.onreadystatechange = function() {
|
|
2117
|
-
s.readyState > 3 && i(s.status >= 400 ? s.statusText : null, {
|
|
2118
|
-
status: s.status,
|
|
2119
|
-
data: s.responseText
|
|
2120
|
-
});
|
|
2121
|
-
}, s.send(n);
|
|
2122
|
-
} catch (c) {
|
|
2123
|
-
console && console.log(c);
|
|
2124
|
-
}
|
|
2125
|
-
}, Zc = function(e, t, n, i) {
|
|
2126
|
-
if (typeof n == "function" && (i = n, n = void 0), i = i || function() {
|
|
2127
|
-
}, E && t.indexOf("file:") !== 0)
|
|
2128
|
-
return Jc(e, t, n, i);
|
|
2129
|
-
if (tt() || typeof ActiveXObject == "function")
|
|
2130
|
-
return Yc(e, t, n, i);
|
|
2131
|
-
i(new Error("No fetch and no xhr implementation found!"));
|
|
2132
|
-
};
|
|
2133
|
-
function K(o) {
|
|
2134
|
-
"@babel/helpers - typeof";
|
|
2135
|
-
return K = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2136
|
-
return typeof e;
|
|
2137
|
-
} : function(e) {
|
|
2138
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2139
|
-
}, K(o);
|
|
2140
|
-
}
|
|
2141
|
-
function Qe(o, e) {
|
|
2142
|
-
var t = Object.keys(o);
|
|
2143
|
-
if (Object.getOwnPropertySymbols) {
|
|
2144
|
-
var n = Object.getOwnPropertySymbols(o);
|
|
2145
|
-
e && (n = n.filter(function(i) {
|
|
2146
|
-
return Object.getOwnPropertyDescriptor(o, i).enumerable;
|
|
2147
|
-
})), t.push.apply(t, n);
|
|
2148
|
-
}
|
|
2149
|
-
return t;
|
|
2150
|
-
}
|
|
2151
|
-
function ce(o) {
|
|
2152
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2153
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
2154
|
-
e % 2 ? Qe(Object(t), !0).forEach(function(n) {
|
|
2155
|
-
nt(o, n, t[n]);
|
|
2156
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Qe(Object(t)).forEach(function(n) {
|
|
2157
|
-
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
return o;
|
|
2161
|
-
}
|
|
2162
|
-
function el(o, e) {
|
|
2163
|
-
if (!(o instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
2164
|
-
}
|
|
2165
|
-
function tl(o, e) {
|
|
2166
|
-
for (var t = 0; t < e.length; t++) {
|
|
2167
|
-
var n = e[t];
|
|
2168
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, it(n.key), n);
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
function nl(o, e, t) {
|
|
2172
|
-
return e && tl(o.prototype, e), Object.defineProperty(o, "prototype", { writable: !1 }), o;
|
|
2173
|
-
}
|
|
2174
|
-
function nt(o, e, t) {
|
|
2175
|
-
return (e = it(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
|
|
2176
|
-
}
|
|
2177
|
-
function it(o) {
|
|
2178
|
-
var e = il(o, "string");
|
|
2179
|
-
return K(e) == "symbol" ? e : e + "";
|
|
2180
|
-
}
|
|
2181
|
-
function il(o, e) {
|
|
2182
|
-
if (K(o) != "object" || !o) return o;
|
|
2183
|
-
var t = o[Symbol.toPrimitive];
|
|
2184
|
-
if (t !== void 0) {
|
|
2185
|
-
var n = t.call(o, e);
|
|
2186
|
-
if (K(n) != "object") return n;
|
|
2187
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2188
|
-
}
|
|
2189
|
-
return String(o);
|
|
2190
|
-
}
|
|
2191
|
-
var ol = function() {
|
|
2192
|
-
return {
|
|
2193
|
-
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
2194
|
-
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
2195
|
-
parse: function(t) {
|
|
2196
|
-
return JSON.parse(t);
|
|
2197
|
-
},
|
|
2198
|
-
stringify: JSON.stringify,
|
|
2199
|
-
parsePayload: function(t, n, i) {
|
|
2200
|
-
return nt({}, n, i || "");
|
|
2201
|
-
},
|
|
2202
|
-
parseLoadPayload: function(t, n) {
|
|
2203
|
-
},
|
|
2204
|
-
request: Zc,
|
|
2205
|
-
reloadInterval: typeof window != "undefined" ? !1 : 60 * 60 * 1e3,
|
|
2206
|
-
customHeaders: {},
|
|
2207
|
-
queryStringParams: {},
|
|
2208
|
-
crossDomain: !1,
|
|
2209
|
-
withCredentials: !1,
|
|
2210
|
-
overrideMimeType: !1,
|
|
2211
|
-
requestOptions: {
|
|
2212
|
-
mode: "cors",
|
|
2213
|
-
credentials: "same-origin",
|
|
2214
|
-
cache: "default"
|
|
2215
|
-
}
|
|
2216
|
-
};
|
|
2217
|
-
}, ot = function() {
|
|
2218
|
-
function o(e) {
|
|
2219
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2220
|
-
el(this, o), this.services = e, this.options = t, this.allOptions = n, this.type = "backend", this.init(e, t, n);
|
|
2221
|
-
}
|
|
2222
|
-
return nl(o, [{
|
|
2223
|
-
key: "init",
|
|
2224
|
-
value: function(t) {
|
|
2225
|
-
var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2226
|
-
if (this.services = t, this.options = ce(ce(ce({}, ol()), this.options || {}), i), this.allOptions = s, this.services && this.options.reloadInterval) {
|
|
2227
|
-
var r = setInterval(function() {
|
|
2228
|
-
return n.reload();
|
|
2229
|
-
}, this.options.reloadInterval);
|
|
2230
|
-
K(r) === "object" && typeof r.unref == "function" && r.unref();
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
}, {
|
|
2234
|
-
key: "readMulti",
|
|
2235
|
-
value: function(t, n, i) {
|
|
2236
|
-
this._readAny(t, t, n, n, i);
|
|
2237
|
-
}
|
|
2238
|
-
}, {
|
|
2239
|
-
key: "read",
|
|
2240
|
-
value: function(t, n, i) {
|
|
2241
|
-
this._readAny([t], t, [n], n, i);
|
|
2242
|
-
}
|
|
2243
|
-
}, {
|
|
2244
|
-
key: "_readAny",
|
|
2245
|
-
value: function(t, n, i, s, r) {
|
|
2246
|
-
var a = this, c = this.options.loadPath;
|
|
2247
|
-
typeof this.options.loadPath == "function" && (c = this.options.loadPath(t, i)), c = Gc(c), c.then(function(l) {
|
|
2248
|
-
if (!l) return r(null, {});
|
|
2249
|
-
var d = a.services.interpolator.interpolate(l, {
|
|
2250
|
-
lng: t.join("+"),
|
|
2251
|
-
ns: i.join("+")
|
|
2252
|
-
});
|
|
2253
|
-
a.loadUrl(d, r, n, s);
|
|
2254
|
-
});
|
|
2255
|
-
}
|
|
2256
|
-
}, {
|
|
2257
|
-
key: "loadUrl",
|
|
2258
|
-
value: function(t, n, i, s) {
|
|
2259
|
-
var r = this, a = typeof i == "string" ? [i] : i, c = typeof s == "string" ? [s] : s, l = this.options.parseLoadPayload(a, c);
|
|
2260
|
-
this.options.request(this.options, t, l, function(d, u) {
|
|
2261
|
-
if (u && (u.status >= 500 && u.status < 600 || !u.status)) return n("failed loading " + t + "; status code: " + u.status, !0);
|
|
2262
|
-
if (u && u.status >= 400 && u.status < 500) return n("failed loading " + t + "; status code: " + u.status, !1);
|
|
2263
|
-
if (!u && d && d.message) {
|
|
2264
|
-
var g = d.message.toLowerCase(), f = ["failed", "fetch", "network", "load"].find(function(v) {
|
|
2265
|
-
return g.indexOf(v) > -1;
|
|
2266
|
-
});
|
|
2267
|
-
if (f)
|
|
2268
|
-
return n("failed loading " + t + ": " + d.message, !0);
|
|
2269
|
-
}
|
|
2270
|
-
if (d) return n(d, !1);
|
|
2271
|
-
var h, y;
|
|
2272
|
-
try {
|
|
2273
|
-
typeof u.data == "string" ? h = r.options.parse(u.data, i, s) : h = u.data;
|
|
2274
|
-
} catch (v) {
|
|
2275
|
-
y = "failed parsing " + t + " to json";
|
|
2276
|
-
}
|
|
2277
|
-
if (y) return n(y, !1);
|
|
2278
|
-
n(null, h);
|
|
2279
|
-
});
|
|
2280
|
-
}
|
|
2281
|
-
}, {
|
|
2282
|
-
key: "create",
|
|
2283
|
-
value: function(t, n, i, s, r) {
|
|
2284
|
-
var a = this;
|
|
2285
|
-
if (this.options.addPath) {
|
|
2286
|
-
typeof t == "string" && (t = [t]);
|
|
2287
|
-
var c = this.options.parsePayload(n, i, s), l = 0, d = [], u = [];
|
|
2288
|
-
t.forEach(function(g) {
|
|
2289
|
-
var f = a.options.addPath;
|
|
2290
|
-
typeof a.options.addPath == "function" && (f = a.options.addPath(g, n));
|
|
2291
|
-
var h = a.services.interpolator.interpolate(f, {
|
|
2292
|
-
lng: g,
|
|
2293
|
-
ns: n
|
|
2294
|
-
});
|
|
2295
|
-
a.options.request(a.options, h, c, function(y, v) {
|
|
2296
|
-
l += 1, d.push(y), u.push(v), l === t.length && typeof r == "function" && r(d, u);
|
|
2297
|
-
});
|
|
2298
|
-
});
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
2301
|
-
}, {
|
|
2302
|
-
key: "reload",
|
|
2303
|
-
value: function() {
|
|
2304
|
-
var t = this, n = this.services, i = n.backendConnector, s = n.languageUtils, r = n.logger, a = i.language;
|
|
2305
|
-
if (!(a && a.toLowerCase() === "cimode")) {
|
|
2306
|
-
var c = [], l = function(u) {
|
|
2307
|
-
var g = s.toResolveHierarchy(u);
|
|
2308
|
-
g.forEach(function(f) {
|
|
2309
|
-
c.indexOf(f) < 0 && c.push(f);
|
|
2310
|
-
});
|
|
2311
|
-
};
|
|
2312
|
-
l(a), this.allOptions.preload && this.allOptions.preload.forEach(function(d) {
|
|
2313
|
-
return l(d);
|
|
2314
|
-
}), c.forEach(function(d) {
|
|
2315
|
-
t.allOptions.ns.forEach(function(u) {
|
|
2316
|
-
i.read(d, u, "read", null, null, function(g, f) {
|
|
2317
|
-
g && r.warn("loading namespace ".concat(u, " for language ").concat(d, " failed"), g), !g && f && r.log("loaded namespace ".concat(u, " for language ").concat(d), f), i.loaded("".concat(d, "|").concat(u), g, f);
|
|
2318
|
-
});
|
|
2319
|
-
});
|
|
2320
|
-
});
|
|
2321
|
-
}
|
|
2322
|
-
}
|
|
2323
|
-
}]);
|
|
2324
|
-
}();
|
|
2325
|
-
ot.type = "backend";
|
|
2326
|
-
b.use(ot).use(et).init({
|
|
2327
|
-
lng: "vi",
|
|
2328
|
-
fallbackLng: "vi",
|
|
2329
|
-
debug: !1,
|
|
2330
|
-
resources: {
|
|
2331
|
-
en: { translation: rs },
|
|
2332
|
-
vi: { translation: Ic }
|
|
2333
|
-
},
|
|
2334
|
-
interpolation: {
|
|
2335
|
-
escapeValue: !1
|
|
2336
|
-
},
|
|
2337
|
-
// Allow returning objects/arrays from translations
|
|
2338
|
-
returnObjects: !0
|
|
2339
|
-
});
|
|
2340
|
-
function sl(o) {
|
|
2341
|
-
b.changeLanguage(o);
|
|
2342
|
-
}
|
|
2343
|
-
function gl(o, e) {
|
|
2344
|
-
return b.t(o, p({ returnObjects: !0 }, e));
|
|
2345
|
-
}
|
|
2346
|
-
function rl(o = "dev") {
|
|
2347
|
-
const e = {
|
|
2348
|
-
dev: {
|
|
2349
|
-
invoiceHubBaseUrl: "https://stag-invoice-hub.atomsolution.vn",
|
|
2350
|
-
posOcbApiUrl: "https://ocb-uat-api-outscope-pos.atomsolution.vn/v1/portal",
|
|
2351
|
-
posBvbApiUrl: "https://bvbank-stag.atomsolution.vn/v1/portal"
|
|
2352
|
-
},
|
|
2353
|
-
stag: {
|
|
2354
|
-
invoiceHubBaseUrl: "https://stag-invoice-hub.atomsolution.vn",
|
|
2355
|
-
posOcbApiUrl: "https://ocb-uat-api-outscope-pos.atomsolution.vn/v1/portal",
|
|
2356
|
-
posBvbApiUrl: "https://bvbank-stag.atomsolution.vn/v1/portal"
|
|
2357
|
-
},
|
|
2358
|
-
uat: {
|
|
2359
|
-
invoiceHubBaseUrl: "https://stag-invoice-hub.atomsolution.vn",
|
|
2360
|
-
posOcbApiUrl: "https://ocb-uat-api-outscope-pos.atomsolution.vn/v1/portal",
|
|
2361
|
-
posBvbApiUrl: "https://bvbank-api-outscope.atomsolution.vn/v1/portal"
|
|
2362
|
-
},
|
|
2363
|
-
pilot: {
|
|
2364
|
-
invoiceHubBaseUrl: "https://invoice-hub.atomsolution.vn",
|
|
2365
|
-
posOcbApiUrl: "https://ocb-smartmerchant-pl-api.ocb.com.vn/v1/portal",
|
|
2366
|
-
posBvbApiUrl: "https://api-outscope-pos.bvbank.net.vn/v1/portal"
|
|
2367
|
-
},
|
|
2368
|
-
prod: {
|
|
2369
|
-
invoiceHubBaseUrl: "https://invoice-hub.atomsolution.vn",
|
|
2370
|
-
posOcbApiUrl: "https://ocb-smartmerchant-api.ocb.com.vn/v1/portal",
|
|
2371
|
-
posBvbApiUrl: "https://api-outscope-pos.bvbank.net.vn/v1/portal"
|
|
2372
|
-
}
|
|
2373
|
-
};
|
|
2374
|
-
return e[o] || e.dev;
|
|
2375
|
-
}
|
|
2376
|
-
let ee = null, me = !1;
|
|
2377
|
-
function st(o) {
|
|
2378
|
-
if (!["dev", "uat", "prod", "stag", "pilot"].includes(o))
|
|
2379
|
-
throw new Error(
|
|
2380
|
-
`Invalid mode: ${o}. Valid modes are 'dev', 'uat', 'prod', 'stag', 'pilot'.`
|
|
2381
|
-
);
|
|
2382
|
-
ee = o, me = !0;
|
|
2383
|
-
try {
|
|
2384
|
-
localStorage.setItem("currentMode", o);
|
|
2385
|
-
} catch (e) {
|
|
2386
|
-
console.warn("Could not save to localStorage:", e);
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
function al() {
|
|
2390
|
-
if (me && ee)
|
|
2391
|
-
return ee;
|
|
2392
|
-
try {
|
|
2393
|
-
const o = localStorage.getItem("currentMode");
|
|
2394
|
-
if (o)
|
|
2395
|
-
return ee = o, me = !0, o;
|
|
2396
|
-
} catch (o) {
|
|
2397
|
-
console.warn("Could not read from localStorage:", o);
|
|
2398
|
-
}
|
|
2399
|
-
return "dev";
|
|
2400
|
-
}
|
|
2401
|
-
function pl() {
|
|
2402
|
-
const o = al();
|
|
2403
|
-
return rl(o);
|
|
2404
|
-
}
|
|
2405
|
-
const rt = {
|
|
2406
|
-
fpt: {
|
|
2407
|
-
email: "",
|
|
2408
|
-
hotline: "",
|
|
2409
|
-
invoiceLookupUrl: "",
|
|
2410
|
-
isActive: !1,
|
|
2411
|
-
link: "",
|
|
2412
|
-
name: "fpt",
|
|
2413
|
-
onboarding: !1,
|
|
2414
|
-
sso: !1
|
|
2415
|
-
},
|
|
2416
|
-
"m-invoice": {
|
|
2417
|
-
email: "info@minvoice.vn",
|
|
2418
|
-
hotline: "0901 80 16 18",
|
|
2419
|
-
invoiceLookupUrl: "https://tracuuhoadon.minvoice.com.vn/single/invoice",
|
|
2420
|
-
isActive: !0,
|
|
2421
|
-
link: "https://minvoice.vn",
|
|
2422
|
-
name: "m-invoice",
|
|
2423
|
-
onboarding: !0,
|
|
2424
|
-
sso: !1
|
|
2425
|
-
},
|
|
2426
|
-
misa: {
|
|
2427
|
-
email: "",
|
|
2428
|
-
hotline: "",
|
|
2429
|
-
invoiceLookupUrl: "https://www.meinvoice.vn/tra-cuu/",
|
|
2430
|
-
isActive: !1,
|
|
2431
|
-
link: "https://www.misa.vn",
|
|
2432
|
-
name: "misa",
|
|
2433
|
-
onboarding: !1,
|
|
2434
|
-
sso: !1
|
|
2435
|
-
}
|
|
2436
|
-
}, Ge = {
|
|
2437
|
-
dev: {
|
|
2438
|
-
"m-invoice": {
|
|
2439
|
-
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2440
|
-
},
|
|
2441
|
-
misa: {
|
|
2442
|
-
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2443
|
-
}
|
|
2444
|
-
},
|
|
2445
|
-
pilot: {
|
|
2446
|
-
"m-invoice": {
|
|
2447
|
-
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2448
|
-
},
|
|
2449
|
-
misa: {
|
|
2450
|
-
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2451
|
-
}
|
|
2452
|
-
},
|
|
2453
|
-
stag: {
|
|
2454
|
-
"m-invoice": {
|
|
2455
|
-
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2456
|
-
},
|
|
2457
|
-
misa: {
|
|
2458
|
-
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2459
|
-
}
|
|
2460
|
-
},
|
|
2461
|
-
uat: {
|
|
2462
|
-
"m-invoice": {
|
|
2463
|
-
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2464
|
-
},
|
|
2465
|
-
misa: {
|
|
2466
|
-
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
}, We = {
|
|
2470
|
-
bvb: {
|
|
2471
|
-
fpt: { isActive: !0 },
|
|
2472
|
-
misa: { isActive: !0 }
|
|
2473
|
-
},
|
|
2474
|
-
ocb: {
|
|
2475
|
-
fpt: { isActive: !0 },
|
|
2476
|
-
misa: { isActive: !0 }
|
|
2477
|
-
}
|
|
2478
|
-
}, _e = {
|
|
2479
|
-
pilot: {
|
|
2480
|
-
bvb: {
|
|
2481
|
-
fpt: { isActive: !1 },
|
|
2482
|
-
misa: { isActive: !1 }
|
|
2483
|
-
},
|
|
2484
|
-
ocb: {
|
|
2485
|
-
fpt: { isActive: !1 },
|
|
2486
|
-
misa: { isActive: !1 }
|
|
2487
|
-
}
|
|
2488
|
-
},
|
|
2489
|
-
stag: {
|
|
2490
|
-
bvb: {
|
|
2491
|
-
fpt: { isActive: !1 },
|
|
2492
|
-
misa: { isActive: !1 }
|
|
2493
|
-
},
|
|
2494
|
-
ocb: {
|
|
2495
|
-
fpt: { isActive: !1 },
|
|
2496
|
-
misa: { isActive: !1 }
|
|
2497
|
-
}
|
|
2498
|
-
},
|
|
2499
|
-
uat: {
|
|
2500
|
-
bvb: {
|
|
2501
|
-
fpt: { isActive: !1 },
|
|
2502
|
-
misa: { isActive: !1 }
|
|
2503
|
-
},
|
|
2504
|
-
ocb: {
|
|
2505
|
-
fpt: { isActive: !1 },
|
|
2506
|
-
misa: { isActive: !1 }
|
|
2507
|
-
}
|
|
2508
|
-
},
|
|
2509
|
-
prod: {
|
|
2510
|
-
bvb: {
|
|
2511
|
-
fpt: { isActive: !1 },
|
|
2512
|
-
misa: { isActive: !1 }
|
|
2513
|
-
},
|
|
2514
|
-
ocb: {
|
|
2515
|
-
fpt: { isActive: !1 },
|
|
2516
|
-
misa: { isActive: !1 }
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
}, le = /* @__PURE__ */ new Map();
|
|
2520
|
-
function Q(o, e) {
|
|
2521
|
-
const t = p({}, o);
|
|
2522
|
-
for (const n in e)
|
|
2523
|
-
e[n] && typeof e[n] == "object" && !Array.isArray(e[n]) ? t[n] = Q(t[n] || {}, e[n]) : t[n] = e[n];
|
|
2524
|
-
return t;
|
|
2525
|
-
}
|
|
2526
|
-
function cl(o, e) {
|
|
2527
|
-
const t = ["email", "hotline", "invoiceLookupUrl", "isActive", "link", "name", "onboarding", "sso"];
|
|
2528
|
-
for (const n of t)
|
|
2529
|
-
if (!(n in o))
|
|
2530
|
-
return console.warn(`[SettingsManager] Missing field '${n}' in provider '${e}'`), !1;
|
|
2531
|
-
return !0;
|
|
2532
|
-
}
|
|
2533
|
-
function at(o, e, t) {
|
|
2534
|
-
var i, s, r, a;
|
|
2535
|
-
const n = `${o}:${e}:${t}`;
|
|
2536
|
-
if (le.has(n))
|
|
2537
|
-
return le.get(n);
|
|
2538
|
-
try {
|
|
2539
|
-
let c = Q({}, rt[t]);
|
|
2540
|
-
return (i = Ge[o]) != null && i[t] && (c = Q(c, Ge[o][t])), (s = We[e]) != null && s[t] && (c = Q(c, We[e][t])), (a = (r = _e[o]) == null ? void 0 : r[e]) != null && a[t] && (c = Q(c, _e[o][e][t])), cl(c, t) ? (le.set(n, c), c) : (console.error(`[SettingsManager] Invalid configuration for ${o}:${e}:${t}`), null);
|
|
2541
|
-
} catch (c) {
|
|
2542
|
-
return console.error(`[SettingsManager] Error getting settings for ${o}:${e}:${t}:`, c), null;
|
|
2543
|
-
}
|
|
2544
|
-
}
|
|
2545
|
-
function ll(o, e) {
|
|
2546
|
-
const t = {};
|
|
2547
|
-
for (const n of Object.keys(rt)) {
|
|
2548
|
-
const i = at(o, e, n);
|
|
2549
|
-
i && (t[n] = i);
|
|
2550
|
-
}
|
|
2551
|
-
return t;
|
|
2552
|
-
}
|
|
2553
|
-
function ul(o, e) {
|
|
2554
|
-
return {
|
|
2555
|
-
[o]: {
|
|
2556
|
-
[e]: ll(o, e)
|
|
2557
|
-
}
|
|
2558
|
-
}[o][e];
|
|
2559
|
-
}
|
|
2560
|
-
function dl(o, e) {
|
|
2561
|
-
const t = ["dev", "pilot", "stag", "uat", "prod"], n = ["bvb", "ocb"];
|
|
2562
|
-
return t.includes(o) ? n.includes(e) ? !0 : (console.error(`[SettingsManager] Invalid bank: ${e}`), !1) : (console.error(`[SettingsManager] Invalid environment: ${o}`), !1);
|
|
2563
|
-
}
|
|
2564
|
-
const ue = /* @__PURE__ */ new Map();
|
|
2565
|
-
function hl(o = "dev", e = "bvb") {
|
|
2566
|
-
const t = `${o}:${e}`;
|
|
2567
|
-
if (ue.has(t))
|
|
2568
|
-
return ue.get(t);
|
|
2569
|
-
const n = ul(o, e);
|
|
2570
|
-
return ue.set(t, n), n;
|
|
2571
|
-
}
|
|
2572
|
-
function ml(o, e, t) {
|
|
2573
|
-
return dl(o, e) ? at(o, e, t) : (console.error(`[SettingsAdapter] Invalid environment or bank: ${o}, ${e}`), null);
|
|
2574
|
-
}
|
|
2575
|
-
let de = null, he = null;
|
|
2576
|
-
function yl(o) {
|
|
2577
|
-
return re(this, null, function* () {
|
|
2578
|
-
if (o.mode && st(o.mode), o.language && ct(o.language), !he) {
|
|
2579
|
-
const { InvoiceRegisterWidget: n } = yield import("./widget-BZ3nvlsE.js");
|
|
2580
|
-
he = n;
|
|
2581
|
-
}
|
|
2582
|
-
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
|
2583
|
-
if (!e)
|
|
2584
|
-
throw new Error(`[WidgetSDK] Mount element not found: ${o.selector}`);
|
|
2585
|
-
function t() {
|
|
2586
|
-
e.innerHTML = "", o.onClose && o.onClose();
|
|
2587
|
-
}
|
|
2588
|
-
return he(
|
|
2589
|
-
e,
|
|
2590
|
-
t,
|
|
2591
|
-
o.onShowPolicy || (() => {
|
|
2592
|
-
}),
|
|
2593
|
-
o.data || {},
|
|
2594
|
-
o.theme,
|
|
2595
|
-
o.mode
|
|
2596
|
-
), { destroy: t };
|
|
2597
|
-
});
|
|
2598
|
-
}
|
|
2599
|
-
function vl(o) {
|
|
2600
|
-
return re(this, null, function* () {
|
|
2601
|
-
if (o.mode && st(o.mode), o.language && ct(o.language), !de) {
|
|
2602
|
-
const { EContractWidget: n } = yield import("./widget-BZ3nvlsE.js");
|
|
2603
|
-
de = n;
|
|
2604
|
-
}
|
|
2605
|
-
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
|
2606
|
-
if (!e)
|
|
2607
|
-
throw new Error(`[WidgetSDK] Mount element not found: ${o.selector}`);
|
|
2608
|
-
function t() {
|
|
2609
|
-
e.innerHTML = "", o.onClose && o.onClose();
|
|
2610
|
-
}
|
|
2611
|
-
return de(e, t, o.data || {}, o.theme), { destroy: t };
|
|
2612
|
-
});
|
|
2613
|
-
}
|
|
2614
|
-
let ye = /* @__PURE__ */ new Set();
|
|
2615
|
-
function ct(o) {
|
|
2616
|
-
if (o !== "vi" && o !== "en")
|
|
2617
|
-
throw new Error(`[WidgetSDK] Unsupported language: ${o}`);
|
|
2618
|
-
sl(o), ye.forEach((e) => {
|
|
2619
|
-
e.rerender && e.rerender();
|
|
2620
|
-
});
|
|
2621
|
-
}
|
|
2622
|
-
function bl(o) {
|
|
2623
|
-
ye.add(o);
|
|
2624
|
-
}
|
|
2625
|
-
function Sl(o) {
|
|
2626
|
-
ye.delete(o);
|
|
2627
|
-
}
|
|
2628
|
-
function $l(o, e) {
|
|
2629
|
-
return hl(o, e);
|
|
2630
|
-
}
|
|
2631
|
-
export {
|
|
2632
|
-
ml as a,
|
|
2633
|
-
vl as b,
|
|
2634
|
-
$l as c,
|
|
2635
|
-
pl as g,
|
|
2636
|
-
yl as i,
|
|
2637
|
-
bl as r,
|
|
2638
|
-
ct as s,
|
|
2639
|
-
gl as t,
|
|
2640
|
-
Sl as u
|
|
2641
|
-
};
|