@das-fed/utils 6.3.0-beta.1 → 6.3.0-beta.11

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.
Files changed (169) hide show
  1. package/__VLS_types.d.ts +124 -0
  2. package/api-services/modules/{file.d.ts → file/index.d.ts} +4 -4
  3. package/api-services/modules/{file.js → file/index.js} +18 -36
  4. package/api-services/modules/file/index.js.gz +0 -0
  5. package/api-services/modules/index.js.gz +0 -0
  6. package/atob/index.d.ts +2 -2
  7. package/common-info/{getIframeUrl.js → getIframeUrl/index.js} +1 -2
  8. package/common-info/getInfoFromUrl/index.js +84 -0
  9. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  10. package/common-info/index.d.ts +1 -1
  11. package/common-info/index.js +2 -4
  12. package/common-info/index.js.gz +0 -0
  13. package/common-info/{set-personal-info.d.ts → set-personal-info/index.d.ts} +1 -1
  14. package/common-info/{set-personal-info.js → set-personal-info/index.js} +595 -583
  15. package/common-info/set-personal-info/index.js.gz +0 -0
  16. package/common-info/type.d.ts +104 -0
  17. package/common-tools/{arr-tools.d.ts → arr-tools/index.d.ts} +1 -1
  18. package/common-tools/{get-url-params.d.ts → get-url-params/index.d.ts} +2 -2
  19. package/common-tools/get-url-params/index.js +63 -0
  20. package/common-tools/get-url-params/index.js.gz +0 -0
  21. package/common-tools/{nest-tree-format.d.ts → nest-tree-format/index.d.ts} +1 -1
  22. package/common-tools/{nest-tree-format.js → nest-tree-format/index.js} +2 -4
  23. package/common-tools/obj-tools/index.js +14 -0
  24. package/common-tools/{platform-tools.js → platform-tools/index.js} +1 -2
  25. package/common-tools/{queue-promise.d.ts → queue-promise/index.d.ts} +1 -1
  26. package/common-tools/setHtmlMinWH/index.d.ts +5 -0
  27. package/common-tools/update-fav-icon/index.d.ts +11 -0
  28. package/common-tools/update-fav-icon/index.js +21 -0
  29. package/create-api-service/index.js +1408 -1414
  30. package/create-api-service/index.js.gz +0 -0
  31. package/create-api-service/{sso.d.ts → sso/index.d.ts} +5 -5
  32. package/create-api-service/{sso.js → sso/index.js} +747 -745
  33. package/create-api-service/sso/index.js.gz +0 -0
  34. package/curring-http/index.js +1658 -4815
  35. package/curring-http/index.js.gz +0 -0
  36. package/curring-http/type.d.ts +89 -0
  37. package/directive/{auth.js → auth/index.js} +2 -4
  38. package/directive/auth/index.js.gz +0 -0
  39. package/dom-check-in/index.js +5 -5
  40. package/dom-watcher/index.d.ts +1 -1
  41. package/esm-map.json +8 -0
  42. package/hooks/use-get-auth/index.d.ts +3 -3
  43. package/hooks/use-get-auth/index.js +4 -8
  44. package/hooks/use-get-auth/index.js.gz +0 -0
  45. package/load-js/index.d.ts +1 -1
  46. package/load-js/index.js +1 -2
  47. package/nextTiken/index.js +5 -10
  48. package/nextTiken/index.js.gz +0 -0
  49. package/oss/index.d.ts +1 -1
  50. package/oss/index.js +1 -2
  51. package/package.json +10 -3
  52. package/pinyin-first-character/index.js +151 -146
  53. package/pinyin-first-character/index.js.gz +0 -0
  54. package/style/index.js +5 -9
  55. package/style/index.js.gz +0 -0
  56. package/style/style.d.ts +3 -3
  57. package/token-tools/index.d.ts +1 -1
  58. package/token-tools/index.js.gz +0 -0
  59. package/use-low-code/index.js +1 -2
  60. package/use-low-code/index.js.gz +0 -0
  61. package/vue/hooks/{use-model-value.d.ts → use-model-value/index.d.ts} +2 -0
  62. package/webSocket-service/index.js +41 -52
  63. package/webSocket-service/index.js.gz +0 -0
  64. package/webSocket-service/type.d.ts +28 -0
  65. package/with-install/index.d.ts +1 -1
  66. package/common-info/getInfoFromUrl.js +0 -85
  67. package/common-tools/get-url-params.js +0 -62
  68. package/common-tools/obj-tools.js +0 -20
  69. package/common-tools/setHtmlMinWH.d.ts +0 -5
  70. package/common-tools/update-fav-icon.d.ts +0 -10
  71. package/common-tools/update-fav-icon.js +0 -22
  72. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +0 -29
  73. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +0 -19925
  74. package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +0 -54
  75. package/dimple-canvas/use-dimple-canvas/core/konva/index.js +0 -119
  76. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.d.ts +0 -101
  77. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.js +0 -17
  78. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +0 -8
  79. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js +0 -55
  80. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.d.ts +0 -5
  81. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.js +0 -14
  82. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +0 -5
  83. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.js +0 -5
  84. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +0 -5
  85. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js +0 -181
  86. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +0 -4
  87. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +0 -7402
  88. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.d.ts +0 -6
  89. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.js +0 -13
  90. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +0 -4
  91. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.js +0 -7
  92. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.d.ts +0 -8
  93. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js +0 -193
  94. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +0 -11
  95. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.js +0 -20
  96. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +0 -5
  97. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js +0 -52
  98. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.d.ts +0 -2
  99. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.js +0 -14
  100. package/dimple-canvas/use-dimple-canvas/index.d.ts +0 -9
  101. package/dimple-canvas/use-dimple-canvas/index.js +0 -10
  102. package/hooks/use-get-auth/apis.js +0 -8
  103. package/style/math.js +0 -17
  104. package/style/style.js +0 -61
  105. /package/api-services/modules/{app-manage.d.ts → app-manage/index.d.ts} +0 -0
  106. /package/api-services/modules/{app-manage.js → app-manage/index.js} +0 -0
  107. /package/api-services/modules/{authentication.d.ts → authentication/index.d.ts} +0 -0
  108. /package/api-services/modules/{authentication.js → authentication/index.js} +0 -0
  109. /package/api-services/modules/{bems.d.ts → bems/index.d.ts} +0 -0
  110. /package/api-services/modules/{bems.js → bems/index.js} +0 -0
  111. /package/api-services/modules/{contract.d.ts → contract/index.d.ts} +0 -0
  112. /package/api-services/modules/{contract.js → contract/index.js} +0 -0
  113. /package/api-services/modules/{duty-manage.d.ts → duty-manage/index.d.ts} +0 -0
  114. /package/api-services/modules/{duty-manage.js → duty-manage/index.js} +0 -0
  115. /package/api-services/modules/{enterpriseright.d.ts → enterpriseright/index.d.ts} +0 -0
  116. /package/api-services/modules/{enterpriseright.js → enterpriseright/index.js} +0 -0
  117. /package/api-services/modules/{gateway-edge.d.ts → gateway-edge/index.d.ts} +0 -0
  118. /package/api-services/modules/{gateway-edge.js → gateway-edge/index.js} +0 -0
  119. /package/api-services/modules/{iot.d.ts → iot/index.d.ts} +0 -0
  120. /package/api-services/modules/{iot.js → iot/index.js} +0 -0
  121. /package/api-services/modules/{justauth.d.ts → justauth/index.d.ts} +0 -0
  122. /package/api-services/modules/{justauth.js → justauth/index.js} +0 -0
  123. /package/api-services/modules/{knowledge.d.ts → knowledge/index.d.ts} +0 -0
  124. /package/api-services/modules/{knowledge.js → knowledge/index.js} +0 -0
  125. /package/api-services/modules/{link.d.ts → link/index.d.ts} +0 -0
  126. /package/api-services/modules/{link.js → link/index.js} +0 -0
  127. /package/api-services/modules/{permission.d.ts → permission/index.d.ts} +0 -0
  128. /package/api-services/modules/{permission.js → permission/index.js} +0 -0
  129. /package/api-services/modules/{platformManage.d.ts → platformManage/index.d.ts} +0 -0
  130. /package/api-services/modules/{platformManage.js → platformManage/index.js} +0 -0
  131. /package/api-services/modules/{portal.d.ts → portal/index.d.ts} +0 -0
  132. /package/api-services/modules/{portal.js → portal/index.js} +0 -0
  133. /package/api-services/modules/{space-manage.d.ts → space-manage/index.d.ts} +0 -0
  134. /package/api-services/modules/{space-manage.js → space-manage/index.js} +0 -0
  135. /package/api-services/modules/{super-admin.d.ts → super-admin/index.d.ts} +0 -0
  136. /package/api-services/modules/{super-admin.js → super-admin/index.js} +0 -0
  137. /package/api-services/modules/{supplier.d.ts → supplier/index.d.ts} +0 -0
  138. /package/api-services/modules/{supplier.js → supplier/index.js} +0 -0
  139. /package/api-services/modules/{supplychain-manage.d.ts → supplychain-manage/index.d.ts} +0 -0
  140. /package/api-services/modules/{supplychain-manage.js → supplychain-manage/index.js} +0 -0
  141. /package/api-services/modules/{systemConfiguration.d.ts → systemConfiguration/index.d.ts} +0 -0
  142. /package/api-services/modules/{systemConfiguration.js → systemConfiguration/index.js} +0 -0
  143. /package/api-services/modules/{tool.d.ts → tool/index.d.ts} +0 -0
  144. /package/api-services/modules/{tool.js → tool/index.js} +0 -0
  145. /package/api-services/src/{create-service.d.ts → create-service/index.d.ts} +0 -0
  146. /package/api-services/src/{create-service.js → create-service/index.js} +0 -0
  147. /package/common-info/{getIframeUrl.d.ts → getIframeUrl/index.d.ts} +0 -0
  148. /package/common-info/{getInfoFromUrl.d.ts → getInfoFromUrl/index.d.ts} +0 -0
  149. /package/common-tools/{arr-tools.js → arr-tools/index.js} +0 -0
  150. /package/common-tools/{date-format.d.ts → date-format/index.d.ts} +0 -0
  151. /package/common-tools/{date-format.js → date-format/index.js} +0 -0
  152. /package/common-tools/{handle-data.d.ts → handle-data/index.d.ts} +0 -0
  153. /package/common-tools/{handle-data.js → handle-data/index.js} +0 -0
  154. /package/common-tools/{obj-tools.d.ts → obj-tools/index.d.ts} +0 -0
  155. /package/common-tools/{platform-tools.d.ts → platform-tools/index.d.ts} +0 -0
  156. /package/common-tools/{queue-promise.js → queue-promise/index.js} +0 -0
  157. /package/common-tools/{setHtmlMinWH.js → setHtmlMinWH/index.js} +0 -0
  158. /package/create-api-service/{proxy-sso.d.ts → proxy-sso/index.d.ts} +0 -0
  159. /package/create-api-service/{proxy-sso.js → proxy-sso/index.js} +0 -0
  160. /package/directive/{auth.d.ts → auth/index.d.ts} +0 -0
  161. /package/directive/{clickOutside.d.ts → clickOutside/index.d.ts} +0 -0
  162. /package/directive/{clickOutside.js → clickOutside/index.js} +0 -0
  163. /package/directive/{hoverInside.d.ts → hoverInside/index.d.ts} +0 -0
  164. /package/directive/{hoverInside.js → hoverInside/index.js} +0 -0
  165. /package/directive/{utils.d.ts → utils/index.d.ts} +0 -0
  166. /package/directive/{utils.js → utils/index.js} +0 -0
  167. /package/hooks/popup-manager/{use-zindex.d.ts → use-zindex/index.d.ts} +0 -0
  168. /package/hooks/popup-manager/{use-zindex.js → use-zindex/index.js} +0 -0
  169. /package/vue/hooks/{use-model-value.js → use-model-value/index.js} +0 -0
@@ -1,26 +1,27 @@
1
- const W = /^[\uD800-\uDBFF]$/, B = /^[\uDC00-\uDFFF]$/, H = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
2
- var a;
1
+ const H = /^[\uD800-\uDBFF]$/, Q = /^[\uDC00-\uDFFF]$/, V = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
2
+ var P;
3
3
  (function(n) {
4
4
  n[n.Unknown = 1e-13] = "Unknown", n[n.Rule = 1e-12] = "Rule", n[n.DICT = 2e-8] = "DICT", n[n.Surname = 1] = "Surname", n[n.Custom = 1] = "Custom";
5
- })(a || (a = {}));
5
+ })(P || (P = {}));
6
6
  const j = {
7
7
  Normal: 1,
8
8
  Surname: 10,
9
9
  Custom: 100
10
10
  };
11
11
  function d(n) {
12
- return n.replace(H, "_").length;
12
+ var i;
13
+ return n.length - (((i = n.match(V)) === null || i === void 0 ? void 0 : i.length) || 0);
13
14
  }
14
15
  function w(n) {
15
16
  const i = [];
16
17
  let g = 0;
17
18
  for (; g < n.length; ) {
18
- const h = n.charAt(g);
19
- W.test(h) && B.test(n.charAt(g + 1)) ? (i.push(n.substring(g, g + 2)), g += 2) : (i.push(h), g += 1);
19
+ const h = n[g];
20
+ H.test(h) && Q.test(n[g + 1]) ? (i.push(n.substring(g, g + 2)), g += 2) : (i.push(h), g += 1);
20
21
  }
21
22
  return i;
22
23
  }
23
- class $ {
24
+ class F {
24
25
  constructor() {
25
26
  this.NumberDICT = [], this.StringDICT = /* @__PURE__ */ new Map();
26
27
  }
@@ -44,7 +45,7 @@ class $ {
44
45
  this.NumberDICT = [], this.StringDICT.clear();
45
46
  }
46
47
  }
47
- const k = {
48
+ const S = {
48
49
  "bǎng páng pāng": ["膀"],
49
50
  líng: [
50
51
  "〇",
@@ -4433,7 +4434,7 @@ const k = {
4433
4434
  ],
4434
4435
  "xián xuán": ["伭"],
4435
4436
  "nú nǔ": ["伮"],
4436
- "bǎi": ["伯"],
4437
+ "bǎi": ["伯"],
4437
4438
  "gū gù": ["估"],
4438
4439
  nǐ: ["伱", "你", "儞", "孴", "拟", "擬", "旎", "晲", "狔", "苨", "薿", "隬"],
4439
4440
  "nì ní": ["伲"],
@@ -18704,13 +18705,13 @@ const k = {
18704
18705
  "zhǐ dǐ": ["茋"],
18705
18706
  "gǒng hóng": ["硔"],
18706
18707
  "yáo xiào": ["滧"]
18707
- }, x = new $();
18708
- Object.keys(k).forEach((n) => {
18709
- const i = k[n];
18708
+ }, x = new F();
18709
+ Object.keys(S).forEach((n) => {
18710
+ const i = S[n];
18710
18711
  for (let g of i)
18711
18712
  x.set(g, n);
18712
18713
  });
18713
- const Q = [
18714
+ const G = [
18714
18715
  "zh",
18715
18716
  "ch",
18716
18717
  "sh",
@@ -18735,7 +18736,7 @@ const Q = [
18735
18736
  "y",
18736
18737
  "w",
18737
18738
  ""
18738
- ], V = ["j", "q", "x"], G = [
18739
+ ], J = ["j", "q", "x"], K = [
18739
18740
  "uān",
18740
18741
  "uán",
18741
18742
  "uǎn",
@@ -18756,7 +18757,7 @@ const Q = [
18756
18757
  "ǔ",
18757
18758
  "ù",
18758
18759
  "u"
18759
- ], J = {
18760
+ ], X = {
18760
18761
  uān: "üān",
18761
18762
  uán: "üán",
18762
18763
  uǎn: "üǎn",
@@ -18777,7 +18778,7 @@ const Q = [
18777
18778
  ǔ: "ǚ",
18778
18779
  ù: "ǜ",
18779
18780
  u: "ü"
18780
- }, K = [
18781
+ }, Y = [
18781
18782
  "ia",
18782
18783
  "ian",
18783
18784
  "iang",
@@ -18796,7 +18797,7 @@ const Q = [
18796
18797
  "üe",
18797
18798
  "van",
18798
18799
  "ve"
18799
- ], P = {
18800
+ ], D = {
18800
18801
  一: "yì",
18801
18802
  二: "èr",
18802
18803
  三: "sān",
@@ -18821,13 +18822,13 @@ const Q = [
18821
18822
  第一: "dì yī",
18822
18823
  一十: "yī shí",
18823
18824
  一十一: "yī shí yī"
18824
- }, D = {
18825
+ }, T = {
18825
18826
  重: "chóng",
18826
18827
  行: "háng",
18827
18828
  斗: "dǒu",
18828
18829
  更: "gēng"
18829
18830
  };
18830
- function X() {
18831
+ function nn() {
18831
18832
  const n = {
18832
18833
  零一: "líng yī",
18833
18834
  "〇一": "líng yī",
@@ -18836,21 +18837,21 @@ function X() {
18836
18837
  第一: "dì yī",
18837
18838
  一十一: "yī shí yī"
18838
18839
  };
18839
- for (let i in P)
18840
- for (let g in D) {
18841
- const h = `${i}${g}`, u = `${P[i]} ${D[g]}`;
18840
+ for (let i in D)
18841
+ for (let g in T) {
18842
+ const h = `${i}${g}`, u = `${D[i]} ${T[g]}`;
18842
18843
  n[h] = u;
18843
18844
  }
18844
18845
  return n;
18845
18846
  }
18846
- const T = X(), Y = Object.keys(T).map((n) => ({
18847
+ const Z = nn(), gn = Object.keys(Z).map((n) => ({
18847
18848
  zh: n,
18848
- pinyin: T[n],
18849
+ pinyin: Z[n],
18849
18850
  probability: 1e-12,
18850
18851
  length: d(n),
18851
18852
  priority: j.Normal,
18852
18853
  dict: Symbol("rule")
18853
- })), L = {
18854
+ })), O = {
18854
18855
  // 说不说,说一说,叠词之间发音为轻声
18855
18856
  不: {
18856
18857
  bú: [4]
@@ -18860,37 +18861,37 @@ const T = X(), Y = Object.keys(T).map((n) => ({
18860
18861
  yí: [4],
18861
18862
  yì: [1, 2, 3]
18862
18863
  }
18863
- }, nn = {
18864
+ }, hn = {
18864
18865
  不: ["的", "而", "之", "后", "也", "还", "地"],
18865
18866
  一: ["的", "而", "之", "后", "也", "还", "是"]
18866
- }, gn = Object.keys(L);
18867
- function hn(n, i, g) {
18868
- if (gn.indexOf(n) === -1)
18869
- return r(n);
18870
- if (i === g && i && r(i) !== i)
18871
- return m(r(n));
18872
- if (g && !nn[n].includes(g)) {
18873
- const h = r(g);
18867
+ }, un = Object.keys(O);
18868
+ function sn(n, i, g) {
18869
+ if (un.indexOf(n) === -1)
18870
+ return e(n);
18871
+ if (i === g && i && e(i) !== i)
18872
+ return f(e(n));
18873
+ if (g && !hn[n].includes(g)) {
18874
+ const h = e(g);
18874
18875
  if (h !== g) {
18875
- const u = f(h), s = L[n];
18876
+ const u = m(h), s = O[n];
18876
18877
  for (let z in s)
18877
18878
  if (s[z].indexOf(Number(u)) !== -1)
18878
18879
  return z;
18879
18880
  }
18880
18881
  }
18881
18882
  }
18882
- function un(n, i) {
18883
+ function zn(n, i) {
18883
18884
  if (n === "了" && (!i || !x.get(i)))
18884
18885
  return "liǎo";
18885
18886
  }
18886
- function sn(n, i) {
18887
+ function on(n, i) {
18887
18888
  if (n === "々")
18888
18889
  return !i || !x.get(i) ? "tóng" : x.get(i).split(" ")[0];
18889
18890
  }
18890
- function S(n, i, g) {
18891
- return sn(n, i) || un(n, i) || hn(n, i, g) || r(n);
18891
+ function C(n, i, g) {
18892
+ return on(n, i) || zn(n, i) || sn(n, i, g) || e(n);
18892
18893
  }
18893
- const p = {
18894
+ const a = {
18894
18895
  南宫: "nán gōng",
18895
18896
  第五: "dì wǔ",
18896
18897
  万俟: "mò qí",
@@ -19009,7 +19010,7 @@ const p = {
19009
19010
  花: "huā",
19010
19011
  方: "fāng",
19011
19012
  俞: "yú",
19012
- 任: "rèn",
19013
+ 任: "rén",
19013
19014
  袁: "yuán",
19014
19015
  柳: "liǔ",
19015
19016
  酆: "fēng",
@@ -19381,16 +19382,16 @@ const p = {
19381
19382
  撒: "sǎ",
19382
19383
  甯: "nìng",
19383
19384
  六: "lù",
19384
- 啜: "chuài"
19385
- // https://baike.baidu.com/item/%E5%95%9C%E5%A7%93/9563772
19386
- }, zn = Object.keys(p).map((n) => ({
19385
+ 啜: "chuài",
19386
+ 行: "xíng"
19387
+ }, yn = Object.keys(a).map((n) => ({
19387
19388
  zh: n,
19388
- pinyin: p[n],
19389
+ pinyin: a[n],
19389
19390
  probability: 1 + d(n),
19390
19391
  length: d(n),
19391
19392
  priority: j.Surname,
19392
19393
  dict: Symbol("surname")
19393
- })), C = {
19394
+ })), M = {
19394
19395
  这个: "zhè ge",
19395
19396
  成为: "chéng wéi",
19396
19397
  认为: "rèn wéi",
@@ -19652,6 +19653,7 @@ const p = {
19652
19653
  委屈: "wěi qu",
19653
19654
  为期: "wéi qī",
19654
19655
  伯伯: "bó bo",
19656
+ 伯子: "bǎi zi",
19655
19657
  圈子: "quān zi",
19656
19658
  见识: "jiàn shi",
19657
19659
  笼罩: "lǒng zhào",
@@ -21467,10 +21469,7 @@ const p = {
21467
21469
  逐一: "zhú yī",
21468
21470
  周一: "zhōu yī",
21469
21471
  初一: "chū yī",
21470
- 高一: "gāo yī",
21471
- 大一: "dà yī",
21472
21472
  研一: "yán yī",
21473
- 守一: "shǒu yī",
21474
21473
  归一: "guī yī",
21475
21474
  假一: "jiǎ yī",
21476
21475
  闻一: "wén yī",
@@ -21504,11 +21503,8 @@ const p = {
21504
21503
  一八: "yī bā",
21505
21504
  一九: "yī jiǔ",
21506
21505
  一又: "yī yòu",
21507
- // TODO: 添加更多为(二声)的词
21508
- 一更: "yī gēng",
21509
21506
  一饼: "yī bǐng",
21510
21507
  一楼: "yī lóu",
21511
- 一期: "yī qī",
21512
21508
  为例: "wéi lì",
21513
21509
  为准: "wéi zhǔn",
21514
21510
  沧海: "cāng hǎi",
@@ -21535,8 +21531,6 @@ const p = {
21535
21531
  空难: "kōng nàn",
21536
21532
  喜欢: "xǐ huan",
21537
21533
  朝朝: "zhāo zhāo",
21538
- 行行: "háng háng",
21539
- 哪行: "nǎ háng",
21540
21534
  不行: "bù xíng",
21541
21535
  轧轧: "yà yà",
21542
21536
  弯曲: "wān qū",
@@ -21552,15 +21546,16 @@ const p = {
21552
21546
  九曲: "jiǔ qū",
21553
21547
  曲折: "qū zhé",
21554
21548
  曲肱: "qū gōng",
21555
- 曲意: "qū yì"
21556
- }, on = Object.keys(C).map((n) => ({
21549
+ 曲意: "qū yì",
21550
+ 仡佬: "gē lǎo"
21551
+ }, ln = Object.keys(M).map((n) => ({
21557
21552
  zh: n,
21558
- pinyin: C[n],
21553
+ pinyin: M[n],
21559
21554
  probability: 2e-8,
21560
21555
  length: 2,
21561
21556
  priority: j.Normal,
21562
21557
  dict: Symbol("dict2")
21563
- })), M = {
21558
+ })), I = {
21564
21559
  为什么: "wèi shén me",
21565
21560
  实际上: "shí jì shang",
21566
21561
  检察长: "jiǎn chá zhǎng",
@@ -21583,7 +21578,6 @@ const p = {
21583
21578
  运输量: "yùn shū liàng",
21584
21579
  发脾气: "fā pí qi",
21585
21580
  士大夫: "shì dà fū",
21586
- 仡佬族: "gē lǎo zú",
21587
21581
  鸭绿江: "yā lù jiāng",
21588
21582
  压根儿: "yà gēn er",
21589
21583
  对得起: "duì de qǐ",
@@ -21617,6 +21611,7 @@ const p = {
21617
21611
  充其量: "chōng qí liàng",
21618
21612
  靠得住: "kào de zhù",
21619
21613
  车行道: "chē xíng dào",
21614
+ 人行道: "rén xíng dào",
21620
21615
  中郎将: "zhōng láng jiàng",
21621
21616
  照明弹: "zhào míng dàn",
21622
21617
  烟幕弹: "yān mù dàn",
@@ -21886,14 +21881,14 @@ const p = {
21886
21881
  干哪行: "gàn nǎ háng",
21887
21882
  干一行: "gàn yì háng",
21888
21883
  曲别针: "qū bié zhēn"
21889
- }, yn = Object.keys(M).map((n) => ({
21884
+ }, cn = Object.keys(I).map((n) => ({
21890
21885
  zh: n,
21891
- pinyin: M[n],
21886
+ pinyin: I[n],
21892
21887
  probability: 2e-8,
21893
21888
  length: 3,
21894
21889
  priority: j.Normal,
21895
21890
  dict: Symbol("dict3")
21896
- })), Z = {
21891
+ })), N = {
21897
21892
  成吉思汗: "chéng jí sī hán",
21898
21893
  四通八达: "sì tōng bā dá",
21899
21894
  一模一样: "yì mú yí yàng",
@@ -23013,7 +23008,6 @@ const p = {
23013
23008
  将取固予: "jiāng qǔ gù yǔ",
23014
23009
  将门有将: "jiàng mén yǒu jiàng",
23015
23010
  将夺固与: "jiāng duó gù yǔ",
23016
- 将伯之助: "qiāng bó zhī zhù",
23017
23011
  槛花笼鹤: "jiàn huā lóng hè",
23018
23012
  鉴影度形: "jiàn yǐng duó xíng",
23019
23013
  渐不可长: "jiàn bù kě zhǎng",
@@ -23486,17 +23480,18 @@ const p = {
23486
23480
  一路公交: "yī lù gōng jiāo",
23487
23481
  一路汽车: "yī lù qì chē",
23488
23482
  一路巴士: "yī lù bā shì",
23489
- 不行一行: "bù xíng yì háng",
23490
23483
  朝朝朝落: "zhāo cháo zhāo luò",
23491
- 曲意逢迎: "qū yì féng yíng"
23492
- }, ln = Object.keys(Z).map((n) => ({
23484
+ 曲意逢迎: "qū yì féng yíng",
23485
+ 一行不行: "yì háng xíng",
23486
+ 行行不行: "háng háng bù xíng"
23487
+ }, tn = Object.keys(N).map((n) => ({
23493
23488
  zh: n,
23494
- pinyin: Z[n],
23489
+ pinyin: N[n],
23495
23490
  probability: 2e-8,
23496
23491
  length: 4,
23497
23492
  priority: j.Normal,
23498
23493
  dict: Symbol("dict4")
23499
- })), I = {
23494
+ })), v = {
23500
23495
  巴尔干半岛: "bā ěr gàn bàn dǎo",
23501
23496
  巴尔喀什湖: "bā ěr kā shí hú",
23502
23497
  不幸而言中: "bú xìng ér yán zhòng",
@@ -23512,24 +23507,24 @@ const p = {
23512
23507
  亚得里亚海: "yà dé lǐ yà hǎi",
23513
23508
  眼不见为净: "yǎn bú jiàn wéi jìng",
23514
23509
  竹筒倒豆子: "zhú tǒng dào dòu zi"
23515
- }, cn = Object.keys(I).map((n) => ({
23510
+ }, jn = Object.keys(v).map((n) => ({
23516
23511
  zh: n,
23517
- pinyin: I[n],
23512
+ pinyin: v[n],
23518
23513
  probability: 2e-8,
23519
23514
  length: 5,
23520
23515
  priority: j.Normal,
23521
23516
  dict: Symbol("dict5")
23522
23517
  }));
23523
- function N(n, i) {
23518
+ function _(n, i) {
23524
23519
  return n && (n.decimal < i.decimal || n.decimal === i.decimal && n.probability > i.probability) ? n : i;
23525
23520
  }
23526
- function F(n) {
23521
+ function E(n) {
23527
23522
  n.probability < 1e-300 && (n.probability *= 1e300, n.decimal += 1);
23528
23523
  }
23529
- function tn(n) {
23524
+ function dn(n) {
23530
23525
  return n.priority === j.Custom ? -(n.length * n.length * 100) : n.priority === j.Surname ? -(n.length * n.length * 10) : 0;
23531
23526
  }
23532
- function jn(n, i) {
23527
+ function xn(n, i) {
23533
23528
  const g = [];
23534
23529
  let h = n.length - 1, u = n[h];
23535
23530
  for (let s = i - 1; s >= 0; s--) {
@@ -23537,74 +23532,74 @@ function jn(n, i) {
23537
23532
  for (; u && u.index + u.length - 1 === s; ) {
23538
23533
  const l = u.index, y = {
23539
23534
  probability: u.probability * z.probability,
23540
- decimal: z.decimal + tn(u),
23535
+ decimal: z.decimal + dn(u),
23541
23536
  patterns: z.patterns,
23542
23537
  concatPattern: u
23543
23538
  };
23544
- F(y), g[l] = N(g[l], y), u = n[--h];
23539
+ E(y), g[l] = _(g[l], y), u = n[--h];
23545
23540
  }
23546
23541
  const o = {
23547
23542
  probability: 1e-13 * z.probability,
23548
23543
  decimal: 0,
23549
23544
  patterns: z.patterns
23550
23545
  };
23551
- F(o), g[s] = N(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]);
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]);
23552
23547
  }
23553
23548
  return g[0].patterns.reverse();
23554
23549
  }
23555
- function O(n, i) {
23550
+ function A(n, i) {
23556
23551
  return n && n.count <= i.count ? n : i;
23557
23552
  }
23558
- function dn(n) {
23553
+ function bn(n) {
23559
23554
  return n.priority === j.Custom ? -(n.length * n.length * 1e5) : n.priority === j.Surname ? -(n.length * n.length * 100) : 1;
23560
23555
  }
23561
- function xn(n, i) {
23556
+ function en(n, i) {
23562
23557
  const g = [];
23563
23558
  let h = n.length - 1, u = n[h];
23564
23559
  for (let s = i - 1; s >= 0; s--) {
23565
23560
  const z = s + 1 >= i ? { count: 0, patterns: [] } : g[s + 1];
23566
23561
  for (; u && u.index + u.length - 1 === s; ) {
23567
23562
  const l = u.index, y = {
23568
- count: dn(u) + z.count,
23563
+ count: bn(u) + z.count,
23569
23564
  patterns: z.patterns,
23570
23565
  concatPattern: u
23571
23566
  };
23572
- g[l] = O(g[l], y), u = n[--h];
23567
+ g[l] = A(g[l], y), u = n[--h];
23573
23568
  }
23574
23569
  const o = {
23575
23570
  count: 1 + z.count,
23576
23571
  patterns: z.patterns
23577
23572
  };
23578
- g[s] = O(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]);
23573
+ g[s] = A(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]);
23579
23574
  }
23580
23575
  return g[0].patterns.reverse();
23581
23576
  }
23582
- function bn(n, i) {
23577
+ function rn(n, i) {
23583
23578
  return !(i.index + i.length <= n.index || i.priority > n.priority || i.priority === n.priority && i.length > n.length);
23584
23579
  }
23585
- function rn(n) {
23580
+ function wn(n) {
23586
23581
  const i = [];
23587
23582
  for (let g = n.length - 1; g >= 0; ) {
23588
23583
  const { index: h } = n[g];
23589
23584
  let u = g - 1;
23590
- for (; u >= 0 && bn(n[g], n[u]); )
23585
+ for (; u >= 0 && rn(n[g], n[u]); )
23591
23586
  u--;
23592
23587
  (u < 0 || n[u].index + n[u].length <= h) && i.push(n[g]), g = u;
23593
23588
  }
23594
23589
  return i.reverse();
23595
23590
  }
23596
- var _;
23591
+ var R;
23597
23592
  (function(n) {
23598
23593
  n[n.ReverseMaxMatch = 1] = "ReverseMaxMatch", n[n.MaxProbability = 2] = "MaxProbability", n[n.MinTokenization = 3] = "MinTokenization";
23599
- })(_ || (_ = {}));
23600
- class v {
23594
+ })(R || (R = {}));
23595
+ class $ {
23601
23596
  constructor(i, g = "", h = "") {
23602
23597
  this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = h;
23603
23598
  }
23604
23599
  }
23605
- class en {
23600
+ class qn {
23606
23601
  constructor() {
23607
- this.dictMap = /* @__PURE__ */ new Map(), this.queues = [], this.root = new v(null);
23602
+ this.dictMap = /* @__PURE__ */ new Map(), this.queues = [], this.root = new $(null);
23608
23603
  }
23609
23604
  build(i) {
23610
23605
  this.buildTrie(i), this.buildFailPointer();
@@ -23617,7 +23612,7 @@ class en {
23617
23612
  for (let s = 0; s < h.length; s++) {
23618
23613
  let z = h[s];
23619
23614
  if (!u.children.has(z)) {
23620
- const o = new v(u, h.slice(0, s).join(""), z);
23615
+ const o = new $(u, h.slice(0, s).join(""), z);
23621
23616
  u.children.set(z, o), this.addNodeToQueues(o);
23622
23617
  }
23623
23618
  u = u.children.get(z);
@@ -23689,23 +23684,23 @@ class en {
23689
23684
  }
23690
23685
  search(i, g, h = 2) {
23691
23686
  const u = this.match(i, g);
23692
- return h === 1 ? rn(u) : h === 3 ? xn(u, d(i)) : jn(u, d(i));
23687
+ return h === 1 ? wn(u) : h === 3 ? en(u, d(i)) : xn(u, d(i));
23693
23688
  }
23694
23689
  }
23695
- const wn = [
23690
+ const fn = [
23691
+ ...jn,
23692
+ ...tn,
23696
23693
  ...cn,
23697
23694
  ...ln,
23698
- ...yn,
23699
- ...on,
23700
- ...Y,
23701
- ...zn
23702
- ], R = new en();
23703
- R.build(wn);
23704
- const qn = new $(), mn = () => qn, r = (n) => {
23695
+ ...gn,
23696
+ ...yn
23697
+ ], U = new qn();
23698
+ U.build(fn);
23699
+ const mn = new F(), pn = () => mn, e = (n) => {
23705
23700
  const i = x.get(n);
23706
23701
  return i ? i.split(" ")[0] : n;
23707
- }, fn = (n, i, g, h) => {
23708
- const u = R.search(n, g, h);
23702
+ }, an = (n, i, g, h) => {
23703
+ const u = U.search(n, g, h);
23709
23704
  let s = 0;
23710
23705
  const z = w(n);
23711
23706
  for (let o = 0; o < z.length; ) {
@@ -23714,7 +23709,7 @@ const qn = new $(), mn = () => qn, r = (n) => {
23714
23709
  if (l.length === 1 && l.priority <= j.Normal) {
23715
23710
  const t = z[o];
23716
23711
  let b = "";
23717
- b = S(t, z[o - 1], z[o + 1]), i[o] = {
23712
+ b = C(t, z[o - 1], z[o + 1]), i[o] = {
23718
23713
  origin: t,
23719
23714
  result: b,
23720
23715
  isZh: b !== t,
@@ -23737,7 +23732,7 @@ const qn = new $(), mn = () => qn, r = (n) => {
23737
23732
  } else {
23738
23733
  const y = z[o];
23739
23734
  let c = "";
23740
- c = S(y, z[o - 1], z[o + 1]), i[o] = {
23735
+ c = C(y, z[o - 1], z[o + 1]), i[o] = {
23741
23736
  origin: y,
23742
23737
  result: c,
23743
23738
  isZh: c !== y,
@@ -23745,19 +23740,19 @@ const qn = new $(), mn = () => qn, r = (n) => {
23745
23740
  }, o++;
23746
23741
  }
23747
23742
  }
23748
- return i;
23749
- }, m = (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, "ê"), A = (n, i = "off") => {
23750
- const g = mn();
23743
+ return { list: i, matches: u };
23744
+ }, f = (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
+ const g = pn();
23751
23746
  let h = x.get(n) ? x.get(n).split(" ") : [];
23752
23747
  if (g.get(n))
23753
23748
  h = g.get(n).split(" ");
23754
23749
  else if (i !== "off") {
23755
- const u = p[n];
23750
+ const u = a[n];
23756
23751
  u && (h = [u].concat(h.filter((s) => s !== u)));
23757
23752
  }
23758
23753
  return h;
23759
- }, pn = (n, i = "off") => {
23760
- let g = A(n, i);
23754
+ }, kn = (n, i = "off") => {
23755
+ let g = W(n, i);
23761
23756
  return g.length > 0 ? g.map((h) => ({
23762
23757
  origin: n,
23763
23758
  result: h,
@@ -23774,10 +23769,10 @@ const qn = new $(), mn = () => qn, r = (n) => {
23774
23769
  }, q = (n) => {
23775
23770
  const i = n.split(" "), g = [], h = [];
23776
23771
  for (let u of i)
23777
- for (let s of Q)
23772
+ for (let s of G)
23778
23773
  if (u.startsWith(s)) {
23779
23774
  let z = u.slice(s.length);
23780
- V.indexOf(s) !== -1 && G.indexOf(z) !== -1 && (z = J[z]), g.push(s), h.push(z);
23775
+ J.indexOf(s) !== -1 && K.indexOf(z) !== -1 && (z = X[z]), g.push(s), h.push(z);
23781
23776
  break;
23782
23777
  }
23783
23778
  return {
@@ -23785,44 +23780,48 @@ const qn = new $(), mn = () => qn, r = (n) => {
23785
23780
  initial: g.join(" ")
23786
23781
  // 声母
23787
23782
  };
23788
- }, e = (n) => {
23783
+ }, r = (n) => {
23789
23784
  const { final: i } = q(n);
23790
23785
  let g = "", h = "", u = "";
23791
- return K.indexOf(m(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 };
23792
- }, f = (n) => {
23786
+ return Y.indexOf(f(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
+ }, m = (n) => {
23793
23788
  const i = /(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/, g = /(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/, h = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/, u = /(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/, s = /(a|o|e|i|u|ü|ê)/, z = /(n|m)$/, o = [];
23794
23789
  return n.split(" ").forEach((y) => {
23795
23790
  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("");
23796
23791
  }), o.join(" ");
23797
- }, an = (n, i) => {
23798
- const g = m(n).split(" "), h = f(i).split(" "), u = [];
23792
+ }, Pn = (n, i) => {
23793
+ const g = f(n).split(" "), h = m(i).split(" "), u = [];
23799
23794
  return g.forEach((s, z) => {
23800
23795
  u.push(`${s}${h[z]}`);
23801
23796
  }), u.join(" ");
23802
- }, U = (n) => {
23797
+ }, B = (n) => {
23803
23798
  const i = [];
23804
23799
  return n.split(" ").forEach((h) => {
23805
23800
  i.push(h[0]);
23806
23801
  }), i.join(" ");
23807
- }, kn = (n) => typeof n != "string" ? (console.error("The first param of pinyin is error: " + n + ' is not assignable to type "string".'), !1) : !0, Pn = (n, i) => {
23802
+ }, Sn = (n) => typeof n == "string";
23803
+ function p(n, i) {
23804
+ return i instanceof RegExp ? i.test(n) : !0;
23805
+ }
23806
+ const Dn = (n, i) => {
23808
23807
  let g = i.nonZh;
23809
23808
  if (g === "removed")
23810
- return n.filter((h) => h.isZh);
23809
+ return n.filter((h) => h.isZh || !p(h.origin, i.nonZhScope));
23811
23810
  if (g === "consecutive") {
23812
23811
  for (let h = n.length - 2; h >= 0; h--) {
23813
23812
  const u = n[h], s = n[h + 1];
23814
- !u.isZh && !s.isZh && (u.origin += s.origin, u.result += s.result, s.delete = !0);
23813
+ !u.isZh && !s.isZh && p(u.origin, i.nonZhScope) && p(s.origin, i.nonZhScope) && (u.origin += s.origin, u.result += s.result, s.delete = !0);
23815
23814
  }
23816
23815
  return n.filter((h) => !h.delete);
23817
23816
  } else
23818
23817
  return n;
23819
- }, E = (n, i) => d(n) === 1 && i.multiple ? pn(n, i.surname) : !1, Dn = (n, i) => {
23818
+ }, L = (n, i) => d(n) === 1 && i.multiple ? kn(n, i.surname) : !1, Tn = (n, i) => {
23820
23819
  switch (i.pattern) {
23821
23820
  case "pinyin":
23822
23821
  break;
23823
23822
  case "num":
23824
23823
  n.forEach((g) => {
23825
- g.result = g.isZh ? f(g.result) : "";
23824
+ g.result = g.isZh ? m(g.result) : "";
23826
23825
  });
23827
23826
  break;
23828
23827
  case "initial":
@@ -23837,46 +23836,46 @@ const qn = new $(), mn = () => qn, r = (n) => {
23837
23836
  break;
23838
23837
  case "first":
23839
23838
  n.forEach((g) => {
23840
- g.result = U(g.result);
23839
+ g.result = B(g.result);
23841
23840
  });
23842
23841
  break;
23843
23842
  case "finalHead":
23844
23843
  n.forEach((g) => {
23845
- g.result = g.isZh ? e(g.result).head : "";
23844
+ g.result = g.isZh ? r(g.result).head : "";
23846
23845
  });
23847
23846
  break;
23848
23847
  case "finalBody":
23849
23848
  n.forEach((g) => {
23850
- g.result = g.isZh ? e(g.result).body : "";
23849
+ g.result = g.isZh ? r(g.result).body : "";
23851
23850
  });
23852
23851
  break;
23853
23852
  case "finalTail":
23854
23853
  n.forEach((g) => {
23855
- g.result = g.isZh ? e(g.result).tail : "";
23854
+ g.result = g.isZh ? r(g.result).tail : "";
23856
23855
  });
23857
23856
  break;
23858
23857
  }
23859
- }, Tn = (n, i) => {
23858
+ }, Zn = (n, i) => {
23860
23859
  switch (i.toneType) {
23861
23860
  case "symbol":
23862
23861
  break;
23863
23862
  case "none":
23864
23863
  n.forEach((g) => {
23865
- g.isZh && (g.result = m(g.result));
23864
+ g.isZh && (g.result = f(g.result));
23866
23865
  });
23867
23866
  break;
23868
23867
  case "num": {
23869
23868
  n.forEach((g) => {
23870
- g.isZh && (g.result = an(g.result, g.originPinyin));
23869
+ g.isZh && (g.result = Pn(g.result, g.originPinyin));
23871
23870
  });
23872
23871
  break;
23873
23872
  }
23874
23873
  }
23875
- }, Sn = (n, i) => {
23874
+ }, Cn = (n, i) => {
23876
23875
  i.v && n.forEach((g) => {
23877
23876
  g.isZh && (g.result = g.result.replace(/ü/g, "v"));
23878
23877
  });
23879
- }, Cn = (n, i, g) => {
23878
+ }, Mn = (n, i, g) => {
23880
23879
  if (i.multiple && d(g) === 1) {
23881
23880
  let h = "";
23882
23881
  n = n.filter((u) => {
@@ -23885,26 +23884,27 @@ const qn = new $(), mn = () => qn, r = (n) => {
23885
23884
  });
23886
23885
  }
23887
23886
  return i.type === "array" ? n.map((h) => h.result) : i.type === "all" ? n.map((h) => {
23888
- const u = h.isZh ? h.result : "", { initial: s, final: z } = q(u), { head: o, body: l, tail: y } = e(u);
23887
+ const u = h.isZh ? h.result : "", { initial: s, final: z } = q(u), { head: o, body: l, tail: y } = r(u);
23889
23888
  let c = [];
23890
- return u !== "" && (c = [u].concat(A(h.origin, i.surname).filter((t) => t !== u))), {
23889
+ return u !== "" && (c = [u].concat(W(h.origin, i.surname).filter((t) => t !== u))), {
23891
23890
  origin: h.origin,
23892
23891
  pinyin: u,
23893
23892
  initial: s,
23894
23893
  final: z,
23895
- first: h.isZh ? U(h.result) : "",
23894
+ first: h.isZh ? B(h.result) : "",
23896
23895
  finalHead: o,
23897
23896
  finalBody: l,
23898
23897
  finalTail: y,
23899
- num: Number(f(h.originPinyin)),
23898
+ num: Number(m(h.originPinyin)),
23900
23899
  isZh: h.isZh,
23901
23900
  polyphonic: c,
23902
- inZhRange: !!x.get(h.origin)
23901
+ inZhRange: !!x.get(h.origin),
23902
+ result: h.result
23903
23903
  };
23904
23904
  }) : n.map((h) => h.result).join(i.separator);
23905
- }, Mn = (n, i) => (i === !1 && n.forEach((g) => {
23905
+ }, In = (n, i) => (i === !1 && n.forEach((g) => {
23906
23906
  g.origin === "一" ? g.result = g.originPinyin = "yī" : g.origin === "不" && (g.result = g.originPinyin = "bù");
23907
- }), n), Zn = {
23907
+ }), n), Nn = {
23908
23908
  pattern: "pinyin",
23909
23909
  toneType: "symbol",
23910
23910
  type: "string",
@@ -23917,16 +23917,21 @@ const qn = new $(), mn = () => qn, r = (n) => {
23917
23917
  toneSandhi: !0,
23918
23918
  segmentit: 2
23919
23919
  };
23920
- function In(n, i) {
23921
- if (i = Object.assign(Object.assign({}, Zn), i || {}), !kn(n))
23920
+ function vn(n, i) {
23921
+ if (i = Object.assign(Object.assign({}, Nn), i || {}), !Sn(n))
23922
23922
  return n;
23923
23923
  if (n === "")
23924
23924
  return i.type === "array" || i.type === "all" ? [] : "";
23925
23925
  i.surname === void 0 && (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");
23926
- let h = Array(d(n));
23927
- return h = fn(n, h, i.surname, i.segmentit), h = Mn(h, i.toneSandhi), h = Pn(h, i), E(n, i) && (h = E(n, i)), Dn(h, i), Tn(h, i), Sn(h, i), Cn(h, i, n);
23926
+ let h = Array(d(n)), { list: u } = an(n, h, i.surname, i.segmentit);
23927
+ return u = In(u, i.toneSandhi), u = Dn(u, i), L(n, i) && (u = L(n, i)), Tn(u, i), Zn(u, i), Cn(u, i), Mn(u, i, n);
23928
23928
  }
23929
- const Nn = (n) => In(n, { pattern: "first", toneType: "none", type: "string", separator: "", nonZh: "removed" });
23929
+ var k;
23930
+ (function(n) {
23931
+ 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
+ })(k || (k = {}));
23933
+ k.AllSegment;
23934
+ const _n = (n) => vn(n, { pattern: "first", toneType: "none", type: "string", separator: "", nonZh: "removed" });
23930
23935
  export {
23931
- Nn as getPinyinFirstCharacter
23936
+ _n as getPinyinFirstCharacter
23932
23937
  };