cssesc-source 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (908) hide show
  1. checksums.yaml +15 -0
  2. data/lib/cssesc/source.rb +7 -0
  3. data/vendor/LICENSE-MIT.txt +20 -0
  4. data/vendor/README.md +207 -0
  5. data/vendor/bin/cssesc +122 -0
  6. data/vendor/cssesc.js +177 -0
  7. data/vendor/man/cssesc.1 +70 -0
  8. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/MIT-LICENSE.txt +21 -0
  9. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/README.md +43 -0
  10. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/bin/stripcolorcodes.js +18 -0
  11. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/index.js +3 -0
  12. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/package.json +42 -0
  13. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/with-colors +2 -0
  14. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/without-colors +2 -0
  15. data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/stripcolorcodes-test.js +20 -0
  16. data/vendor/node_modules/grunt-shell/package.json +53 -0
  17. data/vendor/node_modules/grunt-shell/readme.md +221 -0
  18. data/vendor/node_modules/grunt-shell/tasks/shell.js +54 -0
  19. data/vendor/node_modules/grunt-template/LICENSE-MIT.txt +20 -0
  20. data/vendor/node_modules/grunt-template/README.md +123 -0
  21. data/vendor/node_modules/grunt-template/package.json +50 -0
  22. data/vendor/node_modules/grunt-template/tasks/template.js +44 -0
  23. data/vendor/node_modules/grunt/CONTRIBUTING.md +1 -0
  24. data/vendor/node_modules/grunt/LICENSE-MIT +22 -0
  25. data/vendor/node_modules/grunt/README.md +16 -0
  26. data/vendor/node_modules/grunt/internal-tasks/bump.js +151 -0
  27. data/vendor/node_modules/grunt/internal-tasks/subgrunt.js +34 -0
  28. data/vendor/node_modules/grunt/lib/grunt.js +156 -0
  29. data/vendor/node_modules/grunt/lib/grunt/cli.js +128 -0
  30. data/vendor/node_modules/grunt/lib/grunt/config.js +118 -0
  31. data/vendor/node_modules/grunt/lib/grunt/event.js +16 -0
  32. data/vendor/node_modules/grunt/lib/grunt/fail.js +84 -0
  33. data/vendor/node_modules/grunt/lib/grunt/file.js +440 -0
  34. data/vendor/node_modules/grunt/lib/grunt/help.js +129 -0
  35. data/vendor/node_modules/grunt/lib/grunt/log.js +352 -0
  36. data/vendor/node_modules/grunt/lib/grunt/option.js +42 -0
  37. data/vendor/node_modules/grunt/lib/grunt/task.js +451 -0
  38. data/vendor/node_modules/grunt/lib/grunt/template.js +95 -0
  39. data/vendor/node_modules/grunt/lib/grunt/util.js +188 -0
  40. data/vendor/node_modules/grunt/lib/util/task.js +323 -0
  41. data/vendor/node_modules/grunt/node_modules/async/LICENSE +19 -0
  42. data/vendor/node_modules/grunt/node_modules/async/Makefile +25 -0
  43. data/vendor/node_modules/grunt/node_modules/async/README.md +1021 -0
  44. data/vendor/node_modules/grunt/node_modules/async/index.js +3 -0
  45. data/vendor/node_modules/grunt/node_modules/async/lib/async.js +692 -0
  46. data/vendor/node_modules/grunt/node_modules/async/package.json +32 -0
  47. data/vendor/node_modules/grunt/node_modules/coffee-script/CNAME +1 -0
  48. data/vendor/node_modules/grunt/node_modules/coffee-script/LICENSE +22 -0
  49. data/vendor/node_modules/grunt/node_modules/coffee-script/README +51 -0
  50. data/vendor/node_modules/grunt/node_modules/coffee-script/Rakefile +78 -0
  51. data/vendor/node_modules/grunt/node_modules/coffee-script/bin/cake +7 -0
  52. data/vendor/node_modules/grunt/node_modules/coffee-script/bin/coffee +7 -0
  53. data/vendor/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf +44 -0
  54. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
  55. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
  56. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
  57. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
  58. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
  59. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
  60. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
  61. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
  62. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
  63. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
  64. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
  65. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
  66. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
  67. data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
  68. data/vendor/node_modules/grunt/node_modules/coffee-script/package.json +47 -0
  69. data/vendor/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt +22 -0
  70. data/vendor/node_modules/grunt/node_modules/colors/ReadMe.md +77 -0
  71. data/vendor/node_modules/grunt/node_modules/colors/colors.js +342 -0
  72. data/vendor/node_modules/grunt/node_modules/colors/example.html +76 -0
  73. data/vendor/node_modules/grunt/node_modules/colors/example.js +77 -0
  74. data/vendor/node_modules/grunt/node_modules/colors/package.json +29 -0
  75. data/vendor/node_modules/grunt/node_modules/colors/test.js +70 -0
  76. data/vendor/node_modules/grunt/node_modules/colors/themes/winston-dark.js +12 -0
  77. data/vendor/node_modules/grunt/node_modules/colors/themes/winston-light.js +12 -0
  78. data/vendor/node_modules/grunt/node_modules/dateformat/Readme.md +67 -0
  79. data/vendor/node_modules/grunt/node_modules/dateformat/lib/dateformat.js +165 -0
  80. data/vendor/node_modules/grunt/node_modules/dateformat/package.json +20 -0
  81. data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js +4 -0
  82. data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh +27 -0
  83. data/vendor/node_modules/grunt/node_modules/eventemitter2/README.md +212 -0
  84. data/vendor/node_modules/grunt/node_modules/eventemitter2/index.js +1 -0
  85. data/vendor/node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js +561 -0
  86. data/vendor/node_modules/grunt/node_modules/eventemitter2/package.json +62 -0
  87. data/vendor/node_modules/grunt/node_modules/exit/Gruntfile.js +48 -0
  88. data/vendor/node_modules/grunt/node_modules/exit/LICENSE-MIT +22 -0
  89. data/vendor/node_modules/grunt/node_modules/exit/README.md +75 -0
  90. data/vendor/node_modules/grunt/node_modules/exit/lib/exit.js +41 -0
  91. data/vendor/node_modules/grunt/node_modules/exit/package.json +51 -0
  92. data/vendor/node_modules/grunt/node_modules/exit/test/exit_test.js +121 -0
  93. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
  94. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
  95. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
  96. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
  97. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
  98. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
  99. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
  100. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
  101. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
  102. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh +8 -0
  103. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js +23 -0
  104. data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log.js +25 -0
  105. data/vendor/node_modules/grunt/node_modules/findup-sync/Gruntfile.js +25 -0
  106. data/vendor/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT +22 -0
  107. data/vendor/node_modules/grunt/node_modules/findup-sync/README.md +44 -0
  108. data/vendor/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js +46 -0
  109. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md +164 -0
  110. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js +5152 -0
  111. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js +42 -0
  112. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js +4983 -0
  113. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js +40 -0
  114. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js +4307 -0
  115. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js +34 -0
  116. data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json +62 -0
  117. data/vendor/node_modules/grunt/node_modules/findup-sync/package.json +48 -0
  118. data/vendor/node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js +48 -0
  119. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt +0 -0
  120. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt +0 -0
  121. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt +0 -0
  122. data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt +0 -0
  123. data/vendor/node_modules/grunt/node_modules/getobject/Gruntfile.js +48 -0
  124. data/vendor/node_modules/grunt/node_modules/getobject/LICENSE-MIT +22 -0
  125. data/vendor/node_modules/grunt/node_modules/getobject/README.md +20 -0
  126. data/vendor/node_modules/grunt/node_modules/getobject/lib/getobject.js +60 -0
  127. data/vendor/node_modules/grunt/node_modules/getobject/package.json +48 -0
  128. data/vendor/node_modules/grunt/node_modules/getobject/test/namespace_test.js +51 -0
  129. data/vendor/node_modules/grunt/node_modules/glob/LICENSE +27 -0
  130. data/vendor/node_modules/grunt/node_modules/glob/README.md +233 -0
  131. data/vendor/node_modules/grunt/node_modules/glob/examples/g.js +9 -0
  132. data/vendor/node_modules/grunt/node_modules/glob/examples/usr-local.js +9 -0
  133. data/vendor/node_modules/grunt/node_modules/glob/glob.js +643 -0
  134. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE +27 -0
  135. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md +33 -0
  136. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +442 -0
  137. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json +49 -0
  138. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js +46 -0
  139. data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js +158 -0
  140. data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/README.md +51 -0
  141. data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js +29 -0
  142. data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json +30 -0
  143. data/vendor/node_modules/grunt/node_modules/glob/package.json +40 -0
  144. data/vendor/node_modules/grunt/node_modules/glob/test/00-setup.js +176 -0
  145. data/vendor/node_modules/grunt/node_modules/glob/test/bash-comparison.js +63 -0
  146. data/vendor/node_modules/grunt/node_modules/glob/test/bash-results.json +348 -0
  147. data/vendor/node_modules/grunt/node_modules/glob/test/cwd-test.js +55 -0
  148. data/vendor/node_modules/grunt/node_modules/glob/test/mark.js +74 -0
  149. data/vendor/node_modules/grunt/node_modules/glob/test/nocase-nomagic.js +113 -0
  150. data/vendor/node_modules/grunt/node_modules/glob/test/pause-resume.js +73 -0
  151. data/vendor/node_modules/grunt/node_modules/glob/test/root-nomount.js +39 -0
  152. data/vendor/node_modules/grunt/node_modules/glob/test/root.js +46 -0
  153. data/vendor/node_modules/grunt/node_modules/glob/test/zz-cleanup.js +11 -0
  154. data/vendor/node_modules/grunt/node_modules/hooker/LICENSE-MIT +22 -0
  155. data/vendor/node_modules/grunt/node_modules/hooker/README.md +186 -0
  156. data/vendor/node_modules/grunt/node_modules/hooker/child.js +101 -0
  157. data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.js +169 -0
  158. data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js +4 -0
  159. data/vendor/node_modules/grunt/node_modules/hooker/grunt.js +47 -0
  160. data/vendor/node_modules/grunt/node_modules/hooker/lib/hooker.js +174 -0
  161. data/vendor/node_modules/grunt/node_modules/hooker/package.json +45 -0
  162. data/vendor/node_modules/grunt/node_modules/hooker/parent.js +17 -0
  163. data/vendor/node_modules/grunt/node_modules/hooker/test/hooker_test.js +435 -0
  164. data/vendor/node_modules/grunt/node_modules/iconv-lite/LICENSE +21 -0
  165. data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md +72 -0
  166. data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md~ +54 -0
  167. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/big5.js +9 -0
  168. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js +9 -0
  169. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js +340 -0
  170. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js +1 -0
  171. data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js +1 -0
  172. data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js +25 -0
  173. data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js +142 -0
  174. data/vendor/node_modules/grunt/node_modules/iconv-lite/index.js +231 -0
  175. data/vendor/node_modules/grunt/node_modules/iconv-lite/package.json +80 -0
  176. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5-test.js +36 -0
  177. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt +13 -0
  178. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js +86 -0
  179. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js +38 -0
  180. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt +14 -0
  181. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js +79 -0
  182. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/main-test.js +55 -0
  183. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/performance.js +67 -0
  184. data/vendor/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js +90 -0
  185. data/vendor/node_modules/grunt/node_modules/js-yaml/HISTORY.md +155 -0
  186. data/vendor/node_modules/grunt/node_modules/js-yaml/LICENSE +21 -0
  187. data/vendor/node_modules/grunt/node_modules/js-yaml/README.md +249 -0
  188. data/vendor/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js +125 -0
  189. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js +104 -0
  190. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml +18 -0
  191. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.js +31 -0
  192. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.json +22 -0
  193. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js +15 -0
  194. data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml +197 -0
  195. data/vendor/node_modules/grunt/node_modules/js-yaml/index.js +1 -0
  196. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js +33 -0
  197. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js +60 -0
  198. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js +437 -0
  199. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js +25 -0
  200. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js +1549 -0
  201. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js +78 -0
  202. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js +23 -0
  203. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js +103 -0
  204. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js +16 -0
  205. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js +13 -0
  206. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js +25 -0
  207. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js +82 -0
  208. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js +118 -0
  209. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js +74 -0
  210. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js +102 -0
  211. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js +85 -0
  212. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js +56 -0
  213. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +56 -0
  214. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
  215. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js +11 -0
  216. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js +18 -0
  217. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js +36 -0
  218. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js +53 -0
  219. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js +41 -0
  220. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js +11 -0
  221. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js +31 -0
  222. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js +11 -0
  223. data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +91 -0
  224. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md +109 -0
  225. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE +21 -0
  226. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md +239 -0
  227. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +36 -0
  228. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js +22 -0
  229. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js +59 -0
  230. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js +13 -0
  231. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +33 -0
  232. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js +28 -0
  233. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +23 -0
  234. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +49 -0
  235. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js +35 -0
  236. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +270 -0
  237. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js +1 -0
  238. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js +146 -0
  239. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +55 -0
  240. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +47 -0
  241. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +40 -0
  242. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +48 -0
  243. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +50 -0
  244. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +43 -0
  245. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +27 -0
  246. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +26 -0
  247. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +148 -0
  248. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +50 -0
  249. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +481 -0
  250. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +14 -0
  251. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +50 -0
  252. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +54 -0
  253. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +75 -0
  254. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +1165 -0
  255. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js +18 -0
  256. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +88 -0
  257. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +803 -0
  258. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +77 -0
  259. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile +4 -0
  260. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +17 -0
  261. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +814 -0
  262. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile +23 -0
  263. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +11 -0
  264. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
  265. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +673 -0
  266. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log +0 -0
  267. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +73 -0
  268. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +45 -0
  269. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js +148 -0
  270. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js +685 -0
  271. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js +12 -0
  272. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html +31 -0
  273. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +18 -0
  274. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +200 -0
  275. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
  276. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +426 -0
  277. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +259 -0
  278. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +45 -0
  279. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +548 -0
  280. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +75 -0
  281. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +249 -0
  282. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +9404 -0
  283. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
  284. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +235 -0
  285. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +1977 -0
  286. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js +1201 -0
  287. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME +1 -0
  288. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md +9 -0
  289. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE +22 -0
  290. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md +19 -0
  291. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico +0 -0
  292. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html +2467 -0
  293. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js +1 -0
  294. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +35 -0
  295. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +1 -0
  296. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +1226 -0
  297. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json +50 -0
  298. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md +73 -0
  299. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +117 -0
  300. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +177 -0
  301. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js +3908 -0
  302. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json +59 -0
  303. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js +239 -0
  304. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js +422 -0
  305. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js +66 -0
  306. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js +387 -0
  307. data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js +20238 -0
  308. data/vendor/node_modules/grunt/node_modules/js-yaml/package.json +60 -0
  309. data/vendor/node_modules/grunt/node_modules/lodash/README.md +140 -0
  310. data/vendor/node_modules/grunt/node_modules/lodash/lodash.js +4258 -0
  311. data/vendor/node_modules/grunt/node_modules/lodash/lodash.min.js +35 -0
  312. data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.js +3688 -0
  313. data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.min.js +28 -0
  314. data/vendor/node_modules/grunt/node_modules/lodash/package.json +62 -0
  315. data/vendor/node_modules/grunt/node_modules/minimatch/LICENSE +23 -0
  316. data/vendor/node_modules/grunt/node_modules/minimatch/README.md +218 -0
  317. data/vendor/node_modules/grunt/node_modules/minimatch/minimatch.js +1055 -0
  318. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
  319. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
  320. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
  321. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
  322. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
  323. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
  324. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
  325. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
  326. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
  327. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
  328. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
  329. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
  330. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
  331. data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
  332. data/vendor/node_modules/grunt/node_modules/minimatch/package.json +40 -0
  333. data/vendor/node_modules/grunt/node_modules/minimatch/test/basic.js +399 -0
  334. data/vendor/node_modules/grunt/node_modules/minimatch/test/brace-expand.js +33 -0
  335. data/vendor/node_modules/grunt/node_modules/minimatch/test/caching.js +14 -0
  336. data/vendor/node_modules/grunt/node_modules/minimatch/test/defaults.js +274 -0
  337. data/vendor/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  338. data/vendor/node_modules/grunt/node_modules/nopt/LICENSE +23 -0
  339. data/vendor/node_modules/grunt/node_modules/nopt/README.md +208 -0
  340. data/vendor/node_modules/grunt/node_modules/nopt/bin/nopt.js +44 -0
  341. data/vendor/node_modules/grunt/node_modules/nopt/examples/my-program.js +30 -0
  342. data/vendor/node_modules/grunt/node_modules/nopt/lib/nopt.js +552 -0
  343. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE +23 -0
  344. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md +23 -0
  345. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/lib/abbrev.js +111 -0
  346. data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json +29 -0
  347. data/vendor/node_modules/grunt/node_modules/nopt/package.json +36 -0
  348. data/vendor/node_modules/grunt/node_modules/rimraf/AUTHORS +6 -0
  349. data/vendor/node_modules/grunt/node_modules/rimraf/LICENSE +23 -0
  350. data/vendor/node_modules/grunt/node_modules/rimraf/README.md +21 -0
  351. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/LICENSE +23 -0
  352. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/README.md +5 -0
  353. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js +312 -0
  354. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/package.json +40 -0
  355. data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/test/open.js +41 -0
  356. data/vendor/node_modules/grunt/node_modules/rimraf/package.json +59 -0
  357. data/vendor/node_modules/grunt/node_modules/rimraf/rimraf.js +161 -0
  358. data/vendor/node_modules/grunt/node_modules/rimraf/test/run.sh +10 -0
  359. data/vendor/node_modules/grunt/node_modules/rimraf/test/setup.sh +47 -0
  360. data/vendor/node_modules/grunt/node_modules/rimraf/test/test-async.js +5 -0
  361. data/vendor/node_modules/grunt/node_modules/rimraf/test/test-fiber.js +0 -0
  362. data/vendor/node_modules/grunt/node_modules/rimraf/test/test-sync.js +3 -0
  363. data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile +5 -0
  364. data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile.lock +34 -0
  365. data/vendor/node_modules/grunt/node_modules/underscore.string/README.markdown +668 -0
  366. data/vendor/node_modules/grunt/node_modules/underscore.string/Rakefile +28 -0
  367. data/vendor/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
  368. data/vendor/node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js +525 -0
  369. data/vendor/node_modules/grunt/node_modules/underscore.string/package.json +72 -0
  370. data/vendor/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js +44 -0
  371. data/vendor/node_modules/grunt/node_modules/underscore.string/test/speed.js +138 -0
  372. data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings.js +438 -0
  373. data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js +12 -0
  374. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test.html +31 -0
  375. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html +18 -0
  376. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js +166 -0
  377. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
  378. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js +270 -0
  379. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js +198 -0
  380. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js +535 -0
  381. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js +70 -0
  382. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js +27 -0
  383. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html +19 -0
  384. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html +43 -0
  385. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js +155 -0
  386. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +19 -0
  387. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
  388. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +196 -0
  389. data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +2360 -0
  390. data/vendor/node_modules/grunt/node_modules/underscore.string/test/underscore.js +999 -0
  391. data/vendor/node_modules/grunt/node_modules/which/LICENSE +23 -0
  392. data/vendor/node_modules/grunt/node_modules/which/README.md +5 -0
  393. data/vendor/node_modules/grunt/node_modules/which/bin/which +14 -0
  394. data/vendor/node_modules/grunt/node_modules/which/package.json +31 -0
  395. data/vendor/node_modules/grunt/node_modules/which/which.js +104 -0
  396. data/vendor/node_modules/grunt/package.json +82 -0
  397. data/vendor/node_modules/istanbul/CHANGELOG.md +57 -0
  398. data/vendor/node_modules/istanbul/LICENSE +24 -0
  399. data/vendor/node_modules/istanbul/README.md +205 -0
  400. data/vendor/node_modules/istanbul/index.js +115 -0
  401. data/vendor/node_modules/istanbul/lib/cli.js +74 -0
  402. data/vendor/node_modules/istanbul/lib/collector.js +121 -0
  403. data/vendor/node_modules/istanbul/lib/command/check-coverage.js +115 -0
  404. data/vendor/node_modules/istanbul/lib/command/common/run-with-cover.js +199 -0
  405. data/vendor/node_modules/istanbul/lib/command/cover.js +33 -0
  406. data/vendor/node_modules/istanbul/lib/command/help.js +58 -0
  407. data/vendor/node_modules/istanbul/lib/command/index.js +33 -0
  408. data/vendor/node_modules/istanbul/lib/command/instrument.js +244 -0
  409. data/vendor/node_modules/istanbul/lib/command/report.js +97 -0
  410. data/vendor/node_modules/istanbul/lib/command/test.js +31 -0
  411. data/vendor/node_modules/istanbul/lib/hook.js +187 -0
  412. data/vendor/node_modules/istanbul/lib/instrumenter.js +759 -0
  413. data/vendor/node_modules/istanbul/lib/object-utils.js +341 -0
  414. data/vendor/node_modules/istanbul/lib/register-plugins.js +15 -0
  415. data/vendor/node_modules/istanbul/lib/report/cobertura.js +207 -0
  416. data/vendor/node_modules/istanbul/lib/report/html.js +517 -0
  417. data/vendor/node_modules/istanbul/lib/report/index.js +60 -0
  418. data/vendor/node_modules/istanbul/lib/report/json.js +55 -0
  419. data/vendor/node_modules/istanbul/lib/report/lcov.js +49 -0
  420. data/vendor/node_modules/istanbul/lib/report/lcovonly.js +93 -0
  421. data/vendor/node_modules/istanbul/lib/report/none.js +20 -0
  422. data/vendor/node_modules/istanbul/lib/report/teamcity.js +82 -0
  423. data/vendor/node_modules/istanbul/lib/report/templates/foot.txt +102 -0
  424. data/vendor/node_modules/istanbul/lib/report/templates/head.txt +200 -0
  425. data/vendor/node_modules/istanbul/lib/report/text-summary.js +72 -0
  426. data/vendor/node_modules/istanbul/lib/report/text.js +210 -0
  427. data/vendor/node_modules/istanbul/lib/store/fslookup.js +60 -0
  428. data/vendor/node_modules/istanbul/lib/store/index.js +122 -0
  429. data/vendor/node_modules/istanbul/lib/store/memory.js +55 -0
  430. data/vendor/node_modules/istanbul/lib/store/tmp.js +80 -0
  431. data/vendor/node_modules/istanbul/lib/util/factory.js +88 -0
  432. data/vendor/node_modules/istanbul/lib/util/file-matcher.js +60 -0
  433. data/vendor/node_modules/istanbul/lib/util/file-writer.js +131 -0
  434. data/vendor/node_modules/istanbul/lib/util/flow-control.js +26 -0
  435. data/vendor/node_modules/istanbul/lib/util/help-formatter.js +24 -0
  436. data/vendor/node_modules/istanbul/lib/util/input-error.js +12 -0
  437. data/vendor/node_modules/istanbul/lib/util/insertion-text.js +109 -0
  438. data/vendor/node_modules/istanbul/lib/util/meta.js +13 -0
  439. data/vendor/node_modules/istanbul/lib/util/tree-summarizer.js +213 -0
  440. data/vendor/node_modules/istanbul/lib/util/writer.js +56 -0
  441. data/vendor/node_modules/istanbul/lib/util/yui-load-hook.js +49 -0
  442. data/vendor/node_modules/istanbul/lib/vendor/prettify.css +1 -0
  443. data/vendor/node_modules/istanbul/lib/vendor/prettify.js +1 -0
  444. data/vendor/node_modules/istanbul/node_modules/abbrev/LICENSE +23 -0
  445. data/vendor/node_modules/istanbul/node_modules/abbrev/README.md +23 -0
  446. data/vendor/node_modules/istanbul/node_modules/abbrev/lib/abbrev.js +111 -0
  447. data/vendor/node_modules/istanbul/node_modules/abbrev/package.json +29 -0
  448. data/vendor/node_modules/istanbul/node_modules/async/LICENSE +19 -0
  449. data/vendor/node_modules/istanbul/node_modules/async/README.md +1414 -0
  450. data/vendor/node_modules/istanbul/node_modules/async/component.json +11 -0
  451. data/vendor/node_modules/istanbul/node_modules/async/lib/async.js +955 -0
  452. data/vendor/node_modules/istanbul/node_modules/async/package.json +43 -0
  453. data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.BSD +19 -0
  454. data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.source-map +27 -0
  455. data/vendor/node_modules/istanbul/node_modules/escodegen/README.md +99 -0
  456. data/vendor/node_modules/istanbul/node_modules/escodegen/bin/escodegen.js +45 -0
  457. data/vendor/node_modules/istanbul/node_modules/escodegen/bin/esgenerate.js +45 -0
  458. data/vendor/node_modules/istanbul/node_modules/escodegen/component.json +48 -0
  459. data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.browser.js +3072 -0
  460. data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.js +2275 -0
  461. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
  462. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/README.md +29 -0
  463. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/estraverse.js +315 -0
  464. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/package.json +41 -0
  465. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +112 -0
  466. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
  467. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
  468. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/README.md +434 -0
  469. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
  470. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
  471. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  472. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
  473. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
  474. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  475. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
  476. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
  477. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
  478. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
  479. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +97 -0
  480. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  481. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
  482. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  483. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
  484. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
  485. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +371 -0
  486. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +205 -0
  487. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  488. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +171 -0
  489. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  490. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
  491. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +36 -0
  492. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/package.json +110 -0
  493. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/run-tests.js +71 -0
  494. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
  495. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +104 -0
  496. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  497. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
  498. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  499. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  500. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
  501. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
  502. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +365 -0
  503. data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +161 -0
  504. data/vendor/node_modules/istanbul/node_modules/escodegen/package.json +58 -0
  505. data/vendor/node_modules/istanbul/node_modules/esprima/README.md +73 -0
  506. data/vendor/node_modules/istanbul/node_modules/esprima/bin/esparse.js +117 -0
  507. data/vendor/node_modules/istanbul/node_modules/esprima/bin/esvalidate.js +177 -0
  508. data/vendor/node_modules/istanbul/node_modules/esprima/esprima.js +3908 -0
  509. data/vendor/node_modules/istanbul/node_modules/esprima/package.json +59 -0
  510. data/vendor/node_modules/istanbul/node_modules/esprima/test/compat.js +239 -0
  511. data/vendor/node_modules/istanbul/node_modules/esprima/test/reflect.js +422 -0
  512. data/vendor/node_modules/istanbul/node_modules/esprima/test/run.js +66 -0
  513. data/vendor/node_modules/istanbul/node_modules/esprima/test/runner.js +387 -0
  514. data/vendor/node_modules/istanbul/node_modules/esprima/test/test.js +20238 -0
  515. data/vendor/node_modules/istanbul/node_modules/fileset/LICENSE-MIT +22 -0
  516. data/vendor/node_modules/istanbul/node_modules/fileset/README.md +87 -0
  517. data/vendor/node_modules/istanbul/node_modules/fileset/lib/fileset.js +64 -0
  518. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/LICENSE +27 -0
  519. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/README.md +250 -0
  520. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/g.js +9 -0
  521. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/usr-local.js +9 -0
  522. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/glob.js +680 -0
  523. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE +16 -0
  524. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md +42 -0
  525. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js +1 -0
  526. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
  527. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json +33 -0
  528. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js +25 -0
  529. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/package.json +39 -0
  530. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/00-setup.js +176 -0
  531. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-comparison.js +63 -0
  532. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-results.json +350 -0
  533. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/cwd-test.js +55 -0
  534. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/globstar-match.js +19 -0
  535. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/mark.js +74 -0
  536. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/new-glob-optional-options.js +10 -0
  537. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js +113 -0
  538. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/pause-resume.js +73 -0
  539. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root-nomount.js +39 -0
  540. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root.js +46 -0
  541. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/stat.js +32 -0
  542. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/zz-cleanup.js +11 -0
  543. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/LICENSE +23 -0
  544. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/README.md +218 -0
  545. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/minimatch.js +1055 -0
  546. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
  547. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
  548. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
  549. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
  550. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
  551. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
  552. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
  553. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
  554. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
  555. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
  556. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
  557. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
  558. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
  559. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
  560. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/package.json +40 -0
  561. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/basic.js +399 -0
  562. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/brace-expand.js +33 -0
  563. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/caching.js +14 -0
  564. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/defaults.js +274 -0
  565. data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  566. data/vendor/node_modules/istanbul/node_modules/fileset/package.json +34 -0
  567. data/vendor/node_modules/istanbul/node_modules/fileset/tests/fixtures/an (odd) filename.js +1 -0
  568. data/vendor/node_modules/istanbul/node_modules/fileset/tests/helper.js +61 -0
  569. data/vendor/node_modules/istanbul/node_modules/fileset/tests/test.js +133 -0
  570. data/vendor/node_modules/istanbul/node_modules/handlebars/LICENSE +19 -0
  571. data/vendor/node_modules/istanbul/node_modules/handlebars/README.markdown +391 -0
  572. data/vendor/node_modules/istanbul/node_modules/handlebars/bin/handlebars +213 -0
  573. data/vendor/node_modules/istanbul/node_modules/handlebars/bower.json +9 -0
  574. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.js +2278 -0
  575. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.min.js +2 -0
  576. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.js +362 -0
  577. data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.min.js +1 -0
  578. data/vendor/node_modules/istanbul/node_modules/handlebars/global-test.js +18 -0
  579. data/vendor/node_modules/istanbul/node_modules/handlebars/global.js +4 -0
  580. data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars-source.gemspec +21 -0
  581. data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars.js.nuspec +17 -0
  582. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars.js +43 -0
  583. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/base.js +166 -0
  584. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-prefix.js +3 -0
  585. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-suffix.js +1 -0
  586. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/ast.js +138 -0
  587. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/base.js +21 -0
  588. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/compiler.js +1305 -0
  589. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/index.js +16 -0
  590. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/parser.js +483 -0
  591. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/printer.js +138 -0
  592. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/visitor.js +18 -0
  593. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/runtime.js +106 -0
  594. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/source.rb +11 -0
  595. data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/utils.js +83 -0
  596. data/vendor/node_modules/istanbul/node_modules/handlebars/min.sh +11 -0
  597. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/LICENSE +21 -0
  598. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/bool.js +10 -0
  599. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_double.js +7 -0
  600. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_single.js +7 -0
  601. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_hash.js +8 -0
  602. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_singles.js +7 -0
  603. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/divide.js +8 -0
  604. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count.js +20 -0
  605. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_options.js +29 -0
  606. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_wrap.js +29 -0
  607. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/nonopt.js +4 -0
  608. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/reflect.js +2 -0
  609. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/short.js +3 -0
  610. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/string.js +11 -0
  611. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/usage-options.js +19 -0
  612. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/xup.js +10 -0
  613. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/index.js +478 -0
  614. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/package.json +46 -0
  615. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/readme.markdown +487 -0
  616. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_.js +71 -0
  617. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/argv.js +2 -0
  618. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/bin.js +3 -0
  619. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/parse.js +446 -0
  620. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/usage.js +292 -0
  621. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/LICENSE +29 -0
  622. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/README.md +588 -0
  623. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs +402 -0
  624. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/ast.js +985 -0
  625. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/compress.js +2028 -0
  626. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/mozilla-ast.js +267 -0
  627. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/output.js +1229 -0
  628. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/parse.js +1410 -0
  629. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/scope.js +581 -0
  630. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/sourcemap.js +81 -0
  631. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/transform.js +217 -0
  632. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/utils.js +295 -0
  633. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +112 -0
  634. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
  635. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
  636. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/README.md +434 -0
  637. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
  638. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
  639. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
  640. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
  641. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
  642. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
  643. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
  644. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
  645. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
  646. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
  647. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +97 -0
  648. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
  649. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
  650. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
  651. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
  652. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
  653. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +371 -0
  654. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +205 -0
  655. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
  656. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +171 -0
  657. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
  658. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
  659. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +37 -0
  660. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/package.json +110 -0
  661. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +71 -0
  662. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
  663. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +104 -0
  664. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
  665. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
  666. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
  667. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
  668. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
  669. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
  670. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +365 -0
  671. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +161 -0
  672. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/package.json +39 -0
  673. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/arrays.js +12 -0
  674. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/blocks.js +49 -0
  675. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/conditionals.js +143 -0
  676. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/dead-code.js +89 -0
  677. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/debugger.js +24 -0
  678. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
  679. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-105.js +25 -0
  680. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-12.js +11 -0
  681. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js +48 -0
  682. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-22.js +17 -0
  683. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-44.js +31 -0
  684. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-59.js +30 -0
  685. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/labels.js +163 -0
  686. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/loops.js +123 -0
  687. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/properties.js +54 -0
  688. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/sequences.js +161 -0
  689. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/switch.js +260 -0
  690. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/typeof.js +25 -0
  691. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/run-tests.js +170 -0
  692. data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/tools/node.js +165 -0
  693. data/vendor/node_modules/istanbul/node_modules/handlebars/package.json +42 -0
  694. data/vendor/node_modules/istanbul/node_modules/handlebars/release-notes.md +93 -0
  695. data/vendor/node_modules/istanbul/node_modules/handlebars/test.js +20 -0
  696. data/vendor/node_modules/istanbul/node_modules/mkdirp/LICENSE +21 -0
  697. data/vendor/node_modules/istanbul/node_modules/mkdirp/examples/pow.js +6 -0
  698. data/vendor/node_modules/istanbul/node_modules/mkdirp/index.js +82 -0
  699. data/vendor/node_modules/istanbul/node_modules/mkdirp/package.json +34 -0
  700. data/vendor/node_modules/istanbul/node_modules/mkdirp/readme.markdown +63 -0
  701. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/chmod.js +38 -0
  702. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/clobber.js +37 -0
  703. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/mkdirp.js +28 -0
  704. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm.js +32 -0
  705. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm_sync.js +39 -0
  706. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/race.js +41 -0
  707. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/rel.js +32 -0
  708. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return.js +25 -0
  709. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return_sync.js +24 -0
  710. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/root.js +18 -0
  711. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/sync.js +32 -0
  712. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask.js +28 -0
  713. data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask_sync.js +32 -0
  714. data/vendor/node_modules/istanbul/node_modules/nopt/LICENSE +23 -0
  715. data/vendor/node_modules/istanbul/node_modules/nopt/README.md +210 -0
  716. data/vendor/node_modules/istanbul/node_modules/nopt/bin/nopt.js +51 -0
  717. data/vendor/node_modules/istanbul/node_modules/nopt/examples/my-program.js +30 -0
  718. data/vendor/node_modules/istanbul/node_modules/nopt/lib/nopt.js +612 -0
  719. data/vendor/node_modules/istanbul/node_modules/nopt/package.json +36 -0
  720. data/vendor/node_modules/istanbul/node_modules/resolve/LICENSE +18 -0
  721. data/vendor/node_modules/istanbul/node_modules/resolve/example/async.js +5 -0
  722. data/vendor/node_modules/istanbul/node_modules/resolve/example/sync.js +3 -0
  723. data/vendor/node_modules/istanbul/node_modules/resolve/index.js +5 -0
  724. data/vendor/node_modules/istanbul/node_modules/resolve/lib/async.js +125 -0
  725. data/vendor/node_modules/istanbul/node_modules/resolve/lib/caller.js +8 -0
  726. data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.js +4 -0
  727. data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.json +38 -0
  728. data/vendor/node_modules/istanbul/node_modules/resolve/lib/node-modules-paths.js +25 -0
  729. data/vendor/node_modules/istanbul/node_modules/resolve/lib/sync.js +80 -0
  730. data/vendor/node_modules/istanbul/node_modules/resolve/package.json +36 -0
  731. data/vendor/node_modules/istanbul/node_modules/resolve/readme.markdown +144 -0
  732. data/vendor/node_modules/istanbul/node_modules/resolve/test/core.js +12 -0
  733. data/vendor/node_modules/istanbul/node_modules/resolve/test/filter.js +18 -0
  734. data/vendor/node_modules/istanbul/node_modules/resolve/test/filter_sync.js +15 -0
  735. data/vendor/node_modules/istanbul/node_modules/resolve/test/mock.js +142 -0
  736. data/vendor/node_modules/istanbul/node_modules/resolve/test/mock_sync.js +68 -0
  737. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver.js +270 -0
  738. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
  739. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  740. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/package.json +3 -0
  741. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  742. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +1 -0
  743. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +3 -0
  744. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
  745. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
  746. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/cup.coffee +1 -0
  747. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/foo.js +1 -0
  748. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  749. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  750. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.coffee +0 -0
  751. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.js +0 -0
  752. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  753. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  754. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  755. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/main.js +6 -0
  756. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +1 -0
  757. data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver_sync.js +170 -0
  758. data/vendor/node_modules/istanbul/node_modules/which/LICENSE +23 -0
  759. data/vendor/node_modules/istanbul/node_modules/which/README.md +5 -0
  760. data/vendor/node_modules/istanbul/node_modules/which/bin/which +14 -0
  761. data/vendor/node_modules/istanbul/node_modules/which/package.json +32 -0
  762. data/vendor/node_modules/istanbul/node_modules/which/which.js +104 -0
  763. data/vendor/node_modules/istanbul/node_modules/wordwrap/README.markdown +70 -0
  764. data/vendor/node_modules/istanbul/node_modules/wordwrap/example/center.js +10 -0
  765. data/vendor/node_modules/istanbul/node_modules/wordwrap/example/meat.js +3 -0
  766. data/vendor/node_modules/istanbul/node_modules/wordwrap/index.js +76 -0
  767. data/vendor/node_modules/istanbul/node_modules/wordwrap/package.json +45 -0
  768. data/vendor/node_modules/istanbul/node_modules/wordwrap/test/break.js +30 -0
  769. data/vendor/node_modules/istanbul/node_modules/wordwrap/test/idleness.txt +63 -0
  770. data/vendor/node_modules/istanbul/node_modules/wordwrap/test/wrap.js +31 -0
  771. data/vendor/node_modules/istanbul/package.json +117 -0
  772. data/vendor/node_modules/istanbul/test/browser/support/index.html +153 -0
  773. data/vendor/node_modules/istanbul/test/browser/support/phantom-test.client.js +49 -0
  774. data/vendor/node_modules/istanbul/test/browser/support/server.js +154 -0
  775. data/vendor/node_modules/istanbul/test/browser/test-browser-instrumentation.js +94 -0
  776. data/vendor/node_modules/istanbul/test/cli-helper.js +219 -0
  777. data/vendor/node_modules/istanbul/test/cli/package.json +8 -0
  778. data/vendor/node_modules/istanbul/test/cli/sample-project/amd/ipsum.js +11 -0
  779. data/vendor/node_modules/istanbul/test/cli/sample-project/amd/lorem.js +7 -0
  780. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/bar.js +13 -0
  781. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/foo.js +12 -0
  782. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/bad.js +1 -0
  783. data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/generate-names.js +5 -0
  784. data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/dependency/index.js +9 -0
  785. data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/hook.js +11 -0
  786. data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/package.json +5 -0
  787. data/vendor/node_modules/istanbul/test/cli/sample-project/test/amd-run.js +16 -0
  788. data/vendor/node_modules/istanbul/test/cli/sample-project/test/global-leak.js +30 -0
  789. data/vendor/node_modules/istanbul/test/cli/sample-project/test/run.js +25 -0
  790. data/vendor/node_modules/istanbul/test/cli/sample-project/vendor/dummy_vendor_lib.js +9 -0
  791. data/vendor/node_modules/istanbul/test/cli/test-base-cli.js +39 -0
  792. data/vendor/node_modules/istanbul/test/cli/test-check-coverage-command.js +97 -0
  793. data/vendor/node_modules/istanbul/test/cli/test-cobertura-report.js +54 -0
  794. data/vendor/node_modules/istanbul/test/cli/test-cover-command.js +170 -0
  795. data/vendor/node_modules/istanbul/test/cli/test-html-report.js +125 -0
  796. data/vendor/node_modules/istanbul/test/cli/test-instrument-command.js +167 -0
  797. data/vendor/node_modules/istanbul/test/cli/test-json-report.js +60 -0
  798. data/vendor/node_modules/istanbul/test/cli/test-lcov-report.js +58 -0
  799. data/vendor/node_modules/istanbul/test/cli/test-lcovonly-report.js +61 -0
  800. data/vendor/node_modules/istanbul/test/cli/test-lots-of-files.js +87 -0
  801. data/vendor/node_modules/istanbul/test/cli/test-none-report.js +17 -0
  802. data/vendor/node_modules/istanbul/test/cli/test-report-command.js +65 -0
  803. data/vendor/node_modules/istanbul/test/cli/test-teamcity-report.js +54 -0
  804. data/vendor/node_modules/istanbul/test/cli/test-test-command.js +43 -0
  805. data/vendor/node_modules/istanbul/test/common.js +19 -0
  806. data/vendor/node_modules/istanbul/test/helper.js +122 -0
  807. data/vendor/node_modules/istanbul/test/instrumentation/test-do.js +53 -0
  808. data/vendor/node_modules/istanbul/test/instrumentation/test-expressions.js +70 -0
  809. data/vendor/node_modules/istanbul/test/instrumentation/test-for.js +206 -0
  810. data/vendor/node_modules/istanbul/test/instrumentation/test-forin.js +50 -0
  811. data/vendor/node_modules/istanbul/test/instrumentation/test-functions.js +102 -0
  812. data/vendor/node_modules/istanbul/test/instrumentation/test-if.js +393 -0
  813. data/vendor/node_modules/istanbul/test/instrumentation/test-misc.js +35 -0
  814. data/vendor/node_modules/istanbul/test/instrumentation/test-statement.js +182 -0
  815. data/vendor/node_modules/istanbul/test/instrumentation/test-strict.js +121 -0
  816. data/vendor/node_modules/istanbul/test/instrumentation/test-switch.js +155 -0
  817. data/vendor/node_modules/istanbul/test/instrumentation/test-while.js +104 -0
  818. data/vendor/node_modules/istanbul/test/loader.js +38 -0
  819. data/vendor/node_modules/istanbul/test/other/data-complete-copy/baz.js +3 -0
  820. data/vendor/node_modules/istanbul/test/other/data-complete-copy/fixture.xml +1 -0
  821. data/vendor/node_modules/istanbul/test/other/data-complete-copy/foo.js +4 -0
  822. data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile1 +0 -0
  823. data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile2 +1 -0
  824. data/vendor/node_modules/istanbul/test/other/data-complete-copy/subdir/x.css +3 -0
  825. data/vendor/node_modules/istanbul/test/other/data/baz.js +3 -0
  826. data/vendor/node_modules/istanbul/test/other/data/foo.js +4 -0
  827. data/vendor/node_modules/istanbul/test/other/data/matcher/general/general.js +2 -0
  828. data/vendor/node_modules/istanbul/test/other/data/matcher/general/node_modules/mod-file.js +2 -0
  829. data/vendor/node_modules/istanbul/test/other/data/matcher/lib/lib-top.js +2 -0
  830. data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/dep/mod-file.js +2 -0
  831. data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/mod-file.js +2 -0
  832. data/vendor/node_modules/istanbul/test/other/data/matcher/top.js +2 -0
  833. data/vendor/node_modules/istanbul/test/other/test-collector.js +85 -0
  834. data/vendor/node_modules/istanbul/test/other/test-command-xface.js +35 -0
  835. data/vendor/node_modules/istanbul/test/other/test-file-writer.js +71 -0
  836. data/vendor/node_modules/istanbul/test/other/test-help-formatter.js +31 -0
  837. data/vendor/node_modules/istanbul/test/other/test-hook.js +87 -0
  838. data/vendor/node_modules/istanbul/test/other/test-index-xface.js +17 -0
  839. data/vendor/node_modules/istanbul/test/other/test-input-error.js +10 -0
  840. data/vendor/node_modules/istanbul/test/other/test-insertion-text.js +102 -0
  841. data/vendor/node_modules/istanbul/test/other/test-matcher.js +93 -0
  842. data/vendor/node_modules/istanbul/test/other/test-object-utils.js +201 -0
  843. data/vendor/node_modules/istanbul/test/other/test-store.js +129 -0
  844. data/vendor/node_modules/istanbul/test/other/test-summarizer.js +172 -0
  845. data/vendor/node_modules/istanbul/test/run-again.js +19 -0
  846. data/vendor/node_modules/istanbul/test/run.js +108 -0
  847. data/vendor/node_modules/istanbul/yui-coverage-comparison.md +85 -0
  848. data/vendor/node_modules/qunit-clib/LICENSE.txt +20 -0
  849. data/vendor/node_modules/qunit-clib/README.md +2 -0
  850. data/vendor/node_modules/qunit-clib/package.json +36 -0
  851. data/vendor/node_modules/qunit-clib/qunit-clib.js +570 -0
  852. data/vendor/node_modules/qunitjs/AUTHORS.txt +55 -0
  853. data/vendor/node_modules/qunitjs/History.md +496 -0
  854. data/vendor/node_modules/qunitjs/README.md +62 -0
  855. data/vendor/node_modules/qunitjs/addons/canvas/README.md +17 -0
  856. data/vendor/node_modules/qunitjs/addons/canvas/canvas-test.js +76 -0
  857. data/vendor/node_modules/qunitjs/addons/canvas/canvas.html +15 -0
  858. data/vendor/node_modules/qunitjs/addons/canvas/qunit-canvas.js +6 -0
  859. data/vendor/node_modules/qunitjs/addons/close-enough/README.md +18 -0
  860. data/vendor/node_modules/qunitjs/addons/close-enough/close-enough-test.js +35 -0
  861. data/vendor/node_modules/qunitjs/addons/close-enough/close-enough.html +14 -0
  862. data/vendor/node_modules/qunitjs/addons/close-enough/qunit-close-enough.js +32 -0
  863. data/vendor/node_modules/qunitjs/addons/composite/README.md +26 -0
  864. data/vendor/node_modules/qunitjs/addons/composite/composite-demo-test.html +24 -0
  865. data/vendor/node_modules/qunitjs/addons/composite/index.html +34 -0
  866. data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.css +13 -0
  867. data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.js +112 -0
  868. data/vendor/node_modules/qunitjs/addons/junitlogger/README.md +18 -0
  869. data/vendor/node_modules/qunitjs/addons/junitlogger/index.html +44 -0
  870. data/vendor/node_modules/qunitjs/addons/junitlogger/junitlogger.js +306 -0
  871. data/vendor/node_modules/qunitjs/addons/phantomjs/README.md +16 -0
  872. data/vendor/node_modules/qunitjs/addons/phantomjs/runner.js +127 -0
  873. data/vendor/node_modules/qunitjs/addons/step/README.md +20 -0
  874. data/vendor/node_modules/qunitjs/addons/step/qunit-step.js +26 -0
  875. data/vendor/node_modules/qunitjs/addons/step/step-test.js +15 -0
  876. data/vendor/node_modules/qunitjs/addons/step/step.html +14 -0
  877. data/vendor/node_modules/qunitjs/addons/themes/README.md +6 -0
  878. data/vendor/node_modules/qunitjs/addons/themes/gabe.css +371 -0
  879. data/vendor/node_modules/qunitjs/addons/themes/gabe.html +15 -0
  880. data/vendor/node_modules/qunitjs/addons/themes/ninja.css +196 -0
  881. data/vendor/node_modules/qunitjs/addons/themes/ninja.html +15 -0
  882. data/vendor/node_modules/qunitjs/addons/themes/nv.css +217 -0
  883. data/vendor/node_modules/qunitjs/addons/themes/nv.html +15 -0
  884. data/vendor/node_modules/qunitjs/grunt.js +101 -0
  885. data/vendor/node_modules/qunitjs/package.json +49 -0
  886. data/vendor/node_modules/qunitjs/qunit/qunit.css +244 -0
  887. data/vendor/node_modules/qunitjs/qunit/qunit.js +2152 -0
  888. data/vendor/node_modules/qunitjs/test/async.html +26 -0
  889. data/vendor/node_modules/qunitjs/test/async.js +6 -0
  890. data/vendor/node_modules/qunitjs/test/deepEqual.js +1438 -0
  891. data/vendor/node_modules/qunitjs/test/headless.html +28 -0
  892. data/vendor/node_modules/qunitjs/test/index.html +16 -0
  893. data/vendor/node_modules/qunitjs/test/logs.html +14 -0
  894. data/vendor/node_modules/qunitjs/test/logs.js +184 -0
  895. data/vendor/node_modules/qunitjs/test/narwhal-test.js +22 -0
  896. data/vendor/node_modules/qunitjs/test/node-test.js +22 -0
  897. data/vendor/node_modules/qunitjs/test/swarminject.js +10 -0
  898. data/vendor/node_modules/qunitjs/test/test.js +804 -0
  899. data/vendor/node_modules/regenerate/LICENSE-MIT.txt +20 -0
  900. data/vendor/node_modules/regenerate/README.md +467 -0
  901. data/vendor/node_modules/regenerate/package.json +50 -0
  902. data/vendor/node_modules/regenerate/regenerate.js +617 -0
  903. data/vendor/node_modules/requirejs/README.md +9 -0
  904. data/vendor/node_modules/requirejs/bin/r.js +26059 -0
  905. data/vendor/node_modules/requirejs/package.json +39 -0
  906. data/vendor/node_modules/requirejs/require.js +2054 -0
  907. data/vendor/package.json +56 -0
  908. metadata +949 -0
@@ -0,0 +1,2986 @@
1
+ // Generated by CoffeeScript 1.3.3
2
+ (function() {
3
+ var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, starts, unfoldSoak, utility, _ref, _ref1,
4
+ __hasProp = {}.hasOwnProperty,
5
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
6
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
7
+
8
+ Scope = require('./scope').Scope;
9
+
10
+ _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
11
+
12
+ _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last;
13
+
14
+ exports.extend = extend;
15
+
16
+ YES = function() {
17
+ return true;
18
+ };
19
+
20
+ NO = function() {
21
+ return false;
22
+ };
23
+
24
+ THIS = function() {
25
+ return this;
26
+ };
27
+
28
+ NEGATE = function() {
29
+ this.negated = !this.negated;
30
+ return this;
31
+ };
32
+
33
+ exports.Base = Base = (function() {
34
+
35
+ function Base() {}
36
+
37
+ Base.prototype.compile = function(o, lvl) {
38
+ var node;
39
+ o = extend({}, o);
40
+ if (lvl) {
41
+ o.level = lvl;
42
+ }
43
+ node = this.unfoldSoak(o) || this;
44
+ node.tab = o.indent;
45
+ if (o.level === LEVEL_TOP || !node.isStatement(o)) {
46
+ return node.compileNode(o);
47
+ } else {
48
+ return node.compileClosure(o);
49
+ }
50
+ };
51
+
52
+ Base.prototype.compileClosure = function(o) {
53
+ if (this.jumps()) {
54
+ throw SyntaxError('cannot use a pure statement in an expression.');
55
+ }
56
+ o.sharedScope = true;
57
+ return Closure.wrap(this).compileNode(o);
58
+ };
59
+
60
+ Base.prototype.cache = function(o, level, reused) {
61
+ var ref, sub;
62
+ if (!this.isComplex()) {
63
+ ref = level ? this.compile(o, level) : this;
64
+ return [ref, ref];
65
+ } else {
66
+ ref = new Literal(reused || o.scope.freeVariable('ref'));
67
+ sub = new Assign(ref, this);
68
+ if (level) {
69
+ return [sub.compile(o, level), ref.value];
70
+ } else {
71
+ return [sub, ref];
72
+ }
73
+ }
74
+ };
75
+
76
+ Base.prototype.compileLoopReference = function(o, name) {
77
+ var src, tmp;
78
+ src = tmp = this.compile(o, LEVEL_LIST);
79
+ if (!((-Infinity < +src && +src < Infinity) || IDENTIFIER.test(src) && o.scope.check(src, true))) {
80
+ src = "" + (tmp = o.scope.freeVariable(name)) + " = " + src;
81
+ }
82
+ return [src, tmp];
83
+ };
84
+
85
+ Base.prototype.makeReturn = function(res) {
86
+ var me;
87
+ me = this.unwrapAll();
88
+ if (res) {
89
+ return new Call(new Literal("" + res + ".push"), [me]);
90
+ } else {
91
+ return new Return(me);
92
+ }
93
+ };
94
+
95
+ Base.prototype.contains = function(pred) {
96
+ var contains;
97
+ contains = false;
98
+ this.traverseChildren(false, function(node) {
99
+ if (pred(node)) {
100
+ contains = true;
101
+ return false;
102
+ }
103
+ });
104
+ return contains;
105
+ };
106
+
107
+ Base.prototype.containsType = function(type) {
108
+ return this instanceof type || this.contains(function(node) {
109
+ return node instanceof type;
110
+ });
111
+ };
112
+
113
+ Base.prototype.lastNonComment = function(list) {
114
+ var i;
115
+ i = list.length;
116
+ while (i--) {
117
+ if (!(list[i] instanceof Comment)) {
118
+ return list[i];
119
+ }
120
+ }
121
+ return null;
122
+ };
123
+
124
+ Base.prototype.toString = function(idt, name) {
125
+ var tree;
126
+ if (idt == null) {
127
+ idt = '';
128
+ }
129
+ if (name == null) {
130
+ name = this.constructor.name;
131
+ }
132
+ tree = '\n' + idt + name;
133
+ if (this.soak) {
134
+ tree += '?';
135
+ }
136
+ this.eachChild(function(node) {
137
+ return tree += node.toString(idt + TAB);
138
+ });
139
+ return tree;
140
+ };
141
+
142
+ Base.prototype.eachChild = function(func) {
143
+ var attr, child, _i, _j, _len, _len1, _ref2, _ref3;
144
+ if (!this.children) {
145
+ return this;
146
+ }
147
+ _ref2 = this.children;
148
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
149
+ attr = _ref2[_i];
150
+ if (this[attr]) {
151
+ _ref3 = flatten([this[attr]]);
152
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
153
+ child = _ref3[_j];
154
+ if (func(child) === false) {
155
+ return this;
156
+ }
157
+ }
158
+ }
159
+ }
160
+ return this;
161
+ };
162
+
163
+ Base.prototype.traverseChildren = function(crossScope, func) {
164
+ return this.eachChild(function(child) {
165
+ if (func(child) === false) {
166
+ return false;
167
+ }
168
+ return child.traverseChildren(crossScope, func);
169
+ });
170
+ };
171
+
172
+ Base.prototype.invert = function() {
173
+ return new Op('!', this);
174
+ };
175
+
176
+ Base.prototype.unwrapAll = function() {
177
+ var node;
178
+ node = this;
179
+ while (node !== (node = node.unwrap())) {
180
+ continue;
181
+ }
182
+ return node;
183
+ };
184
+
185
+ Base.prototype.children = [];
186
+
187
+ Base.prototype.isStatement = NO;
188
+
189
+ Base.prototype.jumps = NO;
190
+
191
+ Base.prototype.isComplex = YES;
192
+
193
+ Base.prototype.isChainable = NO;
194
+
195
+ Base.prototype.isAssignable = NO;
196
+
197
+ Base.prototype.unwrap = THIS;
198
+
199
+ Base.prototype.unfoldSoak = NO;
200
+
201
+ Base.prototype.assigns = NO;
202
+
203
+ return Base;
204
+
205
+ })();
206
+
207
+ exports.Block = Block = (function(_super) {
208
+
209
+ __extends(Block, _super);
210
+
211
+ function Block(nodes) {
212
+ this.expressions = compact(flatten(nodes || []));
213
+ }
214
+
215
+ Block.prototype.children = ['expressions'];
216
+
217
+ Block.prototype.push = function(node) {
218
+ this.expressions.push(node);
219
+ return this;
220
+ };
221
+
222
+ Block.prototype.pop = function() {
223
+ return this.expressions.pop();
224
+ };
225
+
226
+ Block.prototype.unshift = function(node) {
227
+ this.expressions.unshift(node);
228
+ return this;
229
+ };
230
+
231
+ Block.prototype.unwrap = function() {
232
+ if (this.expressions.length === 1) {
233
+ return this.expressions[0];
234
+ } else {
235
+ return this;
236
+ }
237
+ };
238
+
239
+ Block.prototype.isEmpty = function() {
240
+ return !this.expressions.length;
241
+ };
242
+
243
+ Block.prototype.isStatement = function(o) {
244
+ var exp, _i, _len, _ref2;
245
+ _ref2 = this.expressions;
246
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
247
+ exp = _ref2[_i];
248
+ if (exp.isStatement(o)) {
249
+ return true;
250
+ }
251
+ }
252
+ return false;
253
+ };
254
+
255
+ Block.prototype.jumps = function(o) {
256
+ var exp, _i, _len, _ref2;
257
+ _ref2 = this.expressions;
258
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
259
+ exp = _ref2[_i];
260
+ if (exp.jumps(o)) {
261
+ return exp;
262
+ }
263
+ }
264
+ };
265
+
266
+ Block.prototype.makeReturn = function(res) {
267
+ var expr, len;
268
+ len = this.expressions.length;
269
+ while (len--) {
270
+ expr = this.expressions[len];
271
+ if (!(expr instanceof Comment)) {
272
+ this.expressions[len] = expr.makeReturn(res);
273
+ if (expr instanceof Return && !expr.expression) {
274
+ this.expressions.splice(len, 1);
275
+ }
276
+ break;
277
+ }
278
+ }
279
+ return this;
280
+ };
281
+
282
+ Block.prototype.compile = function(o, level) {
283
+ if (o == null) {
284
+ o = {};
285
+ }
286
+ if (o.scope) {
287
+ return Block.__super__.compile.call(this, o, level);
288
+ } else {
289
+ return this.compileRoot(o);
290
+ }
291
+ };
292
+
293
+ Block.prototype.compileNode = function(o) {
294
+ var code, codes, node, top, _i, _len, _ref2;
295
+ this.tab = o.indent;
296
+ top = o.level === LEVEL_TOP;
297
+ codes = [];
298
+ _ref2 = this.expressions;
299
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
300
+ node = _ref2[_i];
301
+ node = node.unwrapAll();
302
+ node = node.unfoldSoak(o) || node;
303
+ if (node instanceof Block) {
304
+ codes.push(node.compileNode(o));
305
+ } else if (top) {
306
+ node.front = true;
307
+ code = node.compile(o);
308
+ if (!node.isStatement(o)) {
309
+ code = "" + this.tab + code + ";";
310
+ if (node instanceof Literal) {
311
+ code = "" + code + "\n";
312
+ }
313
+ }
314
+ codes.push(code);
315
+ } else {
316
+ codes.push(node.compile(o, LEVEL_LIST));
317
+ }
318
+ }
319
+ if (top) {
320
+ if (this.spaced) {
321
+ return "\n" + (codes.join('\n\n')) + "\n";
322
+ } else {
323
+ return codes.join('\n');
324
+ }
325
+ }
326
+ code = codes.join(', ') || 'void 0';
327
+ if (codes.length > 1 && o.level >= LEVEL_LIST) {
328
+ return "(" + code + ")";
329
+ } else {
330
+ return code;
331
+ }
332
+ };
333
+
334
+ Block.prototype.compileRoot = function(o) {
335
+ var code, exp, i, prelude, preludeExps, rest;
336
+ o.indent = o.bare ? '' : TAB;
337
+ o.scope = new Scope(null, this, null);
338
+ o.level = LEVEL_TOP;
339
+ this.spaced = true;
340
+ prelude = "";
341
+ if (!o.bare) {
342
+ preludeExps = (function() {
343
+ var _i, _len, _ref2, _results;
344
+ _ref2 = this.expressions;
345
+ _results = [];
346
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
347
+ exp = _ref2[i];
348
+ if (!(exp.unwrap() instanceof Comment)) {
349
+ break;
350
+ }
351
+ _results.push(exp);
352
+ }
353
+ return _results;
354
+ }).call(this);
355
+ rest = this.expressions.slice(preludeExps.length);
356
+ this.expressions = preludeExps;
357
+ if (preludeExps.length) {
358
+ prelude = "" + (this.compileNode(merge(o, {
359
+ indent: ''
360
+ }))) + "\n";
361
+ }
362
+ this.expressions = rest;
363
+ }
364
+ code = this.compileWithDeclarations(o);
365
+ if (o.bare) {
366
+ return code;
367
+ }
368
+ return "" + prelude + "(function() {\n" + code + "\n}).call(this);\n";
369
+ };
370
+
371
+ Block.prototype.compileWithDeclarations = function(o) {
372
+ var assigns, code, declars, exp, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4;
373
+ code = post = '';
374
+ _ref2 = this.expressions;
375
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
376
+ exp = _ref2[i];
377
+ exp = exp.unwrap();
378
+ if (!(exp instanceof Comment || exp instanceof Literal)) {
379
+ break;
380
+ }
381
+ }
382
+ o = merge(o, {
383
+ level: LEVEL_TOP
384
+ });
385
+ if (i) {
386
+ rest = this.expressions.splice(i, 9e9);
387
+ _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1];
388
+ _ref4 = [this.compileNode(o), spaced], code = _ref4[0], this.spaced = _ref4[1];
389
+ this.expressions = rest;
390
+ }
391
+ post = this.compileNode(o);
392
+ scope = o.scope;
393
+ if (scope.expressions === this) {
394
+ declars = o.scope.hasDeclarations();
395
+ assigns = scope.hasAssignments;
396
+ if (declars || assigns) {
397
+ if (i) {
398
+ code += '\n';
399
+ }
400
+ code += "" + this.tab + "var ";
401
+ if (declars) {
402
+ code += scope.declaredVariables().join(', ');
403
+ }
404
+ if (assigns) {
405
+ if (declars) {
406
+ code += ",\n" + (this.tab + TAB);
407
+ }
408
+ code += scope.assignedVariables().join(",\n" + (this.tab + TAB));
409
+ }
410
+ code += ';\n';
411
+ }
412
+ }
413
+ return code + post;
414
+ };
415
+
416
+ Block.wrap = function(nodes) {
417
+ if (nodes.length === 1 && nodes[0] instanceof Block) {
418
+ return nodes[0];
419
+ }
420
+ return new Block(nodes);
421
+ };
422
+
423
+ return Block;
424
+
425
+ })(Base);
426
+
427
+ exports.Literal = Literal = (function(_super) {
428
+
429
+ __extends(Literal, _super);
430
+
431
+ function Literal(value) {
432
+ this.value = value;
433
+ }
434
+
435
+ Literal.prototype.makeReturn = function() {
436
+ if (this.isStatement()) {
437
+ return this;
438
+ } else {
439
+ return Literal.__super__.makeReturn.apply(this, arguments);
440
+ }
441
+ };
442
+
443
+ Literal.prototype.isAssignable = function() {
444
+ return IDENTIFIER.test(this.value);
445
+ };
446
+
447
+ Literal.prototype.isStatement = function() {
448
+ var _ref2;
449
+ return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger';
450
+ };
451
+
452
+ Literal.prototype.isComplex = NO;
453
+
454
+ Literal.prototype.assigns = function(name) {
455
+ return name === this.value;
456
+ };
457
+
458
+ Literal.prototype.jumps = function(o) {
459
+ if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
460
+ return this;
461
+ }
462
+ if (this.value === 'continue' && !(o != null ? o.loop : void 0)) {
463
+ return this;
464
+ }
465
+ };
466
+
467
+ Literal.prototype.compileNode = function(o) {
468
+ var code, _ref2;
469
+ code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value;
470
+ if (this.isStatement()) {
471
+ return "" + this.tab + code + ";";
472
+ } else {
473
+ return code;
474
+ }
475
+ };
476
+
477
+ Literal.prototype.toString = function() {
478
+ return ' "' + this.value + '"';
479
+ };
480
+
481
+ return Literal;
482
+
483
+ })(Base);
484
+
485
+ exports.Undefined = (function(_super) {
486
+
487
+ __extends(Undefined, _super);
488
+
489
+ function Undefined() {
490
+ return Undefined.__super__.constructor.apply(this, arguments);
491
+ }
492
+
493
+ Undefined.prototype.isAssignable = NO;
494
+
495
+ Undefined.prototype.isComplex = NO;
496
+
497
+ Undefined.prototype.compileNode = function(o) {
498
+ if (o.level >= LEVEL_ACCESS) {
499
+ return '(void 0)';
500
+ } else {
501
+ return 'void 0';
502
+ }
503
+ };
504
+
505
+ return Undefined;
506
+
507
+ })(Base);
508
+
509
+ exports.Null = (function(_super) {
510
+
511
+ __extends(Null, _super);
512
+
513
+ function Null() {
514
+ return Null.__super__.constructor.apply(this, arguments);
515
+ }
516
+
517
+ Null.prototype.isAssignable = NO;
518
+
519
+ Null.prototype.isComplex = NO;
520
+
521
+ Null.prototype.compileNode = function() {
522
+ return "null";
523
+ };
524
+
525
+ return Null;
526
+
527
+ })(Base);
528
+
529
+ exports.Bool = (function(_super) {
530
+
531
+ __extends(Bool, _super);
532
+
533
+ Bool.prototype.isAssignable = NO;
534
+
535
+ Bool.prototype.isComplex = NO;
536
+
537
+ Bool.prototype.compileNode = function() {
538
+ return this.val;
539
+ };
540
+
541
+ function Bool(val) {
542
+ this.val = val;
543
+ }
544
+
545
+ return Bool;
546
+
547
+ })(Base);
548
+
549
+ exports.Return = Return = (function(_super) {
550
+
551
+ __extends(Return, _super);
552
+
553
+ function Return(expr) {
554
+ if (expr && !expr.unwrap().isUndefined) {
555
+ this.expression = expr;
556
+ }
557
+ }
558
+
559
+ Return.prototype.children = ['expression'];
560
+
561
+ Return.prototype.isStatement = YES;
562
+
563
+ Return.prototype.makeReturn = THIS;
564
+
565
+ Return.prototype.jumps = THIS;
566
+
567
+ Return.prototype.compile = function(o, level) {
568
+ var expr, _ref2;
569
+ expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0;
570
+ if (expr && !(expr instanceof Return)) {
571
+ return expr.compile(o, level);
572
+ } else {
573
+ return Return.__super__.compile.call(this, o, level);
574
+ }
575
+ };
576
+
577
+ Return.prototype.compileNode = function(o) {
578
+ return this.tab + ("return" + [this.expression ? " " + (this.expression.compile(o, LEVEL_PAREN)) : void 0] + ";");
579
+ };
580
+
581
+ return Return;
582
+
583
+ })(Base);
584
+
585
+ exports.Value = Value = (function(_super) {
586
+
587
+ __extends(Value, _super);
588
+
589
+ function Value(base, props, tag) {
590
+ if (!props && base instanceof Value) {
591
+ return base;
592
+ }
593
+ this.base = base;
594
+ this.properties = props || [];
595
+ if (tag) {
596
+ this[tag] = true;
597
+ }
598
+ return this;
599
+ }
600
+
601
+ Value.prototype.children = ['base', 'properties'];
602
+
603
+ Value.prototype.add = function(props) {
604
+ this.properties = this.properties.concat(props);
605
+ return this;
606
+ };
607
+
608
+ Value.prototype.hasProperties = function() {
609
+ return !!this.properties.length;
610
+ };
611
+
612
+ Value.prototype.isArray = function() {
613
+ return !this.properties.length && this.base instanceof Arr;
614
+ };
615
+
616
+ Value.prototype.isComplex = function() {
617
+ return this.hasProperties() || this.base.isComplex();
618
+ };
619
+
620
+ Value.prototype.isAssignable = function() {
621
+ return this.hasProperties() || this.base.isAssignable();
622
+ };
623
+
624
+ Value.prototype.isSimpleNumber = function() {
625
+ return this.base instanceof Literal && SIMPLENUM.test(this.base.value);
626
+ };
627
+
628
+ Value.prototype.isString = function() {
629
+ return this.base instanceof Literal && IS_STRING.test(this.base.value);
630
+ };
631
+
632
+ Value.prototype.isAtomic = function() {
633
+ var node, _i, _len, _ref2;
634
+ _ref2 = this.properties.concat(this.base);
635
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
636
+ node = _ref2[_i];
637
+ if (node.soak || node instanceof Call) {
638
+ return false;
639
+ }
640
+ }
641
+ return true;
642
+ };
643
+
644
+ Value.prototype.isStatement = function(o) {
645
+ return !this.properties.length && this.base.isStatement(o);
646
+ };
647
+
648
+ Value.prototype.assigns = function(name) {
649
+ return !this.properties.length && this.base.assigns(name);
650
+ };
651
+
652
+ Value.prototype.jumps = function(o) {
653
+ return !this.properties.length && this.base.jumps(o);
654
+ };
655
+
656
+ Value.prototype.isObject = function(onlyGenerated) {
657
+ if (this.properties.length) {
658
+ return false;
659
+ }
660
+ return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated);
661
+ };
662
+
663
+ Value.prototype.isSplice = function() {
664
+ return last(this.properties) instanceof Slice;
665
+ };
666
+
667
+ Value.prototype.unwrap = function() {
668
+ if (this.properties.length) {
669
+ return this;
670
+ } else {
671
+ return this.base;
672
+ }
673
+ };
674
+
675
+ Value.prototype.cacheReference = function(o) {
676
+ var base, bref, name, nref;
677
+ name = last(this.properties);
678
+ if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) {
679
+ return [this, this];
680
+ }
681
+ base = new Value(this.base, this.properties.slice(0, -1));
682
+ if (base.isComplex()) {
683
+ bref = new Literal(o.scope.freeVariable('base'));
684
+ base = new Value(new Parens(new Assign(bref, base)));
685
+ }
686
+ if (!name) {
687
+ return [base, bref];
688
+ }
689
+ if (name.isComplex()) {
690
+ nref = new Literal(o.scope.freeVariable('name'));
691
+ name = new Index(new Assign(nref, name.index));
692
+ nref = new Index(nref);
693
+ }
694
+ return [base.add(name), new Value(bref || base.base, [nref || name])];
695
+ };
696
+
697
+ Value.prototype.compileNode = function(o) {
698
+ var code, prop, props, _i, _len;
699
+ this.base.front = this.front;
700
+ props = this.properties;
701
+ code = this.base.compile(o, props.length ? LEVEL_ACCESS : null);
702
+ if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(code)) {
703
+ code = "" + code + ".";
704
+ }
705
+ for (_i = 0, _len = props.length; _i < _len; _i++) {
706
+ prop = props[_i];
707
+ code += prop.compile(o);
708
+ }
709
+ return code;
710
+ };
711
+
712
+ Value.prototype.unfoldSoak = function(o) {
713
+ var result,
714
+ _this = this;
715
+ if (this.unfoldedSoak != null) {
716
+ return this.unfoldedSoak;
717
+ }
718
+ result = (function() {
719
+ var fst, i, ifn, prop, ref, snd, _i, _len, _ref2;
720
+ if (ifn = _this.base.unfoldSoak(o)) {
721
+ Array.prototype.push.apply(ifn.body.properties, _this.properties);
722
+ return ifn;
723
+ }
724
+ _ref2 = _this.properties;
725
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
726
+ prop = _ref2[i];
727
+ if (!prop.soak) {
728
+ continue;
729
+ }
730
+ prop.soak = false;
731
+ fst = new Value(_this.base, _this.properties.slice(0, i));
732
+ snd = new Value(_this.base, _this.properties.slice(i));
733
+ if (fst.isComplex()) {
734
+ ref = new Literal(o.scope.freeVariable('ref'));
735
+ fst = new Parens(new Assign(ref, fst));
736
+ snd.base = ref;
737
+ }
738
+ return new If(new Existence(fst), snd, {
739
+ soak: true
740
+ });
741
+ }
742
+ return null;
743
+ })();
744
+ return this.unfoldedSoak = result || false;
745
+ };
746
+
747
+ return Value;
748
+
749
+ })(Base);
750
+
751
+ exports.Comment = Comment = (function(_super) {
752
+
753
+ __extends(Comment, _super);
754
+
755
+ function Comment(comment) {
756
+ this.comment = comment;
757
+ }
758
+
759
+ Comment.prototype.isStatement = YES;
760
+
761
+ Comment.prototype.makeReturn = THIS;
762
+
763
+ Comment.prototype.compileNode = function(o, level) {
764
+ var code;
765
+ code = '/*' + multident(this.comment, this.tab) + ("\n" + this.tab + "*/\n");
766
+ if ((level || o.level) === LEVEL_TOP) {
767
+ code = o.indent + code;
768
+ }
769
+ return code;
770
+ };
771
+
772
+ return Comment;
773
+
774
+ })(Base);
775
+
776
+ exports.Call = Call = (function(_super) {
777
+
778
+ __extends(Call, _super);
779
+
780
+ function Call(variable, args, soak) {
781
+ this.args = args != null ? args : [];
782
+ this.soak = soak;
783
+ this.isNew = false;
784
+ this.isSuper = variable === 'super';
785
+ this.variable = this.isSuper ? null : variable;
786
+ }
787
+
788
+ Call.prototype.children = ['variable', 'args'];
789
+
790
+ Call.prototype.newInstance = function() {
791
+ var base, _ref2;
792
+ base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable;
793
+ if (base instanceof Call && !base.isNew) {
794
+ base.newInstance();
795
+ } else {
796
+ this.isNew = true;
797
+ }
798
+ return this;
799
+ };
800
+
801
+ Call.prototype.superReference = function(o) {
802
+ var accesses, method, name;
803
+ method = o.scope.namedMethod();
804
+ if (!method) {
805
+ throw SyntaxError('cannot call super outside of a function.');
806
+ }
807
+ name = method.name;
808
+ if (name == null) {
809
+ throw SyntaxError('cannot call super on an anonymous function.');
810
+ }
811
+ if (method.klass) {
812
+ accesses = [new Access(new Literal('__super__'))];
813
+ if (method["static"]) {
814
+ accesses.push(new Access(new Literal('constructor')));
815
+ }
816
+ accesses.push(new Access(new Literal(name)));
817
+ return (new Value(new Literal(method.klass), accesses)).compile(o);
818
+ } else {
819
+ return "" + name + ".__super__.constructor";
820
+ }
821
+ };
822
+
823
+ Call.prototype.superThis = function(o) {
824
+ var method;
825
+ method = o.scope.method;
826
+ return (method && !method.klass && method.context) || "this";
827
+ };
828
+
829
+ Call.prototype.unfoldSoak = function(o) {
830
+ var call, ifn, left, list, rite, _i, _len, _ref2, _ref3;
831
+ if (this.soak) {
832
+ if (this.variable) {
833
+ if (ifn = unfoldSoak(o, this, 'variable')) {
834
+ return ifn;
835
+ }
836
+ _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1];
837
+ } else {
838
+ left = new Literal(this.superReference(o));
839
+ rite = new Value(left);
840
+ }
841
+ rite = new Call(rite, this.args);
842
+ rite.isNew = this.isNew;
843
+ left = new Literal("typeof " + (left.compile(o)) + " === \"function\"");
844
+ return new If(left, new Value(rite), {
845
+ soak: true
846
+ });
847
+ }
848
+ call = this;
849
+ list = [];
850
+ while (true) {
851
+ if (call.variable instanceof Call) {
852
+ list.push(call);
853
+ call = call.variable;
854
+ continue;
855
+ }
856
+ if (!(call.variable instanceof Value)) {
857
+ break;
858
+ }
859
+ list.push(call);
860
+ if (!((call = call.variable.base) instanceof Call)) {
861
+ break;
862
+ }
863
+ }
864
+ _ref3 = list.reverse();
865
+ for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
866
+ call = _ref3[_i];
867
+ if (ifn) {
868
+ if (call.variable instanceof Call) {
869
+ call.variable = ifn;
870
+ } else {
871
+ call.variable.base = ifn;
872
+ }
873
+ }
874
+ ifn = unfoldSoak(o, call, 'variable');
875
+ }
876
+ return ifn;
877
+ };
878
+
879
+ Call.prototype.filterImplicitObjects = function(list) {
880
+ var node, nodes, obj, prop, properties, _i, _j, _len, _len1, _ref2;
881
+ nodes = [];
882
+ for (_i = 0, _len = list.length; _i < _len; _i++) {
883
+ node = list[_i];
884
+ if (!((typeof node.isObject === "function" ? node.isObject() : void 0) && node.base.generated)) {
885
+ nodes.push(node);
886
+ continue;
887
+ }
888
+ obj = null;
889
+ _ref2 = node.base.properties;
890
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
891
+ prop = _ref2[_j];
892
+ if (prop instanceof Assign || prop instanceof Comment) {
893
+ if (!obj) {
894
+ nodes.push(obj = new Obj(properties = [], true));
895
+ }
896
+ properties.push(prop);
897
+ } else {
898
+ nodes.push(prop);
899
+ obj = null;
900
+ }
901
+ }
902
+ }
903
+ return nodes;
904
+ };
905
+
906
+ Call.prototype.compileNode = function(o) {
907
+ var arg, args, code, _ref2;
908
+ if ((_ref2 = this.variable) != null) {
909
+ _ref2.front = this.front;
910
+ }
911
+ if (code = Splat.compileSplattedArray(o, this.args, true)) {
912
+ return this.compileSplat(o, code);
913
+ }
914
+ args = this.filterImplicitObjects(this.args);
915
+ args = ((function() {
916
+ var _i, _len, _results;
917
+ _results = [];
918
+ for (_i = 0, _len = args.length; _i < _len; _i++) {
919
+ arg = args[_i];
920
+ _results.push(arg.compile(o, LEVEL_LIST));
921
+ }
922
+ return _results;
923
+ })()).join(', ');
924
+ if (this.isSuper) {
925
+ return this.superReference(o) + (".call(" + (this.superThis(o)) + (args && ', ' + args) + ")");
926
+ } else {
927
+ return (this.isNew ? 'new ' : '') + this.variable.compile(o, LEVEL_ACCESS) + ("(" + args + ")");
928
+ }
929
+ };
930
+
931
+ Call.prototype.compileSuper = function(args, o) {
932
+ return "" + (this.superReference(o)) + ".call(" + (this.superThis(o)) + (args.length ? ', ' : '') + args + ")";
933
+ };
934
+
935
+ Call.prototype.compileSplat = function(o, splatArgs) {
936
+ var base, fun, idt, name, ref;
937
+ if (this.isSuper) {
938
+ return "" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", " + splatArgs + ")";
939
+ }
940
+ if (this.isNew) {
941
+ idt = this.tab + TAB;
942
+ return "(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args), t = typeof result;\n" + idt + "return t == \"object\" || t == \"function\" ? result || child : child;\n" + this.tab + "})(" + (this.variable.compile(o, LEVEL_LIST)) + ", " + splatArgs + ", function(){})";
943
+ }
944
+ base = new Value(this.variable);
945
+ if ((name = base.properties.pop()) && base.isComplex()) {
946
+ ref = o.scope.freeVariable('ref');
947
+ fun = "(" + ref + " = " + (base.compile(o, LEVEL_LIST)) + ")" + (name.compile(o));
948
+ } else {
949
+ fun = base.compile(o, LEVEL_ACCESS);
950
+ if (SIMPLENUM.test(fun)) {
951
+ fun = "(" + fun + ")";
952
+ }
953
+ if (name) {
954
+ ref = fun;
955
+ fun += name.compile(o);
956
+ } else {
957
+ ref = 'null';
958
+ }
959
+ }
960
+ return "" + fun + ".apply(" + ref + ", " + splatArgs + ")";
961
+ };
962
+
963
+ return Call;
964
+
965
+ })(Base);
966
+
967
+ exports.Extends = Extends = (function(_super) {
968
+
969
+ __extends(Extends, _super);
970
+
971
+ function Extends(child, parent) {
972
+ this.child = child;
973
+ this.parent = parent;
974
+ }
975
+
976
+ Extends.prototype.children = ['child', 'parent'];
977
+
978
+ Extends.prototype.compile = function(o) {
979
+ return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compile(o);
980
+ };
981
+
982
+ return Extends;
983
+
984
+ })(Base);
985
+
986
+ exports.Access = Access = (function(_super) {
987
+
988
+ __extends(Access, _super);
989
+
990
+ function Access(name, tag) {
991
+ this.name = name;
992
+ this.name.asKey = true;
993
+ this.soak = tag === 'soak';
994
+ }
995
+
996
+ Access.prototype.children = ['name'];
997
+
998
+ Access.prototype.compile = function(o) {
999
+ var name;
1000
+ name = this.name.compile(o);
1001
+ if (IDENTIFIER.test(name)) {
1002
+ return "." + name;
1003
+ } else {
1004
+ return "[" + name + "]";
1005
+ }
1006
+ };
1007
+
1008
+ Access.prototype.isComplex = NO;
1009
+
1010
+ return Access;
1011
+
1012
+ })(Base);
1013
+
1014
+ exports.Index = Index = (function(_super) {
1015
+
1016
+ __extends(Index, _super);
1017
+
1018
+ function Index(index) {
1019
+ this.index = index;
1020
+ }
1021
+
1022
+ Index.prototype.children = ['index'];
1023
+
1024
+ Index.prototype.compile = function(o) {
1025
+ return "[" + (this.index.compile(o, LEVEL_PAREN)) + "]";
1026
+ };
1027
+
1028
+ Index.prototype.isComplex = function() {
1029
+ return this.index.isComplex();
1030
+ };
1031
+
1032
+ return Index;
1033
+
1034
+ })(Base);
1035
+
1036
+ exports.Range = Range = (function(_super) {
1037
+
1038
+ __extends(Range, _super);
1039
+
1040
+ Range.prototype.children = ['from', 'to'];
1041
+
1042
+ function Range(from, to, tag) {
1043
+ this.from = from;
1044
+ this.to = to;
1045
+ this.exclusive = tag === 'exclusive';
1046
+ this.equals = this.exclusive ? '' : '=';
1047
+ }
1048
+
1049
+ Range.prototype.compileVariables = function(o) {
1050
+ var step, _ref2, _ref3, _ref4, _ref5;
1051
+ o = merge(o, {
1052
+ top: true
1053
+ });
1054
+ _ref2 = this.from.cache(o, LEVEL_LIST), this.fromC = _ref2[0], this.fromVar = _ref2[1];
1055
+ _ref3 = this.to.cache(o, LEVEL_LIST), this.toC = _ref3[0], this.toVar = _ref3[1];
1056
+ if (step = del(o, 'step')) {
1057
+ _ref4 = step.cache(o, LEVEL_LIST), this.step = _ref4[0], this.stepVar = _ref4[1];
1058
+ }
1059
+ _ref5 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref5[0], this.toNum = _ref5[1];
1060
+ if (this.stepVar) {
1061
+ return this.stepNum = this.stepVar.match(SIMPLENUM);
1062
+ }
1063
+ };
1064
+
1065
+ Range.prototype.compileNode = function(o) {
1066
+ var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3;
1067
+ if (!this.fromVar) {
1068
+ this.compileVariables(o);
1069
+ }
1070
+ if (!o.index) {
1071
+ return this.compileArray(o);
1072
+ }
1073
+ known = this.fromNum && this.toNum;
1074
+ idx = del(o, 'index');
1075
+ idxName = del(o, 'name');
1076
+ namedIndex = idxName && idxName !== idx;
1077
+ varPart = "" + idx + " = " + this.fromC;
1078
+ if (this.toC !== this.toVar) {
1079
+ varPart += ", " + this.toC;
1080
+ }
1081
+ if (this.step !== this.stepVar) {
1082
+ varPart += ", " + this.step;
1083
+ }
1084
+ _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1];
1085
+ condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [+this.fromNum, +this.toNum], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
1086
+ stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
1087
+ if (namedIndex) {
1088
+ varPart = "" + idxName + " = " + varPart;
1089
+ }
1090
+ if (namedIndex) {
1091
+ stepPart = "" + idxName + " = " + stepPart;
1092
+ }
1093
+ return "" + varPart + "; " + condPart + "; " + stepPart;
1094
+ };
1095
+
1096
+ Range.prototype.compileArray = function(o) {
1097
+ var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results;
1098
+ if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
1099
+ range = (function() {
1100
+ _results = [];
1101
+ for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
1102
+ return _results;
1103
+ }).apply(this);
1104
+ if (this.exclusive) {
1105
+ range.pop();
1106
+ }
1107
+ return "[" + (range.join(', ')) + "]";
1108
+ }
1109
+ idt = this.tab + TAB;
1110
+ i = o.scope.freeVariable('i');
1111
+ result = o.scope.freeVariable('results');
1112
+ pre = "\n" + idt + result + " = [];";
1113
+ if (this.fromNum && this.toNum) {
1114
+ o.index = i;
1115
+ body = this.compileNode(o);
1116
+ } else {
1117
+ vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : '');
1118
+ cond = "" + this.fromVar + " <= " + this.toVar;
1119
+ body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--";
1120
+ }
1121
+ post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
1122
+ hasArgs = function(node) {
1123
+ return node != null ? node.contains(function(n) {
1124
+ return n instanceof Literal && n.value === 'arguments' && !n.asKey;
1125
+ }) : void 0;
1126
+ };
1127
+ if (hasArgs(this.from) || hasArgs(this.to)) {
1128
+ args = ', arguments';
1129
+ }
1130
+ return "(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")";
1131
+ };
1132
+
1133
+ return Range;
1134
+
1135
+ })(Base);
1136
+
1137
+ exports.Slice = Slice = (function(_super) {
1138
+
1139
+ __extends(Slice, _super);
1140
+
1141
+ Slice.prototype.children = ['range'];
1142
+
1143
+ function Slice(range) {
1144
+ this.range = range;
1145
+ Slice.__super__.constructor.call(this);
1146
+ }
1147
+
1148
+ Slice.prototype.compileNode = function(o) {
1149
+ var compiled, from, fromStr, to, toStr, _ref2;
1150
+ _ref2 = this.range, to = _ref2.to, from = _ref2.from;
1151
+ fromStr = from && from.compile(o, LEVEL_PAREN) || '0';
1152
+ compiled = to && to.compile(o, LEVEL_PAREN);
1153
+ if (to && !(!this.range.exclusive && +compiled === -1)) {
1154
+ toStr = ', ' + (this.range.exclusive ? compiled : SIMPLENUM.test(compiled) ? "" + (+compiled + 1) : (compiled = to.compile(o, LEVEL_ACCESS), "" + compiled + " + 1 || 9e9"));
1155
+ }
1156
+ return ".slice(" + fromStr + (toStr || '') + ")";
1157
+ };
1158
+
1159
+ return Slice;
1160
+
1161
+ })(Base);
1162
+
1163
+ exports.Obj = Obj = (function(_super) {
1164
+
1165
+ __extends(Obj, _super);
1166
+
1167
+ function Obj(props, generated) {
1168
+ this.generated = generated != null ? generated : false;
1169
+ this.objects = this.properties = props || [];
1170
+ }
1171
+
1172
+ Obj.prototype.children = ['properties'];
1173
+
1174
+ Obj.prototype.compileNode = function(o) {
1175
+ var i, idt, indent, join, lastNoncom, node, obj, prop, propName, propNames, props, _i, _j, _len, _len1, _ref2;
1176
+ props = this.properties;
1177
+ propNames = [];
1178
+ _ref2 = this.properties;
1179
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1180
+ prop = _ref2[_i];
1181
+ if (prop.isComplex()) {
1182
+ prop = prop.variable;
1183
+ }
1184
+ if (prop != null) {
1185
+ propName = prop.unwrapAll().value.toString();
1186
+ if (__indexOf.call(propNames, propName) >= 0) {
1187
+ throw SyntaxError("multiple object literal properties named \"" + propName + "\"");
1188
+ }
1189
+ propNames.push(propName);
1190
+ }
1191
+ }
1192
+ if (!props.length) {
1193
+ return (this.front ? '({})' : '{}');
1194
+ }
1195
+ if (this.generated) {
1196
+ for (_j = 0, _len1 = props.length; _j < _len1; _j++) {
1197
+ node = props[_j];
1198
+ if (node instanceof Value) {
1199
+ throw new Error('cannot have an implicit value in an implicit object');
1200
+ }
1201
+ }
1202
+ }
1203
+ idt = o.indent += TAB;
1204
+ lastNoncom = this.lastNonComment(this.properties);
1205
+ props = (function() {
1206
+ var _k, _len2, _results;
1207
+ _results = [];
1208
+ for (i = _k = 0, _len2 = props.length; _k < _len2; i = ++_k) {
1209
+ prop = props[i];
1210
+ join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n';
1211
+ indent = prop instanceof Comment ? '' : idt;
1212
+ if (prop instanceof Value && prop["this"]) {
1213
+ prop = new Assign(prop.properties[0].name, prop, 'object');
1214
+ }
1215
+ if (!(prop instanceof Comment)) {
1216
+ if (!(prop instanceof Assign)) {
1217
+ prop = new Assign(prop, prop, 'object');
1218
+ }
1219
+ (prop.variable.base || prop.variable).asKey = true;
1220
+ }
1221
+ _results.push(indent + prop.compile(o, LEVEL_TOP) + join);
1222
+ }
1223
+ return _results;
1224
+ })();
1225
+ props = props.join('');
1226
+ obj = "{" + (props && '\n' + props + '\n' + this.tab) + "}";
1227
+ if (this.front) {
1228
+ return "(" + obj + ")";
1229
+ } else {
1230
+ return obj;
1231
+ }
1232
+ };
1233
+
1234
+ Obj.prototype.assigns = function(name) {
1235
+ var prop, _i, _len, _ref2;
1236
+ _ref2 = this.properties;
1237
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1238
+ prop = _ref2[_i];
1239
+ if (prop.assigns(name)) {
1240
+ return true;
1241
+ }
1242
+ }
1243
+ return false;
1244
+ };
1245
+
1246
+ return Obj;
1247
+
1248
+ })(Base);
1249
+
1250
+ exports.Arr = Arr = (function(_super) {
1251
+
1252
+ __extends(Arr, _super);
1253
+
1254
+ function Arr(objs) {
1255
+ this.objects = objs || [];
1256
+ }
1257
+
1258
+ Arr.prototype.children = ['objects'];
1259
+
1260
+ Arr.prototype.filterImplicitObjects = Call.prototype.filterImplicitObjects;
1261
+
1262
+ Arr.prototype.compileNode = function(o) {
1263
+ var code, obj, objs;
1264
+ if (!this.objects.length) {
1265
+ return '[]';
1266
+ }
1267
+ o.indent += TAB;
1268
+ objs = this.filterImplicitObjects(this.objects);
1269
+ if (code = Splat.compileSplattedArray(o, objs)) {
1270
+ return code;
1271
+ }
1272
+ code = ((function() {
1273
+ var _i, _len, _results;
1274
+ _results = [];
1275
+ for (_i = 0, _len = objs.length; _i < _len; _i++) {
1276
+ obj = objs[_i];
1277
+ _results.push(obj.compile(o, LEVEL_LIST));
1278
+ }
1279
+ return _results;
1280
+ })()).join(', ');
1281
+ if (code.indexOf('\n') >= 0) {
1282
+ return "[\n" + o.indent + code + "\n" + this.tab + "]";
1283
+ } else {
1284
+ return "[" + code + "]";
1285
+ }
1286
+ };
1287
+
1288
+ Arr.prototype.assigns = function(name) {
1289
+ var obj, _i, _len, _ref2;
1290
+ _ref2 = this.objects;
1291
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1292
+ obj = _ref2[_i];
1293
+ if (obj.assigns(name)) {
1294
+ return true;
1295
+ }
1296
+ }
1297
+ return false;
1298
+ };
1299
+
1300
+ return Arr;
1301
+
1302
+ })(Base);
1303
+
1304
+ exports.Class = Class = (function(_super) {
1305
+
1306
+ __extends(Class, _super);
1307
+
1308
+ function Class(variable, parent, body) {
1309
+ this.variable = variable;
1310
+ this.parent = parent;
1311
+ this.body = body != null ? body : new Block;
1312
+ this.boundFuncs = [];
1313
+ this.body.classBody = true;
1314
+ }
1315
+
1316
+ Class.prototype.children = ['variable', 'parent', 'body'];
1317
+
1318
+ Class.prototype.determineName = function() {
1319
+ var decl, tail;
1320
+ if (!this.variable) {
1321
+ return null;
1322
+ }
1323
+ decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value;
1324
+ if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) {
1325
+ throw SyntaxError("variable name may not be " + decl);
1326
+ }
1327
+ return decl && (decl = IDENTIFIER.test(decl) && decl);
1328
+ };
1329
+
1330
+ Class.prototype.setContext = function(name) {
1331
+ return this.body.traverseChildren(false, function(node) {
1332
+ if (node.classBody) {
1333
+ return false;
1334
+ }
1335
+ if (node instanceof Literal && node.value === 'this') {
1336
+ return node.value = name;
1337
+ } else if (node instanceof Code) {
1338
+ node.klass = name;
1339
+ if (node.bound) {
1340
+ return node.context = name;
1341
+ }
1342
+ }
1343
+ });
1344
+ };
1345
+
1346
+ Class.prototype.addBoundFunctions = function(o) {
1347
+ var bvar, lhs, _i, _len, _ref2, _results;
1348
+ if (this.boundFuncs.length) {
1349
+ _ref2 = this.boundFuncs;
1350
+ _results = [];
1351
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1352
+ bvar = _ref2[_i];
1353
+ lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
1354
+ _results.push(this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")));
1355
+ }
1356
+ return _results;
1357
+ }
1358
+ };
1359
+
1360
+ Class.prototype.addProperties = function(node, name, o) {
1361
+ var assign, base, exprs, func, props;
1362
+ props = node.base.properties.slice(0);
1363
+ exprs = (function() {
1364
+ var _results;
1365
+ _results = [];
1366
+ while (assign = props.shift()) {
1367
+ if (assign instanceof Assign) {
1368
+ base = assign.variable.base;
1369
+ delete assign.context;
1370
+ func = assign.value;
1371
+ if (base.value === 'constructor') {
1372
+ if (this.ctor) {
1373
+ throw new Error('cannot define more than one constructor in a class');
1374
+ }
1375
+ if (func.bound) {
1376
+ throw new Error('cannot define a constructor as a bound function');
1377
+ }
1378
+ if (func instanceof Code) {
1379
+ assign = this.ctor = func;
1380
+ } else {
1381
+ this.externalCtor = o.scope.freeVariable('class');
1382
+ assign = new Assign(new Literal(this.externalCtor), func);
1383
+ }
1384
+ } else {
1385
+ if (assign.variable["this"]) {
1386
+ func["static"] = true;
1387
+ if (func.bound) {
1388
+ func.context = name;
1389
+ }
1390
+ } else {
1391
+ assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
1392
+ if (func instanceof Code && func.bound) {
1393
+ this.boundFuncs.push(base);
1394
+ func.bound = false;
1395
+ }
1396
+ }
1397
+ }
1398
+ }
1399
+ _results.push(assign);
1400
+ }
1401
+ return _results;
1402
+ }).call(this);
1403
+ return compact(exprs);
1404
+ };
1405
+
1406
+ Class.prototype.walkBody = function(name, o) {
1407
+ var _this = this;
1408
+ return this.traverseChildren(false, function(child) {
1409
+ var exps, i, node, _i, _len, _ref2;
1410
+ if (child instanceof Class) {
1411
+ return false;
1412
+ }
1413
+ if (child instanceof Block) {
1414
+ _ref2 = exps = child.expressions;
1415
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
1416
+ node = _ref2[i];
1417
+ if (node instanceof Value && node.isObject(true)) {
1418
+ exps[i] = _this.addProperties(node, name, o);
1419
+ }
1420
+ }
1421
+ return child.expressions = exps = flatten(exps);
1422
+ }
1423
+ });
1424
+ };
1425
+
1426
+ Class.prototype.hoistDirectivePrologue = function() {
1427
+ var expressions, index, node;
1428
+ index = 0;
1429
+ expressions = this.body.expressions;
1430
+ while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) {
1431
+ ++index;
1432
+ }
1433
+ return this.directives = expressions.splice(0, index);
1434
+ };
1435
+
1436
+ Class.prototype.ensureConstructor = function(name) {
1437
+ if (!this.ctor) {
1438
+ this.ctor = new Code;
1439
+ if (this.parent) {
1440
+ this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)"));
1441
+ }
1442
+ if (this.externalCtor) {
1443
+ this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)"));
1444
+ }
1445
+ this.ctor.body.makeReturn();
1446
+ this.body.expressions.unshift(this.ctor);
1447
+ }
1448
+ this.ctor.ctor = this.ctor.name = name;
1449
+ this.ctor.klass = null;
1450
+ return this.ctor.noReturn = true;
1451
+ };
1452
+
1453
+ Class.prototype.compileNode = function(o) {
1454
+ var call, decl, klass, lname, name, params, _ref2;
1455
+ decl = this.determineName();
1456
+ name = decl || '_Class';
1457
+ if (name.reserved) {
1458
+ name = "_" + name;
1459
+ }
1460
+ lname = new Literal(name);
1461
+ this.hoistDirectivePrologue();
1462
+ this.setContext(name);
1463
+ this.walkBody(name, o);
1464
+ this.ensureConstructor(name);
1465
+ this.body.spaced = true;
1466
+ if (!(this.ctor instanceof Code)) {
1467
+ this.body.expressions.unshift(this.ctor);
1468
+ }
1469
+ this.body.expressions.push(lname);
1470
+ (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives);
1471
+ this.addBoundFunctions(o);
1472
+ call = Closure.wrap(this.body);
1473
+ if (this.parent) {
1474
+ this.superClass = new Literal(o.scope.freeVariable('super', false));
1475
+ this.body.expressions.unshift(new Extends(lname, this.superClass));
1476
+ call.args.push(this.parent);
1477
+ params = call.variable.params || call.variable.base.params;
1478
+ params.push(new Param(this.superClass));
1479
+ }
1480
+ klass = new Parens(call, true);
1481
+ if (this.variable) {
1482
+ klass = new Assign(this.variable, klass);
1483
+ }
1484
+ return klass.compile(o);
1485
+ };
1486
+
1487
+ return Class;
1488
+
1489
+ })(Base);
1490
+
1491
+ exports.Assign = Assign = (function(_super) {
1492
+
1493
+ __extends(Assign, _super);
1494
+
1495
+ function Assign(variable, value, context, options) {
1496
+ var forbidden, name, _ref2;
1497
+ this.variable = variable;
1498
+ this.value = value;
1499
+ this.context = context;
1500
+ this.param = options && options.param;
1501
+ this.subpattern = options && options.subpattern;
1502
+ forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0);
1503
+ if (forbidden && this.context !== 'object') {
1504
+ throw SyntaxError("variable name may not be \"" + name + "\"");
1505
+ }
1506
+ }
1507
+
1508
+ Assign.prototype.children = ['variable', 'value'];
1509
+
1510
+ Assign.prototype.isStatement = function(o) {
1511
+ return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0;
1512
+ };
1513
+
1514
+ Assign.prototype.assigns = function(name) {
1515
+ return this[this.context === 'object' ? 'value' : 'variable'].assigns(name);
1516
+ };
1517
+
1518
+ Assign.prototype.unfoldSoak = function(o) {
1519
+ return unfoldSoak(o, this, 'variable');
1520
+ };
1521
+
1522
+ Assign.prototype.compileNode = function(o) {
1523
+ var isValue, match, name, val, varBase, _ref2, _ref3, _ref4, _ref5;
1524
+ if (isValue = this.variable instanceof Value) {
1525
+ if (this.variable.isArray() || this.variable.isObject()) {
1526
+ return this.compilePatternMatch(o);
1527
+ }
1528
+ if (this.variable.isSplice()) {
1529
+ return this.compileSplice(o);
1530
+ }
1531
+ if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') {
1532
+ return this.compileConditional(o);
1533
+ }
1534
+ }
1535
+ name = this.variable.compile(o, LEVEL_LIST);
1536
+ if (!this.context) {
1537
+ if (!(varBase = this.variable.unwrapAll()).isAssignable()) {
1538
+ throw SyntaxError("\"" + (this.variable.compile(o)) + "\" cannot be assigned.");
1539
+ }
1540
+ if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) {
1541
+ if (this.param) {
1542
+ o.scope.add(name, 'var');
1543
+ } else {
1544
+ o.scope.find(name);
1545
+ }
1546
+ }
1547
+ }
1548
+ if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
1549
+ if (match[1]) {
1550
+ this.value.klass = match[1];
1551
+ }
1552
+ this.value.name = (_ref3 = (_ref4 = (_ref5 = match[2]) != null ? _ref5 : match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5];
1553
+ }
1554
+ val = this.value.compile(o, LEVEL_LIST);
1555
+ if (this.context === 'object') {
1556
+ return "" + name + ": " + val;
1557
+ }
1558
+ val = name + (" " + (this.context || '=') + " ") + val;
1559
+ if (o.level <= LEVEL_LIST) {
1560
+ return val;
1561
+ } else {
1562
+ return "(" + val + ")";
1563
+ }
1564
+ };
1565
+
1566
+ Assign.prototype.compilePatternMatch = function(o) {
1567
+ var acc, assigns, code, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
1568
+ top = o.level === LEVEL_TOP;
1569
+ value = this.value;
1570
+ objects = this.variable.base.objects;
1571
+ if (!(olen = objects.length)) {
1572
+ code = value.compile(o);
1573
+ if (o.level >= LEVEL_OP) {
1574
+ return "(" + code + ")";
1575
+ } else {
1576
+ return code;
1577
+ }
1578
+ }
1579
+ isObject = this.variable.isObject();
1580
+ if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
1581
+ if (obj instanceof Assign) {
1582
+ _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value;
1583
+ } else {
1584
+ if (obj.base instanceof Parens) {
1585
+ _ref4 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref4[0], idx = _ref4[1];
1586
+ } else {
1587
+ idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
1588
+ }
1589
+ }
1590
+ acc = IDENTIFIER.test(idx.unwrap().value || 0);
1591
+ value = new Value(value);
1592
+ value.properties.push(new (acc ? Access : Index)(idx));
1593
+ if (_ref5 = obj.unwrap().value, __indexOf.call(RESERVED, _ref5) >= 0) {
1594
+ throw new SyntaxError("assignment to a reserved word: " + (obj.compile(o)) + " = " + (value.compile(o)));
1595
+ }
1596
+ return new Assign(obj, value, null, {
1597
+ param: this.param
1598
+ }).compile(o, LEVEL_TOP);
1599
+ }
1600
+ vvar = value.compile(o, LEVEL_LIST);
1601
+ assigns = [];
1602
+ splat = false;
1603
+ if (!IDENTIFIER.test(vvar) || this.variable.assigns(vvar)) {
1604
+ assigns.push("" + (ref = o.scope.freeVariable('ref')) + " = " + vvar);
1605
+ vvar = ref;
1606
+ }
1607
+ for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) {
1608
+ obj = objects[i];
1609
+ idx = i;
1610
+ if (isObject) {
1611
+ if (obj instanceof Assign) {
1612
+ _ref6 = obj, (_ref7 = _ref6.variable, idx = _ref7.base), obj = _ref6.value;
1613
+ } else {
1614
+ if (obj.base instanceof Parens) {
1615
+ _ref8 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref8[0], idx = _ref8[1];
1616
+ } else {
1617
+ idx = obj["this"] ? obj.properties[0].name : obj;
1618
+ }
1619
+ }
1620
+ }
1621
+ if (!splat && obj instanceof Splat) {
1622
+ name = obj.name.unwrap().value;
1623
+ obj = obj.unwrap();
1624
+ val = "" + olen + " <= " + vvar + ".length ? " + (utility('slice')) + ".call(" + vvar + ", " + i;
1625
+ if (rest = olen - i - 1) {
1626
+ ivar = o.scope.freeVariable('i');
1627
+ val += ", " + ivar + " = " + vvar + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])";
1628
+ } else {
1629
+ val += ") : []";
1630
+ }
1631
+ val = new Literal(val);
1632
+ splat = "" + ivar + "++";
1633
+ } else {
1634
+ name = obj.unwrap().value;
1635
+ if (obj instanceof Splat) {
1636
+ obj = obj.name.compile(o);
1637
+ throw new SyntaxError("multiple splats are disallowed in an assignment: " + obj + "...");
1638
+ }
1639
+ if (typeof idx === 'number') {
1640
+ idx = new Literal(splat || idx);
1641
+ acc = false;
1642
+ } else {
1643
+ acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0);
1644
+ }
1645
+ val = new Value(new Literal(vvar), [new (acc ? Access : Index)(idx)]);
1646
+ }
1647
+ if ((name != null) && __indexOf.call(RESERVED, name) >= 0) {
1648
+ throw new SyntaxError("assignment to a reserved word: " + (obj.compile(o)) + " = " + (val.compile(o)));
1649
+ }
1650
+ assigns.push(new Assign(obj, val, null, {
1651
+ param: this.param,
1652
+ subpattern: true
1653
+ }).compile(o, LEVEL_LIST));
1654
+ }
1655
+ if (!(top || this.subpattern)) {
1656
+ assigns.push(vvar);
1657
+ }
1658
+ code = assigns.join(', ');
1659
+ if (o.level < LEVEL_LIST) {
1660
+ return code;
1661
+ } else {
1662
+ return "(" + code + ")";
1663
+ }
1664
+ };
1665
+
1666
+ Assign.prototype.compileConditional = function(o) {
1667
+ var left, right, _ref2;
1668
+ _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1];
1669
+ if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
1670
+ throw new Error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been defined.");
1671
+ }
1672
+ if (__indexOf.call(this.context, "?") >= 0) {
1673
+ o.isExistentialEquals = true;
1674
+ }
1675
+ return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compile(o);
1676
+ };
1677
+
1678
+ Assign.prototype.compileSplice = function(o) {
1679
+ var code, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4;
1680
+ _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive;
1681
+ name = this.variable.compile(o);
1682
+ _ref3 = (from != null ? from.cache(o, LEVEL_OP) : void 0) || ['0', '0'], fromDecl = _ref3[0], fromRef = _ref3[1];
1683
+ if (to) {
1684
+ if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) {
1685
+ to = +to.compile(o) - +fromRef;
1686
+ if (!exclusive) {
1687
+ to += 1;
1688
+ }
1689
+ } else {
1690
+ to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef;
1691
+ if (!exclusive) {
1692
+ to += ' + 1';
1693
+ }
1694
+ }
1695
+ } else {
1696
+ to = "9e9";
1697
+ }
1698
+ _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1];
1699
+ code = "[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat(" + valDef + ")), " + valRef;
1700
+ if (o.level > LEVEL_TOP) {
1701
+ return "(" + code + ")";
1702
+ } else {
1703
+ return code;
1704
+ }
1705
+ };
1706
+
1707
+ return Assign;
1708
+
1709
+ })(Base);
1710
+
1711
+ exports.Code = Code = (function(_super) {
1712
+
1713
+ __extends(Code, _super);
1714
+
1715
+ function Code(params, body, tag) {
1716
+ this.params = params || [];
1717
+ this.body = body || new Block;
1718
+ this.bound = tag === 'boundfunc';
1719
+ if (this.bound) {
1720
+ this.context = '_this';
1721
+ }
1722
+ }
1723
+
1724
+ Code.prototype.children = ['params', 'body'];
1725
+
1726
+ Code.prototype.isStatement = function() {
1727
+ return !!this.ctor;
1728
+ };
1729
+
1730
+ Code.prototype.jumps = NO;
1731
+
1732
+ Code.prototype.compileNode = function(o) {
1733
+ var code, exprs, i, idt, lit, name, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
1734
+ o.scope = new Scope(o.scope, this.body, this);
1735
+ o.scope.shared = del(o, 'sharedScope');
1736
+ o.indent += TAB;
1737
+ delete o.bare;
1738
+ delete o.isExistentialEquals;
1739
+ params = [];
1740
+ exprs = [];
1741
+ _ref2 = this.paramNames();
1742
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1743
+ name = _ref2[_i];
1744
+ if (!o.scope.check(name)) {
1745
+ o.scope.parameter(name);
1746
+ }
1747
+ }
1748
+ _ref3 = this.params;
1749
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
1750
+ param = _ref3[_j];
1751
+ if (!param.splat) {
1752
+ continue;
1753
+ }
1754
+ _ref4 = this.params;
1755
+ for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) {
1756
+ p = _ref4[_k].name;
1757
+ if (p["this"]) {
1758
+ p = p.properties[0].name;
1759
+ }
1760
+ if (p.value) {
1761
+ o.scope.add(p.value, 'var', true);
1762
+ }
1763
+ }
1764
+ splats = new Assign(new Value(new Arr((function() {
1765
+ var _l, _len3, _ref5, _results;
1766
+ _ref5 = this.params;
1767
+ _results = [];
1768
+ for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) {
1769
+ p = _ref5[_l];
1770
+ _results.push(p.asReference(o));
1771
+ }
1772
+ return _results;
1773
+ }).call(this))), new Value(new Literal('arguments')));
1774
+ break;
1775
+ }
1776
+ _ref5 = this.params;
1777
+ for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) {
1778
+ param = _ref5[_l];
1779
+ if (param.isComplex()) {
1780
+ val = ref = param.asReference(o);
1781
+ if (param.value) {
1782
+ val = new Op('?', ref, param.value);
1783
+ }
1784
+ exprs.push(new Assign(new Value(param.name), val, '=', {
1785
+ param: true
1786
+ }));
1787
+ } else {
1788
+ ref = param;
1789
+ if (param.value) {
1790
+ lit = new Literal(ref.name.value + ' == null');
1791
+ val = new Assign(new Value(param.name), param.value, '=');
1792
+ exprs.push(new If(lit, val));
1793
+ }
1794
+ }
1795
+ if (!splats) {
1796
+ params.push(ref);
1797
+ }
1798
+ }
1799
+ wasEmpty = this.body.isEmpty();
1800
+ if (splats) {
1801
+ exprs.unshift(splats);
1802
+ }
1803
+ if (exprs.length) {
1804
+ (_ref6 = this.body.expressions).unshift.apply(_ref6, exprs);
1805
+ }
1806
+ for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
1807
+ p = params[i];
1808
+ o.scope.parameter(params[i] = p.compile(o));
1809
+ }
1810
+ uniqs = [];
1811
+ _ref7 = this.paramNames();
1812
+ for (_n = 0, _len5 = _ref7.length; _n < _len5; _n++) {
1813
+ name = _ref7[_n];
1814
+ if (__indexOf.call(uniqs, name) >= 0) {
1815
+ throw SyntaxError("multiple parameters named '" + name + "'");
1816
+ }
1817
+ uniqs.push(name);
1818
+ }
1819
+ if (!(wasEmpty || this.noReturn)) {
1820
+ this.body.makeReturn();
1821
+ }
1822
+ if (this.bound) {
1823
+ if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) {
1824
+ this.bound = this.context = o.scope.parent.method.context;
1825
+ } else if (!this["static"]) {
1826
+ o.scope.parent.assign('_this', 'this');
1827
+ }
1828
+ }
1829
+ idt = o.indent;
1830
+ code = 'function';
1831
+ if (this.ctor) {
1832
+ code += ' ' + this.name;
1833
+ }
1834
+ code += '(' + params.join(', ') + ') {';
1835
+ if (!this.body.isEmpty()) {
1836
+ code += "\n" + (this.body.compileWithDeclarations(o)) + "\n" + this.tab;
1837
+ }
1838
+ code += '}';
1839
+ if (this.ctor) {
1840
+ return this.tab + code;
1841
+ }
1842
+ if (this.front || (o.level >= LEVEL_ACCESS)) {
1843
+ return "(" + code + ")";
1844
+ } else {
1845
+ return code;
1846
+ }
1847
+ };
1848
+
1849
+ Code.prototype.paramNames = function() {
1850
+ var names, param, _i, _len, _ref2;
1851
+ names = [];
1852
+ _ref2 = this.params;
1853
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1854
+ param = _ref2[_i];
1855
+ names.push.apply(names, param.names());
1856
+ }
1857
+ return names;
1858
+ };
1859
+
1860
+ Code.prototype.traverseChildren = function(crossScope, func) {
1861
+ if (crossScope) {
1862
+ return Code.__super__.traverseChildren.call(this, crossScope, func);
1863
+ }
1864
+ };
1865
+
1866
+ return Code;
1867
+
1868
+ })(Base);
1869
+
1870
+ exports.Param = Param = (function(_super) {
1871
+
1872
+ __extends(Param, _super);
1873
+
1874
+ function Param(name, value, splat) {
1875
+ var _ref2;
1876
+ this.name = name;
1877
+ this.value = value;
1878
+ this.splat = splat;
1879
+ if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
1880
+ throw SyntaxError("parameter name \"" + name + "\" is not allowed");
1881
+ }
1882
+ }
1883
+
1884
+ Param.prototype.children = ['name', 'value'];
1885
+
1886
+ Param.prototype.compile = function(o) {
1887
+ return this.name.compile(o, LEVEL_LIST);
1888
+ };
1889
+
1890
+ Param.prototype.asReference = function(o) {
1891
+ var node;
1892
+ if (this.reference) {
1893
+ return this.reference;
1894
+ }
1895
+ node = this.name;
1896
+ if (node["this"]) {
1897
+ node = node.properties[0].name;
1898
+ if (node.value.reserved) {
1899
+ node = new Literal(o.scope.freeVariable(node.value));
1900
+ }
1901
+ } else if (node.isComplex()) {
1902
+ node = new Literal(o.scope.freeVariable('arg'));
1903
+ }
1904
+ node = new Value(node);
1905
+ if (this.splat) {
1906
+ node = new Splat(node);
1907
+ }
1908
+ return this.reference = node;
1909
+ };
1910
+
1911
+ Param.prototype.isComplex = function() {
1912
+ return this.name.isComplex();
1913
+ };
1914
+
1915
+ Param.prototype.names = function(name) {
1916
+ var atParam, names, obj, _i, _len, _ref2;
1917
+ if (name == null) {
1918
+ name = this.name;
1919
+ }
1920
+ atParam = function(obj) {
1921
+ var value;
1922
+ value = obj.properties[0].name.value;
1923
+ if (value.reserved) {
1924
+ return [];
1925
+ } else {
1926
+ return [value];
1927
+ }
1928
+ };
1929
+ if (name instanceof Literal) {
1930
+ return [name.value];
1931
+ }
1932
+ if (name instanceof Value) {
1933
+ return atParam(name);
1934
+ }
1935
+ names = [];
1936
+ _ref2 = name.objects;
1937
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1938
+ obj = _ref2[_i];
1939
+ if (obj instanceof Assign) {
1940
+ names.push(obj.value.unwrap().value);
1941
+ } else if (obj instanceof Splat) {
1942
+ names.push(obj.name.unwrap().value);
1943
+ } else if (obj instanceof Value) {
1944
+ if (obj.isArray() || obj.isObject()) {
1945
+ names.push.apply(names, this.names(obj.base));
1946
+ } else if (obj["this"]) {
1947
+ names.push.apply(names, atParam(obj));
1948
+ } else {
1949
+ names.push(obj.base.value);
1950
+ }
1951
+ } else {
1952
+ throw SyntaxError("illegal parameter " + (obj.compile()));
1953
+ }
1954
+ }
1955
+ return names;
1956
+ };
1957
+
1958
+ return Param;
1959
+
1960
+ })(Base);
1961
+
1962
+ exports.Splat = Splat = (function(_super) {
1963
+
1964
+ __extends(Splat, _super);
1965
+
1966
+ Splat.prototype.children = ['name'];
1967
+
1968
+ Splat.prototype.isAssignable = YES;
1969
+
1970
+ function Splat(name) {
1971
+ this.name = name.compile ? name : new Literal(name);
1972
+ }
1973
+
1974
+ Splat.prototype.assigns = function(name) {
1975
+ return this.name.assigns(name);
1976
+ };
1977
+
1978
+ Splat.prototype.compile = function(o) {
1979
+ if (this.index != null) {
1980
+ return this.compileParam(o);
1981
+ } else {
1982
+ return this.name.compile(o);
1983
+ }
1984
+ };
1985
+
1986
+ Splat.prototype.unwrap = function() {
1987
+ return this.name;
1988
+ };
1989
+
1990
+ Splat.compileSplattedArray = function(o, list, apply) {
1991
+ var args, base, code, i, index, node, _i, _len;
1992
+ index = -1;
1993
+ while ((node = list[++index]) && !(node instanceof Splat)) {
1994
+ continue;
1995
+ }
1996
+ if (index >= list.length) {
1997
+ return '';
1998
+ }
1999
+ if (list.length === 1) {
2000
+ code = list[0].compile(o, LEVEL_LIST);
2001
+ if (apply) {
2002
+ return code;
2003
+ }
2004
+ return "" + (utility('slice')) + ".call(" + code + ")";
2005
+ }
2006
+ args = list.slice(index);
2007
+ for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
2008
+ node = args[i];
2009
+ code = node.compile(o, LEVEL_LIST);
2010
+ args[i] = node instanceof Splat ? "" + (utility('slice')) + ".call(" + code + ")" : "[" + code + "]";
2011
+ }
2012
+ if (index === 0) {
2013
+ return args[0] + (".concat(" + (args.slice(1).join(', ')) + ")");
2014
+ }
2015
+ base = (function() {
2016
+ var _j, _len1, _ref2, _results;
2017
+ _ref2 = list.slice(0, index);
2018
+ _results = [];
2019
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
2020
+ node = _ref2[_j];
2021
+ _results.push(node.compile(o, LEVEL_LIST));
2022
+ }
2023
+ return _results;
2024
+ })();
2025
+ return "[" + (base.join(', ')) + "].concat(" + (args.join(', ')) + ")";
2026
+ };
2027
+
2028
+ return Splat;
2029
+
2030
+ })(Base);
2031
+
2032
+ exports.While = While = (function(_super) {
2033
+
2034
+ __extends(While, _super);
2035
+
2036
+ function While(condition, options) {
2037
+ this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition;
2038
+ this.guard = options != null ? options.guard : void 0;
2039
+ }
2040
+
2041
+ While.prototype.children = ['condition', 'guard', 'body'];
2042
+
2043
+ While.prototype.isStatement = YES;
2044
+
2045
+ While.prototype.makeReturn = function(res) {
2046
+ if (res) {
2047
+ return While.__super__.makeReturn.apply(this, arguments);
2048
+ } else {
2049
+ this.returns = !this.jumps({
2050
+ loop: true
2051
+ });
2052
+ return this;
2053
+ }
2054
+ };
2055
+
2056
+ While.prototype.addBody = function(body) {
2057
+ this.body = body;
2058
+ return this;
2059
+ };
2060
+
2061
+ While.prototype.jumps = function() {
2062
+ var expressions, node, _i, _len;
2063
+ expressions = this.body.expressions;
2064
+ if (!expressions.length) {
2065
+ return false;
2066
+ }
2067
+ for (_i = 0, _len = expressions.length; _i < _len; _i++) {
2068
+ node = expressions[_i];
2069
+ if (node.jumps({
2070
+ loop: true
2071
+ })) {
2072
+ return node;
2073
+ }
2074
+ }
2075
+ return false;
2076
+ };
2077
+
2078
+ While.prototype.compileNode = function(o) {
2079
+ var body, code, rvar, set;
2080
+ o.indent += TAB;
2081
+ set = '';
2082
+ body = this.body;
2083
+ if (body.isEmpty()) {
2084
+ body = '';
2085
+ } else {
2086
+ if (this.returns) {
2087
+ body.makeReturn(rvar = o.scope.freeVariable('results'));
2088
+ set = "" + this.tab + rvar + " = [];\n";
2089
+ }
2090
+ if (this.guard) {
2091
+ if (body.expressions.length > 1) {
2092
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
2093
+ } else {
2094
+ if (this.guard) {
2095
+ body = Block.wrap([new If(this.guard, body)]);
2096
+ }
2097
+ }
2098
+ }
2099
+ body = "\n" + (body.compile(o, LEVEL_TOP)) + "\n" + this.tab;
2100
+ }
2101
+ code = set + this.tab + ("while (" + (this.condition.compile(o, LEVEL_PAREN)) + ") {" + body + "}");
2102
+ if (this.returns) {
2103
+ code += "\n" + this.tab + "return " + rvar + ";";
2104
+ }
2105
+ return code;
2106
+ };
2107
+
2108
+ return While;
2109
+
2110
+ })(Base);
2111
+
2112
+ exports.Op = Op = (function(_super) {
2113
+ var CONVERSIONS, INVERSIONS;
2114
+
2115
+ __extends(Op, _super);
2116
+
2117
+ function Op(op, first, second, flip) {
2118
+ if (op === 'in') {
2119
+ return new In(first, second);
2120
+ }
2121
+ if (op === 'do') {
2122
+ return this.generateDo(first);
2123
+ }
2124
+ if (op === 'new') {
2125
+ if (first instanceof Call && !first["do"] && !first.isNew) {
2126
+ return first.newInstance();
2127
+ }
2128
+ if (first instanceof Code && first.bound || first["do"]) {
2129
+ first = new Parens(first);
2130
+ }
2131
+ }
2132
+ this.operator = CONVERSIONS[op] || op;
2133
+ this.first = first;
2134
+ this.second = second;
2135
+ this.flip = !!flip;
2136
+ return this;
2137
+ }
2138
+
2139
+ CONVERSIONS = {
2140
+ '==': '===',
2141
+ '!=': '!==',
2142
+ 'of': 'in'
2143
+ };
2144
+
2145
+ INVERSIONS = {
2146
+ '!==': '===',
2147
+ '===': '!=='
2148
+ };
2149
+
2150
+ Op.prototype.children = ['first', 'second'];
2151
+
2152
+ Op.prototype.isSimpleNumber = NO;
2153
+
2154
+ Op.prototype.isUnary = function() {
2155
+ return !this.second;
2156
+ };
2157
+
2158
+ Op.prototype.isComplex = function() {
2159
+ var _ref2;
2160
+ return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex();
2161
+ };
2162
+
2163
+ Op.prototype.isChainable = function() {
2164
+ var _ref2;
2165
+ return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!==';
2166
+ };
2167
+
2168
+ Op.prototype.invert = function() {
2169
+ var allInvertable, curr, fst, op, _ref2;
2170
+ if (this.isChainable() && this.first.isChainable()) {
2171
+ allInvertable = true;
2172
+ curr = this;
2173
+ while (curr && curr.operator) {
2174
+ allInvertable && (allInvertable = curr.operator in INVERSIONS);
2175
+ curr = curr.first;
2176
+ }
2177
+ if (!allInvertable) {
2178
+ return new Parens(this).invert();
2179
+ }
2180
+ curr = this;
2181
+ while (curr && curr.operator) {
2182
+ curr.invert = !curr.invert;
2183
+ curr.operator = INVERSIONS[curr.operator];
2184
+ curr = curr.first;
2185
+ }
2186
+ return this;
2187
+ } else if (op = INVERSIONS[this.operator]) {
2188
+ this.operator = op;
2189
+ if (this.first.unwrap() instanceof Op) {
2190
+ this.first.invert();
2191
+ }
2192
+ return this;
2193
+ } else if (this.second) {
2194
+ return new Parens(this).invert();
2195
+ } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) {
2196
+ return fst;
2197
+ } else {
2198
+ return new Op('!', this);
2199
+ }
2200
+ };
2201
+
2202
+ Op.prototype.unfoldSoak = function(o) {
2203
+ var _ref2;
2204
+ return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first');
2205
+ };
2206
+
2207
+ Op.prototype.generateDo = function(exp) {
2208
+ var call, func, param, passedParams, ref, _i, _len, _ref2;
2209
+ passedParams = [];
2210
+ func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
2211
+ _ref2 = func.params || [];
2212
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
2213
+ param = _ref2[_i];
2214
+ if (param.value) {
2215
+ passedParams.push(param.value);
2216
+ delete param.value;
2217
+ } else {
2218
+ passedParams.push(param);
2219
+ }
2220
+ }
2221
+ call = new Call(exp, passedParams);
2222
+ call["do"] = true;
2223
+ return call;
2224
+ };
2225
+
2226
+ Op.prototype.compileNode = function(o) {
2227
+ var code, isChain, _ref2, _ref3;
2228
+ isChain = this.isChainable() && this.first.isChainable();
2229
+ if (!isChain) {
2230
+ this.first.front = this.front;
2231
+ }
2232
+ if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
2233
+ throw SyntaxError('delete operand may not be argument or var');
2234
+ }
2235
+ if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) {
2236
+ throw SyntaxError('prefix increment/decrement may not have eval or arguments operand');
2237
+ }
2238
+ if (this.isUnary()) {
2239
+ return this.compileUnary(o);
2240
+ }
2241
+ if (isChain) {
2242
+ return this.compileChain(o);
2243
+ }
2244
+ if (this.operator === '?') {
2245
+ return this.compileExistence(o);
2246
+ }
2247
+ code = this.first.compile(o, LEVEL_OP) + ' ' + this.operator + ' ' + this.second.compile(o, LEVEL_OP);
2248
+ if (o.level <= LEVEL_OP) {
2249
+ return code;
2250
+ } else {
2251
+ return "(" + code + ")";
2252
+ }
2253
+ };
2254
+
2255
+ Op.prototype.compileChain = function(o) {
2256
+ var code, fst, shared, _ref2;
2257
+ _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1];
2258
+ fst = this.first.compile(o, LEVEL_OP);
2259
+ code = "" + fst + " " + (this.invert ? '&&' : '||') + " " + (shared.compile(o)) + " " + this.operator + " " + (this.second.compile(o, LEVEL_OP));
2260
+ return "(" + code + ")";
2261
+ };
2262
+
2263
+ Op.prototype.compileExistence = function(o) {
2264
+ var fst, ref;
2265
+ if (this.first.isComplex()) {
2266
+ ref = new Literal(o.scope.freeVariable('ref'));
2267
+ fst = new Parens(new Assign(ref, this.first));
2268
+ } else {
2269
+ fst = this.first;
2270
+ ref = fst;
2271
+ }
2272
+ return new If(new Existence(fst), ref, {
2273
+ type: 'if'
2274
+ }).addElse(this.second).compile(o);
2275
+ };
2276
+
2277
+ Op.prototype.compileUnary = function(o) {
2278
+ var op, parts, plusMinus;
2279
+ if (o.level >= LEVEL_ACCESS) {
2280
+ return (new Parens(this)).compile(o);
2281
+ }
2282
+ parts = [op = this.operator];
2283
+ plusMinus = op === '+' || op === '-';
2284
+ if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) {
2285
+ parts.push(' ');
2286
+ }
2287
+ if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
2288
+ this.first = new Parens(this.first);
2289
+ }
2290
+ parts.push(this.first.compile(o, LEVEL_OP));
2291
+ if (this.flip) {
2292
+ parts.reverse();
2293
+ }
2294
+ return parts.join('');
2295
+ };
2296
+
2297
+ Op.prototype.toString = function(idt) {
2298
+ return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
2299
+ };
2300
+
2301
+ return Op;
2302
+
2303
+ })(Base);
2304
+
2305
+ exports.In = In = (function(_super) {
2306
+
2307
+ __extends(In, _super);
2308
+
2309
+ function In(object, array) {
2310
+ this.object = object;
2311
+ this.array = array;
2312
+ }
2313
+
2314
+ In.prototype.children = ['object', 'array'];
2315
+
2316
+ In.prototype.invert = NEGATE;
2317
+
2318
+ In.prototype.compileNode = function(o) {
2319
+ var hasSplat, obj, _i, _len, _ref2;
2320
+ if (this.array instanceof Value && this.array.isArray()) {
2321
+ _ref2 = this.array.base.objects;
2322
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
2323
+ obj = _ref2[_i];
2324
+ if (!(obj instanceof Splat)) {
2325
+ continue;
2326
+ }
2327
+ hasSplat = true;
2328
+ break;
2329
+ }
2330
+ if (!hasSplat) {
2331
+ return this.compileOrTest(o);
2332
+ }
2333
+ }
2334
+ return this.compileLoopTest(o);
2335
+ };
2336
+
2337
+ In.prototype.compileOrTest = function(o) {
2338
+ var cmp, cnj, i, item, ref, sub, tests, _ref2, _ref3;
2339
+ if (this.array.base.objects.length === 0) {
2340
+ return "" + (!!this.negated);
2341
+ }
2342
+ _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1];
2343
+ _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1];
2344
+ tests = (function() {
2345
+ var _i, _len, _ref4, _results;
2346
+ _ref4 = this.array.base.objects;
2347
+ _results = [];
2348
+ for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
2349
+ item = _ref4[i];
2350
+ _results.push((i ? ref : sub) + cmp + item.compile(o, LEVEL_ACCESS));
2351
+ }
2352
+ return _results;
2353
+ }).call(this);
2354
+ tests = tests.join(cnj);
2355
+ if (o.level < LEVEL_OP) {
2356
+ return tests;
2357
+ } else {
2358
+ return "(" + tests + ")";
2359
+ }
2360
+ };
2361
+
2362
+ In.prototype.compileLoopTest = function(o) {
2363
+ var code, ref, sub, _ref2;
2364
+ _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1];
2365
+ code = utility('indexOf') + (".call(" + (this.array.compile(o, LEVEL_LIST)) + ", " + ref + ") ") + (this.negated ? '< 0' : '>= 0');
2366
+ if (sub === ref) {
2367
+ return code;
2368
+ }
2369
+ code = sub + ', ' + code;
2370
+ if (o.level < LEVEL_LIST) {
2371
+ return code;
2372
+ } else {
2373
+ return "(" + code + ")";
2374
+ }
2375
+ };
2376
+
2377
+ In.prototype.toString = function(idt) {
2378
+ return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
2379
+ };
2380
+
2381
+ return In;
2382
+
2383
+ })(Base);
2384
+
2385
+ exports.Try = Try = (function(_super) {
2386
+
2387
+ __extends(Try, _super);
2388
+
2389
+ function Try(attempt, error, recovery, ensure) {
2390
+ this.attempt = attempt;
2391
+ this.error = error;
2392
+ this.recovery = recovery;
2393
+ this.ensure = ensure;
2394
+ }
2395
+
2396
+ Try.prototype.children = ['attempt', 'recovery', 'ensure'];
2397
+
2398
+ Try.prototype.isStatement = YES;
2399
+
2400
+ Try.prototype.jumps = function(o) {
2401
+ var _ref2;
2402
+ return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0);
2403
+ };
2404
+
2405
+ Try.prototype.makeReturn = function(res) {
2406
+ if (this.attempt) {
2407
+ this.attempt = this.attempt.makeReturn(res);
2408
+ }
2409
+ if (this.recovery) {
2410
+ this.recovery = this.recovery.makeReturn(res);
2411
+ }
2412
+ return this;
2413
+ };
2414
+
2415
+ Try.prototype.compileNode = function(o) {
2416
+ var catchPart, ensurePart, errorPart, tryPart;
2417
+ o.indent += TAB;
2418
+ errorPart = this.error ? " (" + (this.error.compile(o)) + ") " : ' ';
2419
+ tryPart = this.attempt.compile(o, LEVEL_TOP);
2420
+ catchPart = (function() {
2421
+ var _ref2;
2422
+ if (this.recovery) {
2423
+ if (_ref2 = this.error.value, __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
2424
+ throw SyntaxError("catch variable may not be \"" + this.error.value + "\"");
2425
+ }
2426
+ if (!o.scope.check(this.error.value)) {
2427
+ o.scope.add(this.error.value, 'param');
2428
+ }
2429
+ return " catch" + errorPart + "{\n" + (this.recovery.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}";
2430
+ } else if (!(this.ensure || this.recovery)) {
2431
+ return ' catch (_error) {}';
2432
+ }
2433
+ }).call(this);
2434
+ ensurePart = this.ensure ? " finally {\n" + (this.ensure.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}" : '';
2435
+ return "" + this.tab + "try {\n" + tryPart + "\n" + this.tab + "}" + (catchPart || '') + ensurePart;
2436
+ };
2437
+
2438
+ return Try;
2439
+
2440
+ })(Base);
2441
+
2442
+ exports.Throw = Throw = (function(_super) {
2443
+
2444
+ __extends(Throw, _super);
2445
+
2446
+ function Throw(expression) {
2447
+ this.expression = expression;
2448
+ }
2449
+
2450
+ Throw.prototype.children = ['expression'];
2451
+
2452
+ Throw.prototype.isStatement = YES;
2453
+
2454
+ Throw.prototype.jumps = NO;
2455
+
2456
+ Throw.prototype.makeReturn = THIS;
2457
+
2458
+ Throw.prototype.compileNode = function(o) {
2459
+ return this.tab + ("throw " + (this.expression.compile(o)) + ";");
2460
+ };
2461
+
2462
+ return Throw;
2463
+
2464
+ })(Base);
2465
+
2466
+ exports.Existence = Existence = (function(_super) {
2467
+
2468
+ __extends(Existence, _super);
2469
+
2470
+ function Existence(expression) {
2471
+ this.expression = expression;
2472
+ }
2473
+
2474
+ Existence.prototype.children = ['expression'];
2475
+
2476
+ Existence.prototype.invert = NEGATE;
2477
+
2478
+ Existence.prototype.compileNode = function(o) {
2479
+ var cmp, cnj, code, _ref2;
2480
+ this.expression.front = this.front;
2481
+ code = this.expression.compile(o, LEVEL_OP);
2482
+ if (IDENTIFIER.test(code) && !o.scope.check(code)) {
2483
+ _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1];
2484
+ code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
2485
+ } else {
2486
+ code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
2487
+ }
2488
+ if (o.level <= LEVEL_COND) {
2489
+ return code;
2490
+ } else {
2491
+ return "(" + code + ")";
2492
+ }
2493
+ };
2494
+
2495
+ return Existence;
2496
+
2497
+ })(Base);
2498
+
2499
+ exports.Parens = Parens = (function(_super) {
2500
+
2501
+ __extends(Parens, _super);
2502
+
2503
+ function Parens(body) {
2504
+ this.body = body;
2505
+ }
2506
+
2507
+ Parens.prototype.children = ['body'];
2508
+
2509
+ Parens.prototype.unwrap = function() {
2510
+ return this.body;
2511
+ };
2512
+
2513
+ Parens.prototype.isComplex = function() {
2514
+ return this.body.isComplex();
2515
+ };
2516
+
2517
+ Parens.prototype.compileNode = function(o) {
2518
+ var bare, code, expr;
2519
+ expr = this.body.unwrap();
2520
+ if (expr instanceof Value && expr.isAtomic()) {
2521
+ expr.front = this.front;
2522
+ return expr.compile(o);
2523
+ }
2524
+ code = expr.compile(o, LEVEL_PAREN);
2525
+ bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns));
2526
+ if (bare) {
2527
+ return code;
2528
+ } else {
2529
+ return "(" + code + ")";
2530
+ }
2531
+ };
2532
+
2533
+ return Parens;
2534
+
2535
+ })(Base);
2536
+
2537
+ exports.For = For = (function(_super) {
2538
+
2539
+ __extends(For, _super);
2540
+
2541
+ function For(body, source) {
2542
+ var _ref2;
2543
+ this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
2544
+ this.body = Block.wrap([body]);
2545
+ this.own = !!source.own;
2546
+ this.object = !!source.object;
2547
+ if (this.object) {
2548
+ _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1];
2549
+ }
2550
+ if (this.index instanceof Value) {
2551
+ throw SyntaxError('index cannot be a pattern matching expression');
2552
+ }
2553
+ this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length;
2554
+ this.pattern = this.name instanceof Value;
2555
+ if (this.range && this.index) {
2556
+ throw SyntaxError('indexes do not apply to range loops');
2557
+ }
2558
+ if (this.range && this.pattern) {
2559
+ throw SyntaxError('cannot pattern match over range loops');
2560
+ }
2561
+ this.returns = false;
2562
+ }
2563
+
2564
+ For.prototype.children = ['body', 'source', 'guard', 'step'];
2565
+
2566
+ For.prototype.compileNode = function(o) {
2567
+ var body, defPart, forPart, forVarPart, guardPart, idt1, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, stepPart, stepvar, svar, varPart, _ref2;
2568
+ body = Block.wrap([this.body]);
2569
+ lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0;
2570
+ if (lastJumps && lastJumps instanceof Return) {
2571
+ this.returns = false;
2572
+ }
2573
+ source = this.range ? this.source.base : this.source;
2574
+ scope = o.scope;
2575
+ name = this.name && this.name.compile(o, LEVEL_LIST);
2576
+ index = this.index && this.index.compile(o, LEVEL_LIST);
2577
+ if (name && !this.pattern) {
2578
+ scope.find(name);
2579
+ }
2580
+ if (index) {
2581
+ scope.find(index);
2582
+ }
2583
+ if (this.returns) {
2584
+ rvar = scope.freeVariable('results');
2585
+ }
2586
+ ivar = (this.object && index) || scope.freeVariable('i');
2587
+ kvar = (this.range && name) || index || ivar;
2588
+ kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
2589
+ if (this.step && !this.range) {
2590
+ stepvar = scope.freeVariable("step");
2591
+ }
2592
+ if (this.pattern) {
2593
+ name = ivar;
2594
+ }
2595
+ varPart = '';
2596
+ guardPart = '';
2597
+ defPart = '';
2598
+ idt1 = this.tab + TAB;
2599
+ if (this.range) {
2600
+ forPart = source.compile(merge(o, {
2601
+ index: ivar,
2602
+ name: name,
2603
+ step: this.step
2604
+ }));
2605
+ } else {
2606
+ svar = this.source.compile(o, LEVEL_LIST);
2607
+ if ((name || this.own) && !IDENTIFIER.test(svar)) {
2608
+ defPart = "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n";
2609
+ svar = ref;
2610
+ }
2611
+ if (name && !this.pattern) {
2612
+ namePart = "" + name + " = " + svar + "[" + kvar + "]";
2613
+ }
2614
+ if (!this.object) {
2615
+ lvar = scope.freeVariable('len');
2616
+ forVarPart = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length";
2617
+ if (this.step) {
2618
+ forVarPart += ", " + stepvar + " = " + (this.step.compile(o, LEVEL_OP));
2619
+ }
2620
+ stepPart = "" + kvarAssign + (this.step ? "" + ivar + " += " + stepvar : (kvar !== ivar ? "++" + ivar : "" + ivar + "++"));
2621
+ forPart = "" + forVarPart + "; " + ivar + " < " + lvar + "; " + stepPart;
2622
+ }
2623
+ }
2624
+ if (this.returns) {
2625
+ resultPart = "" + this.tab + rvar + " = [];\n";
2626
+ returnResult = "\n" + this.tab + "return " + rvar + ";";
2627
+ body.makeReturn(rvar);
2628
+ }
2629
+ if (this.guard) {
2630
+ if (body.expressions.length > 1) {
2631
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
2632
+ } else {
2633
+ if (this.guard) {
2634
+ body = Block.wrap([new If(this.guard, body)]);
2635
+ }
2636
+ }
2637
+ }
2638
+ if (this.pattern) {
2639
+ body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]")));
2640
+ }
2641
+ defPart += this.pluckDirectCall(o, body);
2642
+ if (namePart) {
2643
+ varPart = "\n" + idt1 + namePart + ";";
2644
+ }
2645
+ if (this.object) {
2646
+ forPart = "" + kvar + " in " + svar;
2647
+ if (this.own) {
2648
+ guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;";
2649
+ }
2650
+ }
2651
+ body = body.compile(merge(o, {
2652
+ indent: idt1
2653
+ }), LEVEL_TOP);
2654
+ if (body) {
2655
+ body = '\n' + body + '\n';
2656
+ }
2657
+ return "" + defPart + (resultPart || '') + this.tab + "for (" + forPart + ") {" + guardPart + varPart + body + this.tab + "}" + (returnResult || '');
2658
+ };
2659
+
2660
+ For.prototype.pluckDirectCall = function(o, body) {
2661
+ var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
2662
+ defs = '';
2663
+ _ref2 = body.expressions;
2664
+ for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) {
2665
+ expr = _ref2[idx];
2666
+ expr = expr.unwrapAll();
2667
+ if (!(expr instanceof Call)) {
2668
+ continue;
2669
+ }
2670
+ val = expr.variable.unwrapAll();
2671
+ if (!((val instanceof Code) || (val instanceof Value && ((_ref3 = val.base) != null ? _ref3.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref4 = (_ref5 = val.properties[0].name) != null ? _ref5.value : void 0) === 'call' || _ref4 === 'apply')))) {
2672
+ continue;
2673
+ }
2674
+ fn = ((_ref6 = val.base) != null ? _ref6.unwrapAll() : void 0) || val;
2675
+ ref = new Literal(o.scope.freeVariable('fn'));
2676
+ base = new Value(ref);
2677
+ if (val.base) {
2678
+ _ref7 = [base, val], val.base = _ref7[0], base = _ref7[1];
2679
+ }
2680
+ body.expressions[idx] = new Call(base, expr.args);
2681
+ defs += this.tab + new Assign(ref, fn).compile(o, LEVEL_TOP) + ';\n';
2682
+ }
2683
+ return defs;
2684
+ };
2685
+
2686
+ return For;
2687
+
2688
+ })(While);
2689
+
2690
+ exports.Switch = Switch = (function(_super) {
2691
+
2692
+ __extends(Switch, _super);
2693
+
2694
+ function Switch(subject, cases, otherwise) {
2695
+ this.subject = subject;
2696
+ this.cases = cases;
2697
+ this.otherwise = otherwise;
2698
+ }
2699
+
2700
+ Switch.prototype.children = ['subject', 'cases', 'otherwise'];
2701
+
2702
+ Switch.prototype.isStatement = YES;
2703
+
2704
+ Switch.prototype.jumps = function(o) {
2705
+ var block, conds, _i, _len, _ref2, _ref3, _ref4;
2706
+ if (o == null) {
2707
+ o = {
2708
+ block: true
2709
+ };
2710
+ }
2711
+ _ref2 = this.cases;
2712
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
2713
+ _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1];
2714
+ if (block.jumps(o)) {
2715
+ return block;
2716
+ }
2717
+ }
2718
+ return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0;
2719
+ };
2720
+
2721
+ Switch.prototype.makeReturn = function(res) {
2722
+ var pair, _i, _len, _ref2, _ref3;
2723
+ _ref2 = this.cases;
2724
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
2725
+ pair = _ref2[_i];
2726
+ pair[1].makeReturn(res);
2727
+ }
2728
+ if (res) {
2729
+ this.otherwise || (this.otherwise = new Block([new Literal('void 0')]));
2730
+ }
2731
+ if ((_ref3 = this.otherwise) != null) {
2732
+ _ref3.makeReturn(res);
2733
+ }
2734
+ return this;
2735
+ };
2736
+
2737
+ Switch.prototype.compileNode = function(o) {
2738
+ var block, body, code, cond, conditions, expr, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4, _ref5;
2739
+ idt1 = o.indent + TAB;
2740
+ idt2 = o.indent = idt1 + TAB;
2741
+ code = this.tab + ("switch (" + (((_ref2 = this.subject) != null ? _ref2.compile(o, LEVEL_PAREN) : void 0) || false) + ") {\n");
2742
+ _ref3 = this.cases;
2743
+ for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) {
2744
+ _ref4 = _ref3[i], conditions = _ref4[0], block = _ref4[1];
2745
+ _ref5 = flatten([conditions]);
2746
+ for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) {
2747
+ cond = _ref5[_j];
2748
+ if (!this.subject) {
2749
+ cond = cond.invert();
2750
+ }
2751
+ code += idt1 + ("case " + (cond.compile(o, LEVEL_PAREN)) + ":\n");
2752
+ }
2753
+ if (body = block.compile(o, LEVEL_TOP)) {
2754
+ code += body + '\n';
2755
+ }
2756
+ if (i === this.cases.length - 1 && !this.otherwise) {
2757
+ break;
2758
+ }
2759
+ expr = this.lastNonComment(block.expressions);
2760
+ if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) {
2761
+ continue;
2762
+ }
2763
+ code += idt2 + 'break;\n';
2764
+ }
2765
+ if (this.otherwise && this.otherwise.expressions.length) {
2766
+ code += idt1 + ("default:\n" + (this.otherwise.compile(o, LEVEL_TOP)) + "\n");
2767
+ }
2768
+ return code + this.tab + '}';
2769
+ };
2770
+
2771
+ return Switch;
2772
+
2773
+ })(Base);
2774
+
2775
+ exports.If = If = (function(_super) {
2776
+
2777
+ __extends(If, _super);
2778
+
2779
+ function If(condition, body, options) {
2780
+ this.body = body;
2781
+ if (options == null) {
2782
+ options = {};
2783
+ }
2784
+ this.condition = options.type === 'unless' ? condition.invert() : condition;
2785
+ this.elseBody = null;
2786
+ this.isChain = false;
2787
+ this.soak = options.soak;
2788
+ }
2789
+
2790
+ If.prototype.children = ['condition', 'body', 'elseBody'];
2791
+
2792
+ If.prototype.bodyNode = function() {
2793
+ var _ref2;
2794
+ return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0;
2795
+ };
2796
+
2797
+ If.prototype.elseBodyNode = function() {
2798
+ var _ref2;
2799
+ return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0;
2800
+ };
2801
+
2802
+ If.prototype.addElse = function(elseBody) {
2803
+ if (this.isChain) {
2804
+ this.elseBodyNode().addElse(elseBody);
2805
+ } else {
2806
+ this.isChain = elseBody instanceof If;
2807
+ this.elseBody = this.ensureBlock(elseBody);
2808
+ }
2809
+ return this;
2810
+ };
2811
+
2812
+ If.prototype.isStatement = function(o) {
2813
+ var _ref2;
2814
+ return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0);
2815
+ };
2816
+
2817
+ If.prototype.jumps = function(o) {
2818
+ var _ref2;
2819
+ return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0);
2820
+ };
2821
+
2822
+ If.prototype.compileNode = function(o) {
2823
+ if (this.isStatement(o)) {
2824
+ return this.compileStatement(o);
2825
+ } else {
2826
+ return this.compileExpression(o);
2827
+ }
2828
+ };
2829
+
2830
+ If.prototype.makeReturn = function(res) {
2831
+ if (res) {
2832
+ this.elseBody || (this.elseBody = new Block([new Literal('void 0')]));
2833
+ }
2834
+ this.body && (this.body = new Block([this.body.makeReturn(res)]));
2835
+ this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)]));
2836
+ return this;
2837
+ };
2838
+
2839
+ If.prototype.ensureBlock = function(node) {
2840
+ if (node instanceof Block) {
2841
+ return node;
2842
+ } else {
2843
+ return new Block([node]);
2844
+ }
2845
+ };
2846
+
2847
+ If.prototype.compileStatement = function(o) {
2848
+ var body, child, cond, exeq, ifPart;
2849
+ child = del(o, 'chainChild');
2850
+ exeq = del(o, 'isExistentialEquals');
2851
+ if (exeq) {
2852
+ return new If(this.condition.invert(), this.elseBodyNode(), {
2853
+ type: 'if'
2854
+ }).compile(o);
2855
+ }
2856
+ cond = this.condition.compile(o, LEVEL_PAREN);
2857
+ o.indent += TAB;
2858
+ body = this.ensureBlock(this.body);
2859
+ ifPart = "if (" + cond + ") {\n" + (body.compile(o)) + "\n" + this.tab + "}";
2860
+ if (!child) {
2861
+ ifPart = this.tab + ifPart;
2862
+ }
2863
+ if (!this.elseBody) {
2864
+ return ifPart;
2865
+ }
2866
+ return ifPart + ' else ' + (this.isChain ? (o.indent = this.tab, o.chainChild = true, this.elseBody.unwrap().compile(o, LEVEL_TOP)) : "{\n" + (this.elseBody.compile(o, LEVEL_TOP)) + "\n" + this.tab + "}");
2867
+ };
2868
+
2869
+ If.prototype.compileExpression = function(o) {
2870
+ var alt, body, code, cond;
2871
+ cond = this.condition.compile(o, LEVEL_COND);
2872
+ body = this.bodyNode().compile(o, LEVEL_LIST);
2873
+ alt = this.elseBodyNode() ? this.elseBodyNode().compile(o, LEVEL_LIST) : 'void 0';
2874
+ code = "" + cond + " ? " + body + " : " + alt;
2875
+ if (o.level >= LEVEL_COND) {
2876
+ return "(" + code + ")";
2877
+ } else {
2878
+ return code;
2879
+ }
2880
+ };
2881
+
2882
+ If.prototype.unfoldSoak = function() {
2883
+ return this.soak && this;
2884
+ };
2885
+
2886
+ return If;
2887
+
2888
+ })(Base);
2889
+
2890
+ Closure = {
2891
+ wrap: function(expressions, statement, noReturn) {
2892
+ var args, call, func, mentionsArgs, meth;
2893
+ if (expressions.jumps()) {
2894
+ return expressions;
2895
+ }
2896
+ func = new Code([], Block.wrap([expressions]));
2897
+ args = [];
2898
+ if ((mentionsArgs = expressions.contains(this.literalArgs)) || expressions.contains(this.literalThis)) {
2899
+ meth = new Literal(mentionsArgs ? 'apply' : 'call');
2900
+ args = [new Literal('this')];
2901
+ if (mentionsArgs) {
2902
+ args.push(new Literal('arguments'));
2903
+ }
2904
+ func = new Value(func, [new Access(meth)]);
2905
+ }
2906
+ func.noReturn = noReturn;
2907
+ call = new Call(func, args);
2908
+ if (statement) {
2909
+ return Block.wrap([call]);
2910
+ } else {
2911
+ return call;
2912
+ }
2913
+ },
2914
+ literalArgs: function(node) {
2915
+ return node instanceof Literal && node.value === 'arguments' && !node.asKey;
2916
+ },
2917
+ literalThis: function(node) {
2918
+ return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
2919
+ }
2920
+ };
2921
+
2922
+ unfoldSoak = function(o, parent, name) {
2923
+ var ifn;
2924
+ if (!(ifn = parent[name].unfoldSoak(o))) {
2925
+ return;
2926
+ }
2927
+ parent[name] = ifn.body;
2928
+ ifn.body = new Value(parent);
2929
+ return ifn;
2930
+ };
2931
+
2932
+ UTILITIES = {
2933
+ "extends": function() {
2934
+ return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }";
2935
+ },
2936
+ bind: function() {
2937
+ return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }';
2938
+ },
2939
+ indexOf: function() {
2940
+ return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
2941
+ },
2942
+ hasProp: function() {
2943
+ return '{}.hasOwnProperty';
2944
+ },
2945
+ slice: function() {
2946
+ return '[].slice';
2947
+ }
2948
+ };
2949
+
2950
+ LEVEL_TOP = 1;
2951
+
2952
+ LEVEL_PAREN = 2;
2953
+
2954
+ LEVEL_LIST = 3;
2955
+
2956
+ LEVEL_COND = 4;
2957
+
2958
+ LEVEL_OP = 5;
2959
+
2960
+ LEVEL_ACCESS = 6;
2961
+
2962
+ TAB = ' ';
2963
+
2964
+ IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
2965
+
2966
+ IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$");
2967
+
2968
+ SIMPLENUM = /^[+-]?\d+$/;
2969
+
2970
+ METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$");
2971
+
2972
+ IS_STRING = /^['"]/;
2973
+
2974
+ utility = function(name) {
2975
+ var ref;
2976
+ ref = "__" + name;
2977
+ Scope.root.assign(ref, UTILITIES[name]());
2978
+ return ref;
2979
+ };
2980
+
2981
+ multident = function(code, tab) {
2982
+ code = code.replace(/\n/g, '$&' + tab);
2983
+ return code.replace(/\s+$/, '');
2984
+ };
2985
+
2986
+ }).call(this);