aoi-comp 1.0.14 → 1.0.16
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/{BufferResource-DwkktoH2.js → BufferResource-CJ6gTLVt.js} +2 -2
- package/dist/{CanvasPool-CbJemwqD.js → CanvasPool-DxPWPREy.js} +1 -1
- package/dist/{Geometry-CQNqhx0Z.js → Geometry-Cgp_B-U6.js} +1 -1
- package/dist/{RenderTargetSystem-BHmTK9nr.js → RenderTargetSystem-CI7Pyqfs.js} +1 -1
- package/dist/{browserAll-BLacNsSI.js → browserAll-C01g8dM4.js} +3 -3
- package/dist/{canvasUtils-BRobvpth.js → canvasUtils-BDyuJAnf.js} +1 -1
- package/dist/comps.js +4098 -4095
- package/dist/{getTextureBatchBindGroup-B2MLavMF.js → getTextureBatchBindGroup-BOQSIxaA.js} +1 -1
- package/dist/{hooks-Dbbx_ZCW.js → hooks-Bg2vQv8s.js} +187 -187
- package/dist/hooks.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{init--NRY9BXQ.js → init-ByqgxCRA.js} +2 -2
- package/dist/{init-DCipAX9y.js → init-DUQko66x.js} +3 -3
- package/dist/{packages-Sbaw1wWA.js → packages-CrmSAScp.js} +732 -207
- package/dist/utils.js +2 -2
- package/dist/webworkerAll-BmBCi8yO.js +2 -0
- package/package.json +1 -1
- package/dist/webworkerAll-B-8Lcex_.js +0 -2
|
@@ -1748,7 +1748,7 @@ var j = {
|
|
|
1748
1748
|
}, fe = "os-theme-light", pe = "small", me = {
|
|
1749
1749
|
ok: "#00c291",
|
|
1750
1750
|
ng: "#f56c6c"
|
|
1751
|
-
}, he = O("os-theme-light".includes("light") ? "#ffffff" : "#000000").alpha(.44).string(), ge = "#ffffff", _e = "#000000", ve = O(j.colorText).alpha(.45).string(), ye = O(j.colorPrimary).alpha(.3).string(), be = O(j.colorPrimary).desaturate(.45).string(), xe = O(M.borderColor).whiten(.25).string(), Se = O(M.compBgc).mix(O("white"), .1).string(), N = O(M.hoverWhite).alpha(.15).string(), Ce = `linear-gradient(90deg, ${O(j.colorPrimary).alpha(.92).string()} 0%, ${O(j.colorPrimary).darken(.3).string()} 100%)`,
|
|
1751
|
+
}, he = O("os-theme-light".includes("light") ? "#ffffff" : "#000000").alpha(.44).string(), ge = "#ffffff", _e = "#000000", ve = O(j.colorText).alpha(.45).string(), ye = O(j.colorPrimary).alpha(.3).string(), be = O(j.colorPrimary).desaturate(.45).string(), xe = O(M.borderColor).whiten(.25).string(), Se = O(M.compBgc).mix(O("white"), .1).string(), N = O(M.hoverWhite).alpha(.15).string(), Ce = `linear-gradient(90deg, ${O(j.colorPrimary).alpha(.92).string()} 0%, ${O(j.colorPrimary).darken(.3).string()} 100%)`, P = {
|
|
1752
1752
|
token: {
|
|
1753
1753
|
colorPrimary: j.colorPrimary,
|
|
1754
1754
|
colorWarning: j.colorWarning,
|
|
@@ -1855,65 +1855,65 @@ var j = {
|
|
|
1855
1855
|
colorTextSecondary: j.colorText
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
|
-
},
|
|
1859
|
-
let t = e.split("."), n =
|
|
1858
|
+
}, we = (e) => {
|
|
1859
|
+
let t = e.split("."), n = P.components;
|
|
1860
1860
|
for (let e of t) n = n[e];
|
|
1861
|
-
return n ===
|
|
1862
|
-
}, { getDesignToken:
|
|
1863
|
-
...
|
|
1861
|
+
return n === P.components ? null : n;
|
|
1862
|
+
}, { getDesignToken: Te } = e, Ee = Te(P), De = {
|
|
1863
|
+
...P.token,
|
|
1864
1864
|
...M
|
|
1865
|
-
},
|
|
1866
|
-
...
|
|
1865
|
+
}, Oe = {
|
|
1866
|
+
...Ee,
|
|
1867
1867
|
...M
|
|
1868
|
-
},
|
|
1868
|
+
}, F = (e) => typeof e == "string", I = () => {
|
|
1869
1869
|
let e, t, n = new Promise((n, r) => {
|
|
1870
1870
|
e = n, t = r;
|
|
1871
1871
|
});
|
|
1872
1872
|
return n.resolve = e, n.reject = t, n;
|
|
1873
|
-
},
|
|
1873
|
+
}, ke = (e) => e == null ? "" : String(e), Ae = (e, t, n) => {
|
|
1874
1874
|
e.forEach((e) => {
|
|
1875
1875
|
t[e] && (n[e] = t[e]);
|
|
1876
1876
|
});
|
|
1877
|
-
},
|
|
1878
|
-
let r =
|
|
1877
|
+
}, je = /###/g, Me = (e) => e && e.includes("###") ? e.replace(je, ".") : e, Ne = (e) => !e || F(e), Pe = (e, t, n) => {
|
|
1878
|
+
let r = F(t) ? t.split(".") : t, i = 0;
|
|
1879
1879
|
for (; i < r.length - 1;) {
|
|
1880
|
-
if (
|
|
1881
|
-
let t =
|
|
1880
|
+
if (Ne(e)) return {};
|
|
1881
|
+
let t = Me(r[i]);
|
|
1882
1882
|
!e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
|
|
1883
1883
|
}
|
|
1884
|
-
return
|
|
1884
|
+
return Ne(e) ? {} : {
|
|
1885
1885
|
obj: e,
|
|
1886
|
-
k:
|
|
1886
|
+
k: Me(r[i])
|
|
1887
1887
|
};
|
|
1888
|
-
},
|
|
1889
|
-
let { obj: r, k: i } =
|
|
1888
|
+
}, Fe = (e, t, n) => {
|
|
1889
|
+
let { obj: r, k: i } = Pe(e, t, Object);
|
|
1890
1890
|
if (r !== void 0 || t.length === 1) {
|
|
1891
1891
|
r[i] = n;
|
|
1892
1892
|
return;
|
|
1893
1893
|
}
|
|
1894
|
-
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s =
|
|
1895
|
-
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s =
|
|
1894
|
+
let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = Pe(e, o, Object);
|
|
1895
|
+
for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = Pe(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
|
|
1896
1896
|
s.obj[`${s.k}.${a}`] = n;
|
|
1897
|
-
},
|
|
1898
|
-
let { obj: i, k: a } =
|
|
1897
|
+
}, Ie = (e, t, n, r) => {
|
|
1898
|
+
let { obj: i, k: a } = Pe(e, t, Object);
|
|
1899
1899
|
i[a] = i[a] || [], i[a].push(n);
|
|
1900
|
-
},
|
|
1901
|
-
let { obj: n, k: r } =
|
|
1900
|
+
}, Le = (e, t) => {
|
|
1901
|
+
let { obj: n, k: r } = Pe(e, t);
|
|
1902
1902
|
if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
|
|
1903
|
+
}, Re = (e, t, n) => {
|
|
1904
|
+
let r = Le(e, n);
|
|
1905
|
+
return r === void 0 ? Le(t, n) : r;
|
|
1903
1906
|
}, ze = (e, t, n) => {
|
|
1904
|
-
let r =
|
|
1905
|
-
return r === void 0 ? Re(t, n) : r;
|
|
1906
|
-
}, Be = (e, t, n) => {
|
|
1907
|
-
for (let r in t) r !== "__proto__" && r !== "constructor" && (Object.prototype.hasOwnProperty.call(e, r) ? P(e[r]) || e[r] instanceof String || P(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : Be(e[r], t[r], n) : e[r] = t[r]);
|
|
1907
|
+
for (let r in t) r !== "__proto__" && r !== "constructor" && (Object.prototype.hasOwnProperty.call(e, r) ? F(e[r]) || e[r] instanceof String || F(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : ze(e[r], t[r], n) : e[r] = t[r]);
|
|
1908
1908
|
return e;
|
|
1909
|
-
},
|
|
1909
|
+
}, L = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Be = {
|
|
1910
1910
|
"&": "&",
|
|
1911
1911
|
"<": "<",
|
|
1912
1912
|
">": ">",
|
|
1913
1913
|
"\"": """,
|
|
1914
1914
|
"'": "'",
|
|
1915
1915
|
"/": "/"
|
|
1916
|
-
},
|
|
1916
|
+
}, Ve = (e) => F(e) ? e.replace(/[&<>"'\/]/g, (e) => Be[e]) : e, He = class {
|
|
1917
1917
|
constructor(e) {
|
|
1918
1918
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1919
1919
|
}
|
|
@@ -1923,23 +1923,23 @@ var j = {
|
|
|
1923
1923
|
let n = new RegExp(e);
|
|
1924
1924
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
1925
1925
|
}
|
|
1926
|
-
},
|
|
1926
|
+
}, Ue = [
|
|
1927
1927
|
" ",
|
|
1928
1928
|
",",
|
|
1929
1929
|
"?",
|
|
1930
1930
|
"!",
|
|
1931
1931
|
";"
|
|
1932
|
-
],
|
|
1932
|
+
], We = new He(20), Ge = (e, t, n) => {
|
|
1933
1933
|
t ||= "", n ||= "";
|
|
1934
|
-
let r =
|
|
1934
|
+
let r = Ue.filter((e) => !t.includes(e) && !n.includes(e));
|
|
1935
1935
|
if (r.length === 0) return !0;
|
|
1936
|
-
let i =
|
|
1936
|
+
let i = We.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
|
|
1937
1937
|
if (!a) {
|
|
1938
1938
|
let t = e.indexOf(n);
|
|
1939
1939
|
t > 0 && !i.test(e.substring(0, t)) && (a = !0);
|
|
1940
1940
|
}
|
|
1941
1941
|
return a;
|
|
1942
|
-
},
|
|
1942
|
+
}, Ke = (e, t, n = ".") => {
|
|
1943
1943
|
if (!e) return;
|
|
1944
1944
|
if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
|
|
1945
1945
|
let r = t.split(n), i = e;
|
|
@@ -1958,7 +1958,7 @@ var j = {
|
|
|
1958
1958
|
i = t;
|
|
1959
1959
|
}
|
|
1960
1960
|
return i;
|
|
1961
|
-
},
|
|
1961
|
+
}, qe = (e) => e?.replace(/_/g, "-"), Je = {
|
|
1962
1962
|
type: "logger",
|
|
1963
1963
|
log(e) {
|
|
1964
1964
|
this.output("log", e);
|
|
@@ -1992,7 +1992,7 @@ var j = {
|
|
|
1992
1992
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
1993
1993
|
}
|
|
1994
1994
|
forward(e, t, n, r) {
|
|
1995
|
-
return r && !this.debug ? null : (e = e.map((e) =>
|
|
1995
|
+
return r && !this.debug ? null : (e = e.map((e) => F(e) ? e.replace(/[\r\n\x00-\x1F\x7F]/g, " ") : e), F(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
1996
1996
|
}
|
|
1997
1997
|
create(t) {
|
|
1998
1998
|
return new e(this.logger, {
|
|
@@ -2052,16 +2052,16 @@ var j = {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
getResource(e, t, n, r = {}) {
|
|
2054
2054
|
let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
|
|
2055
|
-
e.includes(".") ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) :
|
|
2056
|
-
let s =
|
|
2057
|
-
return !s && !t && !n && e.includes(".") && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !
|
|
2055
|
+
e.includes(".") ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : F(n) && i ? o.push(...n.split(i)) : o.push(n)));
|
|
2056
|
+
let s = Le(this.data, o);
|
|
2057
|
+
return !s && !t && !n && e.includes(".") && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !F(n) ? s : Ke(this.data?.[e]?.[t], n, i);
|
|
2058
2058
|
}
|
|
2059
2059
|
addResource(e, t, n, r, i = { silent: !1 }) {
|
|
2060
2060
|
let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
|
|
2061
|
-
n && (o = o.concat(a ? n.split(a) : n)), e.includes(".") && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t),
|
|
2061
|
+
n && (o = o.concat(a ? n.split(a) : n)), e.includes(".") && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Fe(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
|
|
2062
2062
|
}
|
|
2063
2063
|
addResources(e, t, n, r = { silent: !1 }) {
|
|
2064
|
-
for (let r in n) (
|
|
2064
|
+
for (let r in n) (F(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
|
|
2065
2065
|
r.silent || this.emit("added", e, t, n);
|
|
2066
2066
|
}
|
|
2067
2067
|
addResourceBundle(e, t, n, r, i, a = {
|
|
@@ -2070,11 +2070,11 @@ var j = {
|
|
|
2070
2070
|
}) {
|
|
2071
2071
|
let o = [e, t];
|
|
2072
2072
|
e.includes(".") && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
2073
|
-
let s =
|
|
2074
|
-
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ?
|
|
2073
|
+
let s = Le(this.data, o) || {};
|
|
2074
|
+
a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? ze(s, n, i) : s = {
|
|
2075
2075
|
...s,
|
|
2076
2076
|
...n
|
|
2077
|
-
},
|
|
2077
|
+
}, Fe(this.data, o, s), a.silent || this.emit("added", e, t, n);
|
|
2078
2078
|
}
|
|
2079
2079
|
removeResourceBundle(e, t) {
|
|
2080
2080
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -2118,9 +2118,9 @@ function z(e, t) {
|
|
|
2118
2118
|
}
|
|
2119
2119
|
return n.join(r);
|
|
2120
2120
|
}
|
|
2121
|
-
var et = (e) => !
|
|
2121
|
+
var et = (e) => !F(e) && typeof e != "boolean" && typeof e != "number", tt = class e extends Ye {
|
|
2122
2122
|
constructor(e, t = {}) {
|
|
2123
|
-
super(),
|
|
2123
|
+
super(), Ae([
|
|
2124
2124
|
"resourceStore",
|
|
2125
2125
|
"languageUtils",
|
|
2126
2126
|
"pluralResolver",
|
|
@@ -2144,19 +2144,19 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2144
2144
|
extractFromKey(e, t) {
|
|
2145
2145
|
let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
|
|
2146
2146
|
n === void 0 && (n = ":");
|
|
2147
|
-
let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.includes(n), o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
2147
|
+
let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.includes(n), o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ge(e, n, r);
|
|
2148
2148
|
if (a && !o) {
|
|
2149
2149
|
let t = e.match(this.interpolator.nestingRegexp);
|
|
2150
2150
|
if (t && t.length > 0) return {
|
|
2151
2151
|
key: e,
|
|
2152
|
-
namespaces:
|
|
2152
|
+
namespaces: F(i) ? [i] : i
|
|
2153
2153
|
};
|
|
2154
2154
|
let a = e.split(n);
|
|
2155
2155
|
(n !== r || n === r && this.options.ns.includes(a[0])) && (i = a.shift()), e = a.join(r);
|
|
2156
2156
|
}
|
|
2157
2157
|
return {
|
|
2158
2158
|
key: e,
|
|
2159
|
-
namespaces:
|
|
2159
|
+
namespaces: F(i) ? [i] : i
|
|
2160
2160
|
};
|
|
2161
2161
|
}
|
|
2162
2162
|
translate(t, n, r) {
|
|
@@ -2191,10 +2191,10 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2191
2191
|
"[object Number]",
|
|
2192
2192
|
"[object Function]",
|
|
2193
2193
|
"[object RegExp]"
|
|
2194
|
-
], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !
|
|
2194
|
+
], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !F(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
|
|
2195
2195
|
y && !m && x && (E = T);
|
|
2196
2196
|
let ee = et(E), te = Object.prototype.toString.apply(E);
|
|
2197
|
-
if (y && E && ee && !_.includes(te) && !(
|
|
2197
|
+
if (y && E && ee && !_.includes(te) && !(F(v) && Array.isArray(E))) {
|
|
2198
2198
|
if (!i.returnObjects && !this.options.returnObjects) {
|
|
2199
2199
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
2200
2200
|
let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
|
|
@@ -2220,7 +2220,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2220
2220
|
}
|
|
2221
2221
|
m = t;
|
|
2222
2222
|
}
|
|
2223
|
-
} else if (y &&
|
|
2223
|
+
} else if (y && F(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
|
|
2224
2224
|
else {
|
|
2225
2225
|
let e = !1, n = !1;
|
|
2226
2226
|
!this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
|
|
@@ -2264,12 +2264,12 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2264
2264
|
...n.interpolation
|
|
2265
2265
|
}
|
|
2266
2266
|
});
|
|
2267
|
-
let a =
|
|
2267
|
+
let a = F(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
|
|
2268
2268
|
if (a) {
|
|
2269
2269
|
let t = e.match(this.interpolator.nestingRegexp);
|
|
2270
2270
|
o = t && t.length;
|
|
2271
2271
|
}
|
|
2272
|
-
let s = n.replace && !
|
|
2272
|
+
let s = n.replace && !F(n.replace) ? n.replace : n;
|
|
2273
2273
|
if (this.options.interpolation.defaultVariables && (s = {
|
|
2274
2274
|
...this.options.interpolation.defaultVariables,
|
|
2275
2275
|
...s
|
|
@@ -2279,7 +2279,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2279
2279
|
}
|
|
2280
2280
|
!n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
|
|
2281
2281
|
}
|
|
2282
|
-
let a = n.postProcess || this.options.postProcess, o =
|
|
2282
|
+
let a = n.postProcess || this.options.postProcess, o = F(a) ? [a] : a;
|
|
2283
2283
|
return e != null && o?.length && n.applyPostProcessor !== !1 && (e = Ze.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
2284
2284
|
i18nResolved: {
|
|
2285
2285
|
...r,
|
|
@@ -2290,7 +2290,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2290
2290
|
}
|
|
2291
2291
|
resolve(e, t = {}) {
|
|
2292
2292
|
let n, r, i, a, o;
|
|
2293
|
-
return
|
|
2293
|
+
return F(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? z(e, {
|
|
2294
2294
|
...this.options,
|
|
2295
2295
|
...t
|
|
2296
2296
|
}) : e)), e.forEach((e) => {
|
|
@@ -2299,7 +2299,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2299
2299
|
r = c;
|
|
2300
2300
|
let l = s.namespaces;
|
|
2301
2301
|
this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
|
|
2302
|
-
let u = t.count !== void 0 && !
|
|
2302
|
+
let u = t.count !== void 0 && !F(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (F(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
2303
2303
|
l.forEach((e) => {
|
|
2304
2304
|
this.isValidLookup(n) || (o = e, !this.checkedLoadedFor[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (this.checkedLoadedFor[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" 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!!!")), p.forEach((r) => {
|
|
2305
2305
|
if (this.isValidLookup(n)) return;
|
|
@@ -2350,7 +2350,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2350
2350
|
"joinArrays",
|
|
2351
2351
|
"postProcess",
|
|
2352
2352
|
"interpolation"
|
|
2353
|
-
], n = e.replace && !
|
|
2353
|
+
], n = e.replace && !F(e.replace), r = n ? e.replace : e;
|
|
2354
2354
|
if (n && e.count !== void 0 && (r = {
|
|
2355
2355
|
...r,
|
|
2356
2356
|
count: e.count
|
|
@@ -2375,17 +2375,17 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2375
2375
|
this.resolveHierarchyCache = {};
|
|
2376
2376
|
}
|
|
2377
2377
|
getScriptPartFromCode(e) {
|
|
2378
|
-
if (e =
|
|
2378
|
+
if (e = qe(e), !e || !e.includes("-")) return null;
|
|
2379
2379
|
let t = e.split("-");
|
|
2380
2380
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
2381
2381
|
}
|
|
2382
2382
|
getLanguagePartFromCode(e) {
|
|
2383
|
-
if (e =
|
|
2383
|
+
if (e = qe(e), !e || !e.includes("-")) return e;
|
|
2384
2384
|
let t = e.split("-");
|
|
2385
2385
|
return this.formatLanguageCode(t[0]);
|
|
2386
2386
|
}
|
|
2387
2387
|
formatLanguageCode(e) {
|
|
2388
|
-
if (
|
|
2388
|
+
if (F(e) && e.includes("-")) {
|
|
2389
2389
|
let t;
|
|
2390
2390
|
try {
|
|
2391
2391
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -2415,7 +2415,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2415
2415
|
}
|
|
2416
2416
|
getFallbackCodes(e, t) {
|
|
2417
2417
|
if (!e) return [];
|
|
2418
|
-
if (typeof e == "function" && (e = e(t)),
|
|
2418
|
+
if (typeof e == "function" && (e = e(t)), F(e) && (e = [e]), Array.isArray(e)) return e;
|
|
2419
2419
|
if (!t) return e.default || [];
|
|
2420
2420
|
let n = e[t];
|
|
2421
2421
|
return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
|
|
@@ -2423,7 +2423,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2423
2423
|
toResolveHierarchy(e, t) {
|
|
2424
2424
|
let n = this.options.fallbackLng, r = Array.isArray(n) ? n.join("|") : n;
|
|
2425
2425
|
r !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r);
|
|
2426
|
-
let i = t === void 0 || t === !1 ||
|
|
2426
|
+
let i = t === void 0 || t === !1 || F(t), a = t === void 0 && typeof this.options.fallbackLng == "function", o = F(e) && i && !a, s = null;
|
|
2427
2427
|
if (o) {
|
|
2428
2428
|
let n;
|
|
2429
2429
|
n = t === void 0 ? "undefined" : t === !1 ? "boolean:false" : `string:${t}`, s = `${e.length}:${e}|${n}`;
|
|
@@ -2435,7 +2435,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2435
2435
|
let c = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), l = [], u = (e) => {
|
|
2436
2436
|
e && (this.isSupportedCode(e) ? l.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
|
|
2437
2437
|
};
|
|
2438
|
-
return
|
|
2438
|
+
return F(e) && (e.includes("-") || e.includes("_")) ? (this.options.load !== "languageOnly" && u(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && u(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && u(this.getLanguagePartFromCode(e))) : F(e) && u(this.formatLanguageCode(e)), c.forEach((e) => {
|
|
2439
2439
|
l.includes(e) || u(this.formatLanguageCode(e));
|
|
2440
2440
|
}), s === null ? l : (this.resolveHierarchyCache[s] = l, l.slice());
|
|
2441
2441
|
}
|
|
@@ -2457,7 +2457,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2457
2457
|
this.pluralRulesCache = {};
|
|
2458
2458
|
}
|
|
2459
2459
|
getRule(e, t = {}) {
|
|
2460
|
-
let n =
|
|
2460
|
+
let n = qe(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
|
|
2461
2461
|
cleanedCode: n,
|
|
2462
2462
|
type: r
|
|
2463
2463
|
});
|
|
@@ -2489,8 +2489,8 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2489
2489
|
return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
|
|
2490
2490
|
}
|
|
2491
2491
|
}, ot = (e, t, n, r = ".", i = !0) => {
|
|
2492
|
-
let a =
|
|
2493
|
-
return !a && i &&
|
|
2492
|
+
let a = Re(e, t, n);
|
|
2493
|
+
return !a && i && F(n) && (a = Ke(e, n, r), a === void 0 && (a = Ke(t, n, r))), a;
|
|
2494
2494
|
}, st = (e) => e.replace(/\$/g, "$$$$"), ct = class {
|
|
2495
2495
|
constructor(e = {}) {
|
|
2496
2496
|
this.logger = R.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
|
|
@@ -2498,7 +2498,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2498
2498
|
init(e = {}) {
|
|
2499
2499
|
e.interpolation ||= { escapeValue: !0 };
|
|
2500
2500
|
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
|
|
2501
|
-
this.escape = t === void 0 ?
|
|
2501
|
+
this.escape = t === void 0 ? Ve : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? L(i) : a || "{{", this.suffix = o ? L(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u ? L(u) : "-", this.unescapeSuffix = this.unescapePrefix ? "" : l ? L(l) : "", this.nestingPrefix = d ? L(d) : f || L("$t("), this.nestingSuffix = p ? L(p) : m || L(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
|
|
2502
2502
|
}
|
|
2503
2503
|
reset() {
|
|
2504
2504
|
this.options && this.init(this.options);
|
|
@@ -2538,13 +2538,13 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2538
2538
|
if (a = c(n), a === void 0) {
|
|
2539
2539
|
if (typeof l == "function") {
|
|
2540
2540
|
let t = l(e, i, r);
|
|
2541
|
-
a =
|
|
2541
|
+
a = F(t) ? t : "";
|
|
2542
2542
|
} else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
|
|
2543
2543
|
else if (u) {
|
|
2544
2544
|
a = i[0];
|
|
2545
2545
|
continue;
|
|
2546
2546
|
} else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
|
|
2547
|
-
} else !
|
|
2547
|
+
} else !F(a) && !this.useRawValueToEscape && (a = ke(a));
|
|
2548
2548
|
let s = t.safeValue(a);
|
|
2549
2549
|
if (e = e.replace(i[0], st(s)), u ? (t.regex.lastIndex += s.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
|
|
2550
2550
|
}
|
|
@@ -2554,7 +2554,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2554
2554
|
let r, i, a, o = (e, t) => {
|
|
2555
2555
|
let n = this.nestingOptionsSeparator;
|
|
2556
2556
|
if (!e.includes(n)) return e;
|
|
2557
|
-
let r = e.split(RegExp(`${
|
|
2557
|
+
let r = e.split(RegExp(`${L(n)}[ ]*{`)), i = `{${r[1]}`;
|
|
2558
2558
|
e = r[0], i = this.interpolate(i, a);
|
|
2559
2559
|
let o = i.match(/'/g), s = i.match(/"/g);
|
|
2560
2560
|
((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
|
|
@@ -2570,13 +2570,13 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2570
2570
|
};
|
|
2571
2571
|
for (; r = this.nestingRegexp.exec(e);) {
|
|
2572
2572
|
let s = [];
|
|
2573
|
-
a = { ...n }, a = a.replace && !
|
|
2573
|
+
a = { ...n }, a = a.replace && !F(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
|
2574
2574
|
let c = /{.*}/s.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
|
|
2575
|
-
if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !
|
|
2576
|
-
|
|
2575
|
+
if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !F(i)) return i;
|
|
2576
|
+
F(i) || (i = ke(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
|
|
2577
2577
|
...n,
|
|
2578
2578
|
interpolationkey: r[1].trim()
|
|
2579
|
-
}), i.trim())), e = e.replace(r[0], st(
|
|
2579
|
+
}), i.trim())), e = e.replace(r[0], st(ke(i))), this.regexp.lastIndex = 0;
|
|
2580
2580
|
}
|
|
2581
2581
|
return e;
|
|
2582
2582
|
}
|
|
@@ -2606,9 +2606,9 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2606
2606
|
[i.interpolationkey]: void 0
|
|
2607
2607
|
});
|
|
2608
2608
|
let o = r + JSON.stringify(a), s = t[o];
|
|
2609
|
-
return s || (s = e(
|
|
2609
|
+
return s || (s = e(qe(r), i), t[o] = s), s(n);
|
|
2610
2610
|
};
|
|
2611
|
-
}, dt = (e) => (t, n, r) => e(
|
|
2611
|
+
}, dt = (e) => (t, n, r) => e(qe(n), r)(t), ft = class {
|
|
2612
2612
|
constructor(e = {}) {
|
|
2613
2613
|
this.logger = R.create("formatter"), this.options = e, this.init(e);
|
|
2614
2614
|
}
|
|
@@ -2706,7 +2706,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2706
2706
|
t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
2707
2707
|
let o = {};
|
|
2708
2708
|
this.queue.forEach((n) => {
|
|
2709
|
-
|
|
2709
|
+
Ie(n.loaded, [i], a), pt(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
|
|
2710
2710
|
o[e] || (o[e] = {});
|
|
2711
2711
|
let t = n.loaded[e];
|
|
2712
2712
|
t.length && t.forEach((t) => {
|
|
@@ -2755,7 +2755,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2755
2755
|
}
|
|
2756
2756
|
prepareLoading(e, t, n = {}, r) {
|
|
2757
2757
|
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
|
|
2758
|
-
|
|
2758
|
+
F(e) && (e = this.languageUtils.toResolveHierarchy(e)), F(t) && (t = [t]);
|
|
2759
2759
|
let i = this.queueLoad(e, t, n, r);
|
|
2760
2760
|
if (!i.toLoad.length) return i.pending.length || r(), null;
|
|
2761
2761
|
i.toLoad.forEach((e) => {
|
|
@@ -2831,7 +2831,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2831
2831
|
appendNamespaceToCIMode: !1,
|
|
2832
2832
|
overloadTranslationOptionHandler: (e) => {
|
|
2833
2833
|
let t = {};
|
|
2834
|
-
if (typeof e[1] == "object" && (t = e[1]),
|
|
2834
|
+
if (typeof e[1] == "object" && (t = e[1]), F(e[1]) && (t.defaultValue = e[1]), F(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
|
|
2835
2835
|
let n = e[3] || e[2];
|
|
2836
2836
|
Object.keys(n).forEach((e) => {
|
|
2837
2837
|
t[e] = n[e];
|
|
@@ -2852,7 +2852,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2852
2852
|
skipOnVariables: !0
|
|
2853
2853
|
},
|
|
2854
2854
|
cacheInBuiltFormats: !0
|
|
2855
|
-
}), gt = (e) => (
|
|
2855
|
+
}), gt = (e) => (F(e.ns) && (e.ns = [e.ns]), F(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), F(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs && !e.supportedLngs.includes("cimode") && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e), _t = () => {}, vt = (e) => {
|
|
2856
2856
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
|
|
2857
2857
|
typeof e[t] == "function" && (e[t] = e[t].bind(e));
|
|
2858
2858
|
});
|
|
@@ -2866,7 +2866,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2866
2866
|
}
|
|
2867
2867
|
}
|
|
2868
2868
|
init(e = {}, t) {
|
|
2869
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
2869
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (F(e.ns) ? e.defaultNS = e.ns : e.ns.includes("translation") || (e.defaultNS = e.ns[0]));
|
|
2870
2870
|
let n = ht();
|
|
2871
2871
|
this.options = {
|
|
2872
2872
|
...n,
|
|
@@ -2911,7 +2911,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2911
2911
|
].forEach((e) => {
|
|
2912
2912
|
this[e] = (...t) => (this.store[e](...t), this);
|
|
2913
2913
|
});
|
|
2914
|
-
let i =
|
|
2914
|
+
let i = I(), a = () => {
|
|
2915
2915
|
let e = (e, n) => {
|
|
2916
2916
|
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), i.resolve(n), t(e, n);
|
|
2917
2917
|
};
|
|
@@ -2921,7 +2921,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2921
2921
|
return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
|
|
2922
2922
|
}
|
|
2923
2923
|
loadResources(e, t = _t) {
|
|
2924
|
-
let n = t, r =
|
|
2924
|
+
let n = t, r = F(e) ? e : this.language;
|
|
2925
2925
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2926
2926
|
if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
2927
2927
|
let e = [], t = (t) => {
|
|
@@ -2935,7 +2935,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2935
2935
|
} else n(null);
|
|
2936
2936
|
}
|
|
2937
2937
|
reloadResources(e, t, n) {
|
|
2938
|
-
let r =
|
|
2938
|
+
let r = I();
|
|
2939
2939
|
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= _t, this.services.backendConnector.reload(e, t, (e) => {
|
|
2940
2940
|
r.resolve(), n(e);
|
|
2941
2941
|
}), r;
|
|
@@ -2959,7 +2959,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2959
2959
|
}
|
|
2960
2960
|
changeLanguage(e, t) {
|
|
2961
2961
|
this.isLanguageChangingTo = e;
|
|
2962
|
-
let n =
|
|
2962
|
+
let n = I();
|
|
2963
2963
|
this.emit("languageChanging", e);
|
|
2964
2964
|
let r = (e) => {
|
|
2965
2965
|
this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
|
|
@@ -2967,7 +2967,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2967
2967
|
a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
|
|
2968
2968
|
}, a = (t) => {
|
|
2969
2969
|
!e && !t && this.services.languageDetector && (t = []);
|
|
2970
|
-
let n =
|
|
2970
|
+
let n = F(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(F(t) ? [t] : t);
|
|
2971
2971
|
a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
|
|
2972
2972
|
i(e, a);
|
|
2973
2973
|
});
|
|
@@ -2988,7 +2988,7 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
2988
2988
|
let l = this.options.keySeparator || ".", u;
|
|
2989
2989
|
return o.keyPrefix && Array.isArray(e) ? u = e.map((e) => (typeof e == "function" && (e = z(e, c)), `${o.keyPrefix}${l}${e}`)) : (typeof e == "function" && (e = z(e, c)), u = o.keyPrefix ? `${o.keyPrefix}${l}${e}` : e), this.t(u, o);
|
|
2990
2990
|
};
|
|
2991
|
-
return
|
|
2991
|
+
return F(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = n, a;
|
|
2992
2992
|
}
|
|
2993
2993
|
t(...e) {
|
|
2994
2994
|
return this.translator?.translate(...e);
|
|
@@ -3015,16 +3015,16 @@ var et = (e) => !P(e) && typeof e != "boolean" && typeof e != "number", tt = cla
|
|
|
3015
3015
|
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
|
|
3016
3016
|
}
|
|
3017
3017
|
loadNamespaces(e, t) {
|
|
3018
|
-
let n =
|
|
3019
|
-
return this.options.ns ? (
|
|
3018
|
+
let n = I();
|
|
3019
|
+
return this.options.ns ? (F(e) && (e = [e]), e.forEach((e) => {
|
|
3020
3020
|
this.options.ns.includes(e) || this.options.ns.push(e);
|
|
3021
3021
|
}), this.loadResources((e) => {
|
|
3022
3022
|
n.resolve(), t && t(e);
|
|
3023
3023
|
}), n) : (t && t(), Promise.resolve());
|
|
3024
3024
|
}
|
|
3025
3025
|
loadLanguages(e, t) {
|
|
3026
|
-
let n =
|
|
3027
|
-
|
|
3026
|
+
let n = I();
|
|
3027
|
+
F(e) && (e = [e]);
|
|
3028
3028
|
let r = this.options.preload || [], i = e.filter((e) => !r.includes(e) && this.services.languageUtils.isSupportedCode(e));
|
|
3029
3029
|
return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
|
|
3030
3030
|
n.resolve(), t && t(e);
|
|
@@ -3442,7 +3442,450 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3442
3442
|
...n
|
|
3443
3443
|
});
|
|
3444
3444
|
return e;
|
|
3445
|
-
},
|
|
3445
|
+
}, H = /* @__PURE__ */ s(((e, t) => {
|
|
3446
|
+
function n(e) {
|
|
3447
|
+
return e && e.__esModule ? e : { default: e };
|
|
3448
|
+
}
|
|
3449
|
+
t.exports = n, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
3450
|
+
})), It = /* @__PURE__ */ s(((e) => {
|
|
3451
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = {
|
|
3452
|
+
items_per_page: "条/页",
|
|
3453
|
+
jump_to: "跳至",
|
|
3454
|
+
jump_to_confirm: "确定",
|
|
3455
|
+
page: "页",
|
|
3456
|
+
prev_page: "上一页",
|
|
3457
|
+
next_page: "下一页",
|
|
3458
|
+
prev_5: "向前 5 页",
|
|
3459
|
+
next_5: "向后 5 页",
|
|
3460
|
+
prev_3: "向前 3 页",
|
|
3461
|
+
next_3: "向后 3 页",
|
|
3462
|
+
page_size: "页码"
|
|
3463
|
+
};
|
|
3464
|
+
})), Lt = /* @__PURE__ */ s(((e) => {
|
|
3465
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.commonLocale = void 0, e.commonLocale = {
|
|
3466
|
+
yearFormat: "YYYY",
|
|
3467
|
+
dayFormat: "D",
|
|
3468
|
+
cellMeridiemFormat: "A",
|
|
3469
|
+
monthBeforeYear: !0
|
|
3470
|
+
};
|
|
3471
|
+
})), Rt = /* @__PURE__ */ s(((e) => {
|
|
3472
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = {
|
|
3473
|
+
...Lt().commonLocale,
|
|
3474
|
+
locale: "zh_CN",
|
|
3475
|
+
today: "今天",
|
|
3476
|
+
now: "此刻",
|
|
3477
|
+
backToToday: "返回今天",
|
|
3478
|
+
ok: "确定",
|
|
3479
|
+
timeSelect: "选择时间",
|
|
3480
|
+
dateSelect: "选择日期",
|
|
3481
|
+
weekSelect: "选择周",
|
|
3482
|
+
clear: "清除",
|
|
3483
|
+
week: "周",
|
|
3484
|
+
month: "月",
|
|
3485
|
+
year: "年",
|
|
3486
|
+
previousMonth: "上个月",
|
|
3487
|
+
nextMonth: "下个月",
|
|
3488
|
+
monthSelect: "选择月份",
|
|
3489
|
+
yearSelect: "选择年份",
|
|
3490
|
+
decadeSelect: "选择年代",
|
|
3491
|
+
previousYear: "上一年",
|
|
3492
|
+
nextYear: "下一年",
|
|
3493
|
+
previousDecade: "上一年代",
|
|
3494
|
+
nextDecade: "下一年代",
|
|
3495
|
+
previousCentury: "上一世纪",
|
|
3496
|
+
nextCentury: "下一世纪",
|
|
3497
|
+
yearFormat: "YYYY年",
|
|
3498
|
+
cellDateFormat: "D",
|
|
3499
|
+
monthBeforeYear: !1
|
|
3500
|
+
};
|
|
3501
|
+
})), zt = /* @__PURE__ */ s(((e) => {
|
|
3502
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = {
|
|
3503
|
+
placeholder: "请选择时间",
|
|
3504
|
+
rangePlaceholder: ["开始时间", "结束时间"]
|
|
3505
|
+
};
|
|
3506
|
+
})), Bt = /* @__PURE__ */ s(((e) => {
|
|
3507
|
+
var t = H().default;
|
|
3508
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
3509
|
+
var n = t(Rt()), r = t(zt()), i = {
|
|
3510
|
+
lang: {
|
|
3511
|
+
placeholder: "请选择日期",
|
|
3512
|
+
yearPlaceholder: "请选择年份",
|
|
3513
|
+
quarterPlaceholder: "请选择季度",
|
|
3514
|
+
monthPlaceholder: "请选择月份",
|
|
3515
|
+
weekPlaceholder: "请选择周",
|
|
3516
|
+
rangePlaceholder: ["开始日期", "结束日期"],
|
|
3517
|
+
rangeYearPlaceholder: ["开始年份", "结束年份"],
|
|
3518
|
+
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
3519
|
+
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
3520
|
+
rangeWeekPlaceholder: ["开始周", "结束周"],
|
|
3521
|
+
...n.default
|
|
3522
|
+
},
|
|
3523
|
+
timePickerLocale: { ...r.default }
|
|
3524
|
+
};
|
|
3525
|
+
i.lang.ok = "确定", e.default = i;
|
|
3526
|
+
})), Vt = /* @__PURE__ */ s(((e) => {
|
|
3527
|
+
var t = H().default;
|
|
3528
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = t(Bt()).default;
|
|
3529
|
+
})), Ht = /* @__PURE__ */ s(((e) => {
|
|
3530
|
+
var t = H().default;
|
|
3531
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
3532
|
+
var n = t(It()), r = t(Vt()), i = t(Bt()), a = t(zt()), o = "${label}不是一个有效的${type}";
|
|
3533
|
+
e.default = {
|
|
3534
|
+
locale: "zh-cn",
|
|
3535
|
+
Pagination: n.default,
|
|
3536
|
+
DatePicker: i.default,
|
|
3537
|
+
TimePicker: a.default,
|
|
3538
|
+
Calendar: r.default,
|
|
3539
|
+
global: {
|
|
3540
|
+
placeholder: "请选择",
|
|
3541
|
+
close: "关闭",
|
|
3542
|
+
sortable: "可排序",
|
|
3543
|
+
show: "显示",
|
|
3544
|
+
hide: "隐藏"
|
|
3545
|
+
},
|
|
3546
|
+
Table: {
|
|
3547
|
+
filterTitle: "筛选",
|
|
3548
|
+
filterConfirm: "确定",
|
|
3549
|
+
filterReset: "重置",
|
|
3550
|
+
filterEmptyText: "无筛选项",
|
|
3551
|
+
filterCheckAll: "全选",
|
|
3552
|
+
filterSearchPlaceholder: "在筛选项中搜索",
|
|
3553
|
+
emptyText: "暂无数据",
|
|
3554
|
+
selectAll: "全选当页",
|
|
3555
|
+
selectInvert: "反选当页",
|
|
3556
|
+
selectNone: "清空所有",
|
|
3557
|
+
selectionAll: "全选所有",
|
|
3558
|
+
sortTitle: "排序",
|
|
3559
|
+
expand: "展开行",
|
|
3560
|
+
collapse: "关闭行",
|
|
3561
|
+
triggerDesc: "点击降序",
|
|
3562
|
+
triggerAsc: "点击升序",
|
|
3563
|
+
cancelSort: "取消排序"
|
|
3564
|
+
},
|
|
3565
|
+
Modal: {
|
|
3566
|
+
okText: "确定",
|
|
3567
|
+
cancelText: "取消",
|
|
3568
|
+
justOkText: "知道了"
|
|
3569
|
+
},
|
|
3570
|
+
Tour: {
|
|
3571
|
+
Next: "下一步",
|
|
3572
|
+
Previous: "上一步",
|
|
3573
|
+
Finish: "结束导览"
|
|
3574
|
+
},
|
|
3575
|
+
Popconfirm: {
|
|
3576
|
+
cancelText: "取消",
|
|
3577
|
+
okText: "确定"
|
|
3578
|
+
},
|
|
3579
|
+
Transfer: {
|
|
3580
|
+
titles: ["", ""],
|
|
3581
|
+
searchPlaceholder: "请输入搜索内容",
|
|
3582
|
+
itemUnit: "项",
|
|
3583
|
+
itemsUnit: "项",
|
|
3584
|
+
remove: "删除",
|
|
3585
|
+
selectCurrent: "全选当页",
|
|
3586
|
+
removeCurrent: "删除当页",
|
|
3587
|
+
selectAll: "全选所有",
|
|
3588
|
+
deselectAll: "取消全选",
|
|
3589
|
+
removeAll: "删除全部",
|
|
3590
|
+
selectInvert: "反选当页"
|
|
3591
|
+
},
|
|
3592
|
+
Upload: {
|
|
3593
|
+
uploading: "文件上传中",
|
|
3594
|
+
removeFile: "删除文件",
|
|
3595
|
+
uploadError: "上传错误",
|
|
3596
|
+
previewFile: "预览文件",
|
|
3597
|
+
downloadFile: "下载文件"
|
|
3598
|
+
},
|
|
3599
|
+
Empty: { description: "暂无数据" },
|
|
3600
|
+
Icon: { icon: "图标" },
|
|
3601
|
+
Text: {
|
|
3602
|
+
edit: "编辑",
|
|
3603
|
+
copy: "复制",
|
|
3604
|
+
copied: "复制成功",
|
|
3605
|
+
expand: "展开",
|
|
3606
|
+
collapse: "收起"
|
|
3607
|
+
},
|
|
3608
|
+
Carousel: {
|
|
3609
|
+
prevSlide: "上一张幻灯片",
|
|
3610
|
+
nextSlide: "下一张幻灯片"
|
|
3611
|
+
},
|
|
3612
|
+
Form: {
|
|
3613
|
+
optional: "(可选)",
|
|
3614
|
+
defaultValidateMessages: {
|
|
3615
|
+
default: "字段验证错误${label}",
|
|
3616
|
+
required: "请输入${label}",
|
|
3617
|
+
enum: "${label}必须是其中一个[${enum}]",
|
|
3618
|
+
whitespace: "${label}不能为空字符",
|
|
3619
|
+
date: {
|
|
3620
|
+
format: "${label}日期格式无效",
|
|
3621
|
+
parse: "${label}不能转换为日期",
|
|
3622
|
+
invalid: "${label}是一个无效日期"
|
|
3623
|
+
},
|
|
3624
|
+
types: {
|
|
3625
|
+
string: o,
|
|
3626
|
+
method: o,
|
|
3627
|
+
array: o,
|
|
3628
|
+
object: o,
|
|
3629
|
+
number: o,
|
|
3630
|
+
date: o,
|
|
3631
|
+
boolean: o,
|
|
3632
|
+
integer: o,
|
|
3633
|
+
float: o,
|
|
3634
|
+
regexp: o,
|
|
3635
|
+
email: o,
|
|
3636
|
+
url: o,
|
|
3637
|
+
hex: o
|
|
3638
|
+
},
|
|
3639
|
+
string: {
|
|
3640
|
+
len: "${label}须为${len}个字符",
|
|
3641
|
+
min: "${label}最少${min}个字符",
|
|
3642
|
+
max: "${label}最多${max}个字符",
|
|
3643
|
+
range: "${label}须在${min}-${max}字符之间"
|
|
3644
|
+
},
|
|
3645
|
+
number: {
|
|
3646
|
+
len: "${label}必须等于${len}",
|
|
3647
|
+
min: "${label}最小值为${min}",
|
|
3648
|
+
max: "${label}最大值为${max}",
|
|
3649
|
+
range: "${label}须在${min}-${max}之间"
|
|
3650
|
+
},
|
|
3651
|
+
array: {
|
|
3652
|
+
len: "须为${len}个${label}",
|
|
3653
|
+
min: "最少${min}个${label}",
|
|
3654
|
+
max: "最多${max}个${label}",
|
|
3655
|
+
range: "${label}数量须在${min}-${max}之间"
|
|
3656
|
+
},
|
|
3657
|
+
pattern: { mismatch: "${label}与模式不匹配${pattern}" }
|
|
3658
|
+
}
|
|
3659
|
+
},
|
|
3660
|
+
QRCode: {
|
|
3661
|
+
expired: "二维码过期",
|
|
3662
|
+
refresh: "点击刷新",
|
|
3663
|
+
scanned: "已扫描"
|
|
3664
|
+
},
|
|
3665
|
+
ColorPicker: {
|
|
3666
|
+
presetEmpty: "暂无",
|
|
3667
|
+
transparent: "无色",
|
|
3668
|
+
singleColor: "单色",
|
|
3669
|
+
gradientColor: "渐变色"
|
|
3670
|
+
}
|
|
3671
|
+
};
|
|
3672
|
+
})), Ut = /* @__PURE__ */ s(((e, t) => {
|
|
3673
|
+
t.exports = Ht();
|
|
3674
|
+
})), Wt = /* @__PURE__ */ s(((e) => {
|
|
3675
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = {
|
|
3676
|
+
items_per_page: "/ page",
|
|
3677
|
+
jump_to: "Go to",
|
|
3678
|
+
jump_to_confirm: "confirm",
|
|
3679
|
+
page: "Page",
|
|
3680
|
+
prev_page: "Previous Page",
|
|
3681
|
+
next_page: "Next Page",
|
|
3682
|
+
prev_5: "Previous 5 Pages",
|
|
3683
|
+
next_5: "Next 5 Pages",
|
|
3684
|
+
prev_3: "Previous 3 Pages",
|
|
3685
|
+
next_3: "Next 3 Pages",
|
|
3686
|
+
page_size: "Page Size"
|
|
3687
|
+
};
|
|
3688
|
+
})), Gt = /* @__PURE__ */ s(((e) => {
|
|
3689
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = {
|
|
3690
|
+
...Lt().commonLocale,
|
|
3691
|
+
locale: "en_US",
|
|
3692
|
+
today: "Today",
|
|
3693
|
+
now: "Now",
|
|
3694
|
+
backToToday: "Back to today",
|
|
3695
|
+
ok: "OK",
|
|
3696
|
+
clear: "Clear",
|
|
3697
|
+
week: "Week",
|
|
3698
|
+
month: "Month",
|
|
3699
|
+
year: "Year",
|
|
3700
|
+
timeSelect: "select time",
|
|
3701
|
+
dateSelect: "select date",
|
|
3702
|
+
weekSelect: "Choose a week",
|
|
3703
|
+
monthSelect: "Choose a month",
|
|
3704
|
+
yearSelect: "Choose a year",
|
|
3705
|
+
decadeSelect: "Choose a decade",
|
|
3706
|
+
previousMonth: "Previous month",
|
|
3707
|
+
nextMonth: "Next month",
|
|
3708
|
+
previousYear: "Last year",
|
|
3709
|
+
nextYear: "Next year",
|
|
3710
|
+
previousDecade: "Last decade",
|
|
3711
|
+
nextDecade: "Next decade",
|
|
3712
|
+
previousCentury: "Last century",
|
|
3713
|
+
nextCentury: "Next century"
|
|
3714
|
+
};
|
|
3715
|
+
})), Kt = /* @__PURE__ */ s(((e) => {
|
|
3716
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = {
|
|
3717
|
+
placeholder: "Select time",
|
|
3718
|
+
rangePlaceholder: ["Start time", "End time"]
|
|
3719
|
+
};
|
|
3720
|
+
})), qt = /* @__PURE__ */ s(((e) => {
|
|
3721
|
+
var t = H().default;
|
|
3722
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
3723
|
+
var n = t(Gt()), r = t(Kt());
|
|
3724
|
+
e.default = {
|
|
3725
|
+
lang: {
|
|
3726
|
+
placeholder: "Select date",
|
|
3727
|
+
yearPlaceholder: "Select year",
|
|
3728
|
+
quarterPlaceholder: "Select quarter",
|
|
3729
|
+
monthPlaceholder: "Select month",
|
|
3730
|
+
weekPlaceholder: "Select week",
|
|
3731
|
+
rangePlaceholder: ["Start date", "End date"],
|
|
3732
|
+
rangeYearPlaceholder: ["Start year", "End year"],
|
|
3733
|
+
rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
|
|
3734
|
+
rangeMonthPlaceholder: ["Start month", "End month"],
|
|
3735
|
+
rangeWeekPlaceholder: ["Start week", "End week"],
|
|
3736
|
+
...n.default
|
|
3737
|
+
},
|
|
3738
|
+
timePickerLocale: { ...r.default }
|
|
3739
|
+
};
|
|
3740
|
+
})), Jt = /* @__PURE__ */ s(((e) => {
|
|
3741
|
+
var t = H().default;
|
|
3742
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = t(qt()).default;
|
|
3743
|
+
})), Yt = /* @__PURE__ */ s(((e) => {
|
|
3744
|
+
var t = H().default;
|
|
3745
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
3746
|
+
var n = t(Wt()), r = t(Jt()), i = t(qt()), a = t(Kt()), o = "${label} is not a valid ${type}";
|
|
3747
|
+
e.default = {
|
|
3748
|
+
locale: "en",
|
|
3749
|
+
Pagination: n.default,
|
|
3750
|
+
DatePicker: i.default,
|
|
3751
|
+
TimePicker: a.default,
|
|
3752
|
+
Calendar: r.default,
|
|
3753
|
+
global: {
|
|
3754
|
+
placeholder: "Please select",
|
|
3755
|
+
close: "Close",
|
|
3756
|
+
sortable: "sortable",
|
|
3757
|
+
show: "Show",
|
|
3758
|
+
hide: "Hide"
|
|
3759
|
+
},
|
|
3760
|
+
Table: {
|
|
3761
|
+
filterTitle: "Filter menu",
|
|
3762
|
+
filterConfirm: "OK",
|
|
3763
|
+
filterReset: "Reset",
|
|
3764
|
+
filterEmptyText: "No filters",
|
|
3765
|
+
filterCheckAll: "Select all items",
|
|
3766
|
+
filterSearchPlaceholder: "Search in filters",
|
|
3767
|
+
emptyText: "No data",
|
|
3768
|
+
selectAll: "Select current page",
|
|
3769
|
+
selectInvert: "Invert current page",
|
|
3770
|
+
selectNone: "Clear all data",
|
|
3771
|
+
selectionAll: "Select all data",
|
|
3772
|
+
sortTitle: "Sort",
|
|
3773
|
+
expand: "Expand row",
|
|
3774
|
+
collapse: "Collapse row",
|
|
3775
|
+
triggerDesc: "Click to sort descending",
|
|
3776
|
+
triggerAsc: "Click to sort ascending",
|
|
3777
|
+
cancelSort: "Click to cancel sorting"
|
|
3778
|
+
},
|
|
3779
|
+
Tour: {
|
|
3780
|
+
Next: "Next",
|
|
3781
|
+
Previous: "Previous",
|
|
3782
|
+
Finish: "Finish"
|
|
3783
|
+
},
|
|
3784
|
+
Modal: {
|
|
3785
|
+
okText: "OK",
|
|
3786
|
+
cancelText: "Cancel",
|
|
3787
|
+
justOkText: "OK"
|
|
3788
|
+
},
|
|
3789
|
+
Popconfirm: {
|
|
3790
|
+
okText: "OK",
|
|
3791
|
+
cancelText: "Cancel"
|
|
3792
|
+
},
|
|
3793
|
+
Transfer: {
|
|
3794
|
+
titles: ["", ""],
|
|
3795
|
+
searchPlaceholder: "Search here",
|
|
3796
|
+
itemUnit: "item",
|
|
3797
|
+
itemsUnit: "items",
|
|
3798
|
+
remove: "Remove",
|
|
3799
|
+
selectCurrent: "Select current page",
|
|
3800
|
+
removeCurrent: "Remove current page",
|
|
3801
|
+
selectAll: "Select all data",
|
|
3802
|
+
deselectAll: "Deselect all data",
|
|
3803
|
+
removeAll: "Remove all data",
|
|
3804
|
+
selectInvert: "Invert current page"
|
|
3805
|
+
},
|
|
3806
|
+
Upload: {
|
|
3807
|
+
uploading: "Uploading...",
|
|
3808
|
+
removeFile: "Remove file",
|
|
3809
|
+
uploadError: "Upload error",
|
|
3810
|
+
previewFile: "Preview file",
|
|
3811
|
+
downloadFile: "Download file"
|
|
3812
|
+
},
|
|
3813
|
+
Empty: { description: "No data" },
|
|
3814
|
+
Icon: { icon: "icon" },
|
|
3815
|
+
Text: {
|
|
3816
|
+
edit: "Edit",
|
|
3817
|
+
copy: "Copy",
|
|
3818
|
+
copied: "Copied",
|
|
3819
|
+
expand: "Expand",
|
|
3820
|
+
collapse: "Collapse"
|
|
3821
|
+
},
|
|
3822
|
+
Carousel: {
|
|
3823
|
+
prevSlide: "Previous slide",
|
|
3824
|
+
nextSlide: "Next slide"
|
|
3825
|
+
},
|
|
3826
|
+
Form: {
|
|
3827
|
+
optional: "(optional)",
|
|
3828
|
+
defaultValidateMessages: {
|
|
3829
|
+
default: "Field validation error for ${label}",
|
|
3830
|
+
required: "Please enter ${label}",
|
|
3831
|
+
enum: "${label} must be one of [${enum}]",
|
|
3832
|
+
whitespace: "${label} cannot be a blank character",
|
|
3833
|
+
date: {
|
|
3834
|
+
format: "${label} date format is invalid",
|
|
3835
|
+
parse: "${label} cannot be converted to a date",
|
|
3836
|
+
invalid: "${label} is an invalid date"
|
|
3837
|
+
},
|
|
3838
|
+
types: {
|
|
3839
|
+
string: o,
|
|
3840
|
+
method: o,
|
|
3841
|
+
array: o,
|
|
3842
|
+
object: o,
|
|
3843
|
+
number: o,
|
|
3844
|
+
date: o,
|
|
3845
|
+
boolean: o,
|
|
3846
|
+
integer: o,
|
|
3847
|
+
float: o,
|
|
3848
|
+
regexp: o,
|
|
3849
|
+
email: o,
|
|
3850
|
+
url: o,
|
|
3851
|
+
hex: o
|
|
3852
|
+
},
|
|
3853
|
+
string: {
|
|
3854
|
+
len: "${label} must be ${len} characters",
|
|
3855
|
+
min: "${label} must be at least ${min} characters",
|
|
3856
|
+
max: "${label} must be up to ${max} characters",
|
|
3857
|
+
range: "${label} must be between ${min}-${max} characters"
|
|
3858
|
+
},
|
|
3859
|
+
number: {
|
|
3860
|
+
len: "${label} must be equal to ${len}",
|
|
3861
|
+
min: "${label} must be minimum ${min}",
|
|
3862
|
+
max: "${label} must be maximum ${max}",
|
|
3863
|
+
range: "${label} must be between ${min}-${max}"
|
|
3864
|
+
},
|
|
3865
|
+
array: {
|
|
3866
|
+
len: "Must be ${len} ${label}",
|
|
3867
|
+
min: "At least ${min} ${label}",
|
|
3868
|
+
max: "At most ${max} ${label}",
|
|
3869
|
+
range: "The amount of ${label} must be between ${min}-${max}"
|
|
3870
|
+
},
|
|
3871
|
+
pattern: { mismatch: "${label} does not match the pattern ${pattern}" }
|
|
3872
|
+
}
|
|
3873
|
+
},
|
|
3874
|
+
QRCode: {
|
|
3875
|
+
expired: "QR code expired",
|
|
3876
|
+
refresh: "Refresh",
|
|
3877
|
+
scanned: "Scanned"
|
|
3878
|
+
},
|
|
3879
|
+
ColorPicker: {
|
|
3880
|
+
presetEmpty: "Empty",
|
|
3881
|
+
transparent: "Transparent",
|
|
3882
|
+
singleColor: "Single",
|
|
3883
|
+
gradientColor: "Gradient"
|
|
3884
|
+
}
|
|
3885
|
+
};
|
|
3886
|
+
})), Xt = /* @__PURE__ */ s(((e, t) => {
|
|
3887
|
+
t.exports = Yt();
|
|
3888
|
+
})), Zt = { ui: {
|
|
3446
3889
|
tool: {
|
|
3447
3890
|
add: "添加",
|
|
3448
3891
|
cancel: "取消",
|
|
@@ -3576,7 +4019,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3576
4019
|
dayNg: "当日NG",
|
|
3577
4020
|
clearTime: "清空时间"
|
|
3578
4021
|
}
|
|
3579
|
-
} },
|
|
4022
|
+
} }, Qt = { ui: {
|
|
3580
4023
|
tool: {
|
|
3581
4024
|
add: "Add",
|
|
3582
4025
|
cancel: "Cancel",
|
|
@@ -3710,11 +4153,84 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3710
4153
|
dayNg: "Daily NG",
|
|
3711
4154
|
clearTime: "Clear time"
|
|
3712
4155
|
}
|
|
3713
|
-
} },
|
|
3714
|
-
|
|
4156
|
+
} }, $t = /* @__PURE__ */ s(((e, t) => {
|
|
4157
|
+
(function(n, r) {
|
|
4158
|
+
typeof e == "object" && t !== void 0 ? t.exports = r(At()) : typeof define == "function" && define.amd ? define(["dayjs"], r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_locale_zh_cn = r(n.dayjs);
|
|
4159
|
+
})(e, (function(e) {
|
|
4160
|
+
function t(e) {
|
|
4161
|
+
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
4162
|
+
}
|
|
4163
|
+
var n = t(e), r = {
|
|
4164
|
+
name: "zh-cn",
|
|
4165
|
+
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
4166
|
+
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
4167
|
+
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
|
|
4168
|
+
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
|
|
4169
|
+
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
|
|
4170
|
+
ordinal: function(e, t) {
|
|
4171
|
+
return t === "W" ? e + "周" : e + "日";
|
|
4172
|
+
},
|
|
4173
|
+
weekStart: 1,
|
|
4174
|
+
yearStart: 4,
|
|
4175
|
+
formats: {
|
|
4176
|
+
LT: "HH:mm",
|
|
4177
|
+
LTS: "HH:mm:ss",
|
|
4178
|
+
L: "YYYY/MM/DD",
|
|
4179
|
+
LL: "YYYY年M月D日",
|
|
4180
|
+
LLL: "YYYY年M月D日Ah点mm分",
|
|
4181
|
+
LLLL: "YYYY年M月D日ddddAh点mm分",
|
|
4182
|
+
l: "YYYY/M/D",
|
|
4183
|
+
ll: "YYYY年M月D日",
|
|
4184
|
+
lll: "YYYY年M月D日 HH:mm",
|
|
4185
|
+
llll: "YYYY年M月D日dddd HH:mm"
|
|
4186
|
+
},
|
|
4187
|
+
relativeTime: {
|
|
4188
|
+
future: "%s内",
|
|
4189
|
+
past: "%s前",
|
|
4190
|
+
s: "几秒",
|
|
4191
|
+
m: "1 分钟",
|
|
4192
|
+
mm: "%d 分钟",
|
|
4193
|
+
h: "1 小时",
|
|
4194
|
+
hh: "%d 小时",
|
|
4195
|
+
d: "1 天",
|
|
4196
|
+
dd: "%d 天",
|
|
4197
|
+
M: "1 个月",
|
|
4198
|
+
MM: "%d 个月",
|
|
4199
|
+
y: "1 年",
|
|
4200
|
+
yy: "%d 年"
|
|
4201
|
+
},
|
|
4202
|
+
meridiem: function(e, t) {
|
|
4203
|
+
var n = 100 * e + t;
|
|
4204
|
+
return n < 600 ? "凌晨" : n < 900 ? "早上" : n < 1100 ? "上午" : n < 1300 ? "中午" : n < 1800 ? "下午" : "晚上";
|
|
4205
|
+
}
|
|
4206
|
+
};
|
|
4207
|
+
return n.default.locale(r, null, !0), r;
|
|
4208
|
+
}));
|
|
4209
|
+
})), en = /* @__PURE__ */ s(((e, t) => {
|
|
4210
|
+
(function(n, r) {
|
|
4211
|
+
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_locale_en = r();
|
|
4212
|
+
})(e, (function() {
|
|
4213
|
+
return {
|
|
4214
|
+
name: "en",
|
|
4215
|
+
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
4216
|
+
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
|
|
4217
|
+
ordinal: function(e) {
|
|
4218
|
+
var t = [
|
|
4219
|
+
"th",
|
|
4220
|
+
"st",
|
|
4221
|
+
"nd",
|
|
4222
|
+
"rd"
|
|
4223
|
+
], n = e % 100;
|
|
4224
|
+
return "[" + e + (t[(n - 20) % 10] || t[n] || t[0]) + "]";
|
|
4225
|
+
}
|
|
4226
|
+
};
|
|
4227
|
+
}));
|
|
4228
|
+
})), tn = /* @__PURE__ */ u(Ut(), 1), nn = /* @__PURE__ */ u(Xt(), 1);
|
|
4229
|
+
$t(), en();
|
|
4230
|
+
var rn = (e, t) => {
|
|
3715
4231
|
let n = [], r = Ft(e, {
|
|
3716
|
-
zh:
|
|
3717
|
-
en:
|
|
4232
|
+
zh: Zt,
|
|
4233
|
+
en: Qt
|
|
3718
4234
|
}), i = Object.keys(r), a = i.reduce((e, t) => {
|
|
3719
4235
|
let i = r[t];
|
|
3720
4236
|
return e[t] = { translation: i }, i?.ui || n.push(t), e;
|
|
@@ -3724,9 +4240,15 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3724
4240
|
resources: a,
|
|
3725
4241
|
interpolation: { escapeValue: !1 }
|
|
3726
4242
|
}), n.length ? [] : i;
|
|
3727
|
-
},
|
|
3728
|
-
return n === "toString" || typeof n == "symbol" ? void 0 :
|
|
3729
|
-
} }),
|
|
4243
|
+
}, an = (e = "") => new Proxy((t) => B.t(e, t), { get(t, n) {
|
|
4244
|
+
return n === "toString" || typeof n == "symbol" ? void 0 : an(e ? `${e}.${n}` : n);
|
|
4245
|
+
} }), U = an("ui"), on = [{
|
|
4246
|
+
key: "zh",
|
|
4247
|
+
value: tn.default
|
|
4248
|
+
}, {
|
|
4249
|
+
key: "en",
|
|
4250
|
+
value: nn.default
|
|
4251
|
+
}], sn = class {
|
|
3730
4252
|
#e = {};
|
|
3731
4253
|
#t = new EventTarget();
|
|
3732
4254
|
emit = (e, t) => (this.#t.dispatchEvent(new CustomEvent(e, { detail: t })), this);
|
|
@@ -3749,18 +4271,18 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3749
4271
|
}
|
|
3750
4272
|
return this;
|
|
3751
4273
|
};
|
|
3752
|
-
},
|
|
4274
|
+
}, cn = [
|
|
3753
4275
|
"systemError",
|
|
3754
4276
|
"messageUpdated",
|
|
3755
4277
|
"defectUpdated",
|
|
3756
4278
|
"systemMode",
|
|
3757
4279
|
"historyUpdated",
|
|
3758
4280
|
"recordUpdated"
|
|
3759
|
-
],
|
|
3760
|
-
let t = [...
|
|
3761
|
-
for (let e of t)
|
|
3762
|
-
return t.length ===
|
|
3763
|
-
}, { emit:
|
|
4281
|
+
], W = {}, ln = (e = []) => {
|
|
4282
|
+
let t = [...cn, ...e];
|
|
4283
|
+
for (let e of t) W[e] = e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4284
|
+
return t.length === cn.length + e.length;
|
|
4285
|
+
}, { emit: G, emitSync: un, on: dn, off: fn, once: pn, clear: mn } = new sn(), hn = {
|
|
3764
4286
|
0: {
|
|
3765
4287
|
editing: !0,
|
|
3766
4288
|
visible: !0,
|
|
@@ -3776,7 +4298,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3776
4298
|
visible: !1,
|
|
3777
4299
|
operate: !1
|
|
3778
4300
|
}
|
|
3779
|
-
},
|
|
4301
|
+
}, gn = V({
|
|
3780
4302
|
dayOk: {
|
|
3781
4303
|
type: "text",
|
|
3782
4304
|
value: 0
|
|
@@ -3796,30 +4318,30 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3796
4318
|
},
|
|
3797
4319
|
toProps: () => {
|
|
3798
4320
|
let e = {};
|
|
3799
|
-
for (let t in
|
|
4321
|
+
for (let t in gn) e[t] = gn[t].value;
|
|
3800
4322
|
return e;
|
|
3801
4323
|
}
|
|
3802
4324
|
}, ["toProps"], {
|
|
3803
4325
|
enumerable: !1,
|
|
3804
4326
|
writable: !1,
|
|
3805
4327
|
configurable: !1
|
|
3806
|
-
}),
|
|
4328
|
+
}), _n = [
|
|
3807
4329
|
15,
|
|
3808
4330
|
25,
|
|
3809
4331
|
50,
|
|
3810
4332
|
100
|
|
3811
|
-
],
|
|
4333
|
+
], vn = [
|
|
3812
4334
|
24,
|
|
3813
4335
|
240,
|
|
3814
4336
|
138
|
|
3815
|
-
],
|
|
4337
|
+
], yn = "#808080", bn = "app-config-set", xn = {
|
|
3816
4338
|
INFO: 0,
|
|
3817
4339
|
WARN: 1,
|
|
3818
4340
|
ERROR: 2
|
|
3819
|
-
},
|
|
4341
|
+
}, Sn = {
|
|
3820
4342
|
0: "zh",
|
|
3821
4343
|
1: "en"
|
|
3822
|
-
},
|
|
4344
|
+
}, Cn = new class {
|
|
3823
4345
|
#e = !1;
|
|
3824
4346
|
#t = [];
|
|
3825
4347
|
#n = "";
|
|
@@ -3833,26 +4355,26 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3833
4355
|
return this.#e;
|
|
3834
4356
|
}
|
|
3835
4357
|
set work(e) {
|
|
3836
|
-
this.#e = e, this.#n = e ?
|
|
4358
|
+
this.#e = e, this.#n = e ? K.workDefectPath : K.globalDefectPath, this.read(this.#n, this.#e);
|
|
3837
4359
|
}
|
|
3838
4360
|
constructor() {
|
|
3839
4361
|
this.#t.splice(0, this.#t.length);
|
|
3840
4362
|
}
|
|
3841
4363
|
#r() {
|
|
3842
|
-
W
|
|
4364
|
+
G(W.defectUpdated);
|
|
3843
4365
|
}
|
|
3844
4366
|
setValue(e, t = null) {
|
|
3845
|
-
this.value = e, t?.(
|
|
4367
|
+
this.value = e, t?.(U.tool.setOk(), { key: bn });
|
|
3846
4368
|
}
|
|
3847
4369
|
read(e, t = this.#e) {
|
|
3848
4370
|
this.#n = e, this.#e = t, Y.access(this.#n, Y.constants.F_OK, (e) => {
|
|
3849
|
-
e ?
|
|
4371
|
+
e ? qn(this.#n, this.#t) : Kn(this.#n, (e) => {
|
|
3850
4372
|
this.#t = e, this.#r();
|
|
3851
4373
|
});
|
|
3852
4374
|
});
|
|
3853
4375
|
}
|
|
3854
4376
|
write() {
|
|
3855
|
-
|
|
4377
|
+
qn(this.#n, this.#t);
|
|
3856
4378
|
}
|
|
3857
4379
|
get(e) {
|
|
3858
4380
|
return this.#t.find((t) => t.type === e);
|
|
@@ -3897,7 +4419,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3897
4419
|
t && e[t.type]++;
|
|
3898
4420
|
}
|
|
3899
4421
|
}
|
|
3900
|
-
}(),
|
|
4422
|
+
}(), wn = "basic_config.json", K = V({
|
|
3901
4423
|
workDir: "{workDir}",
|
|
3902
4424
|
rootDir: "{rootDir}",
|
|
3903
4425
|
dataDir: "{workDir}/Data",
|
|
@@ -3912,7 +4434,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3912
4434
|
enumerable: !1,
|
|
3913
4435
|
writable: !0,
|
|
3914
4436
|
configurable: !0
|
|
3915
|
-
}),
|
|
4437
|
+
}), Tn = {
|
|
3916
4438
|
saveDir: "",
|
|
3917
4439
|
recordSaveTime: 30,
|
|
3918
4440
|
ngImageSaveTime: 30,
|
|
@@ -3927,28 +4449,28 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3927
4449
|
DatabaseName: "aoi",
|
|
3928
4450
|
UserName: "root",
|
|
3929
4451
|
Password: "123456"
|
|
3930
|
-
},
|
|
3931
|
-
let e = JSON.stringify(
|
|
3932
|
-
return
|
|
3933
|
-
},
|
|
3934
|
-
let t = await
|
|
3935
|
-
return t &&
|
|
3936
|
-
},
|
|
4452
|
+
}, En = () => {
|
|
4453
|
+
let e = JSON.stringify(q, void 0, 4);
|
|
4454
|
+
return qn(K.settingPath, e), !0;
|
|
4455
|
+
}, Dn = async (e = !0) => {
|
|
4456
|
+
let t = await Kn(K.settingPath, e);
|
|
4457
|
+
return t && On(t, !1), q.onChange?.(), !0;
|
|
4458
|
+
}, On = (e = {}, t = !0) => {
|
|
3937
4459
|
let n = !1, r = {};
|
|
3938
|
-
for (let t of Object.keys(
|
|
3939
|
-
Object.keys(r).length > 0 && W
|
|
3940
|
-
},
|
|
4460
|
+
for (let t of Object.keys(q)) e[t] === void 0 ? (e[t] = Tn[t], n = !0) : (q[t] !== e[t] && (q[t] = e[t], n = !0), t.endsWith("Mode") && (r[t] = e[t]));
|
|
4461
|
+
Object.keys(r).length > 0 && G(W.systemMode, r), t && n && En();
|
|
4462
|
+
}, kn = async (e = !0) => {
|
|
3941
4463
|
let { exe: t } = $;
|
|
3942
|
-
return
|
|
3943
|
-
},
|
|
3944
|
-
...
|
|
3945
|
-
setConfig:
|
|
4464
|
+
return An.level = (await Kn(K.userPath, e))?.UserLevel ?? 0, An.userName = t.getUserName(), An.onChange?.(), !0;
|
|
4465
|
+
}, q = V({
|
|
4466
|
+
...Tn,
|
|
4467
|
+
setConfig: On,
|
|
3946
4468
|
onChange: void 0
|
|
3947
4469
|
}, ["setConfig", "onChange"], {
|
|
3948
4470
|
enumerable: !1,
|
|
3949
4471
|
writable: !0,
|
|
3950
4472
|
configurable: !0
|
|
3951
|
-
}),
|
|
4473
|
+
}), An = V({
|
|
3952
4474
|
level: 0,
|
|
3953
4475
|
userName: null,
|
|
3954
4476
|
onChange: void 0
|
|
@@ -3956,21 +4478,21 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3956
4478
|
enumerable: !1,
|
|
3957
4479
|
writable: !0,
|
|
3958
4480
|
configurable: !0
|
|
3959
|
-
}),
|
|
3960
|
-
let t =
|
|
4481
|
+
}), jn = (e = {}) => {
|
|
4482
|
+
let t = Kn(`${K.rootDir}/${wn}`, !1), n = { ...e };
|
|
3961
4483
|
if (t && t?.basic_config) {
|
|
3962
4484
|
let { language: e } = t.basic_config;
|
|
3963
|
-
n.lang
|
|
4485
|
+
Sn?.[e] && (n.lang = Sn[e]);
|
|
3964
4486
|
}
|
|
3965
4487
|
return n;
|
|
3966
|
-
},
|
|
4488
|
+
}, Mn = (e = {}, t = {}) => {
|
|
3967
4489
|
let { exe: n } = $, r = n.getWorkDir(), i = n.getCurrentPath();
|
|
3968
|
-
|
|
3969
|
-
for (let e in
|
|
3970
|
-
|
|
3971
|
-
for (let e of ["dataDir", "ngImagesDir"]) Y.mkdir(
|
|
3972
|
-
return Y.existsSync(
|
|
3973
|
-
},
|
|
4490
|
+
K.workDir = r, K.rootDir = i;
|
|
4491
|
+
for (let e in K) K[e] = K[e].replace(/\{(\w+)\}/g, (e, t) => K[t]);
|
|
4492
|
+
q.saveDir = K.dataDir, Object.assign(q, e), pn(W.systemMode, ({ detail: e }) => Cn.work = !!e?.defectMode);
|
|
4493
|
+
for (let e of ["dataDir", "ngImagesDir"]) Y.mkdir(K[e], { recursive: !0 }, () => {});
|
|
4494
|
+
return Y.existsSync(K.settingPath) ? Dn(!1) : En(), Y.existsSync(K.userPath) && kn(!1), setTimeout(() => Jn(K.settingPath, Dn), 1e3), setTimeout(() => Jn(K.userPath, kn), 1e3), jn(t);
|
|
4495
|
+
}, Nn = () => K.workDir.replace(/\\/g, "/").match(/[^/]+$/)?.[0], J = new class {
|
|
3974
4496
|
maxLength = 100;
|
|
3975
4497
|
#e = [];
|
|
3976
4498
|
get value() {
|
|
@@ -3983,7 +4505,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3983
4505
|
this.#e.splice(0, this.#e.length);
|
|
3984
4506
|
}
|
|
3985
4507
|
#t() {
|
|
3986
|
-
W
|
|
4508
|
+
G(W.messageUpdated);
|
|
3987
4509
|
}
|
|
3988
4510
|
#n(e, t, n, r = {}) {
|
|
3989
4511
|
let i = Date.now();
|
|
@@ -3997,13 +4519,13 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
3997
4519
|
}), this.#e.length > this.maxLength && this.#e.pop(), this.#t(), i;
|
|
3998
4520
|
}
|
|
3999
4521
|
error(e, t, n) {
|
|
4000
|
-
return this.#n("error", e, t ??
|
|
4522
|
+
return this.#n("error", e, t ?? U.tool.error(), n);
|
|
4001
4523
|
}
|
|
4002
4524
|
warning(e, t, n) {
|
|
4003
|
-
return this.#n("warning", e, t ??
|
|
4525
|
+
return this.#n("warning", e, t ?? U.tool.warning(), n);
|
|
4004
4526
|
}
|
|
4005
4527
|
info(e, t, n) {
|
|
4006
|
-
return this.#n("info", e, t ??
|
|
4528
|
+
return this.#n("info", e, t ?? U.tool.info(), n);
|
|
4007
4529
|
}
|
|
4008
4530
|
delete(e) {
|
|
4009
4531
|
let t = this.#e.findIndex((t) => t.id === e);
|
|
@@ -4020,31 +4542,31 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4020
4542
|
clear() {
|
|
4021
4543
|
this.#e.splice(0, this.#e.length), this.#t();
|
|
4022
4544
|
}
|
|
4023
|
-
}(), Y = typeof __non_webpack_require__ == "function" ? __non_webpack_require__("fs") : typeof globalThis.require == "function" ? globalThis.require("fs") : null,
|
|
4545
|
+
}(), Y = typeof __non_webpack_require__ == "function" ? __non_webpack_require__("fs") : typeof globalThis.require == "function" ? globalThis.require("fs") : null, Pn = (e, t = 1500) => {
|
|
4024
4546
|
let n = null;
|
|
4025
4547
|
return function(...r) {
|
|
4026
4548
|
n && clearTimeout(n), n = setTimeout(e.bind(this, ...r), t);
|
|
4027
4549
|
};
|
|
4028
|
-
},
|
|
4550
|
+
}, Fn = (e, t = 1500) => {
|
|
4029
4551
|
let n = null;
|
|
4030
4552
|
return function(...r) {
|
|
4031
4553
|
n ||= setTimeout(() => {
|
|
4032
4554
|
e.call(this, ...r), n = null;
|
|
4033
4555
|
}, t);
|
|
4034
4556
|
};
|
|
4035
|
-
},
|
|
4557
|
+
}, In = (e) => {
|
|
4036
4558
|
if (!e || typeof e != "object") return e;
|
|
4037
4559
|
let t = e.constructor();
|
|
4038
|
-
for (let n in e) Object.hasOwn(e, n) && (t[n] =
|
|
4560
|
+
for (let n in e) Object.hasOwn(e, n) && (t[n] = In(e[n]));
|
|
4039
4561
|
return t;
|
|
4040
|
-
},
|
|
4562
|
+
}, Ln = (e, t) => {
|
|
4041
4563
|
if (e === t) return !0;
|
|
4042
4564
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
4043
4565
|
let n = Object.keys(e), r = Object.keys(t);
|
|
4044
4566
|
if (n.length !== r.length) return !1;
|
|
4045
|
-
for (let i of n) if (!r.includes(i) || !
|
|
4567
|
+
for (let i of n) if (!r.includes(i) || !Ln(e[i], t[i])) return !1;
|
|
4046
4568
|
return !0;
|
|
4047
|
-
},
|
|
4569
|
+
}, Rn = (e = "_") => `${Date.now()}${e}${Math.floor(Math.random() * 1e4)}`, zn = (e) => e == null ? !1 : typeof e == "string" || Array.isArray(e) ? e.length > 0 : typeof e != "object" || Object.keys(e).length > 0, Bn = (e, t = {}) => {
|
|
4048
4570
|
try {
|
|
4049
4571
|
let n = O(e);
|
|
4050
4572
|
for (let e in t) n = n[e]?.(t[e]);
|
|
@@ -4052,10 +4574,10 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4052
4574
|
} catch {
|
|
4053
4575
|
return !1;
|
|
4054
4576
|
}
|
|
4055
|
-
},
|
|
4577
|
+
}, Vn = (e) => {
|
|
4056
4578
|
let t = $.token?.[e];
|
|
4057
|
-
return
|
|
4058
|
-
},
|
|
4579
|
+
return zn(t) ? t : getComputedStyle(document.getElementById("root")).getPropertyValue(`--aoi-${e}`).trim();
|
|
4580
|
+
}, Hn = (e = pe) => {
|
|
4059
4581
|
let t;
|
|
4060
4582
|
switch (e) {
|
|
4061
4583
|
case "small":
|
|
@@ -4067,17 +4589,17 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4067
4589
|
default: t = $.token.controlHeight ?? 32;
|
|
4068
4590
|
}
|
|
4069
4591
|
return Number.parseInt(t);
|
|
4070
|
-
},
|
|
4592
|
+
}, Un = (e, t = 2) => {
|
|
4071
4593
|
let n = Number(e);
|
|
4072
4594
|
return Number.isNaN(n) ? 0 : Number(n.toFixed(t));
|
|
4073
|
-
},
|
|
4595
|
+
}, Wn = (e, t = {}, n = {}) => {
|
|
4074
4596
|
let r = e.constructor === String ? document.createElement(e) : e;
|
|
4075
|
-
for (let [e, n] of Object.entries(t)) n.constructor === Object ?
|
|
4597
|
+
for (let [e, n] of Object.entries(t)) n.constructor === Object ? Wn(r[e], n) : e.startsWith("--") ? r.setProperty(e, n) : r[e] = n;
|
|
4076
4598
|
for (let [e, t] of Object.entries(n)) r.addEventListener(e, t);
|
|
4077
4599
|
return r;
|
|
4078
|
-
},
|
|
4600
|
+
}, Gn = (e) => {
|
|
4079
4601
|
e?.stopPropagation(), e?.preventDefault(), e.cancelBubble = !0;
|
|
4080
|
-
},
|
|
4602
|
+
}, Kn = (e, t = !1) => {
|
|
4081
4603
|
if (Pt(t, "function")) {
|
|
4082
4604
|
Y.readFile(e, "utf-8", (n, r) => {
|
|
4083
4605
|
if (n || !r) {
|
|
@@ -4086,7 +4608,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4086
4608
|
}
|
|
4087
4609
|
let i = X(r);
|
|
4088
4610
|
if (!i) {
|
|
4089
|
-
J.error(
|
|
4611
|
+
J.error(U.file.filePath({ path: e }), U.file.readErr());
|
|
4090
4612
|
return;
|
|
4091
4613
|
}
|
|
4092
4614
|
t(i);
|
|
@@ -4105,13 +4627,13 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4105
4627
|
return t ? X(t) : null;
|
|
4106
4628
|
}
|
|
4107
4629
|
} catch (t) {
|
|
4108
|
-
return J.error(
|
|
4630
|
+
return J.error(U.file.filePath({ path: e }), U.file.readErr()), $.dev && console.error(t), null;
|
|
4109
4631
|
}
|
|
4110
|
-
},
|
|
4111
|
-
Y.writeFile(e,
|
|
4112
|
-
n?.(t), t && (J.error(
|
|
4632
|
+
}, qn = (e, t, n) => {
|
|
4633
|
+
Y.writeFile(e, Yn(t), "utf-8", (t) => {
|
|
4634
|
+
n?.(t), t && (J.error(U.file.filePath({ path: e }), U.file.writeErr()), $.dev && console.error(t));
|
|
4113
4635
|
});
|
|
4114
|
-
},
|
|
4636
|
+
}, Jn = (e, t) => {
|
|
4115
4637
|
Pt(t, "function") && Y.watch(e, (e) => {
|
|
4116
4638
|
e === "change" && (clearTimeout(t?.timer), t.timer = setTimeout(t, 1e3));
|
|
4117
4639
|
});
|
|
@@ -4122,15 +4644,15 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4122
4644
|
} catch {
|
|
4123
4645
|
return t;
|
|
4124
4646
|
}
|
|
4125
|
-
},
|
|
4647
|
+
}, Yn = (e, t = "") => {
|
|
4126
4648
|
if (typeof e == "string") return e;
|
|
4127
4649
|
try {
|
|
4128
4650
|
return JSON.stringify(e);
|
|
4129
4651
|
} catch {
|
|
4130
4652
|
return t;
|
|
4131
4653
|
}
|
|
4132
|
-
},
|
|
4133
|
-
let { x: n = 0, y: r = 0, w: i = 0, h: a = 0, fileName: o, prefixDir: s =
|
|
4654
|
+
}, Xn = (e, t = {}) => {
|
|
4655
|
+
let { x: n = 0, y: r = 0, w: i = 0, h: a = 0, fileName: o, prefixDir: s = K.ngImagesDir, ratio: c = q.ngImgRatio } = t;
|
|
4134
4656
|
if (!e || n <= 0 || r <= 0 || i <= 0 || a <= 0 || !o) return !0;
|
|
4135
4657
|
try {
|
|
4136
4658
|
let t = `${s}/${o}`, l = t.split(".").pop().toLowerCase();
|
|
@@ -4139,7 +4661,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4139
4661
|
"jpeg",
|
|
4140
4662
|
"png",
|
|
4141
4663
|
"bmp"
|
|
4142
|
-
].includes(l) || (t += `.${
|
|
4664
|
+
].includes(l) || (t += `.${q.ngImgSuffix}`);
|
|
4143
4665
|
let u = t.substring(0, t.lastIndexOf("/"));
|
|
4144
4666
|
Y.existsSync(u) || Y.mkdirSync(u, { recursive: !0 });
|
|
4145
4667
|
let { cv: d } = $, f = d.cropSharedMemImage(e, n, r, n + i, r + a);
|
|
@@ -4151,8 +4673,8 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4151
4673
|
} catch (e) {
|
|
4152
4674
|
return $.dev && console.error(e), !0;
|
|
4153
4675
|
}
|
|
4154
|
-
},
|
|
4155
|
-
let { fileName: t, prefixDir: n =
|
|
4676
|
+
}, Zn = (e = {}) => {
|
|
4677
|
+
let { fileName: t, prefixDir: n = K.ngImagesDir } = e;
|
|
4156
4678
|
if (!t) return;
|
|
4157
4679
|
let r = `${n}/${t}`, i = r.split(".").pop().toLowerCase();
|
|
4158
4680
|
[
|
|
@@ -4160,26 +4682,26 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4160
4682
|
"jpeg",
|
|
4161
4683
|
"png",
|
|
4162
4684
|
"bmp"
|
|
4163
|
-
].includes(i) || (r += `.${
|
|
4685
|
+
].includes(i) || (r += `.${q.ngImgSuffix}`);
|
|
4164
4686
|
let { cv: a } = $;
|
|
4165
4687
|
return new Promise((e, t) => {
|
|
4166
4688
|
a.imread(r, (t, n) => {
|
|
4167
4689
|
t ? ($.dev && console.error("error read image: ", t), e(!1)) : e(n);
|
|
4168
4690
|
});
|
|
4169
4691
|
});
|
|
4170
|
-
},
|
|
4171
|
-
let { fileName: t, prefixDir: n =
|
|
4692
|
+
}, Qn = async (e = {}) => {
|
|
4693
|
+
let { fileName: t, prefixDir: n = K.ngImagesDir } = e;
|
|
4172
4694
|
if (!t) return;
|
|
4173
4695
|
let r = n ? `${n}/${t}` : t;
|
|
4174
4696
|
if (!Y.existsSync(r)) return;
|
|
4175
4697
|
let { exe: i } = $;
|
|
4176
4698
|
return await i.deletePath(r) === "delete successed";
|
|
4177
|
-
},
|
|
4178
|
-
let { cv: r } = $, i =
|
|
4699
|
+
}, $n = (e, t = "", n = []) => {
|
|
4700
|
+
let { cv: r } = $, i = K.dataDir;
|
|
4179
4701
|
return e ? r.getOpenFileName(t, `*${n.join(";*")}`, i) : r.getExistingDirectory(t, i);
|
|
4180
|
-
},
|
|
4702
|
+
}, er = (e, ...t) => e.replace(/\?/g, () => {
|
|
4181
4703
|
let e = t.shift();
|
|
4182
|
-
return e instanceof Object && (e =
|
|
4704
|
+
return e instanceof Object && (e = Yn(e, void 0)), typeof e == "string" ? e.length ? `'${e}'` : "null" : e === void 0 ? "null" : e;
|
|
4183
4705
|
}).replace(/[\n\r\s]+/g, " "), Z = "journal", Q = {
|
|
4184
4706
|
tableName: Z,
|
|
4185
4707
|
fields: {
|
|
@@ -4199,7 +4721,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4199
4721
|
},
|
|
4200
4722
|
operate: "operate",
|
|
4201
4723
|
message: "message"
|
|
4202
|
-
},
|
|
4724
|
+
}, tr = class {
|
|
4203
4725
|
#e = [];
|
|
4204
4726
|
#t = !1;
|
|
4205
4727
|
get sqls() {
|
|
@@ -4210,28 +4732,28 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4210
4732
|
}
|
|
4211
4733
|
constructor(e = []) {
|
|
4212
4734
|
let { exe: t } = $;
|
|
4213
|
-
this.#e = [...e, Q], this.#t = this.#e?.length <= 1 || this.#e.some((e) => t.verifyDatabase(e.tableName,
|
|
4735
|
+
this.#e = [...e, Q], this.#t = this.#e?.length <= 1 || this.#e.some((e) => t.verifyDatabase(e.tableName, Yn(e.fields)));
|
|
4214
4736
|
}
|
|
4215
4737
|
async #n({ tableName: e, sqlKey: t, typeErr: n, execFunc: r }, ...i) {
|
|
4216
4738
|
let a = this.getTable(e);
|
|
4217
4739
|
if (!a) return !1;
|
|
4218
|
-
let { exe: o } = $, s =
|
|
4740
|
+
let { exe: o } = $, s = er(a.sqls?.[t] ?? t, ...i);
|
|
4219
4741
|
try {
|
|
4220
4742
|
let e = await r(o, s);
|
|
4221
4743
|
if (e) return e;
|
|
4222
4744
|
throw Error();
|
|
4223
4745
|
} catch (e) {
|
|
4224
|
-
return J.error(
|
|
4746
|
+
return J.error(U.sql.execErr({ error: s }), n), $.dev && console.error(e), !1;
|
|
4225
4747
|
}
|
|
4226
4748
|
}
|
|
4227
4749
|
getTable(e) {
|
|
4228
|
-
return this.#e.find((t) => t.tableName === e) || (J.error(
|
|
4750
|
+
return this.#e.find((t) => t.tableName === e) || (J.error(U.sql.tableErr({ tableName: e }), U.sql.error()), !1);
|
|
4229
4751
|
}
|
|
4230
4752
|
update(e, t, ...n) {
|
|
4231
4753
|
return this.#n({
|
|
4232
4754
|
tableName: e,
|
|
4233
4755
|
sqlKey: t,
|
|
4234
|
-
typeErr:
|
|
4756
|
+
typeErr: U.sql.updateErr(),
|
|
4235
4757
|
execFunc: async (e, t) => await e.writeDataBase(t) === 0
|
|
4236
4758
|
}, ...n);
|
|
4237
4759
|
}
|
|
@@ -4239,7 +4761,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4239
4761
|
return this.#n({
|
|
4240
4762
|
tableName: e,
|
|
4241
4763
|
sqlKey: t,
|
|
4242
|
-
typeErr:
|
|
4764
|
+
typeErr: U.sql.selectErr(),
|
|
4243
4765
|
execFunc: async (e, t) => {
|
|
4244
4766
|
let n = await e.findDataBaseData(t);
|
|
4245
4767
|
return n?.length ? X(n, []) : [];
|
|
@@ -4250,7 +4772,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4250
4772
|
return this.#n({
|
|
4251
4773
|
tableName: e,
|
|
4252
4774
|
sqlKey: t,
|
|
4253
|
-
typeErr:
|
|
4775
|
+
typeErr: U.sql.selectErr(),
|
|
4254
4776
|
execFunc: async (e, t) => {
|
|
4255
4777
|
let n = await e.findSingleDataBaseData(t);
|
|
4256
4778
|
return n?.length ? X(n) : null;
|
|
@@ -4261,24 +4783,24 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4261
4783
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
4262
4784
|
for (let r of e) {
|
|
4263
4785
|
let e = this.#e.find((e) => e.tableName === r.name);
|
|
4264
|
-
e ? n.push(
|
|
4786
|
+
e ? n.push(er(e.sqls?.[r.key] ?? r.key, ...r?.params ?? [])) : t.add(r.name);
|
|
4265
4787
|
}
|
|
4266
4788
|
if (t.size) {
|
|
4267
4789
|
let e = Array.from(t).join(", ");
|
|
4268
|
-
return J.error(
|
|
4790
|
+
return J.error(U.sql.tableErr({ tableName: e }), U.sql.error()), !1;
|
|
4269
4791
|
}
|
|
4270
4792
|
let { exe: r } = $, i = n.join("&");
|
|
4271
4793
|
try {
|
|
4272
4794
|
if (await r.batchWriteDataBase(i)) return !0;
|
|
4273
4795
|
throw Error();
|
|
4274
4796
|
} catch (e) {
|
|
4275
|
-
return J.error(
|
|
4797
|
+
return J.error(U.sql.execErr({ error: i }), U.sql.batchErr()), $.dev && console.error(e), !1;
|
|
4276
4798
|
}
|
|
4277
4799
|
}
|
|
4278
4800
|
async #r({ type: e, grade: t, user: n, content: r }) {
|
|
4279
|
-
let { exe: i } = $, a = Date.now(), o = Mt(a), s = n ??
|
|
4801
|
+
let { exe: i } = $, a = Date.now(), o = Mt(a), s = n ?? An.userName;
|
|
4280
4802
|
try {
|
|
4281
|
-
let n =
|
|
4803
|
+
let n = er(Q.sqls.insertSql, a, o, e, t, s, r);
|
|
4282
4804
|
await i.writeDataBase(n);
|
|
4283
4805
|
} catch (e) {
|
|
4284
4806
|
$.dev && console.error(e);
|
|
@@ -4290,7 +4812,7 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4290
4812
|
grade: e,
|
|
4291
4813
|
user: n,
|
|
4292
4814
|
content: t
|
|
4293
|
-
}), W
|
|
4815
|
+
}), G(W.recordUpdated, Q.operate);
|
|
4294
4816
|
}
|
|
4295
4817
|
async logMessage(e, t, n) {
|
|
4296
4818
|
await this.#r({
|
|
@@ -4298,12 +4820,12 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4298
4820
|
grade: e,
|
|
4299
4821
|
user: n,
|
|
4300
4822
|
content: t
|
|
4301
|
-
}), W
|
|
4823
|
+
}), G(W.recordUpdated, Q.message);
|
|
4302
4824
|
}
|
|
4303
|
-
},
|
|
4304
|
-
let t = new
|
|
4825
|
+
}, nr = (e) => {
|
|
4826
|
+
let t = new tr(e);
|
|
4305
4827
|
return !t.error && t;
|
|
4306
|
-
},
|
|
4828
|
+
}, rr = new class {
|
|
4307
4829
|
maxLength = 3;
|
|
4308
4830
|
#e = [];
|
|
4309
4831
|
get length() {
|
|
@@ -4334,7 +4856,8 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4334
4856
|
this.#e.splice(0, this.#e.length);
|
|
4335
4857
|
}
|
|
4336
4858
|
}(), $ = {
|
|
4337
|
-
token:
|
|
4859
|
+
token: Oe,
|
|
4860
|
+
lang: null,
|
|
4338
4861
|
langs: [],
|
|
4339
4862
|
exe: null,
|
|
4340
4863
|
cv: null,
|
|
@@ -4344,8 +4867,10 @@ var yt = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
4344
4867
|
dev: !1,
|
|
4345
4868
|
level: null,
|
|
4346
4869
|
project: {}
|
|
4347
|
-
},
|
|
4348
|
-
$.exe = e, $.cv = t, $.neat = n, $.dev = r, $.level =
|
|
4870
|
+
}, ir = ({ exe: e = null, cv: t = null, neat: n = !1, dev: r = !1, resource: i = {}, lang: a = "zh", sqls: o = [], evt: s = [], level: c = {}, config: l = {}, project: u = {}, imgQueueLen: d = 3, msgMaxLen: f = 100 } = {}) => {
|
|
4871
|
+
$.exe = e, $.cv = t, $.neat = n, $.dev = r, $.level = c, $.db = nr(o), $.evt = ln(s);
|
|
4872
|
+
let p = Mn(l, { lang: a });
|
|
4873
|
+
$.lang = p.lang, $.langs = rn(i, p.lang), $.project = Object.assign(u, gn.toProps()), J.maxLength = f, rr.maxLength = d;
|
|
4349
4874
|
};
|
|
4350
4875
|
//#endregion
|
|
4351
|
-
export {
|
|
4876
|
+
export { Mt as $, Mn as A, _n as B, Un as C, qn as D, Jn as E, yn as F, un as G, W as H, bn as I, dn as J, ln as K, vn as L, q as M, An as N, J as O, Cn as P, Ft as Q, gn as R, Hn as S, Rn as T, mn as U, hn as V, G as W, on as X, pn as Y, U as Z, Wn as _, c as _t, nr as a, Tt as at, Fn as b, Ln as c, z as ct, zn as d, we as dt, Pt as et, X as f, pe as ft, Xn as g, s as gt, Qn as h, O as ht, Q as i, Ot as it, Nn as j, K as k, Y as l, De as lt, Zn as m, fe as mt, ir as n, Nt as nt, Pn as o, St as ot, Kn as p, me as pt, fn as q, rr as r, At as rt, In as s, B as st, $ as t, V as tt, $n as u, P as ut, Gn as v, d as vt, Vn as w, Bn as x, Yn as y, u as yt, xn as z };
|