snowball 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +1 -3
- data/{lib/snowball → bin}/roll.js +0 -0
- data/lib/snowball/roller.rb +1 -1
- data/lib/snowball/version.rb +1 -1
- data/node_modules/.bin/browserify +161 -0
- data/node_modules/.bin/cake +7 -0
- data/node_modules/.bin/coffee +7 -0
- data/node_modules/.bin/jade +168 -0
- data/node_modules/browserify/.travis.yml +4 -0
- data/node_modules/browserify/LICENSE +63 -0
- data/node_modules/browserify/README.markdown +172 -0
- data/node_modules/browserify/bin/cmd.js +161 -0
- data/node_modules/browserify/builtins/__browserify_process.js +55 -0
- data/node_modules/browserify/builtins/assert.js +314 -0
- data/node_modules/browserify/builtins/child_process.js +2 -0
- data/node_modules/browserify/builtins/events.js +178 -0
- data/node_modules/browserify/builtins/fs.js +1 -0
- data/node_modules/browserify/builtins/https.js +1 -0
- data/node_modules/browserify/builtins/net.js +1 -0
- data/node_modules/browserify/builtins/path.js +175 -0
- data/node_modules/browserify/builtins/querystring.js +250 -0
- data/node_modules/browserify/builtins/stream.js +119 -0
- data/node_modules/browserify/builtins/string_decoder.js +161 -0
- data/node_modules/browserify/builtins/sys.js +1 -0
- data/node_modules/browserify/builtins/timers.js +39 -0
- data/node_modules/browserify/builtins/tls.js +1 -0
- data/node_modules/browserify/builtins/tty.js +2 -0
- data/node_modules/browserify/builtins/url.js +604 -0
- data/node_modules/browserify/builtins/util.js +351 -0
- data/node_modules/browserify/example/debug/browserify.js +219 -0
- data/node_modules/browserify/example/debug/build.sh +3 -0
- data/node_modules/browserify/example/debug/index.html +7 -0
- data/node_modules/browserify/example/debug/js/entry.js +2 -0
- data/node_modules/browserify/example/debug/js/thrower.js +3 -0
- data/node_modules/browserify/example/debug/server.js +9 -0
- data/node_modules/browserify/example/simple-build/browserify.js +368 -0
- data/node_modules/browserify/example/simple-build/build.sh +3 -0
- data/node_modules/browserify/example/simple-build/index.html +9 -0
- data/node_modules/browserify/example/simple-build/js/bar.js +3 -0
- data/node_modules/browserify/example/simple-build/js/entry.js +5 -0
- data/node_modules/browserify/example/simple-build/js/foo.js +5 -0
- data/node_modules/browserify/example/simple-build/server.js +9 -0
- data/node_modules/browserify/example/test/b.js +5 -0
- data/node_modules/browserify/example/test/bar.js +3 -0
- data/node_modules/browserify/example/test/foo.js +3 -0
- data/node_modules/browserify/example/test/m.js +3 -0
- data/node_modules/browserify/example/test/n.js +3 -0
- data/node_modules/browserify/example/using-http/bundle.js +813 -0
- data/node_modules/browserify/example/using-http/entry.js +25 -0
- data/node_modules/browserify/example/using-http/index.html +9 -0
- data/node_modules/browserify/example/using-http/server.js +28 -0
- data/node_modules/browserify/index.js +202 -0
- data/node_modules/browserify/lib/watch.js +75 -0
- data/node_modules/browserify/lib/wrap.js +580 -0
- data/node_modules/browserify/lib/wrappers.js +10 -0
- data/node_modules/browserify/node_modules/buffer-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/buffer-browserify/README.md +11 -0
- data/node_modules/browserify/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/index.js +1317 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/package.json +30 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
- data/node_modules/browserify/node_modules/buffer-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/buffer-browserify/test/buffer.js +218 -0
- data/node_modules/browserify/node_modules/commondir/README.markdown +45 -0
- data/node_modules/browserify/node_modules/commondir/example/base.js +3 -0
- data/node_modules/browserify/node_modules/commondir/example/dir.js +3 -0
- data/node_modules/browserify/node_modules/commondir/index.js +29 -0
- data/node_modules/browserify/node_modules/commondir/package.json +47 -0
- data/node_modules/browserify/node_modules/commondir/test/dirs.js +66 -0
- data/node_modules/browserify/node_modules/crypto-browserify/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js +637 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/index.html +12 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/test.js +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/index.js +74 -0
- data/node_modules/browserify/node_modules/crypto-browserify/md5.js +384 -0
- data/node_modules/browserify/node_modules/crypto-browserify/package.json +33 -0
- data/node_modules/browserify/node_modules/crypto-browserify/readme.markdown +20 -0
- data/node_modules/browserify/node_modules/crypto-browserify/rng.js +37 -0
- data/node_modules/browserify/node_modules/crypto-browserify/sha.js +210 -0
- data/node_modules/browserify/node_modules/crypto-browserify/test/simple.js +35 -0
- data/node_modules/browserify/node_modules/deputy/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/deputy/README.markdown +55 -0
- data/node_modules/browserify/node_modules/deputy/example/cache.js +5 -0
- data/node_modules/browserify/node_modules/deputy/index.js +46 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +82 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +34 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +63 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/package.json +47 -0
- data/node_modules/browserify/node_modules/deputy/test/cache.js +58 -0
- data/node_modules/browserify/node_modules/detective/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/detective/README.markdown +66 -0
- data/node_modules/browserify/node_modules/detective/example/strings.js +6 -0
- data/node_modules/browserify/node_modules/detective/example/strings_src.js +3 -0
- data/node_modules/browserify/node_modules/detective/index.js +60 -0
- data/node_modules/browserify/node_modules/detective/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/detective/package.json +47 -0
- data/node_modules/browserify/node_modules/detective/test/both.js +11 -0
- data/node_modules/browserify/node_modules/detective/test/chained.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/files/both.js +4 -0
- data/node_modules/browserify/node_modules/detective/test/files/chained.js +5 -0
- data/node_modules/browserify/node_modules/detective/test/files/nested.js +22 -0
- data/node_modules/browserify/node_modules/detective/test/files/skip.js +7 -0
- data/node_modules/browserify/node_modules/detective/test/files/strings.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/files/word.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/nested.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/skip.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/strings.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/word.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/main.js +14 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/server.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/main.js +18 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/server.js +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/data.json +139 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.npmignore +2 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/server.js +10 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/server.js +19 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js +21 -0
- data/node_modules/browserify/node_modules/http-browserify/index.js +59 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/request.js +128 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/response.js +119 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/package.json +30 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
- data/node_modules/browserify/node_modules/http-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/http-browserify/readme.markdown +128 -0
- data/node_modules/browserify/node_modules/nub/README.markdown +23 -0
- data/node_modules/browserify/node_modules/nub/index.js +64 -0
- data/node_modules/browserify/node_modules/nub/package.json +46 -0
- data/node_modules/browserify/node_modules/nub/test/by.js +51 -0
- data/node_modules/browserify/node_modules/nub/test/nub.js +46 -0
- data/node_modules/browserify/node_modules/resolve/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/resolve/LICENSE +18 -0
- data/node_modules/browserify/node_modules/resolve/README.markdown +47 -0
- data/node_modules/browserify/node_modules/resolve/index.js +106 -0
- data/node_modules/browserify/node_modules/resolve/package.json +45 -0
- data/node_modules/browserify/node_modules/resolve/test/core.js +12 -0
- data/node_modules/browserify/node_modules/resolve/test/filter.js +15 -0
- data/node_modules/browserify/node_modules/resolve/test/mock.js +64 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver.js +157 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/foo.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/node_modules/browserify/node_modules/syntax-error/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
- data/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
- data/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/syntax-error/package.json +49 -0
- data/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
- data/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
- data/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/README.markdown +103 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js +473 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/index.html +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/server.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/index.js +85 -0
- data/node_modules/browserify/node_modules/vm-browserify/package.json +43 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/run.js +22 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/test.sh +11 -0
- data/node_modules/browserify/package.json +78 -0
- data/node_modules/browserify/test/alias.js +58 -0
- data/node_modules/browserify/test/backbone.js +21 -0
- data/node_modules/browserify/test/bin.js +39 -0
- data/node_modules/browserify/test/buffer.js +99 -0
- data/node_modules/browserify/test/bundle.js +32 -0
- data/node_modules/browserify/test/cache.js +28 -0
- data/node_modules/browserify/test/coffee.js +39 -0
- data/node_modules/browserify/test/coffee/bar.js +1 -0
- data/node_modules/browserify/test/coffee/baz.coffee +1 -0
- data/node_modules/browserify/test/coffee/entry.coffee +1 -0
- data/node_modules/browserify/test/coffee/foo.coffee +1 -0
- data/node_modules/browserify/test/coffee/index.coffee +5 -0
- data/node_modules/browserify/test/coffee/nested/nested.coffee +2 -0
- data/node_modules/browserify/test/comment.js +17 -0
- data/node_modules/browserify/test/comment/main.js +2 -0
- data/node_modules/browserify/test/crypto.js +37 -0
- data/node_modules/browserify/test/dnode.js +27 -0
- data/node_modules/browserify/test/dollar.js +19 -0
- data/node_modules/browserify/test/dollar/dollar/index.js +7 -0
- data/node_modules/browserify/test/entry.js +36 -0
- data/node_modules/browserify/test/entry/main.js +1 -0
- data/node_modules/browserify/test/entry/one.js +1 -0
- data/node_modules/browserify/test/entry/two.js +1 -0
- data/node_modules/browserify/test/error_code.js +24 -0
- data/node_modules/browserify/test/error_code/src.js +2 -0
- data/node_modules/browserify/test/export.js +52 -0
- data/node_modules/browserify/test/export/entry.js +1 -0
- data/node_modules/browserify/test/field.js +64 -0
- data/node_modules/browserify/test/field/miss.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/package.json +6 -0
- data/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
- data/node_modules/browserify/test/field/object.js +1 -0
- data/node_modules/browserify/test/field/string.js +1 -0
- data/node_modules/browserify/test/field/sub.js +1 -0
- data/node_modules/browserify/test/global.js +19 -0
- data/node_modules/browserify/test/global/main.js +2 -0
- data/node_modules/browserify/test/jade.js +35 -0
- data/node_modules/browserify/test/json.js +17 -0
- data/node_modules/browserify/test/json/beep.json +4 -0
- data/node_modules/browserify/test/json/main.js +1 -0
- data/node_modules/browserify/test/maxlisteners.js +8 -0
- data/node_modules/browserify/test/module.js +22 -0
- data/node_modules/browserify/test/multi_entry.js +20 -0
- data/node_modules/browserify/test/multi_entry/a.js +2 -0
- data/node_modules/browserify/test/multi_entry/b.js +2 -0
- data/node_modules/browserify/test/multi_entry/c.js +3 -0
- data/node_modules/browserify/test/multi_ignore.js +23 -0
- data/node_modules/browserify/test/node_modules/beep/index.js +1 -0
- data/node_modules/browserify/test/require_cache.js +18 -0
- data/node_modules/browserify/test/retarget.js +27 -0
- data/node_modules/browserify/test/seq.js +47 -0
- data/node_modules/browserify/test/subdep.js +26 -0
- data/node_modules/browserify/test/subdep/index.js +1 -0
- data/node_modules/browserify/test/subdep/package.json +6 -0
- data/node_modules/browserify/test/util.js +48 -0
- data/node_modules/browserify/test/watch.js +91 -0
- data/node_modules/browserify/test/watch/a.js +1 -0
- data/node_modules/browserify/test/wrap.js +43 -0
- data/node_modules/browserify/test/wrap/a.js +2 -0
- data/node_modules/browserify/test/wrap/c.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/main.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/package.json +3 -0
- data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +1 -0
- data/node_modules/browserify/test/wrap/skipme.js +1 -0
- data/node_modules/browserify/test/wrap/x.js +0 -0
- data/node_modules/browserify/testling/README.markdown +29 -0
- data/node_modules/browserify/testling/test.sh +37 -0
- data/node_modules/browserify/testling/tick.js +9 -0
- data/node_modules/browserify/testling/timers.js +50 -0
- data/node_modules/browserify/testling/util.js +24 -0
- data/node_modules/browserify/v2.markdown +41 -0
- data/node_modules/browserify/wrappers/alias.js +1 -0
- data/node_modules/browserify/wrappers/body.js +2 -0
- data/node_modules/browserify/wrappers/body_debug.js +2 -0
- data/node_modules/browserify/wrappers/entry.js +3 -0
- data/node_modules/browserify/wrappers/entry_debug.js +3 -0
- data/node_modules/browserify/wrappers/package.js +3 -0
- data/node_modules/browserify/wrappers/prelude.js +196 -0
- data/node_modules/coffee-script/.npmignore +11 -0
- data/node_modules/coffee-script/CNAME +1 -0
- data/node_modules/coffee-script/CONTRIBUTING.md +9 -0
- data/node_modules/coffee-script/LICENSE +22 -0
- data/node_modules/coffee-script/README +51 -0
- data/node_modules/coffee-script/Rakefile +78 -0
- data/node_modules/coffee-script/bin/cake +7 -0
- data/node_modules/coffee-script/bin/coffee +7 -0
- data/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/node_modules/coffee-script/lib/coffee-script/cake.js +113 -0
- data/node_modules/coffee-script/lib/coffee-script/coffee-script.js +171 -0
- data/node_modules/coffee-script/lib/coffee-script/command.js +502 -0
- data/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/node_modules/coffee-script/lib/coffee-script/helpers.js +88 -0
- data/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/node_modules/coffee-script/lib/coffee-script/nodes.js +2971 -0
- data/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/node_modules/coffee-script/lib/coffee-script/repl.js +276 -0
- data/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/node_modules/coffee-script/package.json +50 -0
- data/node_modules/jade-runtime/.npmignore +15 -0
- data/node_modules/jade-runtime/README.md +8 -0
- data/node_modules/jade-runtime/globals.js +32 -0
- data/node_modules/jade-runtime/index.js +2 -0
- data/node_modules/jade-runtime/jade-runtime.js +181 -0
- data/node_modules/jade-runtime/package.json +18 -0
- data/node_modules/jade/.npmignore +14 -0
- data/node_modules/jade/LICENSE +22 -0
- data/node_modules/jade/Readme.md +1299 -0
- data/node_modules/jade/bin/jade +168 -0
- data/node_modules/jade/index.js +4 -0
- data/node_modules/jade/jade.js +3586 -0
- data/node_modules/jade/jade.md +510 -0
- data/node_modules/jade/jade.min.js +2 -0
- data/node_modules/jade/lib/compiler.js +654 -0
- data/node_modules/jade/lib/doctypes.js +18 -0
- data/node_modules/jade/lib/filters.js +97 -0
- data/node_modules/jade/lib/inline-tags.js +28 -0
- data/node_modules/jade/lib/jade.js +253 -0
- data/node_modules/jade/lib/lexer.js +774 -0
- data/node_modules/jade/lib/nodes/attrs.js +77 -0
- data/node_modules/jade/lib/nodes/block-comment.js +33 -0
- data/node_modules/jade/lib/nodes/block.js +122 -0
- data/node_modules/jade/lib/nodes/case.js +43 -0
- data/node_modules/jade/lib/nodes/code.js +35 -0
- data/node_modules/jade/lib/nodes/comment.js +32 -0
- data/node_modules/jade/lib/nodes/doctype.js +29 -0
- data/node_modules/jade/lib/nodes/each.js +35 -0
- data/node_modules/jade/lib/nodes/filter.js +35 -0
- data/node_modules/jade/lib/nodes/index.js +20 -0
- data/node_modules/jade/lib/nodes/literal.js +32 -0
- data/node_modules/jade/lib/nodes/mixin.js +36 -0
- data/node_modules/jade/lib/nodes/node.js +25 -0
- data/node_modules/jade/lib/nodes/tag.js +95 -0
- data/node_modules/jade/lib/nodes/text.js +36 -0
- data/node_modules/jade/lib/parser.js +714 -0
- data/node_modules/jade/lib/runtime.js +174 -0
- data/node_modules/jade/lib/self-closing.js +19 -0
- data/node_modules/jade/lib/utils.js +49 -0
- data/node_modules/jade/node_modules/commander/.npmignore +4 -0
- data/node_modules/jade/node_modules/commander/.travis.yml +4 -0
- data/node_modules/jade/node_modules/commander/History.md +107 -0
- data/node_modules/jade/node_modules/commander/Makefile +7 -0
- data/node_modules/jade/node_modules/commander/Readme.md +262 -0
- data/node_modules/jade/node_modules/commander/index.js +2 -0
- data/node_modules/jade/node_modules/commander/lib/commander.js +1026 -0
- data/node_modules/jade/node_modules/commander/package.json +39 -0
- data/node_modules/jade/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/jade/node_modules/mkdirp/.travis.yml +4 -0
- data/node_modules/jade/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/jade/node_modules/mkdirp/README.markdown +61 -0
- data/node_modules/jade/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/jade/node_modules/mkdirp/index.js +82 -0
- data/node_modules/jade/node_modules/mkdirp/package.json +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/jade/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/jade/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/jade/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/jade/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/jade/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/jade/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/jade/package.json +53 -0
- data/node_modules/jade/runtime.js +179 -0
- data/node_modules/jade/runtime.min.js +1 -0
- data/node_modules/jade/test.jade +7 -0
- data/node_modules/jade/testing/head.jade +5 -0
- data/node_modules/jade/testing/index.jade +1 -0
- data/node_modules/jade/testing/index.js +14 -0
- data/node_modules/jade/testing/layout.jade +10 -0
- data/node_modules/jade/testing/user.jade +7 -0
- data/node_modules/jade/testing/user.js +27 -0
- data/node_modules/optimist/.travis.yml +4 -0
- data/node_modules/optimist/LICENSE +21 -0
- data/node_modules/optimist/README.markdown +487 -0
- data/node_modules/optimist/example/bool.js +10 -0
- data/node_modules/optimist/example/boolean_double.js +7 -0
- data/node_modules/optimist/example/boolean_single.js +7 -0
- data/node_modules/optimist/example/default_hash.js +8 -0
- data/node_modules/optimist/example/default_singles.js +7 -0
- data/node_modules/optimist/example/divide.js +8 -0
- data/node_modules/optimist/example/line_count.js +20 -0
- data/node_modules/optimist/example/line_count_options.js +29 -0
- data/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/node_modules/optimist/example/nonopt.js +4 -0
- data/node_modules/optimist/example/reflect.js +2 -0
- data/node_modules/optimist/example/short.js +3 -0
- data/node_modules/optimist/example/string.js +11 -0
- data/node_modules/optimist/example/usage-options.js +19 -0
- data/node_modules/optimist/example/xup.js +10 -0
- data/node_modules/optimist/index.js +475 -0
- data/node_modules/optimist/node_modules/wordwrap/.npmignore +1 -0
- data/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
- data/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
- data/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
- data/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
- data/node_modules/optimist/node_modules/wordwrap/package.json +45 -0
- data/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
- data/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
- data/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
- data/node_modules/optimist/package.json +55 -0
- data/node_modules/optimist/test/_.js +71 -0
- data/node_modules/optimist/test/_/argv.js +2 -0
- data/node_modules/optimist/test/_/bin.js +3 -0
- data/node_modules/optimist/test/parse.js +420 -0
- data/node_modules/optimist/test/usage.js +292 -0
- data/snowball.gemspec +1 -2
- metadata +601 -21
- data/extconf.rb +0 -9
@@ -0,0 +1,164 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #ffffff;
|
3
|
+
min-width: 960px;
|
4
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
5
|
+
font-size: 13px;
|
6
|
+
font-weight: normal;
|
7
|
+
line-height: 18px;
|
8
|
+
color: #444;
|
9
|
+
margin: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
p {
|
13
|
+
font-size: 13px;
|
14
|
+
font-weight: normal;
|
15
|
+
line-height: 18px;
|
16
|
+
margin-bottom: 9px;
|
17
|
+
}
|
18
|
+
|
19
|
+
ul {
|
20
|
+
padding-left: 20px;
|
21
|
+
}
|
22
|
+
|
23
|
+
li {
|
24
|
+
font-size: 13px;
|
25
|
+
font-weight: normal;
|
26
|
+
line-height: 18px;
|
27
|
+
margin-bottom: 4px;
|
28
|
+
}
|
29
|
+
|
30
|
+
pre {
|
31
|
+
margin-left: 15px;
|
32
|
+
font-family: Inconsolata, Menlo, 'Courier New', monospace;
|
33
|
+
}
|
34
|
+
|
35
|
+
h1 {
|
36
|
+
margin-top: 2px;
|
37
|
+
margin-bottom: 18px;
|
38
|
+
font-size: 30px;
|
39
|
+
line-height: 36px;
|
40
|
+
font-weight: bold;
|
41
|
+
color: #444;
|
42
|
+
}
|
43
|
+
|
44
|
+
h1 small {
|
45
|
+
font-size: 18px;
|
46
|
+
color: #ccc;
|
47
|
+
}
|
48
|
+
|
49
|
+
h3, h4 {
|
50
|
+
font-size: 18px;
|
51
|
+
font-weight: bold;
|
52
|
+
color: #444;
|
53
|
+
}
|
54
|
+
|
55
|
+
h4 {
|
56
|
+
font-size: 16px;
|
57
|
+
}
|
58
|
+
|
59
|
+
.code {
|
60
|
+
border-left: 3px solid #ddd;
|
61
|
+
margin: 5px 3px 8px 15px;
|
62
|
+
padding: 0 0 0 8px;
|
63
|
+
}
|
64
|
+
|
65
|
+
.CodeMirror {
|
66
|
+
padding: 0;
|
67
|
+
border: 1px solid #ccc;
|
68
|
+
}
|
69
|
+
|
70
|
+
.CodeMirror-scroll {
|
71
|
+
height: 200px;
|
72
|
+
}
|
73
|
+
|
74
|
+
.container {
|
75
|
+
margin-left: auto;
|
76
|
+
margin-right: auto;
|
77
|
+
width: 960px;
|
78
|
+
}
|
79
|
+
|
80
|
+
.topbar {
|
81
|
+
top: 0;
|
82
|
+
margin: 0 0 0 480px;
|
83
|
+
padding: 0;
|
84
|
+
width: 300px;
|
85
|
+
}
|
86
|
+
|
87
|
+
.topbar ul {
|
88
|
+
padding: 5px 20px 5px 10px;
|
89
|
+
background-color: #222;
|
90
|
+
margin: 0 10px 0 0;
|
91
|
+
}
|
92
|
+
|
93
|
+
.topbar a {
|
94
|
+
color: #ddd;
|
95
|
+
text-decoration: none;
|
96
|
+
}
|
97
|
+
|
98
|
+
.topbar a:hover {
|
99
|
+
color: #fff;
|
100
|
+
}
|
101
|
+
|
102
|
+
.topbar .nav li {
|
103
|
+
background-color: #222;
|
104
|
+
display: inline;
|
105
|
+
padding: 4px 10px 4px 0px;
|
106
|
+
margin: 0;
|
107
|
+
}
|
108
|
+
|
109
|
+
.container .main {
|
110
|
+
width: 540px;
|
111
|
+
display: inline;
|
112
|
+
float: left;
|
113
|
+
margin-left: 10px;
|
114
|
+
margin-right: 10px;
|
115
|
+
}
|
116
|
+
|
117
|
+
.container .sidebar {
|
118
|
+
width: 350px;
|
119
|
+
display: inline;
|
120
|
+
float: left;
|
121
|
+
margin-left: 30px;
|
122
|
+
margin-right: 10px;
|
123
|
+
}
|
124
|
+
|
125
|
+
.footer {
|
126
|
+
margin-top: 25px;
|
127
|
+
margin-bottom: 25px;
|
128
|
+
color: #555;
|
129
|
+
text-align: center;
|
130
|
+
}
|
131
|
+
|
132
|
+
textarea {
|
133
|
+
font-family: Inconsolata, Monaco, Consolas, "Lucida Console", monospace;
|
134
|
+
font-size: 13px;
|
135
|
+
color: #555;
|
136
|
+
width: 80%;
|
137
|
+
padding: 7px;
|
138
|
+
overflow: auto;
|
139
|
+
}
|
140
|
+
|
141
|
+
table {
|
142
|
+
width: 80%;
|
143
|
+
border: 1px solid #ccc;
|
144
|
+
border-spacing: 0;
|
145
|
+
}
|
146
|
+
|
147
|
+
thead {
|
148
|
+
font-weight: bold;
|
149
|
+
}
|
150
|
+
|
151
|
+
table th, table td {
|
152
|
+
border-left: 1px solid #ccc;
|
153
|
+
padding: 3px 3px 10px 3px;
|
154
|
+
text-align: center;
|
155
|
+
}
|
156
|
+
|
157
|
+
table td {
|
158
|
+
border-top: 1px solid #ccc;
|
159
|
+
}
|
160
|
+
|
161
|
+
tbody tr:nth-child(odd) td {
|
162
|
+
background-color: #eee;
|
163
|
+
}
|
164
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 2.9.0
|
6
|
+
*/
|
7
|
+
(function(){var d=YAHOO.util.Dom,b=YAHOO.util.Event,f=YAHOO.lang,e=YAHOO.widget;YAHOO.widget.TreeView=function(h,g){if(h){this.init(h);}if(g){this.buildTreeFromObject(g);}else{if(f.trim(this._el.innerHTML)){this.buildTreeFromMarkup(h);}}};var c=e.TreeView;c.prototype={id:null,_el:null,_nodes:null,locked:false,_expandAnim:null,_collapseAnim:null,_animCount:0,maxAnim:2,_hasDblClickSubscriber:false,_dblClickTimer:null,currentFocus:null,singleNodeHighlight:false,_currentlyHighlighted:null,setExpandAnim:function(g){this._expandAnim=(e.TVAnim.isValid(g))?g:null;},setCollapseAnim:function(g){this._collapseAnim=(e.TVAnim.isValid(g))?g:null;},animateExpand:function(i,j){if(this._expandAnim&&this._animCount<this.maxAnim){var g=this;var h=e.TVAnim.getAnim(this._expandAnim,i,function(){g.expandComplete(j);});if(h){++this._animCount;this.fireEvent("animStart",{"node":j,"type":"expand"});h.animate();}return true;}return false;},animateCollapse:function(i,j){if(this._collapseAnim&&this._animCount<this.maxAnim){var g=this;var h=e.TVAnim.getAnim(this._collapseAnim,i,function(){g.collapseComplete(j);});if(h){++this._animCount;this.fireEvent("animStart",{"node":j,"type":"collapse"});h.animate();}return true;}return false;},expandComplete:function(g){--this._animCount;this.fireEvent("animComplete",{"node":g,"type":"expand"});},collapseComplete:function(g){--this._animCount;this.fireEvent("animComplete",{"node":g,"type":"collapse"});},init:function(i){this._el=d.get(i);this.id=d.generateId(this._el,"yui-tv-auto-id-");this.createEvent("animStart",this);this.createEvent("animComplete",this);this.createEvent("collapse",this);this.createEvent("collapseComplete",this);this.createEvent("expand",this);this.createEvent("expandComplete",this);this.createEvent("enterKeyPressed",this);this.createEvent("clickEvent",this);this.createEvent("focusChanged",this);var g=this;this.createEvent("dblClickEvent",{scope:this,onSubscribeCallback:function(){g._hasDblClickSubscriber=true;}});this.createEvent("labelClick",this);this.createEvent("highlightEvent",this);this._nodes=[];c.trees[this.id]=this;this.root=new e.RootNode(this);var h=e.LogWriter;if(this._initEditor){this._initEditor();}},buildTreeFromObject:function(g){var h=function(q,n){var m,r,l,k,p,j,o;for(m=0;m<n.length;m++){r=n[m];if(f.isString(r)){l=new e.TextNode(r,q);}else{if(f.isObject(r)){k=r.children;delete r.children;p=r.type||"text";delete r.type;switch(f.isString(p)&&p.toLowerCase()){case"text":l=new e.TextNode(r,q);break;case"menu":l=new e.MenuNode(r,q);break;case"html":l=new e.HTMLNode(r,q);break;default:if(f.isString(p)){j=e[p];}else{j=p;}if(f.isObject(j)){for(o=j;o&&o!==e.Node;o=o.superclass.constructor){}if(o){l=new j(r,q);}else{}}else{}}if(k){h(l,k);}}else{}}}};if(!f.isArray(g)){g=[g];}h(this.root,g);},buildTreeFromMarkup:function(i){var h=function(j){var n,q,m=[],l={},k,o;for(n=d.getFirstChild(j);n;n=d.getNextSibling(n)){switch(n.tagName.toUpperCase()){case"LI":k="";l={expanded:d.hasClass(n,"expanded"),title:n.title||n.alt||null,className:f.trim(n.className.replace(/\bexpanded\b/,""))||null};q=n.firstChild;if(q.nodeType==3){k=f.trim(q.nodeValue.replace(/[\n\t\r]*/g,""));if(k){l.type="text";l.label=k;}else{q=d.getNextSibling(q);}}if(!k){if(q.tagName.toUpperCase()=="A"){l.type="text";l.label=q.innerHTML;l.href=q.href;l.target=q.target;l.title=q.title||q.alt||l.title;}else{l.type="html";var p=document.createElement("div");p.appendChild(q.cloneNode(true));l.html=p.innerHTML;l.hasIcon=true;}}q=d.getNextSibling(q);switch(q&&q.tagName.toUpperCase()){case"UL":case"OL":l.children=h(q);break;}if(YAHOO.lang.JSON){o=n.getAttribute("yuiConfig");if(o){o=YAHOO.lang.JSON.parse(o);l=YAHOO.lang.merge(l,o);}}m.push(l);break;case"UL":case"OL":l={type:"text",label:"",children:h(q)};m.push(l);break;}}return m;};var g=d.getChildrenBy(d.get(i),function(k){var j=k.tagName.toUpperCase();return j=="UL"||j=="OL";});if(g.length){this.buildTreeFromObject(h(g[0]));}else{}},_getEventTargetTdEl:function(h){var i=b.getTarget(h);while(i&&!(i.tagName.toUpperCase()=="TD"&&d.hasClass(i.parentNode,"ygtvrow"))){i=d.getAncestorByTagName(i,"td");}if(f.isNull(i)){return null;}if(/\bygtv(blank)?depthcell/.test(i.className)){return null;}if(i.id){var g=i.id.match(/\bygtv([^\d]*)(.*)/);if(g&&g[2]&&this._nodes[g[2]]){return i;}}return null;},_onClickEvent:function(j){var h=this,l=this._getEventTargetTdEl(j),i,k,g=function(m){i.focus();if(m||!i.href){i.toggle();try{b.preventDefault(j);}catch(n){}}};if(!l){return;}i=this.getNodeByElement(l);if(!i){return;}k=b.getTarget(j);if(d.hasClass(k,i.labelStyle)||d.getAncestorByClassName(k,i.labelStyle)){this.fireEvent("labelClick",i);}if(this._closeEditor){this._closeEditor(false);}if(/\bygtv[tl][mp]h?h?/.test(l.className)){g(true);}else{if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null;}else{if(this._hasDblClickSubscriber){this._dblClickTimer=window.setTimeout(function(){h._dblClickTimer=null;if(h.fireEvent("clickEvent",{event:j,node:i})!==false){g();}},200);}else{if(h.fireEvent("clickEvent",{event:j,node:i})!==false){g();}}}}},_onDblClickEvent:function(g){if(!this._hasDblClickSubscriber){return;}var h=this._getEventTargetTdEl(g);if(!h){return;}if(!(/\bygtv[tl][mp]h?h?/.test(h.className))){this.fireEvent("dblClickEvent",{event:g,node:this.getNodeByElement(h)});if(this._dblClickTimer){window.clearTimeout(this._dblClickTimer);this._dblClickTimer=null;}}},_onMouseOverEvent:function(g){var h;if((h=this._getEventTargetTdEl(g))&&(h=this.getNodeByElement(h))&&(h=h.getToggleEl())){h.className=h.className.replace(/\bygtv([lt])([mp])\b/gi,"ygtv$1$2h");}},_onMouseOutEvent:function(g){var h;if((h=this._getEventTargetTdEl(g))&&(h=this.getNodeByElement(h))&&(h=h.getToggleEl())){h.className=h.className.replace(/\bygtv([lt])([mp])h\b/gi,"ygtv$1$2");}},_onKeyDownEvent:function(l){var n=b.getTarget(l),k=this.getNodeByElement(n),j=k,g=YAHOO.util.KeyListener.KEY;switch(l.keyCode){case g.UP:do{if(j.previousSibling){j=j.previousSibling;}else{j=j.parent;
|
8
|
+
}}while(j&&!j._canHaveFocus());if(j){j.focus();}b.preventDefault(l);break;case g.DOWN:do{if(j.nextSibling){j=j.nextSibling;}else{j.expand();j=(j.children.length||null)&&j.children[0];}}while(j&&!j._canHaveFocus);if(j){j.focus();}b.preventDefault(l);break;case g.LEFT:do{if(j.parent){j=j.parent;}else{j=j.previousSibling;}}while(j&&!j._canHaveFocus());if(j){j.focus();}b.preventDefault(l);break;case g.RIGHT:var i=this,m,h=function(o){i.unsubscribe("expandComplete",h);m(o);};m=function(o){do{if(o.isDynamic()&&!o.childrenRendered){i.subscribe("expandComplete",h);o.expand();o=null;break;}else{o.expand();if(o.children.length){o=o.children[0];}else{o=o.nextSibling;}}}while(o&&!o._canHaveFocus());if(o){o.focus();}};m(j);b.preventDefault(l);break;case g.ENTER:if(k.href){if(k.target){window.open(k.href,k.target);}else{window.location(k.href);}}else{k.toggle();}this.fireEvent("enterKeyPressed",k);b.preventDefault(l);break;case g.HOME:j=this.getRoot();if(j.children.length){j=j.children[0];}if(j._canHaveFocus()){j.focus();}b.preventDefault(l);break;case g.END:j=j.parent.children;j=j[j.length-1];if(j._canHaveFocus()){j.focus();}b.preventDefault(l);break;case 107:case 187:if(l.shiftKey){k.parent.expandAll();}else{k.expand();}break;case 109:case 189:if(l.shiftKey){k.parent.collapseAll();}else{k.collapse();}break;default:break;}},render:function(){var g=this.root.getHtml(),h=this.getEl();h.innerHTML=g;if(!this._hasEvents){b.on(h,"click",this._onClickEvent,this,true);b.on(h,"dblclick",this._onDblClickEvent,this,true);b.on(h,"mouseover",this._onMouseOverEvent,this,true);b.on(h,"mouseout",this._onMouseOutEvent,this,true);b.on(h,"keydown",this._onKeyDownEvent,this,true);}this._hasEvents=true;},getEl:function(){if(!this._el){this._el=d.get(this.id);}return this._el;},regNode:function(g){this._nodes[g.index]=g;},getRoot:function(){return this.root;},setDynamicLoad:function(g,h){this.root.setDynamicLoad(g,h);},expandAll:function(){if(!this.locked){this.root.expandAll();}},collapseAll:function(){if(!this.locked){this.root.collapseAll();}},getNodeByIndex:function(h){var g=this._nodes[h];return(g)?g:null;},getNodeByProperty:function(j,h){for(var g in this._nodes){if(this._nodes.hasOwnProperty(g)){var k=this._nodes[g];if((j in k&&k[j]==h)||(k.data&&h==k.data[j])){return k;}}}return null;},getNodesByProperty:function(k,j){var g=[];for(var h in this._nodes){if(this._nodes.hasOwnProperty(h)){var l=this._nodes[h];if((k in l&&l[k]==j)||(l.data&&j==l.data[k])){g.push(l);}}}return(g.length)?g:null;},getNodesBy:function(j){var g=[];for(var h in this._nodes){if(this._nodes.hasOwnProperty(h)){var k=this._nodes[h];if(j(k)){g.push(k);}}}return(g.length)?g:null;},getNodeByElement:function(i){var j=i,g,h=/ygtv([^\d]*)(.*)/;do{if(j&&j.id){g=j.id.match(h);if(g&&g[2]){return this.getNodeByIndex(g[2]);}}j=j.parentNode;if(!j||!j.tagName){break;}}while(j.id!==this.id&&j.tagName.toLowerCase()!=="body");return null;},getHighlightedNode:function(){return this._currentlyHighlighted;},removeNode:function(h,g){if(h.isRoot()){return false;}var i=h.parent;if(i.parent){i=i.parent;}this._deleteNode(h);if(g&&i&&i.childrenRendered){i.refresh();}return true;},_removeChildren_animComplete:function(g){this.unsubscribe(this._removeChildren_animComplete);this.removeChildren(g.node);},removeChildren:function(g){if(g.expanded){if(this._collapseAnim){this.subscribe("animComplete",this._removeChildren_animComplete,this,true);e.Node.prototype.collapse.call(g);return;}g.collapse();}while(g.children.length){this._deleteNode(g.children[0]);}if(g.isRoot()){e.Node.prototype.expand.call(g);}g.childrenRendered=false;g.dynamicLoadComplete=false;g.updateIcon();},_deleteNode:function(g){this.removeChildren(g);this.popNode(g);},popNode:function(k){var l=k.parent;var h=[];for(var j=0,g=l.children.length;j<g;++j){if(l.children[j]!=k){h[h.length]=l.children[j];}}l.children=h;l.childrenRendered=false;if(k.previousSibling){k.previousSibling.nextSibling=k.nextSibling;}if(k.nextSibling){k.nextSibling.previousSibling=k.previousSibling;}if(this.currentFocus==k){this.currentFocus=null;}if(this._currentlyHighlighted==k){this._currentlyHighlighted=null;}k.parent=null;k.previousSibling=null;k.nextSibling=null;k.tree=null;delete this._nodes[k.index];},destroy:function(){if(this._destroyEditor){this._destroyEditor();}var h=this.getEl();b.removeListener(h,"click");b.removeListener(h,"dblclick");b.removeListener(h,"mouseover");b.removeListener(h,"mouseout");b.removeListener(h,"keydown");for(var g=0;g<this._nodes.length;g++){var j=this._nodes[g];if(j&&j.destroy){j.destroy();}}h.innerHTML="";this._hasEvents=false;},toString:function(){return"TreeView "+this.id;},getNodeCount:function(){return this.getRoot().getNodeCount();},getTreeDefinition:function(){return this.getRoot().getNodeDefinition();},onExpand:function(g){},onCollapse:function(g){},setNodesProperty:function(g,i,h){this.root.setNodesProperty(g,i);if(h){this.root.refresh();}},onEventToggleHighlight:function(h){var g;if("node" in h&&h.node instanceof e.Node){g=h.node;}else{if(h instanceof e.Node){g=h;}else{return false;}}g.toggleHighlight();return false;}};var a=c.prototype;a.draw=a.render;YAHOO.augment(c,YAHOO.util.EventProvider);c.nodeCount=0;c.trees=[];c.getTree=function(h){var g=c.trees[h];return(g)?g:null;};c.getNode=function(h,i){var g=c.getTree(h);return(g)?g.getNodeByIndex(i):null;};c.FOCUS_CLASS_NAME="ygtvfocus";})();(function(){var b=YAHOO.util.Dom,c=YAHOO.lang,a=YAHOO.util.Event;YAHOO.widget.Node=function(f,e,d){if(f){this.init(f,e,d);}};YAHOO.widget.Node.prototype={index:0,children:null,tree:null,data:null,parent:null,depth:-1,expanded:false,multiExpand:true,renderHidden:false,childrenRendered:false,dynamicLoadComplete:false,previousSibling:null,nextSibling:null,_dynLoad:false,dataLoader:null,isLoading:false,hasIcon:true,iconMode:0,nowrap:false,isLeaf:false,contentStyle:"",contentElId:null,enableHighlight:true,highlightState:0,propagateHighlightUp:false,propagateHighlightDown:false,className:null,_type:"Node",init:function(g,f,d){this.data={};
|
9
|
+
this.children=[];this.index=YAHOO.widget.TreeView.nodeCount;++YAHOO.widget.TreeView.nodeCount;this.contentElId="ygtvcontentel"+this.index;if(c.isObject(g)){for(var e in g){if(g.hasOwnProperty(e)){if(e.charAt(0)!="_"&&!c.isUndefined(this[e])&&!c.isFunction(this[e])){this[e]=g[e];}else{this.data[e]=g[e];}}}}if(!c.isUndefined(d)){this.expanded=d;}this.createEvent("parentChange",this);if(f){f.appendChild(this);}},applyParent:function(e){if(!e){return false;}this.tree=e.tree;this.parent=e;this.depth=e.depth+1;this.tree.regNode(this);e.childrenRendered=false;for(var f=0,d=this.children.length;f<d;++f){this.children[f].applyParent(this);}this.fireEvent("parentChange");return true;},appendChild:function(e){if(this.hasChildren()){var d=this.children[this.children.length-1];d.nextSibling=e;e.previousSibling=d;}this.children[this.children.length]=e;e.applyParent(this);if(this.childrenRendered&&this.expanded){this.getChildrenEl().style.display="";}return e;},appendTo:function(d){return d.appendChild(this);},insertBefore:function(d){var f=d.parent;if(f){if(this.tree){this.tree.popNode(this);}var e=d.isChildOf(f);f.children.splice(e,0,this);if(d.previousSibling){d.previousSibling.nextSibling=this;}this.previousSibling=d.previousSibling;this.nextSibling=d;d.previousSibling=this;this.applyParent(f);}return this;},insertAfter:function(d){var f=d.parent;if(f){if(this.tree){this.tree.popNode(this);}var e=d.isChildOf(f);if(!d.nextSibling){this.nextSibling=null;return this.appendTo(f);}f.children.splice(e+1,0,this);d.nextSibling.previousSibling=this;this.previousSibling=d;this.nextSibling=d.nextSibling;d.nextSibling=this;this.applyParent(f);}return this;},isChildOf:function(e){if(e&&e.children){for(var f=0,d=e.children.length;f<d;++f){if(e.children[f]===this){return f;}}}return -1;},getSiblings:function(){var d=this.parent.children.slice(0);for(var e=0;e<d.length&&d[e]!=this;e++){}d.splice(e,1);if(d.length){return d;}return null;},showChildren:function(){if(!this.tree.animateExpand(this.getChildrenEl(),this)){if(this.hasChildren()){this.getChildrenEl().style.display="";}}},hideChildren:function(){if(!this.tree.animateCollapse(this.getChildrenEl(),this)){this.getChildrenEl().style.display="none";}},getElId:function(){return"ygtv"+this.index;},getChildrenElId:function(){return"ygtvc"+this.index;},getToggleElId:function(){return"ygtvt"+this.index;},getEl:function(){return b.get(this.getElId());},getChildrenEl:function(){return b.get(this.getChildrenElId());},getToggleEl:function(){return b.get(this.getToggleElId());},getContentEl:function(){return b.get(this.contentElId);},collapse:function(){if(!this.expanded){return;}var d=this.tree.onCollapse(this);if(false===d){return;}d=this.tree.fireEvent("collapse",this);if(false===d){return;}if(!this.getEl()){this.expanded=false;}else{this.hideChildren();this.expanded=false;this.updateIcon();}d=this.tree.fireEvent("collapseComplete",this);},expand:function(f){if(this.isLoading||(this.expanded&&!f)){return;}var d=true;if(!f){d=this.tree.onExpand(this);if(false===d){return;}d=this.tree.fireEvent("expand",this);}if(false===d){return;}if(!this.getEl()){this.expanded=true;return;}if(!this.childrenRendered){this.getChildrenEl().innerHTML=this.renderChildren();}else{}this.expanded=true;this.updateIcon();if(this.isLoading){this.expanded=false;return;}if(!this.multiExpand){var g=this.getSiblings();for(var e=0;g&&e<g.length;++e){if(g[e]!=this&&g[e].expanded){g[e].collapse();}}}this.showChildren();d=this.tree.fireEvent("expandComplete",this);},updateIcon:function(){if(this.hasIcon){var d=this.getToggleEl();if(d){d.className=d.className.replace(/\bygtv(([tl][pmn]h?)|(loading))\b/gi,this.getStyle());}}d=b.get("ygtvtableel"+this.index);if(d){if(this.expanded){b.replaceClass(d,"ygtv-collapsed","ygtv-expanded");}else{b.replaceClass(d,"ygtv-expanded","ygtv-collapsed");}}},getStyle:function(){if(this.isLoading){return"ygtvloading";}else{var e=(this.nextSibling)?"t":"l";var d="n";if(this.hasChildren(true)||(this.isDynamic()&&!this.getIconMode())){d=(this.expanded)?"m":"p";}return"ygtv"+e+d;}},getHoverStyle:function(){var d=this.getStyle();if(this.hasChildren(true)&&!this.isLoading){d+="h";}return d;},expandAll:function(){var d=this.children.length;for(var e=0;e<d;++e){var f=this.children[e];if(f.isDynamic()){break;}else{if(!f.multiExpand){break;}else{f.expand();f.expandAll();}}}},collapseAll:function(){for(var d=0;d<this.children.length;++d){this.children[d].collapse();this.children[d].collapseAll();}},setDynamicLoad:function(d,e){if(d){this.dataLoader=d;this._dynLoad=true;}else{this.dataLoader=null;this._dynLoad=false;}if(e){this.iconMode=e;}},isRoot:function(){return(this==this.tree.root);},isDynamic:function(){if(this.isLeaf){return false;}else{return(!this.isRoot()&&(this._dynLoad||this.tree.root._dynLoad));}},getIconMode:function(){return(this.iconMode||this.tree.root.iconMode);},hasChildren:function(d){if(this.isLeaf){return false;}else{return(this.children.length>0||(d&&this.isDynamic()&&!this.dynamicLoadComplete));}},toggle:function(){if(!this.tree.locked&&(this.hasChildren(true)||this.isDynamic())){if(this.expanded){this.collapse();}else{this.expand();}}},getHtml:function(){this.childrenRendered=false;return['<div class="ygtvitem" id="',this.getElId(),'">',this.getNodeHtml(),this.getChildrenHtml(),"</div>"].join("");},getChildrenHtml:function(){var d=[];d[d.length]='<div class="ygtvchildren" id="'+this.getChildrenElId()+'"';if(!this.expanded||!this.hasChildren()){d[d.length]=' style="display:none;"';}d[d.length]=">";if((this.hasChildren(true)&&this.expanded)||(this.renderHidden&&!this.isDynamic())){d[d.length]=this.renderChildren();}d[d.length]="</div>";return d.join("");},renderChildren:function(){var d=this;if(this.isDynamic()&&!this.dynamicLoadComplete){this.isLoading=true;this.tree.locked=true;if(this.dataLoader){setTimeout(function(){d.dataLoader(d,function(){d.loadComplete();});},10);}else{if(this.tree.root.dataLoader){setTimeout(function(){d.tree.root.dataLoader(d,function(){d.loadComplete();
|
10
|
+
});},10);}else{return"Error: data loader not found or not specified.";}}return"";}else{return this.completeRender();}},completeRender:function(){var e=[];for(var d=0;d<this.children.length;++d){e[e.length]=this.children[d].getHtml();}this.childrenRendered=true;return e.join("");},loadComplete:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.propagateHighlightDown){if(this.highlightState===1&&!this.tree.singleNodeHighlight){for(var d=0;d<this.children.length;d++){this.children[d].highlight(true);}}else{if(this.highlightState===0||this.tree.singleNodeHighlight){for(d=0;d<this.children.length;d++){this.children[d].unhighlight(true);}}}}this.dynamicLoadComplete=true;this.isLoading=false;this.expand(true);this.tree.locked=false;},getAncestor:function(e){if(e>=this.depth||e<0){return null;}var d=this.parent;while(d.depth>e){d=d.parent;}return d;},getDepthStyle:function(d){return(this.getAncestor(d).nextSibling)?"ygtvdepthcell":"ygtvblankdepthcell";},getNodeHtml:function(){var e=[];e[e.length]='<table id="ygtvtableel'+this.index+'" border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth'+this.depth;e[e.length]=" ygtv-"+(this.expanded?"expanded":"collapsed");if(this.enableHighlight){e[e.length]=" ygtv-highlight"+this.highlightState;}if(this.className){e[e.length]=" "+this.className;}e[e.length]='"><tr class="ygtvrow">';for(var d=0;d<this.depth;++d){e[e.length]='<td class="ygtvcell '+this.getDepthStyle(d)+'"><div class="ygtvspacer"></div></td>';}if(this.hasIcon){e[e.length]='<td id="'+this.getToggleElId();e[e.length]='" class="ygtvcell ';e[e.length]=this.getStyle();e[e.length]='"><a href="#" class="ygtvspacer"> </a></td>';}e[e.length]='<td id="'+this.contentElId;e[e.length]='" class="ygtvcell ';e[e.length]=this.contentStyle+' ygtvcontent" ';e[e.length]=(this.nowrap)?' nowrap="nowrap" ':"";e[e.length]=" >";e[e.length]=this.getContentHtml();e[e.length]="</td></tr></table>";return e.join("");},getContentHtml:function(){return"";},refresh:function(){this.getChildrenEl().innerHTML=this.completeRender();if(this.hasIcon){var d=this.getToggleEl();if(d){d.className=d.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle());}}},toString:function(){return this._type+" ("+this.index+")";},_focusHighlightedItems:[],_focusedItem:null,_canHaveFocus:function(){return this.getEl().getElementsByTagName("a").length>0;},_removeFocus:function(){if(this._focusedItem){a.removeListener(this._focusedItem,"blur");this._focusedItem=null;}var d;while((d=this._focusHighlightedItems.shift())){b.removeClass(d,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);}},focus:function(){var f=false,d=this;if(this.tree.currentFocus){this.tree.currentFocus._removeFocus();}var e=function(g){if(g.parent){e(g.parent);g.parent.expand();}};e(this);b.getElementsBy(function(g){return(/ygtv(([tl][pmn]h?)|(content))/).test(g.className);},"td",d.getEl().firstChild,function(h){b.addClass(h,YAHOO.widget.TreeView.FOCUS_CLASS_NAME);if(!f){var g=h.getElementsByTagName("a");if(g.length){g=g[0];g.focus();d._focusedItem=g;a.on(g,"blur",function(){d.tree.fireEvent("focusChanged",{oldNode:d.tree.currentFocus,newNode:null});d.tree.currentFocus=null;d._removeFocus();});f=true;}}d._focusHighlightedItems.push(h);});if(f){this.tree.fireEvent("focusChanged",{oldNode:this.tree.currentFocus,newNode:this});this.tree.currentFocus=this;}else{this.tree.fireEvent("focusChanged",{oldNode:d.tree.currentFocus,newNode:null});this.tree.currentFocus=null;this._removeFocus();}return f;},getNodeCount:function(){for(var d=0,e=0;d<this.children.length;d++){e+=this.children[d].getNodeCount();}return e+1;},getNodeDefinition:function(){if(this.isDynamic()){return false;}var g,d=c.merge(this.data),f=[];if(this.expanded){d.expanded=this.expanded;}if(!this.multiExpand){d.multiExpand=this.multiExpand;}if(this.renderHidden){d.renderHidden=this.renderHidden;}if(!this.hasIcon){d.hasIcon=this.hasIcon;}if(this.nowrap){d.nowrap=this.nowrap;}if(this.className){d.className=this.className;}if(this.editable){d.editable=this.editable;}if(!this.enableHighlight){d.enableHighlight=this.enableHighlight;}if(this.highlightState){d.highlightState=this.highlightState;}if(this.propagateHighlightUp){d.propagateHighlightUp=this.propagateHighlightUp;}if(this.propagateHighlightDown){d.propagateHighlightDown=this.propagateHighlightDown;}d.type=this._type;for(var e=0;e<this.children.length;e++){g=this.children[e].getNodeDefinition();if(g===false){return false;}f.push(g);}if(f.length){d.children=f;}return d;},getToggleLink:function(){return"return false;";},setNodesProperty:function(d,g,f){if(d.charAt(0)!="_"&&!c.isUndefined(this[d])&&!c.isFunction(this[d])){this[d]=g;}else{this.data[d]=g;}for(var e=0;e<this.children.length;e++){this.children[e].setNodesProperty(d,g);}if(f){this.refresh();}},toggleHighlight:function(){if(this.enableHighlight){if(this.highlightState==1){this.unhighlight();}else{this.highlight();}}},highlight:function(e){if(this.enableHighlight){if(this.tree.singleNodeHighlight){if(this.tree._currentlyHighlighted){this.tree._currentlyHighlighted.unhighlight(e);}this.tree._currentlyHighlighted=this;}this.highlightState=1;this._setHighlightClassName();if(!this.tree.singleNodeHighlight){if(this.propagateHighlightDown){for(var d=0;d<this.children.length;d++){this.children[d].highlight(true);}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted();}}}if(!e){this.tree.fireEvent("highlightEvent",this);}}},unhighlight:function(e){if(this.enableHighlight){this.tree._currentlyHighlighted=null;this.highlightState=0;this._setHighlightClassName();if(!this.tree.singleNodeHighlight){if(this.propagateHighlightDown){for(var d=0;d<this.children.length;d++){this.children[d].unhighlight(true);}}if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted();}}}if(!e){this.tree.fireEvent("highlightEvent",this);}}},_childrenHighlighted:function(){var f=false,e=false;if(this.enableHighlight){for(var d=0;d<this.children.length;d++){switch(this.children[d].highlightState){case 0:e=true;
|
11
|
+
break;case 1:f=true;break;case 2:f=e=true;break;}}if(f&&e){this.highlightState=2;}else{if(f){this.highlightState=1;}else{this.highlightState=0;}}this._setHighlightClassName();if(this.propagateHighlightUp){if(this.parent){this.parent._childrenHighlighted();}}}},_setHighlightClassName:function(){var d=b.get("ygtvtableel"+this.index);if(d){d.className=d.className.replace(/\bygtv-highlight\d\b/gi,"ygtv-highlight"+this.highlightState);}}};YAHOO.augment(YAHOO.widget.Node,YAHOO.util.EventProvider);})();YAHOO.widget.RootNode=function(a){this.init(null,null,true);this.tree=a;};YAHOO.extend(YAHOO.widget.RootNode,YAHOO.widget.Node,{_type:"RootNode",getNodeHtml:function(){return"";},toString:function(){return this._type;},loadComplete:function(){this.tree.draw();},getNodeCount:function(){for(var a=0,b=0;a<this.children.length;a++){b+=this.children[a].getNodeCount();}return b;},getNodeDefinition:function(){for(var c,a=[],b=0;b<this.children.length;b++){c=this.children[b].getNodeDefinition();if(c===false){return false;}a.push(c);}return a;},collapse:function(){},expand:function(){},getSiblings:function(){return null;},focus:function(){}});(function(){var b=YAHOO.util.Dom,c=YAHOO.lang,a=YAHOO.util.Event;YAHOO.widget.TextNode=function(f,e,d){if(f){if(c.isString(f)){f={label:f};}this.init(f,e,d);this.setUpLabel(f);}};YAHOO.extend(YAHOO.widget.TextNode,YAHOO.widget.Node,{labelStyle:"ygtvlabel",labelElId:null,label:null,title:null,href:null,target:"_self",_type:"TextNode",setUpLabel:function(d){if(c.isString(d)){d={label:d};}else{if(d.style){this.labelStyle=d.style;}}this.label=d.label;this.labelElId="ygtvlabelel"+this.index;},getLabelEl:function(){return b.get(this.labelElId);},getContentHtml:function(){var d=[];d[d.length]=this.href?"<a":"<span";d[d.length]=' id="'+c.escapeHTML(this.labelElId)+'"';d[d.length]=' class="'+c.escapeHTML(this.labelStyle)+'"';if(this.href){d[d.length]=' href="'+c.escapeHTML(this.href)+'"';d[d.length]=' target="'+c.escapeHTML(this.target)+'"';}if(this.title){d[d.length]=' title="'+c.escapeHTML(this.title)+'"';}d[d.length]=" >";d[d.length]=c.escapeHTML(this.label);d[d.length]=this.href?"</a>":"</span>";return d.join("");},getNodeDefinition:function(){var d=YAHOO.widget.TextNode.superclass.getNodeDefinition.call(this);if(d===false){return false;}d.label=this.label;if(this.labelStyle!="ygtvlabel"){d.style=this.labelStyle;}if(this.title){d.title=this.title;}if(this.href){d.href=this.href;}if(this.target!="_self"){d.target=this.target;}return d;},toString:function(){return YAHOO.widget.TextNode.superclass.toString.call(this)+": "+this.label;},onLabelClick:function(){return false;},refresh:function(){YAHOO.widget.TextNode.superclass.refresh.call(this);var d=this.getLabelEl();d.innerHTML=this.label;if(d.tagName.toUpperCase()=="A"){d.href=this.href;d.target=this.target;}}});})();YAHOO.widget.MenuNode=function(c,b,a){YAHOO.widget.MenuNode.superclass.constructor.call(this,c,b,a);this.multiExpand=false;};YAHOO.extend(YAHOO.widget.MenuNode,YAHOO.widget.TextNode,{_type:"MenuNode"});(function(){var b=YAHOO.util.Dom,c=YAHOO.lang,a=YAHOO.util.Event;var d=function(h,g,f,e){if(h){this.init(h,g,f);this.initContent(h,e);}};YAHOO.widget.HTMLNode=d;YAHOO.extend(d,YAHOO.widget.Node,{contentStyle:"ygtvhtml",html:null,_type:"HTMLNode",initContent:function(f,e){this.setHtml(f);this.contentElId="ygtvcontentel"+this.index;if(!c.isUndefined(e)){this.hasIcon=e;}},setHtml:function(f){this.html=(c.isObject(f)&&"html" in f)?f.html:f;var e=this.getContentEl();if(e){if(f.nodeType&&f.nodeType==1&&f.tagName){e.innerHTML="";}else{e.innerHTML=this.html;}}},getContentHtml:function(){if(typeof this.html==="string"){return this.html;}else{d._deferredNodes.push(this);if(!d._timer){d._timer=window.setTimeout(function(){var e;while((e=d._deferredNodes.pop())){e.getContentEl().appendChild(e.html);}d._timer=null;},0);}return"";}},getNodeDefinition:function(){var e=d.superclass.getNodeDefinition.call(this);if(e===false){return false;}e.html=this.html;return e;}});d._deferredNodes=[];d._timer=null;})();(function(){var b=YAHOO.util.Dom,c=YAHOO.lang,a=YAHOO.util.Event,d=YAHOO.widget.Calendar;YAHOO.widget.DateNode=function(g,f,e){YAHOO.widget.DateNode.superclass.constructor.call(this,g,f,e);};YAHOO.extend(YAHOO.widget.DateNode,YAHOO.widget.TextNode,{_type:"DateNode",calendarConfig:null,fillEditorContainer:function(g){var h,f=g.inputContainer;if(c.isUndefined(d)){b.replaceClass(g.editorPanel,"ygtv-edit-DateNode","ygtv-edit-TextNode");YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this,g);return;}if(g.nodeType!=this._type){g.nodeType=this._type;g.saveOnEnter=false;g.node.destroyEditorContents(g);g.inputObject=h=new d(f.appendChild(document.createElement("div")));if(this.calendarConfig){h.cfg.applyConfig(this.calendarConfig,true);h.cfg.fireQueue();}h.selectEvent.subscribe(function(){this.tree._closeEditor(true);},this,true);}else{h=g.inputObject;}g.oldValue=this.label;h.cfg.setProperty("selected",this.label,false);var i=h.cfg.getProperty("DATE_FIELD_DELIMITER");var e=this.label.split(i);h.cfg.setProperty("pagedate",e[h.cfg.getProperty("MDY_MONTH_POSITION")-1]+i+e[h.cfg.getProperty("MDY_YEAR_POSITION")-1]);h.cfg.fireQueue();h.render();h.oDomContainer.focus();},getEditorValue:function(f){if(c.isUndefined(d)){return f.inputElement.value;}else{var h=f.inputObject,g=h.getSelectedDates()[0],e=[];e[h.cfg.getProperty("MDY_DAY_POSITION")-1]=g.getDate();e[h.cfg.getProperty("MDY_MONTH_POSITION")-1]=g.getMonth()+1;e[h.cfg.getProperty("MDY_YEAR_POSITION")-1]=g.getFullYear();return e.join(h.cfg.getProperty("DATE_FIELD_DELIMITER"));}},displayEditedValue:function(g,e){var f=e.node;f.label=g;f.getLabelEl().innerHTML=g;},getNodeDefinition:function(){var e=YAHOO.widget.DateNode.superclass.getNodeDefinition.call(this);if(e===false){return false;}if(this.calendarConfig){e.calendarConfig=this.calendarConfig;}return e;}});})();(function(){var e=YAHOO.util.Dom,f=YAHOO.lang,b=YAHOO.util.Event,d=YAHOO.widget.TreeView,c=d.prototype;d.editorData={active:false,whoHasIt:null,nodeType:null,editorPanel:null,inputContainer:null,buttonsContainer:null,node:null,saveOnEnter:true,oldValue:undefined};
|
12
|
+
c.validator=null;c._initEditor=function(){this.createEvent("editorSaveEvent",this);this.createEvent("editorCancelEvent",this);};c._nodeEditing=function(m){if(m.fillEditorContainer&&m.editable){var i,k,l,j,h=d.editorData;h.active=true;h.whoHasIt=this;if(!h.nodeType){h.editorPanel=i=this.getEl().appendChild(document.createElement("div"));e.addClass(i,"ygtv-label-editor");i.tabIndex=0;l=h.buttonsContainer=i.appendChild(document.createElement("div"));e.addClass(l,"ygtv-button-container");j=l.appendChild(document.createElement("button"));e.addClass(j,"ygtvok");j.innerHTML=" ";j=l.appendChild(document.createElement("button"));e.addClass(j,"ygtvcancel");j.innerHTML=" ";b.on(l,"click",function(q){var r=b.getTarget(q),o=d.editorData,p=o.node,n=o.whoHasIt;if(e.hasClass(r,"ygtvok")){b.stopEvent(q);n._closeEditor(true);}if(e.hasClass(r,"ygtvcancel")){b.stopEvent(q);n._closeEditor(false);}});h.inputContainer=i.appendChild(document.createElement("div"));e.addClass(h.inputContainer,"ygtv-input");b.on(i,"keydown",function(q){var p=d.editorData,n=YAHOO.util.KeyListener.KEY,o=p.whoHasIt;switch(q.keyCode){case n.ENTER:b.stopEvent(q);if(p.saveOnEnter){o._closeEditor(true);}break;case n.ESCAPE:b.stopEvent(q);o._closeEditor(false);break;}});}else{i=h.editorPanel;}h.node=m;if(h.nodeType){e.removeClass(i,"ygtv-edit-"+h.nodeType);}e.addClass(i," ygtv-edit-"+m._type);e.setStyle(i,"display","block");e.setXY(i,e.getXY(m.getContentEl()));i.focus();m.fillEditorContainer(h);return true;}};c.onEventEditNode=function(h){if(h instanceof YAHOO.widget.Node){h.editNode();}else{if(h.node instanceof YAHOO.widget.Node){h.node.editNode();}}return false;};c._closeEditor=function(j){var h=d.editorData,i=h.node,k=true;if(!i||!h.active){return;}if(j){k=h.node.saveEditorValue(h)!==false;}else{this.fireEvent("editorCancelEvent",i);}if(k){e.setStyle(h.editorPanel,"display","none");h.active=false;i.focus();}};c._destroyEditor=function(){var h=d.editorData;if(h&&h.nodeType&&(!h.active||h.whoHasIt===this)){b.removeListener(h.editorPanel,"keydown");b.removeListener(h.buttonContainer,"click");h.node.destroyEditorContents(h);document.body.removeChild(h.editorPanel);h.nodeType=h.editorPanel=h.inputContainer=h.buttonsContainer=h.whoHasIt=h.node=null;h.active=false;}};var g=YAHOO.widget.Node.prototype;g.editable=false;g.editNode=function(){this.tree._nodeEditing(this);};g.fillEditorContainer=null;g.destroyEditorContents=function(h){b.purgeElement(h.inputContainer,true);h.inputContainer.innerHTML="";};g.saveEditorValue=function(h){var j=h.node,k,i=j.tree.validator;k=this.getEditorValue(h);if(f.isFunction(i)){k=i(k,h.oldValue,j);if(f.isUndefined(k)){return false;}}if(this.tree.fireEvent("editorSaveEvent",{newValue:k,oldValue:h.oldValue,node:j})!==false){this.displayEditedValue(k,h);}};g.getEditorValue=function(h){};g.displayEditedValue=function(i,h){};var a=YAHOO.widget.TextNode.prototype;a.fillEditorContainer=function(i){var h;if(i.nodeType!=this._type){i.nodeType=this._type;i.saveOnEnter=true;i.node.destroyEditorContents(i);i.inputElement=h=i.inputContainer.appendChild(document.createElement("input"));}else{h=i.inputElement;}i.oldValue=this.label;h.value=this.label;h.focus();h.select();};a.getEditorValue=function(h){return h.inputElement.value;};a.displayEditedValue=function(j,h){var i=h.node;i.label=j;i.getLabelEl().innerHTML=j;};a.destroyEditorContents=function(h){h.inputContainer.innerHTML="";};})();YAHOO.widget.TVAnim=function(){return{FADE_IN:"TVFadeIn",FADE_OUT:"TVFadeOut",getAnim:function(b,a,c){if(YAHOO.widget[b]){return new YAHOO.widget[b](a,c);}else{return null;}},isValid:function(a){return(YAHOO.widget[a]);}};}();YAHOO.widget.TVFadeIn=function(a,b){this.el=a;this.callback=b;};YAHOO.widget.TVFadeIn.prototype={animate:function(){var e=this;var d=this.el.style;d.opacity=0.1;d.filter="alpha(opacity=10)";d.display="";var c=0.4;var b=new YAHOO.util.Anim(this.el,{opacity:{from:0.1,to:1,unit:""}},c);b.onComplete.subscribe(function(){e.onComplete();});b.animate();},onComplete:function(){this.callback();},toString:function(){return"TVFadeIn";}};YAHOO.widget.TVFadeOut=function(a,b){this.el=a;this.callback=b;};YAHOO.widget.TVFadeOut.prototype={animate:function(){var d=this;var c=0.4;var b=new YAHOO.util.Anim(this.el,{opacity:{from:1,to:0.1,unit:""}},c);b.onComplete.subscribe(function(){d.onComplete();});b.animate();},onComplete:function(){var a=this.el.style;a.display="none";a.opacity=1;a.filter="alpha(opacity=100)";this.callback();},toString:function(){return"TVFadeOut";}};YAHOO.register("treeview",YAHOO.widget.TreeView,{version:"2.9.0",build:"2800"});
|
Binary file
|
data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 2.9.0
|
6
|
+
*/
|
7
|
+
table.ygtvtable{margin-bottom:0;border:0;border-collapse:collapse}td.ygtvcell{border:0;padding:0}a.ygtvspacer{text-decoration:none;outline-style:none;display:block}.ygtvtn{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -5600px no-repeat;cursor:pointer}.ygtvtm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4000px no-repeat}.ygtvtmh,.ygtvtmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -4800px no-repeat}.ygtvtp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -6400px no-repeat}.ygtvtph,.ygtvtphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -7200px no-repeat}.ygtvln{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -1600px no-repeat;cursor:pointer}.ygtvlm{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 0 no-repeat}.ygtvlmh,.ygtvlmhh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -800px no-repeat}.ygtvlp{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -2400px no-repeat}.ygtvlph,.ygtvlphh{width:18px;height:22px;cursor:pointer;background:url(treeview-sprite.gif) 0 -3200px no-repeat;cursor:pointer}.ygtvloading{width:18px;height:22px;background:url(treeview-loading.gif) 0 0 no-repeat}.ygtvdepthcell{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8000px no-repeat}.ygtvblankdepthcell{width:18px;height:22px}* html .ygtvchildren{height:2%}.ygtvlabel,.ygtvlabel:link,.ygtvlabel:visited,.ygtvlabel:hover{margin-left:2px;text-decoration:none;background-color:white;cursor:pointer}.ygtvcontent{cursor:default}.ygtvspacer{height:22px;width:18px}.ygtvfocus{background-color:#c0e0e0;border:0}.ygtvfocus .ygtvlabel,.ygtvfocus .ygtvlabel:link,.ygtvfocus .ygtvlabel:visited,.ygtvfocus .ygtvlabel:hover{background-color:#c0e0e0}.ygtvfocus a{outline-style:none}.ygtvok{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8800px no-repeat}.ygtvok:hover{background:url(treeview-sprite.gif) 0 -8844px no-repeat}.ygtvcancel{width:18px;height:22px;background:url(treeview-sprite.gif) 0 -8822px no-repeat}.ygtvcancel:hover{background:url(treeview-sprite.gif) 0 -8866px no-repeat}.ygtv-label-editor{background-color:#f2f2f2;border:1px solid silver;position:absolute;display:none;overflow:hidden;margin:auto;z-index:9000}.ygtv-edit-TextNode{width:190px}.ygtv-edit-TextNode .ygtvcancel,.ygtv-edit-TextNode .ygtvok{border:0}.ygtv-edit-TextNode .ygtv-button-container{float:right}.ygtv-edit-TextNode .ygtv-input input{width:140px}.ygtv-edit-DateNode .ygtvcancel{border:0}.ygtv-edit-DateNode .ygtvok{display:none}.ygtv-edit-DateNode .ygtv-button-container{text-align:right;margin:auto}.ygtv-highlight .ygtv-highlight1,.ygtv-highlight .ygtv-highlight1 .ygtvlabel{background-color:blue;color:white}.ygtv-highlight .ygtv-highlight2,.ygtv-highlight .ygtv-highlight2 .ygtvlabel{background-color:silver}.ygtv-highlight .ygtv-highlight0 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight1 .ygtvfocus .ygtvlabel,.ygtv-highlight .ygtv-highlight2 .ygtvfocus .ygtvlabel{background-color:#c0e0e0}.ygtv-highlight .ygtvcontent{padding-right:1em}.ygtv-checkbox .ygtv-highlight0 .ygtvcontent{padding-left:1em;background:url(check0.gif) no-repeat}.ygtv-checkbox .ygtv-highlight0 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight1 .ygtvfocus.ygtvcontent,.ygtv-checkbox .ygtv-highlight2 .ygtvfocus.ygtvcontent{background-color:#c0e0e0}.ygtv-checkbox .ygtv-highlight1 .ygtvcontent{padding-left:1em;background:url(check1.gif) no-repeat}.ygtv-checkbox .ygtv-highlight2 .ygtvcontent{padding-left:1em;background:url(check2.gif) no-repeat}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.com/yui/license.html
|
5
|
+
version: 2.9.0
|
6
|
+
*/
|
7
|
+
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
|
8
|
+
}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
|
9
|
+
if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
|
10
|
+
if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
|
11
|
+
if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
|
12
|
+
/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
|
13
|
+
if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
|
14
|
+
}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
/*
|
3
|
+
Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
* Redistributions of source code must retain the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer.
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
12
|
+
documentation and/or other materials provided with the distribution.
|
13
|
+
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
15
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
16
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
17
|
+
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
18
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
19
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
20
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
21
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
22
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
23
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
/*jslint sloppy:true node:true */
|
27
|
+
|
28
|
+
var fs = require('fs'),
|
29
|
+
esprima = require('esprima'),
|
30
|
+
files = process.argv.splice(2);
|
31
|
+
|
32
|
+
if (files.length === 0) {
|
33
|
+
console.log('Usage:');
|
34
|
+
console.log(' esparse file.js');
|
35
|
+
process.exit(1);
|
36
|
+
}
|
37
|
+
|
38
|
+
files.forEach(function (filename) {
|
39
|
+
var content = fs.readFileSync(filename, 'utf-8');
|
40
|
+
console.log(JSON.stringify(esprima.parse(content), null, 4));
|
41
|
+
});
|
42
|
+
/* vim: set sw=4 ts=4 et tw=80 : */
|
@@ -0,0 +1,92 @@
|
|
1
|
+
Update escodegen for the rewrite demo.
|
2
|
+
Update CodeMirror to version 2.23.
|
3
|
+
Collect the last line comment.
|
4
|
+
Dynamically loading Narcissus in the speed comparison page.
|
5
|
+
Show an exemplary coverage analysis result.
|
6
|
+
Generate coverage analysis report.
|
7
|
+
Tree interface for the parse demo.
|
8
|
+
Use increment operator in various scanning functions.
|
9
|
+
Use increment operator in comment handling functions.
|
10
|
+
Unbreak the test suite on older web browsers.
|
11
|
+
Reenable testing with Node.js 0.4.
|
12
|
+
Compensate if invalid regular expression flag is not handled correctly.
|
13
|
+
Mention github.com/Yoric/Marv-the-Tinker.
|
14
|
+
Preserve line terminators in block comments
|
15
|
+
Tolerant mode: ignore with restriction
|
16
|
+
Do not use Object.freeze for various hash tables.
|
17
|
+
Simplify nextChar() function with increment operator.
|
18
|
+
Tolerant mode: ignore return not within a function
|
19
|
+
Import Esmorph code for the Function Trace demo.
|
20
|
+
Remove source modification feature.
|
21
|
+
Reorganize binary node tracking routines.
|
22
|
+
Vary parsing options while testing for invalid syntax.
|
23
|
+
Fix wrong location info when comments are present.
|
24
|
+
Add a test case for do while ended with a semicolon.
|
25
|
+
Add a test case for continue statement with a semicolon.
|
26
|
+
Shuffle the code in wrapTrackingFunction() function.
|
27
|
+
Import escodegen for the Source Rewrite demo.
|
28
|
+
Split code generator from esprima core
|
29
|
+
Add test cases for reserved words as function argument name.
|
30
|
+
Add a test case for using future reserved word as function name.
|
31
|
+
Shuffle the code in parseSourceElement() function.
|
32
|
+
Add a test case for computed member in left hand-side expression.
|
33
|
+
Make note of unreachable case when parsing object property key.
|
34
|
+
Update CodeMirror to version 2.22.
|
35
|
+
Update platform.js to v1.0.0-pre.
|
36
|
+
Temporarily disable Travis CI test on Node.js 0.4.
|
37
|
+
Add a test case to trigger an error due to expecting a keyword.
|
38
|
+
No need to shorten the token value for unexpected token error.
|
39
|
+
Add a test case for (invalid) Unicode escape in regular expression flag.
|
40
|
+
Add a test case for octal directive restriction before strict directive in Program
|
41
|
+
Strict mode: duplicate identifier in function parameter list
|
42
|
+
Add a test case for an error of non-identifier after non-computed property.
|
43
|
+
Syntax errors for duplicate object properties.
|
44
|
+
Fixed property name error message identifiers.
|
45
|
+
Add test cases to capture some escaping in the string literals.
|
46
|
+
Add test cases for invalid octal literals.
|
47
|
+
Add a test case for semicolon after a comment.
|
48
|
+
Add a test case to provoke an error in the object property setter.
|
49
|
+
Add test cases for break and continue followed by a line break.
|
50
|
+
Add a test case for empty source elements.
|
51
|
+
Use assert for better semantics of contract.
|
52
|
+
Reject illegal numeric literal like '10E+'
|
53
|
+
ArrayInitialiser / ObjectInitialiser don't handle end-of-input correctly
|
54
|
+
Add tests to catch various corner cases when handling Unicode literals.
|
55
|
+
Static mapping of token value and its name.
|
56
|
+
Incomplete statement should trigger an error.
|
57
|
+
Remove unused function unpatching after the refactoring.
|
58
|
+
Support space separator as white space
|
59
|
+
Add comment about following V8 error messages.
|
60
|
+
Fix syntax error message strings.
|
61
|
+
Handle LHS in for-in and assignment correctly
|
62
|
+
SyntaxError for 'return' outside function body
|
63
|
+
Mention related projects based on Esprima.
|
64
|
+
IE6 fix for parser demo error reporting.
|
65
|
+
IE6 fixes for labelSet.
|
66
|
+
Fix coding style violations in the new isKeyword() function.
|
67
|
+
Syntax errors for invalid continue/break and label references
|
68
|
+
Faster isKeyword() implementation.
|
69
|
+
Add generator identity test
|
70
|
+
Freeze constant values
|
71
|
+
Remove some invalid Precedence
|
72
|
+
generate() fails on consecutive unary expressions.
|
73
|
+
Optimize moving the index forward instead of calling nextChar().
|
74
|
+
Add API test cases for Mozilla Reflect compatibility.
|
75
|
+
Add support for indentation option in the rewriter demo.
|
76
|
+
New demo to showcase source code rewrite.
|
77
|
+
Simplify nextChar() function.
|
78
|
+
Unterminated block comment should trigger an error.
|
79
|
+
Make the regular expressions for `IdentifierStart` and `IdentifierPart` more compact
|
80
|
+
Strict Mode: restrict with statement
|
81
|
+
Duplicated property check should be robust against special name.
|
82
|
+
Fix code generator with an empty program.
|
83
|
+
Fix generator indentation bug in double nested If statements.
|
84
|
+
Allow some future reserved word in non-strict code.
|
85
|
+
Unnecessary forward slash in json2.js Opera fix.
|
86
|
+
Strict mode: do not allow octal literals.
|
87
|
+
Fixed null literal value property.
|
88
|
+
Clean-up unused variables.
|
89
|
+
Strict mode: trigger an error when using eval and arguments.
|
90
|
+
Mark numeric literal specified as an octal number.
|
91
|
+
Fix Unicode bug with Letter number (Nl) and `\u200C` or `\u200D`.
|
92
|
+
Include the forgotten Python script to generated Unicode regex.
|
@@ -0,0 +1,696 @@
|
|
1
|
+
commit f2dd82b0d3defdedb01c5222e802d56ba47bd93f
|
2
|
+
Author: Ariya Hidayat <ariya.hidayat@gmail.com>
|
3
|
+
Date: Tue Mar 27 17:56:26 2012 -0700
|
4
|
+
|
5
|
+
CodeMirror version 2.23.
|
6
|
+
|
7
|
+
diff --git a/assets/codemirror/codemirror.css b/assets/codemirror/codemirror.css
|
8
|
+
index 5eadb24..2d79f4a 100644
|
9
|
+
--- a/assets/codemirror/codemirror.css
|
10
|
+
+++ b/assets/codemirror/codemirror.css
|
11
|
+
@@ -9,6 +9,7 @@
|
12
|
+
/* This is needed to prevent an IE[67] bug where the scrolled content
|
13
|
+
is visible outside of the scrolling box. */
|
14
|
+
position: relative;
|
15
|
+
+ outline: none;
|
16
|
+
}
|
17
|
+
|
18
|
+
.CodeMirror-gutter {
|
19
|
+
@@ -27,6 +28,7 @@
|
20
|
+
}
|
21
|
+
.CodeMirror-lines {
|
22
|
+
padding: .4em;
|
23
|
+
+ white-space: pre;
|
24
|
+
}
|
25
|
+
|
26
|
+
.CodeMirror pre {
|
27
|
+
diff --git a/assets/codemirror/codemirror.js b/assets/codemirror/codemirror.js
|
28
|
+
index 9c6e65e..5434a8d 100644
|
29
|
+
--- a/assets/codemirror/codemirror.js
|
30
|
+
+++ b/assets/codemirror/codemirror.js
|
31
|
+
@@ -1,4 +1,4 @@
|
32
|
+
-// CodeMirror version 2.22
|
33
|
+
+// CodeMirror version 2.23
|
34
|
+
//
|
35
|
+
// All functions that need access to the editor's state live inside
|
36
|
+
// the CodeMirror function. Below that, at the bottom of the file,
|
37
|
+
@@ -15,9 +15,8 @@ var CodeMirror = (function() {
|
38
|
+
if (defaults.hasOwnProperty(opt))
|
39
|
+
options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
|
40
|
+
|
41
|
+
- var targetDocument = options["document"];
|
42
|
+
// The element in which the editor lives.
|
43
|
+
- var wrapper = targetDocument.createElement("div");
|
44
|
+
+ var wrapper = document.createElement("div");
|
45
|
+
wrapper.className = "CodeMirror" + (options.lineWrapping ? " CodeMirror-wrap" : "");
|
46
|
+
// This mess creates the base DOM structure for the editor.
|
47
|
+
wrapper.innerHTML =
|
48
|
+
@@ -48,7 +47,10 @@ var CodeMirror = (function() {
|
49
|
+
if (!webkit) lineSpace.draggable = true;
|
50
|
+
lineSpace.style.outline = "none";
|
51
|
+
if (options.tabindex != null) input.tabIndex = options.tabindex;
|
52
|
+
+ if (options.autofocus) focusInput();
|
53
|
+
if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
|
54
|
+
+ // Needed to handle Tab key in KHTML
|
55
|
+
+ if (khtml) inputDiv.style.height = "1px", inputDiv.style.position = "absolute";
|
56
|
+
|
57
|
+
// Check for problem with IE innerHTML not working when we have a
|
58
|
+
// P (or similar) parent node.
|
59
|
+
@@ -81,12 +83,13 @@ var CodeMirror = (function() {
|
60
|
+
gutterDirty, callbacks;
|
61
|
+
// Current visible range (may be bigger than the view window).
|
62
|
+
var displayOffset = 0, showingFrom = 0, showingTo = 0, lastSizeC = 0;
|
63
|
+
- // bracketHighlighted is used to remember that a backet has been
|
64
|
+
+ // bracketHighlighted is used to remember that a bracket has been
|
65
|
+
// marked.
|
66
|
+
var bracketHighlighted;
|
67
|
+
// Tracks the maximum line length so that the horizontal scrollbar
|
68
|
+
// can be kept static when scrolling.
|
69
|
+
var maxLine = "", maxWidth;
|
70
|
+
+ var tabCache = {};
|
71
|
+
|
72
|
+
// Initialize the content.
|
73
|
+
operation(function(){setValue(options.value || ""); updateInput = false;})();
|
74
|
+
@@ -124,10 +127,16 @@ var CodeMirror = (function() {
|
75
|
+
if (!options.readOnly) replaceSelection("");
|
76
|
+
}));
|
77
|
+
|
78
|
+
+ // Needed to handle Tab key in KHTML
|
79
|
+
+ if (khtml) connect(code, "mouseup", function() {
|
80
|
+
+ if (document.activeElement == input) input.blur();
|
81
|
+
+ focusInput();
|
82
|
+
+ });
|
83
|
+
+
|
84
|
+
// IE throws unspecified error in certain cases, when
|
85
|
+
// trying to access activeElement before onload
|
86
|
+
- var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { }
|
87
|
+
- if (hasFocus) setTimeout(onFocus, 20);
|
88
|
+
+ var hasFocus; try { hasFocus = (document.activeElement == input); } catch(e) { }
|
89
|
+
+ if (hasFocus || options.autofocus) setTimeout(onFocus, 20);
|
90
|
+
else onBlur();
|
91
|
+
|
92
|
+
function isLine(l) {return l >= 0 && l < doc.size;}
|
93
|
+
@@ -178,17 +187,23 @@ var CodeMirror = (function() {
|
94
|
+
line = clipLine(line == null ? doc.size - 1: line);
|
95
|
+
return getStateBefore(line + 1);
|
96
|
+
},
|
97
|
+
- cursorCoords: function(start){
|
98
|
+
+ cursorCoords: function(start, mode) {
|
99
|
+
if (start == null) start = sel.inverted;
|
100
|
+
- return pageCoords(start ? sel.from : sel.to);
|
101
|
+
+ return this.charCoords(start ? sel.from : sel.to, mode);
|
102
|
+
+ },
|
103
|
+
+ charCoords: function(pos, mode) {
|
104
|
+
+ pos = clipPos(pos);
|
105
|
+
+ if (mode == "local") return localCoords(pos, false);
|
106
|
+
+ if (mode == "div") return localCoords(pos, true);
|
107
|
+
+ return pageCoords(pos);
|
108
|
+
},
|
109
|
+
- charCoords: function(pos){return pageCoords(clipPos(pos));},
|
110
|
+
coordsChar: function(coords) {
|
111
|
+
var off = eltOffset(lineSpace);
|
112
|
+
return coordsChar(coords.x - off.left, coords.y - off.top);
|
113
|
+
},
|
114
|
+
markText: operation(markText),
|
115
|
+
setBookmark: setBookmark,
|
116
|
+
+ findMarksAt: findMarksAt,
|
117
|
+
setMarker: operation(addGutterMarker),
|
118
|
+
clearMarker: operation(removeGutterMarker),
|
119
|
+
setLineClass: operation(setLineClass),
|
120
|
+
@@ -256,6 +271,7 @@ var CodeMirror = (function() {
|
121
|
+
replaceRange: operation(replaceRange),
|
122
|
+
getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));},
|
123
|
+
|
124
|
+
+ triggerOnKeyDown: operation(onKeyDown),
|
125
|
+
execCommand: function(cmd) {return commands[cmd](instance);},
|
126
|
+
// Stuff used by commands, probably not much use to outside code.
|
127
|
+
moveH: operation(moveH),
|
128
|
+
@@ -373,7 +389,7 @@ var CodeMirror = (function() {
|
129
|
+
!posLess(start, sel.from) && !posLess(sel.to, start)) {
|
130
|
+
// Let the drag handler handle this.
|
131
|
+
if (webkit) lineSpace.draggable = true;
|
132
|
+
- var up = connect(targetDocument, "mouseup", operation(function(e2) {
|
133
|
+
+ var up = connect(document, "mouseup", operation(function(e2) {
|
134
|
+
if (webkit) lineSpace.draggable = false;
|
135
|
+
draggingText = false;
|
136
|
+
up();
|
137
|
+
@@ -384,6 +400,8 @@ var CodeMirror = (function() {
|
138
|
+
}
|
139
|
+
}), true);
|
140
|
+
draggingText = true;
|
141
|
+
+ // IE's approach to draggable
|
142
|
+
+ if (lineSpace.dragDrop) lineSpace.dragDrop();
|
143
|
+
return;
|
144
|
+
}
|
145
|
+
e_preventDefault(e);
|
146
|
+
@@ -402,12 +420,7 @@ var CodeMirror = (function() {
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
- var move = connect(targetDocument, "mousemove", operation(function(e) {
|
151
|
+
- clearTimeout(going);
|
152
|
+
- e_preventDefault(e);
|
153
|
+
- extend(e);
|
154
|
+
- }), true);
|
155
|
+
- var up = connect(targetDocument, "mouseup", operation(function(e) {
|
156
|
+
+ function done(e) {
|
157
|
+
clearTimeout(going);
|
158
|
+
var cur = posFromMouse(e);
|
159
|
+
if (cur) setSelectionUser(start, cur);
|
160
|
+
@@ -415,7 +428,14 @@ var CodeMirror = (function() {
|
161
|
+
focusInput();
|
162
|
+
updateInput = true;
|
163
|
+
move(); up();
|
164
|
+
+ }
|
165
|
+
+ var move = connect(document, "mousemove", operation(function(e) {
|
166
|
+
+ clearTimeout(going);
|
167
|
+
+ e_preventDefault(e);
|
168
|
+
+ if (!ie && !e_button(e)) done(e);
|
169
|
+
+ else extend(e);
|
170
|
+
}), true);
|
171
|
+
+ var up = connect(document, "mouseup", operation(done), true);
|
172
|
+
}
|
173
|
+
function onDoubleClick(e) {
|
174
|
+
for (var n = e_target(e); n != wrapper; n = n.parentNode)
|
175
|
+
@@ -464,11 +484,14 @@ var CodeMirror = (function() {
|
176
|
+
}
|
177
|
+
function onDragStart(e) {
|
178
|
+
var txt = getSelection();
|
179
|
+
- // Disabled until further notice. Doesn't work on most browsers,
|
180
|
+
- // and crashes Safari (issue #332).
|
181
|
+
- //htmlEscape(txt);
|
182
|
+
- //e.dataTransfer.setDragImage(escapeElement, 0, 0);
|
183
|
+
e.dataTransfer.setData("Text", txt);
|
184
|
+
+
|
185
|
+
+ // Use dummy image instead of default browsers image.
|
186
|
+
+ if (gecko || chrome) {
|
187
|
+
+ var img = document.createElement('img');
|
188
|
+
+ img.scr = 'data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs='; //1x1 image
|
189
|
+
+ e.dataTransfer.setDragImage(img, 0, 0);
|
190
|
+
+ }
|
191
|
+
}
|
192
|
+
|
193
|
+
function doHandleBinding(bound, dropShift) {
|
194
|
+
@@ -506,13 +529,19 @@ var CodeMirror = (function() {
|
195
|
+
if (e_prop(e, "ctrlKey")) name = "Ctrl-" + name;
|
196
|
+
if (e_prop(e, "metaKey")) name = "Cmd-" + name;
|
197
|
+
|
198
|
+
- if (e_prop(e, "shiftKey"))
|
199
|
+
+ if (e_prop(e, "shiftKey")) {
|
200
|
+
handled = lookupKey("Shift-" + name, options.extraKeys, options.keyMap,
|
201
|
+
- function(b) {return doHandleBinding(b, true);});
|
202
|
+
- if (!handled)
|
203
|
+
+ function(b) {return doHandleBinding(b, true);})
|
204
|
+
+ || lookupKey(name, options.extraKeys, options.keyMap, function(b) {
|
205
|
+
+ if (typeof b == "string" && /^go[A-Z]/.test(b)) return doHandleBinding(b);
|
206
|
+
+ });
|
207
|
+
+ } else {
|
208
|
+
handled = lookupKey(name, options.extraKeys, options.keyMap, doHandleBinding);
|
209
|
+
-
|
210
|
+
- if (handled) e_preventDefault(e);
|
211
|
+
+ }
|
212
|
+
+ if (handled) {
|
213
|
+
+ e_preventDefault(e);
|
214
|
+
+ if (ie) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
|
215
|
+
+ }
|
216
|
+
return handled;
|
217
|
+
}
|
218
|
+
function handleCharBinding(e, ch) {
|
219
|
+
@@ -545,7 +574,7 @@ var CodeMirror = (function() {
|
220
|
+
if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
|
221
|
+
var keyCode = e_prop(e, "keyCode"), charCode = e_prop(e, "charCode");
|
222
|
+
if (window.opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
|
223
|
+
- if (window.opera && !e.which && handleKeyBinding(e)) return;
|
224
|
+
+ if (((window.opera && !e.which) || khtml) && handleKeyBinding(e)) return;
|
225
|
+
var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
|
226
|
+
if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) {
|
227
|
+
if (mode.electricChars.indexOf(ch) > -1)
|
228
|
+
@@ -837,11 +866,11 @@ var CodeMirror = (function() {
|
229
|
+
return scrollIntoView(x, cursor.y, x, cursor.yBot);
|
230
|
+
}
|
231
|
+
function scrollIntoView(x1, y1, x2, y2) {
|
232
|
+
- var pl = paddingLeft(), pt = paddingTop(), lh = textHeight();
|
233
|
+
+ var pl = paddingLeft(), pt = paddingTop();
|
234
|
+
y1 += pt; y2 += pt; x1 += pl; x2 += pl;
|
235
|
+
var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true;
|
236
|
+
- if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1 - 2*lh); scrolled = true;}
|
237
|
+
- else if (y2 > screentop + screen) {scroller.scrollTop = y2 + lh - screen; scrolled = true;}
|
238
|
+
+ if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1); scrolled = true;}
|
239
|
+
+ else if (y2 > screentop + screen) {scroller.scrollTop = y2 - screen; scrolled = true;}
|
240
|
+
|
241
|
+
var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft;
|
242
|
+
var gutterw = options.fixedGutter ? gutter.clientWidth : 0;
|
243
|
+
@@ -921,7 +950,7 @@ var CodeMirror = (function() {
|
244
|
+
throw new Error("BAD PATCH! " + JSON.stringify(intact) + " size=" + (showingTo - showingFrom) +
|
245
|
+
" nodes=" + lineDiv.childNodes.length);
|
246
|
+
|
247
|
+
- if (options.lineWrapping) {
|
248
|
+
+ function checkHeights() {
|
249
|
+
maxWidth = scroller.clientWidth;
|
250
|
+
var curNode = lineDiv.firstChild, heightChanged = false;
|
251
|
+
doc.iter(showingFrom, showingTo, function(line) {
|
252
|
+
@@ -936,6 +965,11 @@ var CodeMirror = (function() {
|
253
|
+
});
|
254
|
+
if (heightChanged)
|
255
|
+
code.style.height = (doc.height * th + 2 * paddingTop()) + "px";
|
256
|
+
+ return heightChanged;
|
257
|
+
+ }
|
258
|
+
+
|
259
|
+
+ if (options.lineWrapping) {
|
260
|
+
+ checkHeights();
|
261
|
+
} else {
|
262
|
+
if (maxWidth == null) maxWidth = stringWidth(maxLine);
|
263
|
+
if (maxWidth > scroller.clientWidth) {
|
264
|
+
@@ -947,8 +981,12 @@ var CodeMirror = (function() {
|
265
|
+
lineSpace.style.width = code.style.width = "";
|
266
|
+
}
|
267
|
+
}
|
268
|
+
+
|
269
|
+
gutter.style.display = gutterDisplay;
|
270
|
+
- if (different || gutterDirty) updateGutter();
|
271
|
+
+ if (different || gutterDirty) {
|
272
|
+
+ // If the gutter grew in size, re-check heights. If those changed, re-draw gutter.
|
273
|
+
+ updateGutter() && options.lineWrapping && checkHeights() && updateGutter();
|
274
|
+
+ }
|
275
|
+
updateSelection();
|
276
|
+
if (!suppressCallback && options.onUpdate) options.onUpdate(instance);
|
277
|
+
return true;
|
278
|
+
@@ -996,16 +1034,17 @@ var CodeMirror = (function() {
|
279
|
+
}
|
280
|
+
// This pass fills in the lines that actually changed.
|
281
|
+
var nextIntact = intact.shift(), curNode = lineDiv.firstChild, j = from;
|
282
|
+
- var scratch = targetDocument.createElement("div"), newElt;
|
283
|
+
+ var scratch = document.createElement("div");
|
284
|
+
doc.iter(from, to, function(line) {
|
285
|
+
if (nextIntact && nextIntact.to == j) nextIntact = intact.shift();
|
286
|
+
if (!nextIntact || nextIntact.from > j) {
|
287
|
+
if (line.hidden) var html = scratch.innerHTML = "<pre></pre>";
|
288
|
+
else {
|
289
|
+
- var html = '<pre>' + line.getHTML(makeTab) + '</pre>';
|
290
|
+
+ var html = '<pre' + (line.className ? ' class="' + line.className + '"' : '') + '>'
|
291
|
+
+ + line.getHTML(makeTab) + '</pre>';
|
292
|
+
// Kludge to make sure the styled element lies behind the selection (by z-index)
|
293
|
+
- if (line.className)
|
294
|
+
- html = '<div style="position: relative"><pre class="' + line.className +
|
295
|
+
+ if (line.bgClassName)
|
296
|
+
+ html = '<div style="position: relative"><pre class="' + line.bgClassName +
|
297
|
+
'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2"> </pre>' + html + "</div>";
|
298
|
+
}
|
299
|
+
scratch.innerHTML = html;
|
300
|
+
@@ -1021,7 +1060,7 @@ var CodeMirror = (function() {
|
301
|
+
if (!options.gutter && !options.lineNumbers) return;
|
302
|
+
var hText = mover.offsetHeight, hEditor = scroller.clientHeight;
|
303
|
+
gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
|
304
|
+
- var html = [], i = showingFrom;
|
305
|
+
+ var html = [], i = showingFrom, normalNode;
|
306
|
+
doc.iter(showingFrom, Math.max(showingTo, showingFrom + 1), function(line) {
|
307
|
+
if (line.hidden) {
|
308
|
+
html.push("<pre></pre>");
|
309
|
+
@@ -1035,17 +1074,24 @@ var CodeMirror = (function() {
|
310
|
+
html.push((marker && marker.style ? '<pre class="' + marker.style + '">' : "<pre>"), text);
|
311
|
+
for (var j = 1; j < line.height; ++j) html.push("<br/> ");
|
312
|
+
html.push("</pre>");
|
313
|
+
+ if (!marker) normalNode = i;
|
314
|
+
}
|
315
|
+
++i;
|
316
|
+
});
|
317
|
+
gutter.style.display = "none";
|
318
|
+
gutterText.innerHTML = html.join("");
|
319
|
+
- var minwidth = String(doc.size).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = "";
|
320
|
+
- while (val.length + pad.length < minwidth) pad += "\u00a0";
|
321
|
+
- if (pad) firstNode.insertBefore(targetDocument.createTextNode(pad), firstNode.firstChild);
|
322
|
+
+ // Make sure scrolling doesn't cause number gutter size to pop
|
323
|
+
+ if (normalNode != null) {
|
324
|
+
+ var node = gutterText.childNodes[normalNode - showingFrom];
|
325
|
+
+ var minwidth = String(doc.size).length, val = eltText(node), pad = "";
|
326
|
+
+ while (val.length + pad.length < minwidth) pad += "\u00a0";
|
327
|
+
+ if (pad) node.insertBefore(document.createTextNode(pad), node.firstChild);
|
328
|
+
+ }
|
329
|
+
gutter.style.display = "";
|
330
|
+
+ var resized = Math.abs((parseInt(lineSpace.style.marginLeft) || 0) - gutter.offsetWidth) > 2;
|
331
|
+
lineSpace.style.marginLeft = gutter.offsetWidth + "px";
|
332
|
+
gutterDirty = false;
|
333
|
+
+ return resized;
|
334
|
+
}
|
335
|
+
function updateSelection() {
|
336
|
+
var collapsed = posEq(sel.from, sel.to);
|
337
|
+
@@ -1066,16 +1112,18 @@ var CodeMirror = (function() {
|
338
|
+
html += '<div class="CodeMirror-selected" style="position: absolute; left: ' + left +
|
339
|
+
'px; top: ' + top + 'px; right: ' + right + 'px; height: ' + height + 'px"></div>';
|
340
|
+
}
|
341
|
+
+ var clientWidth = lineSpace.clientWidth || lineSpace.offsetWidth;
|
342
|
+
+ var clientHeight = lineSpace.clientHeight || lineSpace.offsetHeight;
|
343
|
+
if (sel.from.ch && fromPos.y >= 0) {
|
344
|
+
- var right = sameLine ? lineSpace.clientWidth - toPos.x : 0;
|
345
|
+
+ var right = sameLine ? clientWidth - toPos.x : 0;
|
346
|
+
add(fromPos.x, fromPos.y, right, th);
|
347
|
+
}
|
348
|
+
var middleStart = Math.max(0, fromPos.y + (sel.from.ch ? th : 0));
|
349
|
+
- var middleHeight = Math.min(toPos.y, lineSpace.clientHeight) - middleStart;
|
350
|
+
+ var middleHeight = Math.min(toPos.y, clientHeight) - middleStart;
|
351
|
+
if (middleHeight > 0.2 * th)
|
352
|
+
add(0, middleStart, 0, middleHeight);
|
353
|
+
- if ((!sameLine || !sel.from.ch) && toPos.y < lineSpace.clientHeight - .5 * th)
|
354
|
+
- add(0, toPos.y, lineSpace.clientWidth - toPos.x, th);
|
355
|
+
+ if ((!sameLine || !sel.from.ch) && toPos.y < clientHeight - .5 * th)
|
356
|
+
+ add(0, toPos.y, clientWidth - toPos.x, th);
|
357
|
+
selectionDiv.innerHTML = html;
|
358
|
+
cursor.style.display = "none";
|
359
|
+
selectionDiv.style.display = "";
|
360
|
+
@@ -1105,7 +1153,12 @@ var CodeMirror = (function() {
|
361
|
+
if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}
|
362
|
+
|
363
|
+
// Skip over hidden lines.
|
364
|
+
- if (from.line != oldFrom) from = skipHidden(from, oldFrom, sel.from.ch);
|
365
|
+
+ if (from.line != oldFrom) {
|
366
|
+
+ var from1 = skipHidden(from, oldFrom, sel.from.ch);
|
367
|
+
+ // If there is no non-hidden line left, force visibility on current line
|
368
|
+
+ if (!from1) setLineHidden(from.line, false);
|
369
|
+
+ else from = from1;
|
370
|
+
+ }
|
371
|
+
if (to.line != oldTo) to = skipHidden(to, oldTo, sel.to.ch);
|
372
|
+
|
373
|
+
if (posEq(from, to)) sel.inverted = false;
|
374
|
+
@@ -1114,7 +1167,7 @@ var CodeMirror = (function() {
|
375
|
+
|
376
|
+
if (options.autoClearEmptyLines && posEq(sel.from, sel.to)) {
|
377
|
+
var head = sel.inverted ? from : to;
|
378
|
+
- if (head.line != sel.from.line) {
|
379
|
+
+ if (head.line != sel.from.line && sel.from.line < doc.size) {
|
380
|
+
var oldLine = getLine(sel.from.line);
|
381
|
+
if (/^\s+$/.test(oldLine.text))
|
382
|
+
setTimeout(operation(function() {
|
383
|
+
@@ -1209,6 +1262,7 @@ var CodeMirror = (function() {
|
384
|
+
if (unit == "page") dist = Math.min(scroller.clientHeight, window.innerHeight || document.documentElement.clientHeight);
|
385
|
+
else if (unit == "line") dist = textHeight();
|
386
|
+
var target = coordsChar(pos.x, pos.y + dist * dir + 2);
|
387
|
+
+ if (unit == "page") scroller.scrollTop += localCoords(target, true).y - pos.y;
|
388
|
+
setCursor(target.line, target.ch, true);
|
389
|
+
goalColumn = pos.x;
|
390
|
+
}
|
391
|
+
@@ -1295,9 +1349,10 @@ var CodeMirror = (function() {
|
392
|
+
changes.push({from: 0, to: doc.size});
|
393
|
+
}
|
394
|
+
function makeTab(col) {
|
395
|
+
- var w = options.tabSize - col % options.tabSize;
|
396
|
+
+ var w = options.tabSize - col % options.tabSize, cached = tabCache[w];
|
397
|
+
+ if (cached) return cached;
|
398
|
+
for (var str = '<span class="cm-tab">', i = 0; i < w; ++i) str += " ";
|
399
|
+
- return {html: str + "</span>", width: w};
|
400
|
+
+ return (tabCache[w] = {html: str + "</span>", width: w});
|
401
|
+
}
|
402
|
+
function themeChanged() {
|
403
|
+
scroller.className = scroller.className.replace(/\s*cm-s-\w+/g, "") +
|
404
|
+
@@ -1313,7 +1368,7 @@ var CodeMirror = (function() {
|
405
|
+
var lineN = lineNo(line);
|
406
|
+
min = Math.min(min, lineN); max = Math.max(max, lineN);
|
407
|
+
for (var j = 0; j < mk.length; ++j)
|
408
|
+
- if (mk[j].set == this.set) mk.splice(j--, 1);
|
409
|
+
+ if (mk[j].marker == this) mk.splice(j--, 1);
|
410
|
+
}
|
411
|
+
if (min != Infinity)
|
412
|
+
changes.push({from: min, to: max + 1});
|
413
|
+
@@ -1324,7 +1379,7 @@ var CodeMirror = (function() {
|
414
|
+
var line = this.set[i], mk = line.marked;
|
415
|
+
for (var j = 0; j < mk.length; ++j) {
|
416
|
+
var mark = mk[j];
|
417
|
+
- if (mark.set == this.set) {
|
418
|
+
+ if (mark.marker == this) {
|
419
|
+
if (mark.from != null || mark.to != null) {
|
420
|
+
var found = lineNo(line);
|
421
|
+
if (found != null) {
|
422
|
+
@@ -1341,8 +1396,9 @@ var CodeMirror = (function() {
|
423
|
+
function markText(from, to, className) {
|
424
|
+
from = clipPos(from); to = clipPos(to);
|
425
|
+
var tm = new TextMarker();
|
426
|
+
+ if (!posLess(from, to)) return tm;
|
427
|
+
function add(line, from, to, className) {
|
428
|
+
- getLine(line).addMark(new MarkedText(from, to, className, tm.set));
|
429
|
+
+ getLine(line).addMark(new MarkedText(from, to, className, tm));
|
430
|
+
}
|
431
|
+
if (from.line == to.line) add(from.line, from.ch, to.ch, className);
|
432
|
+
else {
|
433
|
+
@@ -1362,6 +1418,19 @@ var CodeMirror = (function() {
|
434
|
+
return bm;
|
435
|
+
}
|
436
|
+
|
437
|
+
+ function findMarksAt(pos) {
|
438
|
+
+ pos = clipPos(pos);
|
439
|
+
+ var markers = [], marked = getLine(pos.line).marked;
|
440
|
+
+ if (!marked) return markers;
|
441
|
+
+ for (var i = 0, e = marked.length; i < e; ++i) {
|
442
|
+
+ var m = marked[i];
|
443
|
+
+ if ((m.from == null || m.from <= pos.ch) &&
|
444
|
+
+ (m.to == null || m.to >= pos.ch))
|
445
|
+
+ markers.push(m.marker || m);
|
446
|
+
+ }
|
447
|
+
+ return markers;
|
448
|
+
+ }
|
449
|
+
+
|
450
|
+
function addGutterMarker(line, text, className) {
|
451
|
+
if (typeof line == "number") line = getLine(clipLine(line));
|
452
|
+
line.gutterMarker = {text: text, style: className};
|
453
|
+
@@ -1383,10 +1452,11 @@ var CodeMirror = (function() {
|
454
|
+
else return null;
|
455
|
+
return line;
|
456
|
+
}
|
457
|
+
- function setLineClass(handle, className) {
|
458
|
+
+ function setLineClass(handle, className, bgClassName) {
|
459
|
+
return changeLine(handle, function(line) {
|
460
|
+
- if (line.className != className) {
|
461
|
+
+ if (line.className != className || line.bgClassName != bgClassName) {
|
462
|
+
line.className = className;
|
463
|
+
+ line.bgClassName = bgClassName;
|
464
|
+
return true;
|
465
|
+
}
|
466
|
+
});
|
467
|
+
@@ -1400,6 +1470,8 @@ var CodeMirror = (function() {
|
468
|
+
if (hidden && (fline == no || tline == no)) {
|
469
|
+
var from = fline == no ? skipHidden({line: fline, ch: 0}, fline, 0) : sel.from;
|
470
|
+
var to = tline == no ? skipHidden({line: tline, ch: 0}, tline, 0) : sel.to;
|
471
|
+
+ // Can't hide the last visible line, we'd have no place to put the cursor
|
472
|
+
+ if (!to) return;
|
473
|
+
setSelection(from, to);
|
474
|
+
}
|
475
|
+
return (gutterDirty = true);
|
476
|
+
@@ -1420,7 +1492,7 @@ var CodeMirror = (function() {
|
477
|
+
}
|
478
|
+
var marker = line.gutterMarker;
|
479
|
+
return {line: n, handle: line, text: line.text, markerText: marker && marker.text,
|
480
|
+
- markerClass: marker && marker.style, lineClass: line.className};
|
481
|
+
+ markerClass: marker && marker.style, lineClass: line.className, bgClass: line.bgClassName};
|
482
|
+
}
|
483
|
+
|
484
|
+
function stringWidth(str) {
|
485
|
+
@@ -1464,7 +1536,7 @@ var CodeMirror = (function() {
|
486
|
+
var extra = "";
|
487
|
+
// Include extra text at the end to make sure the measured line is wrapped in the right way.
|
488
|
+
if (options.lineWrapping) {
|
489
|
+
- var end = line.text.indexOf(" ", ch + 2);
|
490
|
+
+ var end = line.text.indexOf(" ", ch + 6);
|
491
|
+
extra = htmlEscape(line.text.slice(ch + 1, end < 0 ? line.text.length : end + (ie ? 5 : 0)));
|
492
|
+
}
|
493
|
+
measure.innerHTML = "<pre>" + line.getHTML(makeTab, ch) +
|
494
|
+
@@ -1823,7 +1895,7 @@ var CodeMirror = (function() {
|
495
|
+
pollInterval: 100,
|
496
|
+
undoDepth: 40,
|
497
|
+
tabindex: null,
|
498
|
+
- document: window.document
|
499
|
+
+ autofocus: null
|
500
|
+
};
|
501
|
+
|
502
|
+
var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
|
503
|
+
@@ -1831,7 +1903,7 @@ var CodeMirror = (function() {
|
504
|
+
var win = /Win/.test(navigator.platform);
|
505
|
+
|
506
|
+
// Known modes, by name and by MIME
|
507
|
+
- var modes = {}, mimeModes = {};
|
508
|
+
+ var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
|
509
|
+
CodeMirror.defineMode = function(name, mode) {
|
510
|
+
if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
|
511
|
+
modes[name] = mode;
|
512
|
+
@@ -1842,6 +1914,8 @@ var CodeMirror = (function() {
|
513
|
+
CodeMirror.resolveMode = function(spec) {
|
514
|
+
if (typeof spec == "string" && mimeModes.hasOwnProperty(spec))
|
515
|
+
spec = mimeModes[spec];
|
516
|
+
+ else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec))
|
517
|
+
+ return CodeMirror.resolveMode("application/xml");
|
518
|
+
if (typeof spec == "string") return {name: spec};
|
519
|
+
else return spec || {name: "null"};
|
520
|
+
};
|
521
|
+
@@ -1926,7 +2000,7 @@ var CodeMirror = (function() {
|
522
|
+
keyMap.basic = {
|
523
|
+
"Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
|
524
|
+
"End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
|
525
|
+
- "Delete": "delCharRight", "Backspace": "delCharLeft", "Tab": "indentMore", "Shift-Tab": "indentLess",
|
526
|
+
+ "Delete": "delCharRight", "Backspace": "delCharLeft", "Tab": "insertTab", "Shift-Tab": "indentAuto",
|
527
|
+
"Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
|
528
|
+
};
|
529
|
+
// Note that the save and find-related commands aren't defined by
|
530
|
+
@@ -1937,6 +2011,7 @@ var CodeMirror = (function() {
|
531
|
+
"Ctrl-Left": "goWordLeft", "Ctrl-Right": "goWordRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
|
532
|
+
"Ctrl-Backspace": "delWordLeft", "Ctrl-Delete": "delWordRight", "Ctrl-S": "save", "Ctrl-F": "find",
|
533
|
+
"Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
|
534
|
+
+ "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
|
535
|
+
fallthrough: "basic"
|
536
|
+
};
|
537
|
+
keyMap.macDefault = {
|
538
|
+
@@ -1945,6 +2020,7 @@ var CodeMirror = (function() {
|
539
|
+
"Alt-Right": "goWordRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delWordLeft",
|
540
|
+
"Ctrl-Alt-Backspace": "delWordRight", "Alt-Delete": "delWordRight", "Cmd-S": "save", "Cmd-F": "find",
|
541
|
+
"Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
|
542
|
+
+ "Cmd-[": "indentLess", "Cmd-]": "indentMore",
|
543
|
+
fallthrough: ["basic", "emacsy"]
|
544
|
+
};
|
545
|
+
keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
|
546
|
+
@@ -1987,6 +2063,8 @@ var CodeMirror = (function() {
|
547
|
+
options.value = textarea.value;
|
548
|
+
if (!options.tabindex && textarea.tabindex)
|
549
|
+
options.tabindex = textarea.tabindex;
|
550
|
+
+ if (options.autofocus == null && textarea.getAttribute("autofocus") != null)
|
551
|
+
+ options.autofocus = true;
|
552
|
+
|
553
|
+
function save() {textarea.value = instance.getValue();}
|
554
|
+
if (textarea.form) {
|
555
|
+
@@ -2098,34 +2176,34 @@ var CodeMirror = (function() {
|
556
|
+
};
|
557
|
+
CodeMirror.StringStream = StringStream;
|
558
|
+
|
559
|
+
- function MarkedText(from, to, className, set) {
|
560
|
+
- this.from = from; this.to = to; this.style = className; this.set = set;
|
561
|
+
+ function MarkedText(from, to, className, marker) {
|
562
|
+
+ this.from = from; this.to = to; this.style = className; this.marker = marker;
|
563
|
+
}
|
564
|
+
MarkedText.prototype = {
|
565
|
+
- attach: function(line) { this.set.push(line); },
|
566
|
+
+ attach: function(line) { this.marker.set.push(line); },
|
567
|
+
detach: function(line) {
|
568
|
+
- var ix = indexOf(this.set, line);
|
569
|
+
- if (ix > -1) this.set.splice(ix, 1);
|
570
|
+
+ var ix = indexOf(this.marker.set, line);
|
571
|
+
+ if (ix > -1) this.marker.set.splice(ix, 1);
|
572
|
+
},
|
573
|
+
split: function(pos, lenBefore) {
|
574
|
+
if (this.to <= pos && this.to != null) return null;
|
575
|
+
var from = this.from < pos || this.from == null ? null : this.from - pos + lenBefore;
|
576
|
+
var to = this.to == null ? null : this.to - pos + lenBefore;
|
577
|
+
- return new MarkedText(from, to, this.style, this.set);
|
578
|
+
+ return new MarkedText(from, to, this.style, this.marker);
|
579
|
+
},
|
580
|
+
- dup: function() { return new MarkedText(null, null, this.style, this.set); },
|
581
|
+
+ dup: function() { return new MarkedText(null, null, this.style, this.marker); },
|
582
|
+
clipTo: function(fromOpen, from, toOpen, to, diff) {
|
583
|
+
- if (this.from != null && this.from >= from)
|
584
|
+
- this.from = Math.max(to, this.from) + diff;
|
585
|
+
- if (this.to != null && this.to > from)
|
586
|
+
- this.to = to < this.to ? this.to + diff : from;
|
587
|
+
if (fromOpen && to > this.from && (to < this.to || this.to == null))
|
588
|
+
this.from = null;
|
589
|
+
+ else if (this.from != null && this.from >= from)
|
590
|
+
+ this.from = Math.max(to, this.from) + diff;
|
591
|
+
if (toOpen && (from < this.to || this.to == null) && (from > this.from || this.from == null))
|
592
|
+
this.to = null;
|
593
|
+
+ else if (this.to != null && this.to > from)
|
594
|
+
+ this.to = to < this.to ? this.to + diff : from;
|
595
|
+
},
|
596
|
+
isDead: function() { return this.from != null && this.to != null && this.from >= this.to; },
|
597
|
+
- sameSet: function(x) { return this.set == x.set; }
|
598
|
+
+ sameSet: function(x) { return this.marker == x.marker; }
|
599
|
+
};
|
600
|
+
|
601
|
+
function Bookmark(pos) {
|
602
|
+
@@ -2168,7 +2246,7 @@ var CodeMirror = (function() {
|
603
|
+
this.styles = styles || [text, null];
|
604
|
+
this.text = text;
|
605
|
+
this.height = 1;
|
606
|
+
- this.marked = this.gutterMarker = this.className = this.handlers = null;
|
607
|
+
+ this.marked = this.gutterMarker = this.className = this.bgClassName = this.handlers = null;
|
608
|
+
this.stateAfter = this.parent = this.hidden = null;
|
609
|
+
}
|
610
|
+
Line.inheritMarks = function(text, orig) {
|
611
|
+
@@ -2214,6 +2292,7 @@ var CodeMirror = (function() {
|
612
|
+
if (newmark) {
|
613
|
+
if (!taken.marked) taken.marked = [];
|
614
|
+
taken.marked.push(newmark); newmark.attach(taken);
|
615
|
+
+ if (newmark == mark) mk.splice(i--, 1);
|
616
|
+
}
|
617
|
+
}
|
618
|
+
}
|
619
|
+
@@ -2637,10 +2716,10 @@ var CodeMirror = (function() {
|
620
|
+
if (start < last.start) {
|
621
|
+
for (var i = last.start - start - 1; i >= 0; --i)
|
622
|
+
last.old.unshift(old[i]);
|
623
|
+
- last.added += last.start - start;
|
624
|
+
+ oldoff = Math.min(0, added - old.length);
|
625
|
+
+ last.added += last.start - start + oldoff;
|
626
|
+
last.start = start;
|
627
|
+
- }
|
628
|
+
- else if (last.start < start) {
|
629
|
+
+ } else if (last.start < start) {
|
630
|
+
oldoff = start - last.start;
|
631
|
+
added += oldoff;
|
632
|
+
}
|
633
|
+
@@ -2707,19 +2786,21 @@ var CodeMirror = (function() {
|
634
|
+
|
635
|
+
var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
|
636
|
+
|
637
|
+
- // Detect drag-and-drop
|
638
|
+
- var dragAndDrop = function() {
|
639
|
+
- // IE8 has ondragstart and ondrop properties, but doesn't seem to
|
640
|
+
- // actually support ondragstart the way it's supposed to work.
|
641
|
+
- if (/MSIE [1-8]\b/.test(navigator.userAgent)) return false;
|
642
|
+
- var div = document.createElement('div');
|
643
|
+
- return "draggable" in div;
|
644
|
+
- }();
|
645
|
+
-
|
646
|
+
var gecko = /gecko\/\d{7}/i.test(navigator.userAgent);
|
647
|
+
var ie = /MSIE \d/.test(navigator.userAgent);
|
648
|
+
var ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent);
|
649
|
+
var webkit = /WebKit\//.test(navigator.userAgent);
|
650
|
+
+ var chrome = /Chrome\//.test(navigator.userAgent);
|
651
|
+
+ var khtml = /KHTML\//.test(navigator.userAgent);
|
652
|
+
+
|
653
|
+
+ // Detect drag-and-drop
|
654
|
+
+ var dragAndDrop = function() {
|
655
|
+
+ // There is *some* kind of drag-and-drop support in IE6-8, but I
|
656
|
+
+ // couldn't get it to work yet.
|
657
|
+
+ if (ie_lt9) return false;
|
658
|
+
+ var div = document.createElement('div');
|
659
|
+
+ return "draggable" in div || "dragDrop" in div;
|
660
|
+
+ }();
|
661
|
+
|
662
|
+
var lineSep = "\n";
|
663
|
+
// Feature-detect whether newlines in textareas are converted to \r\n
|
664
|
+
@@ -2873,7 +2954,7 @@ var CodeMirror = (function() {
|
665
|
+
var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
|
666
|
+
19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
|
667
|
+
36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
|
668
|
+
- 46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 186: ";", 187: "=", 188: ",",
|
669
|
+
+ 46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 127: "Delete", 186: ";", 187: "=", 188: ",",
|
670
|
+
189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'", 63276: "PageUp",
|
671
|
+
63277: "PageDown", 63275: "End", 63273: "Home", 63234: "Left", 63232: "Up", 63235: "Right",
|
672
|
+
63233: "Down", 63302: "Insert", 63272: "Delete"};
|
673
|
+
diff --git a/assets/codemirror/javascript.js b/assets/codemirror/javascript.js
|
674
|
+
index b9388bc..462f486 100644
|
675
|
+
--- a/assets/codemirror/javascript.js
|
676
|
+
+++ b/assets/codemirror/javascript.js
|
677
|
+
@@ -319,8 +319,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
678
|
+
kwAllowed: true,
|
679
|
+
cc: [],
|
680
|
+
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
681
|
+
- localVars: null,
|
682
|
+
- context: null,
|
683
|
+
+ localVars: parserConfig.localVars,
|
684
|
+
+ context: parserConfig.localVars && {vars: parserConfig.localVars},
|
685
|
+
indented: 0
|
686
|
+
};
|
687
|
+
},
|
688
|
+
@@ -334,7 +334,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
689
|
+
if (stream.eatSpace()) return null;
|
690
|
+
var style = state.tokenize(stream, state);
|
691
|
+
if (type == "comment") return style;
|
692
|
+
- state.reAllowed = type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/);
|
693
|
+
+ state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
|
694
|
+
state.kwAllowed = type != '.';
|
695
|
+
return parseJS(state, style, type, content, stream);
|
696
|
+
},
|