@marshulll/openclaw-wecom 0.1.6 → 0.1.8

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 (677) hide show
  1. package/README.en.md +3 -0
  2. package/README.md +3 -0
  3. package/README.zh.md +3 -0
  4. package/docs/INSTALL.md +3 -0
  5. package/node_modules/fast-xml-parser/CHANGELOG.md +606 -0
  6. package/node_modules/fast-xml-parser/LICENSE +21 -0
  7. package/node_modules/fast-xml-parser/README.md +237 -0
  8. package/node_modules/fast-xml-parser/package.json +72 -0
  9. package/node_modules/fast-xml-parser/src/cli/cli.js +93 -0
  10. package/node_modules/fast-xml-parser/src/cli/man.js +12 -0
  11. package/node_modules/fast-xml-parser/src/cli/read.js +92 -0
  12. package/node_modules/fast-xml-parser/src/fxp.d.ts +418 -0
  13. package/node_modules/fast-xml-parser/src/fxp.js +11 -0
  14. package/node_modules/fast-xml-parser/src/ignoreAttributes.js +20 -0
  15. package/node_modules/fast-xml-parser/src/util.js +72 -0
  16. package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
  17. package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
  18. package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
  19. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
  20. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
  21. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
  22. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
  23. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +99 -0
  24. package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
  25. package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
  26. package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
  27. package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
  28. package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
  29. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +216 -0
  30. package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
  31. package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
  32. package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
  33. package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
  34. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
  35. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
  36. package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +40 -0
  37. package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
  38. package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
  39. package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
  40. package/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
  41. package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +104 -0
  42. package/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
  43. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
  44. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
  45. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
  46. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
  47. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
  48. package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
  49. package/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
  50. package/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
  51. package/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
  52. package/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
  53. package/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
  54. package/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
  55. package/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
  56. package/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
  57. package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
  58. package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
  59. package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
  60. package/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
  61. package/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
  62. package/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
  63. package/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
  64. package/node_modules/fast-xml-parser/src/validator.js +425 -0
  65. package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +286 -0
  66. package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +135 -0
  67. package/node_modules/fast-xml-parser/src/xmlbuilder/prettifyJs2Xml.js +0 -0
  68. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +153 -0
  69. package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +48 -0
  70. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +606 -0
  71. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +58 -0
  72. package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +113 -0
  73. package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +25 -0
  74. package/node_modules/strnum/.vscode/launch.json +25 -0
  75. package/node_modules/strnum/CHANGELOG.md +22 -0
  76. package/node_modules/strnum/LICENSE +21 -0
  77. package/node_modules/strnum/README.md +97 -0
  78. package/node_modules/strnum/package.json +30 -0
  79. package/node_modules/strnum/strnum.js +111 -0
  80. package/node_modules/strnum/strnum.test.js +165 -0
  81. package/node_modules/zod/LICENSE +21 -0
  82. package/node_modules/zod/README.md +208 -0
  83. package/node_modules/zod/index.cjs +33 -0
  84. package/node_modules/zod/index.d.cts +4 -0
  85. package/node_modules/zod/index.d.ts +4 -0
  86. package/node_modules/zod/index.js +4 -0
  87. package/node_modules/zod/package.json +118 -0
  88. package/node_modules/zod/src/index.ts +4 -0
  89. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  90. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  91. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  92. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  93. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  94. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  95. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  96. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  97. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  98. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  99. package/node_modules/zod/src/v3/errors.ts +13 -0
  100. package/node_modules/zod/src/v3/external.ts +6 -0
  101. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  102. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  103. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  104. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  105. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  106. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  107. package/node_modules/zod/src/v3/index.ts +4 -0
  108. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  109. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  110. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  111. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  112. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  113. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  114. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  115. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  116. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  117. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  118. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  119. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  120. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  121. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  122. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  123. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  124. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  125. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  126. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  127. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  128. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  129. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  130. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  131. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  132. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  133. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  134. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  135. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  136. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  137. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  138. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  139. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  140. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  141. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  142. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  143. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  144. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  145. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  146. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  147. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  148. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  149. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  150. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  151. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  152. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  153. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  154. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  155. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  156. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  157. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  158. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  159. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  160. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  161. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  162. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  163. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  164. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  165. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  166. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  167. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  168. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  169. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  170. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  171. package/node_modules/zod/src/v3/types.ts +5136 -0
  172. package/node_modules/zod/src/v4/classic/checks.ts +30 -0
  173. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  174. package/node_modules/zod/src/v4/classic/compat.ts +66 -0
  175. package/node_modules/zod/src/v4/classic/errors.ts +75 -0
  176. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  177. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  178. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  179. package/node_modules/zod/src/v4/classic/parse.ts +33 -0
  180. package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  181. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  182. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  183. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  184. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  185. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  186. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  187. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  188. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  189. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  190. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  191. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  192. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  193. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  194. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  195. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  196. package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  197. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  198. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  199. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  200. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  201. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  202. package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  203. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  204. package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  205. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  206. package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  207. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  208. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  209. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  210. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  211. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  212. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  213. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  214. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  215. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  216. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  217. package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  218. package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  219. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  220. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  221. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  222. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  223. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  224. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  225. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  226. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  227. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  228. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  229. package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  230. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  231. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  232. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  233. package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  234. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  235. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  236. package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  237. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  238. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  239. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  240. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  241. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  242. package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  243. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  244. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  245. package/node_modules/zod/src/v4/core/api.ts +1594 -0
  246. package/node_modules/zod/src/v4/core/checks.ts +1283 -0
  247. package/node_modules/zod/src/v4/core/config.ts +15 -0
  248. package/node_modules/zod/src/v4/core/core.ts +134 -0
  249. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  250. package/node_modules/zod/src/v4/core/errors.ts +424 -0
  251. package/node_modules/zod/src/v4/core/function.ts +176 -0
  252. package/node_modules/zod/src/v4/core/index.ts +15 -0
  253. package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  254. package/node_modules/zod/src/v4/core/parse.ts +94 -0
  255. package/node_modules/zod/src/v4/core/regexes.ts +135 -0
  256. package/node_modules/zod/src/v4/core/registries.ts +96 -0
  257. package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  258. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  259. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  260. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  261. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  262. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  263. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  264. package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  265. package/node_modules/zod/src/v4/core/util.ts +775 -0
  266. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  267. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  268. package/node_modules/zod/src/v4/index.ts +4 -0
  269. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  270. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  271. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  272. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  273. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  274. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  275. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  276. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  277. package/node_modules/zod/src/v4/locales/es.ts +125 -0
  278. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  279. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  280. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  281. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  282. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  283. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  284. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  285. package/node_modules/zod/src/v4/locales/index.ts +39 -0
  286. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  287. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  288. package/node_modules/zod/src/v4/locales/kh.ts +126 -0
  289. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  290. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  291. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  292. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  293. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  294. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  295. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  296. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  297. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  298. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  299. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  300. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  301. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  302. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  303. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  304. package/node_modules/zod/src/v4/locales/ua.ts +126 -0
  305. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  306. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  307. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  308. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  309. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  310. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  311. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  312. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  313. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  314. package/node_modules/zod/src/v4/mini/parse.ts +1 -0
  315. package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  316. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  317. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  318. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  319. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  320. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  321. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  322. package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  323. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  324. package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  325. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  326. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  327. package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  328. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  329. package/node_modules/zod/v3/ZodError.cjs +138 -0
  330. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  331. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  332. package/node_modules/zod/v3/ZodError.js +133 -0
  333. package/node_modules/zod/v3/errors.cjs +17 -0
  334. package/node_modules/zod/v3/errors.d.cts +5 -0
  335. package/node_modules/zod/v3/errors.d.ts +5 -0
  336. package/node_modules/zod/v3/errors.js +9 -0
  337. package/node_modules/zod/v3/external.cjs +22 -0
  338. package/node_modules/zod/v3/external.d.cts +6 -0
  339. package/node_modules/zod/v3/external.d.ts +6 -0
  340. package/node_modules/zod/v3/external.js +6 -0
  341. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  342. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  343. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  344. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  345. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  346. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  347. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  348. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  349. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  350. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  351. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  352. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  353. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  354. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  355. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  356. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  357. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  358. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  359. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  360. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  361. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  362. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  363. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  364. package/node_modules/zod/v3/helpers/util.js +133 -0
  365. package/node_modules/zod/v3/index.cjs +33 -0
  366. package/node_modules/zod/v3/index.d.cts +4 -0
  367. package/node_modules/zod/v3/index.d.ts +4 -0
  368. package/node_modules/zod/v3/index.js +4 -0
  369. package/node_modules/zod/v3/locales/en.cjs +111 -0
  370. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  371. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  372. package/node_modules/zod/v3/locales/en.js +109 -0
  373. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  374. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  375. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  376. package/node_modules/zod/v3/standard-schema.js +1 -0
  377. package/node_modules/zod/v3/types.cjs +3775 -0
  378. package/node_modules/zod/v3/types.d.cts +1031 -0
  379. package/node_modules/zod/v3/types.d.ts +1031 -0
  380. package/node_modules/zod/v3/types.js +3693 -0
  381. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  382. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  383. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  384. package/node_modules/zod/v4/classic/checks.js +1 -0
  385. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  386. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  387. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  388. package/node_modules/zod/v4/classic/coerce.js +17 -0
  389. package/node_modules/zod/v4/classic/compat.cjs +57 -0
  390. package/node_modules/zod/v4/classic/compat.d.cts +46 -0
  391. package/node_modules/zod/v4/classic/compat.d.ts +46 -0
  392. package/node_modules/zod/v4/classic/compat.js +27 -0
  393. package/node_modules/zod/v4/classic/errors.cjs +67 -0
  394. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  395. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  396. package/node_modules/zod/v4/classic/errors.js +41 -0
  397. package/node_modules/zod/v4/classic/external.cjs +70 -0
  398. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  399. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  400. package/node_modules/zod/v4/classic/external.js +18 -0
  401. package/node_modules/zod/v4/classic/index.cjs +33 -0
  402. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  403. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  404. package/node_modules/zod/v4/classic/index.js +4 -0
  405. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  406. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  407. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  408. package/node_modules/zod/v4/classic/iso.js +30 -0
  409. package/node_modules/zod/v4/classic/parse.cjs +32 -0
  410. package/node_modules/zod/v4/classic/parse.d.cts +23 -0
  411. package/node_modules/zod/v4/classic/parse.d.ts +23 -0
  412. package/node_modules/zod/v4/classic/parse.js +6 -0
  413. package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  414. package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  415. package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  416. package/node_modules/zod/v4/classic/schemas.js +1006 -0
  417. package/node_modules/zod/v4/core/api.cjs +1039 -0
  418. package/node_modules/zod/v4/core/api.d.cts +284 -0
  419. package/node_modules/zod/v4/core/api.d.ts +284 -0
  420. package/node_modules/zod/v4/core/api.js +906 -0
  421. package/node_modules/zod/v4/core/checks.cjs +591 -0
  422. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  423. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  424. package/node_modules/zod/v4/core/checks.js +565 -0
  425. package/node_modules/zod/v4/core/core.cjs +67 -0
  426. package/node_modules/zod/v4/core/core.d.cts +49 -0
  427. package/node_modules/zod/v4/core/core.d.ts +49 -0
  428. package/node_modules/zod/v4/core/core.js +61 -0
  429. package/node_modules/zod/v4/core/doc.cjs +39 -0
  430. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  431. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  432. package/node_modules/zod/v4/core/doc.js +35 -0
  433. package/node_modules/zod/v4/core/errors.cjs +226 -0
  434. package/node_modules/zod/v4/core/errors.d.cts +208 -0
  435. package/node_modules/zod/v4/core/errors.d.ts +208 -0
  436. package/node_modules/zod/v4/core/errors.js +195 -0
  437. package/node_modules/zod/v4/core/function.cjs +102 -0
  438. package/node_modules/zod/v4/core/function.d.cts +52 -0
  439. package/node_modules/zod/v4/core/function.d.ts +52 -0
  440. package/node_modules/zod/v4/core/function.js +75 -0
  441. package/node_modules/zod/v4/core/index.cjs +44 -0
  442. package/node_modules/zod/v4/core/index.d.cts +15 -0
  443. package/node_modules/zod/v4/core/index.d.ts +15 -0
  444. package/node_modules/zod/v4/core/index.js +15 -0
  445. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  446. package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  447. package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  448. package/node_modules/zod/v4/core/json-schema.js +1 -0
  449. package/node_modules/zod/v4/core/parse.cjs +87 -0
  450. package/node_modules/zod/v4/core/parse.d.cts +25 -0
  451. package/node_modules/zod/v4/core/parse.d.ts +25 -0
  452. package/node_modules/zod/v4/core/parse.js +57 -0
  453. package/node_modules/zod/v4/core/regexes.cjs +103 -0
  454. package/node_modules/zod/v4/core/regexes.d.cts +62 -0
  455. package/node_modules/zod/v4/core/regexes.d.ts +62 -0
  456. package/node_modules/zod/v4/core/regexes.js +95 -0
  457. package/node_modules/zod/v4/core/registries.cjs +56 -0
  458. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  459. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  460. package/node_modules/zod/v4/core/registries.js +51 -0
  461. package/node_modules/zod/v4/core/schemas.cjs +1748 -0
  462. package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  463. package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  464. package/node_modules/zod/v4/core/schemas.js +1717 -0
  465. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  466. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  467. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  468. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  469. package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  470. package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  471. package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  472. package/node_modules/zod/v4/core/to-json-schema.js +849 -0
  473. package/node_modules/zod/v4/core/util.cjs +539 -0
  474. package/node_modules/zod/v4/core/util.d.cts +183 -0
  475. package/node_modules/zod/v4/core/util.d.ts +183 -0
  476. package/node_modules/zod/v4/core/util.js +493 -0
  477. package/node_modules/zod/v4/core/versions.cjs +8 -0
  478. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  479. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  480. package/node_modules/zod/v4/core/versions.js +5 -0
  481. package/node_modules/zod/v4/index.cjs +22 -0
  482. package/node_modules/zod/v4/index.d.cts +3 -0
  483. package/node_modules/zod/v4/index.d.ts +3 -0
  484. package/node_modules/zod/v4/index.js +3 -0
  485. package/node_modules/zod/v4/locales/ar.cjs +142 -0
  486. package/node_modules/zod/v4/locales/ar.d.cts +4 -0
  487. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  488. package/node_modules/zod/v4/locales/ar.js +116 -0
  489. package/node_modules/zod/v4/locales/az.cjs +141 -0
  490. package/node_modules/zod/v4/locales/az.d.cts +4 -0
  491. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  492. package/node_modules/zod/v4/locales/az.js +115 -0
  493. package/node_modules/zod/v4/locales/be.cjs +190 -0
  494. package/node_modules/zod/v4/locales/be.d.cts +4 -0
  495. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  496. package/node_modules/zod/v4/locales/be.js +164 -0
  497. package/node_modules/zod/v4/locales/ca.cjs +144 -0
  498. package/node_modules/zod/v4/locales/ca.d.cts +4 -0
  499. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  500. package/node_modules/zod/v4/locales/ca.js +118 -0
  501. package/node_modules/zod/v4/locales/cs.cjs +161 -0
  502. package/node_modules/zod/v4/locales/cs.d.cts +4 -0
  503. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  504. package/node_modules/zod/v4/locales/cs.js +135 -0
  505. package/node_modules/zod/v4/locales/de.cjs +142 -0
  506. package/node_modules/zod/v4/locales/de.d.cts +4 -0
  507. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  508. package/node_modules/zod/v4/locales/de.js +116 -0
  509. package/node_modules/zod/v4/locales/en.cjs +145 -0
  510. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  511. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  512. package/node_modules/zod/v4/locales/en.js +117 -0
  513. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  514. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  515. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  516. package/node_modules/zod/v4/locales/eo.js +116 -0
  517. package/node_modules/zod/v4/locales/es.cjs +143 -0
  518. package/node_modules/zod/v4/locales/es.d.cts +4 -0
  519. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  520. package/node_modules/zod/v4/locales/es.js +117 -0
  521. package/node_modules/zod/v4/locales/fa.cjs +148 -0
  522. package/node_modules/zod/v4/locales/fa.d.cts +4 -0
  523. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  524. package/node_modules/zod/v4/locales/fa.js +122 -0
  525. package/node_modules/zod/v4/locales/fi.cjs +148 -0
  526. package/node_modules/zod/v4/locales/fi.d.cts +4 -0
  527. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  528. package/node_modules/zod/v4/locales/fi.js +122 -0
  529. package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  530. package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  531. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  532. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  533. package/node_modules/zod/v4/locales/fr.cjs +142 -0
  534. package/node_modules/zod/v4/locales/fr.d.cts +4 -0
  535. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  536. package/node_modules/zod/v4/locales/fr.js +116 -0
  537. package/node_modules/zod/v4/locales/he.cjs +143 -0
  538. package/node_modules/zod/v4/locales/he.d.cts +4 -0
  539. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  540. package/node_modules/zod/v4/locales/he.js +117 -0
  541. package/node_modules/zod/v4/locales/hu.cjs +143 -0
  542. package/node_modules/zod/v4/locales/hu.d.cts +4 -0
  543. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  544. package/node_modules/zod/v4/locales/hu.js +117 -0
  545. package/node_modules/zod/v4/locales/id.cjs +142 -0
  546. package/node_modules/zod/v4/locales/id.d.cts +4 -0
  547. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  548. package/node_modules/zod/v4/locales/id.js +116 -0
  549. package/node_modules/zod/v4/locales/index.cjs +84 -0
  550. package/node_modules/zod/v4/locales/index.d.cts +39 -0
  551. package/node_modules/zod/v4/locales/index.d.ts +39 -0
  552. package/node_modules/zod/v4/locales/index.js +39 -0
  553. package/node_modules/zod/v4/locales/it.cjs +143 -0
  554. package/node_modules/zod/v4/locales/it.d.cts +4 -0
  555. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  556. package/node_modules/zod/v4/locales/it.js +117 -0
  557. package/node_modules/zod/v4/locales/ja.cjs +141 -0
  558. package/node_modules/zod/v4/locales/ja.d.cts +4 -0
  559. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  560. package/node_modules/zod/v4/locales/ja.js +115 -0
  561. package/node_modules/zod/v4/locales/kh.cjs +143 -0
  562. package/node_modules/zod/v4/locales/kh.d.cts +4 -0
  563. package/node_modules/zod/v4/locales/kh.d.ts +4 -0
  564. package/node_modules/zod/v4/locales/kh.js +117 -0
  565. package/node_modules/zod/v4/locales/ko.cjs +147 -0
  566. package/node_modules/zod/v4/locales/ko.d.cts +4 -0
  567. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  568. package/node_modules/zod/v4/locales/ko.js +121 -0
  569. package/node_modules/zod/v4/locales/mk.cjs +144 -0
  570. package/node_modules/zod/v4/locales/mk.d.cts +4 -0
  571. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  572. package/node_modules/zod/v4/locales/mk.js +118 -0
  573. package/node_modules/zod/v4/locales/ms.cjs +142 -0
  574. package/node_modules/zod/v4/locales/ms.d.cts +4 -0
  575. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  576. package/node_modules/zod/v4/locales/ms.js +116 -0
  577. package/node_modules/zod/v4/locales/nl.cjs +143 -0
  578. package/node_modules/zod/v4/locales/nl.d.cts +4 -0
  579. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  580. package/node_modules/zod/v4/locales/nl.js +117 -0
  581. package/node_modules/zod/v4/locales/no.cjs +142 -0
  582. package/node_modules/zod/v4/locales/no.d.cts +4 -0
  583. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  584. package/node_modules/zod/v4/locales/no.js +116 -0
  585. package/node_modules/zod/v4/locales/ota.cjs +143 -0
  586. package/node_modules/zod/v4/locales/ota.d.cts +4 -0
  587. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  588. package/node_modules/zod/v4/locales/ota.js +117 -0
  589. package/node_modules/zod/v4/locales/pl.cjs +143 -0
  590. package/node_modules/zod/v4/locales/pl.d.cts +4 -0
  591. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  592. package/node_modules/zod/v4/locales/pl.js +117 -0
  593. package/node_modules/zod/v4/locales/ps.cjs +148 -0
  594. package/node_modules/zod/v4/locales/ps.d.cts +4 -0
  595. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  596. package/node_modules/zod/v4/locales/ps.js +122 -0
  597. package/node_modules/zod/v4/locales/pt.cjs +142 -0
  598. package/node_modules/zod/v4/locales/pt.d.cts +4 -0
  599. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  600. package/node_modules/zod/v4/locales/pt.js +116 -0
  601. package/node_modules/zod/v4/locales/ru.cjs +190 -0
  602. package/node_modules/zod/v4/locales/ru.d.cts +4 -0
  603. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  604. package/node_modules/zod/v4/locales/ru.js +164 -0
  605. package/node_modules/zod/v4/locales/sl.cjs +143 -0
  606. package/node_modules/zod/v4/locales/sl.d.cts +4 -0
  607. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  608. package/node_modules/zod/v4/locales/sl.js +117 -0
  609. package/node_modules/zod/v4/locales/sv.cjs +144 -0
  610. package/node_modules/zod/v4/locales/sv.d.cts +4 -0
  611. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  612. package/node_modules/zod/v4/locales/sv.js +118 -0
  613. package/node_modules/zod/v4/locales/ta.cjs +143 -0
  614. package/node_modules/zod/v4/locales/ta.d.cts +4 -0
  615. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  616. package/node_modules/zod/v4/locales/ta.js +117 -0
  617. package/node_modules/zod/v4/locales/th.cjs +143 -0
  618. package/node_modules/zod/v4/locales/th.d.cts +4 -0
  619. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  620. package/node_modules/zod/v4/locales/th.js +117 -0
  621. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  622. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  623. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  624. package/node_modules/zod/v4/locales/tr.js +115 -0
  625. package/node_modules/zod/v4/locales/ua.cjs +143 -0
  626. package/node_modules/zod/v4/locales/ua.d.cts +4 -0
  627. package/node_modules/zod/v4/locales/ua.d.ts +4 -0
  628. package/node_modules/zod/v4/locales/ua.js +117 -0
  629. package/node_modules/zod/v4/locales/ur.cjs +143 -0
  630. package/node_modules/zod/v4/locales/ur.d.cts +4 -0
  631. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  632. package/node_modules/zod/v4/locales/ur.js +117 -0
  633. package/node_modules/zod/v4/locales/vi.cjs +142 -0
  634. package/node_modules/zod/v4/locales/vi.d.cts +4 -0
  635. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  636. package/node_modules/zod/v4/locales/vi.js +116 -0
  637. package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  638. package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  639. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  640. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  641. package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  642. package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  643. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  644. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  645. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  646. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  647. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  648. package/node_modules/zod/v4/mini/checks.js +1 -0
  649. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  650. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  651. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  652. package/node_modules/zod/v4/mini/coerce.js +17 -0
  653. package/node_modules/zod/v4/mini/external.cjs +62 -0
  654. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  655. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  656. package/node_modules/zod/v4/mini/external.js +13 -0
  657. package/node_modules/zod/v4/mini/index.cjs +32 -0
  658. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  659. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  660. package/node_modules/zod/v4/mini/index.js +3 -0
  661. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  662. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  663. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  664. package/node_modules/zod/v4/mini/iso.js +30 -0
  665. package/node_modules/zod/v4/mini/parse.cjs +8 -0
  666. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  667. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  668. package/node_modules/zod/v4/mini/parse.js +1 -0
  669. package/node_modules/zod/v4/mini/schemas.cjs +839 -0
  670. package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  671. package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  672. package/node_modules/zod/v4/mini/schemas.js +732 -0
  673. package/node_modules/zod/v4-mini/index.cjs +17 -0
  674. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  675. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  676. package/node_modules/zod/v4-mini/index.js +1 -0
  677. package/package.json +5 -1
@@ -0,0 +1,606 @@
1
+ 'use strict';
2
+ ///@ts-check
3
+
4
+ const util = require('../util');
5
+ const xmlNode = require('./xmlNode');
6
+ const readDocType = require("./DocTypeReader");
7
+ const toNumber = require("strnum");
8
+ const getIgnoreAttributesFn = require('../ignoreAttributes')
9
+
10
+ // const regx =
11
+ // '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
12
+ // .replace(/NAME/g, util.nameRegexp);
13
+
14
+ //const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g");
15
+ //const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g");
16
+
17
+ class OrderedObjParser{
18
+ constructor(options){
19
+ this.options = options;
20
+ this.currentNode = null;
21
+ this.tagsNodeStack = [];
22
+ this.docTypeEntities = {};
23
+ this.lastEntities = {
24
+ "apos" : { regex: /&(apos|#39|#x27);/g, val : "'"},
25
+ "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"},
26
+ "lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"},
27
+ "quot" : { regex: /&(quot|#34|#x22);/g, val : "\""},
28
+ };
29
+ this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"};
30
+ this.htmlEntities = {
31
+ "space": { regex: /&(nbsp|#160);/g, val: " " },
32
+ // "lt" : { regex: /&(lt|#60);/g, val: "<" },
33
+ // "gt" : { regex: /&(gt|#62);/g, val: ">" },
34
+ // "amp" : { regex: /&(amp|#38);/g, val: "&" },
35
+ // "quot" : { regex: /&(quot|#34);/g, val: "\"" },
36
+ // "apos" : { regex: /&(apos|#39);/g, val: "'" },
37
+ "cent" : { regex: /&(cent|#162);/g, val: "¢" },
38
+ "pound" : { regex: /&(pound|#163);/g, val: "£" },
39
+ "yen" : { regex: /&(yen|#165);/g, val: "¥" },
40
+ "euro" : { regex: /&(euro|#8364);/g, val: "€" },
41
+ "copyright" : { regex: /&(copy|#169);/g, val: "©" },
42
+ "reg" : { regex: /&(reg|#174);/g, val: "®" },
43
+ "inr" : { regex: /&(inr|#8377);/g, val: "₹" },
44
+ "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },
45
+ "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) },
46
+ };
47
+ this.addExternalEntities = addExternalEntities;
48
+ this.parseXml = parseXml;
49
+ this.parseTextData = parseTextData;
50
+ this.resolveNameSpace = resolveNameSpace;
51
+ this.buildAttributesMap = buildAttributesMap;
52
+ this.isItStopNode = isItStopNode;
53
+ this.replaceEntitiesValue = replaceEntitiesValue;
54
+ this.readStopNodeData = readStopNodeData;
55
+ this.saveTextToParentTag = saveTextToParentTag;
56
+ this.addChild = addChild;
57
+ this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)
58
+ }
59
+
60
+ }
61
+
62
+ function addExternalEntities(externalEntities){
63
+ const entKeys = Object.keys(externalEntities);
64
+ for (let i = 0; i < entKeys.length; i++) {
65
+ const ent = entKeys[i];
66
+ this.lastEntities[ent] = {
67
+ regex: new RegExp("&"+ent+";","g"),
68
+ val : externalEntities[ent]
69
+ }
70
+ }
71
+ }
72
+
73
+ /**
74
+ * @param {string} val
75
+ * @param {string} tagName
76
+ * @param {string} jPath
77
+ * @param {boolean} dontTrim
78
+ * @param {boolean} hasAttributes
79
+ * @param {boolean} isLeafNode
80
+ * @param {boolean} escapeEntities
81
+ */
82
+ function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {
83
+ if (val !== undefined) {
84
+ if (this.options.trimValues && !dontTrim) {
85
+ val = val.trim();
86
+ }
87
+ if(val.length > 0){
88
+ if(!escapeEntities) val = this.replaceEntitiesValue(val);
89
+
90
+ const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);
91
+ if(newval === null || newval === undefined){
92
+ //don't parse
93
+ return val;
94
+ }else if(typeof newval !== typeof val || newval !== val){
95
+ //overwrite
96
+ return newval;
97
+ }else if(this.options.trimValues){
98
+ return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);
99
+ }else{
100
+ const trimmedVal = val.trim();
101
+ if(trimmedVal === val){
102
+ return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);
103
+ }else{
104
+ return val;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
+ function resolveNameSpace(tagname) {
112
+ if (this.options.removeNSPrefix) {
113
+ const tags = tagname.split(':');
114
+ const prefix = tagname.charAt(0) === '/' ? '/' : '';
115
+ if (tags[0] === 'xmlns') {
116
+ return '';
117
+ }
118
+ if (tags.length === 2) {
119
+ tagname = prefix + tags[1];
120
+ }
121
+ }
122
+ return tagname;
123
+ }
124
+
125
+ //TODO: change regex to capture NS
126
+ //const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm");
127
+ const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm');
128
+
129
+ function buildAttributesMap(attrStr, jPath, tagName) {
130
+ if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') {
131
+ // attrStr = attrStr.replace(/\r?\n/g, ' ');
132
+ //attrStr = attrStr || attrStr.trim();
133
+
134
+ const matches = util.getAllMatches(attrStr, attrsRegx);
135
+ const len = matches.length; //don't make it inline
136
+ const attrs = {};
137
+ for (let i = 0; i < len; i++) {
138
+ const attrName = this.resolveNameSpace(matches[i][1]);
139
+ if (this.ignoreAttributesFn(attrName, jPath)) {
140
+ continue
141
+ }
142
+ let oldVal = matches[i][4];
143
+ let aName = this.options.attributeNamePrefix + attrName;
144
+ if (attrName.length) {
145
+ if (this.options.transformAttributeName) {
146
+ aName = this.options.transformAttributeName(aName);
147
+ }
148
+ if(aName === "__proto__") aName = "#__proto__";
149
+ if (oldVal !== undefined) {
150
+ if (this.options.trimValues) {
151
+ oldVal = oldVal.trim();
152
+ }
153
+ oldVal = this.replaceEntitiesValue(oldVal);
154
+ const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);
155
+ if(newVal === null || newVal === undefined){
156
+ //don't parse
157
+ attrs[aName] = oldVal;
158
+ }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){
159
+ //overwrite
160
+ attrs[aName] = newVal;
161
+ }else{
162
+ //parse
163
+ attrs[aName] = parseValue(
164
+ oldVal,
165
+ this.options.parseAttributeValue,
166
+ this.options.numberParseOptions
167
+ );
168
+ }
169
+ } else if (this.options.allowBooleanAttributes) {
170
+ attrs[aName] = true;
171
+ }
172
+ }
173
+ }
174
+ if (!Object.keys(attrs).length) {
175
+ return;
176
+ }
177
+ if (this.options.attributesGroupName) {
178
+ const attrCollection = {};
179
+ attrCollection[this.options.attributesGroupName] = attrs;
180
+ return attrCollection;
181
+ }
182
+ return attrs
183
+ }
184
+ }
185
+
186
+ const parseXml = function(xmlData) {
187
+ xmlData = xmlData.replace(/\r\n?/g, "\n"); //TODO: remove this line
188
+ const xmlObj = new xmlNode('!xml');
189
+ let currentNode = xmlObj;
190
+ let textData = "";
191
+ let jPath = "";
192
+ for(let i=0; i< xmlData.length; i++){//for each char in XML data
193
+ const ch = xmlData[i];
194
+ if(ch === '<'){
195
+ // const nextIndex = i+1;
196
+ // const _2ndChar = xmlData[nextIndex];
197
+ if( xmlData[i+1] === '/') {//Closing Tag
198
+ const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.")
199
+ let tagName = xmlData.substring(i+2,closeIndex).trim();
200
+
201
+ if(this.options.removeNSPrefix){
202
+ const colonIndex = tagName.indexOf(":");
203
+ if(colonIndex !== -1){
204
+ tagName = tagName.substr(colonIndex+1);
205
+ }
206
+ }
207
+
208
+ if(this.options.transformTagName) {
209
+ tagName = this.options.transformTagName(tagName);
210
+ }
211
+
212
+ if(currentNode){
213
+ textData = this.saveTextToParentTag(textData, currentNode, jPath);
214
+ }
215
+
216
+ //check if last tag of nested tag was unpaired tag
217
+ const lastTagName = jPath.substring(jPath.lastIndexOf(".")+1);
218
+ if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){
219
+ throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);
220
+ }
221
+ let propIndex = 0
222
+ if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){
223
+ propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1)
224
+ this.tagsNodeStack.pop();
225
+ }else{
226
+ propIndex = jPath.lastIndexOf(".");
227
+ }
228
+ jPath = jPath.substring(0, propIndex);
229
+
230
+ currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope
231
+ textData = "";
232
+ i = closeIndex;
233
+ } else if( xmlData[i+1] === '?') {
234
+
235
+ let tagData = readTagExp(xmlData,i, false, "?>");
236
+ if(!tagData) throw new Error("Pi Tag is not closed.");
237
+
238
+ textData = this.saveTextToParentTag(textData, currentNode, jPath);
239
+ if( (this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags){
240
+
241
+ }else{
242
+
243
+ const childNode = new xmlNode(tagData.tagName);
244
+ childNode.add(this.options.textNodeName, "");
245
+
246
+ if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){
247
+ childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);
248
+ }
249
+ this.addChild(currentNode, childNode, jPath)
250
+
251
+ }
252
+
253
+
254
+ i = tagData.closeIndex + 1;
255
+ } else if(xmlData.substr(i + 1, 3) === '!--') {
256
+ const endIndex = findClosingIndex(xmlData, "-->", i+4, "Comment is not closed.")
257
+ if(this.options.commentPropName){
258
+ const comment = xmlData.substring(i + 4, endIndex - 2);
259
+
260
+ textData = this.saveTextToParentTag(textData, currentNode, jPath);
261
+
262
+ currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);
263
+ }
264
+ i = endIndex;
265
+ } else if( xmlData.substr(i + 1, 2) === '!D') {
266
+ const result = readDocType(xmlData, i);
267
+ this.docTypeEntities = result.entities;
268
+ i = result.i;
269
+ }else if(xmlData.substr(i + 1, 2) === '![') {
270
+ const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2;
271
+ const tagExp = xmlData.substring(i + 9,closeIndex);
272
+
273
+ textData = this.saveTextToParentTag(textData, currentNode, jPath);
274
+
275
+ let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);
276
+ if(val == undefined) val = "";
277
+
278
+ //cdata should be set even if it is 0 length string
279
+ if(this.options.cdataPropName){
280
+ currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);
281
+ }else{
282
+ currentNode.add(this.options.textNodeName, val);
283
+ }
284
+
285
+ i = closeIndex + 2;
286
+ }else {//Opening tag
287
+ let result = readTagExp(xmlData,i, this.options.removeNSPrefix);
288
+ let tagName= result.tagName;
289
+ const rawTagName = result.rawTagName;
290
+ let tagExp = result.tagExp;
291
+ let attrExpPresent = result.attrExpPresent;
292
+ let closeIndex = result.closeIndex;
293
+
294
+ if (this.options.transformTagName) {
295
+ tagName = this.options.transformTagName(tagName);
296
+ }
297
+
298
+ //save text as child node
299
+ if (currentNode && textData) {
300
+ if(currentNode.tagname !== '!xml'){
301
+ //when nested tag is found
302
+ textData = this.saveTextToParentTag(textData, currentNode, jPath, false);
303
+ }
304
+ }
305
+
306
+ //check if last tag was unpaired tag
307
+ const lastTag = currentNode;
308
+ if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){
309
+ currentNode = this.tagsNodeStack.pop();
310
+ jPath = jPath.substring(0, jPath.lastIndexOf("."));
311
+ }
312
+ if(tagName !== xmlObj.tagname){
313
+ jPath += jPath ? "." + tagName : tagName;
314
+ }
315
+ if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {
316
+ let tagContent = "";
317
+ //self-closing tag
318
+ if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){
319
+ if(tagName[tagName.length - 1] === "/"){ //remove trailing '/'
320
+ tagName = tagName.substr(0, tagName.length - 1);
321
+ jPath = jPath.substr(0, jPath.length - 1);
322
+ tagExp = tagName;
323
+ }else{
324
+ tagExp = tagExp.substr(0, tagExp.length - 1);
325
+ }
326
+ i = result.closeIndex;
327
+ }
328
+ //unpaired tag
329
+ else if(this.options.unpairedTags.indexOf(tagName) !== -1){
330
+
331
+ i = result.closeIndex;
332
+ }
333
+ //normal tag
334
+ else{
335
+ //read until closing tag is found
336
+ const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);
337
+ if(!result) throw new Error(`Unexpected end of ${rawTagName}`);
338
+ i = result.i;
339
+ tagContent = result.tagContent;
340
+ }
341
+
342
+ const childNode = new xmlNode(tagName);
343
+ if(tagName !== tagExp && attrExpPresent){
344
+ childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
345
+ }
346
+ if(tagContent) {
347
+ tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);
348
+ }
349
+
350
+ jPath = jPath.substr(0, jPath.lastIndexOf("."));
351
+ childNode.add(this.options.textNodeName, tagContent);
352
+
353
+ this.addChild(currentNode, childNode, jPath)
354
+ }else{
355
+ //selfClosing tag
356
+ if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){
357
+ if(tagName[tagName.length - 1] === "/"){ //remove trailing '/'
358
+ tagName = tagName.substr(0, tagName.length - 1);
359
+ jPath = jPath.substr(0, jPath.length - 1);
360
+ tagExp = tagName;
361
+ }else{
362
+ tagExp = tagExp.substr(0, tagExp.length - 1);
363
+ }
364
+
365
+ if(this.options.transformTagName) {
366
+ tagName = this.options.transformTagName(tagName);
367
+ }
368
+
369
+ const childNode = new xmlNode(tagName);
370
+ if(tagName !== tagExp && attrExpPresent){
371
+ childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
372
+ }
373
+ this.addChild(currentNode, childNode, jPath)
374
+ jPath = jPath.substr(0, jPath.lastIndexOf("."));
375
+ }
376
+ //opening tag
377
+ else{
378
+ const childNode = new xmlNode( tagName);
379
+ this.tagsNodeStack.push(currentNode);
380
+
381
+ if(tagName !== tagExp && attrExpPresent){
382
+ childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
383
+ }
384
+ this.addChild(currentNode, childNode, jPath)
385
+ currentNode = childNode;
386
+ }
387
+ textData = "";
388
+ i = closeIndex;
389
+ }
390
+ }
391
+ }else{
392
+ textData += xmlData[i];
393
+ }
394
+ }
395
+ return xmlObj.child;
396
+ }
397
+
398
+ function addChild(currentNode, childNode, jPath){
399
+ const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"])
400
+ if(result === false){
401
+ }else if(typeof result === "string"){
402
+ childNode.tagname = result
403
+ currentNode.addChild(childNode);
404
+ }else{
405
+ currentNode.addChild(childNode);
406
+ }
407
+ }
408
+
409
+ const replaceEntitiesValue = function(val){
410
+
411
+ if(this.options.processEntities){
412
+ for(let entityName in this.docTypeEntities){
413
+ const entity = this.docTypeEntities[entityName];
414
+ val = val.replace( entity.regx, entity.val);
415
+ }
416
+ for(let entityName in this.lastEntities){
417
+ const entity = this.lastEntities[entityName];
418
+ val = val.replace( entity.regex, entity.val);
419
+ }
420
+ if(this.options.htmlEntities){
421
+ for(let entityName in this.htmlEntities){
422
+ const entity = this.htmlEntities[entityName];
423
+ val = val.replace( entity.regex, entity.val);
424
+ }
425
+ }
426
+ val = val.replace( this.ampEntity.regex, this.ampEntity.val);
427
+ }
428
+ return val;
429
+ }
430
+ function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {
431
+ if (textData) { //store previously collected data as textNode
432
+ if(isLeafNode === undefined) isLeafNode = currentNode.child.length === 0
433
+
434
+ textData = this.parseTextData(textData,
435
+ currentNode.tagname,
436
+ jPath,
437
+ false,
438
+ currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false,
439
+ isLeafNode);
440
+
441
+ if (textData !== undefined && textData !== "")
442
+ currentNode.add(this.options.textNodeName, textData);
443
+ textData = "";
444
+ }
445
+ return textData;
446
+ }
447
+
448
+ //TODO: use jPath to simplify the logic
449
+ /**
450
+ *
451
+ * @param {string[]} stopNodes
452
+ * @param {string} jPath
453
+ * @param {string} currentTagName
454
+ */
455
+ function isItStopNode(stopNodes, jPath, currentTagName){
456
+ const allNodesExp = "*." + currentTagName;
457
+ for (const stopNodePath in stopNodes) {
458
+ const stopNodeExp = stopNodes[stopNodePath];
459
+ if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;
460
+ }
461
+ return false;
462
+ }
463
+
464
+ /**
465
+ * Returns the tag Expression and where it is ending handling single-double quotes situation
466
+ * @param {string} xmlData
467
+ * @param {number} i starting index
468
+ * @returns
469
+ */
470
+ function tagExpWithClosingIndex(xmlData, i, closingChar = ">"){
471
+ let attrBoundary;
472
+ let tagExp = "";
473
+ for (let index = i; index < xmlData.length; index++) {
474
+ let ch = xmlData[index];
475
+ if (attrBoundary) {
476
+ if (ch === attrBoundary) attrBoundary = "";//reset
477
+ } else if (ch === '"' || ch === "'") {
478
+ attrBoundary = ch;
479
+ } else if (ch === closingChar[0]) {
480
+ if(closingChar[1]){
481
+ if(xmlData[index + 1] === closingChar[1]){
482
+ return {
483
+ data: tagExp,
484
+ index: index
485
+ }
486
+ }
487
+ }else{
488
+ return {
489
+ data: tagExp,
490
+ index: index
491
+ }
492
+ }
493
+ } else if (ch === '\t') {
494
+ ch = " "
495
+ }
496
+ tagExp += ch;
497
+ }
498
+ }
499
+
500
+ function findClosingIndex(xmlData, str, i, errMsg){
501
+ const closingIndex = xmlData.indexOf(str, i);
502
+ if(closingIndex === -1){
503
+ throw new Error(errMsg)
504
+ }else{
505
+ return closingIndex + str.length - 1;
506
+ }
507
+ }
508
+
509
+ function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){
510
+ const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);
511
+ if(!result) return;
512
+ let tagExp = result.data;
513
+ const closeIndex = result.index;
514
+ const separatorIndex = tagExp.search(/\s/);
515
+ let tagName = tagExp;
516
+ let attrExpPresent = true;
517
+ if(separatorIndex !== -1){//separate tag name and attributes expression
518
+ tagName = tagExp.substring(0, separatorIndex);
519
+ tagExp = tagExp.substring(separatorIndex + 1).trimStart();
520
+ }
521
+
522
+ const rawTagName = tagName;
523
+ if(removeNSPrefix){
524
+ const colonIndex = tagName.indexOf(":");
525
+ if(colonIndex !== -1){
526
+ tagName = tagName.substr(colonIndex+1);
527
+ attrExpPresent = tagName !== result.data.substr(colonIndex + 1);
528
+ }
529
+ }
530
+
531
+ return {
532
+ tagName: tagName,
533
+ tagExp: tagExp,
534
+ closeIndex: closeIndex,
535
+ attrExpPresent: attrExpPresent,
536
+ rawTagName: rawTagName,
537
+ }
538
+ }
539
+ /**
540
+ * find paired tag for a stop node
541
+ * @param {string} xmlData
542
+ * @param {string} tagName
543
+ * @param {number} i
544
+ */
545
+ function readStopNodeData(xmlData, tagName, i){
546
+ const startIndex = i;
547
+ // Starting at 1 since we already have an open tag
548
+ let openTagCount = 1;
549
+
550
+ for (; i < xmlData.length; i++) {
551
+ if( xmlData[i] === "<"){
552
+ if (xmlData[i+1] === "/") {//close tag
553
+ const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`);
554
+ let closeTagName = xmlData.substring(i+2,closeIndex).trim();
555
+ if(closeTagName === tagName){
556
+ openTagCount--;
557
+ if (openTagCount === 0) {
558
+ return {
559
+ tagContent: xmlData.substring(startIndex, i),
560
+ i : closeIndex
561
+ }
562
+ }
563
+ }
564
+ i=closeIndex;
565
+ } else if(xmlData[i+1] === '?') {
566
+ const closeIndex = findClosingIndex(xmlData, "?>", i+1, "StopNode is not closed.")
567
+ i=closeIndex;
568
+ } else if(xmlData.substr(i + 1, 3) === '!--') {
569
+ const closeIndex = findClosingIndex(xmlData, "-->", i+3, "StopNode is not closed.")
570
+ i=closeIndex;
571
+ } else if(xmlData.substr(i + 1, 2) === '![') {
572
+ const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2;
573
+ i=closeIndex;
574
+ } else {
575
+ const tagData = readTagExp(xmlData, i, '>')
576
+
577
+ if (tagData) {
578
+ const openTagName = tagData && tagData.tagName;
579
+ if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== "/") {
580
+ openTagCount++;
581
+ }
582
+ i=tagData.closeIndex;
583
+ }
584
+ }
585
+ }
586
+ }//end for loop
587
+ }
588
+
589
+ function parseValue(val, shouldParse, options) {
590
+ if (shouldParse && typeof val === 'string') {
591
+ //console.log(options)
592
+ const newval = val.trim();
593
+ if(newval === 'true' ) return true;
594
+ else if(newval === 'false' ) return false;
595
+ else return toNumber(val, options);
596
+ } else {
597
+ if (util.isExist(val)) {
598
+ return val;
599
+ } else {
600
+ return '';
601
+ }
602
+ }
603
+ }
604
+
605
+
606
+ module.exports = OrderedObjParser;
@@ -0,0 +1,58 @@
1
+ const { buildOptions} = require("./OptionsBuilder");
2
+ const OrderedObjParser = require("./OrderedObjParser");
3
+ const { prettify} = require("./node2json");
4
+ const validator = require('../validator');
5
+
6
+ class XMLParser{
7
+
8
+ constructor(options){
9
+ this.externalEntities = {};
10
+ this.options = buildOptions(options);
11
+
12
+ }
13
+ /**
14
+ * Parse XML dats to JS object
15
+ * @param {string|Buffer} xmlData
16
+ * @param {boolean|Object} validationOption
17
+ */
18
+ parse(xmlData,validationOption){
19
+ if(typeof xmlData === "string"){
20
+ }else if( xmlData.toString){
21
+ xmlData = xmlData.toString();
22
+ }else{
23
+ throw new Error("XML data is accepted in String or Bytes[] form.")
24
+ }
25
+ if( validationOption){
26
+ if(validationOption === true) validationOption = {}; //validate with default options
27
+
28
+ const result = validator.validate(xmlData, validationOption);
29
+ if (result !== true) {
30
+ throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` )
31
+ }
32
+ }
33
+ const orderedObjParser = new OrderedObjParser(this.options);
34
+ orderedObjParser.addExternalEntities(this.externalEntities);
35
+ const orderedResult = orderedObjParser.parseXml(xmlData);
36
+ if(this.options.preserveOrder || orderedResult === undefined) return orderedResult;
37
+ else return prettify(orderedResult, this.options);
38
+ }
39
+
40
+ /**
41
+ * Add Entity which is not by default supported by this library
42
+ * @param {string} key
43
+ * @param {string} value
44
+ */
45
+ addEntity(key, value){
46
+ if(value.indexOf("&") !== -1){
47
+ throw new Error("Entity value can't have '&'")
48
+ }else if(key.indexOf("&") !== -1 || key.indexOf(";") !== -1){
49
+ throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'")
50
+ }else if(value === "&"){
51
+ throw new Error("An entity with value '&' is not permitted");
52
+ }else{
53
+ this.externalEntities[key] = value;
54
+ }
55
+ }
56
+ }
57
+
58
+ module.exports = XMLParser;