lakutata 2.0.80 → 2.0.81

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 (394) hide show
  1. package/com/cacher.cjs +8 -10
  2. package/com/cacher.d.ts +83 -14
  3. package/com/cacher.mjs +8 -10
  4. package/com/database.cjs +11 -11
  5. package/com/database.mjs +11 -11
  6. package/com/docker.cjs +17 -19
  7. package/com/docker.d.ts +3 -141
  8. package/com/docker.mjs +13 -15
  9. package/com/entrypoint.cjs +7 -5
  10. package/com/entrypoint.mjs +7 -5
  11. package/com/logger.cjs +7 -7
  12. package/com/logger.mjs +7 -7
  13. package/com/monitor.cjs +5 -3
  14. package/com/monitor.mjs +5 -3
  15. package/decorator/ctrl.cjs +3 -3
  16. package/decorator/ctrl.mjs +3 -3
  17. package/decorator/orm.cjs +98 -98
  18. package/decorator/orm.mjs +142 -56
  19. package/helper.cjs +9 -11
  20. package/helper.mjs +5 -7
  21. package/lakutata.cjs +23 -30
  22. package/lakutata.mjs +14 -18
  23. package/orm.cjs +1423 -886
  24. package/orm.mjs +1474 -724
  25. package/package.json +1 -1
  26. package/provider/database.cjs +11 -11
  27. package/provider/database.mjs +11 -11
  28. package/provider/passwordHash.cjs +4 -2
  29. package/provider/passwordHash.mjs +4 -2
  30. package/src/components/Database.cjs +11 -11
  31. package/src/components/Database.mjs +11 -11
  32. package/src/components/Logger.cjs +7 -7
  33. package/src/components/Logger.mjs +7 -7
  34. package/src/components/cacher/Cacher.cjs +1178 -264
  35. package/src/components/cacher/Cacher.mjs +1087 -173
  36. package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +479 -2963
  37. package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +469 -2947
  38. package/src/components/docker/ConnectionOptionsBuilder.cjs +15 -17
  39. package/src/components/docker/ConnectionOptionsBuilder.mjs +13 -15
  40. package/src/components/docker/Docker.cjs +4884 -4945
  41. package/src/components/docker/Docker.mjs +4902 -4963
  42. package/src/components/docker/lib/DockerContainer.cjs +23 -25
  43. package/src/components/docker/lib/DockerContainer.mjs +17 -19
  44. package/src/components/docker/lib/DockerContainerTTY.cjs +9 -11
  45. package/src/components/docker/lib/DockerContainerTTY.mjs +9 -11
  46. package/src/components/docker/lib/DockerImage.cjs +4 -2
  47. package/src/components/docker/lib/DockerImage.mjs +4 -2
  48. package/src/components/entrypoint/Entrypoint.cjs +2170 -1678
  49. package/src/components/entrypoint/Entrypoint.mjs +2126 -1634
  50. package/src/components/entrypoint/lib/AccessControl.cjs +4 -2
  51. package/src/components/entrypoint/lib/AccessControl.mjs +4 -2
  52. package/src/components/entrypoint/lib/AccessControlRule.cjs +4 -2
  53. package/src/components/entrypoint/lib/AccessControlRule.mjs +4 -2
  54. package/src/components/entrypoint/lib/Controller.cjs +4 -2
  55. package/src/components/entrypoint/lib/Controller.mjs +4 -2
  56. package/src/components/monitor/AliveMonitor.cjs +4 -2
  57. package/src/components/monitor/AliveMonitor.mjs +4 -2
  58. package/src/components/monitor/CpuMonitor.cjs +5 -3
  59. package/src/components/monitor/CpuMonitor.mjs +5 -3
  60. package/src/components/monitor/EventLoopMonitor.cjs +4 -2
  61. package/src/components/monitor/EventLoopMonitor.mjs +4 -2
  62. package/src/components/monitor/HttpRequestMonitor.cjs +5 -3
  63. package/src/components/monitor/HttpRequestMonitor.mjs +5 -3
  64. package/src/components/monitor/MemoryMonitor.cjs +5 -3
  65. package/src/components/monitor/MemoryMonitor.mjs +5 -3
  66. package/src/decorators/ctrl/CLIAction.cjs +3 -3
  67. package/src/decorators/ctrl/CLIAction.mjs +3 -3
  68. package/src/decorators/ctrl/HTTPAction.cjs +3 -3
  69. package/src/decorators/ctrl/HTTPAction.mjs +3 -3
  70. package/src/decorators/ctrl/ServiceAction.cjs +3 -3
  71. package/src/decorators/ctrl/ServiceAction.mjs +3 -3
  72. package/src/decorators/ctrl/http/DELETE.cjs +3 -3
  73. package/src/decorators/ctrl/http/DELETE.mjs +3 -3
  74. package/src/decorators/ctrl/http/GET.cjs +3 -3
  75. package/src/decorators/ctrl/http/GET.mjs +3 -3
  76. package/src/decorators/ctrl/http/HEAD.cjs +3 -3
  77. package/src/decorators/ctrl/http/HEAD.mjs +3 -3
  78. package/src/decorators/ctrl/http/OPTIONS.cjs +3 -3
  79. package/src/decorators/ctrl/http/OPTIONS.mjs +3 -3
  80. package/src/decorators/ctrl/http/PATCH.cjs +3 -3
  81. package/src/decorators/ctrl/http/PATCH.mjs +3 -3
  82. package/src/decorators/ctrl/http/POST.cjs +3 -3
  83. package/src/decorators/ctrl/http/POST.mjs +3 -3
  84. package/src/decorators/ctrl/http/PUT.cjs +3 -3
  85. package/src/decorators/ctrl/http/PUT.mjs +3 -3
  86. package/src/decorators/orm/AfterInsert.cjs +17 -39
  87. package/src/decorators/orm/AfterInsert.mjs +18 -38
  88. package/src/decorators/orm/AfterLoad.cjs +17 -39
  89. package/src/decorators/orm/AfterLoad.mjs +18 -38
  90. package/src/decorators/orm/AfterRecover.cjs +17 -39
  91. package/src/decorators/orm/AfterRecover.mjs +18 -38
  92. package/src/decorators/orm/AfterRemove.cjs +17 -39
  93. package/src/decorators/orm/AfterRemove.mjs +18 -38
  94. package/src/decorators/orm/AfterSoftRemove.cjs +17 -39
  95. package/src/decorators/orm/AfterSoftRemove.mjs +18 -38
  96. package/src/decorators/orm/AfterUpdate.cjs +17 -39
  97. package/src/decorators/orm/AfterUpdate.mjs +18 -38
  98. package/src/decorators/orm/BeforeInsert.cjs +17 -39
  99. package/src/decorators/orm/BeforeInsert.mjs +18 -38
  100. package/src/decorators/orm/BeforeRecover.cjs +17 -39
  101. package/src/decorators/orm/BeforeRecover.mjs +18 -38
  102. package/src/decorators/orm/BeforeRemove.cjs +17 -39
  103. package/src/decorators/orm/BeforeRemove.mjs +18 -38
  104. package/src/decorators/orm/BeforeSoftRemove.cjs +17 -39
  105. package/src/decorators/orm/BeforeSoftRemove.mjs +18 -38
  106. package/src/decorators/orm/BeforeUpdate.cjs +17 -39
  107. package/src/decorators/orm/BeforeUpdate.mjs +18 -38
  108. package/src/decorators/orm/Check.cjs +17 -42
  109. package/src/decorators/orm/Check.mjs +18 -41
  110. package/src/decorators/orm/ChildEntity.cjs +17 -42
  111. package/src/decorators/orm/ChildEntity.mjs +18 -41
  112. package/src/decorators/orm/Column.cjs +17 -74
  113. package/src/decorators/orm/Column.mjs +19 -74
  114. package/src/decorators/orm/CreateDateColumn.cjs +17 -38
  115. package/src/decorators/orm/CreateDateColumn.mjs +18 -37
  116. package/src/decorators/orm/DeleteDateColumn.cjs +17 -38
  117. package/src/decorators/orm/DeleteDateColumn.mjs +17 -36
  118. package/src/decorators/orm/Entity.cjs +17 -48
  119. package/src/decorators/orm/Entity.mjs +17 -46
  120. package/src/decorators/orm/EventSubscriber.cjs +17 -35
  121. package/src/decorators/orm/EventSubscriber.mjs +18 -34
  122. package/src/decorators/orm/Exclusion.cjs +17 -42
  123. package/src/decorators/orm/Exclusion.mjs +18 -41
  124. package/src/decorators/orm/Generated.cjs +17 -37
  125. package/src/decorators/orm/Generated.mjs +18 -36
  126. package/src/decorators/orm/Index.cjs +17 -54
  127. package/src/decorators/orm/Index.mjs +19 -54
  128. package/src/decorators/orm/JoinColumn.cjs +17 -42
  129. package/src/decorators/orm/JoinColumn.mjs +18 -41
  130. package/src/decorators/orm/JoinTable.cjs +17 -43
  131. package/src/decorators/orm/JoinTable.mjs +17 -41
  132. package/src/decorators/orm/ManyToMany.cjs +17 -55
  133. package/src/decorators/orm/ManyToMany.mjs +17 -53
  134. package/src/decorators/orm/ManyToOne.cjs +17 -55
  135. package/src/decorators/orm/ManyToOne.mjs +17 -53
  136. package/src/decorators/orm/ObjectIdColumn.cjs +17 -41
  137. package/src/decorators/orm/ObjectIdColumn.mjs +18 -40
  138. package/src/decorators/orm/OneToMany.cjs +17 -47
  139. package/src/decorators/orm/OneToMany.mjs +19 -47
  140. package/src/decorators/orm/OneToOne.cjs +17 -55
  141. package/src/decorators/orm/OneToOne.mjs +17 -53
  142. package/src/decorators/orm/PrimaryColumn.cjs +17 -62
  143. package/src/decorators/orm/PrimaryColumn.mjs +19 -62
  144. package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -67
  145. package/src/decorators/orm/PrimaryGeneratedColumn.mjs +19 -67
  146. package/src/decorators/orm/RelationId.cjs +17 -39
  147. package/src/decorators/orm/RelationId.mjs +18 -38
  148. package/src/decorators/orm/TableInheritance.cjs +17 -39
  149. package/src/decorators/orm/TableInheritance.mjs +18 -38
  150. package/src/decorators/orm/Tree.cjs +17 -37
  151. package/src/decorators/orm/Tree.mjs +18 -36
  152. package/src/decorators/orm/TreeChildren.cjs +17 -44
  153. package/src/decorators/orm/TreeChildren.mjs +17 -42
  154. package/src/decorators/orm/TreeLevelColumn.cjs +17 -38
  155. package/src/decorators/orm/TreeLevelColumn.mjs +17 -36
  156. package/src/decorators/orm/TreeParent.cjs +17 -44
  157. package/src/decorators/orm/TreeParent.mjs +17 -42
  158. package/src/decorators/orm/Unique.cjs +17 -57
  159. package/src/decorators/orm/Unique.mjs +19 -57
  160. package/src/decorators/orm/UpdateDateColumn.cjs +17 -38
  161. package/src/decorators/orm/UpdateDateColumn.mjs +18 -37
  162. package/src/decorators/orm/VersionColumn.cjs +17 -38
  163. package/src/decorators/orm/VersionColumn.mjs +18 -37
  164. package/src/decorators/orm/ViewColumn.cjs +17 -38
  165. package/src/decorators/orm/ViewColumn.mjs +18 -37
  166. package/src/decorators/orm/ViewEntity.cjs +17 -47
  167. package/src/decorators/orm/ViewEntity.mjs +18 -46
  168. package/src/decorators/orm/VirtualColumn.cjs +17 -55
  169. package/src/decorators/orm/VirtualColumn.mjs +17 -53
  170. package/src/lib/base/BaseObject.cjs +4 -2
  171. package/src/lib/base/BaseObject.mjs +4 -2
  172. package/src/lib/base/EventEmitter.cjs +1200 -1193
  173. package/src/lib/base/EventEmitter.mjs +1201 -1194
  174. package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
  175. package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
  176. package/src/lib/base/internal/ControllerEntrypoint.cjs +3 -3
  177. package/src/lib/base/internal/ControllerEntrypoint.mjs +3 -3
  178. package/src/lib/base/internal/DataValidator.cjs +176 -179
  179. package/src/lib/base/internal/DataValidator.mjs +177 -180
  180. package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
  181. package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
  182. package/src/lib/base/internal/ObjectType.cjs +4 -2
  183. package/src/lib/base/internal/ObjectType.mjs +4 -2
  184. package/src/lib/base/internal/PatternManager.cjs +740 -735
  185. package/src/lib/base/internal/PatternManager.mjs +745 -740
  186. package/src/lib/base/internal/StringifyPattern.cjs +1 -1
  187. package/src/lib/base/internal/StringifyPattern.mjs +1 -1
  188. package/src/lib/core/Application.cjs +151 -147
  189. package/src/lib/core/Application.mjs +199 -197
  190. package/src/lib/core/Component.cjs +4 -2
  191. package/src/lib/core/Component.mjs +4 -2
  192. package/src/lib/core/Container.cjs +4 -2
  193. package/src/lib/core/Container.mjs +4 -2
  194. package/src/lib/core/Module.cjs +5 -3
  195. package/src/lib/core/Module.mjs +5 -3
  196. package/src/lib/core/Provider.cjs +4 -2
  197. package/src/lib/core/Provider.mjs +4 -2
  198. package/src/lib/helpers/Glob.cjs +970 -721
  199. package/src/lib/helpers/Glob.mjs +1036 -787
  200. package/src/lib/helpers/IsHtml.cjs +7 -13
  201. package/src/lib/helpers/IsHtml.mjs +7 -13
  202. package/src/lib/helpers/IsXML.cjs +1158 -1016
  203. package/src/lib/helpers/IsXML.mjs +871 -729
  204. package/src/lib/helpers/MD5.cjs +1 -1
  205. package/src/lib/helpers/MD5.mjs +1 -1
  206. package/src/lib/helpers/NonceStr.cjs +1 -1
  207. package/src/lib/helpers/NonceStr.mjs +1 -1
  208. package/src/lib/helpers/ObjectHash.cjs +379 -372
  209. package/src/lib/helpers/ObjectHash.mjs +379 -372
  210. package/src/lib/helpers/RandomString.cjs +168 -147
  211. package/src/lib/helpers/RandomString.mjs +167 -146
  212. package/src/lib/helpers/SHA1.cjs +1 -1
  213. package/src/lib/helpers/SHA1.mjs +1 -1
  214. package/src/lib/helpers/SHA256.cjs +1 -1
  215. package/src/lib/helpers/SHA256.mjs +1 -1
  216. package/src/lib/helpers/SortArray.cjs +1 -1
  217. package/src/lib/helpers/SortArray.mjs +1 -1
  218. package/src/lib/helpers/Statistics.cjs +1 -1
  219. package/src/lib/helpers/Statistics.mjs +1 -1
  220. package/src/lib/helpers/URLBuilder.cjs +355 -355
  221. package/src/lib/helpers/URLBuilder.mjs +350 -350
  222. package/src/lib/helpers/UUID.cjs +1 -1
  223. package/src/lib/helpers/UUID.mjs +1 -1
  224. package/src/lib/ioc/DependencyInjectionContainer.cjs +32 -30
  225. package/src/lib/ioc/DependencyInjectionContainer.mjs +12 -10
  226. package/src/lib/ioc/ListModules.cjs +5174 -5249
  227. package/src/lib/ioc/ListModules.mjs +5177 -5252
  228. package/src/lib/validation/VLD.cjs +4080 -3902
  229. package/src/lib/validation/VLD.mjs +2970 -2792
  230. package/src/options/ApplicationOptions.cjs +4 -2
  231. package/src/options/ApplicationOptions.mjs +4 -2
  232. package/src/options/LoadAnonymousObjectOptions.cjs +4 -2
  233. package/src/options/LoadAnonymousObjectOptions.mjs +4 -2
  234. package/src/options/LoadNamedObjectOptions.cjs +4 -2
  235. package/src/options/LoadNamedObjectOptions.mjs +4 -2
  236. package/src/options/LoadObjectOptions.cjs +4 -2
  237. package/src/options/LoadObjectOptions.mjs +4 -2
  238. package/src/options/ModuleLoadObjectsOptions.cjs +4 -2
  239. package/src/options/ModuleLoadObjectsOptions.mjs +4 -2
  240. package/src/options/ModuleOptions.cjs +4 -4
  241. package/src/options/ModuleOptions.mjs +4 -4
  242. package/src/options/OverridableNamedObjectOptions.cjs +4 -2
  243. package/src/options/OverridableNamedObjectOptions.mjs +4 -2
  244. package/src/options/OverridableObjectOptions.cjs +4 -2
  245. package/src/options/OverridableObjectOptions.mjs +4 -2
  246. package/src/providers/Database.cjs +11 -11
  247. package/src/providers/Database.mjs +11 -11
  248. package/src/providers/PasswordHash.cjs +5 -3
  249. package/src/providers/PasswordHash.mjs +190 -188
  250. package/src/providers/migration/GenerateMigration.cjs +15 -19
  251. package/src/providers/migration/GenerateMigration.mjs +15 -19
  252. package/vendor/Package.10.cjs +2 -8
  253. package/vendor/Package.10.mjs +2 -8
  254. package/vendor/Package.11.cjs +5 -83
  255. package/vendor/Package.11.mjs +5 -77
  256. package/vendor/Package.112.cjs +48900 -0
  257. package/vendor/Package.112.mjs +48764 -0
  258. package/vendor/Package.12.cjs +4 -2
  259. package/vendor/Package.12.mjs +6 -4
  260. package/vendor/Package.13.cjs +87 -1
  261. package/vendor/Package.13.mjs +81 -1
  262. package/vendor/Package.14.cjs +1 -14057
  263. package/vendor/Package.14.mjs +1 -14031
  264. package/vendor/Package.15.cjs +1 -1
  265. package/vendor/Package.15.mjs +1 -1
  266. package/vendor/Package.16.cjs +18129 -1935
  267. package/vendor/Package.16.mjs +18115 -1839
  268. package/vendor/Package.17.cjs +1922 -47918
  269. package/vendor/Package.17.mjs +1874 -47937
  270. package/vendor/Package.18.cjs +35 -1
  271. package/vendor/Package.18.mjs +35 -1
  272. package/vendor/Package.19.cjs +37 -0
  273. package/vendor/Package.19.mjs +35 -0
  274. package/vendor/Package.2.cjs +5739 -5710
  275. package/vendor/Package.2.mjs +5733 -5704
  276. package/vendor/Package.20.cjs +37 -0
  277. package/vendor/Package.20.mjs +35 -0
  278. package/vendor/Package.21.cjs +37 -0
  279. package/vendor/Package.21.mjs +35 -0
  280. package/vendor/Package.22.cjs +37 -0
  281. package/vendor/Package.22.mjs +35 -0
  282. package/vendor/Package.23.cjs +37 -0
  283. package/vendor/Package.23.mjs +35 -0
  284. package/vendor/Package.24.cjs +37 -0
  285. package/vendor/Package.24.mjs +35 -0
  286. package/vendor/Package.25.cjs +37 -0
  287. package/vendor/Package.25.mjs +35 -0
  288. package/vendor/Package.26.cjs +37 -0
  289. package/vendor/Package.26.mjs +35 -0
  290. package/vendor/Package.27.cjs +37 -0
  291. package/vendor/Package.27.mjs +35 -0
  292. package/vendor/Package.28.cjs +37 -0
  293. package/vendor/Package.28.mjs +35 -0
  294. package/vendor/Package.29.cjs +40 -0
  295. package/vendor/Package.29.mjs +38 -0
  296. package/vendor/Package.30.cjs +41 -0
  297. package/vendor/Package.30.mjs +39 -0
  298. package/vendor/Package.31.cjs +72 -0
  299. package/vendor/Package.31.mjs +70 -0
  300. package/vendor/Package.32.cjs +37 -0
  301. package/vendor/Package.32.mjs +35 -0
  302. package/vendor/Package.33.cjs +37 -0
  303. package/vendor/Package.33.mjs +35 -0
  304. package/vendor/Package.34.cjs +46 -0
  305. package/vendor/Package.34.mjs +44 -0
  306. package/vendor/Package.35.cjs +34 -0
  307. package/vendor/Package.35.mjs +32 -0
  308. package/vendor/Package.36.cjs +40 -0
  309. package/vendor/Package.36.mjs +38 -0
  310. package/vendor/Package.37.cjs +36 -0
  311. package/vendor/Package.37.mjs +34 -0
  312. package/vendor/Package.38.cjs +52 -0
  313. package/vendor/Package.38.mjs +50 -0
  314. package/vendor/Package.39.cjs +41 -0
  315. package/vendor/Package.39.mjs +39 -0
  316. package/vendor/Package.4.cjs +884 -874
  317. package/vendor/Package.4.mjs +884 -874
  318. package/vendor/Package.40.cjs +42 -0
  319. package/vendor/Package.40.mjs +40 -0
  320. package/vendor/Package.41.cjs +53 -0
  321. package/vendor/Package.41.mjs +51 -0
  322. package/vendor/Package.42.cjs +53 -0
  323. package/vendor/Package.42.mjs +51 -0
  324. package/vendor/Package.43.cjs +40 -0
  325. package/vendor/Package.43.mjs +38 -0
  326. package/vendor/Package.44.cjs +46 -0
  327. package/vendor/Package.44.mjs +44 -0
  328. package/vendor/Package.45.cjs +53 -0
  329. package/vendor/Package.45.mjs +51 -0
  330. package/vendor/Package.46.cjs +59 -0
  331. package/vendor/Package.46.mjs +57 -0
  332. package/vendor/Package.47.cjs +65 -0
  333. package/vendor/Package.47.mjs +63 -0
  334. package/vendor/Package.48.cjs +38 -0
  335. package/vendor/Package.48.mjs +36 -0
  336. package/vendor/Package.49.cjs +38 -0
  337. package/vendor/Package.49.mjs +36 -0
  338. package/vendor/Package.5.cjs +15 -11
  339. package/vendor/Package.5.mjs +11 -7
  340. package/vendor/Package.50.cjs +36 -0
  341. package/vendor/Package.50.mjs +34 -0
  342. package/vendor/Package.51.cjs +43 -0
  343. package/vendor/Package.51.mjs +41 -0
  344. package/vendor/Package.52.cjs +37 -0
  345. package/vendor/Package.52.mjs +35 -0
  346. package/vendor/Package.53.cjs +43 -0
  347. package/vendor/Package.53.mjs +41 -0
  348. package/vendor/Package.54.cjs +55 -0
  349. package/vendor/Package.54.mjs +53 -0
  350. package/vendor/Package.55.cjs +37 -0
  351. package/vendor/Package.55.mjs +35 -0
  352. package/vendor/Package.56.cjs +37 -0
  353. package/vendor/Package.56.mjs +35 -0
  354. package/vendor/Package.57.cjs +37 -0
  355. package/vendor/Package.57.mjs +35 -0
  356. package/vendor/Package.58.cjs +45 -0
  357. package/vendor/Package.58.mjs +43 -0
  358. package/vendor/Package.59.cjs +53 -0
  359. package/vendor/Package.59.mjs +51 -0
  360. package/vendor/Package.6.cjs +520 -511
  361. package/vendor/Package.6.mjs +543 -534
  362. package/vendor/Package.60.cjs +47649 -0
  363. package/vendor/Package.60.mjs +47606 -0
  364. package/vendor/Package.610.cjs +11 -11
  365. package/vendor/Package.610.mjs +11 -11
  366. package/vendor/Package.611.cjs +33 -23
  367. package/vendor/Package.611.mjs +19 -9
  368. package/vendor/Package.612.cjs +42 -36
  369. package/vendor/Package.612.mjs +35 -29
  370. package/vendor/Package.613.cjs +5 -4
  371. package/vendor/Package.613.mjs +5 -4
  372. package/vendor/Package.62.cjs +92 -89
  373. package/vendor/Package.62.mjs +185 -182
  374. package/vendor/Package.63.cjs +509 -166
  375. package/vendor/Package.63.mjs +490 -165
  376. package/vendor/Package.64.cjs +139 -511
  377. package/vendor/Package.64.mjs +139 -491
  378. package/vendor/Package.65.cjs +4135 -150
  379. package/vendor/Package.65.mjs +4143 -150
  380. package/vendor/Package.66.cjs +346 -4150
  381. package/vendor/Package.66.mjs +346 -4158
  382. package/vendor/Package.67.cjs +412 -261
  383. package/vendor/Package.67.mjs +410 -259
  384. package/vendor/Package.68.cjs +397 -405
  385. package/vendor/Package.68.mjs +227 -242
  386. package/vendor/Package.8.cjs +0 -4
  387. package/vendor/Package.8.mjs +0 -4
  388. package/vendor/Package.9.cjs +132 -118
  389. package/vendor/Package.9.mjs +138 -124
  390. package/vendor/TypeDef.internal.3.d.ts +0 -4
  391. package/vendor/Package.102.cjs +0 -48773
  392. package/vendor/Package.102.mjs +0 -48697
  393. package/vendor/Package.122.cjs +0 -3
  394. package/vendor/Package.122.mjs +0 -1
@@ -1,80 +1,75 @@
1
- import { g as e } from "../../../vendor/Package.5.mjs";
2
-
3
- var t = {};
4
-
5
- var n = {};
6
-
7
- (function(e) {
8
- "use strict";
9
- const t = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
10
- const n = t + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
11
- const i = "[" + t + "][" + n + "]*";
12
- const s = new RegExp("^" + i + "$");
13
- const r = function(e, t) {
14
- const n = [];
15
- let i = t.exec(e);
16
- while (i) {
17
- const s = [];
18
- s.startIndex = t.lastIndex - i[0].length;
19
- const r = i.length;
20
- for (let e = 0; e < r; e++) {
21
- s.push(i[e]);
22
- }
23
- n.push(s);
24
- i = t.exec(e);
1
+ "use strict";
2
+
3
+ const e = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
4
+
5
+ const t = e + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
6
+
7
+ const i = "[" + e + "][" + t + "]*";
8
+
9
+ const n = new RegExp("^" + i + "$");
10
+
11
+ function s(e, t) {
12
+ const i = [];
13
+ let n = t.exec(e);
14
+ while (n) {
15
+ const s = [];
16
+ s.startIndex = t.lastIndex - n[0].length;
17
+ const r = n.length;
18
+ for (let e = 0; e < r; e++) {
19
+ s.push(n[e]);
25
20
  }
26
- return n;
27
- };
28
- const o = function(e) {
29
- const t = s.exec(e);
30
- return !(t === null || typeof t === "undefined");
31
- };
32
- e.isExist = function(e) {
33
- return typeof e !== "undefined";
34
- };
35
- e.isEmptyObject = function(e) {
36
- return Object.keys(e).length === 0;
37
- };
38
- e.merge = function(e, t, n) {
39
- if (t) {
40
- const i = Object.keys(t);
41
- const s = i.length;
42
- for (let r = 0; r < s; r++) {
43
- if (n === "strict") {
44
- e[i[r]] = [ t[i[r]] ];
45
- } else {
46
- e[i[r]] = t[i[r]];
47
- }
21
+ i.push(s);
22
+ n = t.exec(e);
23
+ }
24
+ return i;
25
+ }
26
+
27
+ const r = function(e) {
28
+ const t = n.exec(e);
29
+ return !(t === null || typeof t === "undefined");
30
+ };
31
+
32
+ function o(e) {
33
+ return typeof e !== "undefined";
34
+ }
35
+
36
+ function a(e) {
37
+ return Object.keys(e).length === 0;
38
+ }
39
+
40
+ function l(e, t, i) {
41
+ if (t) {
42
+ const n = Object.keys(t);
43
+ const s = n.length;
44
+ for (let r = 0; r < s; r++) {
45
+ if (i === "strict") {
46
+ e[n[r]] = [ t[n[r]] ];
47
+ } else {
48
+ e[n[r]] = t[n[r]];
48
49
  }
49
50
  }
50
- };
51
- e.getValue = function(t) {
52
- if (e.isExist(t)) {
53
- return t;
54
- } else {
55
- return "";
56
- }
57
- };
58
- e.isName = o;
59
- e.getAllMatches = r;
60
- e.nameRegexp = i;
61
- })(n);
51
+ }
52
+ }
62
53
 
63
- const i = e(n);
54
+ function u(e) {
55
+ if (exports.isExist(e)) {
56
+ return e;
57
+ } else {
58
+ return "";
59
+ }
60
+ }
64
61
 
65
62
  "use strict";
66
63
 
67
- const s = n;
68
-
69
- const r = {
64
+ const f = {
70
65
  allowBooleanAttributes: false,
71
66
  unpairedTags: []
72
67
  };
73
68
 
74
- var o = t.validate = function(e, t) {
75
- t = Object.assign({}, r, t);
76
- const n = [];
77
- let i = false;
69
+ function d(e, t) {
70
+ t = Object.assign({}, f, t);
71
+ const i = [];
72
+ let n = false;
78
73
  let s = false;
79
74
  if (e[0] === "\ufeff") {
80
75
  e = e.substr(1);
@@ -82,104 +77,104 @@ var o = t.validate = function(e, t) {
82
77
  for (let r = 0; r < e.length; r++) {
83
78
  if (e[r] === "<" && e[r + 1] === "?") {
84
79
  r += 2;
85
- r = l(e, r);
80
+ r = c(e, r);
86
81
  if (r.err) return r;
87
82
  } else if (e[r] === "<") {
88
83
  let o = r;
89
84
  r++;
90
85
  if (e[r] === "!") {
91
- r = u(e, r);
86
+ r = p(e, r);
92
87
  continue;
93
88
  } else {
94
- let f = false;
89
+ let a = false;
95
90
  if (e[r] === "/") {
96
- f = true;
91
+ a = true;
97
92
  r++;
98
93
  }
99
- let c = "";
94
+ let l = "";
100
95
  for (;r < e.length && e[r] !== ">" && e[r] !== " " && e[r] !== "\t" && e[r] !== "\n" && e[r] !== "\r"; r++) {
101
- c += e[r];
96
+ l += e[r];
102
97
  }
103
- c = c.trim();
104
- if (c[c.length - 1] === "/") {
105
- c = c.substring(0, c.length - 1);
98
+ l = l.trim();
99
+ if (l[l.length - 1] === "/") {
100
+ l = l.substring(0, l.length - 1);
106
101
  r--;
107
102
  }
108
- if (!b(c)) {
103
+ if (!I(l)) {
109
104
  let t;
110
- if (c.trim().length === 0) {
105
+ if (l.trim().length === 0) {
111
106
  t = "Invalid space after '<'.";
112
107
  } else {
113
- t = "Tag '" + c + "' is an invalid name.";
108
+ t = "Tag '" + l + "' is an invalid name.";
114
109
  }
115
- return x("InvalidTag", t, E(e, r));
110
+ return T("InvalidTag", t, v(e, r));
116
111
  }
117
- const d = h(e, r);
118
- if (d === false) {
119
- return x("InvalidAttr", "Attributes for '" + c + "' have open quote.", E(e, r));
112
+ const u = x(e, r);
113
+ if (u === false) {
114
+ return T("InvalidAttr", "Attributes for '" + l + "' have open quote.", v(e, r));
120
115
  }
121
- let g = d.value;
122
- r = d.index;
123
- if (g[g.length - 1] === "/") {
124
- const n = r - g.length;
125
- g = g.substring(0, g.length - 1);
126
- const s = p(g, t);
116
+ let f = u.value;
117
+ r = u.index;
118
+ if (f[f.length - 1] === "/") {
119
+ const i = r - f.length;
120
+ f = f.substring(0, f.length - 1);
121
+ const s = b(f, t);
127
122
  if (s === true) {
128
- i = true;
123
+ n = true;
129
124
  } else {
130
- return x(s.err.code, s.err.msg, E(e, n + s.err.line));
125
+ return T(s.err.code, s.err.msg, v(e, i + s.err.line));
131
126
  }
132
- } else if (f) {
133
- if (!d.tagClosed) {
134
- return x("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", E(e, r));
135
- } else if (g.trim().length > 0) {
136
- return x("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", E(e, o));
137
- } else if (n.length === 0) {
138
- return x("InvalidTag", "Closing tag '" + c + "' has not been opened.", E(e, o));
127
+ } else if (a) {
128
+ if (!u.tagClosed) {
129
+ return T("InvalidTag", "Closing tag '" + l + "' doesn't have proper closing.", v(e, r));
130
+ } else if (f.trim().length > 0) {
131
+ return T("InvalidTag", "Closing tag '" + l + "' can't have attributes or invalid starting.", v(e, o));
132
+ } else if (i.length === 0) {
133
+ return T("InvalidTag", "Closing tag '" + l + "' has not been opened.", v(e, o));
139
134
  } else {
140
- const t = n.pop();
141
- if (c !== t.tagName) {
142
- let n = E(e, t.tagStartPos);
143
- return x("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", E(e, o));
135
+ const t = i.pop();
136
+ if (l !== t.tagName) {
137
+ let i = v(e, t.tagStartPos);
138
+ return T("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + i.line + ", col " + i.col + ") instead of closing tag '" + l + "'.", v(e, o));
144
139
  }
145
- if (n.length == 0) {
140
+ if (i.length == 0) {
146
141
  s = true;
147
142
  }
148
143
  }
149
144
  } else {
150
- const a = p(g, t);
145
+ const a = b(f, t);
151
146
  if (a !== true) {
152
- return x(a.err.code, a.err.msg, E(e, r - g.length + a.err.line));
147
+ return T(a.err.code, a.err.msg, v(e, r - f.length + a.err.line));
153
148
  }
154
149
  if (s === true) {
155
- return x("InvalidXml", "Multiple possible root nodes found.", E(e, r));
156
- } else if (t.unpairedTags.indexOf(c) !== -1) {} else {
157
- n.push({
158
- tagName: c,
150
+ return T("InvalidXml", "Multiple possible root nodes found.", v(e, r));
151
+ } else if (t.unpairedTags.indexOf(l) !== -1) {} else {
152
+ i.push({
153
+ tagName: l,
159
154
  tagStartPos: o
160
155
  });
161
156
  }
162
- i = true;
157
+ n = true;
163
158
  }
164
159
  for (r++; r < e.length; r++) {
165
160
  if (e[r] === "<") {
166
161
  if (e[r + 1] === "!") {
167
162
  r++;
168
- r = u(e, r);
163
+ r = p(e, r);
169
164
  continue;
170
165
  } else if (e[r + 1] === "?") {
171
- r = l(e, ++r);
166
+ r = c(e, ++r);
172
167
  if (r.err) return r;
173
168
  } else {
174
169
  break;
175
170
  }
176
171
  } else if (e[r] === "&") {
177
- const t = m(e, r);
178
- if (t == -1) return x("InvalidChar", "char '&' is not expected.", E(e, r));
172
+ const t = w(e, r);
173
+ if (t == -1) return T("InvalidChar", "char '&' is not expected.", v(e, r));
179
174
  r = t;
180
175
  } else {
181
- if (s === true && !a(e[r])) {
182
- return x("InvalidXml", "Extra text at the end", E(e, r));
176
+ if (s === true && !h(e[r])) {
177
+ return T("InvalidXml", "Extra text at the end", v(e, r));
183
178
  }
184
179
  }
185
180
  }
@@ -188,36 +183,36 @@ var o = t.validate = function(e, t) {
188
183
  }
189
184
  }
190
185
  } else {
191
- if (a(e[r])) {
186
+ if (h(e[r])) {
192
187
  continue;
193
188
  }
194
- return x("InvalidChar", "char '" + e[r] + "' is not expected.", E(e, r));
189
+ return T("InvalidChar", "char '" + e[r] + "' is not expected.", v(e, r));
195
190
  }
196
191
  }
197
- if (!i) {
198
- return x("InvalidXml", "Start tag expected.", 1);
199
- } else if (n.length == 1) {
200
- return x("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", E(e, n[0].tagStartPos));
201
- } else if (n.length > 0) {
202
- return x("InvalidXml", "Invalid '" + JSON.stringify(n.map((e => e.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
192
+ if (!n) {
193
+ return T("InvalidXml", "Start tag expected.", 1);
194
+ } else if (i.length == 1) {
195
+ return T("InvalidTag", "Unclosed tag '" + i[0].tagName + "'.", v(e, i[0].tagStartPos));
196
+ } else if (i.length > 0) {
197
+ return T("InvalidXml", "Invalid '" + JSON.stringify(i.map((e => e.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", {
203
198
  line: 1,
204
199
  col: 1
205
200
  });
206
201
  }
207
202
  return true;
208
- };
203
+ }
209
204
 
210
- function a(e) {
205
+ function h(e) {
211
206
  return e === " " || e === "\t" || e === "\n" || e === "\r";
212
207
  }
213
208
 
214
- function l(e, t) {
215
- const n = t;
209
+ function c(e, t) {
210
+ const i = t;
216
211
  for (;t < e.length; t++) {
217
212
  if (e[t] == "?" || e[t] == " ") {
218
- const i = e.substr(n, t - n);
219
- if (t > 5 && i === "xml") {
220
- return x("InvalidXml", "XML declaration allowed only at the start of the document.", E(e, t));
213
+ const n = e.substr(i, t - i);
214
+ if (t > 5 && n === "xml") {
215
+ return T("InvalidXml", "XML declaration allowed only at the start of the document.", v(e, t));
221
216
  } else if (e[t] == "?" && e[t + 1] == ">") {
222
217
  t++;
223
218
  break;
@@ -229,7 +224,7 @@ function l(e, t) {
229
224
  return t;
230
225
  }
231
226
 
232
- function u(e, t) {
227
+ function p(e, t) {
233
228
  if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
234
229
  for (t += 3; t < e.length; t++) {
235
230
  if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
@@ -238,13 +233,13 @@ function u(e, t) {
238
233
  }
239
234
  }
240
235
  } else if (e.length > t + 8 && e[t + 1] === "D" && e[t + 2] === "O" && e[t + 3] === "C" && e[t + 4] === "T" && e[t + 5] === "Y" && e[t + 6] === "P" && e[t + 7] === "E") {
241
- let n = 1;
236
+ let i = 1;
242
237
  for (t += 8; t < e.length; t++) {
243
238
  if (e[t] === "<") {
244
- n++;
239
+ i++;
245
240
  } else if (e[t] === ">") {
246
- n--;
247
- if (n === 0) {
241
+ i--;
242
+ if (i === 0) {
248
243
  break;
249
244
  }
250
245
  }
@@ -260,128 +255,126 @@ function u(e, t) {
260
255
  return t;
261
256
  }
262
257
 
263
- const f = '"';
258
+ const g = '"';
264
259
 
265
- const c = "'";
260
+ const m = "'";
266
261
 
267
- function h(e, t) {
268
- let n = "";
262
+ function x(e, t) {
269
263
  let i = "";
264
+ let n = "";
270
265
  let s = false;
271
266
  for (;t < e.length; t++) {
272
- if (e[t] === f || e[t] === c) {
273
- if (i === "") {
274
- i = e[t];
275
- } else if (i !== e[t]) {} else {
276
- i = "";
267
+ if (e[t] === g || e[t] === m) {
268
+ if (n === "") {
269
+ n = e[t];
270
+ } else if (n !== e[t]) {} else {
271
+ n = "";
277
272
  }
278
273
  } else if (e[t] === ">") {
279
- if (i === "") {
274
+ if (n === "") {
280
275
  s = true;
281
276
  break;
282
277
  }
283
278
  }
284
- n += e[t];
279
+ i += e[t];
285
280
  }
286
- if (i !== "") {
281
+ if (n !== "") {
287
282
  return false;
288
283
  }
289
284
  return {
290
- value: n,
285
+ value: i,
291
286
  index: t,
292
287
  tagClosed: s
293
288
  };
294
289
  }
295
290
 
296
- const d = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
291
+ const N = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
297
292
 
298
- function p(e, t) {
299
- const n = s.getAllMatches(e, d);
300
- const i = {};
301
- for (let e = 0; e < n.length; e++) {
302
- if (n[e][1].length === 0) {
303
- return x("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", v(n[e]));
304
- } else if (n[e][3] !== undefined && n[e][4] === undefined) {
305
- return x("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", v(n[e]));
306
- } else if (n[e][3] === undefined && !t.allowBooleanAttributes) {
307
- return x("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", v(n[e]));
308
- }
309
- const s = n[e][2];
310
- if (!N(s)) {
311
- return x("InvalidAttr", "Attribute '" + s + "' is an invalid name.", v(n[e]));
312
- }
313
- if (!i.hasOwnProperty(s)) {
314
- i[s] = 1;
293
+ function b(e, t) {
294
+ const i = s(e, N);
295
+ const n = {};
296
+ for (let e = 0; e < i.length; e++) {
297
+ if (i[e][1].length === 0) {
298
+ return T("InvalidAttr", "Attribute '" + i[e][2] + "' has no space in starting.", O(i[e]));
299
+ } else if (i[e][3] !== undefined && i[e][4] === undefined) {
300
+ return T("InvalidAttr", "Attribute '" + i[e][2] + "' is without value.", O(i[e]));
301
+ } else if (i[e][3] === undefined && !t.allowBooleanAttributes) {
302
+ return T("InvalidAttr", "boolean attribute '" + i[e][2] + "' is not allowed.", O(i[e]));
303
+ }
304
+ const s = i[e][2];
305
+ if (!y(s)) {
306
+ return T("InvalidAttr", "Attribute '" + s + "' is an invalid name.", O(i[e]));
307
+ }
308
+ if (!n.hasOwnProperty(s)) {
309
+ n[s] = 1;
315
310
  } else {
316
- return x("InvalidAttr", "Attribute '" + s + "' is repeated.", v(n[e]));
311
+ return T("InvalidAttr", "Attribute '" + s + "' is repeated.", O(i[e]));
317
312
  }
318
313
  }
319
314
  return true;
320
315
  }
321
316
 
322
- function g(e, t) {
323
- let n = /\d/;
317
+ function E(e, t) {
318
+ let i = /\d/;
324
319
  if (e[t] === "x") {
325
320
  t++;
326
- n = /[\da-fA-F]/;
321
+ i = /[\da-fA-F]/;
327
322
  }
328
323
  for (;t < e.length; t++) {
329
324
  if (e[t] === ";") return t;
330
- if (!e[t].match(n)) break;
325
+ if (!e[t].match(i)) break;
331
326
  }
332
327
  return -1;
333
328
  }
334
329
 
335
- function m(e, t) {
330
+ function w(e, t) {
336
331
  t++;
337
332
  if (e[t] === ";") return -1;
338
333
  if (e[t] === "#") {
339
334
  t++;
340
- return g(e, t);
335
+ return E(e, t);
341
336
  }
342
- let n = 0;
343
- for (;t < e.length; t++, n++) {
344
- if (e[t].match(/\w/) && n < 20) continue;
337
+ let i = 0;
338
+ for (;t < e.length; t++, i++) {
339
+ if (e[t].match(/\w/) && i < 20) continue;
345
340
  if (e[t] === ";") break;
346
341
  return -1;
347
342
  }
348
343
  return t;
349
344
  }
350
345
 
351
- function x(e, t, n) {
346
+ function T(e, t, i) {
352
347
  return {
353
348
  err: {
354
349
  code: e,
355
350
  msg: t,
356
- line: n.line || n,
357
- col: n.col
351
+ line: i.line || i,
352
+ col: i.col
358
353
  }
359
354
  };
360
355
  }
361
356
 
362
- function N(e) {
363
- return s.isName(e);
357
+ function y(e) {
358
+ return r(e);
364
359
  }
365
360
 
366
- function b(e) {
367
- return s.isName(e);
361
+ function I(e) {
362
+ return r(e);
368
363
  }
369
364
 
370
- function E(e, t) {
371
- const n = e.substring(0, t).split(/\r?\n/);
365
+ function v(e, t) {
366
+ const i = e.substring(0, t).split(/\r?\n/);
372
367
  return {
373
- line: n.length,
374
- col: n[n.length - 1].length + 1
368
+ line: i.length,
369
+ col: i[i.length - 1].length + 1
375
370
  };
376
371
  }
377
372
 
378
- function v(e) {
373
+ function O(e) {
379
374
  return e.startIndex + e[1].length;
380
375
  }
381
376
 
382
- var y = {};
383
-
384
- const T = {
377
+ const P = {
385
378
  preserveOrder: false,
386
379
  attributeNamePrefix: "@_",
387
380
  attributesGroupName: false,
@@ -415,20 +408,25 @@ const T = {
415
408
  ignorePiTags: false,
416
409
  transformTagName: false,
417
410
  transformAttributeName: false,
418
- updateTag: function(e, t, n) {
411
+ updateTag: function(e, t, i) {
419
412
  return e;
420
- }
413
+ },
414
+ captureMetaData: false
421
415
  };
422
416
 
423
- const O = function(e) {
424
- return Object.assign({}, T, e);
417
+ const A = function(e) {
418
+ return Object.assign({}, P, e);
425
419
  };
426
420
 
427
- var w = y.buildOptions = O;
421
+ "use strict";
428
422
 
429
- var P = y.defaultOptions = T;
423
+ let C;
430
424
 
431
- "use strict";
425
+ if (typeof Symbol !== "function") {
426
+ C = "@@xmlMetadata";
427
+ } else {
428
+ C = Symbol("XML Node Metadata");
429
+ }
432
430
 
433
431
  class XmlNode {
434
432
  constructor(e) {
@@ -442,7 +440,7 @@ class XmlNode {
442
440
  [e]: t
443
441
  });
444
442
  }
445
- addChild(e) {
443
+ addChild(e, t) {
446
444
  if (e.tagname === "__proto__") e.tagname = "#__proto__";
447
445
  if (e[":@"] && Object.keys(e[":@"]).length > 0) {
448
446
  this.child.push({
@@ -454,162 +452,324 @@ class XmlNode {
454
452
  [e.tagname]: e.child
455
453
  });
456
454
  }
455
+ if (t !== undefined) {
456
+ this.child[this.child.length - 1][C] = {
457
+ startIndex: t
458
+ };
459
+ }
460
+ }
461
+ static getMetaDataSymbol() {
462
+ return C;
457
463
  }
458
464
  }
459
465
 
460
- var A = XmlNode;
461
-
462
- const I = e(A);
463
-
464
- const C = n;
465
-
466
- function S(e, t) {
467
- const n = {};
468
- if (e[t + 3] === "O" && e[t + 4] === "C" && e[t + 5] === "T" && e[t + 6] === "Y" && e[t + 7] === "P" && e[t + 8] === "E") {
469
- t = t + 9;
470
- let i = 1;
471
- let s = false, r = false;
472
- let o = "";
473
- for (;t < e.length; t++) {
474
- if (e[t] === "<" && !r) {
475
- if (s && k(e, t)) {
476
- t += 7;
477
- let i, s;
478
- [i, s, t] = V(e, t + 1);
479
- if (s.indexOf("&") === -1) n[D(i)] = {
480
- regx: RegExp(`&${i};`, "g"),
481
- val: s
482
- };
483
- } else if (s && $(e, t)) t += 8; else if (s && F(e, t)) t += 8; else if (s && _(e, t)) t += 9; else if (j) r = true; else throw new Error("Invalid DOCTYPE");
484
- i++;
485
- o = "";
486
- } else if (e[t] === ">") {
487
- if (r) {
488
- if (e[t - 1] === "-" && e[t - 2] === "-") {
489
- r = false;
490
- i--;
466
+ class DocTypeReader {
467
+ constructor(e) {
468
+ this.suppressValidationErr = !e;
469
+ }
470
+ readDocType(e, t) {
471
+ const i = {};
472
+ if (e[t + 3] === "O" && e[t + 4] === "C" && e[t + 5] === "T" && e[t + 6] === "Y" && e[t + 7] === "P" && e[t + 8] === "E") {
473
+ t = t + 9;
474
+ let n = 1;
475
+ let s = false, r = false;
476
+ let o = "";
477
+ for (;t < e.length; t++) {
478
+ if (e[t] === "<" && !r) {
479
+ if (s && V(e, "!ENTITY", t)) {
480
+ t += 7;
481
+ let n, s;
482
+ [n, s, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr);
483
+ if (s.indexOf("&") === -1) i[n] = {
484
+ regx: RegExp(`&${n};`, "g"),
485
+ val: s
486
+ };
487
+ } else if (s && V(e, "!ELEMENT", t)) {
488
+ t += 8;
489
+ const {index: i} = this.readElementExp(e, t + 1);
490
+ t = i;
491
+ } else if (s && V(e, "!ATTLIST", t)) {
492
+ t += 8;
493
+ } else if (s && V(e, "!NOTATION", t)) {
494
+ t += 9;
495
+ const {index: i} = this.readNotationExp(e, t + 1, this.suppressValidationErr);
496
+ t = i;
497
+ } else if (V(e, "!--", t)) r = true; else throw new Error(`Invalid DOCTYPE`);
498
+ n++;
499
+ o = "";
500
+ } else if (e[t] === ">") {
501
+ if (r) {
502
+ if (e[t - 1] === "-" && e[t - 2] === "-") {
503
+ r = false;
504
+ n--;
505
+ }
506
+ } else {
507
+ n--;
491
508
  }
509
+ if (n === 0) {
510
+ break;
511
+ }
512
+ } else if (e[t] === "[") {
513
+ s = true;
492
514
  } else {
493
- i--;
494
- }
495
- if (i === 0) {
496
- break;
515
+ o += e[t];
497
516
  }
498
- } else if (e[t] === "[") {
499
- s = true;
500
- } else {
501
- o += e[t];
502
517
  }
518
+ if (n !== 0) {
519
+ throw new Error(`Unclosed DOCTYPE`);
520
+ }
521
+ } else {
522
+ throw new Error(`Invalid Tag instead of DOCTYPE`);
503
523
  }
504
- if (i !== 0) {
505
- throw new Error(`Unclosed DOCTYPE`);
524
+ return {
525
+ entities: i,
526
+ i: t
527
+ };
528
+ }
529
+ readEntityExp(e, t) {
530
+ t = S(e, t);
531
+ let i = "";
532
+ while (t < e.length && !/\s/.test(e[t]) && e[t] !== '"' && e[t] !== "'") {
533
+ i += e[t];
534
+ t++;
506
535
  }
507
- } else {
508
- throw new Error(`Invalid Tag instead of DOCTYPE`);
536
+ D(i);
537
+ t = S(e, t);
538
+ if (!this.suppressValidationErr) {
539
+ if (e.substring(t, t + 6).toUpperCase() === "SYSTEM") {
540
+ throw new Error("External entities are not supported");
541
+ } else if (e[t] === "%") {
542
+ throw new Error("Parameter entities are not supported");
543
+ }
544
+ }
545
+ let n = "";
546
+ [t, n] = this.readIdentifierVal(e, t, "entity");
547
+ t--;
548
+ return [ i, n, t ];
549
+ }
550
+ readNotationExp(e, t) {
551
+ t = S(e, t);
552
+ let i = "";
553
+ while (t < e.length && !/\s/.test(e[t])) {
554
+ i += e[t];
555
+ t++;
556
+ }
557
+ !this.suppressValidationErr && D(i);
558
+ t = S(e, t);
559
+ const n = e.substring(t, t + 6).toUpperCase();
560
+ if (!this.suppressValidationErr && n !== "SYSTEM" && n !== "PUBLIC") {
561
+ throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);
562
+ }
563
+ t += n.length;
564
+ t = S(e, t);
565
+ let s = null;
566
+ let r = null;
567
+ if (n === "PUBLIC") {
568
+ [t, s] = this.readIdentifierVal(e, t, "publicIdentifier");
569
+ t = S(e, t);
570
+ if (e[t] === '"' || e[t] === "'") {
571
+ [t, r] = this.readIdentifierVal(e, t, "systemIdentifier");
572
+ }
573
+ } else if (n === "SYSTEM") {
574
+ [t, r] = this.readIdentifierVal(e, t, "systemIdentifier");
575
+ if (!this.suppressValidationErr && !r) {
576
+ throw new Error("Missing mandatory system identifier for SYSTEM notation");
577
+ }
578
+ }
579
+ return {
580
+ notationName: i,
581
+ publicIdentifier: s,
582
+ systemIdentifier: r,
583
+ index: --t
584
+ };
509
585
  }
510
- return {
511
- entities: n,
512
- i: t
513
- };
514
- }
515
-
516
- function V(e, t) {
517
- let n = "";
518
- for (;t < e.length && (e[t] !== "'" && e[t] !== '"'); t++) {
519
- n += e[t];
586
+ readIdentifierVal(e, t, i) {
587
+ let n = "";
588
+ const s = e[t];
589
+ if (s !== '"' && s !== "'") {
590
+ throw new Error(`Expected quoted string, found "${s}"`);
591
+ }
592
+ t++;
593
+ while (t < e.length && e[t] !== s) {
594
+ n += e[t];
595
+ t++;
596
+ }
597
+ if (e[t] !== s) {
598
+ throw new Error(`Unterminated ${i} value`);
599
+ }
600
+ t++;
601
+ return [ t, n ];
602
+ }
603
+ readElementExp(e, t) {
604
+ t = S(e, t);
605
+ let i = "";
606
+ while (t < e.length && !/\s/.test(e[t])) {
607
+ i += e[t];
608
+ t++;
609
+ }
610
+ if (!this.suppressValidationErr && !r(i)) {
611
+ throw new Error(`Invalid element name: "${i}"`);
612
+ }
613
+ t = S(e, t);
614
+ let n = "";
615
+ if (e[t] === "E" && V(e, "MPTY", t)) t += 4; else if (e[t] === "A" && V(e, "NY", t)) t += 2; else if (e[t] === "(") {
616
+ t++;
617
+ while (t < e.length && e[t] !== ")") {
618
+ n += e[t];
619
+ t++;
620
+ }
621
+ if (e[t] !== ")") {
622
+ throw new Error("Unterminated content model");
623
+ }
624
+ } else if (!this.suppressValidationErr) {
625
+ throw new Error(`Invalid Element Expression, found "${e[t]}"`);
626
+ }
627
+ return {
628
+ elementName: i,
629
+ contentModel: n.trim(),
630
+ index: t
631
+ };
520
632
  }
521
- n = n.trim();
522
- if (n.indexOf(" ") !== -1) throw new Error("External entites are not supported");
523
- const i = e[t++];
524
- let s = "";
525
- for (;t < e.length && e[t] !== i; t++) {
526
- s += e[t];
633
+ readAttlistExp(e, t) {
634
+ t = S(e, t);
635
+ let i = "";
636
+ while (t < e.length && !/\s/.test(e[t])) {
637
+ i += e[t];
638
+ t++;
639
+ }
640
+ D(i);
641
+ t = S(e, t);
642
+ let n = "";
643
+ while (t < e.length && !/\s/.test(e[t])) {
644
+ n += e[t];
645
+ t++;
646
+ }
647
+ if (!D(n)) {
648
+ throw new Error(`Invalid attribute name: "${n}"`);
649
+ }
650
+ t = S(e, t);
651
+ let s = "";
652
+ if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
653
+ s = "NOTATION";
654
+ t += 8;
655
+ t = S(e, t);
656
+ if (e[t] !== "(") {
657
+ throw new Error(`Expected '(', found "${e[t]}"`);
658
+ }
659
+ t++;
660
+ let i = [];
661
+ while (t < e.length && e[t] !== ")") {
662
+ let n = "";
663
+ while (t < e.length && e[t] !== "|" && e[t] !== ")") {
664
+ n += e[t];
665
+ t++;
666
+ }
667
+ n = n.trim();
668
+ if (!D(n)) {
669
+ throw new Error(`Invalid notation name: "${n}"`);
670
+ }
671
+ i.push(n);
672
+ if (e[t] === "|") {
673
+ t++;
674
+ t = S(e, t);
675
+ }
676
+ }
677
+ if (e[t] !== ")") {
678
+ throw new Error("Unterminated list of notations");
679
+ }
680
+ t++;
681
+ s += " (" + i.join("|") + ")";
682
+ } else {
683
+ while (t < e.length && !/\s/.test(e[t])) {
684
+ s += e[t];
685
+ t++;
686
+ }
687
+ const i = [ "CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS" ];
688
+ if (!this.suppressValidationErr && !i.includes(s.toUpperCase())) {
689
+ throw new Error(`Invalid attribute type: "${s}"`);
690
+ }
691
+ }
692
+ t = S(e, t);
693
+ let r = "";
694
+ if (e.substring(t, t + 8).toUpperCase() === "#REQUIRED") {
695
+ r = "#REQUIRED";
696
+ t += 8;
697
+ } else if (e.substring(t, t + 7).toUpperCase() === "#IMPLIED") {
698
+ r = "#IMPLIED";
699
+ t += 7;
700
+ } else {
701
+ [t, r] = this.readIdentifierVal(e, t, "ATTLIST");
702
+ }
703
+ return {
704
+ elementName: i,
705
+ attributeName: n,
706
+ attributeType: s,
707
+ defaultValue: r,
708
+ index: t
709
+ };
527
710
  }
528
- return [ n, s, t ];
529
- }
530
-
531
- function j(e, t) {
532
- if (e[t + 1] === "!" && e[t + 2] === "-" && e[t + 3] === "-") return true;
533
- return false;
534
- }
535
-
536
- function k(e, t) {
537
- if (e[t + 1] === "!" && e[t + 2] === "E" && e[t + 3] === "N" && e[t + 4] === "T" && e[t + 5] === "I" && e[t + 6] === "T" && e[t + 7] === "Y") return true;
538
- return false;
539
- }
540
-
541
- function $(e, t) {
542
- if (e[t + 1] === "!" && e[t + 2] === "E" && e[t + 3] === "L" && e[t + 4] === "E" && e[t + 5] === "M" && e[t + 6] === "E" && e[t + 7] === "N" && e[t + 8] === "T") return true;
543
- return false;
544
711
  }
545
712
 
546
- function F(e, t) {
547
- if (e[t + 1] === "!" && e[t + 2] === "A" && e[t + 3] === "T" && e[t + 4] === "T" && e[t + 5] === "L" && e[t + 6] === "I" && e[t + 7] === "S" && e[t + 8] === "T") return true;
548
- return false;
549
- }
713
+ const S = (e, t) => {
714
+ while (t < e.length && /\s/.test(e[t])) {
715
+ t++;
716
+ }
717
+ return t;
718
+ };
550
719
 
551
- function _(e, t) {
552
- if (e[t + 1] === "!" && e[t + 2] === "N" && e[t + 3] === "O" && e[t + 4] === "T" && e[t + 5] === "A" && e[t + 6] === "T" && e[t + 7] === "I" && e[t + 8] === "O" && e[t + 9] === "N") return true;
553
- return false;
720
+ function V(e, t, i) {
721
+ for (let n = 0; n < t.length; n++) {
722
+ if (t[n] !== e[i + n + 1]) return false;
723
+ }
724
+ return true;
554
725
  }
555
726
 
556
727
  function D(e) {
557
- if (C.isName(e)) return e; else throw new Error(`Invalid entity name ${e}`);
728
+ if (r(e)) return e; else throw new Error(`Invalid entity name ${e}`);
558
729
  }
559
730
 
560
- var L = S;
731
+ const $ = /^[-+]?0x[a-fA-F0-9]+$/;
561
732
 
562
- const M = e(L);
733
+ const j = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/;
563
734
 
564
- const B = /^[-+]?0x[a-fA-F0-9]+$/;
565
-
566
- const X = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/;
567
-
568
- const G = {
735
+ const k = {
569
736
  hex: true,
570
737
  leadingZeros: true,
571
738
  decimalPoint: ".",
572
739
  eNotation: true
573
740
  };
574
741
 
575
- function R(e, t = {}) {
576
- t = Object.assign({}, G, t);
742
+ function F(e, t = {}) {
743
+ t = Object.assign({}, k, t);
577
744
  if (!e || typeof e !== "string") return e;
578
- let n = e.trim();
579
- if (t.skipLike !== undefined && t.skipLike.test(n)) return e; else if (e === "0") return 0; else if (t.hex && B.test(n)) {
580
- return Z(n, 16);
581
- } else if (n.search(/[eE]/) !== -1) {
582
- const i = n.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);
583
- if (i) {
584
- if (t.leadingZeros) {
585
- n = (i[1] || "") + i[3];
586
- } else {
587
- if (i[2] === "0" && i[3][0] === ".") {} else {
588
- return e;
589
- }
590
- }
591
- return t.eNotation ? Number(n) : e;
592
- } else {
593
- return e;
594
- }
745
+ let i = e.trim();
746
+ if (t.skipLike !== undefined && t.skipLike.test(i)) return e; else if (e === "0") return 0; else if (t.hex && $.test(i)) {
747
+ return U(i, 16);
748
+ } else if (i.search(/.+[eE].+/) !== -1) {
749
+ return _(e, i, t);
595
750
  } else {
596
- const i = X.exec(n);
597
- if (i) {
598
- const s = i[1];
599
- const r = i[2];
600
- let o = U(i[3]);
601
- if (!t.leadingZeros && r.length > 0 && s && n[2] !== ".") return e; else if (!t.leadingZeros && r.length > 0 && !s && n[1] !== ".") return e; else if (t.leadingZeros && r === e) return 0; else {
602
- const i = Number(n);
603
- const a = "" + i;
751
+ const n = j.exec(i);
752
+ if (n) {
753
+ const s = n[1] || "";
754
+ const r = n[2];
755
+ let o = L(n[3]);
756
+ const a = s ? e[r.length + 1] === "." : e[r.length] === ".";
757
+ if (!t.leadingZeros && (r.length > 1 || r.length === 1 && !a)) {
758
+ return e;
759
+ } else {
760
+ const n = Number(i);
761
+ const a = String(n);
762
+ if (n === 0) return n;
604
763
  if (a.search(/[eE]/) !== -1) {
605
- if (t.eNotation) return i; else return e;
606
- } else if (n.indexOf(".") !== -1) {
607
- if (a === "0" && o === "") return i; else if (a === o) return i; else if (s && a === "-" + o) return i; else return e;
764
+ if (t.eNotation) return n; else return e;
765
+ } else if (i.indexOf(".") !== -1) {
766
+ if (a === "0") return n; else if (a === o) return n; else if (a === `${s}${o}`) return n; else return e;
608
767
  }
768
+ let l = r ? o : i;
609
769
  if (r) {
610
- return o === a || s + o === a ? i : e;
770
+ return l === a || s + l === a ? n : e;
611
771
  } else {
612
- return n === a || n === s + a ? i : e;
772
+ return l === a || l === s + a ? n : e;
613
773
  }
614
774
  }
615
775
  } else {
@@ -618,34 +778,51 @@ function R(e, t = {}) {
618
778
  }
619
779
  }
620
780
 
621
- function U(e) {
781
+ const M = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
782
+
783
+ function _(e, t, i) {
784
+ if (!i.eNotation) return e;
785
+ const n = t.match(M);
786
+ if (n) {
787
+ let s = n[1] || "";
788
+ const r = n[3].indexOf("e") === -1 ? "E" : "e";
789
+ const o = n[2];
790
+ const a = s ? e[o.length + 1] === r : e[o.length] === r;
791
+ if (o.length > 1 && a) return e; else if (o.length === 1 && (n[3].startsWith(`.${r}`) || n[3][0] === r)) {
792
+ return Number(t);
793
+ } else if (i.leadingZeros && !a) {
794
+ t = (n[1] || "") + n[3];
795
+ return Number(t);
796
+ } else return e;
797
+ } else {
798
+ return e;
799
+ }
800
+ }
801
+
802
+ function L(e) {
622
803
  if (e && e.indexOf(".") !== -1) {
623
804
  e = e.replace(/0+$/, "");
624
- if (e === ".") e = "0"; else if (e[0] === ".") e = "0" + e; else if (e[e.length - 1] === ".") e = e.substr(0, e.length - 1);
805
+ if (e === ".") e = "0"; else if (e[0] === ".") e = "0" + e; else if (e[e.length - 1] === ".") e = e.substring(0, e.length - 1);
625
806
  return e;
626
807
  }
627
808
  return e;
628
809
  }
629
810
 
630
- function Z(e, t) {
811
+ function U(e, t) {
631
812
  if (parseInt) return parseInt(e, t); else if (Number.parseInt) return Number.parseInt(e, t); else if (window && window.parseInt) return window.parseInt(e, t); else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
632
813
  }
633
814
 
634
- var Y = R;
635
-
636
- const q = e(Y);
637
-
638
- function W(e) {
815
+ function R(e) {
639
816
  if (typeof e === "function") {
640
817
  return e;
641
818
  }
642
819
  if (Array.isArray(e)) {
643
820
  return t => {
644
- for (const n of e) {
645
- if (typeof n === "string" && t === n) {
821
+ for (const i of e) {
822
+ if (typeof i === "string" && t === i) {
646
823
  return true;
647
824
  }
648
- if (n instanceof RegExp && n.test(t)) {
825
+ if (i instanceof RegExp && i.test(t)) {
649
826
  return true;
650
827
  }
651
828
  }
@@ -654,23 +831,9 @@ function W(e) {
654
831
  return () => false;
655
832
  }
656
833
 
657
- var z = W;
658
-
659
- const J = e(z);
660
-
661
834
  "use strict";
662
835
 
663
- const H = n;
664
-
665
- const K = A;
666
-
667
- const Q = L;
668
-
669
- const ee = Y;
670
-
671
- const te = z;
672
-
673
- let ne = class OrderedObjParser {
836
+ class OrderedObjParser {
674
837
  constructor(e) {
675
838
  this.options = e;
676
839
  this.currentNode = null;
@@ -733,56 +896,69 @@ let ne = class OrderedObjParser {
733
896
  },
734
897
  num_dec: {
735
898
  regex: /&#([0-9]{1,7});/g,
736
- val: (e, t) => String.fromCharCode(Number.parseInt(t, 10))
899
+ val: (e, t) => String.fromCodePoint(Number.parseInt(t, 10))
737
900
  },
738
901
  num_hex: {
739
902
  regex: /&#x([0-9a-fA-F]{1,6});/g,
740
- val: (e, t) => String.fromCharCode(Number.parseInt(t, 16))
903
+ val: (e, t) => String.fromCodePoint(Number.parseInt(t, 16))
741
904
  }
742
905
  };
743
- this.addExternalEntities = ie;
744
- this.parseXml = le;
745
- this.parseTextData = se;
746
- this.resolveNameSpace = re;
747
- this.buildAttributesMap = ae;
748
- this.isItStopNode = he;
749
- this.replaceEntitiesValue = fe;
750
- this.readStopNodeData = me;
751
- this.saveTextToParentTag = ce;
752
- this.addChild = ue;
753
- this.ignoreAttributesFn = te(this.options.ignoreAttributes);
906
+ this.addExternalEntities = X;
907
+ this.parseXml = q;
908
+ this.parseTextData = B;
909
+ this.resolveNameSpace = Y;
910
+ this.buildAttributesMap = W;
911
+ this.isItStopNode = z;
912
+ this.replaceEntitiesValue = K;
913
+ this.readStopNodeData = te;
914
+ this.saveTextToParentTag = Q;
915
+ this.addChild = Z;
916
+ this.ignoreAttributesFn = R(this.options.ignoreAttributes);
917
+ if (this.options.stopNodes && this.options.stopNodes.length > 0) {
918
+ this.stopNodesExact = new Set;
919
+ this.stopNodesWildcard = new Set;
920
+ for (let e = 0; e < this.options.stopNodes.length; e++) {
921
+ const t = this.options.stopNodes[e];
922
+ if (typeof t !== "string") continue;
923
+ if (t.startsWith("*.")) {
924
+ this.stopNodesWildcard.add(t.substring(2));
925
+ } else {
926
+ this.stopNodesExact.add(t);
927
+ }
928
+ }
929
+ }
754
930
  }
755
- };
931
+ }
756
932
 
757
- function ie(e) {
933
+ function X(e) {
758
934
  const t = Object.keys(e);
759
- for (let n = 0; n < t.length; n++) {
760
- const i = t[n];
761
- this.lastEntities[i] = {
762
- regex: new RegExp("&" + i + ";", "g"),
763
- val: e[i]
935
+ for (let i = 0; i < t.length; i++) {
936
+ const n = t[i];
937
+ this.lastEntities[n] = {
938
+ regex: new RegExp("&" + n + ";", "g"),
939
+ val: e[n]
764
940
  };
765
941
  }
766
942
  }
767
943
 
768
- function se(e, t, n, i, s, r, o) {
944
+ function B(e, t, i, n, s, r, o) {
769
945
  if (e !== undefined) {
770
- if (this.options.trimValues && !i) {
946
+ if (this.options.trimValues && !n) {
771
947
  e = e.trim();
772
948
  }
773
949
  if (e.length > 0) {
774
950
  if (!o) e = this.replaceEntitiesValue(e);
775
- const i = this.options.tagValueProcessor(t, e, n, s, r);
776
- if (i === null || i === undefined) {
951
+ const n = this.options.tagValueProcessor(t, e, i, s, r);
952
+ if (n === null || n === undefined) {
777
953
  return e;
778
- } else if (typeof i !== typeof e || i !== e) {
779
- return i;
954
+ } else if (typeof n !== typeof e || n !== e) {
955
+ return n;
780
956
  } else if (this.options.trimValues) {
781
- return xe(e, this.options.parseTagValue, this.options.numberParseOptions);
957
+ return ie(e, this.options.parseTagValue, this.options.numberParseOptions);
782
958
  } else {
783
959
  const t = e.trim();
784
960
  if (t === e) {
785
- return xe(e, this.options.parseTagValue, this.options.numberParseOptions);
961
+ return ie(e, this.options.parseTagValue, this.options.numberParseOptions);
786
962
  } else {
787
963
  return e;
788
964
  }
@@ -791,96 +967,97 @@ function se(e, t, n, i, s, r, o) {
791
967
  }
792
968
  }
793
969
 
794
- function re(e) {
970
+ function Y(e) {
795
971
  if (this.options.removeNSPrefix) {
796
972
  const t = e.split(":");
797
- const n = e.charAt(0) === "/" ? "/" : "";
973
+ const i = e.charAt(0) === "/" ? "/" : "";
798
974
  if (t[0] === "xmlns") {
799
975
  return "";
800
976
  }
801
977
  if (t.length === 2) {
802
- e = n + t[1];
978
+ e = i + t[1];
803
979
  }
804
980
  }
805
981
  return e;
806
982
  }
807
983
 
808
- const oe = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
984
+ const G = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
809
985
 
810
- function ae(e, t, n) {
986
+ function W(e, t, i) {
811
987
  if (this.options.ignoreAttributes !== true && typeof e === "string") {
812
- const n = H.getAllMatches(e, oe);
813
- const i = n.length;
814
- const s = {};
815
- for (let e = 0; e < i; e++) {
816
- const i = this.resolveNameSpace(n[e][1]);
817
- if (this.ignoreAttributesFn(i, t)) {
988
+ const i = s(e, G);
989
+ const n = i.length;
990
+ const r = {};
991
+ for (let e = 0; e < n; e++) {
992
+ const n = this.resolveNameSpace(i[e][1]);
993
+ if (this.ignoreAttributesFn(n, t)) {
818
994
  continue;
819
995
  }
820
- let r = n[e][4];
821
- let o = this.options.attributeNamePrefix + i;
822
- if (i.length) {
996
+ let s = i[e][4];
997
+ let o = this.options.attributeNamePrefix + n;
998
+ if (n.length) {
823
999
  if (this.options.transformAttributeName) {
824
1000
  o = this.options.transformAttributeName(o);
825
1001
  }
826
1002
  if (o === "__proto__") o = "#__proto__";
827
- if (r !== undefined) {
1003
+ if (s !== undefined) {
828
1004
  if (this.options.trimValues) {
829
- r = r.trim();
1005
+ s = s.trim();
830
1006
  }
831
- r = this.replaceEntitiesValue(r);
832
- const e = this.options.attributeValueProcessor(i, r, t);
1007
+ s = this.replaceEntitiesValue(s);
1008
+ const e = this.options.attributeValueProcessor(n, s, t);
833
1009
  if (e === null || e === undefined) {
834
- s[o] = r;
835
- } else if (typeof e !== typeof r || e !== r) {
836
- s[o] = e;
1010
+ r[o] = s;
1011
+ } else if (typeof e !== typeof s || e !== s) {
1012
+ r[o] = e;
837
1013
  } else {
838
- s[o] = xe(r, this.options.parseAttributeValue, this.options.numberParseOptions);
1014
+ r[o] = ie(s, this.options.parseAttributeValue, this.options.numberParseOptions);
839
1015
  }
840
1016
  } else if (this.options.allowBooleanAttributes) {
841
- s[o] = true;
1017
+ r[o] = true;
842
1018
  }
843
1019
  }
844
1020
  }
845
- if (!Object.keys(s).length) {
1021
+ if (!Object.keys(r).length) {
846
1022
  return;
847
1023
  }
848
1024
  if (this.options.attributesGroupName) {
849
1025
  const e = {};
850
- e[this.options.attributesGroupName] = s;
1026
+ e[this.options.attributesGroupName] = r;
851
1027
  return e;
852
1028
  }
853
- return s;
1029
+ return r;
854
1030
  }
855
1031
  }
856
1032
 
857
- const le = function(e) {
1033
+ const q = function(e) {
858
1034
  e = e.replace(/\r\n?/g, "\n");
859
- const t = new K("!xml");
860
- let n = t;
861
- let i = "";
1035
+ const t = new XmlNode("!xml");
1036
+ let i = t;
1037
+ let n = "";
862
1038
  let s = "";
863
- for (let r = 0; r < e.length; r++) {
864
- const o = e[r];
865
- if (o === "<") {
866
- if (e[r + 1] === "/") {
867
- const t = pe(e, ">", r, "Closing Tag is not closed.");
868
- let o = e.substring(r + 2, t).trim();
1039
+ const r = new DocTypeReader(this.options.processEntities);
1040
+ for (let o = 0; o < e.length; o++) {
1041
+ const a = e[o];
1042
+ if (a === "<") {
1043
+ if (e[o + 1] === "/") {
1044
+ const t = H(e, ">", o, "Closing Tag is not closed.");
1045
+ let r = e.substring(o + 2, t).trim();
869
1046
  if (this.options.removeNSPrefix) {
870
- const e = o.indexOf(":");
1047
+ const e = r.indexOf(":");
871
1048
  if (e !== -1) {
872
- o = o.substr(e + 1);
1049
+ r = r.substr(e + 1);
873
1050
  }
874
1051
  }
875
1052
  if (this.options.transformTagName) {
876
- o = this.options.transformTagName(o);
1053
+ r = this.options.transformTagName(r);
877
1054
  }
878
- if (n) {
879
- i = this.saveTextToParentTag(i, n, s);
1055
+ if (i) {
1056
+ n = this.saveTextToParentTag(n, i, s);
880
1057
  }
881
1058
  const a = s.substring(s.lastIndexOf(".") + 1);
882
- if (o && this.options.unpairedTags.indexOf(o) !== -1) {
883
- throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);
1059
+ if (r && this.options.unpairedTags.indexOf(r) !== -1) {
1060
+ throw new Error(`Unpaired tag can not be used as closing tag: </${r}>`);
884
1061
  }
885
1062
  let l = 0;
886
1063
  if (a && this.options.unpairedTags.indexOf(a) !== -1) {
@@ -890,74 +1067,75 @@ const le = function(e) {
890
1067
  l = s.lastIndexOf(".");
891
1068
  }
892
1069
  s = s.substring(0, l);
893
- n = this.tagsNodeStack.pop();
894
- i = "";
895
- r = t;
896
- } else if (e[r + 1] === "?") {
897
- let t = ge(e, r, false, "?>");
1070
+ i = this.tagsNodeStack.pop();
1071
+ n = "";
1072
+ o = t;
1073
+ } else if (e[o + 1] === "?") {
1074
+ let t = ee(e, o, false, "?>");
898
1075
  if (!t) throw new Error("Pi Tag is not closed.");
899
- i = this.saveTextToParentTag(i, n, s);
1076
+ n = this.saveTextToParentTag(n, i, s);
900
1077
  if (this.options.ignoreDeclaration && t.tagName === "?xml" || this.options.ignorePiTags) {} else {
901
- const e = new K(t.tagName);
1078
+ const e = new XmlNode(t.tagName);
902
1079
  e.add(this.options.textNodeName, "");
903
1080
  if (t.tagName !== t.tagExp && t.attrExpPresent) {
904
1081
  e[":@"] = this.buildAttributesMap(t.tagExp, s, t.tagName);
905
1082
  }
906
- this.addChild(n, e, s);
1083
+ this.addChild(i, e, s, o);
907
1084
  }
908
- r = t.closeIndex + 1;
909
- } else if (e.substr(r + 1, 3) === "!--") {
910
- const t = pe(e, "--\x3e", r + 4, "Comment is not closed.");
1085
+ o = t.closeIndex + 1;
1086
+ } else if (e.substr(o + 1, 3) === "!--") {
1087
+ const t = H(e, "--\x3e", o + 4, "Comment is not closed.");
911
1088
  if (this.options.commentPropName) {
912
- const o = e.substring(r + 4, t - 2);
913
- i = this.saveTextToParentTag(i, n, s);
914
- n.add(this.options.commentPropName, [ {
915
- [this.options.textNodeName]: o
1089
+ const r = e.substring(o + 4, t - 2);
1090
+ n = this.saveTextToParentTag(n, i, s);
1091
+ i.add(this.options.commentPropName, [ {
1092
+ [this.options.textNodeName]: r
916
1093
  } ]);
917
1094
  }
918
- r = t;
919
- } else if (e.substr(r + 1, 2) === "!D") {
920
- const t = Q(e, r);
1095
+ o = t;
1096
+ } else if (e.substr(o + 1, 2) === "!D") {
1097
+ const t = r.readDocType(e, o);
921
1098
  this.docTypeEntities = t.entities;
922
- r = t.i;
923
- } else if (e.substr(r + 1, 2) === "![") {
924
- const t = pe(e, "]]>", r, "CDATA is not closed.") - 2;
925
- const o = e.substring(r + 9, t);
926
- i = this.saveTextToParentTag(i, n, s);
927
- let a = this.parseTextData(o, n.tagname, s, true, false, true, true);
1099
+ o = t.i;
1100
+ } else if (e.substr(o + 1, 2) === "![") {
1101
+ const t = H(e, "]]>", o, "CDATA is not closed.") - 2;
1102
+ const r = e.substring(o + 9, t);
1103
+ n = this.saveTextToParentTag(n, i, s);
1104
+ let a = this.parseTextData(r, i.tagname, s, true, false, true, true);
928
1105
  if (a == undefined) a = "";
929
1106
  if (this.options.cdataPropName) {
930
- n.add(this.options.cdataPropName, [ {
931
- [this.options.textNodeName]: o
1107
+ i.add(this.options.cdataPropName, [ {
1108
+ [this.options.textNodeName]: r
932
1109
  } ]);
933
1110
  } else {
934
- n.add(this.options.textNodeName, a);
1111
+ i.add(this.options.textNodeName, a);
935
1112
  }
936
- r = t + 2;
1113
+ o = t + 2;
937
1114
  } else {
938
- let o = ge(e, r, this.options.removeNSPrefix);
939
- let a = o.tagName;
940
- const l = o.rawTagName;
941
- let u = o.tagExp;
942
- let f = o.attrExpPresent;
943
- let c = o.closeIndex;
1115
+ let r = ee(e, o, this.options.removeNSPrefix);
1116
+ let a = r.tagName;
1117
+ const l = r.rawTagName;
1118
+ let u = r.tagExp;
1119
+ let f = r.attrExpPresent;
1120
+ let d = r.closeIndex;
944
1121
  if (this.options.transformTagName) {
945
1122
  a = this.options.transformTagName(a);
946
1123
  }
947
- if (n && i) {
948
- if (n.tagname !== "!xml") {
949
- i = this.saveTextToParentTag(i, n, s, false);
1124
+ if (i && n) {
1125
+ if (i.tagname !== "!xml") {
1126
+ n = this.saveTextToParentTag(n, i, s, false);
950
1127
  }
951
1128
  }
952
- const h = n;
1129
+ const h = i;
953
1130
  if (h && this.options.unpairedTags.indexOf(h.tagname) !== -1) {
954
- n = this.tagsNodeStack.pop();
1131
+ i = this.tagsNodeStack.pop();
955
1132
  s = s.substring(0, s.lastIndexOf("."));
956
1133
  }
957
1134
  if (a !== t.tagname) {
958
1135
  s += s ? "." + a : a;
959
1136
  }
960
- if (this.isItStopNode(this.options.stopNodes, s, a)) {
1137
+ const c = o;
1138
+ if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s, a)) {
961
1139
  let t = "";
962
1140
  if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) {
963
1141
  if (a[a.length - 1] === "/") {
@@ -967,25 +1145,25 @@ const le = function(e) {
967
1145
  } else {
968
1146
  u = u.substr(0, u.length - 1);
969
1147
  }
970
- r = o.closeIndex;
1148
+ o = r.closeIndex;
971
1149
  } else if (this.options.unpairedTags.indexOf(a) !== -1) {
972
- r = o.closeIndex;
1150
+ o = r.closeIndex;
973
1151
  } else {
974
- const n = this.readStopNodeData(e, l, c + 1);
975
- if (!n) throw new Error(`Unexpected end of ${l}`);
976
- r = n.i;
977
- t = n.tagContent;
1152
+ const i = this.readStopNodeData(e, l, d + 1);
1153
+ if (!i) throw new Error(`Unexpected end of ${l}`);
1154
+ o = i.i;
1155
+ t = i.tagContent;
978
1156
  }
979
- const i = new K(a);
1157
+ const n = new XmlNode(a);
980
1158
  if (a !== u && f) {
981
- i[":@"] = this.buildAttributesMap(u, s, a);
1159
+ n[":@"] = this.buildAttributesMap(u, s, a);
982
1160
  }
983
1161
  if (t) {
984
1162
  t = this.parseTextData(t, a, s, true, f, true, true);
985
1163
  }
986
1164
  s = s.substr(0, s.lastIndexOf("."));
987
- i.add(this.options.textNodeName, t);
988
- this.addChild(n, i, s);
1165
+ n.add(this.options.textNodeName, t);
1166
+ this.addChild(i, n, s, c);
989
1167
  } else {
990
1168
  if (u.length > 0 && u.lastIndexOf("/") === u.length - 1) {
991
1169
  if (a[a.length - 1] === "/") {
@@ -998,56 +1176,57 @@ const le = function(e) {
998
1176
  if (this.options.transformTagName) {
999
1177
  a = this.options.transformTagName(a);
1000
1178
  }
1001
- const e = new K(a);
1179
+ const e = new XmlNode(a);
1002
1180
  if (a !== u && f) {
1003
1181
  e[":@"] = this.buildAttributesMap(u, s, a);
1004
1182
  }
1005
- this.addChild(n, e, s);
1183
+ this.addChild(i, e, s, c);
1006
1184
  s = s.substr(0, s.lastIndexOf("."));
1007
1185
  } else {
1008
- const e = new K(a);
1009
- this.tagsNodeStack.push(n);
1186
+ const e = new XmlNode(a);
1187
+ this.tagsNodeStack.push(i);
1010
1188
  if (a !== u && f) {
1011
1189
  e[":@"] = this.buildAttributesMap(u, s, a);
1012
1190
  }
1013
- this.addChild(n, e, s);
1014
- n = e;
1191
+ this.addChild(i, e, s, c);
1192
+ i = e;
1015
1193
  }
1016
- i = "";
1017
- r = c;
1194
+ n = "";
1195
+ o = d;
1018
1196
  }
1019
1197
  }
1020
1198
  } else {
1021
- i += e[r];
1199
+ n += e[o];
1022
1200
  }
1023
1201
  }
1024
1202
  return t.child;
1025
1203
  };
1026
1204
 
1027
- function ue(e, t, n) {
1028
- const i = this.options.updateTag(t.tagname, n, t[":@"]);
1029
- if (i === false) {} else if (typeof i === "string") {
1030
- t.tagname = i;
1031
- e.addChild(t);
1205
+ function Z(e, t, i, n) {
1206
+ if (!this.options.captureMetaData) n = undefined;
1207
+ const s = this.options.updateTag(t.tagname, i, t[":@"]);
1208
+ if (s === false) {} else if (typeof s === "string") {
1209
+ t.tagname = s;
1210
+ e.addChild(t, n);
1032
1211
  } else {
1033
- e.addChild(t);
1212
+ e.addChild(t, n);
1034
1213
  }
1035
1214
  }
1036
1215
 
1037
- const fe = function(e) {
1216
+ const K = function(e) {
1038
1217
  if (this.options.processEntities) {
1039
1218
  for (let t in this.docTypeEntities) {
1040
- const n = this.docTypeEntities[t];
1041
- e = e.replace(n.regx, n.val);
1219
+ const i = this.docTypeEntities[t];
1220
+ e = e.replace(i.regx, i.val);
1042
1221
  }
1043
1222
  for (let t in this.lastEntities) {
1044
- const n = this.lastEntities[t];
1045
- e = e.replace(n.regex, n.val);
1223
+ const i = this.lastEntities[t];
1224
+ e = e.replace(i.regex, i.val);
1046
1225
  }
1047
1226
  if (this.options.htmlEntities) {
1048
1227
  for (let t in this.htmlEntities) {
1049
- const n = this.htmlEntities[t];
1050
- e = e.replace(n.regex, n.val);
1228
+ const i = this.htmlEntities[t];
1229
+ e = e.replace(i.regex, i.val);
1051
1230
  }
1052
1231
  }
1053
1232
  e = e.replace(this.ampEntity.regex, this.ampEntity.val);
@@ -1055,37 +1234,34 @@ const fe = function(e) {
1055
1234
  return e;
1056
1235
  };
1057
1236
 
1058
- function ce(e, t, n, i) {
1237
+ function Q(e, t, i, n) {
1059
1238
  if (e) {
1060
- if (i === undefined) i = t.child.length === 0;
1061
- e = this.parseTextData(e, t.tagname, n, false, t[":@"] ? Object.keys(t[":@"]).length !== 0 : false, i);
1239
+ if (n === undefined) n = t.child.length === 0;
1240
+ e = this.parseTextData(e, t.tagname, i, false, t[":@"] ? Object.keys(t[":@"]).length !== 0 : false, n);
1062
1241
  if (e !== undefined && e !== "") t.add(this.options.textNodeName, e);
1063
1242
  e = "";
1064
1243
  }
1065
1244
  return e;
1066
1245
  }
1067
1246
 
1068
- function he(e, t, n) {
1069
- const i = "*." + n;
1070
- for (const n in e) {
1071
- const s = e[n];
1072
- if (i === s || t === s) return true;
1073
- }
1247
+ function z(e, t, i, n) {
1248
+ if (t && t.has(n)) return true;
1249
+ if (e && e.has(i)) return true;
1074
1250
  return false;
1075
1251
  }
1076
1252
 
1077
- function de(e, t, n = ">") {
1078
- let i;
1253
+ function J(e, t, i = ">") {
1254
+ let n;
1079
1255
  let s = "";
1080
1256
  for (let r = t; r < e.length; r++) {
1081
1257
  let t = e[r];
1082
- if (i) {
1083
- if (t === i) i = "";
1258
+ if (n) {
1259
+ if (t === n) n = "";
1084
1260
  } else if (t === '"' || t === "'") {
1085
- i = t;
1086
- } else if (t === n[0]) {
1087
- if (n[1]) {
1088
- if (e[r + 1] === n[1]) {
1261
+ n = t;
1262
+ } else if (t === i[0]) {
1263
+ if (i[1]) {
1264
+ if (e[r + 1] === i[1]) {
1089
1265
  return {
1090
1266
  data: s,
1091
1267
  index: r
@@ -1104,17 +1280,17 @@ function de(e, t, n = ">") {
1104
1280
  }
1105
1281
  }
1106
1282
 
1107
- function pe(e, t, n, i) {
1108
- const s = e.indexOf(t, n);
1283
+ function H(e, t, i, n) {
1284
+ const s = e.indexOf(t, i);
1109
1285
  if (s === -1) {
1110
- throw new Error(i);
1286
+ throw new Error(n);
1111
1287
  } else {
1112
1288
  return s + t.length - 1;
1113
1289
  }
1114
1290
  }
1115
1291
 
1116
- function ge(e, t, n, i = ">") {
1117
- const s = de(e, t + 1, i);
1292
+ function ee(e, t, i, n = ">") {
1293
+ const s = J(e, t + 1, n);
1118
1294
  if (!s) return;
1119
1295
  let r = s.data;
1120
1296
  const o = s.index;
@@ -1126,7 +1302,7 @@ function ge(e, t, n, i = ">") {
1126
1302
  r = r.substring(a + 1).trimStart();
1127
1303
  }
1128
1304
  const f = l;
1129
- if (n) {
1305
+ if (i) {
1130
1306
  const e = l.indexOf(":");
1131
1307
  if (e !== -1) {
1132
1308
  l = l.substr(e + 1);
@@ -1142,53 +1318,53 @@ function ge(e, t, n, i = ">") {
1142
1318
  };
1143
1319
  }
1144
1320
 
1145
- function me(e, t, n) {
1146
- const i = n;
1321
+ function te(e, t, i) {
1322
+ const n = i;
1147
1323
  let s = 1;
1148
- for (;n < e.length; n++) {
1149
- if (e[n] === "<") {
1150
- if (e[n + 1] === "/") {
1151
- const r = pe(e, ">", n, `${t} is not closed`);
1152
- let o = e.substring(n + 2, r).trim();
1324
+ for (;i < e.length; i++) {
1325
+ if (e[i] === "<") {
1326
+ if (e[i + 1] === "/") {
1327
+ const r = H(e, ">", i, `${t} is not closed`);
1328
+ let o = e.substring(i + 2, r).trim();
1153
1329
  if (o === t) {
1154
1330
  s--;
1155
1331
  if (s === 0) {
1156
1332
  return {
1157
- tagContent: e.substring(i, n),
1333
+ tagContent: e.substring(n, i),
1158
1334
  i: r
1159
1335
  };
1160
1336
  }
1161
1337
  }
1162
- n = r;
1163
- } else if (e[n + 1] === "?") {
1164
- const t = pe(e, "?>", n + 1, "StopNode is not closed.");
1165
- n = t;
1166
- } else if (e.substr(n + 1, 3) === "!--") {
1167
- const t = pe(e, "--\x3e", n + 3, "StopNode is not closed.");
1168
- n = t;
1169
- } else if (e.substr(n + 1, 2) === "![") {
1170
- const t = pe(e, "]]>", n, "StopNode is not closed.") - 2;
1171
- n = t;
1338
+ i = r;
1339
+ } else if (e[i + 1] === "?") {
1340
+ const t = H(e, "?>", i + 1, "StopNode is not closed.");
1341
+ i = t;
1342
+ } else if (e.substr(i + 1, 3) === "!--") {
1343
+ const t = H(e, "--\x3e", i + 3, "StopNode is not closed.");
1344
+ i = t;
1345
+ } else if (e.substr(i + 1, 2) === "![") {
1346
+ const t = H(e, "]]>", i, "StopNode is not closed.") - 2;
1347
+ i = t;
1172
1348
  } else {
1173
- const i = ge(e, n, ">");
1174
- if (i) {
1175
- const e = i && i.tagName;
1176
- if (e === t && i.tagExp[i.tagExp.length - 1] !== "/") {
1349
+ const n = ee(e, i, ">");
1350
+ if (n) {
1351
+ const e = n && n.tagName;
1352
+ if (e === t && n.tagExp[n.tagExp.length - 1] !== "/") {
1177
1353
  s++;
1178
1354
  }
1179
- n = i.closeIndex;
1355
+ i = n.closeIndex;
1180
1356
  }
1181
1357
  }
1182
1358
  }
1183
1359
  }
1184
1360
  }
1185
1361
 
1186
- function xe(e, t, n) {
1362
+ function ie(e, t, i) {
1187
1363
  if (t && typeof e === "string") {
1188
1364
  const t = e.trim();
1189
- if (t === "true") return true; else if (t === "false") return false; else return ee(e, n);
1365
+ if (t === "true") return true; else if (t === "false") return false; else return F(e, i);
1190
1366
  } else {
1191
- if (H.isExist(e)) {
1367
+ if (o(e)) {
1192
1368
  return e;
1193
1369
  } else {
1194
1370
  return "";
@@ -1196,35 +1372,34 @@ function xe(e, t, n) {
1196
1372
  }
1197
1373
  }
1198
1374
 
1199
- var Ne = ne;
1200
-
1201
- const be = e(Ne);
1202
-
1203
- var Ee = {};
1204
-
1205
1375
  "use strict";
1206
1376
 
1207
- function ve(e, t) {
1208
- return ye(e, t);
1377
+ const ne = XmlNode.getMetaDataSymbol();
1378
+
1379
+ function se(e, t) {
1380
+ return re(e, t);
1209
1381
  }
1210
1382
 
1211
- function ye(e, t, n) {
1212
- let i;
1383
+ function re(e, t, i) {
1384
+ let n;
1213
1385
  const s = {};
1214
1386
  for (let r = 0; r < e.length; r++) {
1215
1387
  const o = e[r];
1216
- const a = Te(o);
1388
+ const a = oe(o);
1217
1389
  let l = "";
1218
- if (n === undefined) l = a; else l = n + "." + a;
1390
+ if (i === undefined) l = a; else l = i + "." + a;
1219
1391
  if (a === t.textNodeName) {
1220
- if (i === undefined) i = o[a]; else i += "" + o[a];
1392
+ if (n === undefined) n = o[a]; else n += "" + o[a];
1221
1393
  } else if (a === undefined) {
1222
1394
  continue;
1223
1395
  } else if (o[a]) {
1224
- let e = ye(o[a], t, l);
1225
- const n = we(e, t);
1396
+ let e = re(o[a], t, l);
1397
+ const i = le(e, t);
1398
+ if (o[ne] !== undefined) {
1399
+ e[ne] = o[ne];
1400
+ }
1226
1401
  if (o[":@"]) {
1227
- Oe(e, o[":@"], l, t);
1402
+ ae(e, o[":@"], l, t);
1228
1403
  } else if (Object.keys(e).length === 1 && e[t.textNodeName] !== undefined && !t.alwaysCreateTextNode) {
1229
1404
  e = e[t.textNodeName];
1230
1405
  } else if (Object.keys(e).length === 0) {
@@ -1236,7 +1411,7 @@ function ye(e, t, n) {
1236
1411
  }
1237
1412
  s[a].push(e);
1238
1413
  } else {
1239
- if (t.isArray(a, l, n)) {
1414
+ if (t.isArray(a, l, i)) {
1240
1415
  s[a] = [ e ];
1241
1416
  } else {
1242
1417
  s[a] = e;
@@ -1244,27 +1419,27 @@ function ye(e, t, n) {
1244
1419
  }
1245
1420
  }
1246
1421
  }
1247
- if (typeof i === "string") {
1248
- if (i.length > 0) s[t.textNodeName] = i;
1249
- } else if (i !== undefined) s[t.textNodeName] = i;
1422
+ if (typeof n === "string") {
1423
+ if (n.length > 0) s[t.textNodeName] = n;
1424
+ } else if (n !== undefined) s[t.textNodeName] = n;
1250
1425
  return s;
1251
1426
  }
1252
1427
 
1253
- function Te(e) {
1428
+ function oe(e) {
1254
1429
  const t = Object.keys(e);
1255
1430
  for (let e = 0; e < t.length; e++) {
1256
- const n = t[e];
1257
- if (n !== ":@") return n;
1431
+ const i = t[e];
1432
+ if (i !== ":@") return i;
1258
1433
  }
1259
1434
  }
1260
1435
 
1261
- function Oe(e, t, n, i) {
1436
+ function ae(e, t, i, n) {
1262
1437
  if (t) {
1263
1438
  const s = Object.keys(t);
1264
1439
  const r = s.length;
1265
1440
  for (let o = 0; o < r; o++) {
1266
1441
  const r = s[o];
1267
- if (i.isArray(r, n + "." + r, true, true)) {
1442
+ if (n.isArray(r, i + "." + r, true, true)) {
1268
1443
  e[r] = [ t[r] ];
1269
1444
  } else {
1270
1445
  e[r] = t[r];
@@ -1273,50 +1448,40 @@ function Oe(e, t, n, i) {
1273
1448
  }
1274
1449
  }
1275
1450
 
1276
- function we(e, t) {
1277
- const {textNodeName: n} = t;
1278
- const i = Object.keys(e).length;
1279
- if (i === 0) {
1451
+ function le(e, t) {
1452
+ const {textNodeName: i} = t;
1453
+ const n = Object.keys(e).length;
1454
+ if (n === 0) {
1280
1455
  return true;
1281
1456
  }
1282
- if (i === 1 && (e[n] || typeof e[n] === "boolean" || e[n] === 0)) {
1457
+ if (n === 1 && (e[i] || typeof e[i] === "boolean" || e[i] === 0)) {
1283
1458
  return true;
1284
1459
  }
1285
1460
  return false;
1286
1461
  }
1287
1462
 
1288
- var Pe = Ee.prettify = ve;
1289
-
1290
- const {buildOptions: Ae} = y;
1291
-
1292
- const Ie = Ne;
1293
-
1294
- const {prettify: Ce} = Ee;
1295
-
1296
- const Se = t;
1297
-
1298
- let Ve = class XMLParser {
1463
+ class XMLParser {
1299
1464
  constructor(e) {
1300
1465
  this.externalEntities = {};
1301
- this.options = Ae(e);
1466
+ this.options = A(e);
1302
1467
  }
1303
1468
  parse(e, t) {
1304
- if (typeof e === "string") {} else if (e.toString) {
1469
+ if (typeof e !== "string" && e.toString) {
1305
1470
  e = e.toString();
1306
- } else {
1471
+ } else if (typeof e !== "string") {
1307
1472
  throw new Error("XML data is accepted in String or Bytes[] form.");
1308
1473
  }
1309
1474
  if (t) {
1310
1475
  if (t === true) t = {};
1311
- const n = Se.validate(e, t);
1312
- if (n !== true) {
1313
- throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
1476
+ const i = d(e, t);
1477
+ if (i !== true) {
1478
+ throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`);
1314
1479
  }
1315
1480
  }
1316
- const n = new Ie(this.options);
1317
- n.addExternalEntities(this.externalEntities);
1318
- const i = n.parseXml(e);
1319
- if (this.options.preserveOrder || i === undefined) return i; else return Ce(i, this.options);
1481
+ const i = new OrderedObjParser(this.options);
1482
+ i.addExternalEntities(this.externalEntities);
1483
+ const n = i.parseXml(e);
1484
+ if (this.options.preserveOrder || n === undefined) return n; else return se(n, this.options);
1320
1485
  }
1321
1486
  addEntity(e, t) {
1322
1487
  if (t.indexOf("&") !== -1) {
@@ -1329,82 +1494,81 @@ let Ve = class XMLParser {
1329
1494
  this.externalEntities[e] = t;
1330
1495
  }
1331
1496
  }
1332
- };
1333
-
1334
- var je = Ve;
1335
-
1336
- const ke = e(je);
1497
+ static getMetaDataSymbol() {
1498
+ return XmlNode.getMetaDataSymbol();
1499
+ }
1500
+ }
1337
1501
 
1338
- const $e = "\n";
1502
+ const ue = "\n";
1339
1503
 
1340
- function Fe(e, t) {
1341
- let n = "";
1504
+ function fe(e, t) {
1505
+ let i = "";
1342
1506
  if (t.format && t.indentBy.length > 0) {
1343
- n = $e;
1507
+ i = ue;
1344
1508
  }
1345
- return _e(e, t, "", n);
1509
+ return de(e, t, "", i);
1346
1510
  }
1347
1511
 
1348
- function _e(e, t, n, i) {
1512
+ function de(e, t, i, n) {
1349
1513
  let s = "";
1350
1514
  let r = false;
1351
1515
  for (let o = 0; o < e.length; o++) {
1352
1516
  const a = e[o];
1353
- const l = De(a);
1517
+ const l = he(a);
1354
1518
  if (l === undefined) continue;
1355
1519
  let u = "";
1356
- if (n.length === 0) u = l; else u = `${n}.${l}`;
1520
+ if (i.length === 0) u = l; else u = `${i}.${l}`;
1357
1521
  if (l === t.textNodeName) {
1358
1522
  let e = a[l];
1359
- if (!Me(u, t)) {
1523
+ if (!pe(u, t)) {
1360
1524
  e = t.tagValueProcessor(l, e);
1361
- e = Be(e, t);
1525
+ e = ge(e, t);
1362
1526
  }
1363
1527
  if (r) {
1364
- s += i;
1528
+ s += n;
1365
1529
  }
1366
1530
  s += e;
1367
1531
  r = false;
1368
1532
  continue;
1369
1533
  } else if (l === t.cdataPropName) {
1370
1534
  if (r) {
1371
- s += i;
1535
+ s += n;
1372
1536
  }
1373
1537
  s += `<![CDATA[${a[l][0][t.textNodeName]}]]>`;
1374
1538
  r = false;
1375
1539
  continue;
1376
1540
  } else if (l === t.commentPropName) {
1377
- s += i + `\x3c!--${a[l][0][t.textNodeName]}--\x3e`;
1541
+ s += n + `\x3c!--${a[l][0][t.textNodeName]}--\x3e`;
1378
1542
  r = true;
1379
1543
  continue;
1380
1544
  } else if (l[0] === "?") {
1381
- const e = Le(a[":@"], t);
1382
- const n = l === "?xml" ? "" : i;
1545
+ const e = ce(a[":@"], t);
1546
+ const i = l === "?xml" ? "" : n;
1383
1547
  let o = a[l][0][t.textNodeName];
1384
1548
  o = o.length !== 0 ? " " + o : "";
1385
- s += n + `<${l}${o}${e}?>`;
1549
+ s += i + `<${l}${o}${e}?>`;
1386
1550
  r = true;
1387
1551
  continue;
1388
1552
  }
1389
- let f = i;
1553
+ let f = n;
1390
1554
  if (f !== "") {
1391
1555
  f += t.indentBy;
1392
1556
  }
1393
- const c = Le(a[":@"], t);
1394
- const h = i + `<${l}${c}`;
1395
- const d = _e(a[l], t, u, f);
1557
+ const d = ce(a[":@"], t);
1558
+ const h = n + `<${l}${d}`;
1559
+ const c = de(a[l], t, u, f);
1396
1560
  if (t.unpairedTags.indexOf(l) !== -1) {
1397
1561
  if (t.suppressUnpairedNode) s += h + ">"; else s += h + "/>";
1398
- } else if ((!d || d.length === 0) && t.suppressEmptyNode) {
1562
+ } else if ((!c || c.length === 0) && t.suppressEmptyNode) {
1399
1563
  s += h + "/>";
1400
- } else if (d && d.endsWith(">")) {
1401
- s += h + `>${d}${i}</${l}>`;
1564
+ } else if (c && c.endsWith(">")) {
1565
+ s += h + `>${c}${n}</${l}>`;
1402
1566
  } else {
1403
1567
  s += h + ">";
1404
- if (d && i !== "" && (d.includes("/>") || d.includes("</"))) {
1405
- s += i + t.indentBy + d + i;
1568
+ if (c && n !== "" && (c.includes("/>") || c.includes("</"))) {
1569
+ s += n + t.indentBy + c + n;
1406
1570
  } else {
1407
- s += d;
1571
+ s += c;
1408
1572
  }
1409
1573
  s += `</${l}>`;
1410
1574
  }
@@ -1413,62 +1577,54 @@ function _e(e, t, n, i) {
1413
1577
  return s;
1414
1578
  }
1415
1579
 
1416
- function De(e) {
1580
+ function he(e) {
1417
1581
  const t = Object.keys(e);
1418
- for (let n = 0; n < t.length; n++) {
1419
- const i = t[n];
1420
- if (!e.hasOwnProperty(i)) continue;
1421
- if (i !== ":@") return i;
1582
+ for (let i = 0; i < t.length; i++) {
1583
+ const n = t[i];
1584
+ if (!e.hasOwnProperty(n)) continue;
1585
+ if (n !== ":@") return n;
1422
1586
  }
1423
1587
  }
1424
1588
 
1425
- function Le(e, t) {
1426
- let n = "";
1589
+ function ce(e, t) {
1590
+ let i = "";
1427
1591
  if (e && !t.ignoreAttributes) {
1428
- for (let i in e) {
1429
- if (!e.hasOwnProperty(i)) continue;
1430
- let s = t.attributeValueProcessor(i, e[i]);
1431
- s = Be(s, t);
1592
+ for (let n in e) {
1593
+ if (!e.hasOwnProperty(n)) continue;
1594
+ let s = t.attributeValueProcessor(n, e[n]);
1595
+ s = ge(s, t);
1432
1596
  if (s === true && t.suppressBooleanAttributes) {
1433
- n += ` ${i.substr(t.attributeNamePrefix.length)}`;
1597
+ i += ` ${n.substr(t.attributeNamePrefix.length)}`;
1434
1598
  } else {
1435
- n += ` ${i.substr(t.attributeNamePrefix.length)}="${s}"`;
1599
+ i += ` ${n.substr(t.attributeNamePrefix.length)}="${s}"`;
1436
1600
  }
1437
1601
  }
1438
1602
  }
1439
- return n;
1603
+ return i;
1440
1604
  }
1441
1605
 
1442
- function Me(e, t) {
1606
+ function pe(e, t) {
1443
1607
  e = e.substr(0, e.length - t.textNodeName.length - 1);
1444
- let n = e.substr(e.lastIndexOf(".") + 1);
1445
- for (let i in t.stopNodes) {
1446
- if (t.stopNodes[i] === e || t.stopNodes[i] === "*." + n) return true;
1608
+ let i = e.substr(e.lastIndexOf(".") + 1);
1609
+ for (let n in t.stopNodes) {
1610
+ if (t.stopNodes[n] === e || t.stopNodes[n] === "*." + i) return true;
1447
1611
  }
1448
1612
  return false;
1449
1613
  }
1450
1614
 
1451
- function Be(e, t) {
1615
+ function ge(e, t) {
1452
1616
  if (e && e.length > 0 && t.processEntities) {
1453
- for (let n = 0; n < t.entities.length; n++) {
1454
- const i = t.entities[n];
1455
- e = e.replace(i.regex, i.val);
1617
+ for (let i = 0; i < t.entities.length; i++) {
1618
+ const n = t.entities[i];
1619
+ e = e.replace(n.regex, n.val);
1456
1620
  }
1457
1621
  }
1458
1622
  return e;
1459
1623
  }
1460
1624
 
1461
- var Xe = Fe;
1462
-
1463
- const Ge = e(Xe);
1464
-
1465
1625
  "use strict";
1466
1626
 
1467
- const Re = Xe;
1468
-
1469
- const Ue = z;
1470
-
1471
- const Ze = {
1627
+ const me = {
1472
1628
  attributeNamePrefix: "@_",
1473
1629
  attributesGroupName: false,
1474
1630
  textNodeName: "#text",
@@ -1509,20 +1665,20 @@ const Ze = {
1509
1665
  oneListGroup: false
1510
1666
  };
1511
1667
 
1512
- function Ye(e) {
1513
- this.options = Object.assign({}, Ze, e);
1668
+ function xe(e) {
1669
+ this.options = Object.assign({}, me, e);
1514
1670
  if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {
1515
1671
  this.isAttribute = function() {
1516
1672
  return false;
1517
1673
  };
1518
1674
  } else {
1519
- this.ignoreAttributesFn = Ue(this.options.ignoreAttributes);
1675
+ this.ignoreAttributesFn = R(this.options.ignoreAttributes);
1520
1676
  this.attrPrefixLen = this.options.attributeNamePrefix.length;
1521
- this.isAttribute = Je;
1677
+ this.isAttribute = we;
1522
1678
  }
1523
- this.processTextOrObjNode = qe;
1679
+ this.processTextOrObjNode = Ne;
1524
1680
  if (this.options.format) {
1525
- this.indentate = ze;
1681
+ this.indentate = Ee;
1526
1682
  this.tagEndChar = ">\n";
1527
1683
  this.newLine = "\n";
1528
1684
  } else {
@@ -1534,9 +1690,9 @@ function Ye(e) {
1534
1690
  }
1535
1691
  }
1536
1692
 
1537
- Ye.prototype.build = function(e) {
1693
+ xe.prototype.build = function(e) {
1538
1694
  if (this.options.preserveOrder) {
1539
- return Re(e, this.options);
1695
+ return fe(e, this.options);
1540
1696
  } else {
1541
1697
  if (Array.isArray(e) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {
1542
1698
  e = {
@@ -1547,10 +1703,10 @@ Ye.prototype.build = function(e) {
1547
1703
  }
1548
1704
  };
1549
1705
 
1550
- Ye.prototype.j2x = function(e, t, n) {
1551
- let i = "";
1706
+ xe.prototype.j2x = function(e, t, i) {
1707
+ let n = "";
1552
1708
  let s = "";
1553
- const r = n.join(".");
1709
+ const r = i.join(".");
1554
1710
  for (let o in e) {
1555
1711
  if (!Object.prototype.hasOwnProperty.call(e, o)) continue;
1556
1712
  if (typeof e[o] === "undefined") {
@@ -1570,10 +1726,10 @@ Ye.prototype.j2x = function(e, t, n) {
1570
1726
  } else if (e[o] instanceof Date) {
1571
1727
  s += this.buildTextValNode(e[o], o, "", t);
1572
1728
  } else if (typeof e[o] !== "object") {
1573
- const n = this.isAttribute(o);
1574
- if (n && !this.ignoreAttributesFn(n, r)) {
1575
- i += this.buildAttrPairStr(n, "" + e[o]);
1576
- } else if (!n) {
1729
+ const i = this.isAttribute(o);
1730
+ if (i && !this.ignoreAttributesFn(i, r)) {
1731
+ n += this.buildAttrPairStr(i, "" + e[o]);
1732
+ } else if (!i) {
1577
1733
  if (o === this.options.textNodeName) {
1578
1734
  let t = this.options.tagValueProcessor(o, "" + e[o]);
1579
1735
  s += this.replaceEntitiesValue(t);
@@ -1582,30 +1738,30 @@ Ye.prototype.j2x = function(e, t, n) {
1582
1738
  }
1583
1739
  }
1584
1740
  } else if (Array.isArray(e[o])) {
1585
- const i = e[o].length;
1741
+ const n = e[o].length;
1586
1742
  let r = "";
1587
1743
  let a = "";
1588
- for (let l = 0; l < i; l++) {
1589
- const i = e[o][l];
1590
- if (typeof i === "undefined") {} else if (i === null) {
1744
+ for (let l = 0; l < n; l++) {
1745
+ const n = e[o][l];
1746
+ if (typeof n === "undefined") {} else if (n === null) {
1591
1747
  if (o[0] === "?") s += this.indentate(t) + "<" + o + "?" + this.tagEndChar; else s += this.indentate(t) + "<" + o + "/" + this.tagEndChar;
1592
- } else if (typeof i === "object") {
1748
+ } else if (typeof n === "object") {
1593
1749
  if (this.options.oneListGroup) {
1594
- const e = this.j2x(i, t + 1, n.concat(o));
1750
+ const e = this.j2x(n, t + 1, i.concat(o));
1595
1751
  r += e.val;
1596
- if (this.options.attributesGroupName && i.hasOwnProperty(this.options.attributesGroupName)) {
1752
+ if (this.options.attributesGroupName && n.hasOwnProperty(this.options.attributesGroupName)) {
1597
1753
  a += e.attrStr;
1598
1754
  }
1599
1755
  } else {
1600
- r += this.processTextOrObjNode(i, o, t, n);
1756
+ r += this.processTextOrObjNode(n, o, t, i);
1601
1757
  }
1602
1758
  } else {
1603
1759
  if (this.options.oneListGroup) {
1604
- let e = this.options.tagValueProcessor(o, i);
1760
+ let e = this.options.tagValueProcessor(o, n);
1605
1761
  e = this.replaceEntitiesValue(e);
1606
1762
  r += e;
1607
1763
  } else {
1608
- r += this.buildTextValNode(i, o, "", t);
1764
+ r += this.buildTextValNode(n, o, "", t);
1609
1765
  }
1610
1766
  }
1611
1767
  }
@@ -1616,22 +1772,22 @@ Ye.prototype.j2x = function(e, t, n) {
1616
1772
  } else {
1617
1773
  if (this.options.attributesGroupName && o === this.options.attributesGroupName) {
1618
1774
  const t = Object.keys(e[o]);
1619
- const n = t.length;
1620
- for (let s = 0; s < n; s++) {
1621
- i += this.buildAttrPairStr(t[s], "" + e[o][t[s]]);
1775
+ const i = t.length;
1776
+ for (let s = 0; s < i; s++) {
1777
+ n += this.buildAttrPairStr(t[s], "" + e[o][t[s]]);
1622
1778
  }
1623
1779
  } else {
1624
- s += this.processTextOrObjNode(e[o], o, t, n);
1780
+ s += this.processTextOrObjNode(e[o], o, t, i);
1625
1781
  }
1626
1782
  }
1627
1783
  }
1628
1784
  return {
1629
- attrStr: i,
1785
+ attrStr: n,
1630
1786
  val: s
1631
1787
  };
1632
1788
  };
1633
1789
 
1634
- Ye.prototype.buildAttrPairStr = function(e, t) {
1790
+ xe.prototype.buildAttrPairStr = function(e, t) {
1635
1791
  t = this.options.attributeValueProcessor(e, "" + t);
1636
1792
  t = this.replaceEntitiesValue(t);
1637
1793
  if (this.options.suppressBooleanAttributes && t === "true") {
@@ -1639,19 +1795,19 @@ Ye.prototype.buildAttrPairStr = function(e, t) {
1639
1795
  } else return " " + e + '="' + t + '"';
1640
1796
  };
1641
1797
 
1642
- function qe(e, t, n, i) {
1643
- const s = this.j2x(e, n + 1, i.concat(t));
1798
+ function Ne(e, t, i, n) {
1799
+ const s = this.j2x(e, i + 1, n.concat(t));
1644
1800
  if (e[this.options.textNodeName] !== undefined && Object.keys(e).length === 1) {
1645
- return this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, n);
1801
+ return this.buildTextValNode(e[this.options.textNodeName], t, s.attrStr, i);
1646
1802
  } else {
1647
- return this.buildObjectNode(s.val, t, s.attrStr, n);
1803
+ return this.buildObjectNode(s.val, t, s.attrStr, i);
1648
1804
  }
1649
1805
  }
1650
1806
 
1651
- Ye.prototype.buildObjectNode = function(e, t, n, i) {
1807
+ xe.prototype.buildObjectNode = function(e, t, i, n) {
1652
1808
  if (e === "") {
1653
- if (t[0] === "?") return this.indentate(i) + "<" + t + n + "?" + this.tagEndChar; else {
1654
- return this.indentate(i) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
1809
+ if (t[0] === "?") return this.indentate(n) + "<" + t + i + "?" + this.tagEndChar; else {
1810
+ return this.indentate(n) + "<" + t + i + this.closeTag(t) + this.tagEndChar;
1655
1811
  }
1656
1812
  } else {
1657
1813
  let s = "</" + t + this.tagEndChar;
@@ -1660,17 +1816,17 @@ Ye.prototype.buildObjectNode = function(e, t, n, i) {
1660
1816
  r = "?";
1661
1817
  s = "";
1662
1818
  }
1663
- if ((n || n === "") && e.indexOf("<") === -1) {
1664
- return this.indentate(i) + "<" + t + n + r + ">" + e + s;
1819
+ if ((i || i === "") && e.indexOf("<") === -1) {
1820
+ return this.indentate(n) + "<" + t + i + r + ">" + e + s;
1665
1821
  } else if (this.options.commentPropName !== false && t === this.options.commentPropName && r.length === 0) {
1666
- return this.indentate(i) + `\x3c!--${e}--\x3e` + this.newLine;
1822
+ return this.indentate(n) + `\x3c!--${e}--\x3e` + this.newLine;
1667
1823
  } else {
1668
- return this.indentate(i) + "<" + t + n + r + this.tagEndChar + e + this.indentate(i) + s;
1824
+ return this.indentate(n) + "<" + t + i + r + this.tagEndChar + e + this.indentate(n) + s;
1669
1825
  }
1670
1826
  }
1671
1827
  };
1672
1828
 
1673
- Ye.prototype.closeTag = function(e) {
1829
+ xe.prototype.closeTag = function(e) {
1674
1830
  let t = "";
1675
1831
  if (this.options.unpairedTags.indexOf(e) !== -1) {
1676
1832
  if (!this.options.suppressUnpairedNode) t = "/";
@@ -1682,49 +1838,49 @@ Ye.prototype.closeTag = function(e) {
1682
1838
  return t;
1683
1839
  };
1684
1840
 
1685
- function We(e, t, n, i) {
1841
+ function be(e, t, i, n) {
1686
1842
  if (e !== "") {
1687
- return this.buildObjectNode(e, t, n, i);
1843
+ return this.buildObjectNode(e, t, i, n);
1688
1844
  } else {
1689
- if (t[0] === "?") return this.indentate(i) + "<" + t + n + "?" + this.tagEndChar; else {
1690
- return this.indentate(i) + "<" + t + n + "/" + this.tagEndChar;
1845
+ if (t[0] === "?") return this.indentate(n) + "<" + t + i + "?" + this.tagEndChar; else {
1846
+ return this.indentate(n) + "<" + t + i + "/" + this.tagEndChar;
1691
1847
  }
1692
1848
  }
1693
1849
  }
1694
1850
 
1695
- Ye.prototype.buildTextValNode = function(e, t, n, i) {
1851
+ xe.prototype.buildTextValNode = function(e, t, i, n) {
1696
1852
  if (this.options.cdataPropName !== false && t === this.options.cdataPropName) {
1697
- return this.indentate(i) + `<![CDATA[${e}]]>` + this.newLine;
1853
+ return this.indentate(n) + `<![CDATA[${e}]]>` + this.newLine;
1698
1854
  } else if (this.options.commentPropName !== false && t === this.options.commentPropName) {
1699
- return this.indentate(i) + `\x3c!--${e}--\x3e` + this.newLine;
1855
+ return this.indentate(n) + `\x3c!--${e}--\x3e` + this.newLine;
1700
1856
  } else if (t[0] === "?") {
1701
- return this.indentate(i) + "<" + t + n + "?" + this.tagEndChar;
1857
+ return this.indentate(n) + "<" + t + i + "?" + this.tagEndChar;
1702
1858
  } else {
1703
1859
  let s = this.options.tagValueProcessor(t, e);
1704
1860
  s = this.replaceEntitiesValue(s);
1705
1861
  if (s === "") {
1706
- return this.indentate(i) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
1862
+ return this.indentate(n) + "<" + t + i + this.closeTag(t) + this.tagEndChar;
1707
1863
  } else {
1708
- return this.indentate(i) + "<" + t + n + ">" + s + "</" + t + this.tagEndChar;
1864
+ return this.indentate(n) + "<" + t + i + ">" + s + "</" + t + this.tagEndChar;
1709
1865
  }
1710
1866
  }
1711
1867
  };
1712
1868
 
1713
- Ye.prototype.replaceEntitiesValue = function(e) {
1869
+ xe.prototype.replaceEntitiesValue = function(e) {
1714
1870
  if (e && e.length > 0 && this.options.processEntities) {
1715
1871
  for (let t = 0; t < this.options.entities.length; t++) {
1716
- const n = this.options.entities[t];
1717
- e = e.replace(n.regex, n.val);
1872
+ const i = this.options.entities[t];
1873
+ e = e.replace(i.regex, i.val);
1718
1874
  }
1719
1875
  }
1720
1876
  return e;
1721
1877
  };
1722
1878
 
1723
- function ze(e) {
1879
+ function Ee(e) {
1724
1880
  return this.options.indentBy.repeat(e);
1725
1881
  }
1726
1882
 
1727
- function Je(e) {
1883
+ function we(e) {
1728
1884
  if (e.startsWith(this.options.attributeNamePrefix) && e !== this.options.textNodeName) {
1729
1885
  return e.substr(this.attrPrefixLen);
1730
1886
  } else {
@@ -1732,29 +1888,15 @@ function Je(e) {
1732
1888
  }
1733
1889
  }
1734
1890
 
1735
- var He = Ye;
1736
-
1737
- const Ke = e(He);
1738
-
1739
1891
  "use strict";
1740
1892
 
1741
- const Qe = t;
1742
-
1743
- const et = je;
1744
-
1745
- const tt = He;
1746
-
1747
- var nt = {
1748
- XMLParser: et,
1749
- XMLValidator: Qe,
1750
- XMLBuilder: tt
1893
+ const Te = {
1894
+ validate: d
1751
1895
  };
1752
1896
 
1753
- const it = e(nt);
1754
-
1755
- function st(e) {
1897
+ function ye(e) {
1756
1898
  try {
1757
- nt.XMLValidator.validate(e, {
1899
+ Te.validate(e, {
1758
1900
  allowBooleanAttributes: true
1759
1901
  });
1760
1902
  return true;
@@ -1763,4 +1905,4 @@ function st(e) {
1763
1905
  }
1764
1906
  }
1765
1907
 
1766
- export { st as IsXML };
1908
+ export { ye as IsXML };