projen 0.0.0

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 (1575) hide show
  1. package/.jsii +36365 -0
  2. package/API.md +14952 -0
  3. package/LICENSE +202 -0
  4. package/README.md +373 -0
  5. package/assets/web/react/favicon.ico +0 -0
  6. package/assets/web/react/index.html +43 -0
  7. package/assets/web/react/logo192.png +0 -0
  8. package/assets/web/react/logo512.png +0 -0
  9. package/assets/web/react/manifest.json +25 -0
  10. package/assets/web/react/robots.txt +3 -0
  11. package/bin/projen +3 -0
  12. package/docs/awscdk-apps.md +15 -0
  13. package/docs/awscdk-construct.md +195 -0
  14. package/docs/awscdk.md +200 -0
  15. package/docs/build.md +55 -0
  16. package/docs/bundling.md +30 -0
  17. package/docs/deps.md +59 -0
  18. package/docs/escape-hatches.md +27 -0
  19. package/docs/java.md +213 -0
  20. package/docs/mutable-builds.md +0 -0
  21. package/docs/node.md +20 -0
  22. package/docs/programmatic-api.md +56 -0
  23. package/docs/publisher.md +148 -0
  24. package/docs/python.md +167 -0
  25. package/docs/releases.md +71 -0
  26. package/docs/subproject.md +37 -0
  27. package/docs/tasks.md +178 -0
  28. package/docs/typescript.md +108 -0
  29. package/lib/_resolve.d.ts +2 -0
  30. package/lib/_resolve.js +53 -0
  31. package/lib/awscdk/auto-discover.d.ts +54 -0
  32. package/lib/awscdk/auto-discover.js +54 -0
  33. package/lib/awscdk/awscdk-app-ts.d.ts +78 -0
  34. package/lib/awscdk/awscdk-app-ts.js +185 -0
  35. package/lib/awscdk/awscdk-construct.d.ts +80 -0
  36. package/lib/awscdk/awscdk-construct.js +116 -0
  37. package/lib/awscdk/awscdk-deps.d.ts +158 -0
  38. package/lib/awscdk/awscdk-deps.js +169 -0
  39. package/lib/awscdk/cdk-config.d.ts +128 -0
  40. package/lib/awscdk/cdk-config.js +61 -0
  41. package/lib/awscdk/cdk-tasks.d.ts +50 -0
  42. package/lib/awscdk/cdk-tasks.js +54 -0
  43. package/lib/awscdk/index.d.ts +9 -0
  44. package/lib/awscdk/index.js +22 -0
  45. package/lib/awscdk/integration-test.d.ts +90 -0
  46. package/lib/awscdk/integration-test.js +106 -0
  47. package/lib/awscdk/internal.d.ts +12 -0
  48. package/lib/awscdk/internal.js +30 -0
  49. package/lib/awscdk/java-app.d.ts +92 -0
  50. package/lib/awscdk/java-app.js +90 -0
  51. package/lib/awscdk/lambda-function.d.ts +143 -0
  52. package/lib/awscdk/lambda-function.js +176 -0
  53. package/lib/build/build-workflow.d.ts +125 -0
  54. package/lib/build/build-workflow.js +223 -0
  55. package/lib/build/index.d.ts +1 -0
  56. package/lib/build/index.js +14 -0
  57. package/lib/builtin-example.task.d.ts +0 -0
  58. package/lib/builtin-example.task.js +4 -0
  59. package/lib/cdk/construct-lib.d.ts +52 -0
  60. package/lib/cdk/construct-lib.js +30 -0
  61. package/lib/cdk/consts.d.ts +14 -0
  62. package/lib/cdk/consts.js +37 -0
  63. package/lib/cdk/index.d.ts +3 -0
  64. package/lib/cdk/index.js +16 -0
  65. package/lib/cdk/jsii-docgen.d.ts +12 -0
  66. package/lib/cdk/jsii-docgen.js +29 -0
  67. package/lib/cdk/jsii-project.d.ts +205 -0
  68. package/lib/cdk/jsii-project.js +250 -0
  69. package/lib/cdk8s/cdk8s-app-ts.d.ts +111 -0
  70. package/lib/cdk8s/cdk8s-app-ts.js +134 -0
  71. package/lib/cdk8s/cdk8s-construct.d.ts +79 -0
  72. package/lib/cdk8s/cdk8s-construct.js +39 -0
  73. package/lib/cdk8s/index.d.ts +2 -0
  74. package/lib/cdk8s/index.js +15 -0
  75. package/lib/cdktf/cdktf-construct.d.ts +30 -0
  76. package/lib/cdktf/cdktf-construct.js +33 -0
  77. package/lib/cdktf/index.d.ts +1 -0
  78. package/lib/cdktf/index.js +14 -0
  79. package/lib/cleanup.d.ts +2 -0
  80. package/lib/cleanup.js +73 -0
  81. package/lib/cli/cmds/new.d.ts +1 -0
  82. package/lib/cli/cmds/new.js +232 -0
  83. package/lib/cli/index.d.ts +1 -0
  84. package/lib/cli/index.js +50 -0
  85. package/lib/cli/macros.d.ts +1 -0
  86. package/lib/cli/macros.js +40 -0
  87. package/lib/cli/synth.d.ts +19 -0
  88. package/lib/cli/synth.js +104 -0
  89. package/lib/cli/tasks.d.ts +7 -0
  90. package/lib/cli/tasks.js +62 -0
  91. package/lib/cli/util.d.ts +19 -0
  92. package/lib/cli/util.js +52 -0
  93. package/lib/clobber.d.ts +5 -0
  94. package/lib/clobber.js +24 -0
  95. package/lib/common.d.ts +5 -0
  96. package/lib/common.js +14 -0
  97. package/lib/component.d.ts +33 -0
  98. package/lib/component.js +43 -0
  99. package/lib/dependencies.d.ts +187 -0
  100. package/lib/dependencies.js +219 -0
  101. package/lib/dev-env.d.ts +107 -0
  102. package/lib/dev-env.js +41 -0
  103. package/lib/docker-compose.d.ts +434 -0
  104. package/lib/docker-compose.js +308 -0
  105. package/lib/file.d.ts +141 -0
  106. package/lib/file.js +75 -0
  107. package/lib/gitattributes.d.ts +29 -0
  108. package/lib/gitattributes.js +61 -0
  109. package/lib/github/auto-approve.d.ts +59 -0
  110. package/lib/github/auto-approve.js +63 -0
  111. package/lib/github/auto-merge.d.ts +44 -0
  112. package/lib/github/auto-merge.js +67 -0
  113. package/lib/github/constants.d.ts +17 -0
  114. package/lib/github/constants.js +33 -0
  115. package/lib/github/dependabot.d.ts +340 -0
  116. package/lib/github/dependabot.js +119 -0
  117. package/lib/github/github-project.d.ts +193 -0
  118. package/lib/github/github-project.js +70 -0
  119. package/lib/github/github.d.ts +110 -0
  120. package/lib/github/github.js +86 -0
  121. package/lib/github/index.d.ts +13 -0
  122. package/lib/github/index.js +26 -0
  123. package/lib/github/mergify.d.ts +75 -0
  124. package/lib/github/mergify.js +40 -0
  125. package/lib/github/pr-template.d.ts +29 -0
  126. package/lib/github/pr-template.js +28 -0
  127. package/lib/github/pull-request-lint.d.ts +68 -0
  128. package/lib/github/pull-request-lint.js +62 -0
  129. package/lib/github/stale-util.d.ts +8 -0
  130. package/lib/github/stale-util.js +20 -0
  131. package/lib/github/stale.d.ts +106 -0
  132. package/lib/github/stale.js +71 -0
  133. package/lib/github/task-workflow.d.ts +155 -0
  134. package/lib/github/task-workflow.js +84 -0
  135. package/lib/github/workflows-model.d.ts +1280 -0
  136. package/lib/github/workflows-model.js +17 -0
  137. package/lib/github/workflows.d.ts +99 -0
  138. package/lib/github/workflows.js +208 -0
  139. package/lib/gitpod.d.ts +397 -0
  140. package/lib/gitpod.js +208 -0
  141. package/lib/ignore-file.d.ts +55 -0
  142. package/lib/ignore-file.js +112 -0
  143. package/lib/index.d.ts +46 -0
  144. package/lib/index.js +60 -0
  145. package/lib/ini.d.ts +27 -0
  146. package/lib/ini.js +40 -0
  147. package/lib/inventory.d.ts +45 -0
  148. package/lib/inventory.js +273 -0
  149. package/lib/java/index.d.ts +7 -0
  150. package/lib/java/index.js +20 -0
  151. package/lib/java/java-project.d.ts +181 -0
  152. package/lib/java/java-project.js +98 -0
  153. package/lib/java/junit.d.ts +41 -0
  154. package/lib/java/junit.js +50 -0
  155. package/lib/java/maven-compile.d.ts +35 -0
  156. package/lib/java/maven-compile.js +32 -0
  157. package/lib/java/maven-packaging.d.ts +49 -0
  158. package/lib/java/maven-packaging.js +71 -0
  159. package/lib/java/maven-sample.d.ts +24 -0
  160. package/lib/java/maven-sample.js +39 -0
  161. package/lib/java/pom.d.ts +243 -0
  162. package/lib/java/pom.js +176 -0
  163. package/lib/java/projenrc.d.ts +65 -0
  164. package/lib/java/projenrc.js +147 -0
  165. package/lib/javascript/bundler.d.ts +182 -0
  166. package/lib/javascript/bundler.js +123 -0
  167. package/lib/javascript/eslint.d.ts +177 -0
  168. package/lib/javascript/eslint.js +261 -0
  169. package/lib/javascript/index.d.ts +9 -0
  170. package/lib/javascript/index.js +22 -0
  171. package/lib/javascript/jest.d.ts +766 -0
  172. package/lib/javascript/jest.js +185 -0
  173. package/lib/javascript/node-package.d.ts +649 -0
  174. package/lib/javascript/node-package.js +687 -0
  175. package/lib/javascript/node-project.d.ts +572 -0
  176. package/lib/javascript/node-project.js +473 -0
  177. package/lib/javascript/npm-config.d.ts +50 -0
  178. package/lib/javascript/npm-config.js +53 -0
  179. package/lib/javascript/projenrc.d.ts +27 -0
  180. package/lib/javascript/projenrc.js +59 -0
  181. package/lib/javascript/render-options.d.ts +57 -0
  182. package/lib/javascript/render-options.js +169 -0
  183. package/lib/javascript/typescript-config.d.ts +424 -0
  184. package/lib/javascript/typescript-config.js +71 -0
  185. package/lib/javascript/upgrade-dependencies.d.ts +252 -0
  186. package/lib/javascript/upgrade-dependencies.js +341 -0
  187. package/lib/javascript/util.d.ts +1 -0
  188. package/lib/javascript/util.js +16 -0
  189. package/lib/json.d.ts +27 -0
  190. package/lib/json.js +42 -0
  191. package/lib/license.d.ts +48 -0
  192. package/lib/license.js +48 -0
  193. package/lib/logger.d.ts +117 -0
  194. package/lib/logger.js +127 -0
  195. package/lib/logging.d.ts +8 -0
  196. package/lib/logging.js +46 -0
  197. package/lib/makefile.d.ts +108 -0
  198. package/lib/makefile.js +99 -0
  199. package/lib/object-file.d.ts +112 -0
  200. package/lib/object-file.js +125 -0
  201. package/lib/option-hints.d.ts +27 -0
  202. package/lib/option-hints.js +17 -0
  203. package/lib/project-build.d.ts +60 -0
  204. package/lib/project-build.js +61 -0
  205. package/lib/project.d.ts +427 -0
  206. package/lib/project.js +391 -0
  207. package/lib/projects.d.ts +80 -0
  208. package/lib/projects.js +81 -0
  209. package/lib/projenrc-json.d.ts +27 -0
  210. package/lib/projenrc-json.js +47 -0
  211. package/lib/python/index.d.ts +13 -0
  212. package/lib/python/index.js +26 -0
  213. package/lib/python/pip.d.ts +48 -0
  214. package/lib/python/pip.js +78 -0
  215. package/lib/python/poetry.d.ts +262 -0
  216. package/lib/python/poetry.js +169 -0
  217. package/lib/python/projenrc.d.ts +42 -0
  218. package/lib/python/projenrc.js +135 -0
  219. package/lib/python/pytest.d.ts +36 -0
  220. package/lib/python/pytest.js +52 -0
  221. package/lib/python/python-deps.d.ts +44 -0
  222. package/lib/python/python-deps.js +3 -0
  223. package/lib/python/python-env.d.ts +11 -0
  224. package/lib/python/python-env.js +3 -0
  225. package/lib/python/python-packaging.d.ts +80 -0
  226. package/lib/python/python-packaging.js +3 -0
  227. package/lib/python/python-project.d.ts +202 -0
  228. package/lib/python/python-project.js +155 -0
  229. package/lib/python/python-sample.d.ts +20 -0
  230. package/lib/python/python-sample.js +48 -0
  231. package/lib/python/requirements-file.d.ts +44 -0
  232. package/lib/python/requirements-file.js +75 -0
  233. package/lib/python/setuppy.d.ts +88 -0
  234. package/lib/python/setuppy.js +78 -0
  235. package/lib/python/setuptools.d.ts +27 -0
  236. package/lib/python/setuptools.js +47 -0
  237. package/lib/python/venv.d.ts +38 -0
  238. package/lib/python/venv.js +44 -0
  239. package/lib/readme.d.ts +37 -0
  240. package/lib/readme.js +24 -0
  241. package/lib/release/bump-version.d.ts +59 -0
  242. package/lib/release/bump-version.js +151 -0
  243. package/lib/release/bump-version.task.d.ts +1 -0
  244. package/lib/release/bump-version.task.js +60 -0
  245. package/lib/release/index.d.ts +3 -0
  246. package/lib/release/index.js +16 -0
  247. package/lib/release/publisher.d.ts +554 -0
  248. package/lib/release/publisher.js +407 -0
  249. package/lib/release/release-trigger.d.ts +129 -0
  250. package/lib/release/release-trigger.js +88 -0
  251. package/lib/release/release.d.ts +361 -0
  252. package/lib/release/release.js +287 -0
  253. package/lib/release/reset-version.task.d.ts +1 -0
  254. package/lib/release/reset-version.task.js +17 -0
  255. package/lib/release/tag-version.d.ts +31 -0
  256. package/lib/release/tag-version.js +36 -0
  257. package/lib/release/tag-version.task.d.ts +1 -0
  258. package/lib/release/tag-version.task.js +34 -0
  259. package/lib/release/update-changelog.d.ts +36 -0
  260. package/lib/release/update-changelog.js +41 -0
  261. package/lib/release/update-changelog.task.d.ts +1 -0
  262. package/lib/release/update-changelog.task.js +39 -0
  263. package/lib/run-projenrc-json.task.d.ts +1 -0
  264. package/lib/run-projenrc-json.task.js +31 -0
  265. package/lib/sample-file.d.ts +121 -0
  266. package/lib/sample-file.js +129 -0
  267. package/lib/semver.d.ts +51 -0
  268. package/lib/semver.js +61 -0
  269. package/lib/source-code.d.ts +51 -0
  270. package/lib/source-code.js +66 -0
  271. package/lib/task-model.d.ts +156 -0
  272. package/lib/task-model.js +3 -0
  273. package/lib/task-runtime.d.ts +43 -0
  274. package/lib/task-runtime.js +272 -0
  275. package/lib/task.d.ts +161 -0
  276. package/lib/task.js +215 -0
  277. package/lib/tasks.d.ts +73 -0
  278. package/lib/tasks.js +129 -0
  279. package/lib/testing.d.ts +20 -0
  280. package/lib/testing.js +31 -0
  281. package/lib/textfile.d.ts +48 -0
  282. package/lib/textfile.js +47 -0
  283. package/lib/toml.d.ts +27 -0
  284. package/lib/toml.js +40 -0
  285. package/lib/typescript/index.d.ts +3 -0
  286. package/lib/typescript/index.js +16 -0
  287. package/lib/typescript/projenrc.d.ts +34 -0
  288. package/lib/typescript/projenrc.js +72 -0
  289. package/lib/typescript/typescript-typedoc.d.ts +12 -0
  290. package/lib/typescript/typescript-typedoc.js +28 -0
  291. package/lib/typescript/typescript.d.ts +215 -0
  292. package/lib/typescript/typescript.js +287 -0
  293. package/lib/util/semver.d.ts +43 -0
  294. package/lib/util/semver.js +210 -0
  295. package/lib/util/synth.d.ts +24 -0
  296. package/lib/util/synth.js +69 -0
  297. package/lib/util.d.ts +99 -0
  298. package/lib/util.js +254 -0
  299. package/lib/version.d.ts +70 -0
  300. package/lib/version.js +60 -0
  301. package/lib/vscode/devcontainer.d.ts +68 -0
  302. package/lib/vscode/devcontainer.js +104 -0
  303. package/lib/vscode/index.d.ts +3 -0
  304. package/lib/vscode/index.js +16 -0
  305. package/lib/vscode/launch-config.d.ts +149 -0
  306. package/lib/vscode/launch-config.js +51 -0
  307. package/lib/vscode/vscode.d.ts +17 -0
  308. package/lib/vscode/vscode.js +31 -0
  309. package/lib/web/index.d.ts +4 -0
  310. package/lib/web/index.js +17 -0
  311. package/lib/web/next.d.ts +141 -0
  312. package/lib/web/next.js +403 -0
  313. package/lib/web/postcss.d.ts +49 -0
  314. package/lib/web/postcss.js +35 -0
  315. package/lib/web/react.d.ts +152 -0
  316. package/lib/web/react.js +379 -0
  317. package/lib/web/tailwind.d.ts +35 -0
  318. package/lib/web/tailwind.js +42 -0
  319. package/lib/xmlfile.d.ts +30 -0
  320. package/lib/xmlfile.js +46 -0
  321. package/lib/yaml.d.ts +27 -0
  322. package/lib/yaml.js +40 -0
  323. package/license-text/Apache-2.0.txt +202 -0
  324. package/license-text/Artistic-1.0.txt +122 -0
  325. package/license-text/Artistic-2.0.txt +181 -0
  326. package/license-text/GPL-2.0-or-later.txt +339 -0
  327. package/license-text/GPL-3.0-WITH-GCC-exception-3.1.txt +73 -0
  328. package/license-text/GPL-3.0-or-later.txt +674 -0
  329. package/license-text/LGPL-2.1-or-later.txt +502 -0
  330. package/license-text/LGPL-3.0-or-later.txt +165 -0
  331. package/license-text/MIT-0.txt +15 -0
  332. package/license-text/MIT.txt +19 -0
  333. package/license-text/MPL-2.0.txt +353 -0
  334. package/license-text/OFL-1.1.txt +91 -0
  335. package/license-text/PHP-3.01.txt +68 -0
  336. package/license-text/Ruby.txt +52 -0
  337. package/license-text/Unlicense.txt +24 -0
  338. package/license-text/WTFPL.txt +14 -0
  339. package/license-text/ZPL-2.1.txt +44 -0
  340. package/logo/projen.svg +211 -0
  341. package/node_modules/@iarna/toml/CHANGELOG.md +278 -0
  342. package/node_modules/@iarna/toml/LICENSE +14 -0
  343. package/node_modules/@iarna/toml/README.md +301 -0
  344. package/node_modules/@iarna/toml/index.d.ts +57 -0
  345. package/node_modules/@iarna/toml/lib/create-date.js +23 -0
  346. package/node_modules/@iarna/toml/lib/create-datetime-float.js +24 -0
  347. package/node_modules/@iarna/toml/lib/create-datetime.js +10 -0
  348. package/node_modules/@iarna/toml/lib/create-time.js +22 -0
  349. package/node_modules/@iarna/toml/lib/format-num.js +6 -0
  350. package/node_modules/@iarna/toml/lib/parser-debug.js +60 -0
  351. package/node_modules/@iarna/toml/lib/parser.js +127 -0
  352. package/node_modules/@iarna/toml/lib/toml-parser.js +1379 -0
  353. package/node_modules/@iarna/toml/package.json +82 -0
  354. package/node_modules/@iarna/toml/parse-async.js +30 -0
  355. package/node_modules/@iarna/toml/parse-pretty-error.js +33 -0
  356. package/node_modules/@iarna/toml/parse-stream.js +80 -0
  357. package/node_modules/@iarna/toml/parse-string.js +18 -0
  358. package/node_modules/@iarna/toml/parse.js +5 -0
  359. package/node_modules/@iarna/toml/stringify.js +296 -0
  360. package/node_modules/@iarna/toml/toml.js +3 -0
  361. package/node_modules/@oozcitak/dom/LICENSE +21 -0
  362. package/node_modules/@oozcitak/dom/README.md +32 -0
  363. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts +21 -0
  364. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js +79 -0
  365. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map +1 -0
  366. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts +8 -0
  367. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js +23 -0
  368. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map +1 -0
  369. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts +8 -0
  370. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js +76 -0
  371. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map +1 -0
  372. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts +19 -0
  373. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js +140 -0
  374. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map +1 -0
  375. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts +192 -0
  376. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js +303 -0
  377. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map +1 -0
  378. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts +61 -0
  379. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js +108 -0
  380. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map +1 -0
  381. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts +72 -0
  382. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js +288 -0
  383. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map +1 -0
  384. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts +21 -0
  385. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js +61 -0
  386. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map +1 -0
  387. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts +29 -0
  388. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js +161 -0
  389. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map +1 -0
  390. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts +121 -0
  391. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js +608 -0
  392. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map +1 -0
  393. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts +146 -0
  394. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js +995 -0
  395. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map +1 -0
  396. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts +33 -0
  397. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js +142 -0
  398. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map +1 -0
  399. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts +66 -0
  400. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js +1173 -0
  401. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map +1 -0
  402. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts +43 -0
  403. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js +276 -0
  404. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map +1 -0
  405. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts +25 -0
  406. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js +85 -0
  407. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map +1 -0
  408. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts +68 -0
  409. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js +543 -0
  410. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map +1 -0
  411. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.d.ts +15 -0
  412. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js +105 -0
  413. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map +1 -0
  414. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts +27 -0
  415. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js +125 -0
  416. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map +1 -0
  417. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts +9 -0
  418. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js +69 -0
  419. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map +1 -0
  420. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts +82 -0
  421. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js +829 -0
  422. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map +1 -0
  423. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts +8 -0
  424. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js +21 -0
  425. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map +1 -0
  426. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts +57 -0
  427. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js +316 -0
  428. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map +1 -0
  429. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts +30 -0
  430. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js +226 -0
  431. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map +1 -0
  432. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts +8 -0
  433. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js +62 -0
  434. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map +1 -0
  435. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts +268 -0
  436. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js +853 -0
  437. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map +1 -0
  438. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts +17 -0
  439. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js +147 -0
  440. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map +1 -0
  441. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts +8 -0
  442. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js +14 -0
  443. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map +1 -0
  444. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts +25 -0
  445. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js +164 -0
  446. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map +1 -0
  447. package/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts +28 -0
  448. package/node_modules/@oozcitak/dom/lib/algorithm/index.js +34 -0
  449. package/node_modules/@oozcitak/dom/lib/algorithm/index.js.map +1 -0
  450. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts +15 -0
  451. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js +32 -0
  452. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map +1 -0
  453. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts +23 -0
  454. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js +59 -0
  455. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map +1 -0
  456. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts +23 -0
  457. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js +70 -0
  458. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map +1 -0
  459. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts +45 -0
  460. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js +118 -0
  461. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map +1 -0
  462. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts +21 -0
  463. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js +51 -0
  464. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map +1 -0
  465. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts +35 -0
  466. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js +132 -0
  467. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map +1 -0
  468. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts +16 -0
  469. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js +165 -0
  470. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map +1 -0
  471. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts +21 -0
  472. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js +52 -0
  473. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map +1 -0
  474. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts +16 -0
  475. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js +60 -0
  476. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map +1 -0
  477. package/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts +171 -0
  478. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js +347 -0
  479. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map +1 -0
  480. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts +48 -0
  481. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js +100 -0
  482. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map +1 -0
  483. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts +29 -0
  484. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js +149 -0
  485. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map +1 -0
  486. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts +46 -0
  487. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js +312 -0
  488. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map +1 -0
  489. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts +32 -0
  490. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js +103 -0
  491. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map +1 -0
  492. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts +116 -0
  493. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js +545 -0
  494. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map +1 -0
  495. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts +11 -0
  496. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js +17 -0
  497. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map +1 -0
  498. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts +39 -0
  499. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js +109 -0
  500. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map +1 -0
  501. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts +132 -0
  502. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js +714 -0
  503. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map +1 -0
  504. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts +74 -0
  505. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js +313 -0
  506. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map +1 -0
  507. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts +30 -0
  508. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js +133 -0
  509. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map +1 -0
  510. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts +44 -0
  511. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js +157 -0
  512. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map +1 -0
  513. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts +22 -0
  514. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js +184 -0
  515. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map +1 -0
  516. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts +73 -0
  517. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js +116 -0
  518. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map +1 -0
  519. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts +34 -0
  520. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js +112 -0
  521. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map +1 -0
  522. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts +50 -0
  523. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js +64 -0
  524. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map +1 -0
  525. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts +252 -0
  526. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js +891 -0
  527. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map +1 -0
  528. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts +34 -0
  529. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js +86 -0
  530. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map +1 -0
  531. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.d.ts +46 -0
  532. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js +198 -0
  533. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map +1 -0
  534. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts +49 -0
  535. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js +188 -0
  536. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map +1 -0
  537. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts +12 -0
  538. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js +53 -0
  539. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map +1 -0
  540. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts +9 -0
  541. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js +31 -0
  542. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map +1 -0
  543. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts +24 -0
  544. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js +158 -0
  545. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map +1 -0
  546. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts +25 -0
  547. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js +59 -0
  548. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map +1 -0
  549. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts +71 -0
  550. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js +649 -0
  551. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map +1 -0
  552. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts +33 -0
  553. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js +82 -0
  554. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map +1 -0
  555. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts +16 -0
  556. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js +35 -0
  557. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map +1 -0
  558. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts +13 -0
  559. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js +48 -0
  560. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map +1 -0
  561. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts +28 -0
  562. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js +109 -0
  563. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map +1 -0
  564. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts +23 -0
  565. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js +41 -0
  566. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map +1 -0
  567. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts +36 -0
  568. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js +249 -0
  569. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map +1 -0
  570. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts +26 -0
  571. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js +57 -0
  572. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map +1 -0
  573. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts +11 -0
  574. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js +31 -0
  575. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map +1 -0
  576. package/node_modules/@oozcitak/dom/lib/dom/index.d.ts +36 -0
  577. package/node_modules/@oozcitak/dom/lib/dom/index.js +102 -0
  578. package/node_modules/@oozcitak/dom/lib/dom/index.js.map +1 -0
  579. package/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts +2218 -0
  580. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js +91 -0
  581. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map +1 -0
  582. package/node_modules/@oozcitak/dom/lib/index.d.ts +3 -0
  583. package/node_modules/@oozcitak/dom/lib/index.js +11 -0
  584. package/node_modules/@oozcitak/dom/lib/index.js.map +1 -0
  585. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts +11 -0
  586. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js +37 -0
  587. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map +1 -0
  588. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts +14 -0
  589. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js +220 -0
  590. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map +1 -0
  591. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts +159 -0
  592. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js +512 -0
  593. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map +1 -0
  594. package/node_modules/@oozcitak/dom/lib/parser/index.d.ts +1 -0
  595. package/node_modules/@oozcitak/dom/lib/parser/index.js +6 -0
  596. package/node_modules/@oozcitak/dom/lib/parser/index.js.map +1 -0
  597. package/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts +131 -0
  598. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js +18 -0
  599. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map +1 -0
  600. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts +27 -0
  601. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js +56 -0
  602. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map +1 -0
  603. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts +52 -0
  604. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js +151 -0
  605. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map +1 -0
  606. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts +166 -0
  607. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js +1479 -0
  608. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map +1 -0
  609. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.d.ts +2 -0
  610. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js +962 -0
  611. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js.map +1 -0
  612. package/node_modules/@oozcitak/dom/lib/serializer/index.d.ts +1 -0
  613. package/node_modules/@oozcitak/dom/lib/serializer/index.js +6 -0
  614. package/node_modules/@oozcitak/dom/lib/serializer/index.js.map +1 -0
  615. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts +15 -0
  616. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js +3 -0
  617. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map +1 -0
  618. package/node_modules/@oozcitak/dom/lib/util/Cast.d.ts +12 -0
  619. package/node_modules/@oozcitak/dom/lib/util/Cast.js +26 -0
  620. package/node_modules/@oozcitak/dom/lib/util/Cast.js.map +1 -0
  621. package/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts +13 -0
  622. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js +61 -0
  623. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map +1 -0
  624. package/node_modules/@oozcitak/dom/lib/util/Guard.d.ts +135 -0
  625. package/node_modules/@oozcitak/dom/lib/util/Guard.js +192 -0
  626. package/node_modules/@oozcitak/dom/lib/util/Guard.js.map +1 -0
  627. package/node_modules/@oozcitak/dom/lib/util/index.d.ts +3 -0
  628. package/node_modules/@oozcitak/dom/lib/util/index.js +9 -0
  629. package/node_modules/@oozcitak/dom/lib/util/index.js.map +1 -0
  630. package/node_modules/@oozcitak/dom/package.json +72 -0
  631. package/node_modules/@oozcitak/infra/LICENSE +21 -0
  632. package/node_modules/@oozcitak/infra/README.md +13 -0
  633. package/node_modules/@oozcitak/infra/lib/Base64.d.ts +12 -0
  634. package/node_modules/@oozcitak/infra/lib/Base64.js +82 -0
  635. package/node_modules/@oozcitak/infra/lib/Base64.js.map +1 -0
  636. package/node_modules/@oozcitak/infra/lib/Byte.d.ts +6 -0
  637. package/node_modules/@oozcitak/infra/lib/Byte.js +15 -0
  638. package/node_modules/@oozcitak/infra/lib/Byte.js.map +1 -0
  639. package/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts +45 -0
  640. package/node_modules/@oozcitak/infra/lib/ByteSequence.js +171 -0
  641. package/node_modules/@oozcitak/infra/lib/ByteSequence.js.map +1 -0
  642. package/node_modules/@oozcitak/infra/lib/CodePoints.d.ts +82 -0
  643. package/node_modules/@oozcitak/infra/lib/CodePoints.js +85 -0
  644. package/node_modules/@oozcitak/infra/lib/CodePoints.js.map +1 -0
  645. package/node_modules/@oozcitak/infra/lib/JSON.d.ts +24 -0
  646. package/node_modules/@oozcitak/infra/lib/JSON.js +123 -0
  647. package/node_modules/@oozcitak/infra/lib/JSON.js.map +1 -0
  648. package/node_modules/@oozcitak/infra/lib/List.d.ts +101 -0
  649. package/node_modules/@oozcitak/infra/lib/List.js +325 -0
  650. package/node_modules/@oozcitak/infra/lib/List.js.map +1 -0
  651. package/node_modules/@oozcitak/infra/lib/Map.d.ts +87 -0
  652. package/node_modules/@oozcitak/infra/lib/Map.js +308 -0
  653. package/node_modules/@oozcitak/infra/lib/Map.js.map +1 -0
  654. package/node_modules/@oozcitak/infra/lib/Namespace.d.ts +6 -0
  655. package/node_modules/@oozcitak/infra/lib/Namespace.js +9 -0
  656. package/node_modules/@oozcitak/infra/lib/Namespace.js.map +1 -0
  657. package/node_modules/@oozcitak/infra/lib/Queue.d.ts +13 -0
  658. package/node_modules/@oozcitak/infra/lib/Queue.js +22 -0
  659. package/node_modules/@oozcitak/infra/lib/Queue.js.map +1 -0
  660. package/node_modules/@oozcitak/infra/lib/Set.d.ts +136 -0
  661. package/node_modules/@oozcitak/infra/lib/Set.js +467 -0
  662. package/node_modules/@oozcitak/infra/lib/Set.js.map +1 -0
  663. package/node_modules/@oozcitak/infra/lib/Stack.d.ts +13 -0
  664. package/node_modules/@oozcitak/infra/lib/Stack.js +22 -0
  665. package/node_modules/@oozcitak/infra/lib/Stack.js.map +1 -0
  666. package/node_modules/@oozcitak/infra/lib/String.d.ts +129 -0
  667. package/node_modules/@oozcitak/infra/lib/String.js +472 -0
  668. package/node_modules/@oozcitak/infra/lib/String.js.map +1 -0
  669. package/node_modules/@oozcitak/infra/lib/index.d.ts +13 -0
  670. package/node_modules/@oozcitak/infra/lib/index.js +34 -0
  671. package/node_modules/@oozcitak/infra/lib/index.js.map +1 -0
  672. package/node_modules/@oozcitak/infra/package.json +54 -0
  673. package/node_modules/@oozcitak/url/LICENSE +21 -0
  674. package/node_modules/@oozcitak/url/README.md +27 -0
  675. package/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts +267 -0
  676. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js +2758 -0
  677. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map +1 -0
  678. package/node_modules/@oozcitak/url/lib/URLImpl.d.ts +53 -0
  679. package/node_modules/@oozcitak/url/lib/URLImpl.js +377 -0
  680. package/node_modules/@oozcitak/url/lib/URLImpl.js.map +1 -0
  681. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts +38 -0
  682. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js +303 -0
  683. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map +1 -0
  684. package/node_modules/@oozcitak/url/lib/index.d.ts +2 -0
  685. package/node_modules/@oozcitak/url/lib/index.js +7 -0
  686. package/node_modules/@oozcitak/url/lib/index.js.map +1 -0
  687. package/node_modules/@oozcitak/url/lib/interfaces.d.ts +195 -0
  688. package/node_modules/@oozcitak/url/lib/interfaces.js +31 -0
  689. package/node_modules/@oozcitak/url/lib/interfaces.js.map +1 -0
  690. package/node_modules/@oozcitak/url/package.json +55 -0
  691. package/node_modules/@oozcitak/util/LICENSE +21 -0
  692. package/node_modules/@oozcitak/util/README.md +10 -0
  693. package/node_modules/@oozcitak/util/lib/CompareCache.d.ts +32 -0
  694. package/node_modules/@oozcitak/util/lib/CompareCache.js +59 -0
  695. package/node_modules/@oozcitak/util/lib/CompareCache.js.map +1 -0
  696. package/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts +64 -0
  697. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js +174 -0
  698. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map +1 -0
  699. package/node_modules/@oozcitak/util/lib/Lazy.d.ts +18 -0
  700. package/node_modules/@oozcitak/util/lib/Lazy.js +34 -0
  701. package/node_modules/@oozcitak/util/lib/Lazy.js.map +1 -0
  702. package/node_modules/@oozcitak/util/lib/ObjectCache.d.ts +71 -0
  703. package/node_modules/@oozcitak/util/lib/ObjectCache.js +181 -0
  704. package/node_modules/@oozcitak/util/lib/ObjectCache.js.map +1 -0
  705. package/node_modules/@oozcitak/util/lib/StringWalker.d.ts +49 -0
  706. package/node_modules/@oozcitak/util/lib/StringWalker.js +105 -0
  707. package/node_modules/@oozcitak/util/lib/StringWalker.js.map +1 -0
  708. package/node_modules/@oozcitak/util/lib/index.d.ts +178 -0
  709. package/node_modules/@oozcitak/util/lib/index.js +439 -0
  710. package/node_modules/@oozcitak/util/lib/index.js.map +1 -0
  711. package/node_modules/@oozcitak/util/package.json +50 -0
  712. package/node_modules/ansi-regex/index.d.ts +37 -0
  713. package/node_modules/ansi-regex/index.js +10 -0
  714. package/node_modules/ansi-regex/license +9 -0
  715. package/node_modules/ansi-regex/package.json +55 -0
  716. package/node_modules/ansi-regex/readme.md +78 -0
  717. package/node_modules/ansi-styles/index.d.ts +345 -0
  718. package/node_modules/ansi-styles/index.js +163 -0
  719. package/node_modules/ansi-styles/license +9 -0
  720. package/node_modules/ansi-styles/package.json +56 -0
  721. package/node_modules/ansi-styles/readme.md +152 -0
  722. package/node_modules/argparse/CHANGELOG.md +185 -0
  723. package/node_modules/argparse/LICENSE +21 -0
  724. package/node_modules/argparse/README.md +257 -0
  725. package/node_modules/argparse/index.js +3 -0
  726. package/node_modules/argparse/lib/action/append/constant.js +47 -0
  727. package/node_modules/argparse/lib/action/append.js +53 -0
  728. package/node_modules/argparse/lib/action/count.js +40 -0
  729. package/node_modules/argparse/lib/action/help.js +47 -0
  730. package/node_modules/argparse/lib/action/store/constant.js +43 -0
  731. package/node_modules/argparse/lib/action/store/false.js +27 -0
  732. package/node_modules/argparse/lib/action/store/true.js +26 -0
  733. package/node_modules/argparse/lib/action/store.js +50 -0
  734. package/node_modules/argparse/lib/action/subparsers.js +149 -0
  735. package/node_modules/argparse/lib/action/version.js +47 -0
  736. package/node_modules/argparse/lib/action.js +146 -0
  737. package/node_modules/argparse/lib/action_container.js +482 -0
  738. package/node_modules/argparse/lib/argparse.js +14 -0
  739. package/node_modules/argparse/lib/argument/error.js +50 -0
  740. package/node_modules/argparse/lib/argument/exclusive.js +54 -0
  741. package/node_modules/argparse/lib/argument/group.js +75 -0
  742. package/node_modules/argparse/lib/argument_parser.js +1161 -0
  743. package/node_modules/argparse/lib/const.js +21 -0
  744. package/node_modules/argparse/lib/help/added_formatters.js +87 -0
  745. package/node_modules/argparse/lib/help/formatter.js +795 -0
  746. package/node_modules/argparse/lib/namespace.js +76 -0
  747. package/node_modules/argparse/lib/utils.js +57 -0
  748. package/node_modules/argparse/package.json +34 -0
  749. package/node_modules/at-least-node/LICENSE +6 -0
  750. package/node_modules/at-least-node/README.md +25 -0
  751. package/node_modules/at-least-node/index.js +5 -0
  752. package/node_modules/at-least-node/package.json +32 -0
  753. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  754. package/node_modules/balanced-match/LICENSE.md +21 -0
  755. package/node_modules/balanced-match/README.md +97 -0
  756. package/node_modules/balanced-match/index.js +62 -0
  757. package/node_modules/balanced-match/package.json +48 -0
  758. package/node_modules/brace-expansion/LICENSE +21 -0
  759. package/node_modules/brace-expansion/README.md +129 -0
  760. package/node_modules/brace-expansion/index.js +201 -0
  761. package/node_modules/brace-expansion/package.json +47 -0
  762. package/node_modules/case/LICENSE +22 -0
  763. package/node_modules/case/README.md +139 -0
  764. package/node_modules/case/case.d.ts +43 -0
  765. package/node_modules/case/dist/Case.js +171 -0
  766. package/node_modules/case/dist/Case.min.js +5 -0
  767. package/node_modules/case/dist/Case.min.js.map +1 -0
  768. package/node_modules/case/dist/Case.plus.js +189 -0
  769. package/node_modules/case/dist/Case.plus.min.js +5 -0
  770. package/node_modules/case/dist/Case.plus.min.js.map +1 -0
  771. package/node_modules/case/package.json +58 -0
  772. package/node_modules/chalk/index.d.ts +415 -0
  773. package/node_modules/chalk/license +9 -0
  774. package/node_modules/chalk/package.json +68 -0
  775. package/node_modules/chalk/readme.md +341 -0
  776. package/node_modules/chalk/source/index.js +229 -0
  777. package/node_modules/chalk/source/templates.js +134 -0
  778. package/node_modules/chalk/source/util.js +39 -0
  779. package/node_modules/cliui/CHANGELOG.md +121 -0
  780. package/node_modules/cliui/LICENSE.txt +14 -0
  781. package/node_modules/cliui/README.md +141 -0
  782. package/node_modules/cliui/build/index.cjs +302 -0
  783. package/node_modules/cliui/build/lib/index.js +287 -0
  784. package/node_modules/cliui/build/lib/string-utils.js +27 -0
  785. package/node_modules/cliui/index.mjs +13 -0
  786. package/node_modules/cliui/package.json +83 -0
  787. package/node_modules/color-convert/CHANGELOG.md +54 -0
  788. package/node_modules/color-convert/LICENSE +21 -0
  789. package/node_modules/color-convert/README.md +68 -0
  790. package/node_modules/color-convert/conversions.js +839 -0
  791. package/node_modules/color-convert/index.js +81 -0
  792. package/node_modules/color-convert/package.json +48 -0
  793. package/node_modules/color-convert/route.js +97 -0
  794. package/node_modules/color-name/LICENSE +8 -0
  795. package/node_modules/color-name/README.md +11 -0
  796. package/node_modules/color-name/index.js +152 -0
  797. package/node_modules/color-name/package.json +28 -0
  798. package/node_modules/concat-map/.travis.yml +4 -0
  799. package/node_modules/concat-map/LICENSE +18 -0
  800. package/node_modules/concat-map/README.markdown +62 -0
  801. package/node_modules/concat-map/example/map.js +6 -0
  802. package/node_modules/concat-map/index.js +13 -0
  803. package/node_modules/concat-map/package.json +43 -0
  804. package/node_modules/concat-map/test/map.js +39 -0
  805. package/node_modules/conventional-changelog-config-spec/CHANGELOG.md +15 -0
  806. package/node_modules/conventional-changelog-config-spec/README.md +7 -0
  807. package/node_modules/conventional-changelog-config-spec/index.js +1 -0
  808. package/node_modules/conventional-changelog-config-spec/package.json +32 -0
  809. package/node_modules/conventional-changelog-config-spec/renovate.json +5 -0
  810. package/node_modules/conventional-changelog-config-spec/tests/shared.js +38 -0
  811. package/node_modules/conventional-changelog-config-spec/tests/v1.test.js +7 -0
  812. package/node_modules/conventional-changelog-config-spec/tests/v2.test.js +26 -0
  813. package/node_modules/conventional-changelog-config-spec/versions/1.0.0/README.md +143 -0
  814. package/node_modules/conventional-changelog-config-spec/versions/1.0.0/schema.json +81 -0
  815. package/node_modules/conventional-changelog-config-spec/versions/2.0.0/README.md +155 -0
  816. package/node_modules/conventional-changelog-config-spec/versions/2.0.0/schema.json +89 -0
  817. package/node_modules/conventional-changelog-config-spec/versions/2.1.0/README.md +166 -0
  818. package/node_modules/conventional-changelog-config-spec/versions/2.1.0/schema.json +97 -0
  819. package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  820. package/node_modules/emoji-regex/README.md +73 -0
  821. package/node_modules/emoji-regex/es2015/index.js +6 -0
  822. package/node_modules/emoji-regex/es2015/text.js +6 -0
  823. package/node_modules/emoji-regex/index.d.ts +23 -0
  824. package/node_modules/emoji-regex/index.js +6 -0
  825. package/node_modules/emoji-regex/package.json +50 -0
  826. package/node_modules/emoji-regex/text.js +6 -0
  827. package/node_modules/escalade/dist/index.js +22 -0
  828. package/node_modules/escalade/dist/index.mjs +22 -0
  829. package/node_modules/escalade/index.d.ts +3 -0
  830. package/node_modules/escalade/license +9 -0
  831. package/node_modules/escalade/package.json +61 -0
  832. package/node_modules/escalade/readme.md +211 -0
  833. package/node_modules/escalade/sync/index.d.ts +2 -0
  834. package/node_modules/escalade/sync/index.js +18 -0
  835. package/node_modules/escalade/sync/index.mjs +18 -0
  836. package/node_modules/esprima/ChangeLog +235 -0
  837. package/node_modules/esprima/LICENSE.BSD +21 -0
  838. package/node_modules/esprima/README.md +46 -0
  839. package/node_modules/esprima/bin/esparse.js +139 -0
  840. package/node_modules/esprima/bin/esvalidate.js +236 -0
  841. package/node_modules/esprima/dist/esprima.js +6709 -0
  842. package/node_modules/esprima/package.json +112 -0
  843. package/node_modules/fs-extra/CHANGELOG.md +902 -0
  844. package/node_modules/fs-extra/LICENSE +15 -0
  845. package/node_modules/fs-extra/README.md +264 -0
  846. package/node_modules/fs-extra/lib/copy/copy.js +232 -0
  847. package/node_modules/fs-extra/lib/copy/index.js +6 -0
  848. package/node_modules/fs-extra/lib/copy-sync/copy-sync.js +166 -0
  849. package/node_modules/fs-extra/lib/copy-sync/index.js +5 -0
  850. package/node_modules/fs-extra/lib/empty/index.js +48 -0
  851. package/node_modules/fs-extra/lib/ensure/file.js +69 -0
  852. package/node_modules/fs-extra/lib/ensure/index.js +23 -0
  853. package/node_modules/fs-extra/lib/ensure/link.js +61 -0
  854. package/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
  855. package/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
  856. package/node_modules/fs-extra/lib/ensure/symlink.js +63 -0
  857. package/node_modules/fs-extra/lib/fs/index.js +130 -0
  858. package/node_modules/fs-extra/lib/index.js +27 -0
  859. package/node_modules/fs-extra/lib/json/index.js +16 -0
  860. package/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  861. package/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  862. package/node_modules/fs-extra/lib/json/output-json.js +12 -0
  863. package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  864. package/node_modules/fs-extra/lib/mkdirs/make-dir.js +141 -0
  865. package/node_modules/fs-extra/lib/move/index.js +6 -0
  866. package/node_modules/fs-extra/lib/move/move.js +65 -0
  867. package/node_modules/fs-extra/lib/move-sync/index.js +5 -0
  868. package/node_modules/fs-extra/lib/move-sync/move-sync.js +47 -0
  869. package/node_modules/fs-extra/lib/output/index.js +40 -0
  870. package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  871. package/node_modules/fs-extra/lib/remove/index.js +9 -0
  872. package/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
  873. package/node_modules/fs-extra/lib/util/stat.js +139 -0
  874. package/node_modules/fs-extra/lib/util/utimes.js +26 -0
  875. package/node_modules/fs-extra/node_modules/universalify/LICENSE +20 -0
  876. package/node_modules/fs-extra/node_modules/universalify/README.md +76 -0
  877. package/node_modules/fs-extra/node_modules/universalify/index.js +24 -0
  878. package/node_modules/fs-extra/node_modules/universalify/package.json +34 -0
  879. package/node_modules/fs-extra/package.json +70 -0
  880. package/node_modules/fs.realpath/LICENSE +43 -0
  881. package/node_modules/fs.realpath/README.md +33 -0
  882. package/node_modules/fs.realpath/index.js +66 -0
  883. package/node_modules/fs.realpath/old.js +303 -0
  884. package/node_modules/fs.realpath/package.json +26 -0
  885. package/node_modules/function-bind/.editorconfig +20 -0
  886. package/node_modules/function-bind/.eslintrc +15 -0
  887. package/node_modules/function-bind/.jscs.json +176 -0
  888. package/node_modules/function-bind/.npmignore +22 -0
  889. package/node_modules/function-bind/.travis.yml +168 -0
  890. package/node_modules/function-bind/LICENSE +20 -0
  891. package/node_modules/function-bind/README.md +48 -0
  892. package/node_modules/function-bind/implementation.js +52 -0
  893. package/node_modules/function-bind/index.js +5 -0
  894. package/node_modules/function-bind/package.json +63 -0
  895. package/node_modules/function-bind/test/.eslintrc +9 -0
  896. package/node_modules/function-bind/test/index.js +252 -0
  897. package/node_modules/get-caller-file/LICENSE.md +6 -0
  898. package/node_modules/get-caller-file/README.md +41 -0
  899. package/node_modules/get-caller-file/index.d.ts +2 -0
  900. package/node_modules/get-caller-file/index.js +22 -0
  901. package/node_modules/get-caller-file/index.js.map +1 -0
  902. package/node_modules/get-caller-file/package.json +42 -0
  903. package/node_modules/glob/LICENSE +21 -0
  904. package/node_modules/glob/README.md +378 -0
  905. package/node_modules/glob/common.js +236 -0
  906. package/node_modules/glob/glob.js +787 -0
  907. package/node_modules/glob/package.json +52 -0
  908. package/node_modules/glob/sync.js +483 -0
  909. package/node_modules/graceful-fs/LICENSE +15 -0
  910. package/node_modules/graceful-fs/README.md +143 -0
  911. package/node_modules/graceful-fs/clone.js +23 -0
  912. package/node_modules/graceful-fs/graceful-fs.js +429 -0
  913. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  914. package/node_modules/graceful-fs/package.json +50 -0
  915. package/node_modules/graceful-fs/polyfills.js +346 -0
  916. package/node_modules/has/LICENSE-MIT +22 -0
  917. package/node_modules/has/README.md +18 -0
  918. package/node_modules/has/package.json +48 -0
  919. package/node_modules/has/src/index.js +5 -0
  920. package/node_modules/has/test/index.js +10 -0
  921. package/node_modules/has-flag/index.d.ts +39 -0
  922. package/node_modules/has-flag/index.js +8 -0
  923. package/node_modules/has-flag/license +9 -0
  924. package/node_modules/has-flag/package.json +46 -0
  925. package/node_modules/has-flag/readme.md +89 -0
  926. package/node_modules/inflight/LICENSE +15 -0
  927. package/node_modules/inflight/README.md +37 -0
  928. package/node_modules/inflight/inflight.js +54 -0
  929. package/node_modules/inflight/package.json +29 -0
  930. package/node_modules/inherits/LICENSE +16 -0
  931. package/node_modules/inherits/README.md +42 -0
  932. package/node_modules/inherits/inherits.js +9 -0
  933. package/node_modules/inherits/inherits_browser.js +27 -0
  934. package/node_modules/inherits/package.json +29 -0
  935. package/node_modules/ini/LICENSE +15 -0
  936. package/node_modules/ini/README.md +102 -0
  937. package/node_modules/ini/ini.js +206 -0
  938. package/node_modules/ini/package.json +36 -0
  939. package/node_modules/interpret/CHANGELOG +115 -0
  940. package/node_modules/interpret/LICENSE +22 -0
  941. package/node_modules/interpret/README.md +187 -0
  942. package/node_modules/interpret/index.js +168 -0
  943. package/node_modules/interpret/mjs-stub.js +1 -0
  944. package/node_modules/interpret/package.json +75 -0
  945. package/node_modules/is-core-module/.eslintignore +1 -0
  946. package/node_modules/is-core-module/.eslintrc +18 -0
  947. package/node_modules/is-core-module/.nycrc +9 -0
  948. package/node_modules/is-core-module/CHANGELOG.md +117 -0
  949. package/node_modules/is-core-module/LICENSE +20 -0
  950. package/node_modules/is-core-module/README.md +40 -0
  951. package/node_modules/is-core-module/core.json +152 -0
  952. package/node_modules/is-core-module/index.js +69 -0
  953. package/node_modules/is-core-module/package.json +69 -0
  954. package/node_modules/is-core-module/test/index.js +130 -0
  955. package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  956. package/node_modules/is-fullwidth-code-point/index.js +50 -0
  957. package/node_modules/is-fullwidth-code-point/license +9 -0
  958. package/node_modules/is-fullwidth-code-point/package.json +42 -0
  959. package/node_modules/is-fullwidth-code-point/readme.md +39 -0
  960. package/node_modules/jsonfile/CHANGELOG.md +171 -0
  961. package/node_modules/jsonfile/LICENSE +15 -0
  962. package/node_modules/jsonfile/README.md +230 -0
  963. package/node_modules/jsonfile/index.js +88 -0
  964. package/node_modules/jsonfile/node_modules/universalify/LICENSE +20 -0
  965. package/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
  966. package/node_modules/jsonfile/node_modules/universalify/index.js +24 -0
  967. package/node_modules/jsonfile/node_modules/universalify/package.json +34 -0
  968. package/node_modules/jsonfile/package.json +40 -0
  969. package/node_modules/jsonfile/utils.js +14 -0
  970. package/node_modules/lru-cache/LICENSE +15 -0
  971. package/node_modules/lru-cache/README.md +166 -0
  972. package/node_modules/lru-cache/index.js +334 -0
  973. package/node_modules/lru-cache/package.json +34 -0
  974. package/node_modules/minimatch/LICENSE +15 -0
  975. package/node_modules/minimatch/README.md +209 -0
  976. package/node_modules/minimatch/minimatch.js +923 -0
  977. package/node_modules/minimatch/package.json +30 -0
  978. package/node_modules/minimist/.travis.yml +8 -0
  979. package/node_modules/minimist/LICENSE +18 -0
  980. package/node_modules/minimist/example/parse.js +2 -0
  981. package/node_modules/minimist/index.js +245 -0
  982. package/node_modules/minimist/package.json +45 -0
  983. package/node_modules/minimist/readme.markdown +95 -0
  984. package/node_modules/minimist/test/all_bool.js +32 -0
  985. package/node_modules/minimist/test/bool.js +178 -0
  986. package/node_modules/minimist/test/dash.js +31 -0
  987. package/node_modules/minimist/test/default_bool.js +35 -0
  988. package/node_modules/minimist/test/dotted.js +22 -0
  989. package/node_modules/minimist/test/kv_short.js +16 -0
  990. package/node_modules/minimist/test/long.js +31 -0
  991. package/node_modules/minimist/test/num.js +36 -0
  992. package/node_modules/minimist/test/parse.js +197 -0
  993. package/node_modules/minimist/test/parse_modified.js +9 -0
  994. package/node_modules/minimist/test/proto.js +44 -0
  995. package/node_modules/minimist/test/short.js +67 -0
  996. package/node_modules/minimist/test/stop_early.js +15 -0
  997. package/node_modules/minimist/test/unknown.js +102 -0
  998. package/node_modules/minimist/test/whitespace.js +8 -0
  999. package/node_modules/once/LICENSE +15 -0
  1000. package/node_modules/once/README.md +79 -0
  1001. package/node_modules/once/once.js +42 -0
  1002. package/node_modules/once/package.json +33 -0
  1003. package/node_modules/path-is-absolute/index.js +20 -0
  1004. package/node_modules/path-is-absolute/license +21 -0
  1005. package/node_modules/path-is-absolute/package.json +43 -0
  1006. package/node_modules/path-is-absolute/readme.md +59 -0
  1007. package/node_modules/path-parse/LICENSE +21 -0
  1008. package/node_modules/path-parse/README.md +42 -0
  1009. package/node_modules/path-parse/index.js +75 -0
  1010. package/node_modules/path-parse/package.json +33 -0
  1011. package/node_modules/rechoir/.npmignore +1 -0
  1012. package/node_modules/rechoir/.travis.yml +24 -0
  1013. package/node_modules/rechoir/CHANGELOG +38 -0
  1014. package/node_modules/rechoir/LICENSE +22 -0
  1015. package/node_modules/rechoir/README.md +42 -0
  1016. package/node_modules/rechoir/index.js +59 -0
  1017. package/node_modules/rechoir/lib/extension.js +11 -0
  1018. package/node_modules/rechoir/lib/normalize.js +15 -0
  1019. package/node_modules/rechoir/lib/register.js +15 -0
  1020. package/node_modules/rechoir/package.json +88 -0
  1021. package/node_modules/require-directory/.jshintrc +67 -0
  1022. package/node_modules/require-directory/.npmignore +1 -0
  1023. package/node_modules/require-directory/.travis.yml +3 -0
  1024. package/node_modules/require-directory/LICENSE +22 -0
  1025. package/node_modules/require-directory/README.markdown +184 -0
  1026. package/node_modules/require-directory/index.js +86 -0
  1027. package/node_modules/require-directory/package.json +40 -0
  1028. package/node_modules/resolve/.editorconfig +37 -0
  1029. package/node_modules/resolve/.eslintignore +1 -0
  1030. package/node_modules/resolve/.eslintrc +39 -0
  1031. package/node_modules/resolve/LICENSE +21 -0
  1032. package/node_modules/resolve/SECURITY.md +3 -0
  1033. package/node_modules/resolve/appveyor.yml +74 -0
  1034. package/node_modules/resolve/example/async.js +5 -0
  1035. package/node_modules/resolve/example/sync.js +3 -0
  1036. package/node_modules/resolve/index.js +6 -0
  1037. package/node_modules/resolve/lib/async.js +320 -0
  1038. package/node_modules/resolve/lib/caller.js +8 -0
  1039. package/node_modules/resolve/lib/core.js +53 -0
  1040. package/node_modules/resolve/lib/core.json +83 -0
  1041. package/node_modules/resolve/lib/is-core.js +5 -0
  1042. package/node_modules/resolve/lib/node-modules-paths.js +42 -0
  1043. package/node_modules/resolve/lib/normalize-options.js +10 -0
  1044. package/node_modules/resolve/lib/sync.js +199 -0
  1045. package/node_modules/resolve/package.json +51 -0
  1046. package/node_modules/resolve/readme.markdown +279 -0
  1047. package/node_modules/resolve/test/.eslintrc +5 -0
  1048. package/node_modules/resolve/test/core.js +81 -0
  1049. package/node_modules/resolve/test/dotdot/abc/index.js +2 -0
  1050. package/node_modules/resolve/test/dotdot/index.js +1 -0
  1051. package/node_modules/resolve/test/dotdot.js +29 -0
  1052. package/node_modules/resolve/test/faulty_basedir.js +29 -0
  1053. package/node_modules/resolve/test/filter.js +34 -0
  1054. package/node_modules/resolve/test/filter_sync.js +33 -0
  1055. package/node_modules/resolve/test/mock.js +315 -0
  1056. package/node_modules/resolve/test/mock_sync.js +216 -0
  1057. package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
  1058. package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
  1059. package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
  1060. package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
  1061. package/node_modules/resolve/test/module_dir.js +56 -0
  1062. package/node_modules/resolve/test/node-modules-paths.js +143 -0
  1063. package/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
  1064. package/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
  1065. package/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
  1066. package/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
  1067. package/node_modules/resolve/test/node_path.js +70 -0
  1068. package/node_modules/resolve/test/nonstring.js +9 -0
  1069. package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  1070. package/node_modules/resolve/test/pathfilter.js +75 -0
  1071. package/node_modules/resolve/test/precedence/aaa/index.js +1 -0
  1072. package/node_modules/resolve/test/precedence/aaa/main.js +1 -0
  1073. package/node_modules/resolve/test/precedence/aaa.js +1 -0
  1074. package/node_modules/resolve/test/precedence/bbb/main.js +1 -0
  1075. package/node_modules/resolve/test/precedence/bbb.js +1 -0
  1076. package/node_modules/resolve/test/precedence.js +23 -0
  1077. package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  1078. package/node_modules/resolve/test/resolver/baz/package.json +4 -0
  1079. package/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  1080. package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  1081. package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  1082. package/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
  1083. package/node_modules/resolve/test/resolver/cup.coffee +1 -0
  1084. package/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
  1085. package/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
  1086. package/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
  1087. package/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
  1088. package/node_modules/resolve/test/resolver/foo.js +1 -0
  1089. package/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  1090. package/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  1091. package/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
  1092. package/node_modules/resolve/test/resolver/mug.coffee +0 -0
  1093. package/node_modules/resolve/test/resolver/mug.js +0 -0
  1094. package/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
  1095. package/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
  1096. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
  1097. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
  1098. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  1099. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
  1100. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
  1101. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
  1102. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
  1103. package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  1104. package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  1105. package/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  1106. package/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
  1107. package/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
  1108. package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  1109. package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  1110. package/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
  1111. package/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
  1112. package/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
  1113. package/node_modules/resolve/test/resolver.js +450 -0
  1114. package/node_modules/resolve/test/resolver_sync.js +358 -0
  1115. package/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
  1116. package/node_modules/resolve/test/shadowed_core.js +54 -0
  1117. package/node_modules/resolve/test/subdirs.js +13 -0
  1118. package/node_modules/resolve/test/symlinks.js +176 -0
  1119. package/node_modules/semver/CHANGELOG.md +111 -0
  1120. package/node_modules/semver/LICENSE +15 -0
  1121. package/node_modules/semver/README.md +566 -0
  1122. package/node_modules/semver/bin/semver.js +173 -0
  1123. package/node_modules/semver/classes/comparator.js +135 -0
  1124. package/node_modules/semver/classes/index.js +5 -0
  1125. package/node_modules/semver/classes/range.js +510 -0
  1126. package/node_modules/semver/classes/semver.js +287 -0
  1127. package/node_modules/semver/functions/clean.js +6 -0
  1128. package/node_modules/semver/functions/cmp.js +48 -0
  1129. package/node_modules/semver/functions/coerce.js +51 -0
  1130. package/node_modules/semver/functions/compare-build.js +7 -0
  1131. package/node_modules/semver/functions/compare-loose.js +3 -0
  1132. package/node_modules/semver/functions/compare.js +5 -0
  1133. package/node_modules/semver/functions/diff.js +23 -0
  1134. package/node_modules/semver/functions/eq.js +3 -0
  1135. package/node_modules/semver/functions/gt.js +3 -0
  1136. package/node_modules/semver/functions/gte.js +3 -0
  1137. package/node_modules/semver/functions/inc.js +15 -0
  1138. package/node_modules/semver/functions/lt.js +3 -0
  1139. package/node_modules/semver/functions/lte.js +3 -0
  1140. package/node_modules/semver/functions/major.js +3 -0
  1141. package/node_modules/semver/functions/minor.js +3 -0
  1142. package/node_modules/semver/functions/neq.js +3 -0
  1143. package/node_modules/semver/functions/parse.js +33 -0
  1144. package/node_modules/semver/functions/patch.js +3 -0
  1145. package/node_modules/semver/functions/prerelease.js +6 -0
  1146. package/node_modules/semver/functions/rcompare.js +3 -0
  1147. package/node_modules/semver/functions/rsort.js +3 -0
  1148. package/node_modules/semver/functions/satisfies.js +10 -0
  1149. package/node_modules/semver/functions/sort.js +3 -0
  1150. package/node_modules/semver/functions/valid.js +6 -0
  1151. package/node_modules/semver/index.js +48 -0
  1152. package/node_modules/semver/internal/constants.js +17 -0
  1153. package/node_modules/semver/internal/debug.js +9 -0
  1154. package/node_modules/semver/internal/identifiers.js +23 -0
  1155. package/node_modules/semver/internal/parse-options.js +11 -0
  1156. package/node_modules/semver/internal/re.js +182 -0
  1157. package/node_modules/semver/package.json +41 -0
  1158. package/node_modules/semver/preload.js +2 -0
  1159. package/node_modules/semver/range.bnf +16 -0
  1160. package/node_modules/semver/ranges/gtr.js +4 -0
  1161. package/node_modules/semver/ranges/intersects.js +7 -0
  1162. package/node_modules/semver/ranges/ltr.js +4 -0
  1163. package/node_modules/semver/ranges/max-satisfying.js +25 -0
  1164. package/node_modules/semver/ranges/min-satisfying.js +24 -0
  1165. package/node_modules/semver/ranges/min-version.js +60 -0
  1166. package/node_modules/semver/ranges/outside.js +80 -0
  1167. package/node_modules/semver/ranges/simplify.js +44 -0
  1168. package/node_modules/semver/ranges/subset.js +222 -0
  1169. package/node_modules/semver/ranges/to-comparators.js +8 -0
  1170. package/node_modules/semver/ranges/valid.js +11 -0
  1171. package/node_modules/shelljs/CHANGELOG.md +942 -0
  1172. package/node_modules/shelljs/LICENSE +26 -0
  1173. package/node_modules/shelljs/README.md +835 -0
  1174. package/node_modules/shelljs/bin/shjs +48 -0
  1175. package/node_modules/shelljs/commands.js +29 -0
  1176. package/node_modules/shelljs/global.js +12 -0
  1177. package/node_modules/shelljs/make.js +57 -0
  1178. package/node_modules/shelljs/package.json +79 -0
  1179. package/node_modules/shelljs/plugin.js +16 -0
  1180. package/node_modules/shelljs/shell.js +156 -0
  1181. package/node_modules/shelljs/src/cat.js +76 -0
  1182. package/node_modules/shelljs/src/cd.js +39 -0
  1183. package/node_modules/shelljs/src/chmod.js +216 -0
  1184. package/node_modules/shelljs/src/common.js +468 -0
  1185. package/node_modules/shelljs/src/cp.js +304 -0
  1186. package/node_modules/shelljs/src/dirs.js +212 -0
  1187. package/node_modules/shelljs/src/echo.js +63 -0
  1188. package/node_modules/shelljs/src/error.js +15 -0
  1189. package/node_modules/shelljs/src/exec-child.js +39 -0
  1190. package/node_modules/shelljs/src/exec.js +208 -0
  1191. package/node_modules/shelljs/src/find.js +61 -0
  1192. package/node_modules/shelljs/src/grep.js +73 -0
  1193. package/node_modules/shelljs/src/head.js +107 -0
  1194. package/node_modules/shelljs/src/ln.js +73 -0
  1195. package/node_modules/shelljs/src/ls.js +141 -0
  1196. package/node_modules/shelljs/src/mkdir.js +100 -0
  1197. package/node_modules/shelljs/src/mv.js +118 -0
  1198. package/node_modules/shelljs/src/popd.js +1 -0
  1199. package/node_modules/shelljs/src/pushd.js +1 -0
  1200. package/node_modules/shelljs/src/pwd.js +16 -0
  1201. package/node_modules/shelljs/src/rm.js +201 -0
  1202. package/node_modules/shelljs/src/sed.js +87 -0
  1203. package/node_modules/shelljs/src/set.js +56 -0
  1204. package/node_modules/shelljs/src/sort.js +97 -0
  1205. package/node_modules/shelljs/src/tail.js +80 -0
  1206. package/node_modules/shelljs/src/tempdir.js +75 -0
  1207. package/node_modules/shelljs/src/test.js +85 -0
  1208. package/node_modules/shelljs/src/to.js +37 -0
  1209. package/node_modules/shelljs/src/toEnd.js +36 -0
  1210. package/node_modules/shelljs/src/touch.js +111 -0
  1211. package/node_modules/shelljs/src/uniq.js +92 -0
  1212. package/node_modules/shelljs/src/which.js +118 -0
  1213. package/node_modules/shx/CHANGELOG.md +224 -0
  1214. package/node_modules/shx/LICENSE +21 -0
  1215. package/node_modules/shx/README.md +149 -0
  1216. package/node_modules/shx/lib/cli.js +40 -0
  1217. package/node_modules/shx/lib/config.js +58 -0
  1218. package/node_modules/shx/lib/help.js +37 -0
  1219. package/node_modules/shx/lib/plugin-true-false.js +25 -0
  1220. package/node_modules/shx/lib/printCmdRet.js +17 -0
  1221. package/node_modules/shx/lib/shx.js +157 -0
  1222. package/node_modules/shx/package.json +80 -0
  1223. package/node_modules/sprintf-js/.npmignore +1 -0
  1224. package/node_modules/sprintf-js/LICENSE +24 -0
  1225. package/node_modules/sprintf-js/README.md +88 -0
  1226. package/node_modules/sprintf-js/bower.json +14 -0
  1227. package/node_modules/sprintf-js/demo/angular.html +20 -0
  1228. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
  1229. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
  1230. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
  1231. package/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
  1232. package/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
  1233. package/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
  1234. package/node_modules/sprintf-js/gruntfile.js +36 -0
  1235. package/node_modules/sprintf-js/package.json +22 -0
  1236. package/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
  1237. package/node_modules/sprintf-js/src/sprintf.js +208 -0
  1238. package/node_modules/sprintf-js/test/test.js +82 -0
  1239. package/node_modules/string-width/index.d.ts +29 -0
  1240. package/node_modules/string-width/index.js +47 -0
  1241. package/node_modules/string-width/license +9 -0
  1242. package/node_modules/string-width/package.json +56 -0
  1243. package/node_modules/string-width/readme.md +50 -0
  1244. package/node_modules/strip-ansi/index.d.ts +17 -0
  1245. package/node_modules/strip-ansi/index.js +4 -0
  1246. package/node_modules/strip-ansi/license +9 -0
  1247. package/node_modules/strip-ansi/package.json +54 -0
  1248. package/node_modules/strip-ansi/readme.md +46 -0
  1249. package/node_modules/supports-color/browser.js +5 -0
  1250. package/node_modules/supports-color/index.js +135 -0
  1251. package/node_modules/supports-color/license +9 -0
  1252. package/node_modules/supports-color/package.json +53 -0
  1253. package/node_modules/supports-color/readme.md +76 -0
  1254. package/node_modules/wrap-ansi/index.js +216 -0
  1255. package/node_modules/wrap-ansi/license +9 -0
  1256. package/node_modules/wrap-ansi/package.json +62 -0
  1257. package/node_modules/wrap-ansi/readme.md +91 -0
  1258. package/node_modules/wrappy/LICENSE +15 -0
  1259. package/node_modules/wrappy/README.md +36 -0
  1260. package/node_modules/wrappy/package.json +29 -0
  1261. package/node_modules/wrappy/wrappy.js +33 -0
  1262. package/node_modules/xmlbuilder2/CHANGELOG.md +215 -0
  1263. package/node_modules/xmlbuilder2/LICENSE +21 -0
  1264. package/node_modules/xmlbuilder2/README.md +182 -0
  1265. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.d.ts +236 -0
  1266. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js +108 -0
  1267. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js.map +1 -0
  1268. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.d.ts +17 -0
  1269. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js +26 -0
  1270. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js.map +1 -0
  1271. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.d.ts +122 -0
  1272. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js +791 -0
  1273. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js.map +1 -0
  1274. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.d.ts +143 -0
  1275. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js +841 -0
  1276. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js.map +1 -0
  1277. package/node_modules/xmlbuilder2/lib/builder/dom.d.ts +8 -0
  1278. package/node_modules/xmlbuilder2/lib/builder/dom.js +67 -0
  1279. package/node_modules/xmlbuilder2/lib/builder/dom.js.map +1 -0
  1280. package/node_modules/xmlbuilder2/lib/builder/index.d.ts +4 -0
  1281. package/node_modules/xmlbuilder2/lib/builder/index.js +15 -0
  1282. package/node_modules/xmlbuilder2/lib/builder/index.js.map +1 -0
  1283. package/node_modules/xmlbuilder2/lib/index.d.ts +1 -0
  1284. package/node_modules/xmlbuilder2/lib/index.js +10 -0
  1285. package/node_modules/xmlbuilder2/lib/index.js.map +1 -0
  1286. package/node_modules/xmlbuilder2/lib/interfaces.d.ts +1343 -0
  1287. package/node_modules/xmlbuilder2/lib/interfaces.js +75 -0
  1288. package/node_modules/xmlbuilder2/lib/interfaces.js.map +1 -0
  1289. package/node_modules/xmlbuilder2/lib/readers/BaseReader.d.ts +96 -0
  1290. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js +138 -0
  1291. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js.map +1 -0
  1292. package/node_modules/xmlbuilder2/lib/readers/JSONReader.d.ts +14 -0
  1293. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js +38 -0
  1294. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js.map +1 -0
  1295. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.d.ts +15 -0
  1296. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js +161 -0
  1297. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js.map +1 -0
  1298. package/node_modules/xmlbuilder2/lib/readers/XMLReader.d.ts +14 -0
  1299. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js +200 -0
  1300. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js.map +1 -0
  1301. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.d.ts +14 -0
  1302. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js +44 -0
  1303. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js.map +1 -0
  1304. package/node_modules/xmlbuilder2/lib/readers/index.d.ts +4 -0
  1305. package/node_modules/xmlbuilder2/lib/readers/index.js +11 -0
  1306. package/node_modules/xmlbuilder2/lib/readers/index.js.map +1 -0
  1307. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.d.ts +110 -0
  1308. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js +23 -0
  1309. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js.map +1 -0
  1310. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.d.ts +276 -0
  1311. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js +1637 -0
  1312. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js.map +1 -0
  1313. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.d.ts +68 -0
  1314. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js +172 -0
  1315. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js.map +1 -0
  1316. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.d.ts +67 -0
  1317. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js +224 -0
  1318. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js.map +1 -0
  1319. package/node_modules/xmlbuilder2/lib/writers/MapWriter.d.ts +27 -0
  1320. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js +86 -0
  1321. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js.map +1 -0
  1322. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.d.ts +56 -0
  1323. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js +484 -0
  1324. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js.map +1 -0
  1325. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.d.ts +51 -0
  1326. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js +165 -0
  1327. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js.map +1 -0
  1328. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.d.ts +60 -0
  1329. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js +237 -0
  1330. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js.map +1 -0
  1331. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.d.ts +61 -0
  1332. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js +161 -0
  1333. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js.map +1 -0
  1334. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.d.ts +55 -0
  1335. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js +188 -0
  1336. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js.map +1 -0
  1337. package/node_modules/xmlbuilder2/lib/writers/index.d.ts +5 -0
  1338. package/node_modules/xmlbuilder2/lib/writers/index.js +13 -0
  1339. package/node_modules/xmlbuilder2/lib/writers/index.js.map +1 -0
  1340. package/node_modules/xmlbuilder2/lib/xmlbuilder2.min.js +8 -0
  1341. package/node_modules/xmlbuilder2/node_modules/@types/node/LICENSE +21 -0
  1342. package/node_modules/xmlbuilder2/node_modules/@types/node/README.md +16 -0
  1343. package/node_modules/xmlbuilder2/node_modules/@types/node/assert/strict.d.ts +8 -0
  1344. package/node_modules/xmlbuilder2/node_modules/@types/node/assert.d.ts +912 -0
  1345. package/node_modules/xmlbuilder2/node_modules/@types/node/async_hooks.d.ts +501 -0
  1346. package/node_modules/xmlbuilder2/node_modules/@types/node/buffer.d.ts +2142 -0
  1347. package/node_modules/xmlbuilder2/node_modules/@types/node/child_process.d.ts +1366 -0
  1348. package/node_modules/xmlbuilder2/node_modules/@types/node/cluster.d.ts +414 -0
  1349. package/node_modules/xmlbuilder2/node_modules/@types/node/console.d.ts +412 -0
  1350. package/node_modules/xmlbuilder2/node_modules/@types/node/constants.d.ts +18 -0
  1351. package/node_modules/xmlbuilder2/node_modules/@types/node/crypto.d.ts +3307 -0
  1352. package/node_modules/xmlbuilder2/node_modules/@types/node/dgram.d.ts +545 -0
  1353. package/node_modules/xmlbuilder2/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  1354. package/node_modules/xmlbuilder2/node_modules/@types/node/dns/promises.d.ts +370 -0
  1355. package/node_modules/xmlbuilder2/node_modules/@types/node/dns.d.ts +659 -0
  1356. package/node_modules/xmlbuilder2/node_modules/@types/node/domain.d.ts +169 -0
  1357. package/node_modules/xmlbuilder2/node_modules/@types/node/events.d.ts +623 -0
  1358. package/node_modules/xmlbuilder2/node_modules/@types/node/fs/promises.d.ts +1091 -0
  1359. package/node_modules/xmlbuilder2/node_modules/@types/node/fs.d.ts +3835 -0
  1360. package/node_modules/xmlbuilder2/node_modules/@types/node/globals.d.ts +284 -0
  1361. package/node_modules/xmlbuilder2/node_modules/@types/node/globals.global.d.ts +1 -0
  1362. package/node_modules/xmlbuilder2/node_modules/@types/node/http.d.ts +1386 -0
  1363. package/node_modules/xmlbuilder2/node_modules/@types/node/http2.d.ts +2100 -0
  1364. package/node_modules/xmlbuilder2/node_modules/@types/node/https.d.ts +391 -0
  1365. package/node_modules/xmlbuilder2/node_modules/@types/node/index.d.ts +131 -0
  1366. package/node_modules/xmlbuilder2/node_modules/@types/node/inspector.d.ts +2744 -0
  1367. package/node_modules/xmlbuilder2/node_modules/@types/node/module.d.ts +114 -0
  1368. package/node_modules/xmlbuilder2/node_modules/@types/node/net.d.ts +783 -0
  1369. package/node_modules/xmlbuilder2/node_modules/@types/node/os.d.ts +455 -0
  1370. package/node_modules/xmlbuilder2/node_modules/@types/node/package.json +230 -0
  1371. package/node_modules/xmlbuilder2/node_modules/@types/node/path.d.ts +180 -0
  1372. package/node_modules/xmlbuilder2/node_modules/@types/node/perf_hooks.d.ts +557 -0
  1373. package/node_modules/xmlbuilder2/node_modules/@types/node/process.d.ts +1481 -0
  1374. package/node_modules/xmlbuilder2/node_modules/@types/node/punycode.d.ts +117 -0
  1375. package/node_modules/xmlbuilder2/node_modules/@types/node/querystring.d.ts +131 -0
  1376. package/node_modules/xmlbuilder2/node_modules/@types/node/readline.d.ts +650 -0
  1377. package/node_modules/xmlbuilder2/node_modules/@types/node/repl.d.ts +424 -0
  1378. package/node_modules/xmlbuilder2/node_modules/@types/node/stream/consumers.d.ts +24 -0
  1379. package/node_modules/xmlbuilder2/node_modules/@types/node/stream/promises.d.ts +42 -0
  1380. package/node_modules/xmlbuilder2/node_modules/@types/node/stream/web.d.ts +329 -0
  1381. package/node_modules/xmlbuilder2/node_modules/@types/node/stream.d.ts +1249 -0
  1382. package/node_modules/xmlbuilder2/node_modules/@types/node/string_decoder.d.ts +67 -0
  1383. package/node_modules/xmlbuilder2/node_modules/@types/node/timers/promises.d.ts +68 -0
  1384. package/node_modules/xmlbuilder2/node_modules/@types/node/timers.d.ts +94 -0
  1385. package/node_modules/xmlbuilder2/node_modules/@types/node/tls.d.ts +1020 -0
  1386. package/node_modules/xmlbuilder2/node_modules/@types/node/trace_events.d.ts +161 -0
  1387. package/node_modules/xmlbuilder2/node_modules/@types/node/tty.d.ts +204 -0
  1388. package/node_modules/xmlbuilder2/node_modules/@types/node/url.d.ts +861 -0
  1389. package/node_modules/xmlbuilder2/node_modules/@types/node/util.d.ts +1594 -0
  1390. package/node_modules/xmlbuilder2/node_modules/@types/node/v8.d.ts +378 -0
  1391. package/node_modules/xmlbuilder2/node_modules/@types/node/vm.d.ts +507 -0
  1392. package/node_modules/xmlbuilder2/node_modules/@types/node/wasi.d.ts +158 -0
  1393. package/node_modules/xmlbuilder2/node_modules/@types/node/worker_threads.d.ts +649 -0
  1394. package/node_modules/xmlbuilder2/node_modules/@types/node/zlib.d.ts +517 -0
  1395. package/node_modules/xmlbuilder2/node_modules/js-yaml/CHANGELOG.md +551 -0
  1396. package/node_modules/xmlbuilder2/node_modules/js-yaml/LICENSE +21 -0
  1397. package/node_modules/xmlbuilder2/node_modules/js-yaml/README.md +299 -0
  1398. package/node_modules/xmlbuilder2/node_modules/js-yaml/bin/js-yaml.js +132 -0
  1399. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.js +3989 -0
  1400. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
  1401. package/node_modules/xmlbuilder2/node_modules/js-yaml/index.js +7 -0
  1402. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
  1403. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
  1404. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
  1405. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
  1406. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
  1407. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
  1408. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
  1409. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
  1410. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
  1411. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
  1412. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
  1413. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
  1414. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
  1415. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
  1416. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
  1417. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
  1418. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
  1419. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
  1420. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
  1421. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
  1422. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
  1423. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
  1424. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
  1425. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
  1426. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
  1427. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
  1428. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
  1429. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
  1430. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml.js +39 -0
  1431. package/node_modules/xmlbuilder2/node_modules/js-yaml/package.json +49 -0
  1432. package/node_modules/xmlbuilder2/package.json +82 -0
  1433. package/node_modules/y18n/CHANGELOG.md +100 -0
  1434. package/node_modules/y18n/LICENSE +13 -0
  1435. package/node_modules/y18n/README.md +127 -0
  1436. package/node_modules/y18n/build/index.cjs +203 -0
  1437. package/node_modules/y18n/build/lib/cjs.js +6 -0
  1438. package/node_modules/y18n/build/lib/index.js +174 -0
  1439. package/node_modules/y18n/build/lib/platform-shims/node.js +19 -0
  1440. package/node_modules/y18n/index.mjs +8 -0
  1441. package/node_modules/y18n/package.json +70 -0
  1442. package/node_modules/yallist/LICENSE +15 -0
  1443. package/node_modules/yallist/README.md +204 -0
  1444. package/node_modules/yallist/iterator.js +8 -0
  1445. package/node_modules/yallist/package.json +29 -0
  1446. package/node_modules/yallist/yallist.js +426 -0
  1447. package/node_modules/yaml/LICENSE +13 -0
  1448. package/node_modules/yaml/README.md +127 -0
  1449. package/node_modules/yaml/browser/dist/PlainValue-b8036b75.js +1275 -0
  1450. package/node_modules/yaml/browser/dist/Schema-e94716c8.js +682 -0
  1451. package/node_modules/yaml/browser/dist/index.js +1002 -0
  1452. package/node_modules/yaml/browser/dist/legacy-exports.js +3 -0
  1453. package/node_modules/yaml/browser/dist/package.json +1 -0
  1454. package/node_modules/yaml/browser/dist/parse-cst.js +1904 -0
  1455. package/node_modules/yaml/browser/dist/resolveSeq-492ab440.js +2419 -0
  1456. package/node_modules/yaml/browser/dist/types.js +4 -0
  1457. package/node_modules/yaml/browser/dist/util.js +2 -0
  1458. package/node_modules/yaml/browser/dist/warnings-df54cb69.js +499 -0
  1459. package/node_modules/yaml/browser/index.js +1 -0
  1460. package/node_modules/yaml/browser/map.js +2 -0
  1461. package/node_modules/yaml/browser/pair.js +2 -0
  1462. package/node_modules/yaml/browser/parse-cst.js +1 -0
  1463. package/node_modules/yaml/browser/scalar.js +2 -0
  1464. package/node_modules/yaml/browser/schema.js +9 -0
  1465. package/node_modules/yaml/browser/seq.js +2 -0
  1466. package/node_modules/yaml/browser/types/binary.js +8 -0
  1467. package/node_modules/yaml/browser/types/omap.js +3 -0
  1468. package/node_modules/yaml/browser/types/pairs.js +3 -0
  1469. package/node_modules/yaml/browser/types/set.js +3 -0
  1470. package/node_modules/yaml/browser/types/timestamp.js +10 -0
  1471. package/node_modules/yaml/browser/types.js +1 -0
  1472. package/node_modules/yaml/browser/util.js +1 -0
  1473. package/node_modules/yaml/dist/Document-9b4560a1.js +757 -0
  1474. package/node_modules/yaml/dist/PlainValue-ec8e588e.js +876 -0
  1475. package/node_modules/yaml/dist/Schema-88e323a7.js +525 -0
  1476. package/node_modules/yaml/dist/index.js +79 -0
  1477. package/node_modules/yaml/dist/legacy-exports.js +16 -0
  1478. package/node_modules/yaml/dist/parse-cst.js +1753 -0
  1479. package/node_modules/yaml/dist/resolveSeq-d03cb037.js +2161 -0
  1480. package/node_modules/yaml/dist/test-events.js +162 -0
  1481. package/node_modules/yaml/dist/types.js +23 -0
  1482. package/node_modules/yaml/dist/util.js +19 -0
  1483. package/node_modules/yaml/dist/warnings-1000a372.js +416 -0
  1484. package/node_modules/yaml/index.d.ts +372 -0
  1485. package/node_modules/yaml/index.js +1 -0
  1486. package/node_modules/yaml/map.js +2 -0
  1487. package/node_modules/yaml/package.json +106 -0
  1488. package/node_modules/yaml/pair.js +2 -0
  1489. package/node_modules/yaml/parse-cst.d.ts +191 -0
  1490. package/node_modules/yaml/parse-cst.js +1 -0
  1491. package/node_modules/yaml/scalar.js +2 -0
  1492. package/node_modules/yaml/schema.js +9 -0
  1493. package/node_modules/yaml/seq.js +2 -0
  1494. package/node_modules/yaml/types/binary.js +8 -0
  1495. package/node_modules/yaml/types/omap.js +3 -0
  1496. package/node_modules/yaml/types/pairs.js +3 -0
  1497. package/node_modules/yaml/types/set.js +3 -0
  1498. package/node_modules/yaml/types/timestamp.js +10 -0
  1499. package/node_modules/yaml/types.d.ts +407 -0
  1500. package/node_modules/yaml/types.js +17 -0
  1501. package/node_modules/yaml/types.mjs +17 -0
  1502. package/node_modules/yaml/util.d.ts +86 -0
  1503. package/node_modules/yaml/util.js +16 -0
  1504. package/node_modules/yaml/util.mjs +18 -0
  1505. package/node_modules/yargs/CHANGELOG.md +88 -0
  1506. package/node_modules/yargs/LICENSE +21 -0
  1507. package/node_modules/yargs/README.md +202 -0
  1508. package/node_modules/yargs/browser.mjs +7 -0
  1509. package/node_modules/yargs/build/index.cjs +2920 -0
  1510. package/node_modules/yargs/build/lib/argsert.js +62 -0
  1511. package/node_modules/yargs/build/lib/command.js +382 -0
  1512. package/node_modules/yargs/build/lib/completion-templates.js +47 -0
  1513. package/node_modules/yargs/build/lib/completion.js +128 -0
  1514. package/node_modules/yargs/build/lib/middleware.js +53 -0
  1515. package/node_modules/yargs/build/lib/parse-command.js +32 -0
  1516. package/node_modules/yargs/build/lib/typings/common-types.js +9 -0
  1517. package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +1 -0
  1518. package/node_modules/yargs/build/lib/usage.js +548 -0
  1519. package/node_modules/yargs/build/lib/utils/apply-extends.js +59 -0
  1520. package/node_modules/yargs/build/lib/utils/is-promise.js +5 -0
  1521. package/node_modules/yargs/build/lib/utils/levenshtein.js +26 -0
  1522. package/node_modules/yargs/build/lib/utils/obj-filter.js +10 -0
  1523. package/node_modules/yargs/build/lib/utils/process-argv.js +17 -0
  1524. package/node_modules/yargs/build/lib/utils/set-blocking.js +12 -0
  1525. package/node_modules/yargs/build/lib/utils/which-module.js +10 -0
  1526. package/node_modules/yargs/build/lib/validation.js +308 -0
  1527. package/node_modules/yargs/build/lib/yargs-factory.js +1143 -0
  1528. package/node_modules/yargs/build/lib/yerror.js +7 -0
  1529. package/node_modules/yargs/helpers/helpers.mjs +10 -0
  1530. package/node_modules/yargs/helpers/index.js +14 -0
  1531. package/node_modules/yargs/helpers/package.json +3 -0
  1532. package/node_modules/yargs/index.cjs +39 -0
  1533. package/node_modules/yargs/index.mjs +8 -0
  1534. package/node_modules/yargs/lib/platform-shims/browser.mjs +92 -0
  1535. package/node_modules/yargs/lib/platform-shims/esm.mjs +67 -0
  1536. package/node_modules/yargs/locales/be.json +46 -0
  1537. package/node_modules/yargs/locales/de.json +46 -0
  1538. package/node_modules/yargs/locales/en.json +51 -0
  1539. package/node_modules/yargs/locales/es.json +46 -0
  1540. package/node_modules/yargs/locales/fi.json +49 -0
  1541. package/node_modules/yargs/locales/fr.json +53 -0
  1542. package/node_modules/yargs/locales/hi.json +49 -0
  1543. package/node_modules/yargs/locales/hu.json +46 -0
  1544. package/node_modules/yargs/locales/id.json +50 -0
  1545. package/node_modules/yargs/locales/it.json +46 -0
  1546. package/node_modules/yargs/locales/ja.json +51 -0
  1547. package/node_modules/yargs/locales/ko.json +49 -0
  1548. package/node_modules/yargs/locales/nb.json +44 -0
  1549. package/node_modules/yargs/locales/nl.json +49 -0
  1550. package/node_modules/yargs/locales/nn.json +44 -0
  1551. package/node_modules/yargs/locales/pirate.json +13 -0
  1552. package/node_modules/yargs/locales/pl.json +49 -0
  1553. package/node_modules/yargs/locales/pt.json +45 -0
  1554. package/node_modules/yargs/locales/pt_BR.json +48 -0
  1555. package/node_modules/yargs/locales/ru.json +46 -0
  1556. package/node_modules/yargs/locales/th.json +46 -0
  1557. package/node_modules/yargs/locales/tr.json +48 -0
  1558. package/node_modules/yargs/locales/zh_CN.json +48 -0
  1559. package/node_modules/yargs/locales/zh_TW.json +47 -0
  1560. package/node_modules/yargs/package.json +122 -0
  1561. package/node_modules/yargs/yargs +9 -0
  1562. package/node_modules/yargs-parser/CHANGELOG.md +263 -0
  1563. package/node_modules/yargs-parser/LICENSE.txt +14 -0
  1564. package/node_modules/yargs-parser/README.md +518 -0
  1565. package/node_modules/yargs-parser/browser.js +29 -0
  1566. package/node_modules/yargs-parser/build/index.cjs +1042 -0
  1567. package/node_modules/yargs-parser/build/lib/index.js +59 -0
  1568. package/node_modules/yargs-parser/build/lib/string-utils.js +65 -0
  1569. package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +40 -0
  1570. package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +12 -0
  1571. package/node_modules/yargs-parser/build/lib/yargs-parser.js +1037 -0
  1572. package/node_modules/yargs-parser/package.json +87 -0
  1573. package/package.json +181 -0
  1574. package/rfcs/github-project-settings.md +95 -0
  1575. package/version.json +3 -0
@@ -0,0 +1,1637 @@
1
+ "use strict";
2
+ var __values = (this && this.__values) || function(o) {
3
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
+ if (m) return m.call(o);
5
+ if (o && typeof o.length === "number") return {
6
+ next: function () {
7
+ if (o && i >= o.length) o = void 0;
8
+ return { value: o && o[i++], done: !o };
9
+ }
10
+ };
11
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
+ };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
29
+ var __spread = (this && this.__spread) || function () {
30
+ for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
31
+ return ar;
32
+ };
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ var interfaces_1 = require("@oozcitak/dom/lib/dom/interfaces");
35
+ var LocalNameSet_1 = require("@oozcitak/dom/lib/serializer/LocalNameSet");
36
+ var NamespacePrefixMap_1 = require("@oozcitak/dom/lib/serializer/NamespacePrefixMap");
37
+ var infra_1 = require("@oozcitak/infra");
38
+ var algorithm_1 = require("@oozcitak/dom/lib/algorithm");
39
+ /**
40
+ * Pre-serializes XML nodes.
41
+ */
42
+ var BaseWriter = /** @class */ (function () {
43
+ /**
44
+ * Initializes a new instance of `BaseWriter`.
45
+ *
46
+ * @param builderOptions - XML builder options
47
+ */
48
+ function BaseWriter(builderOptions) {
49
+ /**
50
+ * Gets the current depth of the XML tree.
51
+ */
52
+ this.level = 0;
53
+ this._builderOptions = builderOptions;
54
+ }
55
+ /**
56
+ * Used by derived classes to serialize the XML declaration.
57
+ *
58
+ * @param version - a version number string
59
+ * @param encoding - encoding declaration
60
+ * @param standalone - standalone document declaration
61
+ */
62
+ BaseWriter.prototype.declaration = function (version, encoding, standalone) { };
63
+ /**
64
+ * Used by derived classes to serialize a DocType node.
65
+ *
66
+ * @param name - node name
67
+ * @param publicId - public identifier
68
+ * @param systemId - system identifier
69
+ */
70
+ BaseWriter.prototype.docType = function (name, publicId, systemId) { };
71
+ /**
72
+ * Used by derived classes to serialize a comment node.
73
+ *
74
+ * @param data - node data
75
+ */
76
+ BaseWriter.prototype.comment = function (data) { };
77
+ /**
78
+ * Used by derived classes to serialize a text node.
79
+ *
80
+ * @param data - node data
81
+ */
82
+ BaseWriter.prototype.text = function (data) { };
83
+ /**
84
+ * Used by derived classes to serialize a processing instruction node.
85
+ *
86
+ * @param target - instruction target
87
+ * @param data - node data
88
+ */
89
+ BaseWriter.prototype.instruction = function (target, data) { };
90
+ /**
91
+ * Used by derived classes to serialize a CData section node.
92
+ *
93
+ * @param data - node data
94
+ */
95
+ BaseWriter.prototype.cdata = function (data) { };
96
+ /**
97
+ * Used by derived classes to serialize the beginning of the opening tag of an
98
+ * element node.
99
+ *
100
+ * @param name - node name
101
+ */
102
+ BaseWriter.prototype.openTagBegin = function (name) { };
103
+ /**
104
+ * Used by derived classes to serialize the ending of the opening tag of an
105
+ * element node.
106
+ *
107
+ * @param name - node name
108
+ * @param selfClosing - whether the element node is self closing
109
+ * @param voidElement - whether the element node is a HTML void element
110
+ */
111
+ BaseWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { };
112
+ /**
113
+ * Used by derived classes to serialize the closing tag of an element node.
114
+ *
115
+ * @param name - node name
116
+ */
117
+ BaseWriter.prototype.closeTag = function (name) { };
118
+ /**
119
+ * Used by derived classes to serialize attributes or namespace declarations.
120
+ *
121
+ * @param attributes - attribute array
122
+ */
123
+ BaseWriter.prototype.attributes = function (attributes) {
124
+ var e_1, _a;
125
+ try {
126
+ for (var attributes_1 = __values(attributes), attributes_1_1 = attributes_1.next(); !attributes_1_1.done; attributes_1_1 = attributes_1.next()) {
127
+ var attr = attributes_1_1.value;
128
+ this.attribute(attr[1] === null ? attr[2] : attr[1] + ':' + attr[2], attr[3]);
129
+ }
130
+ }
131
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
132
+ finally {
133
+ try {
134
+ if (attributes_1_1 && !attributes_1_1.done && (_a = attributes_1.return)) _a.call(attributes_1);
135
+ }
136
+ finally { if (e_1) throw e_1.error; }
137
+ }
138
+ };
139
+ /**
140
+ * Used by derived classes to serialize an attribute or namespace declaration.
141
+ *
142
+ * @param name - node name
143
+ * @param value - node value
144
+ */
145
+ BaseWriter.prototype.attribute = function (name, value) { };
146
+ /**
147
+ * Used by derived classes to perform any pre-processing steps before starting
148
+ * serializing an element node.
149
+ *
150
+ * @param name - node name
151
+ */
152
+ BaseWriter.prototype.beginElement = function (name) { };
153
+ /**
154
+ * Used by derived classes to perform any post-processing steps after
155
+ * completing serializing an element node.
156
+ *
157
+ * @param name - node name
158
+ */
159
+ BaseWriter.prototype.endElement = function (name) { };
160
+ /**
161
+ * Produces an XML serialization of the given node. The pre-serializer inserts
162
+ * namespace declarations where necessary and produces qualified names for
163
+ * nodes and attributes.
164
+ *
165
+ * @param node - node to serialize
166
+ * @param requireWellFormed - whether to check conformance
167
+ */
168
+ BaseWriter.prototype.serializeNode = function (node, requireWellFormed, noDoubleEncoding) {
169
+ var hasNamespaces = (node._nodeDocument !== undefined && node._nodeDocument._hasNamespaces);
170
+ this.level = 0;
171
+ this.currentNode = node;
172
+ if (hasNamespaces) {
173
+ /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization
174
+ *
175
+ * 1. Let namespace be a context namespace with value null.
176
+ * The context namespace tracks the XML serialization algorithm's current
177
+ * default namespace. The context namespace is changed when either an Element
178
+ * Node has a default namespace declaration, or the algorithm generates a
179
+ * default namespace declaration for the Element Node to match its own
180
+ * namespace. The algorithm assumes no namespace (null) to start.
181
+ * 2. Let prefix map be a new namespace prefix map.
182
+ * 3. Add the XML namespace with prefix value "xml" to prefix map.
183
+ * 4. Let prefix index be a generated namespace prefix index with value 1.
184
+ * The generated namespace prefix index is used to generate a new unique
185
+ * prefix value when no suitable existing namespace prefix is available to
186
+ * serialize a node's namespaceURI (or the namespaceURI of one of node's
187
+ * attributes). See the generate a prefix algorithm.
188
+ */
189
+ var namespace = null;
190
+ var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap();
191
+ prefixMap.set("xml", infra_1.namespace.XML);
192
+ var prefixIndex = { value: 1 };
193
+ /**
194
+ * 5. Return the result of running the XML serialization algorithm on node
195
+ * passing the context namespace namespace, namespace prefix map prefix map,
196
+ * generated namespace prefix index reference to prefix index, and the
197
+ * flag require well-formed. If an exception occurs during the execution
198
+ * of the algorithm, then catch that exception and throw an
199
+ * "InvalidStateError" DOMException.
200
+ */
201
+ this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding);
202
+ }
203
+ else {
204
+ this._serializeNode(node, requireWellFormed, noDoubleEncoding);
205
+ }
206
+ };
207
+ /**
208
+ * Produces an XML serialization of a node.
209
+ *
210
+ * @param node - node to serialize
211
+ * @param namespace - context namespace
212
+ * @param prefixMap - namespace prefix map
213
+ * @param prefixIndex - generated namespace prefix index
214
+ * @param requireWellFormed - whether to check conformance
215
+ */
216
+ BaseWriter.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) {
217
+ this.currentNode = node;
218
+ switch (node.nodeType) {
219
+ case interfaces_1.NodeType.Element:
220
+ this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding);
221
+ break;
222
+ case interfaces_1.NodeType.Document:
223
+ this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding);
224
+ break;
225
+ case interfaces_1.NodeType.Comment:
226
+ this._serializeComment(node, requireWellFormed, noDoubleEncoding);
227
+ break;
228
+ case interfaces_1.NodeType.Text:
229
+ this._serializeText(node, requireWellFormed, noDoubleEncoding);
230
+ break;
231
+ case interfaces_1.NodeType.DocumentFragment:
232
+ this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding);
233
+ break;
234
+ case interfaces_1.NodeType.DocumentType:
235
+ this._serializeDocumentType(node, requireWellFormed, noDoubleEncoding);
236
+ break;
237
+ case interfaces_1.NodeType.ProcessingInstruction:
238
+ this._serializeProcessingInstruction(node, requireWellFormed, noDoubleEncoding);
239
+ break;
240
+ case interfaces_1.NodeType.CData:
241
+ this._serializeCData(node, requireWellFormed, noDoubleEncoding);
242
+ break;
243
+ default:
244
+ throw new Error("Unknown node type: " + node.nodeType);
245
+ }
246
+ };
247
+ /**
248
+ * Produces an XML serialization of a node.
249
+ *
250
+ * @param node - node to serialize
251
+ * @param requireWellFormed - whether to check conformance
252
+ */
253
+ BaseWriter.prototype._serializeNode = function (node, requireWellFormed, noDoubleEncoding) {
254
+ this.currentNode = node;
255
+ switch (node.nodeType) {
256
+ case interfaces_1.NodeType.Element:
257
+ this._serializeElement(node, requireWellFormed, noDoubleEncoding);
258
+ break;
259
+ case interfaces_1.NodeType.Document:
260
+ this._serializeDocument(node, requireWellFormed, noDoubleEncoding);
261
+ break;
262
+ case interfaces_1.NodeType.Comment:
263
+ this._serializeComment(node, requireWellFormed, noDoubleEncoding);
264
+ break;
265
+ case interfaces_1.NodeType.Text:
266
+ this._serializeText(node, requireWellFormed, noDoubleEncoding);
267
+ break;
268
+ case interfaces_1.NodeType.DocumentFragment:
269
+ this._serializeDocumentFragment(node, requireWellFormed, noDoubleEncoding);
270
+ break;
271
+ case interfaces_1.NodeType.DocumentType:
272
+ this._serializeDocumentType(node, requireWellFormed, noDoubleEncoding);
273
+ break;
274
+ case interfaces_1.NodeType.ProcessingInstruction:
275
+ this._serializeProcessingInstruction(node, requireWellFormed, noDoubleEncoding);
276
+ break;
277
+ case interfaces_1.NodeType.CData:
278
+ this._serializeCData(node, requireWellFormed, noDoubleEncoding);
279
+ break;
280
+ default:
281
+ throw new Error("Unknown node type: " + node.nodeType);
282
+ }
283
+ };
284
+ /**
285
+ * Produces an XML serialization of an element node.
286
+ *
287
+ * @param node - node to serialize
288
+ * @param namespace - context namespace
289
+ * @param prefixMap - namespace prefix map
290
+ * @param prefixIndex - generated namespace prefix index
291
+ * @param requireWellFormed - whether to check conformance
292
+ */
293
+ BaseWriter.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) {
294
+ var e_2, _a;
295
+ var attributes = [];
296
+ /**
297
+ * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
298
+ *
299
+ * 1. If the require well-formed flag is set (its value is true), and this
300
+ * node's localName attribute contains the character ":" (U+003A COLON) or
301
+ * does not match the XML Name production, then throw an exception; the
302
+ * serialization of this node would not be a well-formed element.
303
+ */
304
+ if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
305
+ !algorithm_1.xml_isName(node.localName))) {
306
+ throw new Error("Node local name contains invalid characters (well-formed required).");
307
+ }
308
+ /**
309
+ * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
310
+ * 3. Let qualified name be an empty string.
311
+ * 4. Let skip end tag be a boolean flag with value false.
312
+ * 5. Let ignore namespace definition attribute be a boolean flag with value
313
+ * false.
314
+ * 6. Given prefix map, copy a namespace prefix map and let map be the
315
+ * result.
316
+ * 7. Let local prefixes map be an empty map. The map has unique Node prefix
317
+ * strings as its keys, with corresponding namespaceURI Node values as the
318
+ * map's key values (in this map, the null namespace is represented by the
319
+ * empty string).
320
+ *
321
+ * _Note:_ This map is local to each element. It is used to ensure there
322
+ * are no conflicting prefixes should a new namespace prefix attribute need
323
+ * to be generated. It is also used to enable skipping of duplicate prefix
324
+ * definitions when writing an element's attributes: the map allows the
325
+ * algorithm to distinguish between a prefix in the namespace prefix map
326
+ * that might be locally-defined (to the current Element) and one that is
327
+ * not.
328
+ * 8. Let local default namespace be the result of recording the namespace
329
+ * information for node given map and local prefixes map.
330
+ *
331
+ * _Note:_ The above step will update map with any found namespace prefix
332
+ * definitions, add the found prefix definitions to the local prefixes map
333
+ * and return a local default namespace value defined by a default namespace
334
+ * attribute if one exists. Otherwise it returns null.
335
+ * 9. Let inherited ns be a copy of namespace.
336
+ * 10. Let ns be the value of node's namespaceURI attribute.
337
+ */
338
+ var qualifiedName = '';
339
+ var skipEndTag = false;
340
+ var ignoreNamespaceDefinitionAttribute = false;
341
+ var map = prefixMap.copy();
342
+ var localPrefixesMap = {};
343
+ var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap);
344
+ var inheritedNS = namespace;
345
+ var ns = node.namespaceURI;
346
+ /** 11. If inherited ns is equal to ns, then: */
347
+ if (inheritedNS === ns) {
348
+ /**
349
+ * 11.1. If local default namespace is not null, then set ignore
350
+ * namespace definition attribute to true.
351
+ */
352
+ if (localDefaultNamespace !== null) {
353
+ ignoreNamespaceDefinitionAttribute = true;
354
+ }
355
+ /**
356
+ * 11.2. If ns is the XML namespace, then append to qualified name the
357
+ * concatenation of the string "xml:" and the value of node's localName.
358
+ * 11.3. Otherwise, append to qualified name the value of node's
359
+ * localName. The node's prefix if it exists, is dropped.
360
+ */
361
+ if (ns === infra_1.namespace.XML) {
362
+ qualifiedName = 'xml:' + node.localName;
363
+ }
364
+ else {
365
+ qualifiedName = node.localName;
366
+ }
367
+ /** 11.4. Append the value of qualified name to markup. */
368
+ this.beginElement(qualifiedName);
369
+ this.openTagBegin(qualifiedName);
370
+ }
371
+ else {
372
+ /**
373
+ * 12. Otherwise, inherited ns is not equal to ns (the node's own
374
+ * namespace is different from the context namespace of its parent).
375
+ * Run these sub-steps:
376
+ *
377
+ * 12.1. Let prefix be the value of node's prefix attribute.
378
+ * 12.2. Let candidate prefix be the result of retrieving a preferred
379
+ * prefix string prefix from map given namespace ns. The above may return
380
+ * null if no namespace key ns exists in map.
381
+ */
382
+ var prefix = node.prefix;
383
+ /**
384
+ * We don't need to run "retrieving a preferred prefix string" algorithm if
385
+ * the element has no prefix and its namespace matches to the default
386
+ * namespace.
387
+ * See: https://github.com/web-platform-tests/wpt/pull/16703
388
+ */
389
+ var candidatePrefix = null;
390
+ if (prefix !== null || ns !== localDefaultNamespace) {
391
+ candidatePrefix = map.get(prefix, ns);
392
+ }
393
+ /**
394
+ * 12.3. If the value of prefix matches "xmlns", then run the following
395
+ * steps:
396
+ */
397
+ if (prefix === "xmlns") {
398
+ /**
399
+ * 12.3.1. If the require well-formed flag is set, then throw an error.
400
+ * An Element with prefix "xmlns" will not legally round-trip in a
401
+ * conforming XML parser.
402
+ */
403
+ if (requireWellFormed) {
404
+ throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");
405
+ }
406
+ /**
407
+ * 12.3.2. Let candidate prefix be the value of prefix.
408
+ */
409
+ candidatePrefix = prefix;
410
+ }
411
+ /**
412
+ * 12.4.Found a suitable namespace prefix: if candidate prefix is not
413
+ * null (a namespace prefix is defined which maps to ns), then:
414
+ */
415
+ if (candidatePrefix !== null) {
416
+ /**
417
+ * The following may serialize a different prefix than the Element's
418
+ * existing prefix if it already had one. However, the retrieving a
419
+ * preferred prefix string algorithm already tried to match the
420
+ * existing prefix if possible.
421
+ *
422
+ * 12.4.1. Append to qualified name the concatenation of candidate
423
+ * prefix, ":" (U+003A COLON), and node's localName. There exists on
424
+ * this node or the node's ancestry a namespace prefix definition that
425
+ * defines the node's namespace.
426
+ * 12.4.2. If the local default namespace is not null (there exists a
427
+ * locally-defined default namespace declaration attribute) and its
428
+ * value is not the XML namespace, then let inherited ns get the value
429
+ * of local default namespace unless the local default namespace is the
430
+ * empty string in which case let it get null (the context namespace
431
+ * is changed to the declared default, rather than this node's own
432
+ * namespace).
433
+ *
434
+ * _Note:_ Any default namespace definitions or namespace prefixes that
435
+ * define the XML namespace are omitted when serializing this node's
436
+ * attributes.
437
+ */
438
+ qualifiedName = candidatePrefix + ':' + node.localName;
439
+ if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) {
440
+ inheritedNS = localDefaultNamespace || null;
441
+ }
442
+ /**
443
+ * 12.4.3. Append the value of qualified name to markup.
444
+ */
445
+ this.beginElement(qualifiedName);
446
+ this.openTagBegin(qualifiedName);
447
+ /** 12.5. Otherwise, if prefix is not null, then: */
448
+ }
449
+ else if (prefix !== null) {
450
+ /**
451
+ * _Note:_ By this step, there is no namespace or prefix mapping
452
+ * declaration in this node (or any parent node visited by this
453
+ * algorithm) that defines prefix otherwise the step labelled Found
454
+ * a suitable namespace prefix would have been followed. The sub-steps
455
+ * that follow will create a new namespace prefix declaration for prefix
456
+ * and ensure that prefix does not conflict with an existing namespace
457
+ * prefix declaration of the same localName in node's attribute list.
458
+ *
459
+ * 12.5.1. If the local prefixes map contains a key matching prefix,
460
+ * then let prefix be the result of generating a prefix providing as
461
+ * input map, ns, and prefix index.
462
+ */
463
+ if (prefix in localPrefixesMap) {
464
+ prefix = this._generatePrefix(ns, map, prefixIndex);
465
+ }
466
+ /**
467
+ * 12.5.2. Add prefix to map given namespace ns.
468
+ * 12.5.3. Append to qualified name the concatenation of prefix, ":"
469
+ * (U+003A COLON), and node's localName.
470
+ * 12.5.4. Append the value of qualified name to markup.
471
+ */
472
+ map.set(prefix, ns);
473
+ qualifiedName += prefix + ':' + node.localName;
474
+ this.beginElement(qualifiedName);
475
+ this.openTagBegin(qualifiedName);
476
+ /**
477
+ * 12.5.5. Append the following to markup, in the order listed:
478
+ *
479
+ * _Note:_ The following serializes a namespace prefix declaration for
480
+ * prefix which was just added to the map.
481
+ *
482
+ * 12.5.5.1. " " (U+0020 SPACE);
483
+ * 12.5.5.2. The string "xmlns:";
484
+ * 12.5.5.3. The value of prefix;
485
+ * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
486
+ * 12.5.5.5. The result of serializing an attribute value given ns and
487
+ * the require well-formed flag as input;
488
+ * 12.5.5.6. """ (U+0022 QUOTATION MARK).
489
+ */
490
+ attributes.push([null, 'xmlns', prefix,
491
+ this._serializeAttributeValue(ns, requireWellFormed, noDoubleEncoding)]);
492
+ /**
493
+ * 12.5.5.7. If local default namespace is not null (there exists a
494
+ * locally-defined default namespace declaration attribute), then
495
+ * let inherited ns get the value of local default namespace unless the
496
+ * local default namespace is the empty string in which case let it get
497
+ * null.
498
+ */
499
+ if (localDefaultNamespace !== null) {
500
+ inheritedNS = localDefaultNamespace || null;
501
+ }
502
+ /**
503
+ * 12.6. Otherwise, if local default namespace is null, or local
504
+ * default namespace is not null and its value is not equal to ns, then:
505
+ */
506
+ }
507
+ else if (localDefaultNamespace === null ||
508
+ (localDefaultNamespace !== null && localDefaultNamespace !== ns)) {
509
+ /**
510
+ * _Note:_ At this point, the namespace for this node still needs to be
511
+ * serialized, but there's no prefix (or candidate prefix) available; the
512
+ * following uses the default namespace declaration to define the
513
+ * namespace--optionally replacing an existing default declaration
514
+ * if present.
515
+ *
516
+ * 12.6.1. Set the ignore namespace definition attribute flag to true.
517
+ * 12.6.2. Append to qualified name the value of node's localName.
518
+ * 12.6.3. Let the value of inherited ns be ns.
519
+ *
520
+ * _Note:_ The new default namespace will be used in the serialization
521
+ * to define this node's namespace and act as the context namespace for
522
+ * its children.
523
+ */
524
+ ignoreNamespaceDefinitionAttribute = true;
525
+ qualifiedName += node.localName;
526
+ inheritedNS = ns;
527
+ /**
528
+ * 12.6.4. Append the value of qualified name to markup.
529
+ */
530
+ this.beginElement(qualifiedName);
531
+ this.openTagBegin(qualifiedName);
532
+ /**
533
+ * 12.6.5. Append the following to markup, in the order listed:
534
+ *
535
+ * _Note:_ The following serializes the new (or replacement) default
536
+ * namespace definition.
537
+ *
538
+ * 12.6.5.1. " " (U+0020 SPACE);
539
+ * 12.6.5.2. The string "xmlns";
540
+ * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
541
+ * 12.6.5.4. The result of serializing an attribute value given ns
542
+ * and the require well-formed flag as input;
543
+ * 12.6.5.5. """ (U+0022 QUOTATION MARK).
544
+ */
545
+ attributes.push([null, null, 'xmlns',
546
+ this._serializeAttributeValue(ns, requireWellFormed, noDoubleEncoding)]);
547
+ /**
548
+ * 12.7. Otherwise, the node has a local default namespace that matches
549
+ * ns. Append to qualified name the value of node's localName, let the
550
+ * value of inherited ns be ns, and append the value of qualified name
551
+ * to markup.
552
+ */
553
+ }
554
+ else {
555
+ qualifiedName += node.localName;
556
+ inheritedNS = ns;
557
+ this.beginElement(qualifiedName);
558
+ this.openTagBegin(qualifiedName);
559
+ }
560
+ }
561
+ /**
562
+ * 13. Append to markup the result of the XML serialization of node's
563
+ * attributes given map, prefix index, local prefixes map, ignore namespace
564
+ * definition attribute flag, and require well-formed flag.
565
+ */
566
+ attributes.push.apply(attributes, __spread(this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed, noDoubleEncoding)));
567
+ this.attributes(attributes);
568
+ /**
569
+ * 14. If ns is the HTML namespace, and the node's list of children is
570
+ * empty, and the node's localName matches any one of the following void
571
+ * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
572
+ * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
573
+ * "param", "source", "track", "wbr"; then append the following to markup,
574
+ * in the order listed:
575
+ * 14.1. " " (U+0020 SPACE);
576
+ * 14.2. "/" (U+002F SOLIDUS).
577
+ * and set the skip end tag flag to true.
578
+ * 15. If ns is not the HTML namespace, and the node's list of children is
579
+ * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
580
+ * tag flag to true.
581
+ * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
582
+ */
583
+ var isHTML = (ns === infra_1.namespace.HTML);
584
+ if (isHTML && node.childNodes.length === 0 &&
585
+ BaseWriter._VoidElementNames.has(node.localName)) {
586
+ this.openTagEnd(qualifiedName, true, true);
587
+ this.endElement(qualifiedName);
588
+ skipEndTag = true;
589
+ }
590
+ else if (!isHTML && node.childNodes.length === 0) {
591
+ this.openTagEnd(qualifiedName, true, false);
592
+ this.endElement(qualifiedName);
593
+ skipEndTag = true;
594
+ }
595
+ else {
596
+ this.openTagEnd(qualifiedName, false, false);
597
+ }
598
+ /**
599
+ * 17. If the value of skip end tag is true, then return the value of markup
600
+ * and skip the remaining steps. The node is a leaf-node.
601
+ */
602
+ if (skipEndTag)
603
+ return;
604
+ /**
605
+ * 18. If ns is the HTML namespace, and the node's localName matches the
606
+ * string "template", then this is a template element. Append to markup the
607
+ * result of XML serializing a DocumentFragment node given the template
608
+ * element's template contents (a DocumentFragment), providing inherited
609
+ * ns, map, prefix index, and the require well-formed flag.
610
+ *
611
+ * _Note:_ This allows template content to round-trip, given the rules for
612
+ * parsing XHTML documents.
613
+ *
614
+ * 19. Otherwise, append to markup the result of running the XML
615
+ * serialization algorithm on each of node's children, in tree order,
616
+ * providing inherited ns, map, prefix index, and the require well-formed
617
+ * flag.
618
+ */
619
+ if (isHTML && node.localName === "template") {
620
+ // TODO: serialize template contents
621
+ }
622
+ else {
623
+ try {
624
+ for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
625
+ var childNode = _c.value;
626
+ this.level++;
627
+ this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed, noDoubleEncoding);
628
+ this.level--;
629
+ }
630
+ }
631
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
632
+ finally {
633
+ try {
634
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
635
+ }
636
+ finally { if (e_2) throw e_2.error; }
637
+ }
638
+ }
639
+ /**
640
+ * 20. Append the following to markup, in the order listed:
641
+ * 20.1. "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
642
+ * 20.2. The value of qualified name;
643
+ * 20.3. ">" (U+003E GREATER-THAN SIGN).
644
+ * 21. Return the value of markup.
645
+ */
646
+ this.closeTag(qualifiedName);
647
+ this.endElement(qualifiedName);
648
+ };
649
+ /**
650
+ * Produces an XML serialization of an element node.
651
+ *
652
+ * @param node - node to serialize
653
+ * @param requireWellFormed - whether to check conformance
654
+ */
655
+ BaseWriter.prototype._serializeElement = function (node, requireWellFormed, noDoubleEncoding) {
656
+ var e_3, _a;
657
+ /**
658
+ * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node
659
+ *
660
+ * 1. If the require well-formed flag is set (its value is true), and this
661
+ * node's localName attribute contains the character ":" (U+003A COLON) or
662
+ * does not match the XML Name production, then throw an exception; the
663
+ * serialization of this node would not be a well-formed element.
664
+ */
665
+ if (requireWellFormed && (node.localName.indexOf(":") !== -1 ||
666
+ !algorithm_1.xml_isName(node.localName))) {
667
+ throw new Error("Node local name contains invalid characters (well-formed required).");
668
+ }
669
+ /**
670
+ * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN).
671
+ * 3. Let qualified name be an empty string.
672
+ * 4. Let skip end tag be a boolean flag with value false.
673
+ * 5. Let ignore namespace definition attribute be a boolean flag with value
674
+ * false.
675
+ * 6. Given prefix map, copy a namespace prefix map and let map be the
676
+ * result.
677
+ * 7. Let local prefixes map be an empty map. The map has unique Node prefix
678
+ * strings as its keys, with corresponding namespaceURI Node values as the
679
+ * map's key values (in this map, the null namespace is represented by the
680
+ * empty string).
681
+ *
682
+ * _Note:_ This map is local to each element. It is used to ensure there
683
+ * are no conflicting prefixes should a new namespace prefix attribute need
684
+ * to be generated. It is also used to enable skipping of duplicate prefix
685
+ * definitions when writing an element's attributes: the map allows the
686
+ * algorithm to distinguish between a prefix in the namespace prefix map
687
+ * that might be locally-defined (to the current Element) and one that is
688
+ * not.
689
+ * 8. Let local default namespace be the result of recording the namespace
690
+ * information for node given map and local prefixes map.
691
+ *
692
+ * _Note:_ The above step will update map with any found namespace prefix
693
+ * definitions, add the found prefix definitions to the local prefixes map
694
+ * and return a local default namespace value defined by a default namespace
695
+ * attribute if one exists. Otherwise it returns null.
696
+ * 9. Let inherited ns be a copy of namespace.
697
+ * 10. Let ns be the value of node's namespaceURI attribute.
698
+ */
699
+ var skipEndTag = false;
700
+ /** 11. If inherited ns is equal to ns, then: */
701
+ /**
702
+ * 11.1. If local default namespace is not null, then set ignore
703
+ * namespace definition attribute to true.
704
+ */
705
+ /**
706
+ * 11.2. If ns is the XML namespace, then append to qualified name the
707
+ * concatenation of the string "xml:" and the value of node's localName.
708
+ * 11.3. Otherwise, append to qualified name the value of node's
709
+ * localName. The node's prefix if it exists, is dropped.
710
+ */
711
+ var qualifiedName = node.localName;
712
+ /** 11.4. Append the value of qualified name to markup. */
713
+ this.beginElement(qualifiedName);
714
+ this.openTagBegin(qualifiedName);
715
+ /**
716
+ * 13. Append to markup the result of the XML serialization of node's
717
+ * attributes given map, prefix index, local prefixes map, ignore namespace
718
+ * definition attribute flag, and require well-formed flag.
719
+ */
720
+ var attributes = this._serializeAttributes(node, requireWellFormed, noDoubleEncoding);
721
+ this.attributes(attributes);
722
+ /**
723
+ * 14. If ns is the HTML namespace, and the node's list of children is
724
+ * empty, and the node's localName matches any one of the following void
725
+ * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed",
726
+ * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
727
+ * "param", "source", "track", "wbr"; then append the following to markup,
728
+ * in the order listed:
729
+ * 14.1. " " (U+0020 SPACE);
730
+ * 14.2. "/" (U+002F SOLIDUS).
731
+ * and set the skip end tag flag to true.
732
+ * 15. If ns is not the HTML namespace, and the node's list of children is
733
+ * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end
734
+ * tag flag to true.
735
+ * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup.
736
+ */
737
+ if (!node.hasChildNodes()) {
738
+ this.openTagEnd(qualifiedName, true, false);
739
+ this.endElement(qualifiedName);
740
+ skipEndTag = true;
741
+ }
742
+ else {
743
+ this.openTagEnd(qualifiedName, false, false);
744
+ }
745
+ /**
746
+ * 17. If the value of skip end tag is true, then return the value of markup
747
+ * and skip the remaining steps. The node is a leaf-node.
748
+ */
749
+ if (skipEndTag)
750
+ return;
751
+ try {
752
+ /**
753
+ * 18. If ns is the HTML namespace, and the node's localName matches the
754
+ * string "template", then this is a template element. Append to markup the
755
+ * result of XML serializing a DocumentFragment node given the template
756
+ * element's template contents (a DocumentFragment), providing inherited
757
+ * ns, map, prefix index, and the require well-formed flag.
758
+ *
759
+ * _Note:_ This allows template content to round-trip, given the rules for
760
+ * parsing XHTML documents.
761
+ *
762
+ * 19. Otherwise, append to markup the result of running the XML
763
+ * serialization algorithm on each of node's children, in tree order,
764
+ * providing inherited ns, map, prefix index, and the require well-formed
765
+ * flag.
766
+ */
767
+ for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
768
+ var childNode = _c.value;
769
+ this.level++;
770
+ this._serializeNode(childNode, requireWellFormed, noDoubleEncoding);
771
+ this.level--;
772
+ }
773
+ }
774
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
775
+ finally {
776
+ try {
777
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
778
+ }
779
+ finally { if (e_3) throw e_3.error; }
780
+ }
781
+ /**
782
+ * 20. Append the following to markup, in the order listed:
783
+ * 20.1. "</" (U+003C LESS-THAN SIGN, U+002F SOLIDUS);
784
+ * 20.2. The value of qualified name;
785
+ * 20.3. ">" (U+003E GREATER-THAN SIGN).
786
+ * 21. Return the value of markup.
787
+ */
788
+ this.closeTag(qualifiedName);
789
+ this.endElement(qualifiedName);
790
+ };
791
+ /**
792
+ * Produces an XML serialization of a document node.
793
+ *
794
+ * @param node - node to serialize
795
+ * @param namespace - context namespace
796
+ * @param prefixMap - namespace prefix map
797
+ * @param prefixIndex - generated namespace prefix index
798
+ * @param requireWellFormed - whether to check conformance
799
+ */
800
+ BaseWriter.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) {
801
+ var e_4, _a;
802
+ /**
803
+ * If the require well-formed flag is set (its value is true), and this node
804
+ * has no documentElement (the documentElement attribute's value is null),
805
+ * then throw an exception; the serialization of this node would not be a
806
+ * well-formed document.
807
+ */
808
+ if (requireWellFormed && node.documentElement === null) {
809
+ throw new Error("Missing document element (well-formed required).");
810
+ }
811
+ try {
812
+ /**
813
+ * Otherwise, run the following steps:
814
+ * 1. Let serialized document be an empty string.
815
+ * 2. For each child child of node, in tree order, run the XML
816
+ * serialization algorithm on the child passing along the provided
817
+ * arguments, and append the result to serialized document.
818
+ *
819
+ * _Note:_ This will serialize any number of ProcessingInstruction and
820
+ * Comment nodes both before and after the Document's documentElement node,
821
+ * including at most one DocumentType node. (Text nodes are not allowed as
822
+ * children of the Document.)
823
+ *
824
+ * 3. Return the value of serialized document.
825
+ */
826
+ for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
827
+ var childNode = _c.value;
828
+ this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding);
829
+ }
830
+ }
831
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
832
+ finally {
833
+ try {
834
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
835
+ }
836
+ finally { if (e_4) throw e_4.error; }
837
+ }
838
+ };
839
+ /**
840
+ * Produces an XML serialization of a document node.
841
+ *
842
+ * @param node - node to serialize
843
+ * @param requireWellFormed - whether to check conformance
844
+ */
845
+ BaseWriter.prototype._serializeDocument = function (node, requireWellFormed, noDoubleEncoding) {
846
+ var e_5, _a;
847
+ /**
848
+ * If the require well-formed flag is set (its value is true), and this node
849
+ * has no documentElement (the documentElement attribute's value is null),
850
+ * then throw an exception; the serialization of this node would not be a
851
+ * well-formed document.
852
+ */
853
+ if (requireWellFormed && node.documentElement === null) {
854
+ throw new Error("Missing document element (well-formed required).");
855
+ }
856
+ try {
857
+ /**
858
+ * Otherwise, run the following steps:
859
+ * 1. Let serialized document be an empty string.
860
+ * 2. For each child child of node, in tree order, run the XML
861
+ * serialization algorithm on the child passing along the provided
862
+ * arguments, and append the result to serialized document.
863
+ *
864
+ * _Note:_ This will serialize any number of ProcessingInstruction and
865
+ * Comment nodes both before and after the Document's documentElement node,
866
+ * including at most one DocumentType node. (Text nodes are not allowed as
867
+ * children of the Document.)
868
+ *
869
+ * 3. Return the value of serialized document.
870
+ */
871
+ for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
872
+ var childNode = _c.value;
873
+ this._serializeNode(childNode, requireWellFormed, noDoubleEncoding);
874
+ }
875
+ }
876
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
877
+ finally {
878
+ try {
879
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
880
+ }
881
+ finally { if (e_5) throw e_5.error; }
882
+ }
883
+ };
884
+ /**
885
+ * Produces an XML serialization of a comment node.
886
+ *
887
+ * @param node - node to serialize
888
+ * @param requireWellFormed - whether to check conformance
889
+ */
890
+ BaseWriter.prototype._serializeComment = function (node, requireWellFormed, noDoubleEncoding) {
891
+ /**
892
+ * If the require well-formed flag is set (its value is true), and node's
893
+ * data contains characters that are not matched by the XML Char production
894
+ * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that
895
+ * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception;
896
+ * the serialization of this node's data would not be well-formed.
897
+ */
898
+ if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
899
+ node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) {
900
+ throw new Error("Comment data contains invalid characters (well-formed required).");
901
+ }
902
+ /**
903
+ * Otherwise, return the concatenation of "<!--", node's data, and "-->".
904
+ */
905
+ this.comment(node.data);
906
+ };
907
+ /**
908
+ * Produces an XML serialization of a text node.
909
+ *
910
+ * @param node - node to serialize
911
+ * @param requireWellFormed - whether to check conformance
912
+ * @param level - current depth of the XML tree
913
+ */
914
+ BaseWriter.prototype._serializeText = function (node, requireWellFormed, noDoubleEncoding) {
915
+ /**
916
+ * 1. If the require well-formed flag is set (its value is true), and
917
+ * node's data contains characters that are not matched by the XML Char
918
+ * production, then throw an exception; the serialization of this node's
919
+ * data would not be well-formed.
920
+ */
921
+ if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) {
922
+ throw new Error("Text data contains invalid characters (well-formed required).");
923
+ }
924
+ /**
925
+ * 2. Let markup be the value of node's data.
926
+ * 3. Replace any occurrences of "&" in markup by "&amp;".
927
+ * 4. Replace any occurrences of "<" in markup by "&lt;".
928
+ * 5. Replace any occurrences of ">" in markup by "&gt;".
929
+ * 6. Return the value of markup.
930
+ */
931
+ var markup = "";
932
+ if (noDoubleEncoding) {
933
+ markup = node.data.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&amp;')
934
+ .replace(/</g, '&lt;')
935
+ .replace(/>/g, '&gt;');
936
+ }
937
+ else {
938
+ for (var i = 0; i < node.data.length; i++) {
939
+ var c = node.data[i];
940
+ if (c === "&")
941
+ markup += "&amp;";
942
+ else if (c === "<")
943
+ markup += "&lt;";
944
+ else if (c === ">")
945
+ markup += "&gt;";
946
+ else
947
+ markup += c;
948
+ }
949
+ }
950
+ this.text(markup);
951
+ };
952
+ /**
953
+ * Produces an XML serialization of a document fragment node.
954
+ *
955
+ * @param node - node to serialize
956
+ * @param namespace - context namespace
957
+ * @param prefixMap - namespace prefix map
958
+ * @param prefixIndex - generated namespace prefix index
959
+ * @param requireWellFormed - whether to check conformance
960
+ */
961
+ BaseWriter.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) {
962
+ var e_6, _a;
963
+ try {
964
+ /**
965
+ * 1. Let markup the empty string.
966
+ * 2. For each child child of node, in tree order, run the XML serialization
967
+ * algorithm on the child given namespace, prefix map, a reference to prefix
968
+ * index, and flag require well-formed. Concatenate the result to markup.
969
+ * 3. Return the value of markup.
970
+ */
971
+ for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
972
+ var childNode = _c.value;
973
+ this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding);
974
+ }
975
+ }
976
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
977
+ finally {
978
+ try {
979
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
980
+ }
981
+ finally { if (e_6) throw e_6.error; }
982
+ }
983
+ };
984
+ /**
985
+ * Produces an XML serialization of a document fragment node.
986
+ *
987
+ * @param node - node to serialize
988
+ * @param requireWellFormed - whether to check conformance
989
+ */
990
+ BaseWriter.prototype._serializeDocumentFragment = function (node, requireWellFormed, noDoubleEncoding) {
991
+ var e_7, _a;
992
+ try {
993
+ /**
994
+ * 1. Let markup the empty string.
995
+ * 2. For each child child of node, in tree order, run the XML serialization
996
+ * algorithm on the child given namespace, prefix map, a reference to prefix
997
+ * index, and flag require well-formed. Concatenate the result to markup.
998
+ * 3. Return the value of markup.
999
+ */
1000
+ for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) {
1001
+ var childNode = _c.value;
1002
+ this._serializeNode(childNode, requireWellFormed, noDoubleEncoding);
1003
+ }
1004
+ }
1005
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
1006
+ finally {
1007
+ try {
1008
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1009
+ }
1010
+ finally { if (e_7) throw e_7.error; }
1011
+ }
1012
+ };
1013
+ /**
1014
+ * Produces an XML serialization of a document type node.
1015
+ *
1016
+ * @param node - node to serialize
1017
+ * @param requireWellFormed - whether to check conformance
1018
+ */
1019
+ BaseWriter.prototype._serializeDocumentType = function (node, requireWellFormed, noDoubleEncoding) {
1020
+ /**
1021
+ * 1. If the require well-formed flag is true and the node's publicId
1022
+ * attribute contains characters that are not matched by the XML PubidChar
1023
+ * production, then throw an exception; the serialization of this node
1024
+ * would not be a well-formed document type declaration.
1025
+ */
1026
+ if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) {
1027
+ throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");
1028
+ }
1029
+ /**
1030
+ * 2. If the require well-formed flag is true and the node's systemId
1031
+ * attribute contains characters that are not matched by the XML Char
1032
+ * production or that contains both a """ (U+0022 QUOTATION MARK) and a
1033
+ * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization
1034
+ * of this node would not be a well-formed document type declaration.
1035
+ */
1036
+ if (requireWellFormed &&
1037
+ (!algorithm_1.xml_isLegalChar(node.systemId) ||
1038
+ (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) {
1039
+ throw new Error("DocType system identifier contains invalid characters (well-formed required).");
1040
+ }
1041
+ /**
1042
+ * 3. Let markup be an empty string.
1043
+ * 4. Append the string "<!DOCTYPE" to markup.
1044
+ * 5. Append " " (U+0020 SPACE) to markup.
1045
+ * 6. Append the value of the node's name attribute to markup. For a node
1046
+ * belonging to an HTML document, the value will be all lowercase.
1047
+ * 7. If the node's publicId is not the empty string then append the
1048
+ * following, in the order listed, to markup:
1049
+ * 7.1. " " (U+0020 SPACE);
1050
+ * 7.2. The string "PUBLIC";
1051
+ * 7.3. " " (U+0020 SPACE);
1052
+ * 7.4. """ (U+0022 QUOTATION MARK);
1053
+ * 7.5. The value of the node's publicId attribute;
1054
+ * 7.6. """ (U+0022 QUOTATION MARK).
1055
+ * 8. If the node's systemId is not the empty string and the node's publicId
1056
+ * is set to the empty string, then append the following, in the order
1057
+ * listed, to markup:
1058
+ * 8.1. " " (U+0020 SPACE);
1059
+ * 8.2. The string "SYSTEM".
1060
+ * 9. If the node's systemId is not the empty string then append the
1061
+ * following, in the order listed, to markup:
1062
+ * 9.2. " " (U+0020 SPACE);
1063
+ * 9.3. """ (U+0022 QUOTATION MARK);
1064
+ * 9.3. The value of the node's systemId attribute;
1065
+ * 9.4. """ (U+0022 QUOTATION MARK).
1066
+ * 10. Append ">" (U+003E GREATER-THAN SIGN) to markup.
1067
+ * 11. Return the value of markup.
1068
+ */
1069
+ this.docType(node.name, node.publicId, node.systemId);
1070
+ };
1071
+ /**
1072
+ * Produces an XML serialization of a processing instruction node.
1073
+ *
1074
+ * @param node - node to serialize
1075
+ * @param requireWellFormed - whether to check conformance
1076
+ */
1077
+ BaseWriter.prototype._serializeProcessingInstruction = function (node, requireWellFormed, noDoubleEncoding) {
1078
+ /**
1079
+ * 1. If the require well-formed flag is set (its value is true), and node's
1080
+ * target contains a ":" (U+003A COLON) character or is an ASCII
1081
+ * case-insensitive match for the string "xml", then throw an exception;
1082
+ * the serialization of this node's target would not be well-formed.
1083
+ */
1084
+ if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) {
1085
+ throw new Error("Processing instruction target contains invalid characters (well-formed required).");
1086
+ }
1087
+ /**
1088
+ * 2. If the require well-formed flag is set (its value is true), and node's
1089
+ * data contains characters that are not matched by the XML Char production
1090
+ * or contains the string "?>" (U+003F QUESTION MARK,
1091
+ * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of
1092
+ * this node's data would not be well-formed.
1093
+ */
1094
+ if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) ||
1095
+ node.data.indexOf("?>") !== -1)) {
1096
+ throw new Error("Processing instruction data contains invalid characters (well-formed required).");
1097
+ }
1098
+ /**
1099
+ * 3. Let markup be the concatenation of the following, in the order listed:
1100
+ * 3.1. "<?" (U+003C LESS-THAN SIGN, U+003F QUESTION MARK);
1101
+ * 3.2. The value of node's target;
1102
+ * 3.3. " " (U+0020 SPACE);
1103
+ * 3.4. The value of node's data;
1104
+ * 3.5. "?>" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN).
1105
+ * 4. Return the value of markup.
1106
+ */
1107
+ this.instruction(node.target, node.data);
1108
+ };
1109
+ /**
1110
+ * Produces an XML serialization of a CDATA node.
1111
+ *
1112
+ * @param node - node to serialize
1113
+ * @param requireWellFormed - whether to check conformance
1114
+ */
1115
+ BaseWriter.prototype._serializeCData = function (node, requireWellFormed, noDoubleEncoding) {
1116
+ if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) {
1117
+ throw new Error("CDATA contains invalid characters (well-formed required).");
1118
+ }
1119
+ this.cdata(node.data);
1120
+ };
1121
+ /**
1122
+ * Produces an XML serialization of the attributes of an element node.
1123
+ *
1124
+ * @param node - node to serialize
1125
+ * @param map - namespace prefix map
1126
+ * @param prefixIndex - generated namespace prefix index
1127
+ * @param localPrefixesMap - local prefixes map
1128
+ * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace
1129
+ * attributes
1130
+ * @param requireWellFormed - whether to check conformance
1131
+ */
1132
+ BaseWriter.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed, noDoubleEncoding) {
1133
+ var e_8, _a;
1134
+ /**
1135
+ * 1. Let result be the empty string.
1136
+ * 2. Let localname set be a new empty namespace localname set. This
1137
+ * localname set will contain tuples of unique attribute namespaceURI and
1138
+ * localName pairs, and is populated as each attr is processed. This set is
1139
+ * used to [optionally] enforce the well-formed constraint that an element
1140
+ * cannot have two attributes with the same namespaceURI and localName.
1141
+ * This can occur when two otherwise identical attributes on the same
1142
+ * element differ only by their prefix values.
1143
+ */
1144
+ var result = [];
1145
+ var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined;
1146
+ try {
1147
+ /**
1148
+ * 3. Loop: For each attribute attr in element's attributes, in the order
1149
+ * they are specified in the element's attribute list:
1150
+ */
1151
+ for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1152
+ var attr = _c.value;
1153
+ // Optimize common case
1154
+ if (!requireWellFormed && !ignoreNamespaceDefinitionAttribute && attr.namespaceURI === null) {
1155
+ result.push([null, null, attr.localName,
1156
+ this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]);
1157
+ continue;
1158
+ }
1159
+ /**
1160
+ * 3.1. If the require well-formed flag is set (its value is true), and the
1161
+ * localname set contains a tuple whose values match those of a new tuple
1162
+ * consisting of attr's namespaceURI attribute and localName attribute,
1163
+ * then throw an exception; the serialization of this attr would fail to
1164
+ * produce a well-formed element serialization.
1165
+ */
1166
+ if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) {
1167
+ throw new Error("Element contains duplicate attributes (well-formed required).");
1168
+ }
1169
+ /**
1170
+ * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
1171
+ * localName attribute, and add it to the localname set.
1172
+ * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
1173
+ * 3.4. Let candidate prefix be null.
1174
+ */
1175
+ if (requireWellFormed && localNameSet)
1176
+ localNameSet.set(attr.namespaceURI, attr.localName);
1177
+ var attributeNamespace = attr.namespaceURI;
1178
+ var candidatePrefix = null;
1179
+ /** 3.5. If attribute namespace is not null, then run these sub-steps: */
1180
+ if (attributeNamespace !== null) {
1181
+ /**
1182
+ * 3.5.1. Let candidate prefix be the result of retrieving a preferred
1183
+ * prefix string from map given namespace attribute namespace with
1184
+ * preferred prefix being attr's prefix value.
1185
+ */
1186
+ candidatePrefix = map.get(attr.prefix, attributeNamespace);
1187
+ /**
1188
+ * 3.5.2. If the value of attribute namespace is the XMLNS namespace,
1189
+ * then run these steps:
1190
+ */
1191
+ if (attributeNamespace === infra_1.namespace.XMLNS) {
1192
+ /**
1193
+ * 3.5.2.1. If any of the following are true, then stop running these
1194
+ * steps and goto Loop to visit the next attribute:
1195
+ * - the attr's value is the XML namespace;
1196
+ * _Note:_ The XML namespace cannot be redeclared and survive
1197
+ * round-tripping (unless it defines the prefix "xml"). To avoid this
1198
+ * problem, this algorithm always prefixes elements in the XML
1199
+ * namespace with "xml" and drops any related definitions as seen
1200
+ * in the above condition.
1201
+ * - the attr's prefix is null and the ignore namespace definition
1202
+ * attribute flag is true (the Element's default namespace attribute
1203
+ * should be skipped);
1204
+ * - the attr's prefix is not null and either
1205
+ * * the attr's localName is not a key contained in the local
1206
+ * prefixes map, or
1207
+ * * the attr's localName is present in the local prefixes map but
1208
+ * the value of the key does not match attr's value
1209
+ * and furthermore that the attr's localName (as the prefix to find)
1210
+ * is found in the namespace prefix map given the namespace consisting
1211
+ * of the attr's value (the current namespace prefix definition was
1212
+ * exactly defined previously--on an ancestor element not the current
1213
+ * element whose attributes are being processed).
1214
+ */
1215
+ if (attr.value === infra_1.namespace.XML ||
1216
+ (attr.prefix === null && ignoreNamespaceDefinitionAttribute) ||
1217
+ (attr.prefix !== null && (!(attr.localName in localPrefixesMap) ||
1218
+ localPrefixesMap[attr.localName] !== attr.value) &&
1219
+ map.has(attr.localName, attr.value)))
1220
+ continue;
1221
+ /**
1222
+ * 3.5.2.2. If the require well-formed flag is set (its value is true),
1223
+ * and the value of attr's value attribute matches the XMLNS
1224
+ * namespace, then throw an exception; the serialization of this
1225
+ * attribute would produce invalid XML because the XMLNS namespace
1226
+ * is reserved and cannot be applied as an element's namespace via
1227
+ * XML parsing.
1228
+ *
1229
+ * _Note:_ DOM APIs do allow creation of elements in the XMLNS
1230
+ * namespace but with strict qualifications.
1231
+ */
1232
+ if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) {
1233
+ throw new Error("XMLNS namespace is reserved (well-formed required).");
1234
+ }
1235
+ /**
1236
+ * 3.5.2.3. If the require well-formed flag is set (its value is true),
1237
+ * and the value of attr's value attribute is the empty string, then
1238
+ * throw an exception; namespace prefix declarations cannot be used
1239
+ * to undeclare a namespace (use a default namespace declaration
1240
+ * instead).
1241
+ */
1242
+ if (requireWellFormed && attr.value === '') {
1243
+ throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");
1244
+ }
1245
+ /**
1246
+ * 3.5.2.4. the attr's prefix matches the string "xmlns", then let
1247
+ * candidate prefix be the string "xmlns".
1248
+ */
1249
+ if (attr.prefix === 'xmlns')
1250
+ candidatePrefix = 'xmlns';
1251
+ /**
1252
+ * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace.
1253
+ * Run these steps:
1254
+ *
1255
+ * _Note:_ The (candidatePrefix === null) check is not in the spec.
1256
+ * We deviate from the spec here. Otherwise a prefix is generated for
1257
+ * all attributes with namespaces.
1258
+ */
1259
+ }
1260
+ else if (candidatePrefix === null) {
1261
+ if (attr.prefix !== null &&
1262
+ (!map.hasPrefix(attr.prefix) ||
1263
+ map.has(attr.prefix, attributeNamespace))) {
1264
+ /**
1265
+ * Check if we can use the attribute's own prefix.
1266
+ * We deviate from the spec here.
1267
+ * TODO: This is not an efficient way of searching for prefixes.
1268
+ * Follow developments to the spec.
1269
+ */
1270
+ candidatePrefix = attr.prefix;
1271
+ }
1272
+ else {
1273
+ /**
1274
+ * 3.5.3.1. Let candidate prefix be the result of generating a prefix
1275
+ * providing map, attribute namespace, and prefix index as input.
1276
+ */
1277
+ candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex);
1278
+ }
1279
+ /**
1280
+ * 3.5.3.2. Append the following to result, in the order listed:
1281
+ * 3.5.3.2.1. " " (U+0020 SPACE);
1282
+ * 3.5.3.2.2. The string "xmlns:";
1283
+ * 3.5.3.2.3. The value of candidate prefix;
1284
+ * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1285
+ * 3.5.3.2.5. The result of serializing an attribute value given
1286
+ * attribute namespace and the require well-formed flag as input;
1287
+ * 3.5.3.2.6. """ (U+0022 QUOTATION MARK).
1288
+ */
1289
+ result.push([null, "xmlns", candidatePrefix,
1290
+ this._serializeAttributeValue(attributeNamespace, requireWellFormed, noDoubleEncoding)]);
1291
+ }
1292
+ }
1293
+ /**
1294
+ * 3.6. Append a " " (U+0020 SPACE) to result.
1295
+ * 3.7. If candidate prefix is not null, then append to result the
1296
+ * concatenation of candidate prefix with ":" (U+003A COLON).
1297
+ */
1298
+ var attrName = '';
1299
+ if (candidatePrefix !== null) {
1300
+ attrName = candidatePrefix;
1301
+ }
1302
+ /**
1303
+ * 3.8. If the require well-formed flag is set (its value is true), and
1304
+ * this attr's localName attribute contains the character
1305
+ * ":" (U+003A COLON) or does not match the XML Name production or
1306
+ * equals "xmlns" and attribute namespace is null, then throw an
1307
+ * exception; the serialization of this attr would not be a
1308
+ * well-formed attribute.
1309
+ */
1310
+ if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
1311
+ !algorithm_1.xml_isName(attr.localName) ||
1312
+ (attr.localName === "xmlns" && attributeNamespace === null))) {
1313
+ throw new Error("Attribute local name contains invalid characters (well-formed required).");
1314
+ }
1315
+ /**
1316
+ * 3.9. Append the following strings to result, in the order listed:
1317
+ * 3.9.1. The value of attr's localName;
1318
+ * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1319
+ * 3.9.3. The result of serializing an attribute value given attr's value
1320
+ * attribute and the require well-formed flag as input;
1321
+ * 3.9.4. """ (U+0022 QUOTATION MARK).
1322
+ */
1323
+ result.push([attributeNamespace, candidatePrefix, attr.localName,
1324
+ this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]);
1325
+ }
1326
+ }
1327
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
1328
+ finally {
1329
+ try {
1330
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1331
+ }
1332
+ finally { if (e_8) throw e_8.error; }
1333
+ }
1334
+ /**
1335
+ * 4. Return the value of result.
1336
+ */
1337
+ return result;
1338
+ };
1339
+ /**
1340
+ * Produces an XML serialization of the attributes of an element node.
1341
+ *
1342
+ * @param node - node to serialize
1343
+ * @param requireWellFormed - whether to check conformance
1344
+ */
1345
+ BaseWriter.prototype._serializeAttributes = function (node, requireWellFormed, noDoubleEncoding) {
1346
+ var e_9, _a;
1347
+ /**
1348
+ * 1. Let result be the empty string.
1349
+ * 2. Let localname set be a new empty namespace localname set. This
1350
+ * localname set will contain tuples of unique attribute namespaceURI and
1351
+ * localName pairs, and is populated as each attr is processed. This set is
1352
+ * used to [optionally] enforce the well-formed constraint that an element
1353
+ * cannot have two attributes with the same namespaceURI and localName.
1354
+ * This can occur when two otherwise identical attributes on the same
1355
+ * element differ only by their prefix values.
1356
+ */
1357
+ var result = [];
1358
+ var localNameSet = requireWellFormed ? {} : undefined;
1359
+ try {
1360
+ /**
1361
+ * 3. Loop: For each attribute attr in element's attributes, in the order
1362
+ * they are specified in the element's attribute list:
1363
+ */
1364
+ for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1365
+ var attr = _c.value;
1366
+ // Optimize common case
1367
+ if (!requireWellFormed) {
1368
+ result.push([null, null, attr.localName,
1369
+ this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]);
1370
+ continue;
1371
+ }
1372
+ /**
1373
+ * 3.1. If the require well-formed flag is set (its value is true), and the
1374
+ * localname set contains a tuple whose values match those of a new tuple
1375
+ * consisting of attr's namespaceURI attribute and localName attribute,
1376
+ * then throw an exception; the serialization of this attr would fail to
1377
+ * produce a well-formed element serialization.
1378
+ */
1379
+ if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) {
1380
+ throw new Error("Element contains duplicate attributes (well-formed required).");
1381
+ }
1382
+ /**
1383
+ * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and
1384
+ * localName attribute, and add it to the localname set.
1385
+ * 3.3. Let attribute namespace be the value of attr's namespaceURI value.
1386
+ * 3.4. Let candidate prefix be null.
1387
+ */
1388
+ /* istanbul ignore else */
1389
+ if (requireWellFormed && localNameSet)
1390
+ localNameSet[attr.localName] = true;
1391
+ /** 3.5. If attribute namespace is not null, then run these sub-steps: */
1392
+ /**
1393
+ * 3.6. Append a " " (U+0020 SPACE) to result.
1394
+ * 3.7. If candidate prefix is not null, then append to result the
1395
+ * concatenation of candidate prefix with ":" (U+003A COLON).
1396
+ */
1397
+ /**
1398
+ * 3.8. If the require well-formed flag is set (its value is true), and
1399
+ * this attr's localName attribute contains the character
1400
+ * ":" (U+003A COLON) or does not match the XML Name production or
1401
+ * equals "xmlns" and attribute namespace is null, then throw an
1402
+ * exception; the serialization of this attr would not be a
1403
+ * well-formed attribute.
1404
+ */
1405
+ if (requireWellFormed && (attr.localName.indexOf(":") !== -1 ||
1406
+ !algorithm_1.xml_isName(attr.localName))) {
1407
+ throw new Error("Attribute local name contains invalid characters (well-formed required).");
1408
+ }
1409
+ /**
1410
+ * 3.9. Append the following strings to result, in the order listed:
1411
+ * 3.9.1. The value of attr's localName;
1412
+ * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
1413
+ * 3.9.3. The result of serializing an attribute value given attr's value
1414
+ * attribute and the require well-formed flag as input;
1415
+ * 3.9.4. """ (U+0022 QUOTATION MARK).
1416
+ */
1417
+ result.push([null, null, attr.localName,
1418
+ this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]);
1419
+ }
1420
+ }
1421
+ catch (e_9_1) { e_9 = { error: e_9_1 }; }
1422
+ finally {
1423
+ try {
1424
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1425
+ }
1426
+ finally { if (e_9) throw e_9.error; }
1427
+ }
1428
+ /**
1429
+ * 4. Return the value of result.
1430
+ */
1431
+ return result;
1432
+ };
1433
+ /**
1434
+ * Records namespace information for the given element and returns the
1435
+ * default namespace attribute value.
1436
+ *
1437
+ * @param node - element node to process
1438
+ * @param map - namespace prefix map
1439
+ * @param localPrefixesMap - local prefixes map
1440
+ */
1441
+ BaseWriter.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) {
1442
+ var e_10, _a;
1443
+ /**
1444
+ * 1. Let default namespace attr value be null.
1445
+ */
1446
+ var defaultNamespaceAttrValue = null;
1447
+ try {
1448
+ /**
1449
+ * 2. Main: For each attribute attr in element's attributes, in the order
1450
+ * they are specified in the element's attribute list:
1451
+ */
1452
+ for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
1453
+ var attr = _c.value;
1454
+ /**
1455
+ * _Note:_ The following conditional steps find namespace prefixes. Only
1456
+ * attributes in the XMLNS namespace are considered (e.g., attributes made
1457
+ * to look like namespace declarations via
1458
+ * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not
1459
+ * included).
1460
+ */
1461
+ /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */
1462
+ var attributeNamespace = attr.namespaceURI;
1463
+ /** 2.2. Let attribute prefix be the value of attr's prefix. */
1464
+ var attributePrefix = attr.prefix;
1465
+ /** 2.3. If the attribute namespace is the XMLNS namespace, then: */
1466
+ if (attributeNamespace === infra_1.namespace.XMLNS) {
1467
+ /**
1468
+ * 2.3.1. If attribute prefix is null, then attr is a default namespace
1469
+ * declaration. Set the default namespace attr value to attr's value and
1470
+ * stop running these steps, returning to Main to visit the next
1471
+ * attribute.
1472
+ */
1473
+ if (attributePrefix === null) {
1474
+ defaultNamespaceAttrValue = attr.value;
1475
+ continue;
1476
+ /**
1477
+ * 2.3.2. Otherwise, the attribute prefix is not null and attr is a
1478
+ * namespace prefix definition. Run the following steps:
1479
+ */
1480
+ }
1481
+ else {
1482
+ /** 2.3.2.1. Let prefix definition be the value of attr's localName. */
1483
+ var prefixDefinition = attr.localName;
1484
+ /** 2.3.2.2. Let namespace definition be the value of attr's value. */
1485
+ var namespaceDefinition = attr.value;
1486
+ /**
1487
+ * 2.3.2.3. If namespace definition is the XML namespace, then stop
1488
+ * running these steps, and return to Main to visit the next
1489
+ * attribute.
1490
+ *
1491
+ * _Note:_ XML namespace definitions in prefixes are completely
1492
+ * ignored (in order to avoid unnecessary work when there might be
1493
+ * prefix conflicts). XML namespaced elements are always handled
1494
+ * uniformly by prefixing (and overriding if necessary) the element's
1495
+ * localname with the reserved "xml" prefix.
1496
+ */
1497
+ if (namespaceDefinition === infra_1.namespace.XML) {
1498
+ continue;
1499
+ }
1500
+ /**
1501
+ * 2.3.2.4. If namespace definition is the empty string (the
1502
+ * declarative form of having no namespace), then let namespace
1503
+ * definition be null instead.
1504
+ */
1505
+ if (namespaceDefinition === '') {
1506
+ namespaceDefinition = null;
1507
+ }
1508
+ /**
1509
+ * 2.3.2.5. If prefix definition is found in map given the namespace
1510
+ * namespace definition, then stop running these steps, and return to
1511
+ * Main to visit the next attribute.
1512
+ *
1513
+ * _Note:_ This step avoids adding duplicate prefix definitions for
1514
+ * the same namespace in the map. This has the side-effect of avoiding
1515
+ * later serialization of duplicate namespace prefix declarations in
1516
+ * any descendant nodes.
1517
+ */
1518
+ if (map.has(prefixDefinition, namespaceDefinition)) {
1519
+ continue;
1520
+ }
1521
+ /**
1522
+ * 2.3.2.6. Add the prefix prefix definition to map given namespace
1523
+ * namespace definition.
1524
+ */
1525
+ map.set(prefixDefinition, namespaceDefinition);
1526
+ /**
1527
+ * 2.3.2.7. Add the value of prefix definition as a new key to the
1528
+ * local prefixes map, with the namespace definition as the key's
1529
+ * value replacing the value of null with the empty string if
1530
+ * applicable.
1531
+ */
1532
+ localPrefixesMap[prefixDefinition] = namespaceDefinition || '';
1533
+ }
1534
+ }
1535
+ }
1536
+ }
1537
+ catch (e_10_1) { e_10 = { error: e_10_1 }; }
1538
+ finally {
1539
+ try {
1540
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1541
+ }
1542
+ finally { if (e_10) throw e_10.error; }
1543
+ }
1544
+ /**
1545
+ * 3. Return the value of default namespace attr value.
1546
+ *
1547
+ * _Note:_ The empty string is a legitimate return value and is not
1548
+ * converted to null.
1549
+ */
1550
+ return defaultNamespaceAttrValue;
1551
+ };
1552
+ /**
1553
+ * Generates a new prefix for the given namespace.
1554
+ *
1555
+ * @param newNamespace - a namespace to generate prefix for
1556
+ * @param prefixMap - namespace prefix map
1557
+ * @param prefixIndex - generated namespace prefix index
1558
+ */
1559
+ BaseWriter.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) {
1560
+ /**
1561
+ * 1. Let generated prefix be the concatenation of the string "ns" and the
1562
+ * current numerical value of prefix index.
1563
+ * 2. Let the value of prefix index be incremented by one.
1564
+ * 3. Add to map the generated prefix given the new namespace namespace.
1565
+ * 4. Return the value of generated prefix.
1566
+ */
1567
+ var generatedPrefix = "ns" + prefixIndex.value.toString();
1568
+ prefixIndex.value++;
1569
+ prefixMap.set(generatedPrefix, newNamespace);
1570
+ return generatedPrefix;
1571
+ };
1572
+ /**
1573
+ * Produces an XML serialization of an attribute value.
1574
+ *
1575
+ * @param value - attribute value
1576
+ * @param requireWellFormed - whether to check conformance
1577
+ */
1578
+ BaseWriter.prototype._serializeAttributeValue = function (value, requireWellFormed, noDoubleEncoding) {
1579
+ /**
1580
+ * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value
1581
+ *
1582
+ * 1. If the require well-formed flag is set (its value is true), and
1583
+ * attribute value contains characters that are not matched by the XML Char
1584
+ * production, then throw an exception; the serialization of this attribute
1585
+ * value would fail to produce a well-formed element serialization.
1586
+ */
1587
+ if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) {
1588
+ throw new Error("Invalid characters in attribute value.");
1589
+ }
1590
+ /**
1591
+ * 2. If attribute value is null, then return the empty string.
1592
+ */
1593
+ if (value === null)
1594
+ return "";
1595
+ /**
1596
+ * 3. Otherwise, attribute value is a string. Return the value of attribute
1597
+ * value, first replacing any occurrences of the following:
1598
+ * - "&" with "&amp;"
1599
+ * - """ with "&quot;"
1600
+ * - "<" with "&lt;"
1601
+ * - ">" with "&gt;"
1602
+ * NOTE
1603
+ * This matches behavior present in browsers, and goes above and beyond the
1604
+ * grammar requirement in the XML specification's AttValue production by
1605
+ * also replacing ">" characters.
1606
+ */
1607
+ if (noDoubleEncoding) {
1608
+ return value.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&amp;')
1609
+ .replace(/</g, '&lt;')
1610
+ .replace(/>/g, '&gt;')
1611
+ .replace(/"/g, '&quot;');
1612
+ }
1613
+ else {
1614
+ var result = "";
1615
+ for (var i = 0; i < value.length; i++) {
1616
+ var c = value[i];
1617
+ if (c === "\"")
1618
+ result += "&quot;";
1619
+ else if (c === "&")
1620
+ result += "&amp;";
1621
+ else if (c === "<")
1622
+ result += "&lt;";
1623
+ else if (c === ">")
1624
+ result += "&gt;";
1625
+ else
1626
+ result += c;
1627
+ }
1628
+ return result;
1629
+ }
1630
+ };
1631
+ BaseWriter._VoidElementNames = new Set(['area', 'base', 'basefont',
1632
+ 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen',
1633
+ 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']);
1634
+ return BaseWriter;
1635
+ }());
1636
+ exports.BaseWriter = BaseWriter;
1637
+ //# sourceMappingURL=BaseWriter.js.map