ruby-wisp-source 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +28 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +12 -0
- data/Rakefile +39 -0
- data/VERSION +1 -0
- data/lib/wisp/source.rb +7 -0
- data/ruby-wisp-source.gemspec +13 -0
- data/vendor/History.md +159 -0
- data/vendor/LICENSE +24 -0
- data/vendor/Makefile +64 -0
- data/vendor/Readme.md +615 -0
- data/vendor/analyzer.js +385 -0
- data/vendor/ast.js +214 -0
- data/vendor/backend/javascript/writer.js +212 -0
- data/vendor/bin/wisp.js +2 -0
- data/vendor/compiler.js +1026 -0
- data/vendor/design.md +114 -0
- data/vendor/embed.js +2 -0
- data/vendor/engine/browser.js +59 -0
- data/vendor/engine/node.js +13 -0
- data/vendor/interactivate/Makefile +38 -0
- data/vendor/interactivate/Readme.md +28 -0
- data/vendor/interactivate/build/cache.manifest +12 -0
- data/vendor/interactivate/build/codemirror-compressed.js +4 -0
- data/vendor/interactivate/build/codemirror.css +248 -0
- data/vendor/interactivate/build/main.js +5401 -0
- data/vendor/interactivate/build/solarized.css +203 -0
- data/vendor/interactivate/index.html +429 -0
- data/vendor/interactivate/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/interactivate/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/interactivate/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/interactivate/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/interactivate/node_modules/codemirror-hashare/License.md +18 -0
- data/vendor/interactivate/node_modules/codemirror-hashare/Readme.md +23 -0
- data/vendor/interactivate/node_modules/codemirror-hashare/core.js +31 -0
- data/vendor/interactivate/node_modules/codemirror-hashare/package.json +37 -0
- data/vendor/interactivate/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/interactivate/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/interactivate/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/interactivate/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/interactivate/node_modules/interactivate/History.md +47 -0
- data/vendor/interactivate/node_modules/interactivate/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/Readme.md +11 -0
- data/vendor/interactivate/node_modules/interactivate/demo/Readme.md +24 -0
- data/vendor/interactivate/node_modules/interactivate/demo/build/cache.manifest +12 -0
- data/vendor/interactivate/node_modules/interactivate/demo/build/codemirror-compressed.js +4 -0
- data/vendor/interactivate/node_modules/interactivate/demo/build/codemirror.css +248 -0
- data/vendor/interactivate/node_modules/interactivate/demo/build/main.js +267 -0
- data/vendor/interactivate/node_modules/interactivate/demo/build/solarized.css +207 -0
- data/vendor/interactivate/node_modules/interactivate/demo/index.html +115 -0
- data/vendor/interactivate/node_modules/interactivate/demo/main.js +39 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/Readme.md +23 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/core.js +31 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/package.json +37 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/interactivate/node_modules/interactivate/demo/package.json +21 -0
- data/vendor/interactivate/node_modules/interactivate/host/window.js +19 -0
- data/vendor/interactivate/node_modules/interactivate/interactivate.js +187 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/History.md +10 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/Readme.md +68 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/diff.js +45 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/index.js +5 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/package.json +53 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/patch.js +21 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/rebase.js +33 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/diff.js +62 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/index.js +16 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/patch.js +54 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/History.md +15 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/Readme.md +54 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/event.js +39 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/index.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/History.md +20 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/Readme.md +45 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/end.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/index.js +8 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-error.js +9 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-reduced.js +9 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/package.json +57 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduce.js +59 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduced.js +15 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reducible.js +87 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/index.js +6 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reduce.js +116 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reducible.js +106 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/package.json +56 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/dom-reduce/test/index.js +91 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/History.md +60 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/Readme.md +125 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/core.js +227 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/package.json +93 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/browser.js +18 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/common-index.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/common.js +270 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/index.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/phantom-index.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/tap-index.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/method/test/testling-index.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/History.md +139 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/License.md +19 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/Readme.md +253 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/capture.js +34 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/concat.js +37 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/debug/print.js +45 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/delay.js +29 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/drop-while.js +39 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/drop.js +40 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/expand.js +25 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/filter.js +21 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/fold.js +55 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/hub.js +102 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/index.js +33 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/into.js +16 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/map.js +19 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/merge.js +50 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/History.md +20 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/License.md +18 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/Readme.md +45 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/end.js +3 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/index.js +8 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-error.js +9 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-reduced.js +9 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/package.json +57 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduce.js +59 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduced.js +15 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reducible.js +87 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/index.js +6 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reduce.js +116 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reducible.js +106 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/package.json +60 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/reducer.js +51 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/reductions.js +31 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/take-while.js +23 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/take.js +40 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/benchmark.js +32 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/capture.js +108 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/concat.js +104 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js +29 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/drop-while.js +118 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/drop.js +89 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/errors.js +222 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/filter.js +72 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/fold.js +111 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/hub.js +222 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/index.js +23 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/into.js +22 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/map.js +67 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/merge.js +75 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/reductions.js +105 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/take-while.js +134 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/take.js +82 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/util/event.js +25 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/util/lazy.js +9 -0
- data/vendor/interactivate/node_modules/interactivate/node_modules/reducers/test/util/test.js +34 -0
- data/vendor/interactivate/node_modules/interactivate/output.js +60 -0
- data/vendor/interactivate/node_modules/interactivate/package.json +30 -0
- data/vendor/interactivate/node_modules/interactivate/render.js +23 -0
- data/vendor/interactivate/node_modules/interactivate/view.js +79 -0
- data/vendor/interactivate/package.json +22 -0
- data/vendor/interactivate/src/host.wisp +84 -0
- data/vendor/interactivate/src/main.wisp +38 -0
- data/vendor/node_modules/browserify/LICENSE +63 -0
- data/vendor/node_modules/browserify/_empty.js +0 -0
- data/vendor/node_modules/browserify/bin/advanced.txt +36 -0
- data/vendor/node_modules/browserify/bin/cmd.js +150 -0
- data/vendor/node_modules/browserify/bin/usage.txt +32 -0
- data/vendor/node_modules/browserify/example/api/browser/bar.js +1 -0
- data/vendor/node_modules/browserify/example/api/browser/foo.js +5 -0
- data/vendor/node_modules/browserify/example/api/browser/main.js +2 -0
- data/vendor/node_modules/browserify/example/api/build.js +4 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/beep.js +2 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/boop.js +2 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/build.sh +4 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/robot.js +1 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/static/beep.html +2 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/static/beep.js +6 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/static/boop.html +2 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/static/boop.js +6 -0
- data/vendor/node_modules/browserify/example/multiple_bundles/static/common.js +3 -0
- data/vendor/node_modules/browserify/example/source_maps/build.js +10 -0
- data/vendor/node_modules/browserify/example/source_maps/build.sh +4 -0
- data/vendor/node_modules/browserify/example/source_maps/index.html +11 -0
- data/vendor/node_modules/browserify/example/source_maps/js/foo.js +7 -0
- data/vendor/node_modules/browserify/example/source_maps/js/main.js +4 -0
- data/vendor/node_modules/browserify/example/source_maps/js/wunder/bar.js +8 -0
- data/vendor/node_modules/browserify/index.js +352 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/LICENSE.MIT +24 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/examples/all_docs.js +13 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/index.js +191 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +401 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/boundary.js +110 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/package.json +43 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/readme.markdown +145 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/bool.js +41 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/destroy_missing.js +22 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/empty.js +44 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/fn.js +39 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/multiple_objects.js +42 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/parsejson.js +28 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/stringify.js +41 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/stringify_object.js +47 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/test.js +35 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/test2.js +29 -0
- data/vendor/node_modules/browserify/node_modules/JSONStream/test/two-ways.js +41 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/cmd.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/example/input.json +13 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/example/output.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/example/sourcemap/input.json +15 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/example/sourcemap/output.js +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/index.js +79 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/LICENSE +23 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/README.md +111 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files-short.js +26 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/example/two-files.js +47 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/index.js +97 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/LICENSE +23 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/README.md +85 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/example/comment-to-json.js +15 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/index.js +89 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/comment-regex.js +25 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/convert-source-map/test/convert-source-map.js +129 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/LICENSE +23 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/README.md +88 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/example/foo-bar.js +8 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/index.js +127 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md +58 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/README.md +347 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js +96 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js +353 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js +91 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/README.md +119 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/node_modules/amdefine/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/package.json +81 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js +73 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-array-set.js +71 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js +282 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js +152 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/package.json +49 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/inline-source-map.js +247 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/test/source-content.js +129 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/LICENSE +23 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/MOZILLA_LICENSE +28 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/README.md +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64-vlq.js +108 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/base64.js +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/example/one-to-one-mappings.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/index.js +82 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/package.json +46 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/parse-base64vlq-mappings/test/parse-base64vlq-mappings.js +72 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/package.json +52 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/test/combine-source-map.js +143 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.html +1012 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/README.org +593 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/bin/uglifyjs +334 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/docstyle.css +75 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/consolidator.js +1220 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/parse-js.js +1369 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/process.js +2117 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/lib/squeeze-more.js +78 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/package.json +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/beautify.js +28 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testconsolidator.js +1391 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/testparser.js +409 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/1e21.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array1.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array2.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array3.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/array4.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/assignment.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/concatstring.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/const.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/div-with-regexp.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/empty-blocks.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/forstatement.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if-not.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/if.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/ifreturn2.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/infinite.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue10.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue11.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue13.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue14.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue16.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue17.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue20.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue21.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue25.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue27.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue278.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue28.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue29.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue30.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue34.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue349.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue353.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue372.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue4.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue48.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue50.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue53.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue54.1.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue68.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue69.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issue9.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/issues222_324.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/mangle.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/null_string.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/strict-equals.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/var.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/whitespace.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/expected/with.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/1e21.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array1.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array2.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array3.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/array4.js +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/assignment.js +20 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/concatstring.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/const.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/div-with-regexp.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/empty-blocks.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/forstatement.js +10 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if-not.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/if.js +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn.js +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/ifreturn2.js +16 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/infinite.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue10.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue11.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue13.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue14.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue16.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue17.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue20.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue21.js +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue25.js +7 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue27.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue278.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue28.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue29.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue30.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue34.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue349.js +25 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue353.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue372.js +32 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue4.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue48.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue50.js +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue53.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue68.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue69.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issue9.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/issues222_324.js +82 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/mangle.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/null_string.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/var.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/whitespace.js +21 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/compress/test/with.js +2 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/test/unit/scripts.js +57 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/hoist.js +33 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/instrument.js +97 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/tmp/test.js +30 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/node_modules/uglify-js/uglify-js.js +18 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/package.json +70 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/prelude.js +42 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/readme.markdown +81 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/comment.js +33 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/only_execute_entries.js +26 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/order.js +38 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/pack.js +28 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/raw.js +32 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/source-maps-existing.js +56 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/source-maps.js +113 -0
- data/vendor/node_modules/browserify/node_modules/browser-pack/test/this.js +24 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/README.md +115 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/assert.js +314 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/child_process.js +2 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/dgram.js +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/events.js +183 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/fs.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/https.js +13 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/net.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/path.js +175 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/process.js +55 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/querystring.js +250 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/stream.js +119 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/string_decoder.js +161 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/sys.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/timers.js +39 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/tls.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/tty.js +2 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/url.js +604 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/builtin/util.js +351 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/empty.js +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/builtin.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom/custom.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom/main.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom/package.json +7 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/custom.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/resolve.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/skip/main.js +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/skip/package.json +7 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/example/skip.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/index.js +170 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/README.md +11 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/index.js +1317 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/package.json +33 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/package.json +49 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/buffer-browserify/test/buffer.js +218 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/LICENCE +19 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/README.md +32 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/index.js +85 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/package.json +80 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/test/index.js +67 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/test/static/index.html +12 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/console-browserify/test/static/test-adapter.js +53 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/example/bundle.js +637 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/example/index.html +12 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/example/test.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/index.js +74 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/md5.js +384 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/package.json +37 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/readme.markdown +20 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/rng.js +37 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/sha.js +210 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/crypto-browserify/test/simple.js +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/get/index.html +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/get/main.js +14 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/get/server.js +12 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/headers/index.html +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/headers/main.js +18 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/headers/server.js +15 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/data.json +139 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/index.html +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/main.js +13 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/json-stream/server.js +10 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/post/index.html +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/post/main.js +16 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/post/server.js +19 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/index.html +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/main.js +16 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/example/streaming/server.js +21 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/index.js +60 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/lib/request.js +131 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/lib/response.js +119 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/package.json +33 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/package.json +49 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/http-browserify/readme.markdown +128 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/async.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/example/sync.js +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/index.js +5 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js +131 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.js +4 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/core.json +38 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/sync.js +99 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/package.json +39 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/readme.markdown +134 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/core.js +12 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter.js +17 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js +15 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock.js +68 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js +68 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver.js +144 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js +157 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/README.markdown +103 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/bundle.js +473 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/entry.js +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/index.html +9 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/example/run/server.js +6 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/index.js +85 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/package.json +46 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/testling/run.js +22 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/vm-browserify/testling/test.sh +11 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/index.js +43 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/readme.md +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/test/zlib.test.js +65 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/node_modules/zlib-browserify/zlib.js +55 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/package.json +45 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/test/core.js +28 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/test/false.js +24 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/test/fixtures/foo.js +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/test/local.js +15 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/test/mocha.opts +1 -0
- data/vendor/node_modules/browserify/node_modules/browser-resolve/test/modules.js +99 -0
- data/vendor/node_modules/browserify/node_modules/concat-stream/index.js +50 -0
- data/vendor/node_modules/browserify/node_modules/concat-stream/package.json +33 -0
- data/vendor/node_modules/browserify/node_modules/concat-stream/readme.md +31 -0
- data/vendor/node_modules/browserify/node_modules/concat-stream/test.js +34 -0
- data/vendor/node_modules/browserify/node_modules/duplexer/LICENCE +19 -0
- data/vendor/node_modules/browserify/node_modules/duplexer/Makefile +4 -0
- data/vendor/node_modules/browserify/node_modules/duplexer/README.md +36 -0
- data/vendor/node_modules/browserify/node_modules/duplexer/index.js +77 -0
- data/vendor/node_modules/browserify/node_modules/duplexer/package.json +46 -0
- data/vendor/node_modules/browserify/node_modules/duplexer/test.js +27 -0
- data/vendor/node_modules/browserify/node_modules/inherits/README.md +51 -0
- data/vendor/node_modules/browserify/node_modules/inherits/inherits.js +29 -0
- data/vendor/node_modules/browserify/node_modules/inherits/package.json +29 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/bench/results.txt +18 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/bench/run.sh +2 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/bin/cmd.js +13 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/buffer.js +3863 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/bundle.sh +4 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/example/files/foo/index.js +6 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/example/files/main.js +6 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/example/insert.js +10 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/index.js +102 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/README.markdown +45 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/example/base.js +3 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/example/dir.js +3 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/index.js +29 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/package.json +50 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/commondir/test/dirs.js +66 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/jquery.js +4 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/results.txt +15 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/bench/run.js +7 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/detect.js +6 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/example/src.js +27 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/index.js +166 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/example/types.js +8 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/index.js +42 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/ChangeLog +18 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/LICENSE.BSD +19 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/component.json +14 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/doc/index.html +473 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/esprima.js +3895 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/examples/detectnestedternary.js +106 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/examples/findbooleantrap.js +173 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/examples/tokendist.js +33 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/index.html +102 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/package.json +47 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/benchmarks.html +58 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/benchmarks.js +334 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compare.html +69 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compare.js +328 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compat.html +40 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/coverage.footer.html +3 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/coverage.header.html +37 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/coverage.html +4676 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/index.html +37 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/module.html +36 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/module.js +129 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/node_modules/esprima/test/test.js +19764 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/package.json +57 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/readme.markdown +52 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/node_modules/astw/test/parent.js +25 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/package.json +68 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/readme.markdown +99 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/argument.js +17 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/assign_implicit.js +13 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/detect.js +17 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/argument.js +6 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/assign_implicit.js +2 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/detect.js +32 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/named_arg.js +6 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/obj.js +1 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/return_hash.js +5 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/files/right_hand.js +2 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/named_arg.js +17 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/obj.js +16 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/package.json +5 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/return_hash.js +13 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/right_hand.js +16 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/lexical-scope/test/shebang.js +19 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/2132fedf7e11adbdb654aea08615ffea7b84cbf0.patch +25 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/README.md +15 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js +52 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/index.js +2 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/package.json +33 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/package.json +59 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/readme.markdown +86 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/always/main.js +6 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/always.js +23 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/global/filename.js +2 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/global/main.js +2 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/global.js +49 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/buffer.js +1 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/buf.js +4 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/foo/index.js +4 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert/main.js +4 -0
- data/vendor/node_modules/browserify/node_modules/insert-module-globals/test/insert.js +35 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/cmd.js +8 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/example/deps.js +8 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/example/files/bar.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/example/files/foo.js +5 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/example/files/main.js +2 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/example/files/xyz.js +2 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/index.js +177 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/example/strings.js +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/example/strings_src.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/index.js +66 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/LICENSE.BSD +19 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/LICENSE.source-map +27 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/README.md +99 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/bin/escodegen.js +43 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/bin/esgenerate.js +43 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/escodegen.js +2245 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +58 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/README.md +347 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +96 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +353 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +91 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +119 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/package.json +81 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/run-tests.js +73 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +71 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +282 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +152 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/package.json +55 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/ChangeLog +18 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/component.json +14 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/doc/index.html +473 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/esprima.js +3895 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/detectnestedternary.js +106 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/findbooleantrap.js +173 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/examples/tokendist.js +33 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/index.html +102 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/package.json +47 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/benchmarks.js +334 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.html +69 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compare.js +328 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/coverage.html +4676 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/index.html +37 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.html +36 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/module.js +129 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/esprima/test/test.js +19764 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/package.json +43 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/readme.markdown +73 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/both.js +26 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/chained.js +9 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/both.js +4 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/chained.js +5 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/nested.js +22 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/shebang.js +5 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/sparse-array.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/strings.js +13 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/files/word.js +13 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/nested.js +9 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/return.js +9 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/shebang.js +9 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/sparse-array.js +14 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/strings.js +9 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/test/word.js +12 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/async.js +5 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/example/sync.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/index.js +5 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/async.js +131 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.js +4 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/core.json +38 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/lib/sync.js +99 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/package.json +39 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/readme.markdown +134 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/core.js +12 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/filter.js +17 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/filter_sync.js +15 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/mock.js +68 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/mock_sync.js +68 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/foo.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/mug.js +0 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver.js +144 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/resolve/test/resolver_sync.js +157 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/LICENSE.APACHE2 +15 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/LICENSE.MIT +24 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/index.js +108 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/package.json +50 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/readme.markdown +63 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/auto-destroy.js +30 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/buffering.js +71 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/end.js +45 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/node_modules/through/test/index.js +114 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/package.json +55 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/readme.markdown +135 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/bundle.js +21 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/deps.js +42 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/bar.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/filterable.js +10 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/foo.js +5 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/main.js +2 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/f.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/main.js +7 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/g/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/g/node_modules/insert-ggg/index.js +7 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/g/package.json +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/insert-aaa/index.js +7 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/insert-bbb/index.js +7 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_module/node_modules/m/index.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/f.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/main.js +7 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/package.json +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/g/tr_g.js +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/node_modules/m/index.js +3 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_a.js +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/tr_sh/tr_b.js +6 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/files/xyz.js +2 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/filter.js +37 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/noparse.js +37 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/tr_fn.js +29 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/tr_module.js +21 -0
- data/vendor/node_modules/browserify/node_modules/module-deps/test/tr_sh.js +21 -0
- data/vendor/node_modules/browserify/node_modules/optimist/LICENSE +21 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/bool.js +10 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/boolean_double.js +7 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/boolean_single.js +7 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/default_hash.js +8 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/default_singles.js +7 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/divide.js +8 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/line_count.js +20 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/line_count_options.js +29 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/nonopt.js +4 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/reflect.js +2 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/short.js +3 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/string.js +11 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/usage-options.js +19 -0
- data/vendor/node_modules/browserify/node_modules/optimist/example/xup.js +10 -0
- data/vendor/node_modules/browserify/node_modules/optimist/index.js +478 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/package.json +44 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
- data/vendor/node_modules/browserify/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
- data/vendor/node_modules/browserify/node_modules/optimist/package.json +45 -0
- data/vendor/node_modules/browserify/node_modules/optimist/readme.markdown +487 -0
- data/vendor/node_modules/browserify/node_modules/optimist/test/_/argv.js +2 -0
- data/vendor/node_modules/browserify/node_modules/optimist/test/_/bin.js +3 -0
- data/vendor/node_modules/browserify/node_modules/optimist/test/_.js +71 -0
- data/vendor/node_modules/browserify/node_modules/optimist/test/parse.js +446 -0
- data/vendor/node_modules/browserify/node_modules/optimist/test/usage.js +292 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/README.markdown +72 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/example/parse.js +3 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/example/quote.js +3 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/index.js +33 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/package.json +46 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/test/parse.js +14 -0
- data/vendor/node_modules/browserify/node_modules/shell-quote/test/quote.js +15 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/package.json +53 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
- data/vendor/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
- data/vendor/node_modules/browserify/node_modules/through/LICENSE.APACHE2 +15 -0
- data/vendor/node_modules/browserify/node_modules/through/LICENSE.MIT +24 -0
- data/vendor/node_modules/browserify/node_modules/through/index.js +103 -0
- data/vendor/node_modules/browserify/node_modules/through/package.json +50 -0
- data/vendor/node_modules/browserify/node_modules/through/readme.markdown +43 -0
- data/vendor/node_modules/browserify/node_modules/through/test/buffering.js +71 -0
- data/vendor/node_modules/browserify/node_modules/through/test/end.js +26 -0
- data/vendor/node_modules/browserify/node_modules/through/test/index.js +114 -0
- data/vendor/node_modules/browserify/node_modules/umd/README.md +46 -0
- data/vendor/node_modules/browserify/node_modules/umd/index.js +63 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/README.md +81 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/index.js +39 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/History.md +10 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Makefile +6 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/Readme.md +44 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/index.js +10 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/callsite/package.json +31 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/LICENSE +18 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/async.js +5 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/example/sync.js +3 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/index.js +5 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/async.js +131 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.js +4 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/core.json +38 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/lib/sync.js +99 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/package.json +39 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/readme.markdown +134 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/core.js +12 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter.js +17 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/filter_sync.js +15 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock.js +68 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/mock_sync.js +68 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/foo.js +1 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/mug.js +0 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver.js +144 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/node_modules/resolve/test/resolver_sync.js +157 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/package.json +43 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/rfile/test/index.js +43 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/README.md +26 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/index.js +9 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/package.json +46 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.js +9597 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/fixture/jquery.min.js +3 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/ruglify/test/index.js +8 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.APACHE2 +15 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/LICENSE.MIT +24 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/index.js +108 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/package.json +50 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/readme.markdown +63 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/auto-destroy.js +30 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/buffering.js +71 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/end.js +45 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/through/test/index.js +114 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/README.md +544 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/bin/uglifyjs +370 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/ast.js +964 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/compress.js +1968 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/mozilla-ast.js +265 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/output.js +1220 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/parse.js +1407 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/scope.js +580 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/sourcemap.js +81 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/transform.js +218 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/lib/utils.js +288 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +58 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/README.md +347 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +96 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +426 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +381 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +353 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +91 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +119 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +40 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/package.json +81 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +73 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +71 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +291 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +391 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +282 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +152 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/package.json +48 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/arrays.js +12 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/blocks.js +49 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/conditionals.js +143 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/dead-code.js +89 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/debugger.js +24 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-105.js +17 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-12.js +11 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-22.js +17 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-44.js +31 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/issue-59.js +30 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/labels.js +163 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/loops.js +123 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/properties.js +25 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/sequences.js +161 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/compress/switch.js +210 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/test/run-tests.js +170 -0
- data/vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/tools/node.js +164 -0
- data/vendor/node_modules/browserify/node_modules/umd/package.json +39 -0
- data/vendor/node_modules/browserify/node_modules/umd/template.js +33 -0
- data/vendor/node_modules/browserify/package.json +65 -0
- data/vendor/node_modules/browserify/readme.markdown +426 -0
- data/vendor/node_modules/browserify/test/backbone.js +22 -0
- data/vendor/node_modules/browserify/test/bin.js +31 -0
- data/vendor/node_modules/browserify/test/bin_entry.js +31 -0
- data/vendor/node_modules/browserify/test/buffer.js +118 -0
- data/vendor/node_modules/browserify/test/bundle_sourcemap.js +30 -0
- data/vendor/node_modules/browserify/test/catch/main.js +1 -0
- data/vendor/node_modules/browserify/test/catch.js +22 -0
- data/vendor/node_modules/browserify/test/circular/a.js +3 -0
- data/vendor/node_modules/browserify/test/circular/b.js +1 -0
- data/vendor/node_modules/browserify/test/circular/main.js +1 -0
- data/vendor/node_modules/browserify/test/circular.js +34 -0
- data/vendor/node_modules/browserify/test/coffee_bin/main.coffee +2 -0
- data/vendor/node_modules/browserify/test/coffee_bin/x.coffee +1 -0
- data/vendor/node_modules/browserify/test/coffee_bin.js +36 -0
- data/vendor/node_modules/browserify/test/comment/main.js +2 -0
- data/vendor/node_modules/browserify/test/comment.js +16 -0
- data/vendor/node_modules/browserify/test/crypto.js +37 -0
- data/vendor/node_modules/browserify/test/dnode.js +27 -0
- data/vendor/node_modules/browserify/test/dollar/dollar/index.js +7 -0
- data/vendor/node_modules/browserify/test/dollar.js +18 -0
- data/vendor/node_modules/browserify/test/entry/main.js +1 -0
- data/vendor/node_modules/browserify/test/entry/one.js +1 -0
- data/vendor/node_modules/browserify/test/entry/two.js +1 -0
- data/vendor/node_modules/browserify/test/entry.js +19 -0
- data/vendor/node_modules/browserify/test/entry_exec/fail.js +1 -0
- data/vendor/node_modules/browserify/test/entry_exec/main.js +1 -0
- data/vendor/node_modules/browserify/test/entry_exec.js +15 -0
- data/vendor/node_modules/browserify/test/error_code/src.js +2 -0
- data/vendor/node_modules/browserify/test/error_code.js +22 -0
- data/vendor/node_modules/browserify/test/export/entry.js +1 -0
- data/vendor/node_modules/browserify/test/export.js +35 -0
- data/vendor/node_modules/browserify/test/fake/fake_fs.js +1 -0
- data/vendor/node_modules/browserify/test/fake/main.js +2 -0
- data/vendor/node_modules/browserify/test/fake.js +15 -0
- data/vendor/node_modules/browserify/test/field/miss.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-object/package.json +4 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
- data/vendor/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
- data/vendor/node_modules/browserify/test/field/object.js +1 -0
- data/vendor/node_modules/browserify/test/field/string.js +1 -0
- data/vendor/node_modules/browserify/test/field/sub.js +1 -0
- data/vendor/node_modules/browserify/test/field.js +64 -0
- data/vendor/node_modules/browserify/test/file_event.js +33 -0
- data/vendor/node_modules/browserify/test/global/buffer.js +2 -0
- data/vendor/node_modules/browserify/test/global/filename.js +2 -0
- data/vendor/node_modules/browserify/test/global/main.js +2 -0
- data/vendor/node_modules/browserify/test/global/tick.js +3 -0
- data/vendor/node_modules/browserify/test/global.js +54 -0
- data/vendor/node_modules/browserify/test/ignore/main.js +1 -0
- data/vendor/node_modules/browserify/test/ignore/skip.js +1 -0
- data/vendor/node_modules/browserify/test/ignore.js +16 -0
- data/vendor/node_modules/browserify/test/json/beep.json +4 -0
- data/vendor/node_modules/browserify/test/json/main.js +1 -0
- data/vendor/node_modules/browserify/test/json.js +18 -0
- data/vendor/node_modules/browserify/test/maxlisteners/main.js +3 -0
- data/vendor/node_modules/browserify/test/maxlisteners.js +13 -0
- data/vendor/node_modules/browserify/test/multi_bundle/a.js +2 -0
- data/vendor/node_modules/browserify/test/multi_bundle/b.js +5 -0
- data/vendor/node_modules/browserify/test/multi_bundle.js +44 -0
- data/vendor/node_modules/browserify/test/multi_entry/a.js +2 -0
- data/vendor/node_modules/browserify/test/multi_entry/b.js +2 -0
- data/vendor/node_modules/browserify/test/multi_entry/c.js +2 -0
- data/vendor/node_modules/browserify/test/multi_entry.js +25 -0
- data/vendor/node_modules/browserify/test/node_modules/beep/index.js +1 -0
- data/vendor/node_modules/browserify/test/process/main.js +3 -0
- data/vendor/node_modules/browserify/test/process/one.js +1 -0
- data/vendor/node_modules/browserify/test/process/two.js +1 -0
- data/vendor/node_modules/browserify/test/process.js +20 -0
- data/vendor/node_modules/browserify/test/require_cache.js +19 -0
- data/vendor/node_modules/browserify/test/retarget.js +23 -0
- data/vendor/node_modules/browserify/test/reverse_multi_bundle/app.js +22 -0
- data/vendor/node_modules/browserify/test/reverse_multi_bundle/lazy.js +4 -0
- data/vendor/node_modules/browserify/test/reverse_multi_bundle/shared.js +4 -0
- data/vendor/node_modules/browserify/test/reverse_multi_bundle.js +43 -0
- data/vendor/node_modules/browserify/test/shebang/foo.js +2 -0
- data/vendor/node_modules/browserify/test/shebang/main.js +4 -0
- data/vendor/node_modules/browserify/test/shebang.js +11 -0
- data/vendor/node_modules/browserify/test/standalone/main.js +3 -0
- data/vendor/node_modules/browserify/test/standalone/one.js +1 -0
- data/vendor/node_modules/browserify/test/standalone/two.js +1 -0
- data/vendor/node_modules/browserify/test/standalone.js +73 -0
- data/vendor/node_modules/browserify/test/subdep/index.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/b.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/ignore_me.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/a/index.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/a/package.json +5 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/c/index.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/c/package.json +5 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/f/index.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/node_modules/z/index.js +1 -0
- data/vendor/node_modules/browserify/test/subdep/node_modules/qq/package.json +3 -0
- data/vendor/node_modules/browserify/test/subdep/package.json +6 -0
- data/vendor/node_modules/browserify/test/subdep.js +16 -0
- data/vendor/node_modules/browserify/test/tr/f.js +1 -0
- data/vendor/node_modules/browserify/test/tr/main.js +7 -0
- data/vendor/node_modules/browserify/test/tr/node_modules/g/index.js +1 -0
- data/vendor/node_modules/browserify/test/tr/node_modules/g/node_modules/insert-ggg/index.js +7 -0
- data/vendor/node_modules/browserify/test/tr/node_modules/g/package.json +6 -0
- data/vendor/node_modules/browserify/test/tr/node_modules/insert-aaa/index.js +7 -0
- data/vendor/node_modules/browserify/test/tr/node_modules/insert-bbb/index.js +7 -0
- data/vendor/node_modules/browserify/test/tr/node_modules/m/index.js +3 -0
- data/vendor/node_modules/browserify/test/tr.js +21 -0
- data/vendor/node_modules/browserify/test/util.js +62 -0
- data/vendor/node_modules/wisp/History.md +152 -0
- data/vendor/node_modules/wisp/LICENSE +24 -0
- data/vendor/node_modules/wisp/Makefile +80 -0
- data/vendor/node_modules/wisp/Readme.md +615 -0
- data/vendor/node_modules/wisp/analyzer.js +385 -0
- data/vendor/node_modules/wisp/ast.js +214 -0
- data/vendor/node_modules/wisp/backend/javascript/writer.js +212 -0
- data/vendor/node_modules/wisp/bin/wisp.js +2 -0
- data/vendor/node_modules/wisp/compiler.js +1028 -0
- data/vendor/node_modules/wisp/design.md +114 -0
- data/vendor/node_modules/wisp/engine/browser.js +65 -0
- data/vendor/node_modules/wisp/engine/node.js +20 -0
- data/vendor/node_modules/wisp/index.html +405 -0
- data/vendor/node_modules/wisp/interactivate/Makefile +38 -0
- data/vendor/node_modules/wisp/interactivate/Readme.md +24 -0
- data/vendor/node_modules/wisp/interactivate/build/cache.manifest +12 -0
- data/vendor/node_modules/wisp/interactivate/build/codemirror-compressed.js +4 -0
- data/vendor/node_modules/wisp/interactivate/build/codemirror.css +248 -0
- data/vendor/node_modules/wisp/interactivate/build/main.js +5430 -0
- data/vendor/node_modules/wisp/interactivate/build/solarized.css +207 -0
- data/vendor/node_modules/wisp/interactivate/host.wisp +83 -0
- data/vendor/node_modules/wisp/interactivate/index.html +392 -0
- data/vendor/node_modules/wisp/interactivate/main.wisp +37 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/Readme.md +23 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/core.js +31 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-hashare/package.json +37 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/History.md +47 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/Readme.md +11 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/Readme.md +24 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/cache.manifest +12 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/codemirror-compressed.js +4 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/codemirror.css +248 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/main.js +267 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/build/solarized.css +207 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/index.html +115 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/main.js +39 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/Readme.md +23 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/core.js +31 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/package.json +37 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/demo/package.json +21 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/host/window.js +19 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/interactivate.js +187 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/History.md +10 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/Readme.md +68 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/diff.js +45 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/index.js +5 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/package.json +53 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/patch.js +21 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/rebase.js +33 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/diff.js +62 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/index.js +16 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/patch.js +54 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/History.md +15 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/Readme.md +54 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/event.js +39 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/index.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/History.md +20 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/Readme.md +45 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/end.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/index.js +8 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-error.js +9 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-reduced.js +9 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/package.json +57 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduce.js +59 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduced.js +15 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reducible.js +87 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/index.js +6 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reduce.js +116 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reducible.js +106 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/package.json +56 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/test/index.js +91 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/History.md +60 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/Readme.md +125 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/core.js +227 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/package.json +93 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/common-index.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/common.js +270 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/index.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/phantom-index.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/tap-index.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/method/test/testling-index.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/History.md +139 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/License.md +19 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/Readme.md +253 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/capture.js +34 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/concat.js +37 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/debug/print.js +45 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/delay.js +29 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop-while.js +39 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop.js +40 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/expand.js +25 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/filter.js +21 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/fold.js +55 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/hub.js +102 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/index.js +33 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/into.js +16 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/map.js +19 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/merge.js +50 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/History.md +20 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/License.md +18 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/Readme.md +45 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/end.js +3 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/index.js +8 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-error.js +9 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-reduced.js +9 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/package.json +57 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduce.js +59 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduced.js +15 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reducible.js +87 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/index.js +6 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reduce.js +116 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reducible.js +106 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/package.json +60 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/reducer.js +51 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/reductions.js +31 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/take-while.js +23 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/take.js +40 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/benchmark.js +32 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/capture.js +108 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/concat.js +104 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js +29 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop-while.js +118 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop.js +89 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/errors.js +222 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/filter.js +72 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/fold.js +111 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/hub.js +222 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/index.js +23 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/into.js +22 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/map.js +67 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/merge.js +75 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/reductions.js +105 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take-while.js +134 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take.js +82 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/event.js +25 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/lazy.js +9 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/test.js +34 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/output.js +60 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/package.json +30 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/render.js +23 -0
- data/vendor/node_modules/wisp/interactivate/node_modules/interactivate/view.js +79 -0
- data/vendor/node_modules/wisp/interactivate/package.json +22 -0
- data/vendor/node_modules/wisp/package.json +61 -0
- data/vendor/node_modules/wisp/reader.js +785 -0
- data/vendor/node_modules/wisp/repl.js +121 -0
- data/vendor/node_modules/wisp/runtime.js +609 -0
- data/vendor/node_modules/wisp/sequence.js +553 -0
- data/vendor/node_modules/wisp/src/ast.wisp +160 -0
- data/vendor/node_modules/wisp/src/backend/javascript/writer.wisp +161 -0
- data/vendor/node_modules/wisp/src/backend/js/generator.wisp +939 -0
- data/vendor/node_modules/wisp/src/compiler.wisp +1185 -0
- data/vendor/node_modules/wisp/src/drafts.wisp +50 -0
- data/vendor/node_modules/wisp/src/drft.wisp +329 -0
- data/vendor/node_modules/wisp/src/engine/browser.wisp +73 -0
- data/vendor/node_modules/wisp/src/engine/node.wisp +23 -0
- data/vendor/node_modules/wisp/src/extra.wisp +36 -0
- data/vendor/node_modules/wisp/src/reader.wisp +615 -0
- data/vendor/node_modules/wisp/src/repl.wisp +79 -0
- data/vendor/node_modules/wisp/src/runtime.wisp +511 -0
- data/vendor/node_modules/wisp/src/sequence.wisp +416 -0
- data/vendor/node_modules/wisp/src/string.wisp +110 -0
- data/vendor/node_modules/wisp/src/type.wisp +51 -0
- data/vendor/node_modules/wisp/src/wisp.wisp +57 -0
- data/vendor/node_modules/wisp/string.js +96 -0
- data/vendor/node_modules/wisp/support/ambiance.css +119 -0
- data/vendor/node_modules/wisp/support/app.js +3669 -0
- data/vendor/node_modules/wisp/support/codemirror-compressed.js +1 -0
- data/vendor/node_modules/wisp/support/codemirror.css +173 -0
- data/vendor/node_modules/wisp/support/embed.js +71 -0
- data/vendor/node_modules/wisp/support/embed.wisp +74 -0
- data/vendor/node_modules/wisp/support/require.js +35 -0
- data/vendor/node_modules/wisp/test/ast.wisp +58 -0
- data/vendor/node_modules/wisp/test/compiler.wisp +549 -0
- data/vendor/node_modules/wisp/test/reader.wisp +228 -0
- data/vendor/node_modules/wisp/test/runtime.wisp +180 -0
- data/vendor/node_modules/wisp/test/sequence.wisp +338 -0
- data/vendor/node_modules/wisp/test/string.wisp +44 -0
- data/vendor/node_modules/wisp/test/test.wisp +8 -0
- data/vendor/node_modules/wisp/wisp.js +60 -0
- data/vendor/package.json +39 -0
- data/vendor/reader.js +784 -0
- data/vendor/repl.js +116 -0
- data/vendor/runtime.js +613 -0
- data/vendor/sequence.js +555 -0
- data/vendor/src/ast.wisp +162 -0
- data/vendor/src/backend/escodegen/writer.wisp +939 -0
- data/vendor/src/backend/javascript/writer.wisp +164 -0
- data/vendor/src/compiler.wisp +1191 -0
- data/vendor/src/drafts/drafts.wisp +50 -0
- data/vendor/src/drafts/drft.wisp +329 -0
- data/vendor/src/drafts/extra.wisp +36 -0
- data/vendor/src/engine/browser.wisp +67 -0
- data/vendor/src/engine/node.wisp +16 -0
- data/vendor/src/functional-reader.wisp +96 -0
- data/vendor/src/reader.wisp +619 -0
- data/vendor/src/repl.wisp +80 -0
- data/vendor/src/runtime.wisp +512 -0
- data/vendor/src/sequence.wisp +417 -0
- data/vendor/src/string.wisp +111 -0
- data/vendor/src/type.wisp +54 -0
- data/vendor/src/wisp.wisp +58 -0
- data/vendor/string.js +97 -0
- data/vendor/test/ast.wisp +60 -0
- data/vendor/test/compiler.wisp +552 -0
- data/vendor/test/reader.wisp +228 -0
- data/vendor/test/runtime.wisp +180 -0
- data/vendor/test/sequence.wisp +337 -0
- data/vendor/test/string.wisp +45 -0
- data/vendor/test/test.wisp +9 -0
- data/vendor/try/Makefile +27 -0
- data/vendor/try/Readme.md +25 -0
- data/vendor/try/build/codemirror-compressed.js +4 -0
- data/vendor/try/build/codemirror.css +248 -0
- data/vendor/try/build/main.js +3742 -0
- data/vendor/try/build/require.js +35 -0
- data/vendor/try/build/solarized.css +203 -0
- data/vendor/try/index.html +399 -0
- data/vendor/try/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/try/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/try/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/try/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/try/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/try/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/try/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/try/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/try/node_modules/~wisp/History.md +152 -0
- data/vendor/try/node_modules/~wisp/LICENSE +24 -0
- data/vendor/try/node_modules/~wisp/Makefile +80 -0
- data/vendor/try/node_modules/~wisp/Readme.md +615 -0
- data/vendor/try/node_modules/~wisp/analyzer.js +385 -0
- data/vendor/try/node_modules/~wisp/ast.js +214 -0
- data/vendor/try/node_modules/~wisp/backend/javascript/writer.js +212 -0
- data/vendor/try/node_modules/~wisp/bin/wisp.js +2 -0
- data/vendor/try/node_modules/~wisp/compiler.js +1028 -0
- data/vendor/try/node_modules/~wisp/design.md +114 -0
- data/vendor/try/node_modules/~wisp/engine/browser.js +65 -0
- data/vendor/try/node_modules/~wisp/engine/node.js +20 -0
- data/vendor/try/node_modules/~wisp/index.html +405 -0
- data/vendor/try/node_modules/~wisp/interactivate/Makefile +38 -0
- data/vendor/try/node_modules/~wisp/interactivate/Readme.md +24 -0
- data/vendor/try/node_modules/~wisp/interactivate/build/cache.manifest +12 -0
- data/vendor/try/node_modules/~wisp/interactivate/build/codemirror-compressed.js +4 -0
- data/vendor/try/node_modules/~wisp/interactivate/build/codemirror.css +248 -0
- data/vendor/try/node_modules/~wisp/interactivate/build/main.js +5430 -0
- data/vendor/try/node_modules/~wisp/interactivate/build/solarized.css +207 -0
- data/vendor/try/node_modules/~wisp/interactivate/host.wisp +83 -0
- data/vendor/try/node_modules/~wisp/interactivate/index.html +392 -0
- data/vendor/try/node_modules/~wisp/interactivate/main.wisp +37 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/Readme.md +23 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/core.js +31 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-hashare/package.json +37 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/History.md +47 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/Readme.md +11 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/Readme.md +24 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/cache.manifest +12 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/codemirror-compressed.js +4 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/codemirror.css +248 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/main.js +267 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/build/solarized.css +207 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/index.html +115 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/main.js +39 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/Readme.md +22 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/core.js +33 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-activine/package.json +36 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/Readme.md +23 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/core.js +31 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-hashare/package.json +37 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/Readme.md +22 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/core.js +25 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/node_modules/codemirror-persist/package.json +34 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/demo/package.json +21 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/host/window.js +19 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/interactivate.js +187 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/History.md +10 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/Readme.md +68 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/diff.js +45 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/index.js +5 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/package.json +53 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/patch.js +21 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/rebase.js +33 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/diff.js +62 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/index.js +16 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/diffpatcher/test/patch.js +54 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/History.md +15 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/Readme.md +54 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/event.js +39 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/index.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/History.md +20 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/Readme.md +45 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/end.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/index.js +8 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-error.js +9 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/is-reduced.js +9 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/package.json +57 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduce.js +59 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reduced.js +15 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/reducible.js +87 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/index.js +6 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reduce.js +116 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/node_modules/reducible/test/reducible.js +106 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/package.json +56 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/dom-reduce/test/index.js +91 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/History.md +60 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/Readme.md +125 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/core.js +227 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/package.json +93 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/browser.js +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/common-index.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/common.js +270 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/index.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/phantom-index.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/tap-index.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/method/test/testling-index.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/History.md +139 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/License.md +19 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/Readme.md +253 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/capture.js +34 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/concat.js +37 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/debug/print.js +45 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/delay.js +29 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop-while.js +39 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/drop.js +40 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/expand.js +25 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/filter.js +21 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/fold.js +55 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/hub.js +102 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/index.js +33 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/into.js +16 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/map.js +19 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/merge.js +50 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/History.md +20 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/License.md +18 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/Readme.md +45 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/end.js +3 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/index.js +8 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-error.js +9 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/is-reduced.js +9 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/package.json +57 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduce.js +59 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reduced.js +15 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/reducible.js +87 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/index.js +6 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reduce.js +116 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/node_modules/reducible/test/reducible.js +106 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/package.json +60 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/reducer.js +51 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/reductions.js +31 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/take-while.js +23 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/take.js +40 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/benchmark.js +32 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/capture.js +108 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/concat.js +104 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/delay.js +29 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop-while.js +118 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/drop.js +89 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/errors.js +222 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/filter.js +72 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/fold.js +111 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/hub.js +222 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/index.js +23 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/into.js +22 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/map.js +67 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/merge.js +75 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/reductions.js +105 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take-while.js +134 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/take.js +82 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/event.js +25 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/lazy.js +9 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/node_modules/reducers/test/util/test.js +34 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/output.js +60 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/package.json +30 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/render.js +23 -0
- data/vendor/try/node_modules/~wisp/interactivate/node_modules/interactivate/view.js +79 -0
- data/vendor/try/node_modules/~wisp/interactivate/package.json +22 -0
- data/vendor/try/node_modules/~wisp/package.json +57 -0
- data/vendor/try/node_modules/~wisp/reader.js +785 -0
- data/vendor/try/node_modules/~wisp/repl.js +121 -0
- data/vendor/try/node_modules/~wisp/runtime.js +609 -0
- data/vendor/try/node_modules/~wisp/sequence.js +553 -0
- data/vendor/try/node_modules/~wisp/src/ast.wisp +160 -0
- data/vendor/try/node_modules/~wisp/src/backend/javascript/writer.wisp +161 -0
- data/vendor/try/node_modules/~wisp/src/backend/js/generator.wisp +939 -0
- data/vendor/try/node_modules/~wisp/src/compiler.wisp +1185 -0
- data/vendor/try/node_modules/~wisp/src/drafts.wisp +50 -0
- data/vendor/try/node_modules/~wisp/src/drft.wisp +329 -0
- data/vendor/try/node_modules/~wisp/src/engine/browser.wisp +73 -0
- data/vendor/try/node_modules/~wisp/src/engine/node.wisp +23 -0
- data/vendor/try/node_modules/~wisp/src/extra.wisp +36 -0
- data/vendor/try/node_modules/~wisp/src/reader.wisp +615 -0
- data/vendor/try/node_modules/~wisp/src/repl.wisp +79 -0
- data/vendor/try/node_modules/~wisp/src/runtime.wisp +511 -0
- data/vendor/try/node_modules/~wisp/src/sequence.wisp +416 -0
- data/vendor/try/node_modules/~wisp/src/string.wisp +110 -0
- data/vendor/try/node_modules/~wisp/src/type.wisp +51 -0
- data/vendor/try/node_modules/~wisp/src/wisp.wisp +57 -0
- data/vendor/try/node_modules/~wisp/string.js +96 -0
- data/vendor/try/node_modules/~wisp/support/ambiance.css +119 -0
- data/vendor/try/node_modules/~wisp/support/app.js +3669 -0
- data/vendor/try/node_modules/~wisp/support/codemirror-compressed.js +1 -0
- data/vendor/try/node_modules/~wisp/support/codemirror.css +173 -0
- data/vendor/try/node_modules/~wisp/support/embed.js +71 -0
- data/vendor/try/node_modules/~wisp/support/embed.wisp +74 -0
- data/vendor/try/node_modules/~wisp/support/require.js +35 -0
- data/vendor/try/node_modules/~wisp/test/ast.wisp +58 -0
- data/vendor/try/node_modules/~wisp/test/compiler.wisp +549 -0
- data/vendor/try/node_modules/~wisp/test/reader.wisp +228 -0
- data/vendor/try/node_modules/~wisp/test/runtime.wisp +180 -0
- data/vendor/try/node_modules/~wisp/test/sequence.wisp +338 -0
- data/vendor/try/node_modules/~wisp/test/string.wisp +44 -0
- data/vendor/try/node_modules/~wisp/test/test.wisp +8 -0
- data/vendor/try/node_modules/~wisp/wisp.js +60 -0
- data/vendor/try/package.json +19 -0
- data/vendor/try/src/main.wisp +89 -0
- data/vendor/wisp.js +55 -0
- metadata +1727 -0
@@ -0,0 +1,3863 @@
|
|
1
|
+
require=(function(e,t,n,r){function i(r){if(!n[r]){if(!t[r]){if(e)return e(r);throw new Error("Cannot find module '"+r+"'")}var s=n[r]={exports:{}};t[r][0](function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports)}return n[r].exports}for(var s=0;s<r.length;s++)i(r[s]);return i})(typeof require!=="undefined"&&require,{1:[function(require,module,exports){
|
2
|
+
exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) {
|
3
|
+
var e, m,
|
4
|
+
eLen = nBytes * 8 - mLen - 1,
|
5
|
+
eMax = (1 << eLen) - 1,
|
6
|
+
eBias = eMax >> 1,
|
7
|
+
nBits = -7,
|
8
|
+
i = isBE ? 0 : (nBytes - 1),
|
9
|
+
d = isBE ? 1 : -1,
|
10
|
+
s = buffer[offset + i];
|
11
|
+
|
12
|
+
i += d;
|
13
|
+
|
14
|
+
e = s & ((1 << (-nBits)) - 1);
|
15
|
+
s >>= (-nBits);
|
16
|
+
nBits += eLen;
|
17
|
+
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
|
18
|
+
|
19
|
+
m = e & ((1 << (-nBits)) - 1);
|
20
|
+
e >>= (-nBits);
|
21
|
+
nBits += mLen;
|
22
|
+
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
|
23
|
+
|
24
|
+
if (e === 0) {
|
25
|
+
e = 1 - eBias;
|
26
|
+
} else if (e === eMax) {
|
27
|
+
return m ? NaN : ((s ? -1 : 1) * Infinity);
|
28
|
+
} else {
|
29
|
+
m = m + Math.pow(2, mLen);
|
30
|
+
e = e - eBias;
|
31
|
+
}
|
32
|
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
33
|
+
};
|
34
|
+
|
35
|
+
exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) {
|
36
|
+
var e, m, c,
|
37
|
+
eLen = nBytes * 8 - mLen - 1,
|
38
|
+
eMax = (1 << eLen) - 1,
|
39
|
+
eBias = eMax >> 1,
|
40
|
+
rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
|
41
|
+
i = isBE ? (nBytes - 1) : 0,
|
42
|
+
d = isBE ? -1 : 1,
|
43
|
+
s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
|
44
|
+
|
45
|
+
value = Math.abs(value);
|
46
|
+
|
47
|
+
if (isNaN(value) || value === Infinity) {
|
48
|
+
m = isNaN(value) ? 1 : 0;
|
49
|
+
e = eMax;
|
50
|
+
} else {
|
51
|
+
e = Math.floor(Math.log(value) / Math.LN2);
|
52
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
53
|
+
e--;
|
54
|
+
c *= 2;
|
55
|
+
}
|
56
|
+
if (e + eBias >= 1) {
|
57
|
+
value += rt / c;
|
58
|
+
} else {
|
59
|
+
value += rt * Math.pow(2, 1 - eBias);
|
60
|
+
}
|
61
|
+
if (value * c >= 2) {
|
62
|
+
e++;
|
63
|
+
c /= 2;
|
64
|
+
}
|
65
|
+
|
66
|
+
if (e + eBias >= eMax) {
|
67
|
+
m = 0;
|
68
|
+
e = eMax;
|
69
|
+
} else if (e + eBias >= 1) {
|
70
|
+
m = (value * c - 1) * Math.pow(2, mLen);
|
71
|
+
e = e + eBias;
|
72
|
+
} else {
|
73
|
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
74
|
+
e = 0;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
|
79
|
+
|
80
|
+
e = (e << mLen) | m;
|
81
|
+
eLen += mLen;
|
82
|
+
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
|
83
|
+
|
84
|
+
buffer[offset + i - d] |= s * 128;
|
85
|
+
};
|
86
|
+
|
87
|
+
},{}],2:[function(require,module,exports){
|
88
|
+
(function(){// UTILITY
|
89
|
+
var util = require('util');
|
90
|
+
var Buffer = require("buffer").Buffer;
|
91
|
+
var pSlice = Array.prototype.slice;
|
92
|
+
|
93
|
+
function objectKeys(object) {
|
94
|
+
if (Object.keys) return Object.keys(object);
|
95
|
+
var result = [];
|
96
|
+
for (var name in object) {
|
97
|
+
if (Object.prototype.hasOwnProperty.call(object, name)) {
|
98
|
+
result.push(name);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
return result;
|
102
|
+
}
|
103
|
+
|
104
|
+
// 1. The assert module provides functions that throw
|
105
|
+
// AssertionError's when particular conditions are not met. The
|
106
|
+
// assert module must conform to the following interface.
|
107
|
+
|
108
|
+
var assert = module.exports = ok;
|
109
|
+
|
110
|
+
// 2. The AssertionError is defined in assert.
|
111
|
+
// new assert.AssertionError({ message: message,
|
112
|
+
// actual: actual,
|
113
|
+
// expected: expected })
|
114
|
+
|
115
|
+
assert.AssertionError = function AssertionError(options) {
|
116
|
+
this.name = 'AssertionError';
|
117
|
+
this.message = options.message;
|
118
|
+
this.actual = options.actual;
|
119
|
+
this.expected = options.expected;
|
120
|
+
this.operator = options.operator;
|
121
|
+
var stackStartFunction = options.stackStartFunction || fail;
|
122
|
+
|
123
|
+
if (Error.captureStackTrace) {
|
124
|
+
Error.captureStackTrace(this, stackStartFunction);
|
125
|
+
}
|
126
|
+
};
|
127
|
+
util.inherits(assert.AssertionError, Error);
|
128
|
+
|
129
|
+
function replacer(key, value) {
|
130
|
+
if (value === undefined) {
|
131
|
+
return '' + value;
|
132
|
+
}
|
133
|
+
if (typeof value === 'number' && (isNaN(value) || !isFinite(value))) {
|
134
|
+
return value.toString();
|
135
|
+
}
|
136
|
+
if (typeof value === 'function' || value instanceof RegExp) {
|
137
|
+
return value.toString();
|
138
|
+
}
|
139
|
+
return value;
|
140
|
+
}
|
141
|
+
|
142
|
+
function truncate(s, n) {
|
143
|
+
if (typeof s == 'string') {
|
144
|
+
return s.length < n ? s : s.slice(0, n);
|
145
|
+
} else {
|
146
|
+
return s;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
assert.AssertionError.prototype.toString = function() {
|
151
|
+
if (this.message) {
|
152
|
+
return [this.name + ':', this.message].join(' ');
|
153
|
+
} else {
|
154
|
+
return [
|
155
|
+
this.name + ':',
|
156
|
+
truncate(JSON.stringify(this.actual, replacer), 128),
|
157
|
+
this.operator,
|
158
|
+
truncate(JSON.stringify(this.expected, replacer), 128)
|
159
|
+
].join(' ');
|
160
|
+
}
|
161
|
+
};
|
162
|
+
|
163
|
+
// assert.AssertionError instanceof Error
|
164
|
+
|
165
|
+
assert.AssertionError.__proto__ = Error.prototype;
|
166
|
+
|
167
|
+
// At present only the three keys mentioned above are used and
|
168
|
+
// understood by the spec. Implementations or sub modules can pass
|
169
|
+
// other keys to the AssertionError's constructor - they will be
|
170
|
+
// ignored.
|
171
|
+
|
172
|
+
// 3. All of the following functions must throw an AssertionError
|
173
|
+
// when a corresponding condition is not met, with a message that
|
174
|
+
// may be undefined if not provided. All assertion methods provide
|
175
|
+
// both the actual and expected values to the assertion error for
|
176
|
+
// display purposes.
|
177
|
+
|
178
|
+
function fail(actual, expected, message, operator, stackStartFunction) {
|
179
|
+
throw new assert.AssertionError({
|
180
|
+
message: message,
|
181
|
+
actual: actual,
|
182
|
+
expected: expected,
|
183
|
+
operator: operator,
|
184
|
+
stackStartFunction: stackStartFunction
|
185
|
+
});
|
186
|
+
}
|
187
|
+
|
188
|
+
// EXTENSION! allows for well behaved errors defined elsewhere.
|
189
|
+
assert.fail = fail;
|
190
|
+
|
191
|
+
// 4. Pure assertion tests whether a value is truthy, as determined
|
192
|
+
// by !!guard.
|
193
|
+
// assert.ok(guard, message_opt);
|
194
|
+
// This statement is equivalent to assert.equal(true, guard,
|
195
|
+
// message_opt);. To test strictly for the value true, use
|
196
|
+
// assert.strictEqual(true, guard, message_opt);.
|
197
|
+
|
198
|
+
function ok(value, message) {
|
199
|
+
if (!!!value) fail(value, true, message, '==', assert.ok);
|
200
|
+
}
|
201
|
+
assert.ok = ok;
|
202
|
+
|
203
|
+
// 5. The equality assertion tests shallow, coercive equality with
|
204
|
+
// ==.
|
205
|
+
// assert.equal(actual, expected, message_opt);
|
206
|
+
|
207
|
+
assert.equal = function equal(actual, expected, message) {
|
208
|
+
if (actual != expected) fail(actual, expected, message, '==', assert.equal);
|
209
|
+
};
|
210
|
+
|
211
|
+
// 6. The non-equality assertion tests for whether two objects are not equal
|
212
|
+
// with != assert.notEqual(actual, expected, message_opt);
|
213
|
+
|
214
|
+
assert.notEqual = function notEqual(actual, expected, message) {
|
215
|
+
if (actual == expected) {
|
216
|
+
fail(actual, expected, message, '!=', assert.notEqual);
|
217
|
+
}
|
218
|
+
};
|
219
|
+
|
220
|
+
// 7. The equivalence assertion tests a deep equality relation.
|
221
|
+
// assert.deepEqual(actual, expected, message_opt);
|
222
|
+
|
223
|
+
assert.deepEqual = function deepEqual(actual, expected, message) {
|
224
|
+
if (!_deepEqual(actual, expected)) {
|
225
|
+
fail(actual, expected, message, 'deepEqual', assert.deepEqual);
|
226
|
+
}
|
227
|
+
};
|
228
|
+
|
229
|
+
function _deepEqual(actual, expected) {
|
230
|
+
// 7.1. All identical values are equivalent, as determined by ===.
|
231
|
+
if (actual === expected) {
|
232
|
+
return true;
|
233
|
+
|
234
|
+
} else if (Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {
|
235
|
+
if (actual.length != expected.length) return false;
|
236
|
+
|
237
|
+
for (var i = 0; i < actual.length; i++) {
|
238
|
+
if (actual[i] !== expected[i]) return false;
|
239
|
+
}
|
240
|
+
|
241
|
+
return true;
|
242
|
+
|
243
|
+
// 7.2. If the expected value is a Date object, the actual value is
|
244
|
+
// equivalent if it is also a Date object that refers to the same time.
|
245
|
+
} else if (actual instanceof Date && expected instanceof Date) {
|
246
|
+
return actual.getTime() === expected.getTime();
|
247
|
+
|
248
|
+
// 7.3. Other pairs that do not both pass typeof value == 'object',
|
249
|
+
// equivalence is determined by ==.
|
250
|
+
} else if (typeof actual != 'object' && typeof expected != 'object') {
|
251
|
+
return actual == expected;
|
252
|
+
|
253
|
+
// 7.4. For all other Object pairs, including Array objects, equivalence is
|
254
|
+
// determined by having the same number of owned properties (as verified
|
255
|
+
// with Object.prototype.hasOwnProperty.call), the same set of keys
|
256
|
+
// (although not necessarily the same order), equivalent values for every
|
257
|
+
// corresponding key, and an identical 'prototype' property. Note: this
|
258
|
+
// accounts for both named and indexed properties on Arrays.
|
259
|
+
} else {
|
260
|
+
return objEquiv(actual, expected);
|
261
|
+
}
|
262
|
+
}
|
263
|
+
|
264
|
+
function isUndefinedOrNull(value) {
|
265
|
+
return value === null || value === undefined;
|
266
|
+
}
|
267
|
+
|
268
|
+
function isArguments(object) {
|
269
|
+
return Object.prototype.toString.call(object) == '[object Arguments]';
|
270
|
+
}
|
271
|
+
|
272
|
+
function objEquiv(a, b) {
|
273
|
+
if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
|
274
|
+
return false;
|
275
|
+
// an identical 'prototype' property.
|
276
|
+
if (a.prototype !== b.prototype) return false;
|
277
|
+
//~~~I've managed to break Object.keys through screwy arguments passing.
|
278
|
+
// Converting to array solves the problem.
|
279
|
+
if (isArguments(a)) {
|
280
|
+
if (!isArguments(b)) {
|
281
|
+
return false;
|
282
|
+
}
|
283
|
+
a = pSlice.call(a);
|
284
|
+
b = pSlice.call(b);
|
285
|
+
return _deepEqual(a, b);
|
286
|
+
}
|
287
|
+
try {
|
288
|
+
var ka = objectKeys(a),
|
289
|
+
kb = objectKeys(b),
|
290
|
+
key, i;
|
291
|
+
} catch (e) {//happens when one is a string literal and the other isn't
|
292
|
+
return false;
|
293
|
+
}
|
294
|
+
// having the same number of owned properties (keys incorporates
|
295
|
+
// hasOwnProperty)
|
296
|
+
if (ka.length != kb.length)
|
297
|
+
return false;
|
298
|
+
//the same set of keys (although not necessarily the same order),
|
299
|
+
ka.sort();
|
300
|
+
kb.sort();
|
301
|
+
//~~~cheap key test
|
302
|
+
for (i = ka.length - 1; i >= 0; i--) {
|
303
|
+
if (ka[i] != kb[i])
|
304
|
+
return false;
|
305
|
+
}
|
306
|
+
//equivalent values for every corresponding key, and
|
307
|
+
//~~~possibly expensive deep test
|
308
|
+
for (i = ka.length - 1; i >= 0; i--) {
|
309
|
+
key = ka[i];
|
310
|
+
if (!_deepEqual(a[key], b[key])) return false;
|
311
|
+
}
|
312
|
+
return true;
|
313
|
+
}
|
314
|
+
|
315
|
+
// 8. The non-equivalence assertion tests for any deep inequality.
|
316
|
+
// assert.notDeepEqual(actual, expected, message_opt);
|
317
|
+
|
318
|
+
assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
|
319
|
+
if (_deepEqual(actual, expected)) {
|
320
|
+
fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
|
321
|
+
}
|
322
|
+
};
|
323
|
+
|
324
|
+
// 9. The strict equality assertion tests strict equality, as determined by ===.
|
325
|
+
// assert.strictEqual(actual, expected, message_opt);
|
326
|
+
|
327
|
+
assert.strictEqual = function strictEqual(actual, expected, message) {
|
328
|
+
if (actual !== expected) {
|
329
|
+
fail(actual, expected, message, '===', assert.strictEqual);
|
330
|
+
}
|
331
|
+
};
|
332
|
+
|
333
|
+
// 10. The strict non-equality assertion tests for strict inequality, as
|
334
|
+
// determined by !==. assert.notStrictEqual(actual, expected, message_opt);
|
335
|
+
|
336
|
+
assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
|
337
|
+
if (actual === expected) {
|
338
|
+
fail(actual, expected, message, '!==', assert.notStrictEqual);
|
339
|
+
}
|
340
|
+
};
|
341
|
+
|
342
|
+
function expectedException(actual, expected) {
|
343
|
+
if (!actual || !expected) {
|
344
|
+
return false;
|
345
|
+
}
|
346
|
+
|
347
|
+
if (expected instanceof RegExp) {
|
348
|
+
return expected.test(actual);
|
349
|
+
} else if (actual instanceof expected) {
|
350
|
+
return true;
|
351
|
+
} else if (expected.call({}, actual) === true) {
|
352
|
+
return true;
|
353
|
+
}
|
354
|
+
|
355
|
+
return false;
|
356
|
+
}
|
357
|
+
|
358
|
+
function _throws(shouldThrow, block, expected, message) {
|
359
|
+
var actual;
|
360
|
+
|
361
|
+
if (typeof expected === 'string') {
|
362
|
+
message = expected;
|
363
|
+
expected = null;
|
364
|
+
}
|
365
|
+
|
366
|
+
try {
|
367
|
+
block();
|
368
|
+
} catch (e) {
|
369
|
+
actual = e;
|
370
|
+
}
|
371
|
+
|
372
|
+
message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
|
373
|
+
(message ? ' ' + message : '.');
|
374
|
+
|
375
|
+
if (shouldThrow && !actual) {
|
376
|
+
fail('Missing expected exception' + message);
|
377
|
+
}
|
378
|
+
|
379
|
+
if (!shouldThrow && expectedException(actual, expected)) {
|
380
|
+
fail('Got unwanted exception' + message);
|
381
|
+
}
|
382
|
+
|
383
|
+
if ((shouldThrow && actual && expected &&
|
384
|
+
!expectedException(actual, expected)) || (!shouldThrow && actual)) {
|
385
|
+
throw actual;
|
386
|
+
}
|
387
|
+
}
|
388
|
+
|
389
|
+
// 11. Expected to throw an error:
|
390
|
+
// assert.throws(block, Error_opt, message_opt);
|
391
|
+
|
392
|
+
assert.throws = function(block, /*optional*/error, /*optional*/message) {
|
393
|
+
_throws.apply(this, [true].concat(pSlice.call(arguments)));
|
394
|
+
};
|
395
|
+
|
396
|
+
// EXTENSION! This is annoying to write outside this module.
|
397
|
+
assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
|
398
|
+
_throws.apply(this, [false].concat(pSlice.call(arguments)));
|
399
|
+
};
|
400
|
+
|
401
|
+
assert.ifError = function(err) { if (err) {throw err;}};
|
402
|
+
|
403
|
+
})()
|
404
|
+
},{"util":3,"buffer":4}],"buffer-browserify":[function(require,module,exports){
|
405
|
+
module.exports=require('q9TxCC');
|
406
|
+
},{}],"q9TxCC":[function(require,module,exports){
|
407
|
+
(function(){function SlowBuffer (size) {
|
408
|
+
this.length = size;
|
409
|
+
};
|
410
|
+
|
411
|
+
var assert = require('assert');
|
412
|
+
|
413
|
+
exports.INSPECT_MAX_BYTES = 50;
|
414
|
+
|
415
|
+
|
416
|
+
function toHex(n) {
|
417
|
+
if (n < 16) return '0' + n.toString(16);
|
418
|
+
return n.toString(16);
|
419
|
+
}
|
420
|
+
|
421
|
+
function utf8ToBytes(str) {
|
422
|
+
var byteArray = [];
|
423
|
+
for (var i = 0; i < str.length; i++)
|
424
|
+
if (str.charCodeAt(i) <= 0x7F)
|
425
|
+
byteArray.push(str.charCodeAt(i));
|
426
|
+
else {
|
427
|
+
var h = encodeURIComponent(str.charAt(i)).substr(1).split('%');
|
428
|
+
for (var j = 0; j < h.length; j++)
|
429
|
+
byteArray.push(parseInt(h[j], 16));
|
430
|
+
}
|
431
|
+
|
432
|
+
return byteArray;
|
433
|
+
}
|
434
|
+
|
435
|
+
function asciiToBytes(str) {
|
436
|
+
var byteArray = []
|
437
|
+
for (var i = 0; i < str.length; i++ )
|
438
|
+
// Node's code seems to be doing this and not & 0x7F..
|
439
|
+
byteArray.push( str.charCodeAt(i) & 0xFF );
|
440
|
+
|
441
|
+
return byteArray;
|
442
|
+
}
|
443
|
+
|
444
|
+
function base64ToBytes(str) {
|
445
|
+
return require("base64-js").toByteArray(str);
|
446
|
+
}
|
447
|
+
|
448
|
+
SlowBuffer.byteLength = function (str, encoding) {
|
449
|
+
switch (encoding || "utf8") {
|
450
|
+
case 'hex':
|
451
|
+
return str.length / 2;
|
452
|
+
|
453
|
+
case 'utf8':
|
454
|
+
case 'utf-8':
|
455
|
+
return utf8ToBytes(str).length;
|
456
|
+
|
457
|
+
case 'ascii':
|
458
|
+
case 'binary':
|
459
|
+
return str.length;
|
460
|
+
|
461
|
+
case 'base64':
|
462
|
+
return base64ToBytes(str).length;
|
463
|
+
|
464
|
+
default:
|
465
|
+
throw new Error('Unknown encoding');
|
466
|
+
}
|
467
|
+
};
|
468
|
+
|
469
|
+
function blitBuffer(src, dst, offset, length) {
|
470
|
+
var pos, i = 0;
|
471
|
+
while (i < length) {
|
472
|
+
if ((i+offset >= dst.length) || (i >= src.length))
|
473
|
+
break;
|
474
|
+
|
475
|
+
dst[i + offset] = src[i];
|
476
|
+
i++;
|
477
|
+
}
|
478
|
+
return i;
|
479
|
+
}
|
480
|
+
|
481
|
+
SlowBuffer.prototype.utf8Write = function (string, offset, length) {
|
482
|
+
var bytes, pos;
|
483
|
+
return SlowBuffer._charsWritten = blitBuffer(utf8ToBytes(string), this, offset, length);
|
484
|
+
};
|
485
|
+
|
486
|
+
SlowBuffer.prototype.asciiWrite = function (string, offset, length) {
|
487
|
+
var bytes, pos;
|
488
|
+
return SlowBuffer._charsWritten = blitBuffer(asciiToBytes(string), this, offset, length);
|
489
|
+
};
|
490
|
+
|
491
|
+
SlowBuffer.prototype.binaryWrite = SlowBuffer.prototype.asciiWrite;
|
492
|
+
|
493
|
+
SlowBuffer.prototype.base64Write = function (string, offset, length) {
|
494
|
+
var bytes, pos;
|
495
|
+
return SlowBuffer._charsWritten = blitBuffer(base64ToBytes(string), this, offset, length);
|
496
|
+
};
|
497
|
+
|
498
|
+
SlowBuffer.prototype.base64Slice = function (start, end) {
|
499
|
+
var bytes = Array.prototype.slice.apply(this, arguments)
|
500
|
+
return require("base64-js").fromByteArray(bytes);
|
501
|
+
}
|
502
|
+
|
503
|
+
function decodeUtf8Char(str) {
|
504
|
+
try {
|
505
|
+
return decodeURIComponent(str);
|
506
|
+
} catch (err) {
|
507
|
+
return String.fromCharCode(0xFFFD); // UTF 8 invalid char
|
508
|
+
}
|
509
|
+
}
|
510
|
+
|
511
|
+
SlowBuffer.prototype.utf8Slice = function () {
|
512
|
+
var bytes = Array.prototype.slice.apply(this, arguments);
|
513
|
+
var res = "";
|
514
|
+
var tmp = "";
|
515
|
+
var i = 0;
|
516
|
+
while (i < bytes.length) {
|
517
|
+
if (bytes[i] <= 0x7F) {
|
518
|
+
res += decodeUtf8Char(tmp) + String.fromCharCode(bytes[i]);
|
519
|
+
tmp = "";
|
520
|
+
} else
|
521
|
+
tmp += "%" + bytes[i].toString(16);
|
522
|
+
|
523
|
+
i++;
|
524
|
+
}
|
525
|
+
|
526
|
+
return res + decodeUtf8Char(tmp);
|
527
|
+
}
|
528
|
+
|
529
|
+
SlowBuffer.prototype.asciiSlice = function () {
|
530
|
+
var bytes = Array.prototype.slice.apply(this, arguments);
|
531
|
+
var ret = "";
|
532
|
+
for (var i = 0; i < bytes.length; i++)
|
533
|
+
ret += String.fromCharCode(bytes[i]);
|
534
|
+
return ret;
|
535
|
+
}
|
536
|
+
|
537
|
+
SlowBuffer.prototype.binarySlice = SlowBuffer.prototype.asciiSlice;
|
538
|
+
|
539
|
+
SlowBuffer.prototype.inspect = function() {
|
540
|
+
var out = [],
|
541
|
+
len = this.length;
|
542
|
+
for (var i = 0; i < len; i++) {
|
543
|
+
out[i] = toHex(this[i]);
|
544
|
+
if (i == exports.INSPECT_MAX_BYTES) {
|
545
|
+
out[i + 1] = '...';
|
546
|
+
break;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
return '<SlowBuffer ' + out.join(' ') + '>';
|
550
|
+
};
|
551
|
+
|
552
|
+
|
553
|
+
SlowBuffer.prototype.hexSlice = function(start, end) {
|
554
|
+
var len = this.length;
|
555
|
+
|
556
|
+
if (!start || start < 0) start = 0;
|
557
|
+
if (!end || end < 0 || end > len) end = len;
|
558
|
+
|
559
|
+
var out = '';
|
560
|
+
for (var i = start; i < end; i++) {
|
561
|
+
out += toHex(this[i]);
|
562
|
+
}
|
563
|
+
return out;
|
564
|
+
};
|
565
|
+
|
566
|
+
|
567
|
+
SlowBuffer.prototype.toString = function(encoding, start, end) {
|
568
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
569
|
+
start = +start || 0;
|
570
|
+
if (typeof end == 'undefined') end = this.length;
|
571
|
+
|
572
|
+
// Fastpath empty strings
|
573
|
+
if (+end == start) {
|
574
|
+
return '';
|
575
|
+
}
|
576
|
+
|
577
|
+
switch (encoding) {
|
578
|
+
case 'hex':
|
579
|
+
return this.hexSlice(start, end);
|
580
|
+
|
581
|
+
case 'utf8':
|
582
|
+
case 'utf-8':
|
583
|
+
return this.utf8Slice(start, end);
|
584
|
+
|
585
|
+
case 'ascii':
|
586
|
+
return this.asciiSlice(start, end);
|
587
|
+
|
588
|
+
case 'binary':
|
589
|
+
return this.binarySlice(start, end);
|
590
|
+
|
591
|
+
case 'base64':
|
592
|
+
return this.base64Slice(start, end);
|
593
|
+
|
594
|
+
case 'ucs2':
|
595
|
+
case 'ucs-2':
|
596
|
+
return this.ucs2Slice(start, end);
|
597
|
+
|
598
|
+
default:
|
599
|
+
throw new Error('Unknown encoding');
|
600
|
+
}
|
601
|
+
};
|
602
|
+
|
603
|
+
|
604
|
+
SlowBuffer.prototype.hexWrite = function(string, offset, length) {
|
605
|
+
offset = +offset || 0;
|
606
|
+
var remaining = this.length - offset;
|
607
|
+
if (!length) {
|
608
|
+
length = remaining;
|
609
|
+
} else {
|
610
|
+
length = +length;
|
611
|
+
if (length > remaining) {
|
612
|
+
length = remaining;
|
613
|
+
}
|
614
|
+
}
|
615
|
+
|
616
|
+
// must be an even number of digits
|
617
|
+
var strLen = string.length;
|
618
|
+
if (strLen % 2) {
|
619
|
+
throw new Error('Invalid hex string');
|
620
|
+
}
|
621
|
+
if (length > strLen / 2) {
|
622
|
+
length = strLen / 2;
|
623
|
+
}
|
624
|
+
for (var i = 0; i < length; i++) {
|
625
|
+
var byte = parseInt(string.substr(i * 2, 2), 16);
|
626
|
+
if (isNaN(byte)) throw new Error('Invalid hex string');
|
627
|
+
this[offset + i] = byte;
|
628
|
+
}
|
629
|
+
SlowBuffer._charsWritten = i * 2;
|
630
|
+
return i;
|
631
|
+
};
|
632
|
+
|
633
|
+
|
634
|
+
SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
635
|
+
// Support both (string, offset, length, encoding)
|
636
|
+
// and the legacy (string, encoding, offset, length)
|
637
|
+
if (isFinite(offset)) {
|
638
|
+
if (!isFinite(length)) {
|
639
|
+
encoding = length;
|
640
|
+
length = undefined;
|
641
|
+
}
|
642
|
+
} else { // legacy
|
643
|
+
var swap = encoding;
|
644
|
+
encoding = offset;
|
645
|
+
offset = length;
|
646
|
+
length = swap;
|
647
|
+
}
|
648
|
+
|
649
|
+
offset = +offset || 0;
|
650
|
+
var remaining = this.length - offset;
|
651
|
+
if (!length) {
|
652
|
+
length = remaining;
|
653
|
+
} else {
|
654
|
+
length = +length;
|
655
|
+
if (length > remaining) {
|
656
|
+
length = remaining;
|
657
|
+
}
|
658
|
+
}
|
659
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
660
|
+
|
661
|
+
switch (encoding) {
|
662
|
+
case 'hex':
|
663
|
+
return this.hexWrite(string, offset, length);
|
664
|
+
|
665
|
+
case 'utf8':
|
666
|
+
case 'utf-8':
|
667
|
+
return this.utf8Write(string, offset, length);
|
668
|
+
|
669
|
+
case 'ascii':
|
670
|
+
return this.asciiWrite(string, offset, length);
|
671
|
+
|
672
|
+
case 'binary':
|
673
|
+
return this.binaryWrite(string, offset, length);
|
674
|
+
|
675
|
+
case 'base64':
|
676
|
+
return this.base64Write(string, offset, length);
|
677
|
+
|
678
|
+
case 'ucs2':
|
679
|
+
case 'ucs-2':
|
680
|
+
return this.ucs2Write(string, offset, length);
|
681
|
+
|
682
|
+
default:
|
683
|
+
throw new Error('Unknown encoding');
|
684
|
+
}
|
685
|
+
};
|
686
|
+
|
687
|
+
|
688
|
+
// slice(start, end)
|
689
|
+
SlowBuffer.prototype.slice = function(start, end) {
|
690
|
+
if (end === undefined) end = this.length;
|
691
|
+
|
692
|
+
if (end > this.length) {
|
693
|
+
throw new Error('oob');
|
694
|
+
}
|
695
|
+
if (start > end) {
|
696
|
+
throw new Error('oob');
|
697
|
+
}
|
698
|
+
|
699
|
+
return new Buffer(this, end - start, +start);
|
700
|
+
};
|
701
|
+
|
702
|
+
SlowBuffer.prototype.copy = function(target, targetstart, sourcestart, sourceend) {
|
703
|
+
var temp = [];
|
704
|
+
for (var i=sourcestart; i<sourceend; i++) {
|
705
|
+
assert.ok(typeof this[i] !== 'undefined', "copying undefined buffer bytes!");
|
706
|
+
temp.push(this[i]);
|
707
|
+
}
|
708
|
+
|
709
|
+
for (var i=targetstart; i<targetstart+temp.length; i++) {
|
710
|
+
target[i] = temp[i-targetstart];
|
711
|
+
}
|
712
|
+
};
|
713
|
+
|
714
|
+
SlowBuffer.prototype.fill = function(value, start, end) {
|
715
|
+
if (end > this.length) {
|
716
|
+
throw new Error('oob');
|
717
|
+
}
|
718
|
+
if (start > end) {
|
719
|
+
throw new Error('oob');
|
720
|
+
}
|
721
|
+
|
722
|
+
for (var i = start; i < end; i++) {
|
723
|
+
this[i] = value;
|
724
|
+
}
|
725
|
+
}
|
726
|
+
|
727
|
+
function coerce(length) {
|
728
|
+
// Coerce length to a number (possibly NaN), round up
|
729
|
+
// in case it's fractional (e.g. 123.456) then do a
|
730
|
+
// double negate to coerce a NaN to 0. Easy, right?
|
731
|
+
length = ~~Math.ceil(+length);
|
732
|
+
return length < 0 ? 0 : length;
|
733
|
+
}
|
734
|
+
|
735
|
+
|
736
|
+
// Buffer
|
737
|
+
|
738
|
+
function Buffer(subject, encoding, offset) {
|
739
|
+
if (!(this instanceof Buffer)) {
|
740
|
+
return new Buffer(subject, encoding, offset);
|
741
|
+
}
|
742
|
+
|
743
|
+
var type;
|
744
|
+
|
745
|
+
// Are we slicing?
|
746
|
+
if (typeof offset === 'number') {
|
747
|
+
this.length = coerce(encoding);
|
748
|
+
this.parent = subject;
|
749
|
+
this.offset = offset;
|
750
|
+
} else {
|
751
|
+
// Find the length
|
752
|
+
switch (type = typeof subject) {
|
753
|
+
case 'number':
|
754
|
+
this.length = coerce(subject);
|
755
|
+
break;
|
756
|
+
|
757
|
+
case 'string':
|
758
|
+
this.length = Buffer.byteLength(subject, encoding);
|
759
|
+
break;
|
760
|
+
|
761
|
+
case 'object': // Assume object is an array
|
762
|
+
this.length = coerce(subject.length);
|
763
|
+
break;
|
764
|
+
|
765
|
+
default:
|
766
|
+
throw new Error('First argument needs to be a number, ' +
|
767
|
+
'array or string.');
|
768
|
+
}
|
769
|
+
|
770
|
+
if (this.length > Buffer.poolSize) {
|
771
|
+
// Big buffer, just alloc one.
|
772
|
+
this.parent = new SlowBuffer(this.length);
|
773
|
+
this.offset = 0;
|
774
|
+
|
775
|
+
} else {
|
776
|
+
// Small buffer.
|
777
|
+
if (!pool || pool.length - pool.used < this.length) allocPool();
|
778
|
+
this.parent = pool;
|
779
|
+
this.offset = pool.used;
|
780
|
+
pool.used += this.length;
|
781
|
+
}
|
782
|
+
|
783
|
+
// Treat array-ish objects as a byte array.
|
784
|
+
if (isArrayIsh(subject)) {
|
785
|
+
for (var i = 0; i < this.length; i++) {
|
786
|
+
if (subject instanceof Buffer) {
|
787
|
+
this.parent[i + this.offset] = subject.readUInt8(i);
|
788
|
+
}
|
789
|
+
else {
|
790
|
+
this.parent[i + this.offset] = subject[i];
|
791
|
+
}
|
792
|
+
}
|
793
|
+
} else if (type == 'string') {
|
794
|
+
// We are a string
|
795
|
+
this.length = this.write(subject, 0, encoding);
|
796
|
+
}
|
797
|
+
}
|
798
|
+
|
799
|
+
}
|
800
|
+
|
801
|
+
function isArrayIsh(subject) {
|
802
|
+
return Array.isArray(subject) || Buffer.isBuffer(subject) ||
|
803
|
+
subject && typeof subject === 'object' &&
|
804
|
+
typeof subject.length === 'number';
|
805
|
+
}
|
806
|
+
|
807
|
+
exports.SlowBuffer = SlowBuffer;
|
808
|
+
exports.Buffer = Buffer;
|
809
|
+
|
810
|
+
Buffer.poolSize = 8 * 1024;
|
811
|
+
var pool;
|
812
|
+
|
813
|
+
function allocPool() {
|
814
|
+
pool = new SlowBuffer(Buffer.poolSize);
|
815
|
+
pool.used = 0;
|
816
|
+
}
|
817
|
+
|
818
|
+
|
819
|
+
// Static methods
|
820
|
+
Buffer.isBuffer = function isBuffer(b) {
|
821
|
+
return b instanceof Buffer || b instanceof SlowBuffer;
|
822
|
+
};
|
823
|
+
|
824
|
+
Buffer.concat = function (list, totalLength) {
|
825
|
+
if (!Array.isArray(list)) {
|
826
|
+
throw new Error("Usage: Buffer.concat(list, [totalLength])\n \
|
827
|
+
list should be an Array.");
|
828
|
+
}
|
829
|
+
|
830
|
+
if (list.length === 0) {
|
831
|
+
return new Buffer(0);
|
832
|
+
} else if (list.length === 1) {
|
833
|
+
return list[0];
|
834
|
+
}
|
835
|
+
|
836
|
+
if (typeof totalLength !== 'number') {
|
837
|
+
totalLength = 0;
|
838
|
+
for (var i = 0; i < list.length; i++) {
|
839
|
+
var buf = list[i];
|
840
|
+
totalLength += buf.length;
|
841
|
+
}
|
842
|
+
}
|
843
|
+
|
844
|
+
var buffer = new Buffer(totalLength);
|
845
|
+
var pos = 0;
|
846
|
+
for (var i = 0; i < list.length; i++) {
|
847
|
+
var buf = list[i];
|
848
|
+
buf.copy(buffer, pos);
|
849
|
+
pos += buf.length;
|
850
|
+
}
|
851
|
+
return buffer;
|
852
|
+
};
|
853
|
+
|
854
|
+
// Inspect
|
855
|
+
Buffer.prototype.inspect = function inspect() {
|
856
|
+
var out = [],
|
857
|
+
len = this.length;
|
858
|
+
|
859
|
+
for (var i = 0; i < len; i++) {
|
860
|
+
out[i] = toHex(this.parent[i + this.offset]);
|
861
|
+
if (i == exports.INSPECT_MAX_BYTES) {
|
862
|
+
out[i + 1] = '...';
|
863
|
+
break;
|
864
|
+
}
|
865
|
+
}
|
866
|
+
|
867
|
+
return '<Buffer ' + out.join(' ') + '>';
|
868
|
+
};
|
869
|
+
|
870
|
+
|
871
|
+
Buffer.prototype.get = function get(i) {
|
872
|
+
if (i < 0 || i >= this.length) throw new Error('oob');
|
873
|
+
return this.parent[this.offset + i];
|
874
|
+
};
|
875
|
+
|
876
|
+
|
877
|
+
Buffer.prototype.set = function set(i, v) {
|
878
|
+
if (i < 0 || i >= this.length) throw new Error('oob');
|
879
|
+
return this.parent[this.offset + i] = v;
|
880
|
+
};
|
881
|
+
|
882
|
+
|
883
|
+
// write(string, offset = 0, length = buffer.length-offset, encoding = 'utf8')
|
884
|
+
Buffer.prototype.write = function(string, offset, length, encoding) {
|
885
|
+
// Support both (string, offset, length, encoding)
|
886
|
+
// and the legacy (string, encoding, offset, length)
|
887
|
+
if (isFinite(offset)) {
|
888
|
+
if (!isFinite(length)) {
|
889
|
+
encoding = length;
|
890
|
+
length = undefined;
|
891
|
+
}
|
892
|
+
} else { // legacy
|
893
|
+
var swap = encoding;
|
894
|
+
encoding = offset;
|
895
|
+
offset = length;
|
896
|
+
length = swap;
|
897
|
+
}
|
898
|
+
|
899
|
+
offset = +offset || 0;
|
900
|
+
var remaining = this.length - offset;
|
901
|
+
if (!length) {
|
902
|
+
length = remaining;
|
903
|
+
} else {
|
904
|
+
length = +length;
|
905
|
+
if (length > remaining) {
|
906
|
+
length = remaining;
|
907
|
+
}
|
908
|
+
}
|
909
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
910
|
+
|
911
|
+
var ret;
|
912
|
+
switch (encoding) {
|
913
|
+
case 'hex':
|
914
|
+
ret = this.parent.hexWrite(string, this.offset + offset, length);
|
915
|
+
break;
|
916
|
+
|
917
|
+
case 'utf8':
|
918
|
+
case 'utf-8':
|
919
|
+
ret = this.parent.utf8Write(string, this.offset + offset, length);
|
920
|
+
break;
|
921
|
+
|
922
|
+
case 'ascii':
|
923
|
+
ret = this.parent.asciiWrite(string, this.offset + offset, length);
|
924
|
+
break;
|
925
|
+
|
926
|
+
case 'binary':
|
927
|
+
ret = this.parent.binaryWrite(string, this.offset + offset, length);
|
928
|
+
break;
|
929
|
+
|
930
|
+
case 'base64':
|
931
|
+
// Warning: maxLength not taken into account in base64Write
|
932
|
+
ret = this.parent.base64Write(string, this.offset + offset, length);
|
933
|
+
break;
|
934
|
+
|
935
|
+
case 'ucs2':
|
936
|
+
case 'ucs-2':
|
937
|
+
ret = this.parent.ucs2Write(string, this.offset + offset, length);
|
938
|
+
break;
|
939
|
+
|
940
|
+
default:
|
941
|
+
throw new Error('Unknown encoding');
|
942
|
+
}
|
943
|
+
|
944
|
+
Buffer._charsWritten = SlowBuffer._charsWritten;
|
945
|
+
|
946
|
+
return ret;
|
947
|
+
};
|
948
|
+
|
949
|
+
|
950
|
+
// toString(encoding, start=0, end=buffer.length)
|
951
|
+
Buffer.prototype.toString = function(encoding, start, end) {
|
952
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
953
|
+
|
954
|
+
if (typeof start == 'undefined' || start < 0) {
|
955
|
+
start = 0;
|
956
|
+
} else if (start > this.length) {
|
957
|
+
start = this.length;
|
958
|
+
}
|
959
|
+
|
960
|
+
if (typeof end == 'undefined' || end > this.length) {
|
961
|
+
end = this.length;
|
962
|
+
} else if (end < 0) {
|
963
|
+
end = 0;
|
964
|
+
}
|
965
|
+
|
966
|
+
start = start + this.offset;
|
967
|
+
end = end + this.offset;
|
968
|
+
|
969
|
+
switch (encoding) {
|
970
|
+
case 'hex':
|
971
|
+
return this.parent.hexSlice(start, end);
|
972
|
+
|
973
|
+
case 'utf8':
|
974
|
+
case 'utf-8':
|
975
|
+
return this.parent.utf8Slice(start, end);
|
976
|
+
|
977
|
+
case 'ascii':
|
978
|
+
return this.parent.asciiSlice(start, end);
|
979
|
+
|
980
|
+
case 'binary':
|
981
|
+
return this.parent.binarySlice(start, end);
|
982
|
+
|
983
|
+
case 'base64':
|
984
|
+
return this.parent.base64Slice(start, end);
|
985
|
+
|
986
|
+
case 'ucs2':
|
987
|
+
case 'ucs-2':
|
988
|
+
return this.parent.ucs2Slice(start, end);
|
989
|
+
|
990
|
+
default:
|
991
|
+
throw new Error('Unknown encoding');
|
992
|
+
}
|
993
|
+
};
|
994
|
+
|
995
|
+
|
996
|
+
// byteLength
|
997
|
+
Buffer.byteLength = SlowBuffer.byteLength;
|
998
|
+
|
999
|
+
|
1000
|
+
// fill(value, start=0, end=buffer.length)
|
1001
|
+
Buffer.prototype.fill = function fill(value, start, end) {
|
1002
|
+
value || (value = 0);
|
1003
|
+
start || (start = 0);
|
1004
|
+
end || (end = this.length);
|
1005
|
+
|
1006
|
+
if (typeof value === 'string') {
|
1007
|
+
value = value.charCodeAt(0);
|
1008
|
+
}
|
1009
|
+
if (!(typeof value === 'number') || isNaN(value)) {
|
1010
|
+
throw new Error('value is not a number');
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
if (end < start) throw new Error('end < start');
|
1014
|
+
|
1015
|
+
// Fill 0 bytes; we're done
|
1016
|
+
if (end === start) return 0;
|
1017
|
+
if (this.length == 0) return 0;
|
1018
|
+
|
1019
|
+
if (start < 0 || start >= this.length) {
|
1020
|
+
throw new Error('start out of bounds');
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
if (end < 0 || end > this.length) {
|
1024
|
+
throw new Error('end out of bounds');
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
return this.parent.fill(value,
|
1028
|
+
start + this.offset,
|
1029
|
+
end + this.offset);
|
1030
|
+
};
|
1031
|
+
|
1032
|
+
|
1033
|
+
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
1034
|
+
Buffer.prototype.copy = function(target, target_start, start, end) {
|
1035
|
+
var source = this;
|
1036
|
+
start || (start = 0);
|
1037
|
+
end || (end = this.length);
|
1038
|
+
target_start || (target_start = 0);
|
1039
|
+
|
1040
|
+
if (end < start) throw new Error('sourceEnd < sourceStart');
|
1041
|
+
|
1042
|
+
// Copy 0 bytes; we're done
|
1043
|
+
if (end === start) return 0;
|
1044
|
+
if (target.length == 0 || source.length == 0) return 0;
|
1045
|
+
|
1046
|
+
if (target_start < 0 || target_start >= target.length) {
|
1047
|
+
throw new Error('targetStart out of bounds');
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
if (start < 0 || start >= source.length) {
|
1051
|
+
throw new Error('sourceStart out of bounds');
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
if (end < 0 || end > source.length) {
|
1055
|
+
throw new Error('sourceEnd out of bounds');
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
// Are we oob?
|
1059
|
+
if (end > this.length) {
|
1060
|
+
end = this.length;
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
if (target.length - target_start < end - start) {
|
1064
|
+
end = target.length - target_start + start;
|
1065
|
+
}
|
1066
|
+
|
1067
|
+
return this.parent.copy(target.parent,
|
1068
|
+
target_start + target.offset,
|
1069
|
+
start + this.offset,
|
1070
|
+
end + this.offset);
|
1071
|
+
};
|
1072
|
+
|
1073
|
+
|
1074
|
+
// slice(start, end)
|
1075
|
+
Buffer.prototype.slice = function(start, end) {
|
1076
|
+
if (end === undefined) end = this.length;
|
1077
|
+
if (end > this.length) throw new Error('oob');
|
1078
|
+
if (start > end) throw new Error('oob');
|
1079
|
+
|
1080
|
+
return new Buffer(this.parent, end - start, +start + this.offset);
|
1081
|
+
};
|
1082
|
+
|
1083
|
+
|
1084
|
+
// Legacy methods for backwards compatibility.
|
1085
|
+
|
1086
|
+
Buffer.prototype.utf8Slice = function(start, end) {
|
1087
|
+
return this.toString('utf8', start, end);
|
1088
|
+
};
|
1089
|
+
|
1090
|
+
Buffer.prototype.binarySlice = function(start, end) {
|
1091
|
+
return this.toString('binary', start, end);
|
1092
|
+
};
|
1093
|
+
|
1094
|
+
Buffer.prototype.asciiSlice = function(start, end) {
|
1095
|
+
return this.toString('ascii', start, end);
|
1096
|
+
};
|
1097
|
+
|
1098
|
+
Buffer.prototype.utf8Write = function(string, offset) {
|
1099
|
+
return this.write(string, offset, 'utf8');
|
1100
|
+
};
|
1101
|
+
|
1102
|
+
Buffer.prototype.binaryWrite = function(string, offset) {
|
1103
|
+
return this.write(string, offset, 'binary');
|
1104
|
+
};
|
1105
|
+
|
1106
|
+
Buffer.prototype.asciiWrite = function(string, offset) {
|
1107
|
+
return this.write(string, offset, 'ascii');
|
1108
|
+
};
|
1109
|
+
|
1110
|
+
Buffer.prototype.readUInt8 = function(offset, noAssert) {
|
1111
|
+
var buffer = this;
|
1112
|
+
|
1113
|
+
if (!noAssert) {
|
1114
|
+
assert.ok(offset !== undefined && offset !== null,
|
1115
|
+
'missing offset');
|
1116
|
+
|
1117
|
+
assert.ok(offset < buffer.length,
|
1118
|
+
'Trying to read beyond buffer length');
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
if (offset >= buffer.length) return;
|
1122
|
+
|
1123
|
+
return buffer.parent[buffer.offset + offset];
|
1124
|
+
};
|
1125
|
+
|
1126
|
+
function readUInt16(buffer, offset, isBigEndian, noAssert) {
|
1127
|
+
var val = 0;
|
1128
|
+
|
1129
|
+
|
1130
|
+
if (!noAssert) {
|
1131
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1132
|
+
'missing or invalid endian');
|
1133
|
+
|
1134
|
+
assert.ok(offset !== undefined && offset !== null,
|
1135
|
+
'missing offset');
|
1136
|
+
|
1137
|
+
assert.ok(offset + 1 < buffer.length,
|
1138
|
+
'Trying to read beyond buffer length');
|
1139
|
+
}
|
1140
|
+
|
1141
|
+
if (offset >= buffer.length) return 0;
|
1142
|
+
|
1143
|
+
if (isBigEndian) {
|
1144
|
+
val = buffer.parent[buffer.offset + offset] << 8;
|
1145
|
+
if (offset + 1 < buffer.length) {
|
1146
|
+
val |= buffer.parent[buffer.offset + offset + 1];
|
1147
|
+
}
|
1148
|
+
} else {
|
1149
|
+
val = buffer.parent[buffer.offset + offset];
|
1150
|
+
if (offset + 1 < buffer.length) {
|
1151
|
+
val |= buffer.parent[buffer.offset + offset + 1] << 8;
|
1152
|
+
}
|
1153
|
+
}
|
1154
|
+
|
1155
|
+
return val;
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
Buffer.prototype.readUInt16LE = function(offset, noAssert) {
|
1159
|
+
return readUInt16(this, offset, false, noAssert);
|
1160
|
+
};
|
1161
|
+
|
1162
|
+
Buffer.prototype.readUInt16BE = function(offset, noAssert) {
|
1163
|
+
return readUInt16(this, offset, true, noAssert);
|
1164
|
+
};
|
1165
|
+
|
1166
|
+
function readUInt32(buffer, offset, isBigEndian, noAssert) {
|
1167
|
+
var val = 0;
|
1168
|
+
|
1169
|
+
if (!noAssert) {
|
1170
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1171
|
+
'missing or invalid endian');
|
1172
|
+
|
1173
|
+
assert.ok(offset !== undefined && offset !== null,
|
1174
|
+
'missing offset');
|
1175
|
+
|
1176
|
+
assert.ok(offset + 3 < buffer.length,
|
1177
|
+
'Trying to read beyond buffer length');
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
if (offset >= buffer.length) return 0;
|
1181
|
+
|
1182
|
+
if (isBigEndian) {
|
1183
|
+
if (offset + 1 < buffer.length)
|
1184
|
+
val = buffer.parent[buffer.offset + offset + 1] << 16;
|
1185
|
+
if (offset + 2 < buffer.length)
|
1186
|
+
val |= buffer.parent[buffer.offset + offset + 2] << 8;
|
1187
|
+
if (offset + 3 < buffer.length)
|
1188
|
+
val |= buffer.parent[buffer.offset + offset + 3];
|
1189
|
+
val = val + (buffer.parent[buffer.offset + offset] << 24 >>> 0);
|
1190
|
+
} else {
|
1191
|
+
if (offset + 2 < buffer.length)
|
1192
|
+
val = buffer.parent[buffer.offset + offset + 2] << 16;
|
1193
|
+
if (offset + 1 < buffer.length)
|
1194
|
+
val |= buffer.parent[buffer.offset + offset + 1] << 8;
|
1195
|
+
val |= buffer.parent[buffer.offset + offset];
|
1196
|
+
if (offset + 3 < buffer.length)
|
1197
|
+
val = val + (buffer.parent[buffer.offset + offset + 3] << 24 >>> 0);
|
1198
|
+
}
|
1199
|
+
|
1200
|
+
return val;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
Buffer.prototype.readUInt32LE = function(offset, noAssert) {
|
1204
|
+
return readUInt32(this, offset, false, noAssert);
|
1205
|
+
};
|
1206
|
+
|
1207
|
+
Buffer.prototype.readUInt32BE = function(offset, noAssert) {
|
1208
|
+
return readUInt32(this, offset, true, noAssert);
|
1209
|
+
};
|
1210
|
+
|
1211
|
+
|
1212
|
+
/*
|
1213
|
+
* Signed integer types, yay team! A reminder on how two's complement actually
|
1214
|
+
* works. The first bit is the signed bit, i.e. tells us whether or not the
|
1215
|
+
* number should be positive or negative. If the two's complement value is
|
1216
|
+
* positive, then we're done, as it's equivalent to the unsigned representation.
|
1217
|
+
*
|
1218
|
+
* Now if the number is positive, you're pretty much done, you can just leverage
|
1219
|
+
* the unsigned translations and return those. Unfortunately, negative numbers
|
1220
|
+
* aren't quite that straightforward.
|
1221
|
+
*
|
1222
|
+
* At first glance, one might be inclined to use the traditional formula to
|
1223
|
+
* translate binary numbers between the positive and negative values in two's
|
1224
|
+
* complement. (Though it doesn't quite work for the most negative value)
|
1225
|
+
* Mainly:
|
1226
|
+
* - invert all the bits
|
1227
|
+
* - add one to the result
|
1228
|
+
*
|
1229
|
+
* Of course, this doesn't quite work in Javascript. Take for example the value
|
1230
|
+
* of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of
|
1231
|
+
* course, Javascript will do the following:
|
1232
|
+
*
|
1233
|
+
* > ~0xff80
|
1234
|
+
* -65409
|
1235
|
+
*
|
1236
|
+
* Whoh there, Javascript, that's not quite right. But wait, according to
|
1237
|
+
* Javascript that's perfectly correct. When Javascript ends up seeing the
|
1238
|
+
* constant 0xff80, it has no notion that it is actually a signed number. It
|
1239
|
+
* assumes that we've input the unsigned value 0xff80. Thus, when it does the
|
1240
|
+
* binary negation, it casts it into a signed value, (positive 0xff80). Then
|
1241
|
+
* when you perform binary negation on that, it turns it into a negative number.
|
1242
|
+
*
|
1243
|
+
* Instead, we're going to have to use the following general formula, that works
|
1244
|
+
* in a rather Javascript friendly way. I'm glad we don't support this kind of
|
1245
|
+
* weird numbering scheme in the kernel.
|
1246
|
+
*
|
1247
|
+
* (BIT-MAX - (unsigned)val + 1) * -1
|
1248
|
+
*
|
1249
|
+
* The astute observer, may think that this doesn't make sense for 8-bit numbers
|
1250
|
+
* (really it isn't necessary for them). However, when you get 16-bit numbers,
|
1251
|
+
* you do. Let's go back to our prior example and see how this will look:
|
1252
|
+
*
|
1253
|
+
* (0xffff - 0xff80 + 1) * -1
|
1254
|
+
* (0x007f + 1) * -1
|
1255
|
+
* (0x0080) * -1
|
1256
|
+
*/
|
1257
|
+
Buffer.prototype.readInt8 = function(offset, noAssert) {
|
1258
|
+
var buffer = this;
|
1259
|
+
var neg;
|
1260
|
+
|
1261
|
+
if (!noAssert) {
|
1262
|
+
assert.ok(offset !== undefined && offset !== null,
|
1263
|
+
'missing offset');
|
1264
|
+
|
1265
|
+
assert.ok(offset < buffer.length,
|
1266
|
+
'Trying to read beyond buffer length');
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
if (offset >= buffer.length) return;
|
1270
|
+
|
1271
|
+
neg = buffer.parent[buffer.offset + offset] & 0x80;
|
1272
|
+
if (!neg) {
|
1273
|
+
return (buffer.parent[buffer.offset + offset]);
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
return ((0xff - buffer.parent[buffer.offset + offset] + 1) * -1);
|
1277
|
+
};
|
1278
|
+
|
1279
|
+
function readInt16(buffer, offset, isBigEndian, noAssert) {
|
1280
|
+
var neg, val;
|
1281
|
+
|
1282
|
+
if (!noAssert) {
|
1283
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1284
|
+
'missing or invalid endian');
|
1285
|
+
|
1286
|
+
assert.ok(offset !== undefined && offset !== null,
|
1287
|
+
'missing offset');
|
1288
|
+
|
1289
|
+
assert.ok(offset + 1 < buffer.length,
|
1290
|
+
'Trying to read beyond buffer length');
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
val = readUInt16(buffer, offset, isBigEndian, noAssert);
|
1294
|
+
neg = val & 0x8000;
|
1295
|
+
if (!neg) {
|
1296
|
+
return val;
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
return (0xffff - val + 1) * -1;
|
1300
|
+
}
|
1301
|
+
|
1302
|
+
Buffer.prototype.readInt16LE = function(offset, noAssert) {
|
1303
|
+
return readInt16(this, offset, false, noAssert);
|
1304
|
+
};
|
1305
|
+
|
1306
|
+
Buffer.prototype.readInt16BE = function(offset, noAssert) {
|
1307
|
+
return readInt16(this, offset, true, noAssert);
|
1308
|
+
};
|
1309
|
+
|
1310
|
+
function readInt32(buffer, offset, isBigEndian, noAssert) {
|
1311
|
+
var neg, val;
|
1312
|
+
|
1313
|
+
if (!noAssert) {
|
1314
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1315
|
+
'missing or invalid endian');
|
1316
|
+
|
1317
|
+
assert.ok(offset !== undefined && offset !== null,
|
1318
|
+
'missing offset');
|
1319
|
+
|
1320
|
+
assert.ok(offset + 3 < buffer.length,
|
1321
|
+
'Trying to read beyond buffer length');
|
1322
|
+
}
|
1323
|
+
|
1324
|
+
val = readUInt32(buffer, offset, isBigEndian, noAssert);
|
1325
|
+
neg = val & 0x80000000;
|
1326
|
+
if (!neg) {
|
1327
|
+
return (val);
|
1328
|
+
}
|
1329
|
+
|
1330
|
+
return (0xffffffff - val + 1) * -1;
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
Buffer.prototype.readInt32LE = function(offset, noAssert) {
|
1334
|
+
return readInt32(this, offset, false, noAssert);
|
1335
|
+
};
|
1336
|
+
|
1337
|
+
Buffer.prototype.readInt32BE = function(offset, noAssert) {
|
1338
|
+
return readInt32(this, offset, true, noAssert);
|
1339
|
+
};
|
1340
|
+
|
1341
|
+
function readFloat(buffer, offset, isBigEndian, noAssert) {
|
1342
|
+
if (!noAssert) {
|
1343
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1344
|
+
'missing or invalid endian');
|
1345
|
+
|
1346
|
+
assert.ok(offset + 3 < buffer.length,
|
1347
|
+
'Trying to read beyond buffer length');
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
1351
|
+
23, 4);
|
1352
|
+
}
|
1353
|
+
|
1354
|
+
Buffer.prototype.readFloatLE = function(offset, noAssert) {
|
1355
|
+
return readFloat(this, offset, false, noAssert);
|
1356
|
+
};
|
1357
|
+
|
1358
|
+
Buffer.prototype.readFloatBE = function(offset, noAssert) {
|
1359
|
+
return readFloat(this, offset, true, noAssert);
|
1360
|
+
};
|
1361
|
+
|
1362
|
+
function readDouble(buffer, offset, isBigEndian, noAssert) {
|
1363
|
+
if (!noAssert) {
|
1364
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1365
|
+
'missing or invalid endian');
|
1366
|
+
|
1367
|
+
assert.ok(offset + 7 < buffer.length,
|
1368
|
+
'Trying to read beyond buffer length');
|
1369
|
+
}
|
1370
|
+
|
1371
|
+
return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
1372
|
+
52, 8);
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
Buffer.prototype.readDoubleLE = function(offset, noAssert) {
|
1376
|
+
return readDouble(this, offset, false, noAssert);
|
1377
|
+
};
|
1378
|
+
|
1379
|
+
Buffer.prototype.readDoubleBE = function(offset, noAssert) {
|
1380
|
+
return readDouble(this, offset, true, noAssert);
|
1381
|
+
};
|
1382
|
+
|
1383
|
+
|
1384
|
+
/*
|
1385
|
+
* We have to make sure that the value is a valid integer. This means that it is
|
1386
|
+
* non-negative. It has no fractional component and that it does not exceed the
|
1387
|
+
* maximum allowed value.
|
1388
|
+
*
|
1389
|
+
* value The number to check for validity
|
1390
|
+
*
|
1391
|
+
* max The maximum value
|
1392
|
+
*/
|
1393
|
+
function verifuint(value, max) {
|
1394
|
+
assert.ok(typeof (value) == 'number',
|
1395
|
+
'cannot write a non-number as a number');
|
1396
|
+
|
1397
|
+
assert.ok(value >= 0,
|
1398
|
+
'specified a negative value for writing an unsigned value');
|
1399
|
+
|
1400
|
+
assert.ok(value <= max, 'value is larger than maximum value for type');
|
1401
|
+
|
1402
|
+
assert.ok(Math.floor(value) === value, 'value has a fractional component');
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
|
1406
|
+
var buffer = this;
|
1407
|
+
|
1408
|
+
if (!noAssert) {
|
1409
|
+
assert.ok(value !== undefined && value !== null,
|
1410
|
+
'missing value');
|
1411
|
+
|
1412
|
+
assert.ok(offset !== undefined && offset !== null,
|
1413
|
+
'missing offset');
|
1414
|
+
|
1415
|
+
assert.ok(offset < buffer.length,
|
1416
|
+
'trying to write beyond buffer length');
|
1417
|
+
|
1418
|
+
verifuint(value, 0xff);
|
1419
|
+
}
|
1420
|
+
|
1421
|
+
if (offset < buffer.length) {
|
1422
|
+
buffer.parent[buffer.offset + offset] = value;
|
1423
|
+
}
|
1424
|
+
};
|
1425
|
+
|
1426
|
+
function writeUInt16(buffer, value, offset, isBigEndian, noAssert) {
|
1427
|
+
if (!noAssert) {
|
1428
|
+
assert.ok(value !== undefined && value !== null,
|
1429
|
+
'missing value');
|
1430
|
+
|
1431
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1432
|
+
'missing or invalid endian');
|
1433
|
+
|
1434
|
+
assert.ok(offset !== undefined && offset !== null,
|
1435
|
+
'missing offset');
|
1436
|
+
|
1437
|
+
assert.ok(offset + 1 < buffer.length,
|
1438
|
+
'trying to write beyond buffer length');
|
1439
|
+
|
1440
|
+
verifuint(value, 0xffff);
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
for (var i = 0; i < Math.min(buffer.length - offset, 2); i++) {
|
1444
|
+
buffer.parent[buffer.offset + offset + i] =
|
1445
|
+
(value & (0xff << (8 * (isBigEndian ? 1 - i : i)))) >>>
|
1446
|
+
(isBigEndian ? 1 - i : i) * 8;
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
}
|
1450
|
+
|
1451
|
+
Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
|
1452
|
+
writeUInt16(this, value, offset, false, noAssert);
|
1453
|
+
};
|
1454
|
+
|
1455
|
+
Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
|
1456
|
+
writeUInt16(this, value, offset, true, noAssert);
|
1457
|
+
};
|
1458
|
+
|
1459
|
+
function writeUInt32(buffer, value, offset, isBigEndian, noAssert) {
|
1460
|
+
if (!noAssert) {
|
1461
|
+
assert.ok(value !== undefined && value !== null,
|
1462
|
+
'missing value');
|
1463
|
+
|
1464
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1465
|
+
'missing or invalid endian');
|
1466
|
+
|
1467
|
+
assert.ok(offset !== undefined && offset !== null,
|
1468
|
+
'missing offset');
|
1469
|
+
|
1470
|
+
assert.ok(offset + 3 < buffer.length,
|
1471
|
+
'trying to write beyond buffer length');
|
1472
|
+
|
1473
|
+
verifuint(value, 0xffffffff);
|
1474
|
+
}
|
1475
|
+
|
1476
|
+
for (var i = 0; i < Math.min(buffer.length - offset, 4); i++) {
|
1477
|
+
buffer.parent[buffer.offset + offset + i] =
|
1478
|
+
(value >>> (isBigEndian ? 3 - i : i) * 8) & 0xff;
|
1479
|
+
}
|
1480
|
+
}
|
1481
|
+
|
1482
|
+
Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
|
1483
|
+
writeUInt32(this, value, offset, false, noAssert);
|
1484
|
+
};
|
1485
|
+
|
1486
|
+
Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
|
1487
|
+
writeUInt32(this, value, offset, true, noAssert);
|
1488
|
+
};
|
1489
|
+
|
1490
|
+
|
1491
|
+
/*
|
1492
|
+
* We now move onto our friends in the signed number category. Unlike unsigned
|
1493
|
+
* numbers, we're going to have to worry a bit more about how we put values into
|
1494
|
+
* arrays. Since we are only worrying about signed 32-bit values, we're in
|
1495
|
+
* slightly better shape. Unfortunately, we really can't do our favorite binary
|
1496
|
+
* & in this system. It really seems to do the wrong thing. For example:
|
1497
|
+
*
|
1498
|
+
* > -32 & 0xff
|
1499
|
+
* 224
|
1500
|
+
*
|
1501
|
+
* What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of
|
1502
|
+
* this aren't treated as a signed number. Ultimately a bad thing.
|
1503
|
+
*
|
1504
|
+
* What we're going to want to do is basically create the unsigned equivalent of
|
1505
|
+
* our representation and pass that off to the wuint* functions. To do that
|
1506
|
+
* we're going to do the following:
|
1507
|
+
*
|
1508
|
+
* - if the value is positive
|
1509
|
+
* we can pass it directly off to the equivalent wuint
|
1510
|
+
* - if the value is negative
|
1511
|
+
* we do the following computation:
|
1512
|
+
* mb + val + 1, where
|
1513
|
+
* mb is the maximum unsigned value in that byte size
|
1514
|
+
* val is the Javascript negative integer
|
1515
|
+
*
|
1516
|
+
*
|
1517
|
+
* As a concrete value, take -128. In signed 16 bits this would be 0xff80. If
|
1518
|
+
* you do out the computations:
|
1519
|
+
*
|
1520
|
+
* 0xffff - 128 + 1
|
1521
|
+
* 0xffff - 127
|
1522
|
+
* 0xff80
|
1523
|
+
*
|
1524
|
+
* You can then encode this value as the signed version. This is really rather
|
1525
|
+
* hacky, but it should work and get the job done which is our goal here.
|
1526
|
+
*/
|
1527
|
+
|
1528
|
+
/*
|
1529
|
+
* A series of checks to make sure we actually have a signed 32-bit number
|
1530
|
+
*/
|
1531
|
+
function verifsint(value, max, min) {
|
1532
|
+
assert.ok(typeof (value) == 'number',
|
1533
|
+
'cannot write a non-number as a number');
|
1534
|
+
|
1535
|
+
assert.ok(value <= max, 'value larger than maximum allowed value');
|
1536
|
+
|
1537
|
+
assert.ok(value >= min, 'value smaller than minimum allowed value');
|
1538
|
+
|
1539
|
+
assert.ok(Math.floor(value) === value, 'value has a fractional component');
|
1540
|
+
}
|
1541
|
+
|
1542
|
+
function verifIEEE754(value, max, min) {
|
1543
|
+
assert.ok(typeof (value) == 'number',
|
1544
|
+
'cannot write a non-number as a number');
|
1545
|
+
|
1546
|
+
assert.ok(value <= max, 'value larger than maximum allowed value');
|
1547
|
+
|
1548
|
+
assert.ok(value >= min, 'value smaller than minimum allowed value');
|
1549
|
+
}
|
1550
|
+
|
1551
|
+
Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
|
1552
|
+
var buffer = this;
|
1553
|
+
|
1554
|
+
if (!noAssert) {
|
1555
|
+
assert.ok(value !== undefined && value !== null,
|
1556
|
+
'missing value');
|
1557
|
+
|
1558
|
+
assert.ok(offset !== undefined && offset !== null,
|
1559
|
+
'missing offset');
|
1560
|
+
|
1561
|
+
assert.ok(offset < buffer.length,
|
1562
|
+
'Trying to write beyond buffer length');
|
1563
|
+
|
1564
|
+
verifsint(value, 0x7f, -0x80);
|
1565
|
+
}
|
1566
|
+
|
1567
|
+
if (value >= 0) {
|
1568
|
+
buffer.writeUInt8(value, offset, noAssert);
|
1569
|
+
} else {
|
1570
|
+
buffer.writeUInt8(0xff + value + 1, offset, noAssert);
|
1571
|
+
}
|
1572
|
+
};
|
1573
|
+
|
1574
|
+
function writeInt16(buffer, value, offset, isBigEndian, noAssert) {
|
1575
|
+
if (!noAssert) {
|
1576
|
+
assert.ok(value !== undefined && value !== null,
|
1577
|
+
'missing value');
|
1578
|
+
|
1579
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1580
|
+
'missing or invalid endian');
|
1581
|
+
|
1582
|
+
assert.ok(offset !== undefined && offset !== null,
|
1583
|
+
'missing offset');
|
1584
|
+
|
1585
|
+
assert.ok(offset + 1 < buffer.length,
|
1586
|
+
'Trying to write beyond buffer length');
|
1587
|
+
|
1588
|
+
verifsint(value, 0x7fff, -0x8000);
|
1589
|
+
}
|
1590
|
+
|
1591
|
+
if (value >= 0) {
|
1592
|
+
writeUInt16(buffer, value, offset, isBigEndian, noAssert);
|
1593
|
+
} else {
|
1594
|
+
writeUInt16(buffer, 0xffff + value + 1, offset, isBigEndian, noAssert);
|
1595
|
+
}
|
1596
|
+
}
|
1597
|
+
|
1598
|
+
Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
|
1599
|
+
writeInt16(this, value, offset, false, noAssert);
|
1600
|
+
};
|
1601
|
+
|
1602
|
+
Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
|
1603
|
+
writeInt16(this, value, offset, true, noAssert);
|
1604
|
+
};
|
1605
|
+
|
1606
|
+
function writeInt32(buffer, value, offset, isBigEndian, noAssert) {
|
1607
|
+
if (!noAssert) {
|
1608
|
+
assert.ok(value !== undefined && value !== null,
|
1609
|
+
'missing value');
|
1610
|
+
|
1611
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1612
|
+
'missing or invalid endian');
|
1613
|
+
|
1614
|
+
assert.ok(offset !== undefined && offset !== null,
|
1615
|
+
'missing offset');
|
1616
|
+
|
1617
|
+
assert.ok(offset + 3 < buffer.length,
|
1618
|
+
'Trying to write beyond buffer length');
|
1619
|
+
|
1620
|
+
verifsint(value, 0x7fffffff, -0x80000000);
|
1621
|
+
}
|
1622
|
+
|
1623
|
+
if (value >= 0) {
|
1624
|
+
writeUInt32(buffer, value, offset, isBigEndian, noAssert);
|
1625
|
+
} else {
|
1626
|
+
writeUInt32(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert);
|
1627
|
+
}
|
1628
|
+
}
|
1629
|
+
|
1630
|
+
Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
|
1631
|
+
writeInt32(this, value, offset, false, noAssert);
|
1632
|
+
};
|
1633
|
+
|
1634
|
+
Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
|
1635
|
+
writeInt32(this, value, offset, true, noAssert);
|
1636
|
+
};
|
1637
|
+
|
1638
|
+
function writeFloat(buffer, value, offset, isBigEndian, noAssert) {
|
1639
|
+
if (!noAssert) {
|
1640
|
+
assert.ok(value !== undefined && value !== null,
|
1641
|
+
'missing value');
|
1642
|
+
|
1643
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1644
|
+
'missing or invalid endian');
|
1645
|
+
|
1646
|
+
assert.ok(offset !== undefined && offset !== null,
|
1647
|
+
'missing offset');
|
1648
|
+
|
1649
|
+
assert.ok(offset + 3 < buffer.length,
|
1650
|
+
'Trying to write beyond buffer length');
|
1651
|
+
|
1652
|
+
verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38);
|
1653
|
+
}
|
1654
|
+
|
1655
|
+
require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
1656
|
+
23, 4);
|
1657
|
+
}
|
1658
|
+
|
1659
|
+
Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
|
1660
|
+
writeFloat(this, value, offset, false, noAssert);
|
1661
|
+
};
|
1662
|
+
|
1663
|
+
Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
|
1664
|
+
writeFloat(this, value, offset, true, noAssert);
|
1665
|
+
};
|
1666
|
+
|
1667
|
+
function writeDouble(buffer, value, offset, isBigEndian, noAssert) {
|
1668
|
+
if (!noAssert) {
|
1669
|
+
assert.ok(value !== undefined && value !== null,
|
1670
|
+
'missing value');
|
1671
|
+
|
1672
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
1673
|
+
'missing or invalid endian');
|
1674
|
+
|
1675
|
+
assert.ok(offset !== undefined && offset !== null,
|
1676
|
+
'missing offset');
|
1677
|
+
|
1678
|
+
assert.ok(offset + 7 < buffer.length,
|
1679
|
+
'Trying to write beyond buffer length');
|
1680
|
+
|
1681
|
+
verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308);
|
1682
|
+
}
|
1683
|
+
|
1684
|
+
require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
1685
|
+
52, 8);
|
1686
|
+
}
|
1687
|
+
|
1688
|
+
Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
|
1689
|
+
writeDouble(this, value, offset, false, noAssert);
|
1690
|
+
};
|
1691
|
+
|
1692
|
+
Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
|
1693
|
+
writeDouble(this, value, offset, true, noAssert);
|
1694
|
+
};
|
1695
|
+
|
1696
|
+
SlowBuffer.prototype.readUInt8 = Buffer.prototype.readUInt8;
|
1697
|
+
SlowBuffer.prototype.readUInt16LE = Buffer.prototype.readUInt16LE;
|
1698
|
+
SlowBuffer.prototype.readUInt16BE = Buffer.prototype.readUInt16BE;
|
1699
|
+
SlowBuffer.prototype.readUInt32LE = Buffer.prototype.readUInt32LE;
|
1700
|
+
SlowBuffer.prototype.readUInt32BE = Buffer.prototype.readUInt32BE;
|
1701
|
+
SlowBuffer.prototype.readInt8 = Buffer.prototype.readInt8;
|
1702
|
+
SlowBuffer.prototype.readInt16LE = Buffer.prototype.readInt16LE;
|
1703
|
+
SlowBuffer.prototype.readInt16BE = Buffer.prototype.readInt16BE;
|
1704
|
+
SlowBuffer.prototype.readInt32LE = Buffer.prototype.readInt32LE;
|
1705
|
+
SlowBuffer.prototype.readInt32BE = Buffer.prototype.readInt32BE;
|
1706
|
+
SlowBuffer.prototype.readFloatLE = Buffer.prototype.readFloatLE;
|
1707
|
+
SlowBuffer.prototype.readFloatBE = Buffer.prototype.readFloatBE;
|
1708
|
+
SlowBuffer.prototype.readDoubleLE = Buffer.prototype.readDoubleLE;
|
1709
|
+
SlowBuffer.prototype.readDoubleBE = Buffer.prototype.readDoubleBE;
|
1710
|
+
SlowBuffer.prototype.writeUInt8 = Buffer.prototype.writeUInt8;
|
1711
|
+
SlowBuffer.prototype.writeUInt16LE = Buffer.prototype.writeUInt16LE;
|
1712
|
+
SlowBuffer.prototype.writeUInt16BE = Buffer.prototype.writeUInt16BE;
|
1713
|
+
SlowBuffer.prototype.writeUInt32LE = Buffer.prototype.writeUInt32LE;
|
1714
|
+
SlowBuffer.prototype.writeUInt32BE = Buffer.prototype.writeUInt32BE;
|
1715
|
+
SlowBuffer.prototype.writeInt8 = Buffer.prototype.writeInt8;
|
1716
|
+
SlowBuffer.prototype.writeInt16LE = Buffer.prototype.writeInt16LE;
|
1717
|
+
SlowBuffer.prototype.writeInt16BE = Buffer.prototype.writeInt16BE;
|
1718
|
+
SlowBuffer.prototype.writeInt32LE = Buffer.prototype.writeInt32LE;
|
1719
|
+
SlowBuffer.prototype.writeInt32BE = Buffer.prototype.writeInt32BE;
|
1720
|
+
SlowBuffer.prototype.writeFloatLE = Buffer.prototype.writeFloatLE;
|
1721
|
+
SlowBuffer.prototype.writeFloatBE = Buffer.prototype.writeFloatBE;
|
1722
|
+
SlowBuffer.prototype.writeDoubleLE = Buffer.prototype.writeDoubleLE;
|
1723
|
+
SlowBuffer.prototype.writeDoubleBE = Buffer.prototype.writeDoubleBE;
|
1724
|
+
|
1725
|
+
})()
|
1726
|
+
},{"assert":2,"./buffer_ieee754":1,"base64-js":5}],3:[function(require,module,exports){
|
1727
|
+
var events = require('events');
|
1728
|
+
|
1729
|
+
exports.isArray = isArray;
|
1730
|
+
exports.isDate = function(obj){return Object.prototype.toString.call(obj) === '[object Date]'};
|
1731
|
+
exports.isRegExp = function(obj){return Object.prototype.toString.call(obj) === '[object RegExp]'};
|
1732
|
+
|
1733
|
+
|
1734
|
+
exports.print = function () {};
|
1735
|
+
exports.puts = function () {};
|
1736
|
+
exports.debug = function() {};
|
1737
|
+
|
1738
|
+
exports.inspect = function(obj, showHidden, depth, colors) {
|
1739
|
+
var seen = [];
|
1740
|
+
|
1741
|
+
var stylize = function(str, styleType) {
|
1742
|
+
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
1743
|
+
var styles =
|
1744
|
+
{ 'bold' : [1, 22],
|
1745
|
+
'italic' : [3, 23],
|
1746
|
+
'underline' : [4, 24],
|
1747
|
+
'inverse' : [7, 27],
|
1748
|
+
'white' : [37, 39],
|
1749
|
+
'grey' : [90, 39],
|
1750
|
+
'black' : [30, 39],
|
1751
|
+
'blue' : [34, 39],
|
1752
|
+
'cyan' : [36, 39],
|
1753
|
+
'green' : [32, 39],
|
1754
|
+
'magenta' : [35, 39],
|
1755
|
+
'red' : [31, 39],
|
1756
|
+
'yellow' : [33, 39] };
|
1757
|
+
|
1758
|
+
var style =
|
1759
|
+
{ 'special': 'cyan',
|
1760
|
+
'number': 'blue',
|
1761
|
+
'boolean': 'yellow',
|
1762
|
+
'undefined': 'grey',
|
1763
|
+
'null': 'bold',
|
1764
|
+
'string': 'green',
|
1765
|
+
'date': 'magenta',
|
1766
|
+
// "name": intentionally not styling
|
1767
|
+
'regexp': 'red' }[styleType];
|
1768
|
+
|
1769
|
+
if (style) {
|
1770
|
+
return '\033[' + styles[style][0] + 'm' + str +
|
1771
|
+
'\033[' + styles[style][1] + 'm';
|
1772
|
+
} else {
|
1773
|
+
return str;
|
1774
|
+
}
|
1775
|
+
};
|
1776
|
+
if (! colors) {
|
1777
|
+
stylize = function(str, styleType) { return str; };
|
1778
|
+
}
|
1779
|
+
|
1780
|
+
function format(value, recurseTimes) {
|
1781
|
+
// Provide a hook for user-specified inspect functions.
|
1782
|
+
// Check that value is an object with an inspect function on it
|
1783
|
+
if (value && typeof value.inspect === 'function' &&
|
1784
|
+
// Filter out the util module, it's inspect function is special
|
1785
|
+
value !== exports &&
|
1786
|
+
// Also filter out any prototype objects using the circular check.
|
1787
|
+
!(value.constructor && value.constructor.prototype === value)) {
|
1788
|
+
return value.inspect(recurseTimes);
|
1789
|
+
}
|
1790
|
+
|
1791
|
+
// Primitive types cannot have properties
|
1792
|
+
switch (typeof value) {
|
1793
|
+
case 'undefined':
|
1794
|
+
return stylize('undefined', 'undefined');
|
1795
|
+
|
1796
|
+
case 'string':
|
1797
|
+
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
1798
|
+
.replace(/'/g, "\\'")
|
1799
|
+
.replace(/\\"/g, '"') + '\'';
|
1800
|
+
return stylize(simple, 'string');
|
1801
|
+
|
1802
|
+
case 'number':
|
1803
|
+
return stylize('' + value, 'number');
|
1804
|
+
|
1805
|
+
case 'boolean':
|
1806
|
+
return stylize('' + value, 'boolean');
|
1807
|
+
}
|
1808
|
+
// For some reason typeof null is "object", so special case here.
|
1809
|
+
if (value === null) {
|
1810
|
+
return stylize('null', 'null');
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
// Look up the keys of the object.
|
1814
|
+
var visible_keys = Object_keys(value);
|
1815
|
+
var keys = showHidden ? Object_getOwnPropertyNames(value) : visible_keys;
|
1816
|
+
|
1817
|
+
// Functions without properties can be shortcutted.
|
1818
|
+
if (typeof value === 'function' && keys.length === 0) {
|
1819
|
+
if (isRegExp(value)) {
|
1820
|
+
return stylize('' + value, 'regexp');
|
1821
|
+
} else {
|
1822
|
+
var name = value.name ? ': ' + value.name : '';
|
1823
|
+
return stylize('[Function' + name + ']', 'special');
|
1824
|
+
}
|
1825
|
+
}
|
1826
|
+
|
1827
|
+
// Dates without properties can be shortcutted
|
1828
|
+
if (isDate(value) && keys.length === 0) {
|
1829
|
+
return stylize(value.toUTCString(), 'date');
|
1830
|
+
}
|
1831
|
+
|
1832
|
+
var base, type, braces;
|
1833
|
+
// Determine the object type
|
1834
|
+
if (isArray(value)) {
|
1835
|
+
type = 'Array';
|
1836
|
+
braces = ['[', ']'];
|
1837
|
+
} else {
|
1838
|
+
type = 'Object';
|
1839
|
+
braces = ['{', '}'];
|
1840
|
+
}
|
1841
|
+
|
1842
|
+
// Make functions say that they are functions
|
1843
|
+
if (typeof value === 'function') {
|
1844
|
+
var n = value.name ? ': ' + value.name : '';
|
1845
|
+
base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']';
|
1846
|
+
} else {
|
1847
|
+
base = '';
|
1848
|
+
}
|
1849
|
+
|
1850
|
+
// Make dates with properties first say the date
|
1851
|
+
if (isDate(value)) {
|
1852
|
+
base = ' ' + value.toUTCString();
|
1853
|
+
}
|
1854
|
+
|
1855
|
+
if (keys.length === 0) {
|
1856
|
+
return braces[0] + base + braces[1];
|
1857
|
+
}
|
1858
|
+
|
1859
|
+
if (recurseTimes < 0) {
|
1860
|
+
if (isRegExp(value)) {
|
1861
|
+
return stylize('' + value, 'regexp');
|
1862
|
+
} else {
|
1863
|
+
return stylize('[Object]', 'special');
|
1864
|
+
}
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
seen.push(value);
|
1868
|
+
|
1869
|
+
var output = keys.map(function(key) {
|
1870
|
+
var name, str;
|
1871
|
+
if (value.__lookupGetter__) {
|
1872
|
+
if (value.__lookupGetter__(key)) {
|
1873
|
+
if (value.__lookupSetter__(key)) {
|
1874
|
+
str = stylize('[Getter/Setter]', 'special');
|
1875
|
+
} else {
|
1876
|
+
str = stylize('[Getter]', 'special');
|
1877
|
+
}
|
1878
|
+
} else {
|
1879
|
+
if (value.__lookupSetter__(key)) {
|
1880
|
+
str = stylize('[Setter]', 'special');
|
1881
|
+
}
|
1882
|
+
}
|
1883
|
+
}
|
1884
|
+
if (visible_keys.indexOf(key) < 0) {
|
1885
|
+
name = '[' + key + ']';
|
1886
|
+
}
|
1887
|
+
if (!str) {
|
1888
|
+
if (seen.indexOf(value[key]) < 0) {
|
1889
|
+
if (recurseTimes === null) {
|
1890
|
+
str = format(value[key]);
|
1891
|
+
} else {
|
1892
|
+
str = format(value[key], recurseTimes - 1);
|
1893
|
+
}
|
1894
|
+
if (str.indexOf('\n') > -1) {
|
1895
|
+
if (isArray(value)) {
|
1896
|
+
str = str.split('\n').map(function(line) {
|
1897
|
+
return ' ' + line;
|
1898
|
+
}).join('\n').substr(2);
|
1899
|
+
} else {
|
1900
|
+
str = '\n' + str.split('\n').map(function(line) {
|
1901
|
+
return ' ' + line;
|
1902
|
+
}).join('\n');
|
1903
|
+
}
|
1904
|
+
}
|
1905
|
+
} else {
|
1906
|
+
str = stylize('[Circular]', 'special');
|
1907
|
+
}
|
1908
|
+
}
|
1909
|
+
if (typeof name === 'undefined') {
|
1910
|
+
if (type === 'Array' && key.match(/^\d+$/)) {
|
1911
|
+
return str;
|
1912
|
+
}
|
1913
|
+
name = JSON.stringify('' + key);
|
1914
|
+
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
1915
|
+
name = name.substr(1, name.length - 2);
|
1916
|
+
name = stylize(name, 'name');
|
1917
|
+
} else {
|
1918
|
+
name = name.replace(/'/g, "\\'")
|
1919
|
+
.replace(/\\"/g, '"')
|
1920
|
+
.replace(/(^"|"$)/g, "'");
|
1921
|
+
name = stylize(name, 'string');
|
1922
|
+
}
|
1923
|
+
}
|
1924
|
+
|
1925
|
+
return name + ': ' + str;
|
1926
|
+
});
|
1927
|
+
|
1928
|
+
seen.pop();
|
1929
|
+
|
1930
|
+
var numLinesEst = 0;
|
1931
|
+
var length = output.reduce(function(prev, cur) {
|
1932
|
+
numLinesEst++;
|
1933
|
+
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
1934
|
+
return prev + cur.length + 1;
|
1935
|
+
}, 0);
|
1936
|
+
|
1937
|
+
if (length > 50) {
|
1938
|
+
output = braces[0] +
|
1939
|
+
(base === '' ? '' : base + '\n ') +
|
1940
|
+
' ' +
|
1941
|
+
output.join(',\n ') +
|
1942
|
+
' ' +
|
1943
|
+
braces[1];
|
1944
|
+
|
1945
|
+
} else {
|
1946
|
+
output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
1947
|
+
}
|
1948
|
+
|
1949
|
+
return output;
|
1950
|
+
}
|
1951
|
+
return format(obj, (typeof depth === 'undefined' ? 2 : depth));
|
1952
|
+
};
|
1953
|
+
|
1954
|
+
|
1955
|
+
function isArray(ar) {
|
1956
|
+
return ar instanceof Array ||
|
1957
|
+
Array.isArray(ar) ||
|
1958
|
+
(ar && ar !== Object.prototype && isArray(ar.__proto__));
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
|
1962
|
+
function isRegExp(re) {
|
1963
|
+
return re instanceof RegExp ||
|
1964
|
+
(typeof re === 'object' && Object.prototype.toString.call(re) === '[object RegExp]');
|
1965
|
+
}
|
1966
|
+
|
1967
|
+
|
1968
|
+
function isDate(d) {
|
1969
|
+
if (d instanceof Date) return true;
|
1970
|
+
if (typeof d !== 'object') return false;
|
1971
|
+
var properties = Date.prototype && Object_getOwnPropertyNames(Date.prototype);
|
1972
|
+
var proto = d.__proto__ && Object_getOwnPropertyNames(d.__proto__);
|
1973
|
+
return JSON.stringify(proto) === JSON.stringify(properties);
|
1974
|
+
}
|
1975
|
+
|
1976
|
+
function pad(n) {
|
1977
|
+
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
1978
|
+
}
|
1979
|
+
|
1980
|
+
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
1981
|
+
'Oct', 'Nov', 'Dec'];
|
1982
|
+
|
1983
|
+
// 26 Feb 16:19:34
|
1984
|
+
function timestamp() {
|
1985
|
+
var d = new Date();
|
1986
|
+
var time = [pad(d.getHours()),
|
1987
|
+
pad(d.getMinutes()),
|
1988
|
+
pad(d.getSeconds())].join(':');
|
1989
|
+
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
1990
|
+
}
|
1991
|
+
|
1992
|
+
exports.log = function (msg) {};
|
1993
|
+
|
1994
|
+
exports.pump = null;
|
1995
|
+
|
1996
|
+
var Object_keys = Object.keys || function (obj) {
|
1997
|
+
var res = [];
|
1998
|
+
for (var key in obj) res.push(key);
|
1999
|
+
return res;
|
2000
|
+
};
|
2001
|
+
|
2002
|
+
var Object_getOwnPropertyNames = Object.getOwnPropertyNames || function (obj) {
|
2003
|
+
var res = [];
|
2004
|
+
for (var key in obj) {
|
2005
|
+
if (Object.hasOwnProperty.call(obj, key)) res.push(key);
|
2006
|
+
}
|
2007
|
+
return res;
|
2008
|
+
};
|
2009
|
+
|
2010
|
+
var Object_create = Object.create || function (prototype, properties) {
|
2011
|
+
// from es5-shim
|
2012
|
+
var object;
|
2013
|
+
if (prototype === null) {
|
2014
|
+
object = { '__proto__' : null };
|
2015
|
+
}
|
2016
|
+
else {
|
2017
|
+
if (typeof prototype !== 'object') {
|
2018
|
+
throw new TypeError(
|
2019
|
+
'typeof prototype[' + (typeof prototype) + '] != \'object\''
|
2020
|
+
);
|
2021
|
+
}
|
2022
|
+
var Type = function () {};
|
2023
|
+
Type.prototype = prototype;
|
2024
|
+
object = new Type();
|
2025
|
+
object.__proto__ = prototype;
|
2026
|
+
}
|
2027
|
+
if (typeof properties !== 'undefined' && Object.defineProperties) {
|
2028
|
+
Object.defineProperties(object, properties);
|
2029
|
+
}
|
2030
|
+
return object;
|
2031
|
+
};
|
2032
|
+
|
2033
|
+
exports.inherits = function(ctor, superCtor) {
|
2034
|
+
ctor.super_ = superCtor;
|
2035
|
+
ctor.prototype = Object_create(superCtor.prototype, {
|
2036
|
+
constructor: {
|
2037
|
+
value: ctor,
|
2038
|
+
enumerable: false,
|
2039
|
+
writable: true,
|
2040
|
+
configurable: true
|
2041
|
+
}
|
2042
|
+
});
|
2043
|
+
};
|
2044
|
+
|
2045
|
+
var formatRegExp = /%[sdj%]/g;
|
2046
|
+
exports.format = function(f) {
|
2047
|
+
if (typeof f !== 'string') {
|
2048
|
+
var objects = [];
|
2049
|
+
for (var i = 0; i < arguments.length; i++) {
|
2050
|
+
objects.push(exports.inspect(arguments[i]));
|
2051
|
+
}
|
2052
|
+
return objects.join(' ');
|
2053
|
+
}
|
2054
|
+
|
2055
|
+
var i = 1;
|
2056
|
+
var args = arguments;
|
2057
|
+
var len = args.length;
|
2058
|
+
var str = String(f).replace(formatRegExp, function(x) {
|
2059
|
+
if (x === '%%') return '%';
|
2060
|
+
if (i >= len) return x;
|
2061
|
+
switch (x) {
|
2062
|
+
case '%s': return String(args[i++]);
|
2063
|
+
case '%d': return Number(args[i++]);
|
2064
|
+
case '%j': return JSON.stringify(args[i++]);
|
2065
|
+
default:
|
2066
|
+
return x;
|
2067
|
+
}
|
2068
|
+
});
|
2069
|
+
for(var x = args[i]; i < len; x = args[++i]){
|
2070
|
+
if (x === null || typeof x !== 'object') {
|
2071
|
+
str += ' ' + x;
|
2072
|
+
} else {
|
2073
|
+
str += ' ' + exports.inspect(x);
|
2074
|
+
}
|
2075
|
+
}
|
2076
|
+
return str;
|
2077
|
+
};
|
2078
|
+
|
2079
|
+
},{"events":6}],5:[function(require,module,exports){
|
2080
|
+
(function (exports) {
|
2081
|
+
'use strict';
|
2082
|
+
|
2083
|
+
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
2084
|
+
|
2085
|
+
function b64ToByteArray(b64) {
|
2086
|
+
var i, j, l, tmp, placeHolders, arr;
|
2087
|
+
|
2088
|
+
if (b64.length % 4 > 0) {
|
2089
|
+
throw 'Invalid string. Length must be a multiple of 4';
|
2090
|
+
}
|
2091
|
+
|
2092
|
+
// the number of equal signs (place holders)
|
2093
|
+
// if there are two placeholders, than the two characters before it
|
2094
|
+
// represent one byte
|
2095
|
+
// if there is only one, then the three characters before it represent 2 bytes
|
2096
|
+
// this is just a cheap hack to not do indexOf twice
|
2097
|
+
placeHolders = b64.indexOf('=');
|
2098
|
+
placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0;
|
2099
|
+
|
2100
|
+
// base64 is 4/3 + up to two characters of the original data
|
2101
|
+
arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders);
|
2102
|
+
|
2103
|
+
// if there are placeholders, only get up to the last complete 4 chars
|
2104
|
+
l = placeHolders > 0 ? b64.length - 4 : b64.length;
|
2105
|
+
|
2106
|
+
for (i = 0, j = 0; i < l; i += 4, j += 3) {
|
2107
|
+
tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]);
|
2108
|
+
arr.push((tmp & 0xFF0000) >> 16);
|
2109
|
+
arr.push((tmp & 0xFF00) >> 8);
|
2110
|
+
arr.push(tmp & 0xFF);
|
2111
|
+
}
|
2112
|
+
|
2113
|
+
if (placeHolders === 2) {
|
2114
|
+
tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4);
|
2115
|
+
arr.push(tmp & 0xFF);
|
2116
|
+
} else if (placeHolders === 1) {
|
2117
|
+
tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2);
|
2118
|
+
arr.push((tmp >> 8) & 0xFF);
|
2119
|
+
arr.push(tmp & 0xFF);
|
2120
|
+
}
|
2121
|
+
|
2122
|
+
return arr;
|
2123
|
+
}
|
2124
|
+
|
2125
|
+
function uint8ToBase64(uint8) {
|
2126
|
+
var i,
|
2127
|
+
extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
|
2128
|
+
output = "",
|
2129
|
+
temp, length;
|
2130
|
+
|
2131
|
+
function tripletToBase64 (num) {
|
2132
|
+
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
|
2133
|
+
};
|
2134
|
+
|
2135
|
+
// go through the array every three bytes, we'll deal with trailing stuff later
|
2136
|
+
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
|
2137
|
+
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);
|
2138
|
+
output += tripletToBase64(temp);
|
2139
|
+
}
|
2140
|
+
|
2141
|
+
// pad the end with zeros, but make sure to not forget the extra bytes
|
2142
|
+
switch (extraBytes) {
|
2143
|
+
case 1:
|
2144
|
+
temp = uint8[uint8.length - 1];
|
2145
|
+
output += lookup[temp >> 2];
|
2146
|
+
output += lookup[(temp << 4) & 0x3F];
|
2147
|
+
output += '==';
|
2148
|
+
break;
|
2149
|
+
case 2:
|
2150
|
+
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]);
|
2151
|
+
output += lookup[temp >> 10];
|
2152
|
+
output += lookup[(temp >> 4) & 0x3F];
|
2153
|
+
output += lookup[(temp << 2) & 0x3F];
|
2154
|
+
output += '=';
|
2155
|
+
break;
|
2156
|
+
}
|
2157
|
+
|
2158
|
+
return output;
|
2159
|
+
}
|
2160
|
+
|
2161
|
+
module.exports.toByteArray = b64ToByteArray;
|
2162
|
+
module.exports.fromByteArray = uint8ToBase64;
|
2163
|
+
}());
|
2164
|
+
|
2165
|
+
},{}],7:[function(require,module,exports){
|
2166
|
+
exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) {
|
2167
|
+
var e, m,
|
2168
|
+
eLen = nBytes * 8 - mLen - 1,
|
2169
|
+
eMax = (1 << eLen) - 1,
|
2170
|
+
eBias = eMax >> 1,
|
2171
|
+
nBits = -7,
|
2172
|
+
i = isBE ? 0 : (nBytes - 1),
|
2173
|
+
d = isBE ? 1 : -1,
|
2174
|
+
s = buffer[offset + i];
|
2175
|
+
|
2176
|
+
i += d;
|
2177
|
+
|
2178
|
+
e = s & ((1 << (-nBits)) - 1);
|
2179
|
+
s >>= (-nBits);
|
2180
|
+
nBits += eLen;
|
2181
|
+
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
|
2182
|
+
|
2183
|
+
m = e & ((1 << (-nBits)) - 1);
|
2184
|
+
e >>= (-nBits);
|
2185
|
+
nBits += mLen;
|
2186
|
+
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
|
2187
|
+
|
2188
|
+
if (e === 0) {
|
2189
|
+
e = 1 - eBias;
|
2190
|
+
} else if (e === eMax) {
|
2191
|
+
return m ? NaN : ((s ? -1 : 1) * Infinity);
|
2192
|
+
} else {
|
2193
|
+
m = m + Math.pow(2, mLen);
|
2194
|
+
e = e - eBias;
|
2195
|
+
}
|
2196
|
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
2197
|
+
};
|
2198
|
+
|
2199
|
+
exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) {
|
2200
|
+
var e, m, c,
|
2201
|
+
eLen = nBytes * 8 - mLen - 1,
|
2202
|
+
eMax = (1 << eLen) - 1,
|
2203
|
+
eBias = eMax >> 1,
|
2204
|
+
rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
|
2205
|
+
i = isBE ? (nBytes - 1) : 0,
|
2206
|
+
d = isBE ? -1 : 1,
|
2207
|
+
s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
|
2208
|
+
|
2209
|
+
value = Math.abs(value);
|
2210
|
+
|
2211
|
+
if (isNaN(value) || value === Infinity) {
|
2212
|
+
m = isNaN(value) ? 1 : 0;
|
2213
|
+
e = eMax;
|
2214
|
+
} else {
|
2215
|
+
e = Math.floor(Math.log(value) / Math.LN2);
|
2216
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
2217
|
+
e--;
|
2218
|
+
c *= 2;
|
2219
|
+
}
|
2220
|
+
if (e + eBias >= 1) {
|
2221
|
+
value += rt / c;
|
2222
|
+
} else {
|
2223
|
+
value += rt * Math.pow(2, 1 - eBias);
|
2224
|
+
}
|
2225
|
+
if (value * c >= 2) {
|
2226
|
+
e++;
|
2227
|
+
c /= 2;
|
2228
|
+
}
|
2229
|
+
|
2230
|
+
if (e + eBias >= eMax) {
|
2231
|
+
m = 0;
|
2232
|
+
e = eMax;
|
2233
|
+
} else if (e + eBias >= 1) {
|
2234
|
+
m = (value * c - 1) * Math.pow(2, mLen);
|
2235
|
+
e = e + eBias;
|
2236
|
+
} else {
|
2237
|
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
2238
|
+
e = 0;
|
2239
|
+
}
|
2240
|
+
}
|
2241
|
+
|
2242
|
+
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
|
2243
|
+
|
2244
|
+
e = (e << mLen) | m;
|
2245
|
+
eLen += mLen;
|
2246
|
+
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
|
2247
|
+
|
2248
|
+
buffer[offset + i - d] |= s * 128;
|
2249
|
+
};
|
2250
|
+
|
2251
|
+
},{}],8:[function(require,module,exports){
|
2252
|
+
// shim for using process in browser
|
2253
|
+
|
2254
|
+
var process = module.exports = {};
|
2255
|
+
|
2256
|
+
process.nextTick = (function () {
|
2257
|
+
var canSetImmediate = typeof window !== 'undefined'
|
2258
|
+
&& window.setImmediate;
|
2259
|
+
var canPost = typeof window !== 'undefined'
|
2260
|
+
&& window.postMessage && window.addEventListener
|
2261
|
+
;
|
2262
|
+
|
2263
|
+
if (canSetImmediate) {
|
2264
|
+
return function (f) { return window.setImmediate(f) };
|
2265
|
+
}
|
2266
|
+
|
2267
|
+
if (canPost) {
|
2268
|
+
var queue = [];
|
2269
|
+
window.addEventListener('message', function (ev) {
|
2270
|
+
if (ev.source === window && ev.data === 'process-tick') {
|
2271
|
+
ev.stopPropagation();
|
2272
|
+
if (queue.length > 0) {
|
2273
|
+
var fn = queue.shift();
|
2274
|
+
fn();
|
2275
|
+
}
|
2276
|
+
}
|
2277
|
+
}, true);
|
2278
|
+
|
2279
|
+
return function nextTick(fn) {
|
2280
|
+
queue.push(fn);
|
2281
|
+
window.postMessage('process-tick', '*');
|
2282
|
+
};
|
2283
|
+
}
|
2284
|
+
|
2285
|
+
return function nextTick(fn) {
|
2286
|
+
setTimeout(fn, 0);
|
2287
|
+
};
|
2288
|
+
})();
|
2289
|
+
|
2290
|
+
process.title = 'browser';
|
2291
|
+
process.browser = true;
|
2292
|
+
process.env = {};
|
2293
|
+
process.argv = [];
|
2294
|
+
|
2295
|
+
process.binding = function (name) {
|
2296
|
+
throw new Error('process.binding is not supported');
|
2297
|
+
}
|
2298
|
+
|
2299
|
+
// TODO(shtylman)
|
2300
|
+
process.cwd = function () { return '/' };
|
2301
|
+
process.chdir = function (dir) {
|
2302
|
+
throw new Error('process.chdir is not supported');
|
2303
|
+
};
|
2304
|
+
|
2305
|
+
},{}],6:[function(require,module,exports){
|
2306
|
+
(function(process){if (!process.EventEmitter) process.EventEmitter = function () {};
|
2307
|
+
|
2308
|
+
var EventEmitter = exports.EventEmitter = process.EventEmitter;
|
2309
|
+
var isArray = typeof Array.isArray === 'function'
|
2310
|
+
? Array.isArray
|
2311
|
+
: function (xs) {
|
2312
|
+
return Object.prototype.toString.call(xs) === '[object Array]'
|
2313
|
+
}
|
2314
|
+
;
|
2315
|
+
function indexOf (xs, x) {
|
2316
|
+
if (xs.indexOf) return xs.indexOf(x);
|
2317
|
+
for (var i = 0; i < xs.length; i++) {
|
2318
|
+
if (x === xs[i]) return i;
|
2319
|
+
}
|
2320
|
+
return -1;
|
2321
|
+
}
|
2322
|
+
|
2323
|
+
// By default EventEmitters will print a warning if more than
|
2324
|
+
// 10 listeners are added to it. This is a useful default which
|
2325
|
+
// helps finding memory leaks.
|
2326
|
+
//
|
2327
|
+
// Obviously not all Emitters should be limited to 10. This function allows
|
2328
|
+
// that to be increased. Set to zero for unlimited.
|
2329
|
+
var defaultMaxListeners = 10;
|
2330
|
+
EventEmitter.prototype.setMaxListeners = function(n) {
|
2331
|
+
if (!this._events) this._events = {};
|
2332
|
+
this._events.maxListeners = n;
|
2333
|
+
};
|
2334
|
+
|
2335
|
+
|
2336
|
+
EventEmitter.prototype.emit = function(type) {
|
2337
|
+
// If there is no 'error' event listener then throw.
|
2338
|
+
if (type === 'error') {
|
2339
|
+
if (!this._events || !this._events.error ||
|
2340
|
+
(isArray(this._events.error) && !this._events.error.length))
|
2341
|
+
{
|
2342
|
+
if (arguments[1] instanceof Error) {
|
2343
|
+
throw arguments[1]; // Unhandled 'error' event
|
2344
|
+
} else {
|
2345
|
+
throw new Error("Uncaught, unspecified 'error' event.");
|
2346
|
+
}
|
2347
|
+
return false;
|
2348
|
+
}
|
2349
|
+
}
|
2350
|
+
|
2351
|
+
if (!this._events) return false;
|
2352
|
+
var handler = this._events[type];
|
2353
|
+
if (!handler) return false;
|
2354
|
+
|
2355
|
+
if (typeof handler == 'function') {
|
2356
|
+
switch (arguments.length) {
|
2357
|
+
// fast cases
|
2358
|
+
case 1:
|
2359
|
+
handler.call(this);
|
2360
|
+
break;
|
2361
|
+
case 2:
|
2362
|
+
handler.call(this, arguments[1]);
|
2363
|
+
break;
|
2364
|
+
case 3:
|
2365
|
+
handler.call(this, arguments[1], arguments[2]);
|
2366
|
+
break;
|
2367
|
+
// slower
|
2368
|
+
default:
|
2369
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
2370
|
+
handler.apply(this, args);
|
2371
|
+
}
|
2372
|
+
return true;
|
2373
|
+
|
2374
|
+
} else if (isArray(handler)) {
|
2375
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
2376
|
+
|
2377
|
+
var listeners = handler.slice();
|
2378
|
+
for (var i = 0, l = listeners.length; i < l; i++) {
|
2379
|
+
listeners[i].apply(this, args);
|
2380
|
+
}
|
2381
|
+
return true;
|
2382
|
+
|
2383
|
+
} else {
|
2384
|
+
return false;
|
2385
|
+
}
|
2386
|
+
};
|
2387
|
+
|
2388
|
+
// EventEmitter is defined in src/node_events.cc
|
2389
|
+
// EventEmitter.prototype.emit() is also defined there.
|
2390
|
+
EventEmitter.prototype.addListener = function(type, listener) {
|
2391
|
+
if ('function' !== typeof listener) {
|
2392
|
+
throw new Error('addListener only takes instances of Function');
|
2393
|
+
}
|
2394
|
+
|
2395
|
+
if (!this._events) this._events = {};
|
2396
|
+
|
2397
|
+
// To avoid recursion in the case that type == "newListeners"! Before
|
2398
|
+
// adding it to the listeners, first emit "newListeners".
|
2399
|
+
this.emit('newListener', type, listener);
|
2400
|
+
|
2401
|
+
if (!this._events[type]) {
|
2402
|
+
// Optimize the case of one listener. Don't need the extra array object.
|
2403
|
+
this._events[type] = listener;
|
2404
|
+
} else if (isArray(this._events[type])) {
|
2405
|
+
|
2406
|
+
// Check for listener leak
|
2407
|
+
if (!this._events[type].warned) {
|
2408
|
+
var m;
|
2409
|
+
if (this._events.maxListeners !== undefined) {
|
2410
|
+
m = this._events.maxListeners;
|
2411
|
+
} else {
|
2412
|
+
m = defaultMaxListeners;
|
2413
|
+
}
|
2414
|
+
|
2415
|
+
if (m && m > 0 && this._events[type].length > m) {
|
2416
|
+
this._events[type].warned = true;
|
2417
|
+
console.error('(node) warning: possible EventEmitter memory ' +
|
2418
|
+
'leak detected. %d listeners added. ' +
|
2419
|
+
'Use emitter.setMaxListeners() to increase limit.',
|
2420
|
+
this._events[type].length);
|
2421
|
+
console.trace();
|
2422
|
+
}
|
2423
|
+
}
|
2424
|
+
|
2425
|
+
// If we've already got an array, just append.
|
2426
|
+
this._events[type].push(listener);
|
2427
|
+
} else {
|
2428
|
+
// Adding the second element, need to change to array.
|
2429
|
+
this._events[type] = [this._events[type], listener];
|
2430
|
+
}
|
2431
|
+
|
2432
|
+
return this;
|
2433
|
+
};
|
2434
|
+
|
2435
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
2436
|
+
|
2437
|
+
EventEmitter.prototype.once = function(type, listener) {
|
2438
|
+
var self = this;
|
2439
|
+
self.on(type, function g() {
|
2440
|
+
self.removeListener(type, g);
|
2441
|
+
listener.apply(this, arguments);
|
2442
|
+
});
|
2443
|
+
|
2444
|
+
return this;
|
2445
|
+
};
|
2446
|
+
|
2447
|
+
EventEmitter.prototype.removeListener = function(type, listener) {
|
2448
|
+
if ('function' !== typeof listener) {
|
2449
|
+
throw new Error('removeListener only takes instances of Function');
|
2450
|
+
}
|
2451
|
+
|
2452
|
+
// does not use listeners(), so no side effect of creating _events[type]
|
2453
|
+
if (!this._events || !this._events[type]) return this;
|
2454
|
+
|
2455
|
+
var list = this._events[type];
|
2456
|
+
|
2457
|
+
if (isArray(list)) {
|
2458
|
+
var i = indexOf(list, listener);
|
2459
|
+
if (i < 0) return this;
|
2460
|
+
list.splice(i, 1);
|
2461
|
+
if (list.length == 0)
|
2462
|
+
delete this._events[type];
|
2463
|
+
} else if (this._events[type] === listener) {
|
2464
|
+
delete this._events[type];
|
2465
|
+
}
|
2466
|
+
|
2467
|
+
return this;
|
2468
|
+
};
|
2469
|
+
|
2470
|
+
EventEmitter.prototype.removeAllListeners = function(type) {
|
2471
|
+
if (arguments.length === 0) {
|
2472
|
+
this._events = {};
|
2473
|
+
return this;
|
2474
|
+
}
|
2475
|
+
|
2476
|
+
// does not use listeners(), so no side effect of creating _events[type]
|
2477
|
+
if (type && this._events && this._events[type]) this._events[type] = null;
|
2478
|
+
return this;
|
2479
|
+
};
|
2480
|
+
|
2481
|
+
EventEmitter.prototype.listeners = function(type) {
|
2482
|
+
if (!this._events) this._events = {};
|
2483
|
+
if (!this._events[type]) this._events[type] = [];
|
2484
|
+
if (!isArray(this._events[type])) {
|
2485
|
+
this._events[type] = [this._events[type]];
|
2486
|
+
}
|
2487
|
+
return this._events[type];
|
2488
|
+
};
|
2489
|
+
|
2490
|
+
})(require("__browserify_process"))
|
2491
|
+
},{"__browserify_process":8}],4:[function(require,module,exports){
|
2492
|
+
(function(){function SlowBuffer (size) {
|
2493
|
+
this.length = size;
|
2494
|
+
};
|
2495
|
+
|
2496
|
+
var assert = require('assert');
|
2497
|
+
|
2498
|
+
exports.INSPECT_MAX_BYTES = 50;
|
2499
|
+
|
2500
|
+
|
2501
|
+
function toHex(n) {
|
2502
|
+
if (n < 16) return '0' + n.toString(16);
|
2503
|
+
return n.toString(16);
|
2504
|
+
}
|
2505
|
+
|
2506
|
+
function utf8ToBytes(str) {
|
2507
|
+
var byteArray = [];
|
2508
|
+
for (var i = 0; i < str.length; i++)
|
2509
|
+
if (str.charCodeAt(i) <= 0x7F)
|
2510
|
+
byteArray.push(str.charCodeAt(i));
|
2511
|
+
else {
|
2512
|
+
var h = encodeURIComponent(str.charAt(i)).substr(1).split('%');
|
2513
|
+
for (var j = 0; j < h.length; j++)
|
2514
|
+
byteArray.push(parseInt(h[j], 16));
|
2515
|
+
}
|
2516
|
+
|
2517
|
+
return byteArray;
|
2518
|
+
}
|
2519
|
+
|
2520
|
+
function asciiToBytes(str) {
|
2521
|
+
var byteArray = []
|
2522
|
+
for (var i = 0; i < str.length; i++ )
|
2523
|
+
// Node's code seems to be doing this and not & 0x7F..
|
2524
|
+
byteArray.push( str.charCodeAt(i) & 0xFF );
|
2525
|
+
|
2526
|
+
return byteArray;
|
2527
|
+
}
|
2528
|
+
|
2529
|
+
function base64ToBytes(str) {
|
2530
|
+
return require("base64-js").toByteArray(str);
|
2531
|
+
}
|
2532
|
+
|
2533
|
+
SlowBuffer.byteLength = function (str, encoding) {
|
2534
|
+
switch (encoding || "utf8") {
|
2535
|
+
case 'hex':
|
2536
|
+
return str.length / 2;
|
2537
|
+
|
2538
|
+
case 'utf8':
|
2539
|
+
case 'utf-8':
|
2540
|
+
return utf8ToBytes(str).length;
|
2541
|
+
|
2542
|
+
case 'ascii':
|
2543
|
+
return str.length;
|
2544
|
+
|
2545
|
+
case 'base64':
|
2546
|
+
return base64ToBytes(str).length;
|
2547
|
+
|
2548
|
+
default:
|
2549
|
+
throw new Error('Unknown encoding');
|
2550
|
+
}
|
2551
|
+
};
|
2552
|
+
|
2553
|
+
function blitBuffer(src, dst, offset, length) {
|
2554
|
+
var pos, i = 0;
|
2555
|
+
while (i < length) {
|
2556
|
+
if ((i+offset >= dst.length) || (i >= src.length))
|
2557
|
+
break;
|
2558
|
+
|
2559
|
+
dst[i + offset] = src[i];
|
2560
|
+
i++;
|
2561
|
+
}
|
2562
|
+
return i;
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
SlowBuffer.prototype.utf8Write = function (string, offset, length) {
|
2566
|
+
var bytes, pos;
|
2567
|
+
return SlowBuffer._charsWritten = blitBuffer(utf8ToBytes(string), this, offset, length);
|
2568
|
+
};
|
2569
|
+
|
2570
|
+
SlowBuffer.prototype.asciiWrite = function (string, offset, length) {
|
2571
|
+
var bytes, pos;
|
2572
|
+
return SlowBuffer._charsWritten = blitBuffer(asciiToBytes(string), this, offset, length);
|
2573
|
+
};
|
2574
|
+
|
2575
|
+
SlowBuffer.prototype.base64Write = function (string, offset, length) {
|
2576
|
+
var bytes, pos;
|
2577
|
+
return SlowBuffer._charsWritten = blitBuffer(base64ToBytes(string), this, offset, length);
|
2578
|
+
};
|
2579
|
+
|
2580
|
+
SlowBuffer.prototype.base64Slice = function (start, end) {
|
2581
|
+
var bytes = Array.prototype.slice.apply(this, arguments)
|
2582
|
+
return require("base64-js").fromByteArray(bytes);
|
2583
|
+
}
|
2584
|
+
|
2585
|
+
function decodeUtf8Char(str) {
|
2586
|
+
try {
|
2587
|
+
return decodeURIComponent(str);
|
2588
|
+
} catch (err) {
|
2589
|
+
return String.fromCharCode(0xFFFD); // UTF 8 invalid char
|
2590
|
+
}
|
2591
|
+
}
|
2592
|
+
|
2593
|
+
SlowBuffer.prototype.utf8Slice = function () {
|
2594
|
+
var bytes = Array.prototype.slice.apply(this, arguments);
|
2595
|
+
var res = "";
|
2596
|
+
var tmp = "";
|
2597
|
+
var i = 0;
|
2598
|
+
while (i < bytes.length) {
|
2599
|
+
if (bytes[i] <= 0x7F) {
|
2600
|
+
res += decodeUtf8Char(tmp) + String.fromCharCode(bytes[i]);
|
2601
|
+
tmp = "";
|
2602
|
+
} else
|
2603
|
+
tmp += "%" + bytes[i].toString(16);
|
2604
|
+
|
2605
|
+
i++;
|
2606
|
+
}
|
2607
|
+
|
2608
|
+
return res + decodeUtf8Char(tmp);
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
SlowBuffer.prototype.asciiSlice = function () {
|
2612
|
+
var bytes = Array.prototype.slice.apply(this, arguments);
|
2613
|
+
var ret = "";
|
2614
|
+
for (var i = 0; i < bytes.length; i++)
|
2615
|
+
ret += String.fromCharCode(bytes[i]);
|
2616
|
+
return ret;
|
2617
|
+
}
|
2618
|
+
|
2619
|
+
SlowBuffer.prototype.inspect = function() {
|
2620
|
+
var out = [],
|
2621
|
+
len = this.length;
|
2622
|
+
for (var i = 0; i < len; i++) {
|
2623
|
+
out[i] = toHex(this[i]);
|
2624
|
+
if (i == exports.INSPECT_MAX_BYTES) {
|
2625
|
+
out[i + 1] = '...';
|
2626
|
+
break;
|
2627
|
+
}
|
2628
|
+
}
|
2629
|
+
return '<SlowBuffer ' + out.join(' ') + '>';
|
2630
|
+
};
|
2631
|
+
|
2632
|
+
|
2633
|
+
SlowBuffer.prototype.hexSlice = function(start, end) {
|
2634
|
+
var len = this.length;
|
2635
|
+
|
2636
|
+
if (!start || start < 0) start = 0;
|
2637
|
+
if (!end || end < 0 || end > len) end = len;
|
2638
|
+
|
2639
|
+
var out = '';
|
2640
|
+
for (var i = start; i < end; i++) {
|
2641
|
+
out += toHex(this[i]);
|
2642
|
+
}
|
2643
|
+
return out;
|
2644
|
+
};
|
2645
|
+
|
2646
|
+
|
2647
|
+
SlowBuffer.prototype.toString = function(encoding, start, end) {
|
2648
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
2649
|
+
start = +start || 0;
|
2650
|
+
if (typeof end == 'undefined') end = this.length;
|
2651
|
+
|
2652
|
+
// Fastpath empty strings
|
2653
|
+
if (+end == start) {
|
2654
|
+
return '';
|
2655
|
+
}
|
2656
|
+
|
2657
|
+
switch (encoding) {
|
2658
|
+
case 'hex':
|
2659
|
+
return this.hexSlice(start, end);
|
2660
|
+
|
2661
|
+
case 'utf8':
|
2662
|
+
case 'utf-8':
|
2663
|
+
return this.utf8Slice(start, end);
|
2664
|
+
|
2665
|
+
case 'ascii':
|
2666
|
+
return this.asciiSlice(start, end);
|
2667
|
+
|
2668
|
+
case 'binary':
|
2669
|
+
return this.binarySlice(start, end);
|
2670
|
+
|
2671
|
+
case 'base64':
|
2672
|
+
return this.base64Slice(start, end);
|
2673
|
+
|
2674
|
+
case 'ucs2':
|
2675
|
+
case 'ucs-2':
|
2676
|
+
return this.ucs2Slice(start, end);
|
2677
|
+
|
2678
|
+
default:
|
2679
|
+
throw new Error('Unknown encoding');
|
2680
|
+
}
|
2681
|
+
};
|
2682
|
+
|
2683
|
+
|
2684
|
+
SlowBuffer.prototype.hexWrite = function(string, offset, length) {
|
2685
|
+
offset = +offset || 0;
|
2686
|
+
var remaining = this.length - offset;
|
2687
|
+
if (!length) {
|
2688
|
+
length = remaining;
|
2689
|
+
} else {
|
2690
|
+
length = +length;
|
2691
|
+
if (length > remaining) {
|
2692
|
+
length = remaining;
|
2693
|
+
}
|
2694
|
+
}
|
2695
|
+
|
2696
|
+
// must be an even number of digits
|
2697
|
+
var strLen = string.length;
|
2698
|
+
if (strLen % 2) {
|
2699
|
+
throw new Error('Invalid hex string');
|
2700
|
+
}
|
2701
|
+
if (length > strLen / 2) {
|
2702
|
+
length = strLen / 2;
|
2703
|
+
}
|
2704
|
+
for (var i = 0; i < length; i++) {
|
2705
|
+
var byte = parseInt(string.substr(i * 2, 2), 16);
|
2706
|
+
if (isNaN(byte)) throw new Error('Invalid hex string');
|
2707
|
+
this[offset + i] = byte;
|
2708
|
+
}
|
2709
|
+
SlowBuffer._charsWritten = i * 2;
|
2710
|
+
return i;
|
2711
|
+
};
|
2712
|
+
|
2713
|
+
|
2714
|
+
SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
2715
|
+
// Support both (string, offset, length, encoding)
|
2716
|
+
// and the legacy (string, encoding, offset, length)
|
2717
|
+
if (isFinite(offset)) {
|
2718
|
+
if (!isFinite(length)) {
|
2719
|
+
encoding = length;
|
2720
|
+
length = undefined;
|
2721
|
+
}
|
2722
|
+
} else { // legacy
|
2723
|
+
var swap = encoding;
|
2724
|
+
encoding = offset;
|
2725
|
+
offset = length;
|
2726
|
+
length = swap;
|
2727
|
+
}
|
2728
|
+
|
2729
|
+
offset = +offset || 0;
|
2730
|
+
var remaining = this.length - offset;
|
2731
|
+
if (!length) {
|
2732
|
+
length = remaining;
|
2733
|
+
} else {
|
2734
|
+
length = +length;
|
2735
|
+
if (length > remaining) {
|
2736
|
+
length = remaining;
|
2737
|
+
}
|
2738
|
+
}
|
2739
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
2740
|
+
|
2741
|
+
switch (encoding) {
|
2742
|
+
case 'hex':
|
2743
|
+
return this.hexWrite(string, offset, length);
|
2744
|
+
|
2745
|
+
case 'utf8':
|
2746
|
+
case 'utf-8':
|
2747
|
+
return this.utf8Write(string, offset, length);
|
2748
|
+
|
2749
|
+
case 'ascii':
|
2750
|
+
return this.asciiWrite(string, offset, length);
|
2751
|
+
|
2752
|
+
case 'binary':
|
2753
|
+
return this.binaryWrite(string, offset, length);
|
2754
|
+
|
2755
|
+
case 'base64':
|
2756
|
+
return this.base64Write(string, offset, length);
|
2757
|
+
|
2758
|
+
case 'ucs2':
|
2759
|
+
case 'ucs-2':
|
2760
|
+
return this.ucs2Write(string, offset, length);
|
2761
|
+
|
2762
|
+
default:
|
2763
|
+
throw new Error('Unknown encoding');
|
2764
|
+
}
|
2765
|
+
};
|
2766
|
+
|
2767
|
+
|
2768
|
+
// slice(start, end)
|
2769
|
+
SlowBuffer.prototype.slice = function(start, end) {
|
2770
|
+
if (end === undefined) end = this.length;
|
2771
|
+
|
2772
|
+
if (end > this.length) {
|
2773
|
+
throw new Error('oob');
|
2774
|
+
}
|
2775
|
+
if (start > end) {
|
2776
|
+
throw new Error('oob');
|
2777
|
+
}
|
2778
|
+
|
2779
|
+
return new Buffer(this, end - start, +start);
|
2780
|
+
};
|
2781
|
+
|
2782
|
+
SlowBuffer.prototype.copy = function(target, targetstart, sourcestart, sourceend) {
|
2783
|
+
var temp = [];
|
2784
|
+
for (var i=sourcestart; i<sourceend; i++) {
|
2785
|
+
assert.ok(typeof this[i] !== 'undefined', "copying undefined buffer bytes!");
|
2786
|
+
temp.push(this[i]);
|
2787
|
+
}
|
2788
|
+
|
2789
|
+
for (var i=targetstart; i<targetstart+temp.length; i++) {
|
2790
|
+
target[i] = temp[i-targetstart];
|
2791
|
+
}
|
2792
|
+
};
|
2793
|
+
|
2794
|
+
function coerce(length) {
|
2795
|
+
// Coerce length to a number (possibly NaN), round up
|
2796
|
+
// in case it's fractional (e.g. 123.456) then do a
|
2797
|
+
// double negate to coerce a NaN to 0. Easy, right?
|
2798
|
+
length = ~~Math.ceil(+length);
|
2799
|
+
return length < 0 ? 0 : length;
|
2800
|
+
}
|
2801
|
+
|
2802
|
+
|
2803
|
+
// Buffer
|
2804
|
+
|
2805
|
+
function Buffer(subject, encoding, offset) {
|
2806
|
+
if (!(this instanceof Buffer)) {
|
2807
|
+
return new Buffer(subject, encoding, offset);
|
2808
|
+
}
|
2809
|
+
|
2810
|
+
var type;
|
2811
|
+
|
2812
|
+
// Are we slicing?
|
2813
|
+
if (typeof offset === 'number') {
|
2814
|
+
this.length = coerce(encoding);
|
2815
|
+
this.parent = subject;
|
2816
|
+
this.offset = offset;
|
2817
|
+
} else {
|
2818
|
+
// Find the length
|
2819
|
+
switch (type = typeof subject) {
|
2820
|
+
case 'number':
|
2821
|
+
this.length = coerce(subject);
|
2822
|
+
break;
|
2823
|
+
|
2824
|
+
case 'string':
|
2825
|
+
this.length = Buffer.byteLength(subject, encoding);
|
2826
|
+
break;
|
2827
|
+
|
2828
|
+
case 'object': // Assume object is an array
|
2829
|
+
this.length = coerce(subject.length);
|
2830
|
+
break;
|
2831
|
+
|
2832
|
+
default:
|
2833
|
+
throw new Error('First argument needs to be a number, ' +
|
2834
|
+
'array or string.');
|
2835
|
+
}
|
2836
|
+
|
2837
|
+
if (this.length > Buffer.poolSize) {
|
2838
|
+
// Big buffer, just alloc one.
|
2839
|
+
this.parent = new SlowBuffer(this.length);
|
2840
|
+
this.offset = 0;
|
2841
|
+
|
2842
|
+
} else {
|
2843
|
+
// Small buffer.
|
2844
|
+
if (!pool || pool.length - pool.used < this.length) allocPool();
|
2845
|
+
this.parent = pool;
|
2846
|
+
this.offset = pool.used;
|
2847
|
+
pool.used += this.length;
|
2848
|
+
}
|
2849
|
+
|
2850
|
+
// Treat array-ish objects as a byte array.
|
2851
|
+
if (isArrayIsh(subject)) {
|
2852
|
+
for (var i = 0; i < this.length; i++) {
|
2853
|
+
this.parent[i + this.offset] = subject[i];
|
2854
|
+
}
|
2855
|
+
} else if (type == 'string') {
|
2856
|
+
// We are a string
|
2857
|
+
this.length = this.write(subject, 0, encoding);
|
2858
|
+
}
|
2859
|
+
}
|
2860
|
+
|
2861
|
+
}
|
2862
|
+
|
2863
|
+
function isArrayIsh(subject) {
|
2864
|
+
return Array.isArray(subject) || Buffer.isBuffer(subject) ||
|
2865
|
+
subject && typeof subject === 'object' &&
|
2866
|
+
typeof subject.length === 'number';
|
2867
|
+
}
|
2868
|
+
|
2869
|
+
exports.SlowBuffer = SlowBuffer;
|
2870
|
+
exports.Buffer = Buffer;
|
2871
|
+
|
2872
|
+
Buffer.poolSize = 8 * 1024;
|
2873
|
+
var pool;
|
2874
|
+
|
2875
|
+
function allocPool() {
|
2876
|
+
pool = new SlowBuffer(Buffer.poolSize);
|
2877
|
+
pool.used = 0;
|
2878
|
+
}
|
2879
|
+
|
2880
|
+
|
2881
|
+
// Static methods
|
2882
|
+
Buffer.isBuffer = function isBuffer(b) {
|
2883
|
+
return b instanceof Buffer || b instanceof SlowBuffer;
|
2884
|
+
};
|
2885
|
+
|
2886
|
+
Buffer.concat = function (list, totalLength) {
|
2887
|
+
if (!Array.isArray(list)) {
|
2888
|
+
throw new Error("Usage: Buffer.concat(list, [totalLength])\n \
|
2889
|
+
list should be an Array.");
|
2890
|
+
}
|
2891
|
+
|
2892
|
+
if (list.length === 0) {
|
2893
|
+
return new Buffer(0);
|
2894
|
+
} else if (list.length === 1) {
|
2895
|
+
return list[0];
|
2896
|
+
}
|
2897
|
+
|
2898
|
+
if (typeof totalLength !== 'number') {
|
2899
|
+
totalLength = 0;
|
2900
|
+
for (var i = 0; i < list.length; i++) {
|
2901
|
+
var buf = list[i];
|
2902
|
+
totalLength += buf.length;
|
2903
|
+
}
|
2904
|
+
}
|
2905
|
+
|
2906
|
+
var buffer = new Buffer(totalLength);
|
2907
|
+
var pos = 0;
|
2908
|
+
for (var i = 0; i < list.length; i++) {
|
2909
|
+
var buf = list[i];
|
2910
|
+
buf.copy(buffer, pos);
|
2911
|
+
pos += buf.length;
|
2912
|
+
}
|
2913
|
+
return buffer;
|
2914
|
+
};
|
2915
|
+
|
2916
|
+
// Inspect
|
2917
|
+
Buffer.prototype.inspect = function inspect() {
|
2918
|
+
var out = [],
|
2919
|
+
len = this.length;
|
2920
|
+
|
2921
|
+
for (var i = 0; i < len; i++) {
|
2922
|
+
out[i] = toHex(this.parent[i + this.offset]);
|
2923
|
+
if (i == exports.INSPECT_MAX_BYTES) {
|
2924
|
+
out[i + 1] = '...';
|
2925
|
+
break;
|
2926
|
+
}
|
2927
|
+
}
|
2928
|
+
|
2929
|
+
return '<Buffer ' + out.join(' ') + '>';
|
2930
|
+
};
|
2931
|
+
|
2932
|
+
|
2933
|
+
Buffer.prototype.get = function get(i) {
|
2934
|
+
if (i < 0 || i >= this.length) throw new Error('oob');
|
2935
|
+
return this.parent[this.offset + i];
|
2936
|
+
};
|
2937
|
+
|
2938
|
+
|
2939
|
+
Buffer.prototype.set = function set(i, v) {
|
2940
|
+
if (i < 0 || i >= this.length) throw new Error('oob');
|
2941
|
+
return this.parent[this.offset + i] = v;
|
2942
|
+
};
|
2943
|
+
|
2944
|
+
|
2945
|
+
// write(string, offset = 0, length = buffer.length-offset, encoding = 'utf8')
|
2946
|
+
Buffer.prototype.write = function(string, offset, length, encoding) {
|
2947
|
+
// Support both (string, offset, length, encoding)
|
2948
|
+
// and the legacy (string, encoding, offset, length)
|
2949
|
+
if (isFinite(offset)) {
|
2950
|
+
if (!isFinite(length)) {
|
2951
|
+
encoding = length;
|
2952
|
+
length = undefined;
|
2953
|
+
}
|
2954
|
+
} else { // legacy
|
2955
|
+
var swap = encoding;
|
2956
|
+
encoding = offset;
|
2957
|
+
offset = length;
|
2958
|
+
length = swap;
|
2959
|
+
}
|
2960
|
+
|
2961
|
+
offset = +offset || 0;
|
2962
|
+
var remaining = this.length - offset;
|
2963
|
+
if (!length) {
|
2964
|
+
length = remaining;
|
2965
|
+
} else {
|
2966
|
+
length = +length;
|
2967
|
+
if (length > remaining) {
|
2968
|
+
length = remaining;
|
2969
|
+
}
|
2970
|
+
}
|
2971
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
2972
|
+
|
2973
|
+
var ret;
|
2974
|
+
switch (encoding) {
|
2975
|
+
case 'hex':
|
2976
|
+
ret = this.parent.hexWrite(string, this.offset + offset, length);
|
2977
|
+
break;
|
2978
|
+
|
2979
|
+
case 'utf8':
|
2980
|
+
case 'utf-8':
|
2981
|
+
ret = this.parent.utf8Write(string, this.offset + offset, length);
|
2982
|
+
break;
|
2983
|
+
|
2984
|
+
case 'ascii':
|
2985
|
+
ret = this.parent.asciiWrite(string, this.offset + offset, length);
|
2986
|
+
break;
|
2987
|
+
|
2988
|
+
case 'binary':
|
2989
|
+
ret = this.parent.binaryWrite(string, this.offset + offset, length);
|
2990
|
+
break;
|
2991
|
+
|
2992
|
+
case 'base64':
|
2993
|
+
// Warning: maxLength not taken into account in base64Write
|
2994
|
+
ret = this.parent.base64Write(string, this.offset + offset, length);
|
2995
|
+
break;
|
2996
|
+
|
2997
|
+
case 'ucs2':
|
2998
|
+
case 'ucs-2':
|
2999
|
+
ret = this.parent.ucs2Write(string, this.offset + offset, length);
|
3000
|
+
break;
|
3001
|
+
|
3002
|
+
default:
|
3003
|
+
throw new Error('Unknown encoding');
|
3004
|
+
}
|
3005
|
+
|
3006
|
+
Buffer._charsWritten = SlowBuffer._charsWritten;
|
3007
|
+
|
3008
|
+
return ret;
|
3009
|
+
};
|
3010
|
+
|
3011
|
+
|
3012
|
+
// toString(encoding, start=0, end=buffer.length)
|
3013
|
+
Buffer.prototype.toString = function(encoding, start, end) {
|
3014
|
+
encoding = String(encoding || 'utf8').toLowerCase();
|
3015
|
+
|
3016
|
+
if (typeof start == 'undefined' || start < 0) {
|
3017
|
+
start = 0;
|
3018
|
+
} else if (start > this.length) {
|
3019
|
+
start = this.length;
|
3020
|
+
}
|
3021
|
+
|
3022
|
+
if (typeof end == 'undefined' || end > this.length) {
|
3023
|
+
end = this.length;
|
3024
|
+
} else if (end < 0) {
|
3025
|
+
end = 0;
|
3026
|
+
}
|
3027
|
+
|
3028
|
+
start = start + this.offset;
|
3029
|
+
end = end + this.offset;
|
3030
|
+
|
3031
|
+
switch (encoding) {
|
3032
|
+
case 'hex':
|
3033
|
+
return this.parent.hexSlice(start, end);
|
3034
|
+
|
3035
|
+
case 'utf8':
|
3036
|
+
case 'utf-8':
|
3037
|
+
return this.parent.utf8Slice(start, end);
|
3038
|
+
|
3039
|
+
case 'ascii':
|
3040
|
+
return this.parent.asciiSlice(start, end);
|
3041
|
+
|
3042
|
+
case 'binary':
|
3043
|
+
return this.parent.binarySlice(start, end);
|
3044
|
+
|
3045
|
+
case 'base64':
|
3046
|
+
return this.parent.base64Slice(start, end);
|
3047
|
+
|
3048
|
+
case 'ucs2':
|
3049
|
+
case 'ucs-2':
|
3050
|
+
return this.parent.ucs2Slice(start, end);
|
3051
|
+
|
3052
|
+
default:
|
3053
|
+
throw new Error('Unknown encoding');
|
3054
|
+
}
|
3055
|
+
};
|
3056
|
+
|
3057
|
+
|
3058
|
+
// byteLength
|
3059
|
+
Buffer.byteLength = SlowBuffer.byteLength;
|
3060
|
+
|
3061
|
+
|
3062
|
+
// fill(value, start=0, end=buffer.length)
|
3063
|
+
Buffer.prototype.fill = function fill(value, start, end) {
|
3064
|
+
value || (value = 0);
|
3065
|
+
start || (start = 0);
|
3066
|
+
end || (end = this.length);
|
3067
|
+
|
3068
|
+
if (typeof value === 'string') {
|
3069
|
+
value = value.charCodeAt(0);
|
3070
|
+
}
|
3071
|
+
if (!(typeof value === 'number') || isNaN(value)) {
|
3072
|
+
throw new Error('value is not a number');
|
3073
|
+
}
|
3074
|
+
|
3075
|
+
if (end < start) throw new Error('end < start');
|
3076
|
+
|
3077
|
+
// Fill 0 bytes; we're done
|
3078
|
+
if (end === start) return 0;
|
3079
|
+
if (this.length == 0) return 0;
|
3080
|
+
|
3081
|
+
if (start < 0 || start >= this.length) {
|
3082
|
+
throw new Error('start out of bounds');
|
3083
|
+
}
|
3084
|
+
|
3085
|
+
if (end < 0 || end > this.length) {
|
3086
|
+
throw new Error('end out of bounds');
|
3087
|
+
}
|
3088
|
+
|
3089
|
+
return this.parent.fill(value,
|
3090
|
+
start + this.offset,
|
3091
|
+
end + this.offset);
|
3092
|
+
};
|
3093
|
+
|
3094
|
+
|
3095
|
+
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
3096
|
+
Buffer.prototype.copy = function(target, target_start, start, end) {
|
3097
|
+
var source = this;
|
3098
|
+
start || (start = 0);
|
3099
|
+
end || (end = this.length);
|
3100
|
+
target_start || (target_start = 0);
|
3101
|
+
|
3102
|
+
if (end < start) throw new Error('sourceEnd < sourceStart');
|
3103
|
+
|
3104
|
+
// Copy 0 bytes; we're done
|
3105
|
+
if (end === start) return 0;
|
3106
|
+
if (target.length == 0 || source.length == 0) return 0;
|
3107
|
+
|
3108
|
+
if (target_start < 0 || target_start >= target.length) {
|
3109
|
+
throw new Error('targetStart out of bounds');
|
3110
|
+
}
|
3111
|
+
|
3112
|
+
if (start < 0 || start >= source.length) {
|
3113
|
+
throw new Error('sourceStart out of bounds');
|
3114
|
+
}
|
3115
|
+
|
3116
|
+
if (end < 0 || end > source.length) {
|
3117
|
+
throw new Error('sourceEnd out of bounds');
|
3118
|
+
}
|
3119
|
+
|
3120
|
+
// Are we oob?
|
3121
|
+
if (end > this.length) {
|
3122
|
+
end = this.length;
|
3123
|
+
}
|
3124
|
+
|
3125
|
+
if (target.length - target_start < end - start) {
|
3126
|
+
end = target.length - target_start + start;
|
3127
|
+
}
|
3128
|
+
|
3129
|
+
return this.parent.copy(target.parent,
|
3130
|
+
target_start + target.offset,
|
3131
|
+
start + this.offset,
|
3132
|
+
end + this.offset);
|
3133
|
+
};
|
3134
|
+
|
3135
|
+
|
3136
|
+
// slice(start, end)
|
3137
|
+
Buffer.prototype.slice = function(start, end) {
|
3138
|
+
if (end === undefined) end = this.length;
|
3139
|
+
if (end > this.length) throw new Error('oob');
|
3140
|
+
if (start > end) throw new Error('oob');
|
3141
|
+
|
3142
|
+
return new Buffer(this.parent, end - start, +start + this.offset);
|
3143
|
+
};
|
3144
|
+
|
3145
|
+
|
3146
|
+
// Legacy methods for backwards compatibility.
|
3147
|
+
|
3148
|
+
Buffer.prototype.utf8Slice = function(start, end) {
|
3149
|
+
return this.toString('utf8', start, end);
|
3150
|
+
};
|
3151
|
+
|
3152
|
+
Buffer.prototype.binarySlice = function(start, end) {
|
3153
|
+
return this.toString('binary', start, end);
|
3154
|
+
};
|
3155
|
+
|
3156
|
+
Buffer.prototype.asciiSlice = function(start, end) {
|
3157
|
+
return this.toString('ascii', start, end);
|
3158
|
+
};
|
3159
|
+
|
3160
|
+
Buffer.prototype.utf8Write = function(string, offset) {
|
3161
|
+
return this.write(string, offset, 'utf8');
|
3162
|
+
};
|
3163
|
+
|
3164
|
+
Buffer.prototype.binaryWrite = function(string, offset) {
|
3165
|
+
return this.write(string, offset, 'binary');
|
3166
|
+
};
|
3167
|
+
|
3168
|
+
Buffer.prototype.asciiWrite = function(string, offset) {
|
3169
|
+
return this.write(string, offset, 'ascii');
|
3170
|
+
};
|
3171
|
+
|
3172
|
+
Buffer.prototype.readUInt8 = function(offset, noAssert) {
|
3173
|
+
var buffer = this;
|
3174
|
+
|
3175
|
+
if (!noAssert) {
|
3176
|
+
assert.ok(offset !== undefined && offset !== null,
|
3177
|
+
'missing offset');
|
3178
|
+
|
3179
|
+
assert.ok(offset < buffer.length,
|
3180
|
+
'Trying to read beyond buffer length');
|
3181
|
+
}
|
3182
|
+
|
3183
|
+
return buffer.parent[buffer.offset + offset];
|
3184
|
+
};
|
3185
|
+
|
3186
|
+
function readUInt16(buffer, offset, isBigEndian, noAssert) {
|
3187
|
+
var val = 0;
|
3188
|
+
|
3189
|
+
|
3190
|
+
if (!noAssert) {
|
3191
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3192
|
+
'missing or invalid endian');
|
3193
|
+
|
3194
|
+
assert.ok(offset !== undefined && offset !== null,
|
3195
|
+
'missing offset');
|
3196
|
+
|
3197
|
+
assert.ok(offset + 1 < buffer.length,
|
3198
|
+
'Trying to read beyond buffer length');
|
3199
|
+
}
|
3200
|
+
|
3201
|
+
if (isBigEndian) {
|
3202
|
+
val = buffer.parent[buffer.offset + offset] << 8;
|
3203
|
+
val |= buffer.parent[buffer.offset + offset + 1];
|
3204
|
+
} else {
|
3205
|
+
val = buffer.parent[buffer.offset + offset];
|
3206
|
+
val |= buffer.parent[buffer.offset + offset + 1] << 8;
|
3207
|
+
}
|
3208
|
+
|
3209
|
+
return val;
|
3210
|
+
}
|
3211
|
+
|
3212
|
+
Buffer.prototype.readUInt16LE = function(offset, noAssert) {
|
3213
|
+
return readUInt16(this, offset, false, noAssert);
|
3214
|
+
};
|
3215
|
+
|
3216
|
+
Buffer.prototype.readUInt16BE = function(offset, noAssert) {
|
3217
|
+
return readUInt16(this, offset, true, noAssert);
|
3218
|
+
};
|
3219
|
+
|
3220
|
+
function readUInt32(buffer, offset, isBigEndian, noAssert) {
|
3221
|
+
var val = 0;
|
3222
|
+
|
3223
|
+
if (!noAssert) {
|
3224
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3225
|
+
'missing or invalid endian');
|
3226
|
+
|
3227
|
+
assert.ok(offset !== undefined && offset !== null,
|
3228
|
+
'missing offset');
|
3229
|
+
|
3230
|
+
assert.ok(offset + 3 < buffer.length,
|
3231
|
+
'Trying to read beyond buffer length');
|
3232
|
+
}
|
3233
|
+
|
3234
|
+
if (isBigEndian) {
|
3235
|
+
val = buffer.parent[buffer.offset + offset + 1] << 16;
|
3236
|
+
val |= buffer.parent[buffer.offset + offset + 2] << 8;
|
3237
|
+
val |= buffer.parent[buffer.offset + offset + 3];
|
3238
|
+
val = val + (buffer.parent[buffer.offset + offset] << 24 >>> 0);
|
3239
|
+
} else {
|
3240
|
+
val = buffer.parent[buffer.offset + offset + 2] << 16;
|
3241
|
+
val |= buffer.parent[buffer.offset + offset + 1] << 8;
|
3242
|
+
val |= buffer.parent[buffer.offset + offset];
|
3243
|
+
val = val + (buffer.parent[buffer.offset + offset + 3] << 24 >>> 0);
|
3244
|
+
}
|
3245
|
+
|
3246
|
+
return val;
|
3247
|
+
}
|
3248
|
+
|
3249
|
+
Buffer.prototype.readUInt32LE = function(offset, noAssert) {
|
3250
|
+
return readUInt32(this, offset, false, noAssert);
|
3251
|
+
};
|
3252
|
+
|
3253
|
+
Buffer.prototype.readUInt32BE = function(offset, noAssert) {
|
3254
|
+
return readUInt32(this, offset, true, noAssert);
|
3255
|
+
};
|
3256
|
+
|
3257
|
+
|
3258
|
+
/*
|
3259
|
+
* Signed integer types, yay team! A reminder on how two's complement actually
|
3260
|
+
* works. The first bit is the signed bit, i.e. tells us whether or not the
|
3261
|
+
* number should be positive or negative. If the two's complement value is
|
3262
|
+
* positive, then we're done, as it's equivalent to the unsigned representation.
|
3263
|
+
*
|
3264
|
+
* Now if the number is positive, you're pretty much done, you can just leverage
|
3265
|
+
* the unsigned translations and return those. Unfortunately, negative numbers
|
3266
|
+
* aren't quite that straightforward.
|
3267
|
+
*
|
3268
|
+
* At first glance, one might be inclined to use the traditional formula to
|
3269
|
+
* translate binary numbers between the positive and negative values in two's
|
3270
|
+
* complement. (Though it doesn't quite work for the most negative value)
|
3271
|
+
* Mainly:
|
3272
|
+
* - invert all the bits
|
3273
|
+
* - add one to the result
|
3274
|
+
*
|
3275
|
+
* Of course, this doesn't quite work in Javascript. Take for example the value
|
3276
|
+
* of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of
|
3277
|
+
* course, Javascript will do the following:
|
3278
|
+
*
|
3279
|
+
* > ~0xff80
|
3280
|
+
* -65409
|
3281
|
+
*
|
3282
|
+
* Whoh there, Javascript, that's not quite right. But wait, according to
|
3283
|
+
* Javascript that's perfectly correct. When Javascript ends up seeing the
|
3284
|
+
* constant 0xff80, it has no notion that it is actually a signed number. It
|
3285
|
+
* assumes that we've input the unsigned value 0xff80. Thus, when it does the
|
3286
|
+
* binary negation, it casts it into a signed value, (positive 0xff80). Then
|
3287
|
+
* when you perform binary negation on that, it turns it into a negative number.
|
3288
|
+
*
|
3289
|
+
* Instead, we're going to have to use the following general formula, that works
|
3290
|
+
* in a rather Javascript friendly way. I'm glad we don't support this kind of
|
3291
|
+
* weird numbering scheme in the kernel.
|
3292
|
+
*
|
3293
|
+
* (BIT-MAX - (unsigned)val + 1) * -1
|
3294
|
+
*
|
3295
|
+
* The astute observer, may think that this doesn't make sense for 8-bit numbers
|
3296
|
+
* (really it isn't necessary for them). However, when you get 16-bit numbers,
|
3297
|
+
* you do. Let's go back to our prior example and see how this will look:
|
3298
|
+
*
|
3299
|
+
* (0xffff - 0xff80 + 1) * -1
|
3300
|
+
* (0x007f + 1) * -1
|
3301
|
+
* (0x0080) * -1
|
3302
|
+
*/
|
3303
|
+
Buffer.prototype.readInt8 = function(offset, noAssert) {
|
3304
|
+
var buffer = this;
|
3305
|
+
var neg;
|
3306
|
+
|
3307
|
+
if (!noAssert) {
|
3308
|
+
assert.ok(offset !== undefined && offset !== null,
|
3309
|
+
'missing offset');
|
3310
|
+
|
3311
|
+
assert.ok(offset < buffer.length,
|
3312
|
+
'Trying to read beyond buffer length');
|
3313
|
+
}
|
3314
|
+
|
3315
|
+
neg = buffer.parent[buffer.offset + offset] & 0x80;
|
3316
|
+
if (!neg) {
|
3317
|
+
return (buffer.parent[buffer.offset + offset]);
|
3318
|
+
}
|
3319
|
+
|
3320
|
+
return ((0xff - buffer.parent[buffer.offset + offset] + 1) * -1);
|
3321
|
+
};
|
3322
|
+
|
3323
|
+
function readInt16(buffer, offset, isBigEndian, noAssert) {
|
3324
|
+
var neg, val;
|
3325
|
+
|
3326
|
+
if (!noAssert) {
|
3327
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3328
|
+
'missing or invalid endian');
|
3329
|
+
|
3330
|
+
assert.ok(offset !== undefined && offset !== null,
|
3331
|
+
'missing offset');
|
3332
|
+
|
3333
|
+
assert.ok(offset + 1 < buffer.length,
|
3334
|
+
'Trying to read beyond buffer length');
|
3335
|
+
}
|
3336
|
+
|
3337
|
+
val = readUInt16(buffer, offset, isBigEndian, noAssert);
|
3338
|
+
neg = val & 0x8000;
|
3339
|
+
if (!neg) {
|
3340
|
+
return val;
|
3341
|
+
}
|
3342
|
+
|
3343
|
+
return (0xffff - val + 1) * -1;
|
3344
|
+
}
|
3345
|
+
|
3346
|
+
Buffer.prototype.readInt16LE = function(offset, noAssert) {
|
3347
|
+
return readInt16(this, offset, false, noAssert);
|
3348
|
+
};
|
3349
|
+
|
3350
|
+
Buffer.prototype.readInt16BE = function(offset, noAssert) {
|
3351
|
+
return readInt16(this, offset, true, noAssert);
|
3352
|
+
};
|
3353
|
+
|
3354
|
+
function readInt32(buffer, offset, isBigEndian, noAssert) {
|
3355
|
+
var neg, val;
|
3356
|
+
|
3357
|
+
if (!noAssert) {
|
3358
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3359
|
+
'missing or invalid endian');
|
3360
|
+
|
3361
|
+
assert.ok(offset !== undefined && offset !== null,
|
3362
|
+
'missing offset');
|
3363
|
+
|
3364
|
+
assert.ok(offset + 3 < buffer.length,
|
3365
|
+
'Trying to read beyond buffer length');
|
3366
|
+
}
|
3367
|
+
|
3368
|
+
val = readUInt32(buffer, offset, isBigEndian, noAssert);
|
3369
|
+
neg = val & 0x80000000;
|
3370
|
+
if (!neg) {
|
3371
|
+
return (val);
|
3372
|
+
}
|
3373
|
+
|
3374
|
+
return (0xffffffff - val + 1) * -1;
|
3375
|
+
}
|
3376
|
+
|
3377
|
+
Buffer.prototype.readInt32LE = function(offset, noAssert) {
|
3378
|
+
return readInt32(this, offset, false, noAssert);
|
3379
|
+
};
|
3380
|
+
|
3381
|
+
Buffer.prototype.readInt32BE = function(offset, noAssert) {
|
3382
|
+
return readInt32(this, offset, true, noAssert);
|
3383
|
+
};
|
3384
|
+
|
3385
|
+
function readFloat(buffer, offset, isBigEndian, noAssert) {
|
3386
|
+
if (!noAssert) {
|
3387
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3388
|
+
'missing or invalid endian');
|
3389
|
+
|
3390
|
+
assert.ok(offset + 3 < buffer.length,
|
3391
|
+
'Trying to read beyond buffer length');
|
3392
|
+
}
|
3393
|
+
|
3394
|
+
return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
3395
|
+
23, 4);
|
3396
|
+
}
|
3397
|
+
|
3398
|
+
Buffer.prototype.readFloatLE = function(offset, noAssert) {
|
3399
|
+
return readFloat(this, offset, false, noAssert);
|
3400
|
+
};
|
3401
|
+
|
3402
|
+
Buffer.prototype.readFloatBE = function(offset, noAssert) {
|
3403
|
+
return readFloat(this, offset, true, noAssert);
|
3404
|
+
};
|
3405
|
+
|
3406
|
+
function readDouble(buffer, offset, isBigEndian, noAssert) {
|
3407
|
+
if (!noAssert) {
|
3408
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3409
|
+
'missing or invalid endian');
|
3410
|
+
|
3411
|
+
assert.ok(offset + 7 < buffer.length,
|
3412
|
+
'Trying to read beyond buffer length');
|
3413
|
+
}
|
3414
|
+
|
3415
|
+
return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
3416
|
+
52, 8);
|
3417
|
+
}
|
3418
|
+
|
3419
|
+
Buffer.prototype.readDoubleLE = function(offset, noAssert) {
|
3420
|
+
return readDouble(this, offset, false, noAssert);
|
3421
|
+
};
|
3422
|
+
|
3423
|
+
Buffer.prototype.readDoubleBE = function(offset, noAssert) {
|
3424
|
+
return readDouble(this, offset, true, noAssert);
|
3425
|
+
};
|
3426
|
+
|
3427
|
+
|
3428
|
+
/*
|
3429
|
+
* We have to make sure that the value is a valid integer. This means that it is
|
3430
|
+
* non-negative. It has no fractional component and that it does not exceed the
|
3431
|
+
* maximum allowed value.
|
3432
|
+
*
|
3433
|
+
* value The number to check for validity
|
3434
|
+
*
|
3435
|
+
* max The maximum value
|
3436
|
+
*/
|
3437
|
+
function verifuint(value, max) {
|
3438
|
+
assert.ok(typeof (value) == 'number',
|
3439
|
+
'cannot write a non-number as a number');
|
3440
|
+
|
3441
|
+
assert.ok(value >= 0,
|
3442
|
+
'specified a negative value for writing an unsigned value');
|
3443
|
+
|
3444
|
+
assert.ok(value <= max, 'value is larger than maximum value for type');
|
3445
|
+
|
3446
|
+
assert.ok(Math.floor(value) === value, 'value has a fractional component');
|
3447
|
+
}
|
3448
|
+
|
3449
|
+
Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
|
3450
|
+
var buffer = this;
|
3451
|
+
|
3452
|
+
if (!noAssert) {
|
3453
|
+
assert.ok(value !== undefined && value !== null,
|
3454
|
+
'missing value');
|
3455
|
+
|
3456
|
+
assert.ok(offset !== undefined && offset !== null,
|
3457
|
+
'missing offset');
|
3458
|
+
|
3459
|
+
assert.ok(offset < buffer.length,
|
3460
|
+
'trying to write beyond buffer length');
|
3461
|
+
|
3462
|
+
verifuint(value, 0xff);
|
3463
|
+
}
|
3464
|
+
|
3465
|
+
buffer.parent[buffer.offset + offset] = value;
|
3466
|
+
};
|
3467
|
+
|
3468
|
+
function writeUInt16(buffer, value, offset, isBigEndian, noAssert) {
|
3469
|
+
if (!noAssert) {
|
3470
|
+
assert.ok(value !== undefined && value !== null,
|
3471
|
+
'missing value');
|
3472
|
+
|
3473
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3474
|
+
'missing or invalid endian');
|
3475
|
+
|
3476
|
+
assert.ok(offset !== undefined && offset !== null,
|
3477
|
+
'missing offset');
|
3478
|
+
|
3479
|
+
assert.ok(offset + 1 < buffer.length,
|
3480
|
+
'trying to write beyond buffer length');
|
3481
|
+
|
3482
|
+
verifuint(value, 0xffff);
|
3483
|
+
}
|
3484
|
+
|
3485
|
+
if (isBigEndian) {
|
3486
|
+
buffer.parent[buffer.offset + offset] = (value & 0xff00) >>> 8;
|
3487
|
+
buffer.parent[buffer.offset + offset + 1] = value & 0x00ff;
|
3488
|
+
} else {
|
3489
|
+
buffer.parent[buffer.offset + offset + 1] = (value & 0xff00) >>> 8;
|
3490
|
+
buffer.parent[buffer.offset + offset] = value & 0x00ff;
|
3491
|
+
}
|
3492
|
+
}
|
3493
|
+
|
3494
|
+
Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
|
3495
|
+
writeUInt16(this, value, offset, false, noAssert);
|
3496
|
+
};
|
3497
|
+
|
3498
|
+
Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
|
3499
|
+
writeUInt16(this, value, offset, true, noAssert);
|
3500
|
+
};
|
3501
|
+
|
3502
|
+
function writeUInt32(buffer, value, offset, isBigEndian, noAssert) {
|
3503
|
+
if (!noAssert) {
|
3504
|
+
assert.ok(value !== undefined && value !== null,
|
3505
|
+
'missing value');
|
3506
|
+
|
3507
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3508
|
+
'missing or invalid endian');
|
3509
|
+
|
3510
|
+
assert.ok(offset !== undefined && offset !== null,
|
3511
|
+
'missing offset');
|
3512
|
+
|
3513
|
+
assert.ok(offset + 3 < buffer.length,
|
3514
|
+
'trying to write beyond buffer length');
|
3515
|
+
|
3516
|
+
verifuint(value, 0xffffffff);
|
3517
|
+
}
|
3518
|
+
|
3519
|
+
if (isBigEndian) {
|
3520
|
+
buffer.parent[buffer.offset + offset] = (value >>> 24) & 0xff;
|
3521
|
+
buffer.parent[buffer.offset + offset + 1] = (value >>> 16) & 0xff;
|
3522
|
+
buffer.parent[buffer.offset + offset + 2] = (value >>> 8) & 0xff;
|
3523
|
+
buffer.parent[buffer.offset + offset + 3] = value & 0xff;
|
3524
|
+
} else {
|
3525
|
+
buffer.parent[buffer.offset + offset + 3] = (value >>> 24) & 0xff;
|
3526
|
+
buffer.parent[buffer.offset + offset + 2] = (value >>> 16) & 0xff;
|
3527
|
+
buffer.parent[buffer.offset + offset + 1] = (value >>> 8) & 0xff;
|
3528
|
+
buffer.parent[buffer.offset + offset] = value & 0xff;
|
3529
|
+
}
|
3530
|
+
}
|
3531
|
+
|
3532
|
+
Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
|
3533
|
+
writeUInt32(this, value, offset, false, noAssert);
|
3534
|
+
};
|
3535
|
+
|
3536
|
+
Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
|
3537
|
+
writeUInt32(this, value, offset, true, noAssert);
|
3538
|
+
};
|
3539
|
+
|
3540
|
+
|
3541
|
+
/*
|
3542
|
+
* We now move onto our friends in the signed number category. Unlike unsigned
|
3543
|
+
* numbers, we're going to have to worry a bit more about how we put values into
|
3544
|
+
* arrays. Since we are only worrying about signed 32-bit values, we're in
|
3545
|
+
* slightly better shape. Unfortunately, we really can't do our favorite binary
|
3546
|
+
* & in this system. It really seems to do the wrong thing. For example:
|
3547
|
+
*
|
3548
|
+
* > -32 & 0xff
|
3549
|
+
* 224
|
3550
|
+
*
|
3551
|
+
* What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of
|
3552
|
+
* this aren't treated as a signed number. Ultimately a bad thing.
|
3553
|
+
*
|
3554
|
+
* What we're going to want to do is basically create the unsigned equivalent of
|
3555
|
+
* our representation and pass that off to the wuint* functions. To do that
|
3556
|
+
* we're going to do the following:
|
3557
|
+
*
|
3558
|
+
* - if the value is positive
|
3559
|
+
* we can pass it directly off to the equivalent wuint
|
3560
|
+
* - if the value is negative
|
3561
|
+
* we do the following computation:
|
3562
|
+
* mb + val + 1, where
|
3563
|
+
* mb is the maximum unsigned value in that byte size
|
3564
|
+
* val is the Javascript negative integer
|
3565
|
+
*
|
3566
|
+
*
|
3567
|
+
* As a concrete value, take -128. In signed 16 bits this would be 0xff80. If
|
3568
|
+
* you do out the computations:
|
3569
|
+
*
|
3570
|
+
* 0xffff - 128 + 1
|
3571
|
+
* 0xffff - 127
|
3572
|
+
* 0xff80
|
3573
|
+
*
|
3574
|
+
* You can then encode this value as the signed version. This is really rather
|
3575
|
+
* hacky, but it should work and get the job done which is our goal here.
|
3576
|
+
*/
|
3577
|
+
|
3578
|
+
/*
|
3579
|
+
* A series of checks to make sure we actually have a signed 32-bit number
|
3580
|
+
*/
|
3581
|
+
function verifsint(value, max, min) {
|
3582
|
+
assert.ok(typeof (value) == 'number',
|
3583
|
+
'cannot write a non-number as a number');
|
3584
|
+
|
3585
|
+
assert.ok(value <= max, 'value larger than maximum allowed value');
|
3586
|
+
|
3587
|
+
assert.ok(value >= min, 'value smaller than minimum allowed value');
|
3588
|
+
|
3589
|
+
assert.ok(Math.floor(value) === value, 'value has a fractional component');
|
3590
|
+
}
|
3591
|
+
|
3592
|
+
function verifIEEE754(value, max, min) {
|
3593
|
+
assert.ok(typeof (value) == 'number',
|
3594
|
+
'cannot write a non-number as a number');
|
3595
|
+
|
3596
|
+
assert.ok(value <= max, 'value larger than maximum allowed value');
|
3597
|
+
|
3598
|
+
assert.ok(value >= min, 'value smaller than minimum allowed value');
|
3599
|
+
}
|
3600
|
+
|
3601
|
+
Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
|
3602
|
+
var buffer = this;
|
3603
|
+
|
3604
|
+
if (!noAssert) {
|
3605
|
+
assert.ok(value !== undefined && value !== null,
|
3606
|
+
'missing value');
|
3607
|
+
|
3608
|
+
assert.ok(offset !== undefined && offset !== null,
|
3609
|
+
'missing offset');
|
3610
|
+
|
3611
|
+
assert.ok(offset < buffer.length,
|
3612
|
+
'Trying to write beyond buffer length');
|
3613
|
+
|
3614
|
+
verifsint(value, 0x7f, -0x80);
|
3615
|
+
}
|
3616
|
+
|
3617
|
+
if (value >= 0) {
|
3618
|
+
buffer.writeUInt8(value, offset, noAssert);
|
3619
|
+
} else {
|
3620
|
+
buffer.writeUInt8(0xff + value + 1, offset, noAssert);
|
3621
|
+
}
|
3622
|
+
};
|
3623
|
+
|
3624
|
+
function writeInt16(buffer, value, offset, isBigEndian, noAssert) {
|
3625
|
+
if (!noAssert) {
|
3626
|
+
assert.ok(value !== undefined && value !== null,
|
3627
|
+
'missing value');
|
3628
|
+
|
3629
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3630
|
+
'missing or invalid endian');
|
3631
|
+
|
3632
|
+
assert.ok(offset !== undefined && offset !== null,
|
3633
|
+
'missing offset');
|
3634
|
+
|
3635
|
+
assert.ok(offset + 1 < buffer.length,
|
3636
|
+
'Trying to write beyond buffer length');
|
3637
|
+
|
3638
|
+
verifsint(value, 0x7fff, -0x8000);
|
3639
|
+
}
|
3640
|
+
|
3641
|
+
if (value >= 0) {
|
3642
|
+
writeUInt16(buffer, value, offset, isBigEndian, noAssert);
|
3643
|
+
} else {
|
3644
|
+
writeUInt16(buffer, 0xffff + value + 1, offset, isBigEndian, noAssert);
|
3645
|
+
}
|
3646
|
+
}
|
3647
|
+
|
3648
|
+
Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
|
3649
|
+
writeInt16(this, value, offset, false, noAssert);
|
3650
|
+
};
|
3651
|
+
|
3652
|
+
Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
|
3653
|
+
writeInt16(this, value, offset, true, noAssert);
|
3654
|
+
};
|
3655
|
+
|
3656
|
+
function writeInt32(buffer, value, offset, isBigEndian, noAssert) {
|
3657
|
+
if (!noAssert) {
|
3658
|
+
assert.ok(value !== undefined && value !== null,
|
3659
|
+
'missing value');
|
3660
|
+
|
3661
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3662
|
+
'missing or invalid endian');
|
3663
|
+
|
3664
|
+
assert.ok(offset !== undefined && offset !== null,
|
3665
|
+
'missing offset');
|
3666
|
+
|
3667
|
+
assert.ok(offset + 3 < buffer.length,
|
3668
|
+
'Trying to write beyond buffer length');
|
3669
|
+
|
3670
|
+
verifsint(value, 0x7fffffff, -0x80000000);
|
3671
|
+
}
|
3672
|
+
|
3673
|
+
if (value >= 0) {
|
3674
|
+
writeUInt32(buffer, value, offset, isBigEndian, noAssert);
|
3675
|
+
} else {
|
3676
|
+
writeUInt32(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert);
|
3677
|
+
}
|
3678
|
+
}
|
3679
|
+
|
3680
|
+
Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
|
3681
|
+
writeInt32(this, value, offset, false, noAssert);
|
3682
|
+
};
|
3683
|
+
|
3684
|
+
Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
|
3685
|
+
writeInt32(this, value, offset, true, noAssert);
|
3686
|
+
};
|
3687
|
+
|
3688
|
+
function writeFloat(buffer, value, offset, isBigEndian, noAssert) {
|
3689
|
+
if (!noAssert) {
|
3690
|
+
assert.ok(value !== undefined && value !== null,
|
3691
|
+
'missing value');
|
3692
|
+
|
3693
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3694
|
+
'missing or invalid endian');
|
3695
|
+
|
3696
|
+
assert.ok(offset !== undefined && offset !== null,
|
3697
|
+
'missing offset');
|
3698
|
+
|
3699
|
+
assert.ok(offset + 3 < buffer.length,
|
3700
|
+
'Trying to write beyond buffer length');
|
3701
|
+
|
3702
|
+
verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38);
|
3703
|
+
}
|
3704
|
+
|
3705
|
+
require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
3706
|
+
23, 4);
|
3707
|
+
}
|
3708
|
+
|
3709
|
+
Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
|
3710
|
+
writeFloat(this, value, offset, false, noAssert);
|
3711
|
+
};
|
3712
|
+
|
3713
|
+
Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
|
3714
|
+
writeFloat(this, value, offset, true, noAssert);
|
3715
|
+
};
|
3716
|
+
|
3717
|
+
function writeDouble(buffer, value, offset, isBigEndian, noAssert) {
|
3718
|
+
if (!noAssert) {
|
3719
|
+
assert.ok(value !== undefined && value !== null,
|
3720
|
+
'missing value');
|
3721
|
+
|
3722
|
+
assert.ok(typeof (isBigEndian) === 'boolean',
|
3723
|
+
'missing or invalid endian');
|
3724
|
+
|
3725
|
+
assert.ok(offset !== undefined && offset !== null,
|
3726
|
+
'missing offset');
|
3727
|
+
|
3728
|
+
assert.ok(offset + 7 < buffer.length,
|
3729
|
+
'Trying to write beyond buffer length');
|
3730
|
+
|
3731
|
+
verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308);
|
3732
|
+
}
|
3733
|
+
|
3734
|
+
require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
3735
|
+
52, 8);
|
3736
|
+
}
|
3737
|
+
|
3738
|
+
Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
|
3739
|
+
writeDouble(this, value, offset, false, noAssert);
|
3740
|
+
};
|
3741
|
+
|
3742
|
+
Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
|
3743
|
+
writeDouble(this, value, offset, true, noAssert);
|
3744
|
+
};
|
3745
|
+
|
3746
|
+
SlowBuffer.prototype.readUInt8 = Buffer.prototype.readUInt8;
|
3747
|
+
SlowBuffer.prototype.readUInt16LE = Buffer.prototype.readUInt16LE;
|
3748
|
+
SlowBuffer.prototype.readUInt16BE = Buffer.prototype.readUInt16BE;
|
3749
|
+
SlowBuffer.prototype.readUInt32LE = Buffer.prototype.readUInt32LE;
|
3750
|
+
SlowBuffer.prototype.readUInt32BE = Buffer.prototype.readUInt32BE;
|
3751
|
+
SlowBuffer.prototype.readInt8 = Buffer.prototype.readInt8;
|
3752
|
+
SlowBuffer.prototype.readInt16LE = Buffer.prototype.readInt16LE;
|
3753
|
+
SlowBuffer.prototype.readInt16BE = Buffer.prototype.readInt16BE;
|
3754
|
+
SlowBuffer.prototype.readInt32LE = Buffer.prototype.readInt32LE;
|
3755
|
+
SlowBuffer.prototype.readInt32BE = Buffer.prototype.readInt32BE;
|
3756
|
+
SlowBuffer.prototype.readFloatLE = Buffer.prototype.readFloatLE;
|
3757
|
+
SlowBuffer.prototype.readFloatBE = Buffer.prototype.readFloatBE;
|
3758
|
+
SlowBuffer.prototype.readDoubleLE = Buffer.prototype.readDoubleLE;
|
3759
|
+
SlowBuffer.prototype.readDoubleBE = Buffer.prototype.readDoubleBE;
|
3760
|
+
SlowBuffer.prototype.writeUInt8 = Buffer.prototype.writeUInt8;
|
3761
|
+
SlowBuffer.prototype.writeUInt16LE = Buffer.prototype.writeUInt16LE;
|
3762
|
+
SlowBuffer.prototype.writeUInt16BE = Buffer.prototype.writeUInt16BE;
|
3763
|
+
SlowBuffer.prototype.writeUInt32LE = Buffer.prototype.writeUInt32LE;
|
3764
|
+
SlowBuffer.prototype.writeUInt32BE = Buffer.prototype.writeUInt32BE;
|
3765
|
+
SlowBuffer.prototype.writeInt8 = Buffer.prototype.writeInt8;
|
3766
|
+
SlowBuffer.prototype.writeInt16LE = Buffer.prototype.writeInt16LE;
|
3767
|
+
SlowBuffer.prototype.writeInt16BE = Buffer.prototype.writeInt16BE;
|
3768
|
+
SlowBuffer.prototype.writeInt32LE = Buffer.prototype.writeInt32LE;
|
3769
|
+
SlowBuffer.prototype.writeInt32BE = Buffer.prototype.writeInt32BE;
|
3770
|
+
SlowBuffer.prototype.writeFloatLE = Buffer.prototype.writeFloatLE;
|
3771
|
+
SlowBuffer.prototype.writeFloatBE = Buffer.prototype.writeFloatBE;
|
3772
|
+
SlowBuffer.prototype.writeDoubleLE = Buffer.prototype.writeDoubleLE;
|
3773
|
+
SlowBuffer.prototype.writeDoubleBE = Buffer.prototype.writeDoubleBE;
|
3774
|
+
|
3775
|
+
})()
|
3776
|
+
},{"assert":2,"./buffer_ieee754":7,"base64-js":9}],9:[function(require,module,exports){
|
3777
|
+
(function (exports) {
|
3778
|
+
'use strict';
|
3779
|
+
|
3780
|
+
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
3781
|
+
|
3782
|
+
function b64ToByteArray(b64) {
|
3783
|
+
var i, j, l, tmp, placeHolders, arr;
|
3784
|
+
|
3785
|
+
if (b64.length % 4 > 0) {
|
3786
|
+
throw 'Invalid string. Length must be a multiple of 4';
|
3787
|
+
}
|
3788
|
+
|
3789
|
+
// the number of equal signs (place holders)
|
3790
|
+
// if there are two placeholders, than the two characters before it
|
3791
|
+
// represent one byte
|
3792
|
+
// if there is only one, then the three characters before it represent 2 bytes
|
3793
|
+
// this is just a cheap hack to not do indexOf twice
|
3794
|
+
placeHolders = b64.indexOf('=');
|
3795
|
+
placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0;
|
3796
|
+
|
3797
|
+
// base64 is 4/3 + up to two characters of the original data
|
3798
|
+
arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders);
|
3799
|
+
|
3800
|
+
// if there are placeholders, only get up to the last complete 4 chars
|
3801
|
+
l = placeHolders > 0 ? b64.length - 4 : b64.length;
|
3802
|
+
|
3803
|
+
for (i = 0, j = 0; i < l; i += 4, j += 3) {
|
3804
|
+
tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]);
|
3805
|
+
arr.push((tmp & 0xFF0000) >> 16);
|
3806
|
+
arr.push((tmp & 0xFF00) >> 8);
|
3807
|
+
arr.push(tmp & 0xFF);
|
3808
|
+
}
|
3809
|
+
|
3810
|
+
if (placeHolders === 2) {
|
3811
|
+
tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4);
|
3812
|
+
arr.push(tmp & 0xFF);
|
3813
|
+
} else if (placeHolders === 1) {
|
3814
|
+
tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2);
|
3815
|
+
arr.push((tmp >> 8) & 0xFF);
|
3816
|
+
arr.push(tmp & 0xFF);
|
3817
|
+
}
|
3818
|
+
|
3819
|
+
return arr;
|
3820
|
+
}
|
3821
|
+
|
3822
|
+
function uint8ToBase64(uint8) {
|
3823
|
+
var i,
|
3824
|
+
extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
|
3825
|
+
output = "",
|
3826
|
+
temp, length;
|
3827
|
+
|
3828
|
+
function tripletToBase64 (num) {
|
3829
|
+
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
|
3830
|
+
};
|
3831
|
+
|
3832
|
+
// go through the array every three bytes, we'll deal with trailing stuff later
|
3833
|
+
for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
|
3834
|
+
temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);
|
3835
|
+
output += tripletToBase64(temp);
|
3836
|
+
}
|
3837
|
+
|
3838
|
+
// pad the end with zeros, but make sure to not forget the extra bytes
|
3839
|
+
switch (extraBytes) {
|
3840
|
+
case 1:
|
3841
|
+
temp = uint8[uint8.length - 1];
|
3842
|
+
output += lookup[temp >> 2];
|
3843
|
+
output += lookup[(temp << 4) & 0x3F];
|
3844
|
+
output += '==';
|
3845
|
+
break;
|
3846
|
+
case 2:
|
3847
|
+
temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]);
|
3848
|
+
output += lookup[temp >> 10];
|
3849
|
+
output += lookup[(temp >> 4) & 0x3F];
|
3850
|
+
output += lookup[(temp << 2) & 0x3F];
|
3851
|
+
output += '=';
|
3852
|
+
break;
|
3853
|
+
}
|
3854
|
+
|
3855
|
+
return output;
|
3856
|
+
}
|
3857
|
+
|
3858
|
+
module.exports.toByteArray = b64ToByteArray;
|
3859
|
+
module.exports.fromByteArray = uint8ToBase64;
|
3860
|
+
}());
|
3861
|
+
|
3862
|
+
},{}]},{},[])
|
3863
|
+
;;module.exports=require("buffer-browserify")
|