@das-fed/upf-utils 6.4.0-dev.225 → 6.4.0-dev.227
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/api-services/es5.js +2065 -1991
- package/api-services/index.js +1568 -1504
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +2095 -2031
- package/api-services/modules/app-manage/index.js +1723 -1673
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +2296 -2232
- package/api-services/modules/authentication/index.js +1900 -1850
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +2303 -2239
- package/api-services/modules/bems/index.js +1901 -1851
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +2296 -2232
- package/api-services/modules/contract/index.js +1900 -1850
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +2096 -2032
- package/api-services/modules/duty-manage/index.js +1724 -1674
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +2296 -2232
- package/api-services/modules/enterpriseright/index.js +1900 -1850
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1835 -1759
- package/api-services/modules/file/es5.js +1804 -1728
- package/api-services/modules/file/index.js +1406 -1338
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +2204 -2130
- package/api-services/modules/gateway-edge/index.js +1810 -1746
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1419 -1351
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +2117 -2053
- package/api-services/modules/iot/index.js +1734 -1684
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +2296 -2232
- package/api-services/modules/justauth/index.js +1899 -1849
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +2204 -2128
- package/api-services/modules/knowledge/index.js +1812 -1744
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +2204 -2128
- package/api-services/modules/link/index.js +1812 -1744
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +2204 -2128
- package/api-services/modules/permission/index.js +1812 -1744
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +2110 -2046
- package/api-services/modules/platformManage/index.js +1728 -1678
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +2315 -2227
- package/api-services/modules/portal/index.js +1924 -1838
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +2095 -2031
- package/api-services/modules/space-manage/index.js +1723 -1673
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +2212 -2136
- package/api-services/modules/super-admin/index.js +1815 -1747
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +2300 -2236
- package/api-services/modules/supplier/index.js +1900 -1850
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +2204 -2128
- package/api-services/modules/supplychain-manage/index.js +1812 -1744
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +2309 -2242
- package/api-services/modules/systemConfiguration/index.js +1910 -1856
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +2296 -2232
- package/api-services/modules/tool/index.js +1900 -1850
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +2202 -2128
- package/api-services/src/create-service/index.js +1808 -1744
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +4429 -123
- package/common-info/getPermissionMethod/es5.js +4282 -0
- package/common-info/getPermissionMethod/index.d.ts +26 -0
- package/common-info/getPermissionMethod/index.js +3396 -0
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.d.ts +2 -0
- package/common-info/index.js +3480 -61
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.js +1073 -997
- package/common-info/set-personal-info/index.js +895 -827
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +0 -2
- package/common-tools/extract-file-name/es5.js +1074 -998
- package/common-tools/extract-file-name/index.js +889 -821
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +1 -1
- package/common-tools/update-browser-title/es5.js +1 -1
- package/common-tools/update-fav-icon/es5.js +1 -1
- package/create-api-service/check-token/es5.js +980 -904
- package/create-api-service/check-token/index.js +795 -727
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +2313 -2225
- package/create-api-service/index.js +1922 -1836
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/es5.js +1242 -1166
- package/create-api-service/sso/index.js +1006 -938
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +1442 -1366
- package/curring-http/index.js +1132 -1064
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/es5.js +70 -44
- package/directive/auth/index.js +49 -32
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/es5.js +1 -1
- package/directive/hoverInside/es5.js +1 -1
- package/directive/utils/es5.js +1 -1
- package/esm-map.json +6 -1
- package/hooks/use-get-auth/apis.d.ts +4 -1
- package/hooks/use-get-auth/es5.js +192 -62
- package/hooks/use-get-auth/index.d.ts +7 -2
- package/hooks/use-get-auth/index.js +50 -19
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/package.json +3 -3
- package/pinyin-first-character/es5.js +47 -45
- package/pinyin-first-character/index.js +37 -35
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/es5.js +11 -11
- package/style/index.js +10 -10
- package/style/index.js.gz +0 -0
|
@@ -1,22 +1,53 @@
|
|
|
1
|
-
import { flatTree as
|
|
2
|
-
import { projectNextTick as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
await
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { flatTree as w } from "@das-fed/upf-utils/common-tools";
|
|
2
|
+
import { projectNextTick as A } from "@das-fed/upf-utils/nextTiken";
|
|
3
|
+
import { vAuth as M } from "@das-fed/upf-utils/directive/auth";
|
|
4
|
+
import { portal as T, superadminPortal as y, enterpriseright as U } from "@das-fed/upf-utils/api-services/modules";
|
|
5
|
+
const B = T.get("/appcategory"), C = y.get("/appcategory"), L = U.get("/permissionset/user-portal-menu"), P = y.get("/user-menu"), v = () => {
|
|
6
|
+
const d = async (r, i = "enterpriseadmin") => {
|
|
7
|
+
let t = null, s = {};
|
|
8
|
+
await A(), i === "superadmin" ? t = C().run : (s = { userType: 1 }, t = B().run);
|
|
9
|
+
const [u, l] = await t(s);
|
|
10
|
+
if (u || !l || !l.length) return null;
|
|
11
|
+
const f = l.map((p) => p.apps).flat();
|
|
12
|
+
return r ? f.find((p) => p.code === r) : f;
|
|
13
|
+
}, g = async (r, i, t, s = "enterpriseadmin") => {
|
|
14
|
+
var c;
|
|
15
|
+
await A();
|
|
16
|
+
let u = null, l = {
|
|
17
|
+
code: r,
|
|
18
|
+
showBtn: !0
|
|
19
|
+
};
|
|
20
|
+
s === "superadmin" ? u = P().run : (l.userType = 1, u = L().run);
|
|
21
|
+
const [f, e] = await u(l);
|
|
22
|
+
if (f || !e || !e.length)
|
|
23
|
+
return i || t ? void 0 : [];
|
|
24
|
+
if (!i && !t) return e;
|
|
25
|
+
const p = e != null && e.length ? e.filter((n) => n.routeUrl) : [], m = e != null && e.length ? e.filter((n) => !n.routeUrl && n.children).map((n) => n.children).flat() : [], o = [...p, ...m];
|
|
16
26
|
let a;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
27
|
+
if (i)
|
|
28
|
+
a = o.find((n) => n.code === i || n.originalCode === i);
|
|
29
|
+
else if (t) {
|
|
30
|
+
const n = t.replace(((c = o[0]) == null ? void 0 : c.applicationPath) ?? "", "").replace(/\/\//g, "/");
|
|
31
|
+
a = o.find((h) => h.routeUrl && h.routeUrl === n);
|
|
32
|
+
}
|
|
33
|
+
return a;
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
getApplication: d,
|
|
37
|
+
getMenu: g,
|
|
38
|
+
getAuth: async (r, i = "enterpriseadmin") => {
|
|
39
|
+
var o;
|
|
40
|
+
const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "", u = (r == null ? void 0 : r.code) ?? "";
|
|
41
|
+
if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return M(null, { applicationCode: t, menuCode: s, code: u });
|
|
42
|
+
if (!await d(t, i)) return !1;
|
|
43
|
+
const e = await g(t, s, i);
|
|
44
|
+
return !e || !(e != null && e.children) || !((o = e.children) != null && o.length) ? !1 : !!w(e.children).find((a) => {
|
|
45
|
+
let c = (a == null ? void 0 : a.originalCode) ?? a.code;
|
|
46
|
+
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c === u;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
};
|
|
20
51
|
export {
|
|
21
|
-
|
|
52
|
+
v as useGetAuth
|
|
22
53
|
};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/upf-utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.227",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/preset-env": "7.26.0",
|
|
24
|
-
"@das-fed/upf-cli": "6.4.0-dev.
|
|
25
|
-
"@das-fed/upf-web": "6.4.0-dev.
|
|
24
|
+
"@das-fed/upf-cli": "6.4.0-dev.227",
|
|
25
|
+
"@das-fed/upf-web": "6.4.0-dev.227",
|
|
26
26
|
"@rollup/plugin-babel": "6.0.4",
|
|
27
27
|
"@types/js-cookie": "^3.0.6",
|
|
28
28
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -4099,7 +4099,7 @@ var Z = nn(),
|
|
|
4099
4099
|
un = Object.keys(O);
|
|
4100
4100
|
function sn(n, i, g) {
|
|
4101
4101
|
if (un.indexOf(n) === -1) return e(n);
|
|
4102
|
-
if (i === g && i && e(i) !== i) return
|
|
4102
|
+
if (i === g && i && e(i) !== i) return q(e(n));
|
|
4103
4103
|
if (g && !hn[n].includes(g)) {
|
|
4104
4104
|
var h = e(g);
|
|
4105
4105
|
if (h !== g) {
|
|
@@ -8734,7 +8734,7 @@ var a = {
|
|
|
8734
8734
|
dict: Symbol("dict4")
|
|
8735
8735
|
};
|
|
8736
8736
|
}),
|
|
8737
|
-
|
|
8737
|
+
v = {
|
|
8738
8738
|
巴尔干半岛: "bā ěr gàn bàn dǎo",
|
|
8739
8739
|
巴尔喀什湖: "bā ěr kā shí hú",
|
|
8740
8740
|
不幸而言中: "bú xìng ér yán zhòng",
|
|
@@ -8751,17 +8751,17 @@ var a = {
|
|
|
8751
8751
|
眼不见为净: "yǎn bú jiàn wéi jìng",
|
|
8752
8752
|
竹筒倒豆子: "zhú tǒng dào dòu zi"
|
|
8753
8753
|
},
|
|
8754
|
-
jn = Object.keys(
|
|
8754
|
+
jn = Object.keys(v).map(function (n) {
|
|
8755
8755
|
return {
|
|
8756
8756
|
zh: n,
|
|
8757
|
-
pinyin:
|
|
8757
|
+
pinyin: v[n],
|
|
8758
8758
|
probability: 2e-8,
|
|
8759
8759
|
length: 5,
|
|
8760
8760
|
priority: j.Normal,
|
|
8761
8761
|
dict: Symbol("dict5")
|
|
8762
8762
|
};
|
|
8763
8763
|
});
|
|
8764
|
-
function
|
|
8764
|
+
function _(n, i) {
|
|
8765
8765
|
return n && (n.decimal < i.decimal || n.decimal === i.decimal && n.probability > i.probability) ? n : i;
|
|
8766
8766
|
}
|
|
8767
8767
|
function E(n) {
|
|
@@ -8788,14 +8788,14 @@ function xn(n, i) {
|
|
|
8788
8788
|
patterns: z.patterns,
|
|
8789
8789
|
concatPattern: u
|
|
8790
8790
|
};
|
|
8791
|
-
E(y), g[l] =
|
|
8791
|
+
E(y), g[l] = _(g[l], y), u = n[--h];
|
|
8792
8792
|
}
|
|
8793
8793
|
var o = {
|
|
8794
8794
|
probability: 1e-13 * z.probability,
|
|
8795
8795
|
decimal: 0,
|
|
8796
8796
|
patterns: z.patterns
|
|
8797
8797
|
};
|
|
8798
|
-
E(o), g[s] =
|
|
8798
|
+
E(o), g[s] = _(g[s], o), g[s].concatPattern && (g[s].patterns = g[s].patterns.concat(g[s].concatPattern), g[s].concatPattern = undefined, delete g[s + 1]);
|
|
8799
8799
|
}
|
|
8800
8800
|
return g[0].patterns.reverse();
|
|
8801
8801
|
}
|
|
@@ -8854,12 +8854,12 @@ var $ = /*#__PURE__*/_createClass(function $(i) {
|
|
|
8854
8854
|
_classCallCheck(this, $);
|
|
8855
8855
|
this.children = /* @__PURE__ */new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = h;
|
|
8856
8856
|
});
|
|
8857
|
-
var
|
|
8858
|
-
function
|
|
8859
|
-
_classCallCheck(this,
|
|
8857
|
+
var fn = /*#__PURE__*/function () {
|
|
8858
|
+
function fn() {
|
|
8859
|
+
_classCallCheck(this, fn);
|
|
8860
8860
|
this.dictMap = /* @__PURE__ */new Map(), this.queues = [], this.root = new $(null);
|
|
8861
8861
|
}
|
|
8862
|
-
return _createClass(
|
|
8862
|
+
return _createClass(fn, [{
|
|
8863
8863
|
key: "build",
|
|
8864
8864
|
value: function build(i) {
|
|
8865
8865
|
this.buildTrie(i), this.buildFailPointer();
|
|
@@ -8984,9 +8984,9 @@ var qn = /*#__PURE__*/function () {
|
|
|
8984
8984
|
}
|
|
8985
8985
|
}]);
|
|
8986
8986
|
}();
|
|
8987
|
-
var
|
|
8988
|
-
U = new
|
|
8989
|
-
U.build(
|
|
8987
|
+
var qn = [].concat(_toConsumableArray(jn), _toConsumableArray(tn), _toConsumableArray(cn), _toConsumableArray(ln), _toConsumableArray(gn), _toConsumableArray(yn)),
|
|
8988
|
+
U = new fn();
|
|
8989
|
+
U.build(qn);
|
|
8990
8990
|
var mn = new F(),
|
|
8991
8991
|
pn = function pn() {
|
|
8992
8992
|
return mn;
|
|
@@ -9019,9 +9019,9 @@ var mn = new F(),
|
|
|
9019
9019
|
var _b = w(l.zh);
|
|
9020
9020
|
i[o + _t] = {
|
|
9021
9021
|
origin: _b[_t],
|
|
9022
|
-
result: y[c],
|
|
9022
|
+
result: y[c] || "",
|
|
9023
9023
|
isZh: true,
|
|
9024
|
-
originPinyin: y[c]
|
|
9024
|
+
originPinyin: y[c] || ""
|
|
9025
9025
|
}, c++;
|
|
9026
9026
|
}
|
|
9027
9027
|
o += l.length, s++;
|
|
@@ -9041,7 +9041,7 @@ var mn = new F(),
|
|
|
9041
9041
|
matches: u
|
|
9042
9042
|
};
|
|
9043
9043
|
},
|
|
9044
|
-
|
|
9044
|
+
q = function q(n) {
|
|
9045
9045
|
return n.replace(/(ā|á|ǎ|à)/g, "a").replace(/(ō|ó|ǒ|ò)/g, "o").replace(/(ē|é|ě|è)/g, "e").replace(/(ī|í|ǐ|ì)/g, "i").replace(/(ū|ú|ǔ|ù)/g, "u").replace(/(ǖ|ǘ|ǚ|ǜ)/g, "ü").replace(/(n̄|ń|ň|ǹ)/g, "n").replace(/(m̄|ḿ|m̌|m̀)/g, "m").replace(/(ê̄|ế|ê̌|ề)/g, "ê");
|
|
9046
9046
|
},
|
|
9047
9047
|
W = function W(n) {
|
|
@@ -9073,20 +9073,20 @@ var mn = new F(),
|
|
|
9073
9073
|
originPinyin: n
|
|
9074
9074
|
}];
|
|
9075
9075
|
},
|
|
9076
|
-
|
|
9077
|
-
var
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
var _iterator3 = _createForOfIteratorHelper(
|
|
9076
|
+
f = function f(n, i) {
|
|
9077
|
+
var g = n.split(" "),
|
|
9078
|
+
h = [],
|
|
9079
|
+
u = [];
|
|
9080
|
+
var _iterator3 = _createForOfIteratorHelper(g),
|
|
9081
9081
|
_step3;
|
|
9082
9082
|
try {
|
|
9083
9083
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
9084
|
-
var
|
|
9084
|
+
var s = _step3.value;
|
|
9085
9085
|
for (var _i = 0, _G = G; _i < _G.length; _i++) {
|
|
9086
|
-
var
|
|
9087
|
-
if (
|
|
9088
|
-
var
|
|
9089
|
-
J.indexOf(
|
|
9086
|
+
var z = _G[_i];
|
|
9087
|
+
if (s.startsWith(z)) {
|
|
9088
|
+
var o = s.slice(z.length);
|
|
9089
|
+
J.indexOf(z) !== -1 && K.indexOf(o) !== -1 && (o = X[o]), h.push(z), u.push(o);
|
|
9090
9090
|
break;
|
|
9091
9091
|
}
|
|
9092
9092
|
}
|
|
@@ -9096,19 +9096,21 @@ var mn = new F(),
|
|
|
9096
9096
|
} finally {
|
|
9097
9097
|
_iterator3.f();
|
|
9098
9098
|
}
|
|
9099
|
-
return {
|
|
9100
|
-
"
|
|
9101
|
-
|
|
9099
|
+
return i === "standard" && h.forEach(function (s, z) {
|
|
9100
|
+
(s === "y" || s === "w") && (h[z] = "");
|
|
9101
|
+
}), {
|
|
9102
|
+
"final": u.join(" "),
|
|
9103
|
+
initial: h.join(" ")
|
|
9102
9104
|
// 声母
|
|
9103
9105
|
};
|
|
9104
9106
|
},
|
|
9105
9107
|
r = function r(n) {
|
|
9106
|
-
var
|
|
9107
|
-
i =
|
|
9108
|
+
var _f = f(n),
|
|
9109
|
+
i = _f["final"];
|
|
9108
9110
|
var g = "",
|
|
9109
9111
|
h = "",
|
|
9110
9112
|
u = "";
|
|
9111
|
-
return Y.indexOf(
|
|
9113
|
+
return Y.indexOf(q(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), {
|
|
9112
9114
|
head: g,
|
|
9113
9115
|
body: h,
|
|
9114
9116
|
tail: u
|
|
@@ -9127,7 +9129,7 @@ var mn = new F(),
|
|
|
9127
9129
|
}), o.join(" ");
|
|
9128
9130
|
},
|
|
9129
9131
|
Pn = function Pn(n, i) {
|
|
9130
|
-
var g =
|
|
9132
|
+
var g = q(n).split(" "),
|
|
9131
9133
|
h = m(i).split(" "),
|
|
9132
9134
|
u = [];
|
|
9133
9135
|
return g.forEach(function (s, z) {
|
|
@@ -9176,12 +9178,12 @@ var Dn = function Dn(n, i) {
|
|
|
9176
9178
|
break;
|
|
9177
9179
|
case "initial":
|
|
9178
9180
|
n.forEach(function (g) {
|
|
9179
|
-
g.result = g.isZh ?
|
|
9181
|
+
g.result = g.isZh ? f(g.result, i.initialPattern).initial : "";
|
|
9180
9182
|
});
|
|
9181
9183
|
break;
|
|
9182
9184
|
case "final":
|
|
9183
9185
|
n.forEach(function (g) {
|
|
9184
|
-
g.result = g.isZh ?
|
|
9186
|
+
g.result = g.isZh ? f(g.result, i.initialPattern)["final"] : "";
|
|
9185
9187
|
});
|
|
9186
9188
|
break;
|
|
9187
9189
|
case "first":
|
|
@@ -9212,7 +9214,7 @@ var Dn = function Dn(n, i) {
|
|
|
9212
9214
|
break;
|
|
9213
9215
|
case "none":
|
|
9214
9216
|
n.forEach(function (g) {
|
|
9215
|
-
g.isZh && (g.result =
|
|
9217
|
+
g.isZh && (g.result = q(g.result));
|
|
9216
9218
|
});
|
|
9217
9219
|
break;
|
|
9218
9220
|
case "num":
|
|
@@ -9226,7 +9228,7 @@ var Dn = function Dn(n, i) {
|
|
|
9226
9228
|
},
|
|
9227
9229
|
Cn = function Cn(n, i) {
|
|
9228
9230
|
i.v && n.forEach(function (g) {
|
|
9229
|
-
g.isZh && (g.result = g.result.replace(/ü/g, "v"));
|
|
9231
|
+
g.isZh && (g.result = g.result.replace(/ü/g, typeof i.v == "string" ? i.v : "v"));
|
|
9230
9232
|
});
|
|
9231
9233
|
},
|
|
9232
9234
|
Mn = function Mn(n, i, g) {
|
|
@@ -9241,9 +9243,9 @@ var Dn = function Dn(n, i) {
|
|
|
9241
9243
|
return h.result;
|
|
9242
9244
|
}) : i.type === "all" ? n.map(function (h) {
|
|
9243
9245
|
var u = h.isZh ? h.result : "",
|
|
9244
|
-
|
|
9245
|
-
s =
|
|
9246
|
-
z =
|
|
9246
|
+
_f2 = f(u, i.initialPattern),
|
|
9247
|
+
s = _f2.initial,
|
|
9248
|
+
z = _f2["final"],
|
|
9247
9249
|
_r = r(u),
|
|
9248
9250
|
o = _r.head,
|
|
9249
9251
|
l = _r.body,
|
|
@@ -9288,7 +9290,7 @@ var Dn = function Dn(n, i) {
|
|
|
9288
9290
|
toneSandhi: true,
|
|
9289
9291
|
segmentit: 2
|
|
9290
9292
|
};
|
|
9291
|
-
function
|
|
9293
|
+
function vn(n, i) {
|
|
9292
9294
|
if (i = Object.assign(Object.assign({}, Nn), i || {}), !Sn(n)) return n;
|
|
9293
9295
|
if (n === "") return i.type === "array" || i.type === "all" ? [] : "";
|
|
9294
9296
|
i.surname === undefined && (i.mode === "surname" ? i.surname = "all" : i.surname = "off"), i.type === "all" && (i.pattern = "pinyin"), i.pattern === "num" && (i.toneType = "none"), i.removeNonZh && (i.nonZh = "removed");
|
|
@@ -9302,12 +9304,12 @@ var k;
|
|
|
9302
9304
|
n[n.AllSegment = 1] = "AllSegment", n[n.AllArray = 2] = "AllArray", n[n.AllString = 3] = "AllString", n[n.PinyinSegment = 4] = "PinyinSegment", n[n.PinyinArray = 5] = "PinyinArray", n[n.PinyinString = 6] = "PinyinString", n[n.ZhSegment = 7] = "ZhSegment", n[n.ZhArray = 8] = "ZhArray", n[n.ZhString = 9] = "ZhString";
|
|
9303
9305
|
})(k || (k = {}));
|
|
9304
9306
|
k.AllSegment;
|
|
9305
|
-
var
|
|
9306
|
-
return
|
|
9307
|
+
var _n = function _n(n) {
|
|
9308
|
+
return vn(n, {
|
|
9307
9309
|
pattern: "first",
|
|
9308
9310
|
toneType: "none",
|
|
9309
9311
|
type: "string",
|
|
9310
9312
|
separator: ""
|
|
9311
9313
|
});
|
|
9312
9314
|
};
|
|
9313
|
-
exports.getPinyinFirstCharacter =
|
|
9315
|
+
exports.getPinyinFirstCharacter = _n;
|
|
@@ -18869,7 +18869,7 @@ function sn(n, i, g) {
|
|
|
18869
18869
|
if (un.indexOf(n) === -1)
|
|
18870
18870
|
return e(n);
|
|
18871
18871
|
if (i === g && i && e(i) !== i)
|
|
18872
|
-
return
|
|
18872
|
+
return q(e(n));
|
|
18873
18873
|
if (g && !hn[n].includes(g)) {
|
|
18874
18874
|
const h = e(g);
|
|
18875
18875
|
if (h !== g) {
|
|
@@ -23491,7 +23491,7 @@ const a = {
|
|
|
23491
23491
|
length: 4,
|
|
23492
23492
|
priority: j.Normal,
|
|
23493
23493
|
dict: Symbol("dict4")
|
|
23494
|
-
})),
|
|
23494
|
+
})), v = {
|
|
23495
23495
|
巴尔干半岛: "bā ěr gàn bàn dǎo",
|
|
23496
23496
|
巴尔喀什湖: "bā ěr kā shí hú",
|
|
23497
23497
|
不幸而言中: "bú xìng ér yán zhòng",
|
|
@@ -23507,15 +23507,15 @@ const a = {
|
|
|
23507
23507
|
亚得里亚海: "yà dé lǐ yà hǎi",
|
|
23508
23508
|
眼不见为净: "yǎn bú jiàn wéi jìng",
|
|
23509
23509
|
竹筒倒豆子: "zhú tǒng dào dòu zi"
|
|
23510
|
-
}, jn = Object.keys(
|
|
23510
|
+
}, jn = Object.keys(v).map((n) => ({
|
|
23511
23511
|
zh: n,
|
|
23512
|
-
pinyin:
|
|
23512
|
+
pinyin: v[n],
|
|
23513
23513
|
probability: 2e-8,
|
|
23514
23514
|
length: 5,
|
|
23515
23515
|
priority: j.Normal,
|
|
23516
23516
|
dict: Symbol("dict5")
|
|
23517
23517
|
}));
|
|
23518
|
-
function
|
|
23518
|
+
function _(n, i) {
|
|
23519
23519
|
return n && (n.decimal < i.decimal || n.decimal === i.decimal && n.probability > i.probability) ? n : i;
|
|
23520
23520
|
}
|
|
23521
23521
|
function E(n) {
|
|
@@ -23536,14 +23536,14 @@ function xn(n, i) {
|
|
|
23536
23536
|
patterns: z.patterns,
|
|
23537
23537
|
concatPattern: u
|
|
23538
23538
|
};
|
|
23539
|
-
E(y), g[l] =
|
|
23539
|
+
E(y), g[l] = _(g[l], y), u = n[--h];
|
|
23540
23540
|
}
|
|
23541
23541
|
const o = {
|
|
23542
23542
|
probability: 1e-13 * z.probability,
|
|
23543
23543
|
decimal: 0,
|
|
23544
23544
|
patterns: z.patterns
|
|
23545
23545
|
};
|
|
23546
|
-
E(o), g[s] =
|
|
23546
|
+
E(o), g[s] = _(g[s], o), g[s].concatPattern && (g[s].patterns = g[s].patterns.concat(g[s].concatPattern), g[s].concatPattern = void 0, delete g[s + 1]);
|
|
23547
23547
|
}
|
|
23548
23548
|
return g[0].patterns.reverse();
|
|
23549
23549
|
}
|
|
@@ -23597,7 +23597,7 @@ class $ {
|
|
|
23597
23597
|
this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = h;
|
|
23598
23598
|
}
|
|
23599
23599
|
}
|
|
23600
|
-
class
|
|
23600
|
+
class fn {
|
|
23601
23601
|
constructor() {
|
|
23602
23602
|
this.dictMap = /* @__PURE__ */ new Map(), this.queues = [], this.root = new $(null);
|
|
23603
23603
|
}
|
|
@@ -23687,15 +23687,15 @@ class qn {
|
|
|
23687
23687
|
return h === 1 ? wn(u) : h === 3 ? en(u, d(i)) : xn(u, d(i));
|
|
23688
23688
|
}
|
|
23689
23689
|
}
|
|
23690
|
-
const
|
|
23690
|
+
const qn = [
|
|
23691
23691
|
...jn,
|
|
23692
23692
|
...tn,
|
|
23693
23693
|
...cn,
|
|
23694
23694
|
...ln,
|
|
23695
23695
|
...gn,
|
|
23696
23696
|
...yn
|
|
23697
|
-
], U = new
|
|
23698
|
-
U.build(
|
|
23697
|
+
], U = new fn();
|
|
23698
|
+
U.build(qn);
|
|
23699
23699
|
const mn = new F(), pn = () => mn, e = (n) => {
|
|
23700
23700
|
const i = x.get(n);
|
|
23701
23701
|
return i ? i.split(" ")[0] : n;
|
|
@@ -23723,9 +23723,9 @@ const mn = new F(), pn = () => mn, e = (n) => {
|
|
|
23723
23723
|
const b = w(l.zh);
|
|
23724
23724
|
i[o + t] = {
|
|
23725
23725
|
origin: b[t],
|
|
23726
|
-
result: y[c],
|
|
23726
|
+
result: y[c] || "",
|
|
23727
23727
|
isZh: !0,
|
|
23728
|
-
originPinyin: y[c]
|
|
23728
|
+
originPinyin: y[c] || ""
|
|
23729
23729
|
}, c++;
|
|
23730
23730
|
}
|
|
23731
23731
|
o += l.length, s++;
|
|
@@ -23741,7 +23741,7 @@ const mn = new F(), pn = () => mn, e = (n) => {
|
|
|
23741
23741
|
}
|
|
23742
23742
|
}
|
|
23743
23743
|
return { list: i, matches: u };
|
|
23744
|
-
},
|
|
23744
|
+
}, q = (n) => n.replace(/(ā|á|ǎ|à)/g, "a").replace(/(ō|ó|ǒ|ò)/g, "o").replace(/(ē|é|ě|è)/g, "e").replace(/(ī|í|ǐ|ì)/g, "i").replace(/(ū|ú|ǔ|ù)/g, "u").replace(/(ǖ|ǘ|ǚ|ǜ)/g, "ü").replace(/(n̄|ń|ň|ǹ)/g, "n").replace(/(m̄|ḿ|m̌|m̀)/g, "m").replace(/(ê̄|ế|ê̌|ề)/g, "ê"), W = (n, i = "off") => {
|
|
23745
23745
|
const g = pn();
|
|
23746
23746
|
let h = x.get(n) ? x.get(n).split(" ") : [];
|
|
23747
23747
|
if (g.get(n))
|
|
@@ -23766,31 +23766,33 @@ const mn = new F(), pn = () => mn, e = (n) => {
|
|
|
23766
23766
|
originPinyin: n
|
|
23767
23767
|
}
|
|
23768
23768
|
];
|
|
23769
|
-
},
|
|
23770
|
-
const
|
|
23771
|
-
for (let
|
|
23772
|
-
for (let
|
|
23773
|
-
if (
|
|
23774
|
-
let
|
|
23775
|
-
J.indexOf(
|
|
23769
|
+
}, f = (n, i) => {
|
|
23770
|
+
const g = n.split(" "), h = [], u = [];
|
|
23771
|
+
for (let s of g)
|
|
23772
|
+
for (let z of G)
|
|
23773
|
+
if (s.startsWith(z)) {
|
|
23774
|
+
let o = s.slice(z.length);
|
|
23775
|
+
J.indexOf(z) !== -1 && K.indexOf(o) !== -1 && (o = X[o]), h.push(z), u.push(o);
|
|
23776
23776
|
break;
|
|
23777
23777
|
}
|
|
23778
|
-
return {
|
|
23779
|
-
|
|
23780
|
-
|
|
23778
|
+
return i === "standard" && h.forEach((s, z) => {
|
|
23779
|
+
(s === "y" || s === "w") && (h[z] = "");
|
|
23780
|
+
}), {
|
|
23781
|
+
final: u.join(" "),
|
|
23782
|
+
initial: h.join(" ")
|
|
23781
23783
|
// 声母
|
|
23782
23784
|
};
|
|
23783
23785
|
}, r = (n) => {
|
|
23784
|
-
const { final: i } =
|
|
23786
|
+
const { final: i } = f(n);
|
|
23785
23787
|
let g = "", h = "", u = "";
|
|
23786
|
-
return Y.indexOf(
|
|
23788
|
+
return Y.indexOf(q(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), { head: g, body: h, tail: u };
|
|
23787
23789
|
}, m = (n) => {
|
|
23788
23790
|
const i = /(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/, g = /(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/, h = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/, u = /(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/, s = /(a|o|e|i|u|ü|ê)/, z = /(n|m)$/, o = [];
|
|
23789
23791
|
return n.split(" ").forEach((y) => {
|
|
23790
23792
|
i.test(y) ? o.push("1") : g.test(y) ? o.push("2") : h.test(y) ? o.push("3") : u.test(y) ? o.push("4") : s.test(y) || z.test(y) ? o.push("0") : o.push("");
|
|
23791
23793
|
}), o.join(" ");
|
|
23792
23794
|
}, Pn = (n, i) => {
|
|
23793
|
-
const g =
|
|
23795
|
+
const g = q(n).split(" "), h = m(i).split(" "), u = [];
|
|
23794
23796
|
return g.forEach((s, z) => {
|
|
23795
23797
|
u.push(`${s}${h[z]}`);
|
|
23796
23798
|
}), u.join(" ");
|
|
@@ -23826,12 +23828,12 @@ const Dn = (n, i) => {
|
|
|
23826
23828
|
break;
|
|
23827
23829
|
case "initial":
|
|
23828
23830
|
n.forEach((g) => {
|
|
23829
|
-
g.result = g.isZh ?
|
|
23831
|
+
g.result = g.isZh ? f(g.result, i.initialPattern).initial : "";
|
|
23830
23832
|
});
|
|
23831
23833
|
break;
|
|
23832
23834
|
case "final":
|
|
23833
23835
|
n.forEach((g) => {
|
|
23834
|
-
g.result = g.isZh ?
|
|
23836
|
+
g.result = g.isZh ? f(g.result, i.initialPattern).final : "";
|
|
23835
23837
|
});
|
|
23836
23838
|
break;
|
|
23837
23839
|
case "first":
|
|
@@ -23861,7 +23863,7 @@ const Dn = (n, i) => {
|
|
|
23861
23863
|
break;
|
|
23862
23864
|
case "none":
|
|
23863
23865
|
n.forEach((g) => {
|
|
23864
|
-
g.isZh && (g.result =
|
|
23866
|
+
g.isZh && (g.result = q(g.result));
|
|
23865
23867
|
});
|
|
23866
23868
|
break;
|
|
23867
23869
|
case "num": {
|
|
@@ -23873,7 +23875,7 @@ const Dn = (n, i) => {
|
|
|
23873
23875
|
}
|
|
23874
23876
|
}, Cn = (n, i) => {
|
|
23875
23877
|
i.v && n.forEach((g) => {
|
|
23876
|
-
g.isZh && (g.result = g.result.replace(/ü/g, "v"));
|
|
23878
|
+
g.isZh && (g.result = g.result.replace(/ü/g, typeof i.v == "string" ? i.v : "v"));
|
|
23877
23879
|
});
|
|
23878
23880
|
}, Mn = (n, i, g) => {
|
|
23879
23881
|
if (i.multiple && d(g) === 1) {
|
|
@@ -23884,7 +23886,7 @@ const Dn = (n, i) => {
|
|
|
23884
23886
|
});
|
|
23885
23887
|
}
|
|
23886
23888
|
return i.type === "array" ? n.map((h) => h.result) : i.type === "all" ? n.map((h) => {
|
|
23887
|
-
const u = h.isZh ? h.result : "", { initial: s, final: z } =
|
|
23889
|
+
const u = h.isZh ? h.result : "", { initial: s, final: z } = f(u, i.initialPattern), { head: o, body: l, tail: y } = r(u);
|
|
23888
23890
|
let c = [];
|
|
23889
23891
|
return u !== "" && (c = [u].concat(W(h.origin, i.surname).filter((t) => t !== u))), {
|
|
23890
23892
|
origin: h.origin,
|
|
@@ -23917,7 +23919,7 @@ const Dn = (n, i) => {
|
|
|
23917
23919
|
toneSandhi: !0,
|
|
23918
23920
|
segmentit: 2
|
|
23919
23921
|
};
|
|
23920
|
-
function
|
|
23922
|
+
function vn(n, i) {
|
|
23921
23923
|
if (i = Object.assign(Object.assign({}, Nn), i || {}), !Sn(n))
|
|
23922
23924
|
return n;
|
|
23923
23925
|
if (n === "")
|
|
@@ -23931,12 +23933,12 @@ var k;
|
|
|
23931
23933
|
n[n.AllSegment = 1] = "AllSegment", n[n.AllArray = 2] = "AllArray", n[n.AllString = 3] = "AllString", n[n.PinyinSegment = 4] = "PinyinSegment", n[n.PinyinArray = 5] = "PinyinArray", n[n.PinyinString = 6] = "PinyinString", n[n.ZhSegment = 7] = "ZhSegment", n[n.ZhArray = 8] = "ZhArray", n[n.ZhString = 9] = "ZhString";
|
|
23932
23934
|
})(k || (k = {}));
|
|
23933
23935
|
k.AllSegment;
|
|
23934
|
-
const
|
|
23936
|
+
const _n = (n) => vn(n, {
|
|
23935
23937
|
pattern: "first",
|
|
23936
23938
|
toneType: "none",
|
|
23937
23939
|
type: "string",
|
|
23938
23940
|
separator: ""
|
|
23939
23941
|
});
|
|
23940
23942
|
export {
|
|
23941
|
-
|
|
23943
|
+
_n as getPinyinFirstCharacter
|
|
23942
23944
|
};
|
|
Binary file
|
package/style/es5.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @vue/shared v3.5.
|
|
4
|
+
* @vue/shared v3.5.25
|
|
5
5
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
6
6
|
* @license MIT
|
|
7
7
|
**/
|
|
@@ -20,10 +20,10 @@ var u = function u(t) {
|
|
|
20
20
|
return e[r] || (e[r] = t(r));
|
|
21
21
|
};
|
|
22
22
|
},
|
|
23
|
-
m =
|
|
23
|
+
m = /-\w/g,
|
|
24
24
|
p = u(function (t) {
|
|
25
|
-
return t.replace(m, function (e
|
|
26
|
-
return
|
|
25
|
+
return t.replace(m, function (e) {
|
|
26
|
+
return e.slice(1).toUpperCase();
|
|
27
27
|
});
|
|
28
28
|
}),
|
|
29
29
|
a = function a() {
|
|
@@ -108,24 +108,24 @@ var u = function u(t) {
|
|
|
108
108
|
l = function l(t) {
|
|
109
109
|
return Number(t.toString().replace("px", ""));
|
|
110
110
|
},
|
|
111
|
-
|
|
111
|
+
c = function c(t, e, r) {
|
|
112
112
|
e = l(e), r = l(r);
|
|
113
113
|
var n;
|
|
114
114
|
return t === "add" && (n = e + r), t === "subtract" && (n = e - r), t === "multiply" && (n = e * r), t === "divide" && (n = e / r), e = null, r = null, n;
|
|
115
115
|
},
|
|
116
|
-
|
|
116
|
+
_o = function o(t) {
|
|
117
117
|
return {
|
|
118
118
|
add: function add(e) {
|
|
119
|
-
return
|
|
119
|
+
return _o(c("add", t, e));
|
|
120
120
|
},
|
|
121
121
|
subtract: function subtract(e) {
|
|
122
|
-
return
|
|
122
|
+
return _o(c("subtract", t, e));
|
|
123
123
|
},
|
|
124
124
|
multiply: function multiply(e) {
|
|
125
|
-
return
|
|
125
|
+
return _o(c("multiply", t, e));
|
|
126
126
|
},
|
|
127
127
|
divide: function divide(e) {
|
|
128
|
-
return
|
|
128
|
+
return _o(c("divide", t, e));
|
|
129
129
|
},
|
|
130
130
|
res: function res() {
|
|
131
131
|
var e = t + "px";
|
|
@@ -135,7 +135,7 @@ var u = function u(t) {
|
|
|
135
135
|
};
|
|
136
136
|
exports.addClass = y;
|
|
137
137
|
exports.createStyle = E;
|
|
138
|
-
exports.curringMath =
|
|
138
|
+
exports.curringMath = _o;
|
|
139
139
|
exports.getCSS = d;
|
|
140
140
|
exports.getStyle = N;
|
|
141
141
|
exports.hasClass = h;
|
package/style/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/shared v3.5.
|
|
2
|
+
* @vue/shared v3.5.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -8,8 +8,8 @@ process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
|
8
8
|
const u = (t) => {
|
|
9
9
|
const e = /* @__PURE__ */ Object.create(null);
|
|
10
10
|
return (r) => e[r] || (e[r] = t(r));
|
|
11
|
-
}, m =
|
|
12
|
-
(t) => t.replace(m, (e
|
|
11
|
+
}, m = /-\w/g, p = u(
|
|
12
|
+
(t) => t.replace(m, (e) => e.slice(1).toUpperCase())
|
|
13
13
|
), a = (t = "") => t.split(" ").filter((e) => !!e.trim()), h = (t, e) => {
|
|
14
14
|
if (!t || !e) return !1;
|
|
15
15
|
if (e.includes(" ")) throw new Error("className should not contain space.");
|
|
@@ -46,15 +46,15 @@ const u = (t) => {
|
|
|
46
46
|
for (const n of e)
|
|
47
47
|
r.appendChild(document.createTextNode(`${n.className}{${d(n.style)}}`));
|
|
48
48
|
}
|
|
49
|
-
}, l = (t) => Number(t.toString().replace("px", "")),
|
|
49
|
+
}, l = (t) => Number(t.toString().replace("px", "")), c = (t, e, r) => {
|
|
50
50
|
e = l(e), r = l(r);
|
|
51
51
|
let n;
|
|
52
52
|
return t === "add" && (n = e + r), t === "subtract" && (n = e - r), t === "multiply" && (n = e * r), t === "divide" && (n = e / r), e = null, r = null, n;
|
|
53
|
-
},
|
|
54
|
-
add: (e) => c(
|
|
55
|
-
subtract: (e) => c(
|
|
56
|
-
multiply: (e) => c(
|
|
57
|
-
divide: (e) => c(
|
|
53
|
+
}, o = (t) => ({
|
|
54
|
+
add: (e) => o(c("add", t, e)),
|
|
55
|
+
subtract: (e) => o(c("subtract", t, e)),
|
|
56
|
+
multiply: (e) => o(c("multiply", t, e)),
|
|
57
|
+
divide: (e) => o(c("divide", t, e)),
|
|
58
58
|
res: () => {
|
|
59
59
|
const e = t + "px";
|
|
60
60
|
return t = null, e;
|
|
@@ -63,7 +63,7 @@ const u = (t) => {
|
|
|
63
63
|
export {
|
|
64
64
|
y as addClass,
|
|
65
65
|
E as createStyle,
|
|
66
|
-
|
|
66
|
+
o as curringMath,
|
|
67
67
|
d as getCSS,
|
|
68
68
|
N as getStyle,
|
|
69
69
|
h as hasClass,
|
package/style/index.js.gz
CHANGED
|
Binary file
|