fsevents 1.2.9 → 1.2.13

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 (525) hide show
  1. package/.travis.yml +6 -4
  2. package/binding.gyp +1 -9
  3. package/fsevents.js +1 -3
  4. package/install.js +13 -7
  5. package/package.json +5 -17
  6. package/node_modules/abbrev/LICENSE +0 -46
  7. package/node_modules/abbrev/README.md +0 -23
  8. package/node_modules/abbrev/abbrev.js +0 -61
  9. package/node_modules/abbrev/package.json +0 -59
  10. package/node_modules/ansi-regex/index.js +0 -4
  11. package/node_modules/ansi-regex/license +0 -21
  12. package/node_modules/ansi-regex/package.json +0 -111
  13. package/node_modules/ansi-regex/readme.md +0 -39
  14. package/node_modules/aproba/LICENSE +0 -14
  15. package/node_modules/aproba/README.md +0 -94
  16. package/node_modules/aproba/index.js +0 -105
  17. package/node_modules/aproba/package.json +0 -65
  18. package/node_modules/are-we-there-yet/CHANGES.md +0 -37
  19. package/node_modules/are-we-there-yet/LICENSE +0 -5
  20. package/node_modules/are-we-there-yet/README.md +0 -195
  21. package/node_modules/are-we-there-yet/index.js +0 -4
  22. package/node_modules/are-we-there-yet/package.json +0 -66
  23. package/node_modules/are-we-there-yet/tracker-base.js +0 -11
  24. package/node_modules/are-we-there-yet/tracker-group.js +0 -107
  25. package/node_modules/are-we-there-yet/tracker-stream.js +0 -36
  26. package/node_modules/are-we-there-yet/tracker.js +0 -30
  27. package/node_modules/balanced-match/.npmignore +0 -5
  28. package/node_modules/balanced-match/LICENSE.md +0 -21
  29. package/node_modules/balanced-match/README.md +0 -91
  30. package/node_modules/balanced-match/index.js +0 -59
  31. package/node_modules/balanced-match/package.json +0 -80
  32. package/node_modules/brace-expansion/LICENSE +0 -21
  33. package/node_modules/brace-expansion/README.md +0 -129
  34. package/node_modules/brace-expansion/index.js +0 -201
  35. package/node_modules/brace-expansion/package.json +0 -78
  36. package/node_modules/chownr/LICENSE +0 -15
  37. package/node_modules/chownr/README.md +0 -3
  38. package/node_modules/chownr/chownr.js +0 -88
  39. package/node_modules/chownr/package.json +0 -62
  40. package/node_modules/code-point-at/index.js +0 -32
  41. package/node_modules/code-point-at/license +0 -21
  42. package/node_modules/code-point-at/package.json +0 -73
  43. package/node_modules/code-point-at/readme.md +0 -32
  44. package/node_modules/concat-map/.travis.yml +0 -4
  45. package/node_modules/concat-map/LICENSE +0 -18
  46. package/node_modules/concat-map/README.markdown +0 -62
  47. package/node_modules/concat-map/example/map.js +0 -6
  48. package/node_modules/concat-map/index.js +0 -13
  49. package/node_modules/concat-map/package.json +0 -91
  50. package/node_modules/concat-map/test/map.js +0 -39
  51. package/node_modules/console-control-strings/LICENSE +0 -13
  52. package/node_modules/console-control-strings/README.md +0 -145
  53. package/node_modules/console-control-strings/README.md~ +0 -140
  54. package/node_modules/console-control-strings/index.js +0 -125
  55. package/node_modules/console-control-strings/package.json +0 -64
  56. package/node_modules/core-util-is/LICENSE +0 -19
  57. package/node_modules/core-util-is/README.md +0 -3
  58. package/node_modules/core-util-is/float.patch +0 -604
  59. package/node_modules/core-util-is/lib/util.js +0 -107
  60. package/node_modules/core-util-is/package.json +0 -65
  61. package/node_modules/core-util-is/test.js +0 -68
  62. package/node_modules/debug/CHANGELOG.md +0 -395
  63. package/node_modules/debug/LICENSE +0 -19
  64. package/node_modules/debug/README.md +0 -455
  65. package/node_modules/debug/dist/debug.js +0 -912
  66. package/node_modules/debug/package.json +0 -105
  67. package/node_modules/debug/src/browser.js +0 -264
  68. package/node_modules/debug/src/common.js +0 -266
  69. package/node_modules/debug/src/index.js +0 -10
  70. package/node_modules/debug/src/node.js +0 -257
  71. package/node_modules/deep-extend/CHANGELOG.md +0 -46
  72. package/node_modules/deep-extend/LICENSE +0 -20
  73. package/node_modules/deep-extend/README.md +0 -91
  74. package/node_modules/deep-extend/index.js +0 -1
  75. package/node_modules/deep-extend/lib/deep-extend.js +0 -150
  76. package/node_modules/deep-extend/package.json +0 -95
  77. package/node_modules/delegates/.npmignore +0 -1
  78. package/node_modules/delegates/History.md +0 -22
  79. package/node_modules/delegates/License +0 -20
  80. package/node_modules/delegates/Makefile +0 -8
  81. package/node_modules/delegates/Readme.md +0 -94
  82. package/node_modules/delegates/index.js +0 -121
  83. package/node_modules/delegates/package.json +0 -51
  84. package/node_modules/delegates/test/index.js +0 -94
  85. package/node_modules/detect-libc/.npmignore +0 -7
  86. package/node_modules/detect-libc/LICENSE +0 -201
  87. package/node_modules/detect-libc/README.md +0 -78
  88. package/node_modules/detect-libc/bin/detect-libc.js +0 -18
  89. package/node_modules/detect-libc/lib/detect-libc.js +0 -92
  90. package/node_modules/detect-libc/package.json +0 -73
  91. package/node_modules/fs-minipass/LICENSE +0 -15
  92. package/node_modules/fs-minipass/README.md +0 -70
  93. package/node_modules/fs-minipass/index.js +0 -386
  94. package/node_modules/fs-minipass/package.json +0 -65
  95. package/node_modules/fs.realpath/LICENSE +0 -43
  96. package/node_modules/fs.realpath/README.md +0 -33
  97. package/node_modules/fs.realpath/index.js +0 -66
  98. package/node_modules/fs.realpath/old.js +0 -303
  99. package/node_modules/fs.realpath/package.json +0 -62
  100. package/node_modules/gauge/CHANGELOG.md +0 -160
  101. package/node_modules/gauge/LICENSE +0 -13
  102. package/node_modules/gauge/README.md +0 -399
  103. package/node_modules/gauge/base-theme.js +0 -14
  104. package/node_modules/gauge/error.js +0 -24
  105. package/node_modules/gauge/has-color.js +0 -12
  106. package/node_modules/gauge/index.js +0 -233
  107. package/node_modules/gauge/package.json +0 -94
  108. package/node_modules/gauge/plumbing.js +0 -48
  109. package/node_modules/gauge/process.js +0 -3
  110. package/node_modules/gauge/progress-bar.js +0 -35
  111. package/node_modules/gauge/render-template.js +0 -181
  112. package/node_modules/gauge/set-immediate.js +0 -7
  113. package/node_modules/gauge/set-interval.js +0 -3
  114. package/node_modules/gauge/spin.js +0 -5
  115. package/node_modules/gauge/template-item.js +0 -73
  116. package/node_modules/gauge/theme-set.js +0 -115
  117. package/node_modules/gauge/themes.js +0 -54
  118. package/node_modules/gauge/wide-truncate.js +0 -25
  119. package/node_modules/glob/LICENSE +0 -15
  120. package/node_modules/glob/README.md +0 -368
  121. package/node_modules/glob/changelog.md +0 -67
  122. package/node_modules/glob/common.js +0 -240
  123. package/node_modules/glob/glob.js +0 -790
  124. package/node_modules/glob/package.json +0 -79
  125. package/node_modules/glob/sync.js +0 -486
  126. package/node_modules/has-unicode/LICENSE +0 -14
  127. package/node_modules/has-unicode/README.md +0 -43
  128. package/node_modules/has-unicode/index.js +0 -16
  129. package/node_modules/has-unicode/package.json +0 -61
  130. package/node_modules/iconv-lite/Changelog.md +0 -162
  131. package/node_modules/iconv-lite/LICENSE +0 -21
  132. package/node_modules/iconv-lite/README.md +0 -156
  133. package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -555
  134. package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -176
  135. package/node_modules/iconv-lite/encodings/index.js +0 -22
  136. package/node_modules/iconv-lite/encodings/internal.js +0 -188
  137. package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  138. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  139. package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -174
  140. package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  141. package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  142. package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  143. package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  144. package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  145. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  146. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -55
  147. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  148. package/node_modules/iconv-lite/encodings/utf16.js +0 -177
  149. package/node_modules/iconv-lite/encodings/utf7.js +0 -290
  150. package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  151. package/node_modules/iconv-lite/lib/extend-node.js +0 -217
  152. package/node_modules/iconv-lite/lib/index.d.ts +0 -24
  153. package/node_modules/iconv-lite/lib/index.js +0 -153
  154. package/node_modules/iconv-lite/lib/streams.js +0 -121
  155. package/node_modules/iconv-lite/package.json +0 -79
  156. package/node_modules/ignore-walk/LICENSE +0 -15
  157. package/node_modules/ignore-walk/README.md +0 -60
  158. package/node_modules/ignore-walk/index.js +0 -265
  159. package/node_modules/ignore-walk/package.json +0 -74
  160. package/node_modules/inflight/LICENSE +0 -15
  161. package/node_modules/inflight/README.md +0 -37
  162. package/node_modules/inflight/inflight.js +0 -54
  163. package/node_modules/inflight/package.json +0 -61
  164. package/node_modules/inherits/LICENSE +0 -16
  165. package/node_modules/inherits/README.md +0 -42
  166. package/node_modules/inherits/inherits.js +0 -7
  167. package/node_modules/inherits/inherits_browser.js +0 -23
  168. package/node_modules/inherits/package.json +0 -65
  169. package/node_modules/ini/LICENSE +0 -15
  170. package/node_modules/ini/README.md +0 -102
  171. package/node_modules/ini/ini.js +0 -194
  172. package/node_modules/ini/package.json +0 -66
  173. package/node_modules/is-fullwidth-code-point/index.js +0 -46
  174. package/node_modules/is-fullwidth-code-point/license +0 -21
  175. package/node_modules/is-fullwidth-code-point/package.json +0 -80
  176. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  177. package/node_modules/isarray/.npmignore +0 -1
  178. package/node_modules/isarray/.travis.yml +0 -4
  179. package/node_modules/isarray/Makefile +0 -6
  180. package/node_modules/isarray/README.md +0 -60
  181. package/node_modules/isarray/component.json +0 -19
  182. package/node_modules/isarray/index.js +0 -5
  183. package/node_modules/isarray/package.json +0 -76
  184. package/node_modules/isarray/test.js +0 -20
  185. package/node_modules/minimatch/LICENSE +0 -15
  186. package/node_modules/minimatch/README.md +0 -209
  187. package/node_modules/minimatch/minimatch.js +0 -923
  188. package/node_modules/minimatch/package.json +0 -67
  189. package/node_modules/minimist/.travis.yml +0 -4
  190. package/node_modules/minimist/LICENSE +0 -18
  191. package/node_modules/minimist/example/parse.js +0 -2
  192. package/node_modules/minimist/index.js +0 -187
  193. package/node_modules/minimist/package.json +0 -74
  194. package/node_modules/minimist/readme.markdown +0 -73
  195. package/node_modules/minimist/test/dash.js +0 -24
  196. package/node_modules/minimist/test/default_bool.js +0 -20
  197. package/node_modules/minimist/test/dotted.js +0 -16
  198. package/node_modules/minimist/test/long.js +0 -31
  199. package/node_modules/minimist/test/parse.js +0 -318
  200. package/node_modules/minimist/test/parse_modified.js +0 -9
  201. package/node_modules/minimist/test/short.js +0 -67
  202. package/node_modules/minimist/test/whitespace.js +0 -8
  203. package/node_modules/minipass/LICENSE +0 -15
  204. package/node_modules/minipass/README.md +0 -124
  205. package/node_modules/minipass/index.js +0 -375
  206. package/node_modules/minipass/package.json +0 -72
  207. package/node_modules/minizlib/LICENSE +0 -26
  208. package/node_modules/minizlib/README.md +0 -44
  209. package/node_modules/minizlib/constants.js +0 -46
  210. package/node_modules/minizlib/index.js +0 -335
  211. package/node_modules/minizlib/package.json +0 -74
  212. package/node_modules/mkdirp/.travis.yml +0 -8
  213. package/node_modules/mkdirp/LICENSE +0 -21
  214. package/node_modules/mkdirp/bin/cmd.js +0 -33
  215. package/node_modules/mkdirp/bin/usage.txt +0 -12
  216. package/node_modules/mkdirp/examples/pow.js +0 -6
  217. package/node_modules/mkdirp/index.js +0 -98
  218. package/node_modules/mkdirp/package.json +0 -66
  219. package/node_modules/mkdirp/readme.markdown +0 -100
  220. package/node_modules/mkdirp/test/chmod.js +0 -41
  221. package/node_modules/mkdirp/test/clobber.js +0 -38
  222. package/node_modules/mkdirp/test/mkdirp.js +0 -28
  223. package/node_modules/mkdirp/test/opts_fs.js +0 -29
  224. package/node_modules/mkdirp/test/opts_fs_sync.js +0 -27
  225. package/node_modules/mkdirp/test/perm.js +0 -32
  226. package/node_modules/mkdirp/test/perm_sync.js +0 -36
  227. package/node_modules/mkdirp/test/race.js +0 -37
  228. package/node_modules/mkdirp/test/rel.js +0 -32
  229. package/node_modules/mkdirp/test/return.js +0 -25
  230. package/node_modules/mkdirp/test/return_sync.js +0 -24
  231. package/node_modules/mkdirp/test/root.js +0 -19
  232. package/node_modules/mkdirp/test/sync.js +0 -32
  233. package/node_modules/mkdirp/test/umask.js +0 -28
  234. package/node_modules/mkdirp/test/umask_sync.js +0 -32
  235. package/node_modules/ms/index.js +0 -162
  236. package/node_modules/ms/license.md +0 -21
  237. package/node_modules/ms/package.json +0 -72
  238. package/node_modules/ms/readme.md +0 -60
  239. package/node_modules/needle/.npmignore +0 -6
  240. package/node_modules/needle/README.md +0 -593
  241. package/node_modules/needle/bin/needle +0 -40
  242. package/node_modules/needle/examples/deflated-stream.js +0 -22
  243. package/node_modules/needle/examples/digest-auth.js +0 -16
  244. package/node_modules/needle/examples/download-to-file.js +0 -18
  245. package/node_modules/needle/examples/multipart-stream.js +0 -25
  246. package/node_modules/needle/examples/parsed-stream.js +0 -23
  247. package/node_modules/needle/examples/parsed-stream2.js +0 -21
  248. package/node_modules/needle/examples/stream-events.js +0 -23
  249. package/node_modules/needle/examples/stream-to-file.js +0 -14
  250. package/node_modules/needle/examples/upload-image.js +0 -51
  251. package/node_modules/needle/lib/auth.js +0 -110
  252. package/node_modules/needle/lib/cookies.js +0 -79
  253. package/node_modules/needle/lib/decoder.js +0 -53
  254. package/node_modules/needle/lib/multipart.js +0 -98
  255. package/node_modules/needle/lib/needle.js +0 -795
  256. package/node_modules/needle/lib/parsers.js +0 -120
  257. package/node_modules/needle/lib/querystring.js +0 -49
  258. package/node_modules/needle/license.txt +0 -19
  259. package/node_modules/needle/package-lock.json +0 -395
  260. package/node_modules/needle/package.json +0 -105
  261. package/node_modules/needle/test/basic_auth_spec.js +0 -196
  262. package/node_modules/needle/test/compression_spec.js +0 -94
  263. package/node_modules/needle/test/cookies_spec.js +0 -305
  264. package/node_modules/needle/test/decoder_spec.js +0 -86
  265. package/node_modules/needle/test/errors_spec.js +0 -286
  266. package/node_modules/needle/test/headers_spec.js +0 -198
  267. package/node_modules/needle/test/helpers.js +0 -72
  268. package/node_modules/needle/test/keys/ssl.cert +0 -21
  269. package/node_modules/needle/test/keys/ssl.key +0 -27
  270. package/node_modules/needle/test/long_string_spec.js +0 -34
  271. package/node_modules/needle/test/output_spec.js +0 -254
  272. package/node_modules/needle/test/parsing_spec.js +0 -494
  273. package/node_modules/needle/test/post_data_spec.js +0 -1021
  274. package/node_modules/needle/test/proxy_spec.js +0 -202
  275. package/node_modules/needle/test/querystring_spec.js +0 -128
  276. package/node_modules/needle/test/redirect_spec.js +0 -392
  277. package/node_modules/needle/test/redirect_with_timeout.js +0 -45
  278. package/node_modules/needle/test/request_stream_spec.js +0 -202
  279. package/node_modules/needle/test/response_stream_spec.js +0 -139
  280. package/node_modules/needle/test/socket_pool_spec.js +0 -66
  281. package/node_modules/needle/test/url_spec.js +0 -155
  282. package/node_modules/needle/test/utils/formidable.js +0 -17
  283. package/node_modules/needle/test/utils/proxy.js +0 -62
  284. package/node_modules/needle/test/utils/test.js +0 -104
  285. package/node_modules/node-pre-gyp/CHANGELOG.md +0 -432
  286. package/node_modules/node-pre-gyp/LICENSE +0 -27
  287. package/node_modules/node-pre-gyp/README.md +0 -693
  288. package/node_modules/node-pre-gyp/appveyor.yml +0 -30
  289. package/node_modules/node-pre-gyp/bin/node-pre-gyp +0 -134
  290. package/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd +0 -2
  291. package/node_modules/node-pre-gyp/contributing.md +0 -10
  292. package/node_modules/node-pre-gyp/lib/build.js +0 -51
  293. package/node_modules/node-pre-gyp/lib/clean.js +0 -32
  294. package/node_modules/node-pre-gyp/lib/configure.js +0 -52
  295. package/node_modules/node-pre-gyp/lib/info.js +0 -40
  296. package/node_modules/node-pre-gyp/lib/install.js +0 -255
  297. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +0 -203
  298. package/node_modules/node-pre-gyp/lib/package.js +0 -56
  299. package/node_modules/node-pre-gyp/lib/pre-binding.js +0 -30
  300. package/node_modules/node-pre-gyp/lib/publish.js +0 -79
  301. package/node_modules/node-pre-gyp/lib/rebuild.js +0 -21
  302. package/node_modules/node-pre-gyp/lib/reinstall.js +0 -20
  303. package/node_modules/node-pre-gyp/lib/reveal.js +0 -33
  304. package/node_modules/node-pre-gyp/lib/testbinary.js +0 -81
  305. package/node_modules/node-pre-gyp/lib/testpackage.js +0 -55
  306. package/node_modules/node-pre-gyp/lib/unpublish.js +0 -43
  307. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +0 -1830
  308. package/node_modules/node-pre-gyp/lib/util/compile.js +0 -87
  309. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +0 -103
  310. package/node_modules/node-pre-gyp/lib/util/napi.js +0 -204
  311. package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html +0 -26
  312. package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json +0 -9
  313. package/node_modules/node-pre-gyp/lib/util/s3_setup.js +0 -27
  314. package/node_modules/node-pre-gyp/lib/util/versioning.js +0 -331
  315. package/node_modules/node-pre-gyp/package.json +0 -89
  316. package/node_modules/nopt/.npmignore +0 -1
  317. package/node_modules/nopt/.travis.yml +0 -8
  318. package/node_modules/nopt/CHANGELOG.md +0 -58
  319. package/node_modules/nopt/LICENSE +0 -15
  320. package/node_modules/nopt/README.md +0 -213
  321. package/node_modules/nopt/bin/nopt.js +0 -54
  322. package/node_modules/nopt/examples/my-program.js +0 -30
  323. package/node_modules/nopt/lib/nopt.js +0 -436
  324. package/node_modules/nopt/package.json +0 -61
  325. package/node_modules/nopt/test/basic.js +0 -303
  326. package/node_modules/npm-bundled/LICENSE +0 -15
  327. package/node_modules/npm-bundled/README.md +0 -48
  328. package/node_modules/npm-bundled/index.js +0 -241
  329. package/node_modules/npm-bundled/package.json +0 -63
  330. package/node_modules/npm-packlist/LICENSE +0 -15
  331. package/node_modules/npm-packlist/README.md +0 -68
  332. package/node_modules/npm-packlist/index.js +0 -250
  333. package/node_modules/npm-packlist/package.json +0 -69
  334. package/node_modules/npmlog/CHANGELOG.md +0 -49
  335. package/node_modules/npmlog/LICENSE +0 -15
  336. package/node_modules/npmlog/README.md +0 -216
  337. package/node_modules/npmlog/log.js +0 -309
  338. package/node_modules/npmlog/package.json +0 -64
  339. package/node_modules/number-is-nan/index.js +0 -4
  340. package/node_modules/number-is-nan/license +0 -21
  341. package/node_modules/number-is-nan/package.json +0 -70
  342. package/node_modules/number-is-nan/readme.md +0 -28
  343. package/node_modules/object-assign/index.js +0 -90
  344. package/node_modules/object-assign/license +0 -21
  345. package/node_modules/object-assign/package.json +0 -77
  346. package/node_modules/object-assign/readme.md +0 -61
  347. package/node_modules/once/LICENSE +0 -15
  348. package/node_modules/once/README.md +0 -79
  349. package/node_modules/once/once.js +0 -42
  350. package/node_modules/once/package.json +0 -70
  351. package/node_modules/os-homedir/index.js +0 -24
  352. package/node_modules/os-homedir/license +0 -21
  353. package/node_modules/os-homedir/package.json +0 -76
  354. package/node_modules/os-homedir/readme.md +0 -31
  355. package/node_modules/os-tmpdir/index.js +0 -25
  356. package/node_modules/os-tmpdir/license +0 -21
  357. package/node_modules/os-tmpdir/package.json +0 -76
  358. package/node_modules/os-tmpdir/readme.md +0 -32
  359. package/node_modules/osenv/LICENSE +0 -15
  360. package/node_modules/osenv/README.md +0 -63
  361. package/node_modules/osenv/osenv.js +0 -72
  362. package/node_modules/osenv/package.json +0 -76
  363. package/node_modules/path-is-absolute/index.js +0 -20
  364. package/node_modules/path-is-absolute/license +0 -21
  365. package/node_modules/path-is-absolute/package.json +0 -78
  366. package/node_modules/path-is-absolute/readme.md +0 -59
  367. package/node_modules/process-nextick-args/index.js +0 -44
  368. package/node_modules/process-nextick-args/license.md +0 -19
  369. package/node_modules/process-nextick-args/package.json +0 -53
  370. package/node_modules/process-nextick-args/readme.md +0 -18
  371. package/node_modules/rc/LICENSE.APACHE2 +0 -15
  372. package/node_modules/rc/LICENSE.BSD +0 -26
  373. package/node_modules/rc/LICENSE.MIT +0 -24
  374. package/node_modules/rc/README.md +0 -227
  375. package/node_modules/rc/browser.js +0 -7
  376. package/node_modules/rc/cli.js +0 -4
  377. package/node_modules/rc/index.js +0 -53
  378. package/node_modules/rc/lib/utils.js +0 -104
  379. package/node_modules/rc/node_modules/minimist/.travis.yml +0 -8
  380. package/node_modules/rc/node_modules/minimist/LICENSE +0 -18
  381. package/node_modules/rc/node_modules/minimist/example/parse.js +0 -2
  382. package/node_modules/rc/node_modules/minimist/index.js +0 -236
  383. package/node_modules/rc/node_modules/minimist/package.json +0 -76
  384. package/node_modules/rc/node_modules/minimist/readme.markdown +0 -91
  385. package/node_modules/rc/node_modules/minimist/test/all_bool.js +0 -32
  386. package/node_modules/rc/node_modules/minimist/test/bool.js +0 -166
  387. package/node_modules/rc/node_modules/minimist/test/dash.js +0 -31
  388. package/node_modules/rc/node_modules/minimist/test/default_bool.js +0 -35
  389. package/node_modules/rc/node_modules/minimist/test/dotted.js +0 -22
  390. package/node_modules/rc/node_modules/minimist/test/kv_short.js +0 -16
  391. package/node_modules/rc/node_modules/minimist/test/long.js +0 -31
  392. package/node_modules/rc/node_modules/minimist/test/num.js +0 -36
  393. package/node_modules/rc/node_modules/minimist/test/parse.js +0 -197
  394. package/node_modules/rc/node_modules/minimist/test/parse_modified.js +0 -9
  395. package/node_modules/rc/node_modules/minimist/test/short.js +0 -67
  396. package/node_modules/rc/node_modules/minimist/test/stop_early.js +0 -15
  397. package/node_modules/rc/node_modules/minimist/test/unknown.js +0 -102
  398. package/node_modules/rc/node_modules/minimist/test/whitespace.js +0 -8
  399. package/node_modules/rc/package.json +0 -67
  400. package/node_modules/rc/test/ini.js +0 -16
  401. package/node_modules/rc/test/nested-env-vars.js +0 -50
  402. package/node_modules/rc/test/test.js +0 -59
  403. package/node_modules/readable-stream/.travis.yml +0 -55
  404. package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  405. package/node_modules/readable-stream/GOVERNANCE.md +0 -136
  406. package/node_modules/readable-stream/LICENSE +0 -47
  407. package/node_modules/readable-stream/README.md +0 -58
  408. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  409. package/node_modules/readable-stream/duplex-browser.js +0 -1
  410. package/node_modules/readable-stream/duplex.js +0 -1
  411. package/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
  412. package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
  413. package/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
  414. package/node_modules/readable-stream/lib/_stream_transform.js +0 -214
  415. package/node_modules/readable-stream/lib/_stream_writable.js +0 -687
  416. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
  417. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
  418. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  419. package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  420. package/node_modules/readable-stream/package.json +0 -84
  421. package/node_modules/readable-stream/passthrough.js +0 -1
  422. package/node_modules/readable-stream/readable-browser.js +0 -7
  423. package/node_modules/readable-stream/readable.js +0 -19
  424. package/node_modules/readable-stream/transform.js +0 -1
  425. package/node_modules/readable-stream/writable-browser.js +0 -1
  426. package/node_modules/readable-stream/writable.js +0 -8
  427. package/node_modules/rimraf/LICENSE +0 -15
  428. package/node_modules/rimraf/README.md +0 -101
  429. package/node_modules/rimraf/bin.js +0 -50
  430. package/node_modules/rimraf/package.json +0 -70
  431. package/node_modules/rimraf/rimraf.js +0 -364
  432. package/node_modules/safe-buffer/LICENSE +0 -21
  433. package/node_modules/safe-buffer/README.md +0 -584
  434. package/node_modules/safe-buffer/index.d.ts +0 -187
  435. package/node_modules/safe-buffer/index.js +0 -62
  436. package/node_modules/safe-buffer/package.json +0 -68
  437. package/node_modules/safer-buffer/LICENSE +0 -21
  438. package/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  439. package/node_modules/safer-buffer/Readme.md +0 -156
  440. package/node_modules/safer-buffer/dangerous.js +0 -58
  441. package/node_modules/safer-buffer/package.json +0 -63
  442. package/node_modules/safer-buffer/safer.js +0 -77
  443. package/node_modules/safer-buffer/tests.js +0 -406
  444. package/node_modules/sax/LICENSE +0 -41
  445. package/node_modules/sax/README.md +0 -225
  446. package/node_modules/sax/lib/sax.js +0 -1565
  447. package/node_modules/sax/package.json +0 -64
  448. package/node_modules/semver/CHANGELOG.md +0 -39
  449. package/node_modules/semver/LICENSE +0 -15
  450. package/node_modules/semver/README.md +0 -411
  451. package/node_modules/semver/bin/semver +0 -160
  452. package/node_modules/semver/package.json +0 -63
  453. package/node_modules/semver/range.bnf +0 -16
  454. package/node_modules/semver/semver.js +0 -1483
  455. package/node_modules/set-blocking/CHANGELOG.md +0 -26
  456. package/node_modules/set-blocking/LICENSE.txt +0 -14
  457. package/node_modules/set-blocking/README.md +0 -31
  458. package/node_modules/set-blocking/index.js +0 -7
  459. package/node_modules/set-blocking/package.json +0 -73
  460. package/node_modules/signal-exit/CHANGELOG.md +0 -27
  461. package/node_modules/signal-exit/LICENSE.txt +0 -16
  462. package/node_modules/signal-exit/README.md +0 -40
  463. package/node_modules/signal-exit/index.js +0 -157
  464. package/node_modules/signal-exit/package.json +0 -69
  465. package/node_modules/signal-exit/signals.js +0 -53
  466. package/node_modules/string-width/index.js +0 -37
  467. package/node_modules/string-width/license +0 -21
  468. package/node_modules/string-width/package.json +0 -92
  469. package/node_modules/string-width/readme.md +0 -42
  470. package/node_modules/string_decoder/.travis.yml +0 -50
  471. package/node_modules/string_decoder/LICENSE +0 -48
  472. package/node_modules/string_decoder/README.md +0 -47
  473. package/node_modules/string_decoder/lib/string_decoder.js +0 -296
  474. package/node_modules/string_decoder/package.json +0 -62
  475. package/node_modules/strip-ansi/index.js +0 -6
  476. package/node_modules/strip-ansi/license +0 -21
  477. package/node_modules/strip-ansi/package.json +0 -105
  478. package/node_modules/strip-ansi/readme.md +0 -33
  479. package/node_modules/strip-json-comments/index.js +0 -70
  480. package/node_modules/strip-json-comments/license +0 -21
  481. package/node_modules/strip-json-comments/package.json +0 -77
  482. package/node_modules/strip-json-comments/readme.md +0 -64
  483. package/node_modules/tar/LICENSE +0 -15
  484. package/node_modules/tar/README.md +0 -954
  485. package/node_modules/tar/index.js +0 -18
  486. package/node_modules/tar/lib/buffer.js +0 -11
  487. package/node_modules/tar/lib/create.js +0 -105
  488. package/node_modules/tar/lib/extract.js +0 -112
  489. package/node_modules/tar/lib/header.js +0 -289
  490. package/node_modules/tar/lib/high-level-opt.js +0 -29
  491. package/node_modules/tar/lib/large-numbers.js +0 -92
  492. package/node_modules/tar/lib/list.js +0 -130
  493. package/node_modules/tar/lib/mkdir.js +0 -206
  494. package/node_modules/tar/lib/mode-fix.js +0 -14
  495. package/node_modules/tar/lib/pack.js +0 -404
  496. package/node_modules/tar/lib/parse.js +0 -423
  497. package/node_modules/tar/lib/pax.js +0 -146
  498. package/node_modules/tar/lib/read-entry.js +0 -94
  499. package/node_modules/tar/lib/replace.js +0 -220
  500. package/node_modules/tar/lib/types.js +0 -44
  501. package/node_modules/tar/lib/unpack.js +0 -621
  502. package/node_modules/tar/lib/update.js +0 -36
  503. package/node_modules/tar/lib/warn-mixin.js +0 -14
  504. package/node_modules/tar/lib/winchars.js +0 -23
  505. package/node_modules/tar/lib/write-entry.js +0 -422
  506. package/node_modules/tar/package.json +0 -81
  507. package/node_modules/util-deprecate/History.md +0 -16
  508. package/node_modules/util-deprecate/LICENSE +0 -24
  509. package/node_modules/util-deprecate/README.md +0 -53
  510. package/node_modules/util-deprecate/browser.js +0 -67
  511. package/node_modules/util-deprecate/node.js +0 -6
  512. package/node_modules/util-deprecate/package.json +0 -59
  513. package/node_modules/wide-align/LICENSE +0 -14
  514. package/node_modules/wide-align/README.md +0 -47
  515. package/node_modules/wide-align/align.js +0 -65
  516. package/node_modules/wide-align/package.json +0 -69
  517. package/node_modules/wrappy/LICENSE +0 -15
  518. package/node_modules/wrappy/README.md +0 -36
  519. package/node_modules/wrappy/package.json +0 -62
  520. package/node_modules/wrappy/wrappy.js +0 -33
  521. package/node_modules/yallist/LICENSE +0 -15
  522. package/node_modules/yallist/README.md +0 -204
  523. package/node_modules/yallist/iterator.js +0 -8
  524. package/node_modules/yallist/package.json +0 -66
  525. package/node_modules/yallist/yallist.js +0 -376
@@ -1,1565 +0,0 @@
1
- ;(function (sax) { // wrapper for non-node envs
2
- sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
3
- sax.SAXParser = SAXParser
4
- sax.SAXStream = SAXStream
5
- sax.createStream = createStream
6
-
7
- // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
8
- // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
9
- // since that's the earliest that a buffer overrun could occur. This way, checks are
10
- // as rare as required, but as often as necessary to ensure never crossing this bound.
11
- // Furthermore, buffers are only tested at most once per write(), so passing a very
12
- // large string into write() might have undesirable effects, but this is manageable by
13
- // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
14
- // edge case, result in creating at most one complete copy of the string passed in.
15
- // Set to Infinity to have unlimited buffers.
16
- sax.MAX_BUFFER_LENGTH = 64 * 1024
17
-
18
- var buffers = [
19
- 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
20
- 'procInstName', 'procInstBody', 'entity', 'attribName',
21
- 'attribValue', 'cdata', 'script'
22
- ]
23
-
24
- sax.EVENTS = [
25
- 'text',
26
- 'processinginstruction',
27
- 'sgmldeclaration',
28
- 'doctype',
29
- 'comment',
30
- 'opentagstart',
31
- 'attribute',
32
- 'opentag',
33
- 'closetag',
34
- 'opencdata',
35
- 'cdata',
36
- 'closecdata',
37
- 'error',
38
- 'end',
39
- 'ready',
40
- 'script',
41
- 'opennamespace',
42
- 'closenamespace'
43
- ]
44
-
45
- function SAXParser (strict, opt) {
46
- if (!(this instanceof SAXParser)) {
47
- return new SAXParser(strict, opt)
48
- }
49
-
50
- var parser = this
51
- clearBuffers(parser)
52
- parser.q = parser.c = ''
53
- parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
54
- parser.opt = opt || {}
55
- parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
56
- parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'
57
- parser.tags = []
58
- parser.closed = parser.closedRoot = parser.sawRoot = false
59
- parser.tag = parser.error = null
60
- parser.strict = !!strict
61
- parser.noscript = !!(strict || parser.opt.noscript)
62
- parser.state = S.BEGIN
63
- parser.strictEntities = parser.opt.strictEntities
64
- parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)
65
- parser.attribList = []
66
-
67
- // namespaces form a prototype chain.
68
- // it always points at the current tag,
69
- // which protos to its parent tag.
70
- if (parser.opt.xmlns) {
71
- parser.ns = Object.create(rootNS)
72
- }
73
-
74
- // mostly just for error reporting
75
- parser.trackPosition = parser.opt.position !== false
76
- if (parser.trackPosition) {
77
- parser.position = parser.line = parser.column = 0
78
- }
79
- emit(parser, 'onready')
80
- }
81
-
82
- if (!Object.create) {
83
- Object.create = function (o) {
84
- function F () {}
85
- F.prototype = o
86
- var newf = new F()
87
- return newf
88
- }
89
- }
90
-
91
- if (!Object.keys) {
92
- Object.keys = function (o) {
93
- var a = []
94
- for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
95
- return a
96
- }
97
- }
98
-
99
- function checkBufferLength (parser) {
100
- var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
101
- var maxActual = 0
102
- for (var i = 0, l = buffers.length; i < l; i++) {
103
- var len = parser[buffers[i]].length
104
- if (len > maxAllowed) {
105
- // Text/cdata nodes can get big, and since they're buffered,
106
- // we can get here under normal conditions.
107
- // Avoid issues by emitting the text node now,
108
- // so at least it won't get any bigger.
109
- switch (buffers[i]) {
110
- case 'textNode':
111
- closeText(parser)
112
- break
113
-
114
- case 'cdata':
115
- emitNode(parser, 'oncdata', parser.cdata)
116
- parser.cdata = ''
117
- break
118
-
119
- case 'script':
120
- emitNode(parser, 'onscript', parser.script)
121
- parser.script = ''
122
- break
123
-
124
- default:
125
- error(parser, 'Max buffer length exceeded: ' + buffers[i])
126
- }
127
- }
128
- maxActual = Math.max(maxActual, len)
129
- }
130
- // schedule the next check for the earliest possible buffer overrun.
131
- var m = sax.MAX_BUFFER_LENGTH - maxActual
132
- parser.bufferCheckPosition = m + parser.position
133
- }
134
-
135
- function clearBuffers (parser) {
136
- for (var i = 0, l = buffers.length; i < l; i++) {
137
- parser[buffers[i]] = ''
138
- }
139
- }
140
-
141
- function flushBuffers (parser) {
142
- closeText(parser)
143
- if (parser.cdata !== '') {
144
- emitNode(parser, 'oncdata', parser.cdata)
145
- parser.cdata = ''
146
- }
147
- if (parser.script !== '') {
148
- emitNode(parser, 'onscript', parser.script)
149
- parser.script = ''
150
- }
151
- }
152
-
153
- SAXParser.prototype = {
154
- end: function () { end(this) },
155
- write: write,
156
- resume: function () { this.error = null; return this },
157
- close: function () { return this.write(null) },
158
- flush: function () { flushBuffers(this) }
159
- }
160
-
161
- var Stream
162
- try {
163
- Stream = require('stream').Stream
164
- } catch (ex) {
165
- Stream = function () {}
166
- }
167
-
168
- var streamWraps = sax.EVENTS.filter(function (ev) {
169
- return ev !== 'error' && ev !== 'end'
170
- })
171
-
172
- function createStream (strict, opt) {
173
- return new SAXStream(strict, opt)
174
- }
175
-
176
- function SAXStream (strict, opt) {
177
- if (!(this instanceof SAXStream)) {
178
- return new SAXStream(strict, opt)
179
- }
180
-
181
- Stream.apply(this)
182
-
183
- this._parser = new SAXParser(strict, opt)
184
- this.writable = true
185
- this.readable = true
186
-
187
- var me = this
188
-
189
- this._parser.onend = function () {
190
- me.emit('end')
191
- }
192
-
193
- this._parser.onerror = function (er) {
194
- me.emit('error', er)
195
-
196
- // if didn't throw, then means error was handled.
197
- // go ahead and clear error, so we can write again.
198
- me._parser.error = null
199
- }
200
-
201
- this._decoder = null
202
-
203
- streamWraps.forEach(function (ev) {
204
- Object.defineProperty(me, 'on' + ev, {
205
- get: function () {
206
- return me._parser['on' + ev]
207
- },
208
- set: function (h) {
209
- if (!h) {
210
- me.removeAllListeners(ev)
211
- me._parser['on' + ev] = h
212
- return h
213
- }
214
- me.on(ev, h)
215
- },
216
- enumerable: true,
217
- configurable: false
218
- })
219
- })
220
- }
221
-
222
- SAXStream.prototype = Object.create(Stream.prototype, {
223
- constructor: {
224
- value: SAXStream
225
- }
226
- })
227
-
228
- SAXStream.prototype.write = function (data) {
229
- if (typeof Buffer === 'function' &&
230
- typeof Buffer.isBuffer === 'function' &&
231
- Buffer.isBuffer(data)) {
232
- if (!this._decoder) {
233
- var SD = require('string_decoder').StringDecoder
234
- this._decoder = new SD('utf8')
235
- }
236
- data = this._decoder.write(data)
237
- }
238
-
239
- this._parser.write(data.toString())
240
- this.emit('data', data)
241
- return true
242
- }
243
-
244
- SAXStream.prototype.end = function (chunk) {
245
- if (chunk && chunk.length) {
246
- this.write(chunk)
247
- }
248
- this._parser.end()
249
- return true
250
- }
251
-
252
- SAXStream.prototype.on = function (ev, handler) {
253
- var me = this
254
- if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
255
- me._parser['on' + ev] = function () {
256
- var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)
257
- args.splice(0, 0, ev)
258
- me.emit.apply(me, args)
259
- }
260
- }
261
-
262
- return Stream.prototype.on.call(me, ev, handler)
263
- }
264
-
265
- // this really needs to be replaced with character classes.
266
- // XML allows all manner of ridiculous numbers and digits.
267
- var CDATA = '[CDATA['
268
- var DOCTYPE = 'DOCTYPE'
269
- var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
270
- var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
271
- var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
272
-
273
- // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
274
- // This implementation works on strings, a single character at a time
275
- // as such, it cannot ever support astral-plane characters (10000-EFFFF)
276
- // without a significant breaking change to either this parser, or the
277
- // JavaScript language. Implementation of an emoji-capable xml parser
278
- // is left as an exercise for the reader.
279
- var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
280
-
281
- var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
282
-
283
- var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
284
- var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
285
-
286
- function isWhitespace (c) {
287
- return c === ' ' || c === '\n' || c === '\r' || c === '\t'
288
- }
289
-
290
- function isQuote (c) {
291
- return c === '"' || c === '\''
292
- }
293
-
294
- function isAttribEnd (c) {
295
- return c === '>' || isWhitespace(c)
296
- }
297
-
298
- function isMatch (regex, c) {
299
- return regex.test(c)
300
- }
301
-
302
- function notMatch (regex, c) {
303
- return !isMatch(regex, c)
304
- }
305
-
306
- var S = 0
307
- sax.STATE = {
308
- BEGIN: S++, // leading byte order mark or whitespace
309
- BEGIN_WHITESPACE: S++, // leading whitespace
310
- TEXT: S++, // general stuff
311
- TEXT_ENTITY: S++, // &amp and such.
312
- OPEN_WAKA: S++, // <
313
- SGML_DECL: S++, // <!BLARG
314
- SGML_DECL_QUOTED: S++, // <!BLARG foo "bar
315
- DOCTYPE: S++, // <!DOCTYPE
316
- DOCTYPE_QUOTED: S++, // <!DOCTYPE "//blah
317
- DOCTYPE_DTD: S++, // <!DOCTYPE "//blah" [ ...
318
- DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE "//blah" [ "foo
319
- COMMENT_STARTING: S++, // <!-
320
- COMMENT: S++, // <!--
321
- COMMENT_ENDING: S++, // <!-- blah -
322
- COMMENT_ENDED: S++, // <!-- blah --
323
- CDATA: S++, // <![CDATA[ something
324
- CDATA_ENDING: S++, // ]
325
- CDATA_ENDING_2: S++, // ]]
326
- PROC_INST: S++, // <?hi
327
- PROC_INST_BODY: S++, // <?hi there
328
- PROC_INST_ENDING: S++, // <?hi "there" ?
329
- OPEN_TAG: S++, // <strong
330
- OPEN_TAG_SLASH: S++, // <strong /
331
- ATTRIB: S++, // <a
332
- ATTRIB_NAME: S++, // <a foo
333
- ATTRIB_NAME_SAW_WHITE: S++, // <a foo _
334
- ATTRIB_VALUE: S++, // <a foo=
335
- ATTRIB_VALUE_QUOTED: S++, // <a foo="bar
336
- ATTRIB_VALUE_CLOSED: S++, // <a foo="bar"
337
- ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar
338
- ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar="&quot;"
339
- ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot
340
- CLOSE_TAG: S++, // </a
341
- CLOSE_TAG_SAW_WHITE: S++, // </a >
342
- SCRIPT: S++, // <script> ...
343
- SCRIPT_ENDING: S++ // <script> ... <
344
- }
345
-
346
- sax.XML_ENTITIES = {
347
- 'amp': '&',
348
- 'gt': '>',
349
- 'lt': '<',
350
- 'quot': '"',
351
- 'apos': "'"
352
- }
353
-
354
- sax.ENTITIES = {
355
- 'amp': '&',
356
- 'gt': '>',
357
- 'lt': '<',
358
- 'quot': '"',
359
- 'apos': "'",
360
- 'AElig': 198,
361
- 'Aacute': 193,
362
- 'Acirc': 194,
363
- 'Agrave': 192,
364
- 'Aring': 197,
365
- 'Atilde': 195,
366
- 'Auml': 196,
367
- 'Ccedil': 199,
368
- 'ETH': 208,
369
- 'Eacute': 201,
370
- 'Ecirc': 202,
371
- 'Egrave': 200,
372
- 'Euml': 203,
373
- 'Iacute': 205,
374
- 'Icirc': 206,
375
- 'Igrave': 204,
376
- 'Iuml': 207,
377
- 'Ntilde': 209,
378
- 'Oacute': 211,
379
- 'Ocirc': 212,
380
- 'Ograve': 210,
381
- 'Oslash': 216,
382
- 'Otilde': 213,
383
- 'Ouml': 214,
384
- 'THORN': 222,
385
- 'Uacute': 218,
386
- 'Ucirc': 219,
387
- 'Ugrave': 217,
388
- 'Uuml': 220,
389
- 'Yacute': 221,
390
- 'aacute': 225,
391
- 'acirc': 226,
392
- 'aelig': 230,
393
- 'agrave': 224,
394
- 'aring': 229,
395
- 'atilde': 227,
396
- 'auml': 228,
397
- 'ccedil': 231,
398
- 'eacute': 233,
399
- 'ecirc': 234,
400
- 'egrave': 232,
401
- 'eth': 240,
402
- 'euml': 235,
403
- 'iacute': 237,
404
- 'icirc': 238,
405
- 'igrave': 236,
406
- 'iuml': 239,
407
- 'ntilde': 241,
408
- 'oacute': 243,
409
- 'ocirc': 244,
410
- 'ograve': 242,
411
- 'oslash': 248,
412
- 'otilde': 245,
413
- 'ouml': 246,
414
- 'szlig': 223,
415
- 'thorn': 254,
416
- 'uacute': 250,
417
- 'ucirc': 251,
418
- 'ugrave': 249,
419
- 'uuml': 252,
420
- 'yacute': 253,
421
- 'yuml': 255,
422
- 'copy': 169,
423
- 'reg': 174,
424
- 'nbsp': 160,
425
- 'iexcl': 161,
426
- 'cent': 162,
427
- 'pound': 163,
428
- 'curren': 164,
429
- 'yen': 165,
430
- 'brvbar': 166,
431
- 'sect': 167,
432
- 'uml': 168,
433
- 'ordf': 170,
434
- 'laquo': 171,
435
- 'not': 172,
436
- 'shy': 173,
437
- 'macr': 175,
438
- 'deg': 176,
439
- 'plusmn': 177,
440
- 'sup1': 185,
441
- 'sup2': 178,
442
- 'sup3': 179,
443
- 'acute': 180,
444
- 'micro': 181,
445
- 'para': 182,
446
- 'middot': 183,
447
- 'cedil': 184,
448
- 'ordm': 186,
449
- 'raquo': 187,
450
- 'frac14': 188,
451
- 'frac12': 189,
452
- 'frac34': 190,
453
- 'iquest': 191,
454
- 'times': 215,
455
- 'divide': 247,
456
- 'OElig': 338,
457
- 'oelig': 339,
458
- 'Scaron': 352,
459
- 'scaron': 353,
460
- 'Yuml': 376,
461
- 'fnof': 402,
462
- 'circ': 710,
463
- 'tilde': 732,
464
- 'Alpha': 913,
465
- 'Beta': 914,
466
- 'Gamma': 915,
467
- 'Delta': 916,
468
- 'Epsilon': 917,
469
- 'Zeta': 918,
470
- 'Eta': 919,
471
- 'Theta': 920,
472
- 'Iota': 921,
473
- 'Kappa': 922,
474
- 'Lambda': 923,
475
- 'Mu': 924,
476
- 'Nu': 925,
477
- 'Xi': 926,
478
- 'Omicron': 927,
479
- 'Pi': 928,
480
- 'Rho': 929,
481
- 'Sigma': 931,
482
- 'Tau': 932,
483
- 'Upsilon': 933,
484
- 'Phi': 934,
485
- 'Chi': 935,
486
- 'Psi': 936,
487
- 'Omega': 937,
488
- 'alpha': 945,
489
- 'beta': 946,
490
- 'gamma': 947,
491
- 'delta': 948,
492
- 'epsilon': 949,
493
- 'zeta': 950,
494
- 'eta': 951,
495
- 'theta': 952,
496
- 'iota': 953,
497
- 'kappa': 954,
498
- 'lambda': 955,
499
- 'mu': 956,
500
- 'nu': 957,
501
- 'xi': 958,
502
- 'omicron': 959,
503
- 'pi': 960,
504
- 'rho': 961,
505
- 'sigmaf': 962,
506
- 'sigma': 963,
507
- 'tau': 964,
508
- 'upsilon': 965,
509
- 'phi': 966,
510
- 'chi': 967,
511
- 'psi': 968,
512
- 'omega': 969,
513
- 'thetasym': 977,
514
- 'upsih': 978,
515
- 'piv': 982,
516
- 'ensp': 8194,
517
- 'emsp': 8195,
518
- 'thinsp': 8201,
519
- 'zwnj': 8204,
520
- 'zwj': 8205,
521
- 'lrm': 8206,
522
- 'rlm': 8207,
523
- 'ndash': 8211,
524
- 'mdash': 8212,
525
- 'lsquo': 8216,
526
- 'rsquo': 8217,
527
- 'sbquo': 8218,
528
- 'ldquo': 8220,
529
- 'rdquo': 8221,
530
- 'bdquo': 8222,
531
- 'dagger': 8224,
532
- 'Dagger': 8225,
533
- 'bull': 8226,
534
- 'hellip': 8230,
535
- 'permil': 8240,
536
- 'prime': 8242,
537
- 'Prime': 8243,
538
- 'lsaquo': 8249,
539
- 'rsaquo': 8250,
540
- 'oline': 8254,
541
- 'frasl': 8260,
542
- 'euro': 8364,
543
- 'image': 8465,
544
- 'weierp': 8472,
545
- 'real': 8476,
546
- 'trade': 8482,
547
- 'alefsym': 8501,
548
- 'larr': 8592,
549
- 'uarr': 8593,
550
- 'rarr': 8594,
551
- 'darr': 8595,
552
- 'harr': 8596,
553
- 'crarr': 8629,
554
- 'lArr': 8656,
555
- 'uArr': 8657,
556
- 'rArr': 8658,
557
- 'dArr': 8659,
558
- 'hArr': 8660,
559
- 'forall': 8704,
560
- 'part': 8706,
561
- 'exist': 8707,
562
- 'empty': 8709,
563
- 'nabla': 8711,
564
- 'isin': 8712,
565
- 'notin': 8713,
566
- 'ni': 8715,
567
- 'prod': 8719,
568
- 'sum': 8721,
569
- 'minus': 8722,
570
- 'lowast': 8727,
571
- 'radic': 8730,
572
- 'prop': 8733,
573
- 'infin': 8734,
574
- 'ang': 8736,
575
- 'and': 8743,
576
- 'or': 8744,
577
- 'cap': 8745,
578
- 'cup': 8746,
579
- 'int': 8747,
580
- 'there4': 8756,
581
- 'sim': 8764,
582
- 'cong': 8773,
583
- 'asymp': 8776,
584
- 'ne': 8800,
585
- 'equiv': 8801,
586
- 'le': 8804,
587
- 'ge': 8805,
588
- 'sub': 8834,
589
- 'sup': 8835,
590
- 'nsub': 8836,
591
- 'sube': 8838,
592
- 'supe': 8839,
593
- 'oplus': 8853,
594
- 'otimes': 8855,
595
- 'perp': 8869,
596
- 'sdot': 8901,
597
- 'lceil': 8968,
598
- 'rceil': 8969,
599
- 'lfloor': 8970,
600
- 'rfloor': 8971,
601
- 'lang': 9001,
602
- 'rang': 9002,
603
- 'loz': 9674,
604
- 'spades': 9824,
605
- 'clubs': 9827,
606
- 'hearts': 9829,
607
- 'diams': 9830
608
- }
609
-
610
- Object.keys(sax.ENTITIES).forEach(function (key) {
611
- var e = sax.ENTITIES[key]
612
- var s = typeof e === 'number' ? String.fromCharCode(e) : e
613
- sax.ENTITIES[key] = s
614
- })
615
-
616
- for (var s in sax.STATE) {
617
- sax.STATE[sax.STATE[s]] = s
618
- }
619
-
620
- // shorthand
621
- S = sax.STATE
622
-
623
- function emit (parser, event, data) {
624
- parser[event] && parser[event](data)
625
- }
626
-
627
- function emitNode (parser, nodeType, data) {
628
- if (parser.textNode) closeText(parser)
629
- emit(parser, nodeType, data)
630
- }
631
-
632
- function closeText (parser) {
633
- parser.textNode = textopts(parser.opt, parser.textNode)
634
- if (parser.textNode) emit(parser, 'ontext', parser.textNode)
635
- parser.textNode = ''
636
- }
637
-
638
- function textopts (opt, text) {
639
- if (opt.trim) text = text.trim()
640
- if (opt.normalize) text = text.replace(/\s+/g, ' ')
641
- return text
642
- }
643
-
644
- function error (parser, er) {
645
- closeText(parser)
646
- if (parser.trackPosition) {
647
- er += '\nLine: ' + parser.line +
648
- '\nColumn: ' + parser.column +
649
- '\nChar: ' + parser.c
650
- }
651
- er = new Error(er)
652
- parser.error = er
653
- emit(parser, 'onerror', er)
654
- return parser
655
- }
656
-
657
- function end (parser) {
658
- if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')
659
- if ((parser.state !== S.BEGIN) &&
660
- (parser.state !== S.BEGIN_WHITESPACE) &&
661
- (parser.state !== S.TEXT)) {
662
- error(parser, 'Unexpected end')
663
- }
664
- closeText(parser)
665
- parser.c = ''
666
- parser.closed = true
667
- emit(parser, 'onend')
668
- SAXParser.call(parser, parser.strict, parser.opt)
669
- return parser
670
- }
671
-
672
- function strictFail (parser, message) {
673
- if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
674
- throw new Error('bad call to strictFail')
675
- }
676
- if (parser.strict) {
677
- error(parser, message)
678
- }
679
- }
680
-
681
- function newTag (parser) {
682
- if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()
683
- var parent = parser.tags[parser.tags.length - 1] || parser
684
- var tag = parser.tag = { name: parser.tagName, attributes: {} }
685
-
686
- // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
687
- if (parser.opt.xmlns) {
688
- tag.ns = parent.ns
689
- }
690
- parser.attribList.length = 0
691
- emitNode(parser, 'onopentagstart', tag)
692
- }
693
-
694
- function qname (name, attribute) {
695
- var i = name.indexOf(':')
696
- var qualName = i < 0 ? [ '', name ] : name.split(':')
697
- var prefix = qualName[0]
698
- var local = qualName[1]
699
-
700
- // <x "xmlns"="http://foo">
701
- if (attribute && name === 'xmlns') {
702
- prefix = 'xmlns'
703
- local = ''
704
- }
705
-
706
- return { prefix: prefix, local: local }
707
- }
708
-
709
- function attrib (parser) {
710
- if (!parser.strict) {
711
- parser.attribName = parser.attribName[parser.looseCase]()
712
- }
713
-
714
- if (parser.attribList.indexOf(parser.attribName) !== -1 ||
715
- parser.tag.attributes.hasOwnProperty(parser.attribName)) {
716
- parser.attribName = parser.attribValue = ''
717
- return
718
- }
719
-
720
- if (parser.opt.xmlns) {
721
- var qn = qname(parser.attribName, true)
722
- var prefix = qn.prefix
723
- var local = qn.local
724
-
725
- if (prefix === 'xmlns') {
726
- // namespace binding attribute. push the binding into scope
727
- if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
728
- strictFail(parser,
729
- 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' +
730
- 'Actual: ' + parser.attribValue)
731
- } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
732
- strictFail(parser,
733
- 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' +
734
- 'Actual: ' + parser.attribValue)
735
- } else {
736
- var tag = parser.tag
737
- var parent = parser.tags[parser.tags.length - 1] || parser
738
- if (tag.ns === parent.ns) {
739
- tag.ns = Object.create(parent.ns)
740
- }
741
- tag.ns[local] = parser.attribValue
742
- }
743
- }
744
-
745
- // defer onattribute events until all attributes have been seen
746
- // so any new bindings can take effect. preserve attribute order
747
- // so deferred events can be emitted in document order
748
- parser.attribList.push([parser.attribName, parser.attribValue])
749
- } else {
750
- // in non-xmlns mode, we can emit the event right away
751
- parser.tag.attributes[parser.attribName] = parser.attribValue
752
- emitNode(parser, 'onattribute', {
753
- name: parser.attribName,
754
- value: parser.attribValue
755
- })
756
- }
757
-
758
- parser.attribName = parser.attribValue = ''
759
- }
760
-
761
- function openTag (parser, selfClosing) {
762
- if (parser.opt.xmlns) {
763
- // emit namespace binding events
764
- var tag = parser.tag
765
-
766
- // add namespace info to tag
767
- var qn = qname(parser.tagName)
768
- tag.prefix = qn.prefix
769
- tag.local = qn.local
770
- tag.uri = tag.ns[qn.prefix] || ''
771
-
772
- if (tag.prefix && !tag.uri) {
773
- strictFail(parser, 'Unbound namespace prefix: ' +
774
- JSON.stringify(parser.tagName))
775
- tag.uri = qn.prefix
776
- }
777
-
778
- var parent = parser.tags[parser.tags.length - 1] || parser
779
- if (tag.ns && parent.ns !== tag.ns) {
780
- Object.keys(tag.ns).forEach(function (p) {
781
- emitNode(parser, 'onopennamespace', {
782
- prefix: p,
783
- uri: tag.ns[p]
784
- })
785
- })
786
- }
787
-
788
- // handle deferred onattribute events
789
- // Note: do not apply default ns to attributes:
790
- // http://www.w3.org/TR/REC-xml-names/#defaulting
791
- for (var i = 0, l = parser.attribList.length; i < l; i++) {
792
- var nv = parser.attribList[i]
793
- var name = nv[0]
794
- var value = nv[1]
795
- var qualName = qname(name, true)
796
- var prefix = qualName.prefix
797
- var local = qualName.local
798
- var uri = prefix === '' ? '' : (tag.ns[prefix] || '')
799
- var a = {
800
- name: name,
801
- value: value,
802
- prefix: prefix,
803
- local: local,
804
- uri: uri
805
- }
806
-
807
- // if there's any attributes with an undefined namespace,
808
- // then fail on them now.
809
- if (prefix && prefix !== 'xmlns' && !uri) {
810
- strictFail(parser, 'Unbound namespace prefix: ' +
811
- JSON.stringify(prefix))
812
- a.uri = prefix
813
- }
814
- parser.tag.attributes[name] = a
815
- emitNode(parser, 'onattribute', a)
816
- }
817
- parser.attribList.length = 0
818
- }
819
-
820
- parser.tag.isSelfClosing = !!selfClosing
821
-
822
- // process the tag
823
- parser.sawRoot = true
824
- parser.tags.push(parser.tag)
825
- emitNode(parser, 'onopentag', parser.tag)
826
- if (!selfClosing) {
827
- // special case for <script> in non-strict mode.
828
- if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
829
- parser.state = S.SCRIPT
830
- } else {
831
- parser.state = S.TEXT
832
- }
833
- parser.tag = null
834
- parser.tagName = ''
835
- }
836
- parser.attribName = parser.attribValue = ''
837
- parser.attribList.length = 0
838
- }
839
-
840
- function closeTag (parser) {
841
- if (!parser.tagName) {
842
- strictFail(parser, 'Weird empty close tag.')
843
- parser.textNode += '</>'
844
- parser.state = S.TEXT
845
- return
846
- }
847
-
848
- if (parser.script) {
849
- if (parser.tagName !== 'script') {
850
- parser.script += '</' + parser.tagName + '>'
851
- parser.tagName = ''
852
- parser.state = S.SCRIPT
853
- return
854
- }
855
- emitNode(parser, 'onscript', parser.script)
856
- parser.script = ''
857
- }
858
-
859
- // first make sure that the closing tag actually exists.
860
- // <a><b></c></b></a> will close everything, otherwise.
861
- var t = parser.tags.length
862
- var tagName = parser.tagName
863
- if (!parser.strict) {
864
- tagName = tagName[parser.looseCase]()
865
- }
866
- var closeTo = tagName
867
- while (t--) {
868
- var close = parser.tags[t]
869
- if (close.name !== closeTo) {
870
- // fail the first time in strict mode
871
- strictFail(parser, 'Unexpected close tag')
872
- } else {
873
- break
874
- }
875
- }
876
-
877
- // didn't find it. we already failed for strict, so just abort.
878
- if (t < 0) {
879
- strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)
880
- parser.textNode += '</' + parser.tagName + '>'
881
- parser.state = S.TEXT
882
- return
883
- }
884
- parser.tagName = tagName
885
- var s = parser.tags.length
886
- while (s-- > t) {
887
- var tag = parser.tag = parser.tags.pop()
888
- parser.tagName = parser.tag.name
889
- emitNode(parser, 'onclosetag', parser.tagName)
890
-
891
- var x = {}
892
- for (var i in tag.ns) {
893
- x[i] = tag.ns[i]
894
- }
895
-
896
- var parent = parser.tags[parser.tags.length - 1] || parser
897
- if (parser.opt.xmlns && tag.ns !== parent.ns) {
898
- // remove namespace bindings introduced by tag
899
- Object.keys(tag.ns).forEach(function (p) {
900
- var n = tag.ns[p]
901
- emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })
902
- })
903
- }
904
- }
905
- if (t === 0) parser.closedRoot = true
906
- parser.tagName = parser.attribValue = parser.attribName = ''
907
- parser.attribList.length = 0
908
- parser.state = S.TEXT
909
- }
910
-
911
- function parseEntity (parser) {
912
- var entity = parser.entity
913
- var entityLC = entity.toLowerCase()
914
- var num
915
- var numStr = ''
916
-
917
- if (parser.ENTITIES[entity]) {
918
- return parser.ENTITIES[entity]
919
- }
920
- if (parser.ENTITIES[entityLC]) {
921
- return parser.ENTITIES[entityLC]
922
- }
923
- entity = entityLC
924
- if (entity.charAt(0) === '#') {
925
- if (entity.charAt(1) === 'x') {
926
- entity = entity.slice(2)
927
- num = parseInt(entity, 16)
928
- numStr = num.toString(16)
929
- } else {
930
- entity = entity.slice(1)
931
- num = parseInt(entity, 10)
932
- numStr = num.toString(10)
933
- }
934
- }
935
- entity = entity.replace(/^0+/, '')
936
- if (isNaN(num) || numStr.toLowerCase() !== entity) {
937
- strictFail(parser, 'Invalid character entity')
938
- return '&' + parser.entity + ';'
939
- }
940
-
941
- return String.fromCodePoint(num)
942
- }
943
-
944
- function beginWhiteSpace (parser, c) {
945
- if (c === '<') {
946
- parser.state = S.OPEN_WAKA
947
- parser.startTagPosition = parser.position
948
- } else if (!isWhitespace(c)) {
949
- // have to process this as a text node.
950
- // weird, but happens.
951
- strictFail(parser, 'Non-whitespace before first tag.')
952
- parser.textNode = c
953
- parser.state = S.TEXT
954
- }
955
- }
956
-
957
- function charAt (chunk, i) {
958
- var result = ''
959
- if (i < chunk.length) {
960
- result = chunk.charAt(i)
961
- }
962
- return result
963
- }
964
-
965
- function write (chunk) {
966
- var parser = this
967
- if (this.error) {
968
- throw this.error
969
- }
970
- if (parser.closed) {
971
- return error(parser,
972
- 'Cannot write after close. Assign an onready handler.')
973
- }
974
- if (chunk === null) {
975
- return end(parser)
976
- }
977
- if (typeof chunk === 'object') {
978
- chunk = chunk.toString()
979
- }
980
- var i = 0
981
- var c = ''
982
- while (true) {
983
- c = charAt(chunk, i++)
984
- parser.c = c
985
-
986
- if (!c) {
987
- break
988
- }
989
-
990
- if (parser.trackPosition) {
991
- parser.position++
992
- if (c === '\n') {
993
- parser.line++
994
- parser.column = 0
995
- } else {
996
- parser.column++
997
- }
998
- }
999
-
1000
- switch (parser.state) {
1001
- case S.BEGIN:
1002
- parser.state = S.BEGIN_WHITESPACE
1003
- if (c === '\uFEFF') {
1004
- continue
1005
- }
1006
- beginWhiteSpace(parser, c)
1007
- continue
1008
-
1009
- case S.BEGIN_WHITESPACE:
1010
- beginWhiteSpace(parser, c)
1011
- continue
1012
-
1013
- case S.TEXT:
1014
- if (parser.sawRoot && !parser.closedRoot) {
1015
- var starti = i - 1
1016
- while (c && c !== '<' && c !== '&') {
1017
- c = charAt(chunk, i++)
1018
- if (c && parser.trackPosition) {
1019
- parser.position++
1020
- if (c === '\n') {
1021
- parser.line++
1022
- parser.column = 0
1023
- } else {
1024
- parser.column++
1025
- }
1026
- }
1027
- }
1028
- parser.textNode += chunk.substring(starti, i - 1)
1029
- }
1030
- if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
1031
- parser.state = S.OPEN_WAKA
1032
- parser.startTagPosition = parser.position
1033
- } else {
1034
- if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
1035
- strictFail(parser, 'Text data outside of root node.')
1036
- }
1037
- if (c === '&') {
1038
- parser.state = S.TEXT_ENTITY
1039
- } else {
1040
- parser.textNode += c
1041
- }
1042
- }
1043
- continue
1044
-
1045
- case S.SCRIPT:
1046
- // only non-strict
1047
- if (c === '<') {
1048
- parser.state = S.SCRIPT_ENDING
1049
- } else {
1050
- parser.script += c
1051
- }
1052
- continue
1053
-
1054
- case S.SCRIPT_ENDING:
1055
- if (c === '/') {
1056
- parser.state = S.CLOSE_TAG
1057
- } else {
1058
- parser.script += '<' + c
1059
- parser.state = S.SCRIPT
1060
- }
1061
- continue
1062
-
1063
- case S.OPEN_WAKA:
1064
- // either a /, ?, !, or text is coming next.
1065
- if (c === '!') {
1066
- parser.state = S.SGML_DECL
1067
- parser.sgmlDecl = ''
1068
- } else if (isWhitespace(c)) {
1069
- // wait for it...
1070
- } else if (isMatch(nameStart, c)) {
1071
- parser.state = S.OPEN_TAG
1072
- parser.tagName = c
1073
- } else if (c === '/') {
1074
- parser.state = S.CLOSE_TAG
1075
- parser.tagName = ''
1076
- } else if (c === '?') {
1077
- parser.state = S.PROC_INST
1078
- parser.procInstName = parser.procInstBody = ''
1079
- } else {
1080
- strictFail(parser, 'Unencoded <')
1081
- // if there was some whitespace, then add that in.
1082
- if (parser.startTagPosition + 1 < parser.position) {
1083
- var pad = parser.position - parser.startTagPosition
1084
- c = new Array(pad).join(' ') + c
1085
- }
1086
- parser.textNode += '<' + c
1087
- parser.state = S.TEXT
1088
- }
1089
- continue
1090
-
1091
- case S.SGML_DECL:
1092
- if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
1093
- emitNode(parser, 'onopencdata')
1094
- parser.state = S.CDATA
1095
- parser.sgmlDecl = ''
1096
- parser.cdata = ''
1097
- } else if (parser.sgmlDecl + c === '--') {
1098
- parser.state = S.COMMENT
1099
- parser.comment = ''
1100
- parser.sgmlDecl = ''
1101
- } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
1102
- parser.state = S.DOCTYPE
1103
- if (parser.doctype || parser.sawRoot) {
1104
- strictFail(parser,
1105
- 'Inappropriately located doctype declaration')
1106
- }
1107
- parser.doctype = ''
1108
- parser.sgmlDecl = ''
1109
- } else if (c === '>') {
1110
- emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)
1111
- parser.sgmlDecl = ''
1112
- parser.state = S.TEXT
1113
- } else if (isQuote(c)) {
1114
- parser.state = S.SGML_DECL_QUOTED
1115
- parser.sgmlDecl += c
1116
- } else {
1117
- parser.sgmlDecl += c
1118
- }
1119
- continue
1120
-
1121
- case S.SGML_DECL_QUOTED:
1122
- if (c === parser.q) {
1123
- parser.state = S.SGML_DECL
1124
- parser.q = ''
1125
- }
1126
- parser.sgmlDecl += c
1127
- continue
1128
-
1129
- case S.DOCTYPE:
1130
- if (c === '>') {
1131
- parser.state = S.TEXT
1132
- emitNode(parser, 'ondoctype', parser.doctype)
1133
- parser.doctype = true // just remember that we saw it.
1134
- } else {
1135
- parser.doctype += c
1136
- if (c === '[') {
1137
- parser.state = S.DOCTYPE_DTD
1138
- } else if (isQuote(c)) {
1139
- parser.state = S.DOCTYPE_QUOTED
1140
- parser.q = c
1141
- }
1142
- }
1143
- continue
1144
-
1145
- case S.DOCTYPE_QUOTED:
1146
- parser.doctype += c
1147
- if (c === parser.q) {
1148
- parser.q = ''
1149
- parser.state = S.DOCTYPE
1150
- }
1151
- continue
1152
-
1153
- case S.DOCTYPE_DTD:
1154
- parser.doctype += c
1155
- if (c === ']') {
1156
- parser.state = S.DOCTYPE
1157
- } else if (isQuote(c)) {
1158
- parser.state = S.DOCTYPE_DTD_QUOTED
1159
- parser.q = c
1160
- }
1161
- continue
1162
-
1163
- case S.DOCTYPE_DTD_QUOTED:
1164
- parser.doctype += c
1165
- if (c === parser.q) {
1166
- parser.state = S.DOCTYPE_DTD
1167
- parser.q = ''
1168
- }
1169
- continue
1170
-
1171
- case S.COMMENT:
1172
- if (c === '-') {
1173
- parser.state = S.COMMENT_ENDING
1174
- } else {
1175
- parser.comment += c
1176
- }
1177
- continue
1178
-
1179
- case S.COMMENT_ENDING:
1180
- if (c === '-') {
1181
- parser.state = S.COMMENT_ENDED
1182
- parser.comment = textopts(parser.opt, parser.comment)
1183
- if (parser.comment) {
1184
- emitNode(parser, 'oncomment', parser.comment)
1185
- }
1186
- parser.comment = ''
1187
- } else {
1188
- parser.comment += '-' + c
1189
- parser.state = S.COMMENT
1190
- }
1191
- continue
1192
-
1193
- case S.COMMENT_ENDED:
1194
- if (c !== '>') {
1195
- strictFail(parser, 'Malformed comment')
1196
- // allow <!-- blah -- bloo --> in non-strict mode,
1197
- // which is a comment of " blah -- bloo "
1198
- parser.comment += '--' + c
1199
- parser.state = S.COMMENT
1200
- } else {
1201
- parser.state = S.TEXT
1202
- }
1203
- continue
1204
-
1205
- case S.CDATA:
1206
- if (c === ']') {
1207
- parser.state = S.CDATA_ENDING
1208
- } else {
1209
- parser.cdata += c
1210
- }
1211
- continue
1212
-
1213
- case S.CDATA_ENDING:
1214
- if (c === ']') {
1215
- parser.state = S.CDATA_ENDING_2
1216
- } else {
1217
- parser.cdata += ']' + c
1218
- parser.state = S.CDATA
1219
- }
1220
- continue
1221
-
1222
- case S.CDATA_ENDING_2:
1223
- if (c === '>') {
1224
- if (parser.cdata) {
1225
- emitNode(parser, 'oncdata', parser.cdata)
1226
- }
1227
- emitNode(parser, 'onclosecdata')
1228
- parser.cdata = ''
1229
- parser.state = S.TEXT
1230
- } else if (c === ']') {
1231
- parser.cdata += ']'
1232
- } else {
1233
- parser.cdata += ']]' + c
1234
- parser.state = S.CDATA
1235
- }
1236
- continue
1237
-
1238
- case S.PROC_INST:
1239
- if (c === '?') {
1240
- parser.state = S.PROC_INST_ENDING
1241
- } else if (isWhitespace(c)) {
1242
- parser.state = S.PROC_INST_BODY
1243
- } else {
1244
- parser.procInstName += c
1245
- }
1246
- continue
1247
-
1248
- case S.PROC_INST_BODY:
1249
- if (!parser.procInstBody && isWhitespace(c)) {
1250
- continue
1251
- } else if (c === '?') {
1252
- parser.state = S.PROC_INST_ENDING
1253
- } else {
1254
- parser.procInstBody += c
1255
- }
1256
- continue
1257
-
1258
- case S.PROC_INST_ENDING:
1259
- if (c === '>') {
1260
- emitNode(parser, 'onprocessinginstruction', {
1261
- name: parser.procInstName,
1262
- body: parser.procInstBody
1263
- })
1264
- parser.procInstName = parser.procInstBody = ''
1265
- parser.state = S.TEXT
1266
- } else {
1267
- parser.procInstBody += '?' + c
1268
- parser.state = S.PROC_INST_BODY
1269
- }
1270
- continue
1271
-
1272
- case S.OPEN_TAG:
1273
- if (isMatch(nameBody, c)) {
1274
- parser.tagName += c
1275
- } else {
1276
- newTag(parser)
1277
- if (c === '>') {
1278
- openTag(parser)
1279
- } else if (c === '/') {
1280
- parser.state = S.OPEN_TAG_SLASH
1281
- } else {
1282
- if (!isWhitespace(c)) {
1283
- strictFail(parser, 'Invalid character in tag name')
1284
- }
1285
- parser.state = S.ATTRIB
1286
- }
1287
- }
1288
- continue
1289
-
1290
- case S.OPEN_TAG_SLASH:
1291
- if (c === '>') {
1292
- openTag(parser, true)
1293
- closeTag(parser)
1294
- } else {
1295
- strictFail(parser, 'Forward-slash in opening tag not followed by >')
1296
- parser.state = S.ATTRIB
1297
- }
1298
- continue
1299
-
1300
- case S.ATTRIB:
1301
- // haven't read the attribute name yet.
1302
- if (isWhitespace(c)) {
1303
- continue
1304
- } else if (c === '>') {
1305
- openTag(parser)
1306
- } else if (c === '/') {
1307
- parser.state = S.OPEN_TAG_SLASH
1308
- } else if (isMatch(nameStart, c)) {
1309
- parser.attribName = c
1310
- parser.attribValue = ''
1311
- parser.state = S.ATTRIB_NAME
1312
- } else {
1313
- strictFail(parser, 'Invalid attribute name')
1314
- }
1315
- continue
1316
-
1317
- case S.ATTRIB_NAME:
1318
- if (c === '=') {
1319
- parser.state = S.ATTRIB_VALUE
1320
- } else if (c === '>') {
1321
- strictFail(parser, 'Attribute without value')
1322
- parser.attribValue = parser.attribName
1323
- attrib(parser)
1324
- openTag(parser)
1325
- } else if (isWhitespace(c)) {
1326
- parser.state = S.ATTRIB_NAME_SAW_WHITE
1327
- } else if (isMatch(nameBody, c)) {
1328
- parser.attribName += c
1329
- } else {
1330
- strictFail(parser, 'Invalid attribute name')
1331
- }
1332
- continue
1333
-
1334
- case S.ATTRIB_NAME_SAW_WHITE:
1335
- if (c === '=') {
1336
- parser.state = S.ATTRIB_VALUE
1337
- } else if (isWhitespace(c)) {
1338
- continue
1339
- } else {
1340
- strictFail(parser, 'Attribute without value')
1341
- parser.tag.attributes[parser.attribName] = ''
1342
- parser.attribValue = ''
1343
- emitNode(parser, 'onattribute', {
1344
- name: parser.attribName,
1345
- value: ''
1346
- })
1347
- parser.attribName = ''
1348
- if (c === '>') {
1349
- openTag(parser)
1350
- } else if (isMatch(nameStart, c)) {
1351
- parser.attribName = c
1352
- parser.state = S.ATTRIB_NAME
1353
- } else {
1354
- strictFail(parser, 'Invalid attribute name')
1355
- parser.state = S.ATTRIB
1356
- }
1357
- }
1358
- continue
1359
-
1360
- case S.ATTRIB_VALUE:
1361
- if (isWhitespace(c)) {
1362
- continue
1363
- } else if (isQuote(c)) {
1364
- parser.q = c
1365
- parser.state = S.ATTRIB_VALUE_QUOTED
1366
- } else {
1367
- strictFail(parser, 'Unquoted attribute value')
1368
- parser.state = S.ATTRIB_VALUE_UNQUOTED
1369
- parser.attribValue = c
1370
- }
1371
- continue
1372
-
1373
- case S.ATTRIB_VALUE_QUOTED:
1374
- if (c !== parser.q) {
1375
- if (c === '&') {
1376
- parser.state = S.ATTRIB_VALUE_ENTITY_Q
1377
- } else {
1378
- parser.attribValue += c
1379
- }
1380
- continue
1381
- }
1382
- attrib(parser)
1383
- parser.q = ''
1384
- parser.state = S.ATTRIB_VALUE_CLOSED
1385
- continue
1386
-
1387
- case S.ATTRIB_VALUE_CLOSED:
1388
- if (isWhitespace(c)) {
1389
- parser.state = S.ATTRIB
1390
- } else if (c === '>') {
1391
- openTag(parser)
1392
- } else if (c === '/') {
1393
- parser.state = S.OPEN_TAG_SLASH
1394
- } else if (isMatch(nameStart, c)) {
1395
- strictFail(parser, 'No whitespace between attributes')
1396
- parser.attribName = c
1397
- parser.attribValue = ''
1398
- parser.state = S.ATTRIB_NAME
1399
- } else {
1400
- strictFail(parser, 'Invalid attribute name')
1401
- }
1402
- continue
1403
-
1404
- case S.ATTRIB_VALUE_UNQUOTED:
1405
- if (!isAttribEnd(c)) {
1406
- if (c === '&') {
1407
- parser.state = S.ATTRIB_VALUE_ENTITY_U
1408
- } else {
1409
- parser.attribValue += c
1410
- }
1411
- continue
1412
- }
1413
- attrib(parser)
1414
- if (c === '>') {
1415
- openTag(parser)
1416
- } else {
1417
- parser.state = S.ATTRIB
1418
- }
1419
- continue
1420
-
1421
- case S.CLOSE_TAG:
1422
- if (!parser.tagName) {
1423
- if (isWhitespace(c)) {
1424
- continue
1425
- } else if (notMatch(nameStart, c)) {
1426
- if (parser.script) {
1427
- parser.script += '</' + c
1428
- parser.state = S.SCRIPT
1429
- } else {
1430
- strictFail(parser, 'Invalid tagname in closing tag.')
1431
- }
1432
- } else {
1433
- parser.tagName = c
1434
- }
1435
- } else if (c === '>') {
1436
- closeTag(parser)
1437
- } else if (isMatch(nameBody, c)) {
1438
- parser.tagName += c
1439
- } else if (parser.script) {
1440
- parser.script += '</' + parser.tagName
1441
- parser.tagName = ''
1442
- parser.state = S.SCRIPT
1443
- } else {
1444
- if (!isWhitespace(c)) {
1445
- strictFail(parser, 'Invalid tagname in closing tag')
1446
- }
1447
- parser.state = S.CLOSE_TAG_SAW_WHITE
1448
- }
1449
- continue
1450
-
1451
- case S.CLOSE_TAG_SAW_WHITE:
1452
- if (isWhitespace(c)) {
1453
- continue
1454
- }
1455
- if (c === '>') {
1456
- closeTag(parser)
1457
- } else {
1458
- strictFail(parser, 'Invalid characters in closing tag')
1459
- }
1460
- continue
1461
-
1462
- case S.TEXT_ENTITY:
1463
- case S.ATTRIB_VALUE_ENTITY_Q:
1464
- case S.ATTRIB_VALUE_ENTITY_U:
1465
- var returnState
1466
- var buffer
1467
- switch (parser.state) {
1468
- case S.TEXT_ENTITY:
1469
- returnState = S.TEXT
1470
- buffer = 'textNode'
1471
- break
1472
-
1473
- case S.ATTRIB_VALUE_ENTITY_Q:
1474
- returnState = S.ATTRIB_VALUE_QUOTED
1475
- buffer = 'attribValue'
1476
- break
1477
-
1478
- case S.ATTRIB_VALUE_ENTITY_U:
1479
- returnState = S.ATTRIB_VALUE_UNQUOTED
1480
- buffer = 'attribValue'
1481
- break
1482
- }
1483
-
1484
- if (c === ';') {
1485
- parser[buffer] += parseEntity(parser)
1486
- parser.entity = ''
1487
- parser.state = returnState
1488
- } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
1489
- parser.entity += c
1490
- } else {
1491
- strictFail(parser, 'Invalid character in entity name')
1492
- parser[buffer] += '&' + parser.entity + c
1493
- parser.entity = ''
1494
- parser.state = returnState
1495
- }
1496
-
1497
- continue
1498
-
1499
- default:
1500
- throw new Error(parser, 'Unknown state: ' + parser.state)
1501
- }
1502
- } // while
1503
-
1504
- if (parser.position >= parser.bufferCheckPosition) {
1505
- checkBufferLength(parser)
1506
- }
1507
- return parser
1508
- }
1509
-
1510
- /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
1511
- /* istanbul ignore next */
1512
- if (!String.fromCodePoint) {
1513
- (function () {
1514
- var stringFromCharCode = String.fromCharCode
1515
- var floor = Math.floor
1516
- var fromCodePoint = function () {
1517
- var MAX_SIZE = 0x4000
1518
- var codeUnits = []
1519
- var highSurrogate
1520
- var lowSurrogate
1521
- var index = -1
1522
- var length = arguments.length
1523
- if (!length) {
1524
- return ''
1525
- }
1526
- var result = ''
1527
- while (++index < length) {
1528
- var codePoint = Number(arguments[index])
1529
- if (
1530
- !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
1531
- codePoint < 0 || // not a valid Unicode code point
1532
- codePoint > 0x10FFFF || // not a valid Unicode code point
1533
- floor(codePoint) !== codePoint // not an integer
1534
- ) {
1535
- throw RangeError('Invalid code point: ' + codePoint)
1536
- }
1537
- if (codePoint <= 0xFFFF) { // BMP code point
1538
- codeUnits.push(codePoint)
1539
- } else { // Astral code point; split in surrogate halves
1540
- // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
1541
- codePoint -= 0x10000
1542
- highSurrogate = (codePoint >> 10) + 0xD800
1543
- lowSurrogate = (codePoint % 0x400) + 0xDC00
1544
- codeUnits.push(highSurrogate, lowSurrogate)
1545
- }
1546
- if (index + 1 === length || codeUnits.length > MAX_SIZE) {
1547
- result += stringFromCharCode.apply(null, codeUnits)
1548
- codeUnits.length = 0
1549
- }
1550
- }
1551
- return result
1552
- }
1553
- /* istanbul ignore next */
1554
- if (Object.defineProperty) {
1555
- Object.defineProperty(String, 'fromCodePoint', {
1556
- value: fromCodePoint,
1557
- configurable: true,
1558
- writable: true
1559
- })
1560
- } else {
1561
- String.fromCodePoint = fromCodePoint
1562
- }
1563
- }())
1564
- }
1565
- })(typeof exports === 'undefined' ? this.sax = {} : exports)