Browse files

Add node_modules to repo to ease Windows setup.

  • Loading branch information...
1 parent 8ac6900 commit 57fa987c2f04c2985f232b2334631fa487d37727 @jcoglan committed May 27, 2012
Showing with 10,730 additions and 1 deletion.
  1. +0 −1 .gitignore
  2. +1 −0 node_modules/.bin/jsbuild
  3. +445 −0 node_modules/jsclass/CHANGELOG.txt
  4. +38 −0 node_modules/jsclass/LICENSE.txt
  5. +38 −0 node_modules/jsclass/README.txt
  6. +208 −0 node_modules/jsclass/bin/jsbuild
  7. +3 −0 node_modules/jsclass/index.js
  8. BIN node_modules/jsclass/min/assets/bullet_go.png
  9. +183 −0 node_modules/jsclass/min/assets/testui.css
  10. +1 −0 node_modules/jsclass/min/benchmark.js
  11. +1 −0 node_modules/jsclass/min/command.js
  12. +1 −0 node_modules/jsclass/min/comparable.js
  13. +1 −0 node_modules/jsclass/min/console.js
  14. +1 −0 node_modules/jsclass/min/constant_scope.js
  15. +1 −0 node_modules/jsclass/min/core.js
  16. +1 −0 node_modules/jsclass/min/decorator.js
  17. +1 −0 node_modules/jsclass/min/deferrable.js
  18. +1 −0 node_modules/jsclass/min/dom.js
  19. +1 −0 node_modules/jsclass/min/enumerable.js
  20. +1 −0 node_modules/jsclass/min/forwardable.js
  21. +1 −0 node_modules/jsclass/min/hash.js
  22. +1 −0 node_modules/jsclass/min/linked_list.js
  23. +1 −0 node_modules/jsclass/min/loader-browser.js
  24. +1 −0 node_modules/jsclass/min/loader.js
  25. +1 −0 node_modules/jsclass/min/method_chain.js
  26. +1 −0 node_modules/jsclass/min/observable.js
  27. +1 −0 node_modules/jsclass/min/package-browser.js
  28. +1 −0 node_modules/jsclass/min/package.js
  29. +1 −0 node_modules/jsclass/min/proxy.js
  30. +1 −0 node_modules/jsclass/min/range.js
  31. +1 −0 node_modules/jsclass/min/set.js
  32. +1 −0 node_modules/jsclass/min/stack_trace.js
  33. +1 −0 node_modules/jsclass/min/state.js
  34. +1 −0 node_modules/jsclass/min/test.js
  35. +1 −0 node_modules/jsclass/min/tsort.js
  36. +1 −0 node_modules/jsclass/node_modules/.bin/nopt
  37. 0 node_modules/jsclass/node_modules/nopt/.gitignore
  38. +23 −0 node_modules/jsclass/node_modules/nopt/LICENSE
  39. +208 −0 node_modules/jsclass/node_modules/nopt/README.md
  40. +44 −0 node_modules/jsclass/node_modules/nopt/bin/nopt.js
  41. +30 −0 node_modules/jsclass/node_modules/nopt/examples/my-program.js
  42. +23 −0 node_modules/jsclass/node_modules/nopt/node_modules/abbrev/README.md
  43. +33 −0 node_modules/jsclass/node_modules/nopt/node_modules/abbrev/package.json
  44. +43 −0 node_modules/jsclass/node_modules/nopt/package.json
  45. +54 −0 node_modules/jsclass/package.json
  46. BIN node_modules/jsclass/src/assets/bullet_go.png
  47. +183 −0 node_modules/jsclass/src/assets/testui.css
  48. +70 −0 node_modules/jsclass/src/benchmark.js
  49. +93 −0 node_modules/jsclass/src/command.js
  50. +37 −0 node_modules/jsclass/src/comparable.js
  51. +309 −0 node_modules/jsclass/src/console.js
  52. +43 −0 node_modules/jsclass/src/constant_scope.js
  53. +732 −0 node_modules/jsclass/src/core.js
  54. +50 −0 node_modules/jsclass/src/decorator.js
  55. +70 −0 node_modules/jsclass/src/deferrable.js
  56. +153 −0 node_modules/jsclass/src/dom.js
  57. +570 −0 node_modules/jsclass/src/enumerable.js
  58. +22 −0 node_modules/jsclass/src/forwardable.js
  59. +412 −0 node_modules/jsclass/src/hash.js
  60. +114 −0 node_modules/jsclass/src/linked_list.js
  61. +692 −0 node_modules/jsclass/src/loader-browser.js
  62. +833 −0 node_modules/jsclass/src/loader.js
  63. +228 −0 node_modules/jsclass/src/method_chain.js
  64. +55 −0 node_modules/jsclass/src/observable.js
  65. +557 −0 node_modules/jsclass/src/package-browser.js
  66. +698 −0 node_modules/jsclass/src/package.js
  67. +60 −0 node_modules/jsclass/src/proxy.js
  68. +141 −0 node_modules/jsclass/src/range.js
  69. +344 −0 node_modules/jsclass/src/set.js
  70. +177 −0 node_modules/jsclass/src/stack_trace.js
  71. +102 −0 node_modules/jsclass/src/state.js
  72. +2,509 −0 node_modules/jsclass/src/test.js
  73. +75 −0 node_modules/jsclass/src/tsort.js
View
1 .gitignore
@@ -1,3 +1,2 @@
Gemfile.lock
lib
-node_modules
View
1 node_modules/.bin/jsbuild
View
445 node_modules/jsclass/CHANGELOG.txt
@@ -0,0 +1,445 @@
+Version 3.0.7
+TestSwarm build: http://swarm.jcoglan.com/job/121/
+February 22 2012
+================================================================
+
+* Fix a race condition in the AsyncSteps scheduling code
+
+* Make JS.Console stringify DOM nodes successfully in Chrome
+
+
+Version 3.0.6
+TestSwarm build: http://swarm.jcoglan.com/job/119/
+February 20 2012
+================================================================
+
+* Allow packages to contain multiple files as a convenience
+ for loading 3rd-party libraries
+
+* Fix script loading on Adobe AIR
+
+* Fix fetching of scripts over HTTPS in jsbuild, and fail if
+ requests return a non-200 status
+
+* Make sure Module and Method have all the Kernel methods
+
+* Make tests raise an error if a block takes a resume-callback
+ but doesn't call it after 10 seconds
+
+* Change TestSuite.forEach so that test suites run much faster
+
+* Show stack traces for errors during tests, and use sourceURL
+ mapping to improve reporting of errros from scripts loaded
+ over XHR
+
+
+Version 3.0.5
+TestSwarm build: http://swarm.jcoglan.com/job/109/
+December 6 2011
+================================================================
+
+* Allow yields() and returns() to be used on the same stub
+
+* Remove deprecation warnings about Node's sys module
+
+
+Version 3.0.4
+TestSwarm build: http://swarm.jcoglan.com/job/97/
+August 18 2011
+================================================================
+
+* Add JS.load() function as shorthand method for loading files,
+ and JS.cacheBust setting for bypassing the browser cache
+
+* Make jsbuild error output nicer, e.g. don't show Node backtrace
+
+
+Version 3.0.3
+TestSwarm build: http://swarm.jcoglan.com/job/90/
+August 15 2011
+================================================================
+
+* Allow constructors expected to be called with 'new' to be mocked
+ and stubbed in JS.Test
+
+* Enhance browser UI with user agent and success indicator and
+ provide controls for running individual groups of tests
+
+* Send entire test UI snapshot to TestSwarm rather than just a
+ short status summary
+
+* Fix serialization of objects containing circular references
+ in JS.Console.convert()
+
+* Improvements to jsbuild for managing bundles of scripts
+
+
+Version 3.0.2
+TestSwarm build: http://swarm.jcoglan.com/job/70/
+July 16 2011
+================================================================
+
+* Exit with non-zero exit status from JS.Test.autorun() if there
+ are any test failures
+
+* Log test progress at JSON so we can pick up test results using
+ PhantomJS (http://www.phantomjs.org)
+
+* Allow post-test reports to cause the build to fail by returning
+ false from report(). e.g. Coverage can cause a red build if it
+ finds methods that were not called
+
+* Use synchronous console.warn() to produce output in Node, and
+ System.out.print[ln] on Rhino platforms
+
+
+Version 3.0.1
+TestSwarm build: http://swarm.jcoglan.com/job/31/
+June 17 2011
+================================================================
+
+* Adds NPM package and jsbuild command-line program for bundling
+ required modules for deployment, see
+ http://jsclass.jcoglan.com/packages/bundling.html
+
+* When using JS.require(), scripts from the same domain are
+ prefetched over XHR to maximize parallel downloading
+
+* Fixes support for negative mock expectations, e.g.
+ expect(object, 'm').exactly(0)
+
+* Fixes scheduling bugs in FakeClock so that current time remains
+ correct when removing and restoring timers
+
+* Avoids stubbing of setTimeout() inside AsyncSteps, otherwise
+ it becomes very hard to use with FakeClock
+
+
+Version 3.0.0
+TestSwarm build: http://swarm.jcoglan.com/job/19/
+February 28 2011
+================================================================
+
+* All components now run on a much wider array of platforms,
+ see http://jsclass.jcoglan.com/platforms.html
+
+* JS.Class is now tested using its own test framework, JS.Test.
+ See http://jsclass.jcoglan.com/testing.html
+
+* New libraries: Benchmark, Console, Deferrable, OrderedHash,
+ Range, OrderedSet, TSort
+
+* HashSet has become the base Set implementation, and the
+ original Set implementation has been removed
+
+* StackTrace has been totally overhauled to support extensible
+ user-defined tracing functionality
+
+* New core method Module#alias() for aliasing methods
+
+* User-defined keyword methods using Method.keyword()
+
+* JS.Class no longer supports subclassing the Class class
+
+* Module#instanceMethod() returns a Method, not a Function
+
+* Enumerable#grep() now supports selecting by type, e.g.
+ items.grep(Array). It does not support functional predicates
+ like items.grep(function(x) { return x == 0 }), you should use
+ Enumerable#select() for this
+
+* Objects with the same properties, and Arrays with the same
+ elements are now considered equal when used as Hash keys
+
+* MethodChain#fire() is now called MethodChain#__exec__()
+
+* JS.Ruby has been removed
+
+* JS.State now adds states() as a class method, rather than a
+ macro in the class body. All classes using 'inline' states
+ MUST call this method to declare and resolve their states
+
+
+Version 2.1.5
+June 5 2010
+================================================================
+
+* Adds support for Node, Narwhal and Windows Script Host to the
+ JS.Package loading system.
+
+* Adds an `autoload` macro to the package system for quickly
+ configuring modules using filename conventions.
+
+* Renames `require()` to `JS.require()` so as not to conflict
+ with CommonJS module API.
+
+
+Version 2.1.4
+March 9 2010
+================================================================
+
+* Rewritten the package loader to use event listeners to trigger
+ loading of dependencies rather than polling for readiness.
+
+* package.js and loader.js no longer depend on or include the
+ JS.Class core; you must call `require()` to use JS.Class,
+ JS.Module, JS.Interface or JS.Singleton.
+
+* Fix bug in browser package loader in environments that have
+ a global `console` object with no `info()` method.
+
+
+Version 2.1.3
+October 10 2009
+================================================================
+
+* Fixes the load() function in the Packages DSL, and adds some
+ caching to improve lookup times for finding a package by the
+ name of its provided objects.
+
+* Non-existent package errors are now defered until you require()
+ an object rather than being thrown at package definition time.
+ This means require() won't complain about being passed native
+ objects or objects loaded by other means, as long as the
+ required object does actually exist.
+
+* MethodChain now adds instance methods from Modules, and adds
+ methods that were defined *before* MethodChain was loaded.
+
+* State now supports callSuper() to state methods imported from
+ mixins; previously you could only callSuper() to the superclass.
+
+
+Version 2.1.2
+August 11 2009
+================================================================
+
+* LinkedList was defined twice in the stdlib.js bundle; this
+ is now fixed [thanks @skim].
+
+
+Version 2.1.1
+July 6 2009
+================================================================
+
+* Fixes a couple of Set bugs: Set#isProperSuperset had a missing
+ argument, and incomparable objects were being allowed into
+ SortedSet collections.
+
+
+Version 2.1.0
+June 8 2009
+================================================================
+
+* New libraries: ConstantScope, Hash, HashSet.
+
+* Improved package manager, supports parallel downloads in
+ web browsers and now also works on server-side platforms
+ (tested on SpiderMonkey, Rhino and V8). Also supports custom
+ loader functions for integration with Google, YUI etc.
+
+* Enumerable updated with Ruby 1.9 methods, enumerators, and
+ Symbol#to_proc functionality when passing strings to iterators.
+ Any object with a toFunction() method can be used as an iterator.
+ Search methods now use equals() where possible.
+
+* ObjectMethods module is now called Kernel.
+
+* New Kernel methods: tap(), equals(), hash(), enumFor() and methods(),
+ and new Module methods: instanceMethods() and match().
+
+* The double inclusion problem is now fixed, i.e. the following
+ works in JS.Class 2.1:
+
+ A = new JS.Module();
+ C = new JS.Class({ include: A });
+ B = new JS.Module({ foo: function() { return 'B#foo' } });
+ A.include(B);
+ D = new JS.Class({ include: A });
+
+ new C().foo() // -> 'B#foo'
+ new D().foo() // -> 'B#foo'
+
+ (See http://eigenclass.org/hiki/The+double+inclusion+problem)
+
+* Ancestor and method lookups are cached for improved performance.
+
+* Automatic generation of displayName on methods for integration
+ with the WebKit debugger.
+
+* API change: Set#classify now returns a Hash, not an Object.
+
+* PDoc documentation for the core classes.
+
+
+Version 1.6.3
+March 4 2009
+================================================================
+
+* Fixes a bug caused by Function#prototype becoming a non-
+ enumerable property in Safari 4, causing classes to inherit
+ from themselves and leading to stack overflows.
+
+
+Version 2.0.2
+October 1 2008
+================================================================
+
+* The function returned by object.method('callSuper') now behaves
+ correctly when called after the containing method has returned.
+
+
+Version 1.6.2
+October 1 2008
+================================================================
+
+* Fixes some bugs to make various forEach() methods more robust.
+
+
+Version 2.0.1
+September 14 2008
+================================================================
+
+* Fixes a super()-related bug in Command.
+
+* Better handling of 'include' and 'extend' directives such
+ that these are processed before all the other methods are
+ added. This allows mixins to override parts of the including
+ class to affect future method definitions.
+
+* Module#include() has been fixed so that overriding it produces
+ more sane behaviour with respect to classes that delegate to
+ a module behind the scenes to store methods.
+
+
+Version 2.0.0
+August 12 2008
+================================================================
+
+* Complete rewrite of the core, including a proper implementation
+ of Modules with all inheritance semantics based around this.
+ Ruby-style multiple inheritance now works correctly, and
+ callSuper() can call methods from mixins.
+
+* Class and Module are now classes, and must be created using
+ the 'new' keyword.
+
+* Some backward compatibility breaks; see http://jsclass.jcoglan.com/upgrade.html
+
+* New method: Object#__eigen__() returns an object's metaclass.
+
+* Performance of super() calls is much improved.
+
+* New libraries: Package, Set, SortedSet and StackTrace.
+
+* Package provides a dependency-aware system for loading new
+ JavaScript files on demand.
+
+
+Version 1.6.1
+April 17 2008
+================================================================
+
+* Fixes bug in Decorator and Proxy.Virtual caused by the 'klass'
+ property being treated as a method and delegated.
+
+
+Version 1.6.0
+April 10 2008
+================================================================
+
+* Adds a DSL for defining classes in a more Ruby-like way using
+ procedures rather than declarations (experimental).
+
+* New libraries: Forwardable, State.
+
+* The extended() hook is now supported.
+
+* The 'implement' directive is no longer supported.
+
+
+Version 1.5.0
+February 25 2008
+================================================================
+
+* Adds a standard library, including Command, Comparable,
+ Decorator, Enumerable, LinkedList, MethodChain, Observable
+ and Proxy.Virtual.
+
+* Renames _super() to callSuper() to avoid problems with PackR's
+ private variable shrinking.
+
+* Adds an Object#wait() method that calls a MethodChain on the
+ object using setTimeout().
+
+
+Version 1.0.1
+January 14 2008
+================================================================
+
+* Memoizes calls to Object#method() so that the same function
+ object is returned each time.
+
+
+Version 1.0.0
+January 4 2008
+================================================================
+
+* Singleton methods that call super() are now supported.
+
+* Object#is_a() has been renamed to Object#isA().
+
+* Classes now support inherited() and included() hooks.
+
+* Adds Interface class for easier duck-typing checks across
+ several methods.
+
+* New directive 'implement' can be used to check that a class
+ implements some interfaces.
+
+* Singletons are now supported as class-like definitions that
+ yield a single object.
+
+* Module has been added as a way to protect sets of methods by
+ wrapping them in a closure.
+
+* Removes the bindMethods class flag in favour of the more
+ efficient and Ruby-like Ojbect#method(). This can also be
+ used on classes to get bound class methods.
+
+* Exceptions thrown while calling super are no longer swallowed
+ inside the framework.
+
+* Class#method() is now Class#instanceMethod.
+
+
+Version 0.9.2
+November 13 2007
+================================================================
+
+* Fixes bug caused by multiple methods in the same call stack
+ clobbering _super().
+
+* Fixes some inheritance bugs related to class methods and
+ built-in instance methods.
+
+* Improves performance by bootstrapping JavaScript's prototypes
+ for instance method inheritance.
+
+* Allows inheritance from non-JS.Class-based classes.
+
+
+Version 0.9.1
+November 12 2007
+================================================================
+
+* Improves performance by checking whether methods use _super()
+ and only wrapping where necessary.
+
+
+Version 0.9.0
+November 11 2007
+================================================================
+
+* Initial release. Features single inheritance and _super().
+
View
38 node_modules/jsclass/LICENSE.txt
@@ -0,0 +1,38 @@
+JS.Class: Ruby-style JavaScript
+http://jsclass.jcoglan.com
+Copyright (c) 2007-2012 James Coglan and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+Parts of the Software build on techniques from the following open-source
+projects:
+
+* The Prototype framework, (c) 2005-2010 Sam Stephenson (MIT license)
+* Alex Arnell's Inheritance library, (c) 2006 Alex Arnell (MIT license)
+* Base, (c) 2006-2010 Dean Edwards (MIT license)
+
+The Software contains direct translations to JavaScript of these open-source
+Ruby libraries:
+
+* Ruby standard library modules, (c) Yukihiro Matsumoto and contributors (Ruby license)
+* Test::Unit, (c) 2000-2003 Nathaniel Talbott (Ruby license)
+* Context, (c) 2008 Jeremy McAnally (MIT license)
+* EventMachine::Deferrable, (c) 2006-07 Francis Cianfrocca (Ruby license)
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
View
38 node_modules/jsclass/README.txt
@@ -0,0 +1,38 @@
+JS.Class - Ruby-style JavaScript
+===
+
+http://jsclass.jcoglan.com
+
+JS.Class is a JavaScript library for building object-oriented programs using
+Ruby idioms. It implements Ruby's core object/module/class system in JavaScript,
+as well as several standard Ruby libraries and various other extensions.
+
+
+Development
+---
+
+To hack on JS.Class you'll need to be able to build it and run the tests. You
+need Ruby and Jake to do this:
+
+ gem install jake
+ cd path/to/js.class
+ jake
+
+This will build the project and create files in the `build` directory. To run
+the tests:
+
+* Run `test/console.js` with a command-line interpreter
+* Open `test/browser.html` in a web browser
+* For XULRunner run `xulrunner -app test/xulenv/application.ini`
+* For AIR run `adl test/airenv/app.xml`
+
+Some interpreters will skip the tests that use asynchronous APIs, but the tests
+should work using all the platforms listed in `site/src/pages/platforms.haml`.
+
+
+License
+---
+
+Distributed under the MIT license.
+Copyright (c) 2007-2012 James Coglan
+
View
208 node_modules/jsclass/bin/jsbuild
@@ -0,0 +1,208 @@
+#!/usr/bin/env node
+
+var fs = require('fs'),
+ http = require('http'),
+ https = require('https'),
+ path = require('path'),
+ url = require('url'),
+
+ nopt = require('nopt'),
+
+ options = { manifest: path,
+ root: path,
+ external: Boolean,
+ packages: Boolean,
+ bundles: path,
+ output: String,
+ approot: path
+ },
+
+ shorts = { 'm': '--manifest',
+ 'r': '--root',
+ 'e': '--external',
+ 'p': '--packages',
+ 'P': '--no-packages',
+ 'b': '--bundles',
+ 'o': '--output',
+ 'd': '--directory'
+ },
+
+ outputs = ['code', 'paths'],
+
+ params = nopt(options, shorts),
+ include = params.argv.remain.slice(),
+ dir = new RegExp('^' + path.resolve(params.directory || '.') + '/')
+
+JSCLASS_PATH = path.dirname(__filename) + '/../src'
+require(JSCLASS_PATH + '/loader')
+JS.require('JS.Console')
+var C = JS.Console
+
+var die = function(message) {
+ C.consoleFormat('white', 'bgred')
+ C.print('ERROR')
+ C.reset()
+ C.puts(' ' + message)
+ process.exit(1)
+};
+
+if (params.output && outputs.indexOf(params.output) < 0)
+ die('--output must be one of: ' + outputs.join(', '))
+
+if (include.length === 0) {
+ C.bold()
+ C.puts('\nUsage: jsbuild --manifest MANIFEST --root ROOT [OPTIONS] module1 [module2 ...]')
+ C.reset()
+
+ C.puts('\nOptions: --manifest, -m : path to JS.Packages manifest script')
+ C.puts(' --root, -r : directory containing your JavaScripts')
+ C.puts(' --external, -e : include external scripts from the web')
+ C.puts(' --no-packages, -P : don\'t include JS.Package system in build')
+ C.puts(' --bundles, -b : path to bundle definitions file')
+ C.puts(' --output, -o : select output type: \'code\' or \'paths\'')
+ C.puts(' --directory, -d : directory for paths to print relative to')
+
+ C.puts('\ne.g. jsbuild -m path/to/js/manifest.js -r path/to/js/ -eP jQuery JS.Set\n')
+
+ process.exit()
+}
+
+HTTP_REGEX = /^https?:\/\//
+
+JS.Package.DSL.file = function(filename) {
+ if (!HTTP_REGEX.test(filename))
+ filename = path.join(params.root || '.', filename)
+
+ return JS.Package._getByPath(filename)
+}
+
+if (params.manifest) require(params.manifest)
+
+var packages = [],
+ excluded = [],
+ bundles = params.bundles ? JSON.parse(fs.readFileSync(params.bundles)) : {},
+ source = [],
+ output = function() { console.log(source.join('\n\n')) }
+
+var expand = function(name, list) {
+ var pkg = JS.Package._getByName(name),
+ deps = list || []
+
+ pkg._deps.list.forEach(function(p) { expand(p, deps) })
+ if (deps.indexOf(pkg) === -1) deps.push(pkg)
+ pkg._uses.list.forEach(function(p) { expand(p, deps) })
+
+ return deps
+}
+
+var array = function(object) {
+ if (object === undefined) return []
+ return [].concat(object)
+}
+
+var expandBundle = function(name) {
+ var bundle = bundles[name]
+
+ array(bundle.include).forEach(function(p) { expand(p, packages) })
+
+ var expandExcluded = function(excl) {
+ var exclBundle = bundles[excl]
+ if (!exclBundle) return expand(excl, excluded)
+
+ array(exclBundle.include).forEach(function(p) { expand(p, excluded) })
+ array(exclBundle.exclude).forEach(expandExcluded)
+ }
+ array(bundle.exclude).forEach(expandExcluded)
+}
+
+var packageFiles = function(packages) {
+ var files = []
+ packages.forEach(function(pkg) {
+ var paths = pkg._loader
+
+ if (!(paths instanceof Array))
+ die('Cannot bundle ' + pkg + ': no path specified in your manifest')
+
+ files = files.concat(paths.map(function(loader) {
+ return HTTP_REGEX.test(loader)
+ ? loader
+ : path.resolve(loader)
+ }))
+ })
+ return files
+}
+
+include.forEach(function(inc) {
+ if (bundles[inc]) expandBundle(inc)
+ else expand(inc, packages)
+})
+
+var includedFiles = packageFiles(packages),
+ excludedFiles = packageFiles(excluded),
+ files = includedFiles.slice()
+
+excludedFiles.forEach(function(exclude) {
+ var index = files.indexOf(exclude)
+ if (index >= 0) files.splice(index, 1)
+})
+
+if (params.output === 'paths') {
+ var formatPath = function(s) { return s.replace(dir, '') }
+ console.log(files.map(formatPath).join('\n'))
+ process.exit()
+}
+
+if (params.packages !== false)
+ source.push(fs.readFileSync(JSCLASS_PATH + '/package-browser.js'))
+
+var bundle = function(i) {
+ if (i >= files.length) return output()
+ var file = files[i]
+
+ if (HTTP_REGEX.test(file))
+ bundleRemote(file, i)
+ else
+ bundleLocal(file, i)
+}
+
+var bundleLocal = function(file, i) {
+ fs.readFile(file, function(error, content) {
+ if (error)
+ die('Cannot find file ' + file + ', please check your --root setting')
+
+ source.push(content.toString())
+ bundle(i + 1)
+ })
+}
+
+var bundleRemote = function(file, i) {
+ if (!params.external) {
+ console.error('Warning: skipping ' + file + ', pass --external to include it')
+ return bundle(i + 1)
+ }
+
+ var uri = url.parse(file),
+ client = (uri.protocol === 'https:') ? https : http,
+ port = uri.port || (client === https ? '443' : '80'),
+ options = {host: uri.hostname, port: port, path: uri.pathname},
+ body = ''
+
+ var end = function() {
+ source.push(body)
+ bundle(i + 1)
+ }
+ client.get(options, function(response) {
+ if (response.statusCode < 200 || response.statusCode >= 300)
+ die('Request unsuccessful: ' + file)
+
+ response.addListener('data', function(c) { body += c.toString('utf8', 0, c.length) })
+ response.addListener('close', end)
+ response.addListener('end', end)
+ })
+ .on('error', function() {
+ die('Request unsuccessful: ' + file)
+ })
+}
+
+bundle(0)
+
View
3 node_modules/jsclass/index.js
@@ -0,0 +1,3 @@
+var path = require('path');
+JSCLASS_PATH = path.dirname(__filename) + '/src';
+require(JSCLASS_PATH + '/loader');
View
BIN node_modules/jsclass/min/assets/bullet_go.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
183 node_modules/jsclass/min/assets/testui.css
@@ -0,0 +1,183 @@
+.test-result-container {
+ background: #fff;
+ border: 2px solid #444;
+ color: #444;
+ font: normal 15px FreeSans, Helvetica, Arial, sans-serif;
+ overflow: hidden;
+ position: absolute;
+ right: 30px;
+ top: 30px;
+ width: 640px;
+
+ -webkit-border-radius: 16px;
+ -moz-border-radius: 16px;
+ border-radius: 16px;
+}
+
+.test-result-container p,
+.test-result-container ul,
+.test-result-container li {
+ list-style: circle outside;
+ margin: 0;
+ padding: 0;
+}
+
+.test-result-container .report {
+ border-collapse: collapse;
+ margin: 0;
+ padding: 0;
+}
+
+.test-result-container .report th:first-child {
+ -webkit-border-top-left-radius: 14px;
+ -moz-border-radius-topleft: 14px;
+ border-top-left-radius: 14px;
+}
+
+.test-result-container .report th:last-child {
+ -webkit-border-top-right-radius: 14px;
+ -moz-border-radius-topright: 14px;
+ border-top-right-radius: 14px;
+}
+
+.test-result-container .report th,
+.test-result-container .report td {
+ border-left: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+ font-weight: bold;
+ padding: 0 8px;
+ text-align: right;
+ width: 144px;
+}
+
+.test-result-container .report th:first-child,
+.test-result-container .report td:first-child {
+ border-left: none;
+}
+
+.test-result-container .report th:last-child,
+.test-result-container .report td:last-child {
+ border-right: none;
+}
+
+.test-result-container .report th {
+ background: #eee;
+ padding: 4px 8px;
+}
+
+.test-result-container .report td {
+ color: #999;
+ font-size: 300%;
+}
+
+.test-result-container .light {
+ font-size: 0;
+ height: 6px;
+ overflow: hidden;
+}
+.test-result-container .light-pending {
+ background: #fc6;
+}
+.test-result-container .light-passed {
+ background: #6c3;
+}
+.test-result-container .light-failed {
+ background: #e40;
+}
+
+.test-result-container .user-agent {
+ background: #444;
+ color: #fff;
+ font-size: 80%;
+ list-style: none;
+ padding: 4px 12px;
+}
+
+.test-result-container .specs .spec,
+.test-result-container .specs .test {
+ position: relative;
+}
+
+.test-result-container .specs .spec-name,
+.test-result-container .specs .test-name {
+ cursor: pointer;
+}
+
+.test-result-container .spec-name {
+ border-top: 1px solid #ddd;
+ cursor: pointer;
+ font-weight: bold;
+}
+
+.test-result-container .specs ul {
+ margin-left: 32px;
+}
+
+.test-result-container .specs p {
+ padding: 4px 12px;
+}
+
+.test-result-container .specs .runner {
+ cursor: pointer;
+ display: block;
+ float: left;
+ height: 0;
+ margin-right: 6px;
+ overflow: hidden;
+ padding-top: 18px;
+ width: 16px;
+}
+
+.test-result-container .specs .fault {
+ font-size: 75%;
+}
+
+.test-result-container .specs .failed {
+ color: #e40;
+}
+
+.test-result-container .specs .closed ul.children {
+ display: none;
+}
+
+.test-result-container .test .stats {
+ display: none;
+}
+
+.test-result-container .stats {
+ float: right;
+ list-style: none;
+ right: 0;
+ top: 0;
+}
+
+.test-result-container .stats li {
+ border-left: 1px solid #eee;
+ display: block;
+ float: left;
+ list-style: none;
+ padding: 4px 8px;
+ width: 64px;
+}
+
+.test-result-container .stats .number {
+ color: #666;
+ font-weight: bold;
+}
+
+.test-result-container .stats .label {
+ color: #999;
+ font-size: 80%;
+}
+
+.test-result-container .passed .number {
+ color: #6c3;
+}
+
+.test-result-container .summary {
+ border-top: 1px solid #999;
+ color: #666;
+ margin: 0;
+ padding: 4px 12px;
+}
+
View
1 node_modules/jsclass/min/benchmark.js
@@ -0,0 +1 @@
+JS.Benchmark=new JS.Module('Benchmark',{include:JS.Console,N:5,measure:function(a,b,c){var e=[],d,f=[],j=c.test;var g=b*JS.Benchmark.N;while(g--){d={};if(c.setup)c.setup.call(d);e.push(d)}var k=JS.Benchmark.N,h,i;while(k--){g=b;h=new Date().getTime();while(g--)j.call(e.pop());i=new Date().getTime();f.push(i-h)}this.printResult(a,f)},printResult:function(a,b){var c=this.average(b);this.reset();this.print(' ');this.consoleFormat('bgblack','white');this.print('BENCHMARK');this.reset();this.print(' ['+this.format(c)+']');this.consoleFormat('cyan');this.puts(' '+a);this.reset()},format:function(a){var b=(a.value===0)?0:100*a.error/a.value;return Math.round(a.value)+'ms +/- '+Math.round(b)+'%'},average:function(a){return{value:this.mean(a),error:this.stddev(a)}},mean:function(b,c){var e=[],c=c||function(a){return a},d=b.length,f=0;while(d--)e.push(c(b[d]));d=e.length;while(d--)f+=e[d];return f/e.length},stddev:function(b){var c=function(a){return a*a};return Math.sqrt(this.mean(b,c)-c(this.mean(b)))}});JS.Benchmark.extend(JS.Benchmark);
View
1 node_modules/jsclass/min/command.js
@@ -0,0 +1 @@
+JS.Command=new JS.Class('Command',{initialize:function(a){if(typeof a==='function')a={execute:a};this._2=a;this._0=this._2.stack||null},execute:function(a){if(this._0)this._0._3();var b=this._2.execute;if(b)b.apply(this);if(this._0&&a!==false)this._0.push(this)},undo:function(){var exec=this._2.undo;if(exec)exec.apply(this)},extend:{Stack:new JS.Class({include:[JS.Observable||{},JS.Enumerable||{}],initialize:function(a){a=a||{};this._1=a.redo||null;this.clear()},forEach:function(a,b){if(!a)return this.enumFor('forEach');a=JS.Enumerable.toFn(a);for(var c=0,d=this._0.length;c<d;c++){if(this._0[c]!==undefined)a.call(b||null,this._0[c],c)}return this},clear:function(){this._0=[];this.length=this.pointer=0},_3:function(){if(this.pointer===0&&this._1&&this._1.execute)this._1.execute()},push:function(a){this._0.splice(this.pointer,this.length);this._0.push(a);this.length=this.pointer=this._0.length;if(this.notifyObservers)this.notifyObservers(this)},stepTo:function(a){if(a<0||a>this.length)return;var b,c;switch(true){case a>this.pointer:for(b=this.pointer,c=a;b<c;b++)this._0[b].execute(false);break;case a<this.pointer:if(this._1&&this._1.execute){this._1.execute();for(b=0,c=a;b<c;b++)this._0[b].execute(false)}else{for(b=0,c=this.pointer-a;b<c;b++)this._0[this.pointer-b-1].undo()}break}this.pointer=a;if(this.notifyObservers)this.notifyObservers(this)},undo:function(){this.stepTo(this.pointer-1)},redo:function(){this.stepTo(this.pointer+1)}})}});
View
1 node_modules/jsclass/min/comparable.js
@@ -0,0 +1 @@
+JS.Comparable=new JS.Module('Comparable',{extend:{ClassMethods:new JS.Module({compare:function(a,b){return a.compareTo(b)}}),included:function(a){a.extend(this.ClassMethods)}},lt:function(a){return this.compareTo(a)<0},lte:function(a){return this.compareTo(a)<1},gt:function(a){return this.compareTo(a)>0},gte:function(a){return this.compareTo(a)>-1},eq:function(a){return this.compareTo(a)===0},between:function(a,b){return this.gte(a)&&this.lte(b)}});
View
1 node_modules/jsclass/min/console.js
@@ -0,0 +1 @@
+JS.Console=new JS.Module('Console',{extend:{nameOf:function(a,b){var c=[],f,h,d,g;if(JS.isType(a,Array)){for(f=0,h=a.length;f<h;f++)c.push(this.nameOf(a[f]));return c}if(a.displayName)return a.displayName;d=[{name:null,o:b||JS.ENV}];g=0;while(typeof d==='object'&&g<this.MAX_DEPTH){g+=1;d=this.descend(d,a)}if(typeof d=='string'){d=d.replace(/\.prototype\./g,'#');a.displayName=d;if(a.__meta__)a.__meta__.displayName=d+'.__meta__'}return a.displayName},descend:function(a,b){var c=[],f=a.length,h=f,d,g,i;while(h--){g=a[h];if(JS.isType(g.o,Array))continue;i=g.name?g.name+'.':'';for(d in g.o){if(b&&g.o[d]===b)return i+d;c.push({name:i+d,o:g.o[d]})}}return c},MAX_DEPTH:4,convert:function(b,c){if(b===null||b===undefined)return String(b);var f=JS.Enumerable,c=c||[],h;if(JS.indexOf(c,b)>=0)return'#circular';if(b instanceof Error){return(typeof b.message==='string'&&!b.message)?b.name:b.name+(b.message?': '+b.message:'')}if(b instanceof Array){c.push(b);h=new f.Collection(b).map(function(a){return this.convert(a,c)},this).join(', ');c.pop();return h?'[ '+h+' ]':'[]'}if(b instanceof String||typeof b==='string')return'"'+b+'"';if(b instanceof Function)return b.displayName||b.name||(b.toString().match(/^\s*function ([^\(]+)\(/)||[])[1]||'#function';if(b.toString&&b.toString!==Object.prototype.toString&&!b.toString.__traced__)return b.toString();if(b.nodeType!==undefined)return b.toString();c.push(b);h=new f.Collection(f.objectKeys(b,false).sort()).map(function(a){return this.convert(a,c)+': '+this.convert(b[a],c)},this).join(', ');c.pop();return h?'{ '+h+' }':'{}'},filterBacktrace:function(a){if(this.BROWSER){var b=new RegExp(window.location.href.replace(/(\/[^\/]+)/g,'($1)?')+'/?','g');return a.replace(b,'')}else if(this.RHINO){var b=java.lang.System.getProperty('user.dir')+'/';return a.replace(new RegExp(b,'g'),'')}else if(this.NODE){var b=process.cwd()+'/';return a.replace(new RegExp(b,'g'),'')}else if(typeof version==='function'&&version()>100){return''}else{return a}},ANSI_CSI:String.fromCharCode(0x1B)+'[',MAX_BUFFER_LENGTH:78,BROWSER:(typeof window!=='undefined'),NODE:(typeof process==='object'),RHINO:(typeof java!=='undefined'&&typeof java.lang!=='undefined'),WINDOZE:(typeof window!=='undefined'||typeof WScript!=='undefined'),WSH:(typeof WScript!=='undefined'),coloring:function(){return!(this.BROWSER&&!window.runtime)&&!this.WINDOZE},__buffer__:'',__format__:'',ESCAPE_CODES:{reset:0,bold:1,normal:22,underline:4,noline:24,blink:5,noblink:25,black:30,bgblack:40,red:31,bgred:41,green:32,bggreen:42,yellow:33,bgyellow:43,blue:34,bgblue:44,magenta:35,bgmagenta:45,cyan:36,bgcyan:46,white:37,bgwhite:47,nocolor:39,bgnocolor:49},escape:function(a){return this.ANSI_CSI+a},repeat:function(a,b){var c='';while(b--)c+=a;return c},pad:function(a,b){a=(a===undefined?'':a).toString();return a+this.repeat(' ',b-a.length)},flushFormat:function(){var a=this.__format__;this.__format__='';return a},output:function(a,b){while(a.length>0){var c=this.__buffer__.length,f=this.BROWSER?1000:this.MAX_BUFFER_LENGTH,h=(c>0&&this.coloring()),d=h?this.escape('1F')+this.escape((c+1)+'G'):'',g=a.substr(0,f-c);this.__buffer__+=g;if(this.coloring())this.writeToStdout(d+this.flushFormat()+g);else if(this.__buffer__.length===f)this.writeToStdout(this.__buffer__);if(this.__buffer__.length===f)this.__buffer__='';a=a.substr(f-c)}if(!b){if(a===''&&!this.__buffer__)this.writeToStdout(this.flushFormat()+'');if(!this.coloring()&&this.__buffer__)this.writeToStdout(this.__buffer__);this.__buffer__=''}},writeToStdout:function(a){if(this.BROWSER&&window.runtime)return window.runtime.trace(a);if(this.NODE)return console.warn(a);if(this.RHINO)return java.lang.System.out.println(a);if(this.WSH)return WScript.Echo(a);if(typeof console!=='undefined')return console.log(a);if(typeof alert==='function')return alert(a);if(typeof print==='function')return print(a)}},consoleFormat:function(){if(!JS.Console.coloring())return;this.reset();var a=arguments.length;while(a--)this[arguments[a]]()},puts:function(a){a=(a===undefined?'':a).toString();var b=JS.Console;if(b.NODE||b.RHINO){b.writeToStdout(b.flushFormat()+a);b.__print__=false}else{b.output(a,false)}},print:function(a){a=(a===undefined?'':a).toString();var b=JS.Console,c;if(b.NODE){try{c=require('util')}catch(e){c=require('sys')}c.print(b.flushFormat()+a);b.__print__=true}else if(b.RHINO){java.lang.System.out.print(b.flushFormat()+a);b.__print__=true}else{b.output(a,true)}},printTable:function(d,g){var i=[],d=[['Method','Calls']].concat(d),m=JS.Console,k=d.length,j,n;while(k--){j=d[k].length;while(j--){i[j]=i[j]||0;n=(d[k][j]===undefined?'':d[k][j]).toString();i[j]=Math.max(n.length,i[j])}}var l='+',j=i.length;while(j--)l='+'+m.repeat('-',i[j]+2)+l;l=' '+l;this.reset();this.puts();this.puts(l);var o=function(a,b){var c=d[a];this.reset();this.print(' ');for(var f=0,h=c.length;f<h;f++){this.reset();this.print('|');this.consoleFormat.apply(this,b);this.print(' '+m.pad(c[f],i[f])+' ')}this.reset();this.puts('|')};o.call(this,0,['bold']);this.reset();this.puts(l);for(var k=1,p=d.length;k<p;k++){var q=g?g(d[k],k):[];o.call(this,k,q)}this.reset();this.puts(l)}});(function(){var c=JS.Console;for(var f in c.ESCAPE_CODES)(function(b){c.define(b,function(){if(!JS.Console.coloring())return;var a=c.ESCAPE_CODES[b];c.__format__+=c.escape(a+'m')})})(f);c.extend(c)})();
View
1 node_modules/jsclass/min/constant_scope.js
@@ -0,0 +1 @@
+JS.ConstantScope=new JS.Module('ConstantScope',{extend:{included:function(a){a.__consts__=new JS.Module();a.extend(this.ClassMethods);a.__eigen__().extend(this.ClassMethods);a.include(a.__consts__);a.extend(a.__consts__);a.include(this.extract(a.__fns__));a.extend(this.extract(a.__eigen__().__fns__))},ClassMethods:new JS.Module({define:function(a,b){var c=this.__consts__||this.__tgt__.__consts__;if(/^[A-Z]/.test(a))c.define(a,b);else this.callSuper();if(JS.isType(b,JS.Module)){b.include(JS.ConstantScope);b.__consts__.include(c)}}}),extract:function(a,b){var c={},d,e;for(d in a){if(!/^[A-Z]/.test(d))continue;e=a[d];c[d]=e;delete a[d]}return c}}});
View
1 node_modules/jsclass/min/core.js
@@ -0,0 +1 @@
+(function(){var a=(typeof this.global==='object')?this.global:this;a.JS=a.JS||{};JS.ENV=a})();JS.END_WITHOUT_DOT=/([^\.])$/;JS.array=function(a){var b=[],c=a.length;while(c--)b[c]=a[c];return b};JS.bind=function(a,b){return function(){return a.apply(b,arguments)}};JS.extend=function(a,b,c){if(!a||!b)return a;for(var d in b){if(a[d]===b[d])continue;if(c===false&&a.hasOwnProperty(d))continue;a[d]=b[d]}return a};JS.indexOf=function(a,b){if(a.indexOf)return a.indexOf(b);var c=a.length;while(c--){if(a[c]===b)return c}return-1};JS.isType=function(a,b){if(typeof b==='string')return typeof a===b;if(a===null||a===undefined)return false;return(typeof b==='function'&&a instanceof b)||(a.isA&&a.isA(b))||a.constructor===b};JS.makeBridge=function(a){var b=function(){};b.prototype=a.prototype;return new b()};JS.makeClass=function(a){a=a||Object;var b=function(){return this.initialize?this.initialize.apply(this,arguments)||this:this};b.prototype=JS.makeBridge(a);b.superclass=a;b.subclasses=[];if(a.subclasses)a.subclasses.push(b);return b};JS.match=function(a,b){if(b===undefined)return false;return typeof a.test==='function'?a.test(b):a.match(b)};JS.Method=JS.makeClass();JS.extend(JS.Method.prototype,{initialize:function(a,b,c){this.module=a;this.name=b;this.callable=c;this._1={};if(typeof c!=='function')return;this.arity=c.length;var d=c.toString().match(/\b[a-z\_\$][a-z0-9\_\$]*\b/ig),e=d.length;while(e--)this._1[d[e]]=true},setName:function(a){this.callable.displayName=this.displayName=a},contains:function(a){return this._1.hasOwnProperty(a)},call:function(){return this.callable.call.apply(this.callable,arguments)},apply:function(a,b){return this.callable.apply(a,b)},compile:function(h){var i=this,j=i.module.__trace__||h.__trace__,k=i.callable,q=i._1,n=JS.Method._3,o=n.length,l=[],m;while(o--){m=n[o];if(q[m.name])l.push(m)}if(l.length===0&&!j)return k;var p=function(){var a=l.length,b=a,c={},d,e,f;while(b--){d=l[b];e=this[d.name];if(e&&!e.__kwd__)continue;c[d.name]={_2:e,_4:this.hasOwnProperty(d.name)};f=d.filter(i,h,this,arguments);f.__kwd__=true;this[d.name]=f}var g=k.apply(this,arguments),b=a;while(b--){d=l[b];if(!c[d.name])continue;if(c[d.name]._4)this[d.name]=c[d.name]._2;else delete this[d.name]}return g};if(j)return JS.StackTrace.wrap(p,i,h);return p},toString:function(){var a=this.displayName||(this.module.toString()+'#'+this.name);return'#<Method:'+a+'>'}});JS.Method.create=function(a,b,c){if(c&&c.__inc__&&c.__fns__)return c;var d=(typeof c!=='function')?c:new this(a,b,c);this.notify(d);return d};JS.Method.compile=function(a,b){return a&&a.compile?a.compile(b):a};JS.Method.__listeners__=[];JS.Method.added=function(a,b){this.__listeners__.push([a,b])};JS.Method.notify=function(a){var b=this.__listeners__,c=b.length,d;while(c--){d=b[c];d[0].call(d[1],a)}};JS.Method._3=[];JS.Method.keyword=function(a,b){this._3.push({name:a,filter:b})};JS.Method.tracing=function(c,d,e){JS.require('JS.StackTrace',function(){var a=JS.StackTrace.logger,b=a.active;c=[].concat(c);this.trace(c);a.active=true;d.call(e);this.untrace(c);a.active=b},this)};JS.Method.trace=function(a){var b=a.length;while(b--){a[b].__trace__=true;a[b].resolve()}};JS.Method.untrace=function(a){var b=a.length;while(b--){a[b].__trace__=false;a[b].resolve()}};JS.Module=JS.makeClass();JS.Module.__queue__=[];JS.extend(JS.Module.prototype,{initialize:function(a,b,c){if(typeof a!=='string'){c=arguments[1];b=arguments[0];a=undefined}c=c||{};this.__inc__=[];this.__dep__=[];this.__fns__={};this.__tgt__=c._5;this.__anc__=null;this.__mct__={};this.setName(a);this.include(b,{_0:false});if(JS.Module.__queue__)JS.Module.__queue__.push(this)},setName:function(a){this.displayName=a||'';for(var b in this.__fns__)this.__name__(b);if(a&&this.__meta__)this.__meta__.setName(a+'.')},__name__:function(a){if(!this.displayName)return;var b=this.__fns__[a];if(!b)return;a=this.displayName.replace(JS.END_WITHOUT_DOT,'$1#')+a;if(typeof b.setName==='function')return b.setName(a);if(typeof b==='function')b.displayName=a},define:function(a,b,c){var d=JS.Method.create(this,a,b),e=(c||{})._0;this.__fns__[a]=d;this.__name__(a);if(e!==false)this.resolve()},include:function(a,b){if(!a)return this;var b=b||{},c=b._0!==false,d=a.extend,e=a.include,f,g,h,i,j,k;if(a.__fns__&&a.__inc__){this.__inc__.push(a);if((a.__dep__||{}).push)a.__dep__.push(this);if(f=b._6){if(typeof a.extended==='function')a.extended(f)}else{if(typeof a.included==='function')a.included(this)}}else{if(this.shouldIgnore('extend',d)){i=[].concat(d);for(j=0,k=i.length;j<k;j++)this.extend(i[j])}if(this.shouldIgnore('include',e)){i=[].concat(e);for(j=0,k=i.length;j<k;j++)this.include(i[j],{_0:false})}for(g in a){if(!a.hasOwnProperty(g))continue;h=a[g];if(this.shouldIgnore(g,h))continue;this.define(g,h,{_0:false})}if(a.hasOwnProperty('toString'))this.define('toString',a.toString,{_0:false})}if(c)this.resolve();return this},alias:function(a){for(var b in a){if(!a.hasOwnProperty(b))continue;this.define(b,this.instanceMethod(a[b]),{_0:false})}this.resolve()},resolve:function(a){var a=a||this,b=a.__tgt__,c=this.__inc__,d=this.__fns__,e,f,g,h;if(a===this){this.__anc__=null;this.__mct__={};e=this.__dep__.length;while(e--)this.__dep__[e].resolve()}if(!b)return;for(e=0,f=c.length;e<f;e++)c[e].resolve(a);for(g in d){h=JS.Method.compile(d[g],a);if(b[g]!==h)b[g]=h}if(d.hasOwnProperty('toString'))b.toString=JS.Method.compile(d.toString,a)},shouldIgnore:function(a,b){return(a==='extend'||a==='include')&&(typeof b!=='function'||(b.__fns__&&b.__inc__))},ancestors:function(a){var b=!a,a=a||[],c=this.__inc__;if(b&&this.__anc__)return this.__anc__.slice();for(var d=0,e=c.length;d<e;d++)c[d].ancestors(a);if(JS.indexOf(a,this)<0)a.push(this);if(b)this.__anc__=a.slice();return a},lookup:function(a){var b=this.__mct__[a];if(b&&b.slice)return b.slice();var c=this.ancestors(),d=[],e;for(var f=0,g=c.length;f<g;f++){e=c[f].__fns__;if(e.hasOwnProperty(a))d.push(e[a])}this.__mct__[a]=d.slice();return d},includes:function(a){if(a===this)return true;var b=this.__inc__;for(var c=0,d=b.length;c<d;c++){if(b[c].includes(a))return true}return false},instanceMethod:function(a){return this.lookup(a).pop()},instanceMethods:function(a,b){var c=b||[],d=this.__fns__,e;for(e in d){if(!JS.isType(this.__fns__[e],JS.Method))continue;if(JS.indexOf(c,e)>=0)continue;c.push(e)}if(a!==false){var f=this.ancestors(),g=f.length;while(g--)f[g].instanceMethods(false,c)}return c},match:function(a){return a&&a.isA&&a.isA(this)},toString:function(){return this.displayName}});JS.Kernel=new JS.Module('Kernel',{__eigen__:function(){if(this.__meta__)return this.__meta__;var a=this.toString()+'.';this.__meta__=new JS.Module(a,null,{_5:this});return this.__meta__.include(this.klass,{_0:false})},equals:function(a){return this===a},extend:function(a,b){var c=(b||{})._0;this.__eigen__().include(a,{_6:this,_0:c});return this},hash:function(){return JS.Kernel.hashFor(this)},isA:function(a){return(typeof a==='function'&&this instanceof a)||this.__eigen__().includes(a)},method:function(a){var b=this.__mct__=this.__mct__||{},c=b[a],d=this[a];if(typeof d!=='function')return d;if(c&&d===c._2)return c._7;var e=JS.bind(d,this);b[a]={_2:d,_7:e};return e},methods:function(){return this.__eigen__().instanceMethods()},tap:function(a,b){a.call(b||null,this);return this},toString:function(){if(this.displayName)return this.displayName;var a=this.klass.displayName||this.klass.toString();return'#<'+a+':'+this.hash()+'>'}});(function(){var b=1;JS.Kernel.hashFor=function(a){if(a.__hash__!==undefined)return a.__hash__;a.__hash__=(new Date().getTime()+b).toString(16);b+=1;return a.__hash__}})();JS.Class=JS.makeClass(JS.Module);JS.extend(JS.Class.prototype,{initialize:function(a,b,c,d){if(typeof a!=='string'){d=arguments[2];c=arguments[1];b=arguments[0];a=undefined}if(typeof b!=='function'){d=c;c=b;b=Object}JS.Module.prototype.initialize.call(this,a);d=d||{};var e=JS.makeClass(b);JS.extend(e,this);e.prototype.constructor=e.prototype.klass=e;e.__eigen__().include(b.__meta__,{_0:d._0});e.setName(a);e.__tgt__=e.prototype;var f=(b===Object)?{}:(b.__fns__?b:new JS.Module(b.prototype,{_0:false}));e.include(JS.Kernel,{_0:false}).include(f,{_0:false}).include(c,{_0:false});if(d._0!==false)e.resolve();if(typeof b.inherited==='function')b.inherited(e);return e}});(function(){var e=function(a){var b={},c=a.prototype;for(var d in c){if(!c.hasOwnProperty(d))continue;b[d]=JS.Method.create(a,d,c[d])}return b};var f=function(a,b){var c=JS[a],d=JS[b];c.__inc__=[];c.__dep__=[];c.__fns__=e(c);c.__tgt__=c.prototype;c.prototype.constructor=c.prototype.klass=c;JS.extend(c,JS.Class.prototype);c.include(d||JS.Kernel);c.setName(a);c.constructor=c.klass=JS.Class};f('Method');f('Module');f('Class','Module');var g=JS.Kernel.instanceMethod('__eigen__');g.call(JS.Method).resolve();g.call(JS.Module).resolve();g.call(JS.Class).include(JS.Module.__meta__)})();JS.NotImplementedError=new JS.Class('NotImplementedError',Error);JS.Method.keyword('callSuper',function(c,d,e,f){var g=d.lookup(c.name),h=g.length-1,i=JS.array(f);return function(){var a=arguments.length;while(a--)i[a]=arguments[a];h-=1;var b=g[h].apply(e,i);h+=1;return b}});JS.Method.keyword('blockGiven',function(a,b,c,d){var e=Array.prototype.slice.call(d,a.arity),f=(typeof e[0]==='function');return function(){return f}});JS.Method.keyword('yieldWith',function(a,b,c,d){var e=Array.prototype.slice.call(d,a.arity);return function(){if(typeof e[0]!=='function')return;return e[0].apply(e[1]||null,arguments)}});JS.Interface=new JS.Class('Interface',{initialize:function(d){this.test=function(a,b){var c=d.length;while(c--){if(typeof a[d[c]]!=='function')return b?d[c]:false}return true}},extend:{ensure:function(){var a=JS.array(arguments),b=a.shift(),c,d;while(c=a.shift()){d=c.test(b,true);if(d!==true)throw new Error('object does not implement '+d+'()');}}}});JS.Singleton=new JS.Class('Singleton',{initialize:function(a,b,c){return new(new JS.Class(a,b,c))}});
View
1 node_modules/jsclass/min/decorator.js
@@ -0,0 +1 @@
+JS.Decorator=new JS.Class('Decorator',{initialize:function(a,c){var b=new JS.Class(),f={},e,d;for(e in a.prototype){d=a.prototype[e];if(typeof d==='function'&&d!==a)d=this.klass.delegate(e);f[e]=d}b.include(new JS.Module(f),{_0:false});b.include(this.klass.InstanceMethods,{_0:false});b.include(c);return b},extend:{delegate:function(a){return function(){return this.component[a].apply(this.component,arguments)}},InstanceMethods:new JS.Module({initialize:function(a){this.component=a;this.klass=this.constructor=a.klass;var c,b;for(c in a){if(this[c])continue;b=a[c];if(typeof b==='function')b=JS.Decorator.delegate(c);this[c]=b}},extend:function(a){this.component.extend(a);var c,b;for(c in a){b=a[c];if(typeof b==='function')b=JS.Decorator.delegate(c);this[c]=b}}})}});
View
1 node_modules/jsclass/min/deferrable.js
@@ -0,0 +1 @@
+JS.Deferrable=new JS.Module('Deferrable',{extend:{Timeout:new JS.Class(Error)},callback:function(b,a){if(this.__deferredStatus__==='success')return b.apply(a||null,this.__deferredValue__);if(this.__deferredStatus__==='failure')return;this.__callbacks__=this.__callbacks__||[];this.__callbacks__.push([b,a||null])},errback:function(b,a){if(this.__deferredStatus__==='failure')return b.apply(a||null,this.__deferredValue__);if(this.__deferredStatus__==='success')return;this.__errbacks__=this.__errbacks__||[];this.__errbacks__.push([b,a||null])},timeout:function(b){this.cancelTimeout();var a=this,c=new JS.Deferrable.Timeout();this.__timeout__=JS.ENV.setTimeout(function(){a.fail(c)},b)},cancelTimeout:function(){if(!this.__timeout__)return;JS.ENV.clearTimeout(this.__timeout__);delete this.__timeout__},setDeferredStatus:function(b,a){this.__deferredStatus__=b;this.__deferredValue__=a;this.cancelTimeout();switch(b){case'success':if(!this.__callbacks__)return;var c;while(c=this.__callbacks__.pop())c[0].apply(c[1],a);break;case'failure':if(!this.__errbacks__)return;var d;while(d=this.__errbacks__.pop())d[0].apply(d[1],a);break}},succeed:function(){return this.setDeferredStatus('success',arguments)},fail:function(){return this.setDeferredStatus('failure',arguments)}});
View
1 node_modules/jsclass/min/dom.js
@@ -0,0 +1 @@
+JS.DOM={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12,ENV:this,toggleClass:function(a,b){if(this.hasClass(a,b))this.removeClass(a,b);else this.addClass(a,b)},hasClass:function(a,b){var d=a.className.split(/\s+/);return JS.indexOf(d,b)>=0},addClass:function(a,b){if(this.hasClass(a,b))return;a.className=a.className+' '+b},removeClass:function(a,b){var d=new RegExp('\\b'+b+'\\b\\s*','g');a.className=a.className.replace(d,'')}};JS.DOM.Builder=new JS.Class('DOM.Builder',{extend:{addElement:function(a){this.define(a,function(){return this.makeElement(a,arguments)});JS.DOM[a]=function(){return new JS.DOM.Builder().makeElement(a,arguments)}},addElements:function(a){var b=a.length;while(b--)this.addElement(a[b])}},initialize:function(a){this._1=a},makeElement:function(a,b){var d,e,f;if(document.createElementNS){d=document.createElementNS('http://www.w3.org/1999/xhtml',a)}else{d=document.createElement(a)}for(var c=0,g=b.length;c<g;c++){e=b[c];if(typeof e==='function'){e(new this.klass(d))}else if(JS.isType(e,'string')){d.appendChild(document.createTextNode(e))}else{for(f in e)d[f]=e[f]}}if(this._1)this._1.appendChild(d);return d},concat:function(a){if(!this._1)return;this._1.appendChild(document.createTextNode(a))}});JS.DOM.Builder.addElements(['a','abbr','address','applet','area','article','aside','audio','b','base','bdo','blockquote','body','br','button','canvas','caption','cite','code','col','colgroup','command','datalist','dd','del','details','device','dfn','div','dl','dt','em','embed','fieldset','figcaption','figure','footer','form','h1','h2','h3','h4','h5','h6','head','header','hgroup','hr','html','i','iframe','img','input','ins','kbd','keygen','label','legend','li','link','map','mark','marquee','menu','meta','meter','nav','noscript','object','ol','optgroup','option','output','p','param','pre','progress','q','rp','rt','ruby','samp','script','section','select','small','source','span','strong','style','sub','sup','summary','table','tbody','td','textarea','tfoot','th','thead','time','title','tr','track','ul','var','video','wbr']);JS.DOM.Event={_2:[],on:function(a,b,d,e){if(a!==JS.DOM.ENV&&a.nodeType!==JS.DOM.ELEMENT_NODE&&a.nodeType!==JS.DOM.DOCUMENT_NODE)return;var f=function(){d.call(e,a)};if(a.addEventListener)a.addEventListener(b,f,false);else if(a.attachEvent)a.attachEvent('on'+b,f);this._2.push({_0:a,_3:b,_5:d,_6:e,_4:f})},detach:function(a,b,d,e){var f=this._2.length,c;while(f--){c=this._2[f];if((a&&a!==c._0)||(b&&b!==c._3)||(d&&d!==c._5)||(e&&e!==c._6))continue;if(c._0.removeEventListener)c._0.removeEventListener(c._3,c._4,false);else if(c._0.detachEvent)c._0.detachEvent('on'+c._3,c._4);this._2.splice(f,1);c=null}}};JS.DOM.Event.on(JS.DOM.ENV,'unload',JS.DOM.Event.detach,JS.DOM.Event);
View
1 node_modules/jsclass/min/enumerable.js
@@ -0,0 +1 @@
+JS.Enumerable=new JS.Module('Enumerable',{extend:{ALL_EQUAL:{},forEach:function(a,b){if(!a)return new JS.Enumerator(this,'forEach');for(var c=0;c<this.length;c++)a.call(b||null,this[c]);return this},isComparable:function(b){return b.all(function(a){return typeof a.compareTo==='function'})},areEqual:function(a,b){var c;if(a===b)return true;if(a&&typeof a.equals==='function')return a.equals(b);if(a instanceof Function)return a===b;if(a instanceof Array){if(!(b instanceof Array))return false;for(var d=0,e=a.length;d<e;d++){c=this.areEqual(a[d],b[d]);if(c===this.ALL_EQUAL)return true;if(!c)return false}if(a.length!==b.length)return false;return true}if((a instanceof Object)){if(!(b instanceof Object))return false;if(this.objectSize(a)!==this.objectSize(b))return false;for(var f in a){if(!this.areEqual(a[f],b[f]))return false}return true}return false},objectKeys:function(a,b){var c=[];for(var d in a){if(a.hasOwnProperty(d)||b!==false)c.push(d)}return c},objectSize:function(a){return this.objectKeys(a).length},Collection:new JS.Class({initialize:function(a){this.length=0;JS.Enumerable.forEach.call(a,this.push,this)},push:function(a){Array.prototype.push.call(this,a)},clear:function(){var a=this.length;while(a--)delete this[a];this.length=0}})},all:function(b,c){b=JS.Enumerable.toFn(b);var d=true;this.forEach(function(a){d=d&&(b?b.apply(c||null,arguments):a)});return!!d},any:function(b,c){b=JS.Enumerable.toFn(b);var d=false;this.forEach(function(a){d=d||(b?b.apply(c||null,arguments):a)});return!!d},count:function(a,b){if(typeof this.size==='function')return this.size();var c=0,d=a;if(a&&typeof a!=='function')a=function(x){return JS.Enumerable.areEqual(x,d)};this.forEach(function(){if(!a||a.apply(b||null,arguments))c+=1});return c},cycle:function(a,b,c){if(!b)return this.enumFor('cycle',a);b=JS.Enumerable.toFn(b);while(a--)this.forEach(b,c)},drop:function(c){var d=[];this.forEachWithIndex(function(a,b){if(b>=c)d.push(a)});return d},dropWhile:function(b,c){if(!b)return this.enumFor('dropWhile');b=JS.Enumerable.toFn(b);var d=[],e=true;this.forEach(function(a){if(e)e=e&&b.apply(c||null,arguments);if(!e)d.push(a)});return d},forEachCons:function(a,b,c){if(!b)return this.enumFor('forEachCons',a);b=JS.Enumerable.toFn(b);var d=this.toArray(),e=d.length,f=e-a,g;for(g=0;g<=f;g++)b.call(c||null,d.slice(g,g+a));return this},forEachSlice:function(a,b,c){if(!b)return this.enumFor('forEachSlice',a);b=JS.Enumerable.toFn(b);var d=this.toArray(),e=d.length,f=Math.ceil(e/a),g;for(g=0;g<f;g++)b.call(c||null,d.slice(g*a,(g+1)*a));return this},forEachWithIndex:function(c,d,e){if(typeof c==='function'){e=d;d=c;c=0}c=c||0;if(!d)return this.enumFor('forEachWithIndex',c);d=JS.Enumerable.toFn(d);return this.forEach(function(a){var b=d.call(e||null,a,c);c+=1;return b})},forEachWithObject:function(b,c,d){if(!c)return this.enumFor('forEachWithObject',b);c=JS.Enumerable.toFn(c);this.forEach(function(){var a=[b].concat(JS.array(arguments));c.apply(d||null,a)});return b},find:function(b,c){if(!b)return this.enumFor('find');b=JS.Enumerable.toFn(b);var d={},e=d;this.forEach(function(a){if(d!==e)return;d=b.apply(c||null,arguments)?a:d});return d===e?null:d},findIndex:function(c,d){if(c===undefined)return this.enumFor('findIndex');var e=null,f=(typeof c==='function');this.forEachWithIndex(function(a,b){if(e!==null)return;if(JS.Enumerable.areEqual(c,a)||(f&&c.apply(d||null,arguments)))e=b});return e},first:function(a){var b=this.toArray();return(a===undefined)?b[0]:b.slice(0,a)},grep:function(c,d,e){d=JS.Enumerable.toFn(d);var f=[];this.forEach(function(a){var b=(typeof c.match==='function')?c.match(a):(typeof c.test==='function')?c.test(a):JS.isType(a,c);if(!b)return;if(d)a=d.apply(e||null,arguments);f.push(a)});return f},groupBy:function(c,d){if(!c)return this.enumFor('groupBy');c=JS.Enumerable.toFn(c);var e=new JS.Hash();this.forEach(function(a){var b=c.apply(d||null,arguments);if(!e.hasKey(b))e.store(b,[]);e.get(b).push(a)});return e},inject:function(c,d,e){var f=JS.array(arguments),g=0,h={};switch(f.length){case 1:c=h;d=f[0];break;case 2:if(typeof c==='function'){c=h;d=f[0];e=f[1]}}d=JS.Enumerable.toFn(d);this.forEach(function(a){if(!g++&&c===h)return c=a;var b=[c].concat(JS.array(arguments));c=d.apply(e||null,b)});return c},map:function(a,b){if(!a)return this.enumFor('map');a=JS.Enumerable.toFn(a);var c=[];this.forEach(function(){c.push(a.apply(b||null,arguments))});return c},max:function(a,b){return this.minmax(a,b)[1]},maxBy:function(a,b){if(!a)return this.enumFor('maxBy');return this.minmaxBy(a,b)[1]},member:function(b){return this.any(function(a){return JS.Enumerable.areEqual(a,b)})},min:function(a,b){return this.minmax(a,b)[0]},minBy:function(a,b){if(!a)return this.enumFor('minBy');return this.minmaxBy(a,b)[0]},minmax:function(a,b){var c=this.sort(a,b);return[c[0],c[c.length-1]]},minmaxBy:function(a,b){if(!a)return this.enumFor('minmaxBy');var c=this.sortBy(a,b);return[c[0],c[c.length-1]]},none:function(a,b){return!this.any(a,b)},one:function(b,c){b=JS.Enumerable.toFn(b);var d=0;this.forEach(function(a){if(b?b.apply(c||null,arguments):a)d+=1});return d===1},partition:function(b,c){if(!b)return this.enumFor('partition');b=JS.Enumerable.toFn(b);var d=[],e=[];this.forEach(function(a){(b.apply(c||null,arguments)?d:e).push(a)});return[d,e]},reject:function(b,c){if(!b)return this.enumFor('reject');b=JS.Enumerable.toFn(b);var d=[];this.forEach(function(a){if(!b.apply(c||null,arguments))d.push(a)});return d},reverseForEach:function(a,b){if(!a)return this.enumFor('reverseForEach');a=JS.Enumerable.toFn(a);var c=this.toArray(),d=c.length;while(d--)a.call(b||null,c[d]);return this},select:function(b,c){if(!b)return this.enumFor('select');b=JS.Enumerable.toFn(b);var d=[];this.forEach(function(a){if(b.apply(c||null,arguments))d.push(a)});return d},sort:function(c,d){var e=JS.Enumerable.isComparable(this),f=this.toArray();c=c||(e?function(a,b){return a.compareTo(b)}:null);return c?f.sort(function(a,b){return c.call(d||null,a,b)}):f.sort()},sortBy:function(c,d){if(!c)return this.enumFor('sortBy');c=JS.Enumerable.toFn(c);var e=JS.Enumerable,f=new e.Collection(this.map(c,d)),g=e.isComparable(f);return new e.Collection(f.zip(this).sort(function(a,b){a=a[0];b=b[0];return g?a.compareTo(b):(a<b?-1:(a>b?1:0))})).map(function(a){return a[1]})},take:function(c){var d=[];this.forEachWithIndex(function(a,b){if(b<c)d.push(a)});return d},takeWhile:function(b,c){if(!b)return this.enumFor('takeWhile');b=JS.Enumerable.toFn(b);var d=[],e=true;this.forEach(function(a){if(e)e=e&&b.apply(c||null,arguments);if(e)d.push(a)});return d},toArray:function(){return this.drop(0)},zip:function(){var d=JS.Enumerable,e=[],f=0,g=arguments.length,h,i;if(typeof arguments[g-1]==='function'){h=arguments[g-1];i={}}if(typeof arguments[g-2]==='function'){h=arguments[g-2];i=arguments[g-1]}d.forEach.call(arguments,function(a){if(a===h||a===i)return;if(a.toArray)a=a.toArray();if(JS.isType(a,Array))e.push(a)});var j=this.map(function(b){var c=[b];d.forEach.call(e,function(a){c.push(a[f]===undefined?null:a[f])});return++f&&c});if(!h)return j;d.forEach.call(j,h,i)}});JS.Enumerable.define('forEach',JS.Enumerable.forEach);JS.Enumerable.alias({collect:'map',detect:'find',entries:'toArray',every:'all',findAll:'select',filter:'select',some:'any'});JS.Enumerable.extend({toFn:function(a){if(!a)return a;if(a.toFunction)return a.toFunction();if(this.OPS[a])return this.OPS[a];if(JS.isType(a,'string')||JS.isType(a,String))return function(){var b=JS.array(arguments),c=b.shift(),d=c[a];return(typeof d==='function')?d.apply(c,b):d};return a},OPS:{'+':function(a,b){return a+b},'-':function(a,b){return a-b},'*':function(a,b){return a*b},'/':function(a,b){return a/b},'%':function(a,b){return a%b},'^':function(a,b){return a^b},'&':function(a,b){return a&b},'&&':function(a,b){return a&&b},'|':function(a,b){return a|b},'||':function(a,b){return a||b},'==':function(a,b){return a==b},'!=':function(a,b){return a!=b},'>':function(a,b){return a>b},'>=':function(a,b){return a>=b},'<':function(a,b){return a<b},'<=':function(a,b){return a<=b},'===':function(a,b){return a===b},'!==':function(a,b){return a!==b},'[]':function(a,b){return a[b]},'()':function(a,b){return a(b)}},Enumerator:new JS.Class({include:JS.Enumerable,extend:{DEFAULT_METHOD:'forEach'},initialize:function(a,b,c){this._0=a;this._1=b||this.klass.DEFAULT_METHOD;this._2=(c||[]).slice()},equals:function(a){return JS.isType(a,this.klass)&&this._0===a._0&&this._1===a._1&&JS.Enumerable.areEqual(this._2,a._2)},forEach:function(a,b){if(!a)return this;var c=this._2.slice();c.push(a);if(b)c.push(b);return this._0[this._1].apply(this._0,c)}})});JS.Enumerable.Enumerator.alias({cons:'forEachCons',reverse:'reverseForEach',slice:'forEachSlice',withIndex:'forEachWithIndex',withObject:'forEachWithObject'});JS.Enumerable.Collection.include(JS.Enumerable);JS.Kernel.include({enumFor:function(a){var b=JS.array(arguments),a=b.shift();return new JS.Enumerable.Enumerator(this,a,b)}},{_3:false});JS.Kernel.alias({toEnum:'enumFor'});
View
1 node_modules/jsclass/min/forwardable.js
@@ -0,0 +1 @@
+JS.Forwardable=new JS.Module('Forwardable',{defineDelegator:function(b,e,d,f){d=d||e;this.define(d,function(){var a=this[b],c=a[e];return(typeof c==='function')?c.apply(a,arguments):c},{_0:f!==false})},defineDelegators:function(){var a=JS.array(arguments),c=a.shift(),b=a.length;while(b--)this.defineDelegator(c,a[b],a[b],false);this.resolve()}});
View
1 node_modules/jsclass/min/hash.js
@@ -0,0 +1 @@
+JS.Hash=new JS.Class('Hash',{include:JS.Enumerable||{},extend:{Pair:new JS.Class({include:JS.Comparable||{},length:2,setKey:function(a){this[0]=this.key=a},hasKey:function(a){return JS.Enumerable.areEqual(this.key,a)},setValue:function(a){this[1]=this.value=a},hasValue:function(a){return JS.Enumerable.areEqual(this.value,a)},compareTo:function(a){return this.key.compareTo?this.key.compareTo(a.key):(this.key<a.key?-1:(this.key>a.key?1:0))},hash:function(){var a=JS.Hash.codeFor(this.key),b=JS.Hash.codeFor(this.value);return[a,b].sort().join('/')}}),codeFor:function(a){if(typeof a!=='object')return String(a);return(typeof a.hash==='function')?a.hash():a.toString()}},initialize:function(a){this.clear();if(!JS.isType(a,Array))return this.setDefault(a);for(var b=0,c=a.length;b<c;b+=2)this.store(a[b],a[b+1])},forEach:function(a,b){if(!a)return this.enumFor('forEach');a=JS.Enumerable.toFn(a);var c,d,e;for(c in this._0){if(!this._0.hasOwnProperty(c))continue;d=this._0[c];e=d.length;while(e--)a.call(b||null,d[e])}return this},_7:function(a,b){var c=this.klass.codeFor(a),d=this._0[c];if(!d&&b)d=this._0[c]=[];return d},_8:function(a,b){var c=a.length,d=!!this._5;while(c--){if(d?(a[c].key===b):a[c].hasKey(b))return c}return-1},assoc:function(a,b){var c,d,e;c=this._7(a,b);if(!c)return null;d=this._8(c,a);if(d>-1)return c[d];if(!b)return null;this.size+=1;this.length+=1;e=new this.klass.Pair;e.setKey(a);c.push(e);return e},rassoc:function(a){var b=this.key(a);return b?this.assoc(b):null},clear:function(){this._0={};this.length=this.size=0},compareByIdentity:function(){this._5=true;return this},comparesByIdentity:function(){return!!this._5},setDefault:function(a){this._6=a;return this},getDefault:function(a){return(typeof this._6==='function')?this._6(this,a):(this._6||null)},equals:function(c){if(!JS.isType(c,JS.Hash)||this.length!==c.length)return false;var d=true;this.forEach(function(a){if(!d)return;var b=c.assoc(a.key);if(b===null||!b.hasValue(a.value))d=false});return d},hash:function(){var b=[];this.forEach(function(a){b.push(a.hash())});return b.sort().join('')},fetch:function(a,b,c){var d=this.assoc(a);if(d)return d.value;if(b===undefined)throw new Error('key not found');if(typeof b==='function')return b.call(c||null,a);return b},forEachKey:function(b,c){if(!b)return this.enumFor('forEachKey');b=JS.Enumerable.toFn(b);this.forEach(function(a){b.call(c||null,a.key)});return this},forEachPair:function(b,c){if(!b)return this.enumFor('forEachPair');b=JS.Enumerable.toFn(b);this.forEach(function(a){b.call(c||null,a.key,a.value)});return this},forEachValue:function(b,c){if(!b)return this.enumFor('forEachValue');b=JS.Enumerable.toFn(b);this.forEach(function(a){b.call(c||null,a.value)});return this},get:function(a){var b=this.assoc(a);return b?b.value:this.getDefault(a)},hasKey:function(a){return!!this.assoc(a)},hasValue:function(b){var c=false,d=!!this._5;this.forEach(function(a){if(c)return;if(d?b===a.value:JS.Enumerable.areEqual(b,a.value))c=true});return c},invert:function(){var b=new this.klass;this.forEach(function(a){b.store(a.value,a.key)});return b},isEmpty:function(){for(var a in this._0){if(this._0.hasOwnProperty(a)&&this._0[a].length>0)return false}return true},key:function(b){var c=null;this.forEach(function(a){if(!c&&JS.Enumerable.areEqual(b,a.value))c=a.key});return c},keys:function(){var b=[];this.forEach(function(a){b.push(a.key)});return b},merge:function(a,b,c){var d=new this.klass;d.update(this);d.update(a,b,c);return d},rehash:function(){var a=new this.klass;a._0=this._0;this.clear();this.update(a)},remove:function(a,b){if(b===undefined)b=null;var c,d,e;c=this._7(a);if(!c)return(typeof b==='function')?this.fetch(a,b):this.getDefault(a);d=this._8(c,a);if(d<0)return(typeof b==='function')?this.fetch(a,b):this.getDefault(a);e=c[d].value;this._9(c,d);this.size-=1;this.length-=1;if(c.length===0)delete this._0[this.klass.codeFor(a)];return e},_9:function(a,b){a.splice(b,1)},removeIf:function(b,c){if(!b)return this.enumFor('removeIf');b=JS.Enumerable.toFn(b);var d=[];this.forEach(function(a){if(b.call(c||null,a))d.push(a.key)},this);var e=d.length;while(e--)this.remove(d[e]);return this},replace:function(a){this.clear();this.update(a)},shift:function(){var a=this.keys();if(a.length===0)return this.getDefault();var b=this.assoc(a[0]);this.remove(b.key);return b},store:function(a,b){this.assoc(a,true).setValue(b);return b},toString:function(){return'Hash:{'+this.map(function(a){return a.key.toString()+'=>'+a.value.toString()}).join(',')+'}'},update:function(d,e,f){var g=(typeof e==='function');d.forEach(function(a){var b=a.key,c=a.value;if(g&&this.hasKey(b))c=e.call(f||null,b,this.get(b),c);this.store(b,c)},this)},values:function(){var b=[];this.forEach(function(a){b.push(a.value)});return b},valuesAt:function(){var a=arguments.length,b=[];while(a--)b.push(this.get(arguments[a]));return b}});JS.Hash.alias({includes:'hasKey',index:'key',put:'store'});JS.OrderedHash=new JS.Class('OrderedHash',JS.Hash,{assoc:function(a,b){var c=JS.Hash.prototype.assoc;var d=c.call(this,a,false);if(d||!b)return d;var e=c.call(this,a,true);if(!this._2){this._2=this._3=e}else{this._3._1=e;e._4=this._3;this._3=e}return e},clear:function(){this.callSuper();this._2=this._3=null},_9:function(a,b){var c=a[b];if(c._4)c._4._1=c._1;if(c._1)c._1._4=c._4;if(c===this._2)this._2=c._1;if(c===this._3)this._3=c._4;return this.callSuper()},forEach:function(a,b){if(!a)return this.enumFor('forEach');a=JS.Enumerable.toFn(a);var c=this._2;while(c){a.call(b||null,c);c=c._1}},rehash:function(){var a=this._2;this.clear();while(a){this.store(a.key,a.value);a=a._1}}});
View
1 node_modules/jsclass/min/linked_list.js
@@ -0,0 +1 @@
+JS.LinkedList=new JS.Class('LinkedList',{include:JS.Enumerable||{},initialize:function(a,b){this.length=0;this.first=this.last=null;if(!a)return;for(var c=0,d=a.length;c<d;c++)this.push(b?new this.klass.Node(a[c]):a[c])},forEach:function(a,b){if(!a)return this.enumFor('forEach');a=JS.Enumerable.toFn(a);var c=this.first,d,e,f;for(e=0,f=this.length;e<f;e++){d=c.next;a.call(b||null,c,e);if(c===this.last)break;c=d}return this},at:function(a){if(a<0||a>=this.length)return undefined;var b=this.first;while(a--)b=b.next;return b},pop:function(){return this.length?this.remove(this.last):undefined},shift:function(){return this.length?this.remove(this.first):undefined},insertAfter:function(){},push:function(){},remove:function(){},extend:{Node:new JS.Class({initialize:function(a){this.data=a;this.prev=this.next=this.list=null}})}});JS.LinkedList.Doubly=new JS.Class('LinkedList.Doubly',JS.LinkedList,{insertAt:function(a,b){if(a<0||a>=this.length)return;this.insertBefore(this.at(a),b)},unshift:function(a){this.length>0?this.insertBefore(this.first,a):this.push(a)},insertBefore:function(){}});JS.LinkedList.insertTemplate=function(c,d,e){return function(a,b){if(a.list!==this)return;b[c]=a;b[d]=a[d];a[d]=(a[d][c]=b);if(b[c]===this[e])this[e]=b;b.list=this;this.length++}};JS.LinkedList.Doubly.Circular=new JS.Class('LinkedList.Doubly.Circular',JS.LinkedList.Doubly,{insertAfter:JS.LinkedList.insertTemplate('prev','next','last'),insertBefore:JS.LinkedList.insertTemplate('next','prev','first'),push:function(a){if(this.length)return this.insertAfter(this.last,a);this.first=this.last=a.prev=a.next=a;a.list=this;this.length=1},remove:function(a){if(a.list!==this||this.length===0)return null;if(this.length>1){a.prev.next=a.next;a.next.prev=a.prev;if(a===this.first)this.first=a.next;if(a===this.last)this.last=a.prev}else{this.first=this.last=null}a.prev=a.next=a.list=null;this.length--;return a}});
View
1 node_modules/jsclass/min/loader-browser.js
@@ -0,0 +1 @@
+(function(){var a=(typeof this.global==='object')?this.global:this;a.JS=a.JS||{};JS.ENV=a})();JS.Package=function(a){var b=JS.Package.OrderedSet;JS.Package._5(this);this._0=a;this._2=new b();this._6=new b();this._d=new b();this._e=new b();this._3={};this._7={}};(function(e){e.displayName='Package';e.toString=function(){return e.displayName};e.log=function(a){if(typeof window==='undefined')return;if(typeof window.runtime==='object')window.runtime.trace(a);if(window.console&&console.info)console.info(a)};var p=e.OrderedSet=function(a){this._f=this.list=[];this._5={};if(!a)return;for(var b=0,c=a.length;b<c;b++)this.push(a[b])};p.prototype.push=function(a){var b=(a.id!==undefined)?a.id:a,c=this._5;if(c.hasOwnProperty(b))return;c[b]=this._f.length;this._f.push(a)};var m=e.Deferred=function(){this._g='deferred';this._h=null;this._i=[]};m.prototype.callback=function(a,b){if(this._g==='succeeded')a.call(b,this._h);else this._i.push([a,b])};m.prototype.succeed=function(a){this._g='succeeded';this._h=a;var b;while(b=this._i.shift())b[0].call(b[1],a)};e.ENV=JS.ENV;e.onerror=function(a){throw a};e._j=function(a){e.onerror(new Error(a));};var l=e.prototype,n=[['requires','_6'],['uses','_d'],['styling','_e']],o=n.length;while(o--)(function(pair){var q=pair[0],r=pair[1];l[q]=function(){var a=arguments.length,b;for(b=0;b<a;b++)this[r].push(arguments[b]);return this}})(n[o]);l.provides=function(){var a=arguments.length,b;for(b=0;b<a;b++){this._2.push(arguments[b]);e._8(arguments[b]).pkg=this}return this};l.setup=function(a){this._k=a;return this};l._r=function(a,b,c){if(this._7[a])return b.call(c);var d=this._3[a]=this._3[a]||[];d.push([b,c]);this._s()};l._1=function(a){if(this._7[a])return false;this._7[a]=true;var b=this._3[a];if(!b)return true;delete this._3[a];for(var c=0,d=b.length;c<d;c++)b[c][0].call(b[c][1]);return true};l._l=function(a){if(!a&&this.__isLoaded!==undefined)return this.__isLoaded;var b=this._2.list,c=b.length,d,h;while(c--){d=b[c];h=e._4(d,this._m);if(h!==undefined)continue;if(a)return e._j('Expected package at '+this._0+' to define '+d);else return this.__isLoaded=false}return this.__isLoaded=true};l._s=function(){if(!this._1('request'))return;this._t();var i=this._6.list.concat(this._d.list),g=this._9||[],k=(this._0||{}).length,j=this;e.when({load:i});e.when({complete:this._6.list},function(){e.when({complete:i,load:[this]},function(){this._1('complete')},this);var c=function(a){if(k===0)return d(a);k-=1;var b=j._0.length-k-1;e.Loader.loadFile(j._0[b],c,g[b])};var d=function(a){j._m=a;if(j._k)j._k();j._l(true);j._1('load')};if(this._l()){this._1('download');return this._1('load')}if(this._0===undefined)return e._j('No load path found for '+this._2.list[0]);if(typeof this._0==='function')this._0(d);else c();if(!e.Loader.loadStyle)return;var h=this._e.list,f=h.length;while(f--)e.Loader.loadStyle(h[f]);this._1('download')},this)};l._t=function(){if(this._9||!(this._0 instanceof Array)||!e.Loader.fetch)return;this._9=[];for(var a=0,b=this._0.length;a<b;a++)this._9[a]=e.Loader.fetch(this._0[a])};l.toString=function(){return'Package:'+this._2.list.join(',')};e.when=function(a,b,c){var d=[],h={},f,i,g;for(f in a){if(!a.hasOwnProperty(f))continue;h[f]=[];i=new e.OrderedSet(a[f]);g=i.list.length;while(g--)d.push([f,i.list[g],g])}var k=g=d.length;if(k===0)return b&&b.call(c,h);while(g--)(function(f){var j=e._a(f[1]);j._r(f[0],function(){h[f[0]][f[2]]=e._4(f[1],j._m);k-=1;if(k===0&&b)b.call(c,h)})})(d[g])};e._n=1;e._b={};e._c={};e._o=[];e._5=function(a){a.id=this._n;this._n+=1};e._p=function(a){var b=a.toString(),c=this._b[b];if(c)return c;if(typeof a==='string')a=[].slice.call(arguments);c=this._b[b]=new this(a);return c};e._a=function(a){if(typeof a!=='string')return a;var b=this._8(a);if(b.pkg)return b.pkg;var c=this._u(a);if(c)return c;var d=new this();d.provides(a);return d};e.remove=function(a){var b=this._a(a);delete this._c[a];delete this._b[b._0]};e._v=function(a,b){this._o.push([a,b])};e._u=function(d){var h=this._o,f=h.length,i,g,k;for(i=0;i<f;i++){g=h[i];if(!g[0].test(d))continue;k=g[1].from+'/'+d.replace(/([a-z])([A-Z])/g,function(a,b,c){return b+'_'+c}).replace(/\./g,'/').toLowerCase()+'.js';var j=new this([k]);j.provides(d);if(k=g[1].require)j.requires(d.replace(g[0],k));return j}return null};e._8=function(a){return this._c[a]=this._c[a]||{}};e._4=function(a,b){if(typeof a!=='string')return undefined;var c=b?{}:this._8(a);if(c.obj!==undefined)return c.obj;var d=b||this.ENV,h=a.split('.'),f;while(f=h.shift())d=d&&d[f];if(b&&d===undefined)return this._4(a);return c.obj=d}})(JS.Package);JS.Package.DomLoader={HOST_REGEX:/^https?\:\/\/[^\/]+/i,usable:function(){return!!JS.Package._4('window.document.getElementsByTagName')},__FILE__:function(){var a=document.getElementsByTagName('script');src=a[a.length-1].src,url=window.location.href;if(/^\w+\:\/+/.test(src))return src;if(/^\//.test(src))return window.location.origin+src;return url.replace(/[^\/]*$/g,'')+src},cacheBust:function(a){var b=new Date().getTime();return a+(/\?/.test(a)?'&':'?')+b},fetch:function(a){var b=a;if(JS.cacheBust)a=this.cacheBust(a);this.HOST=this.HOST||this.HOST_REGEX.exec(window.location.href);var c=this.HOST_REGEX.exec(a);if(!this.HOST||(c&&c[0]!==this.HOST[0]))return null;JS.Package.log('Loading '+a);var d=new JS.Package.Deferred(),h=this,f=window.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest();f.open('GET',a,true);f.onreadystatechange=function(){if(f.readyState!==4)return;f.onreadystatechange=h._q;d.succeed(f.responseText+'\n//@ sourceURL='+b);f=null};f.send(null);return d},loadFile:function(c,d,h){if(JS.cacheBust&&!h)c=this.cacheBust(c);var f=this,i=document.getElementsByTagName('head')[0],g=document.createElement('script');g.type='text/javascript';if(h)return h.callback(function(code){JS.Package.log('Executing '+c);eval(code);d()});JS.Package.log('Loading and executing '+c);g.src=c;g.onload=g.onreadystatechange=function(){var a=g.readyState,b=g.status;if(!a||a==='loaded'||a==='complete'||(a===4&&b===200)){d();g.onload=g.onreadystatechange=f._q;i=null;g=null}};i.appendChild(g)},loadStyle:function(a){var b=document.createElement('link');b.rel='stylesheet';b.type='text/css';b.href=a;document.getElementsByTagName('head')[0].appendChild(b)},_q:function(){}};JS.Package.Loader=JS.Package.DomLoader;JS.Package.DSL={__FILE__:function(){return JS.Package.Loader.__FILE__()},pkg:function(a,b){var c=b?JS.Package._p(b):JS.Package._a(a);c.provides(a);return c},file:function(){return JS.Package._p.apply(JS.Package,arguments)},load:function(a,b){JS.Package.Loader.loadFile(a,b)},autoload:function(a,b){JS.Package._v(a,b)}};JS.Package.DSL.files=JS.Package.DSL.file;JS.Package.DSL.loader=JS.Package.DSL.file;JS.Packages=function(a){a.call(JS.Package.DSL)};JS.cacheBust=false;JS.load=function(a,b){JS.Package.Loader.loadFile(a,function(){if(typeof b==='function')b()});return this};JS.require=function(){var b=[],c=0;while(typeof arguments[c]==='string'){b.push(arguments[c]);c+=1}var d=arguments[c],h=arguments[c+1];JS.Package.when({complete:b},function(a){if(!d)return;d.apply(h||null,a&&a.complete)});return this};JS.Packages(function(){with(this){JS.Package.ENV.JSCLASS_PATH=JS.Package.ENV.JSCLASS_PATH||__FILE__().replace(/[^\/]*$/g,'');var b=JS.Package.ENV.JSCLASS_PATH;if(!/\/$/.test(b))b=b+'/';var c=function(a){return file(b+a+'.js')};c('core').provides('JS.Module','JS.Class','JS.Method','JS.Kernel','JS.Singleton','JS.Interface');var d='JS.Test.Unit';c('test').provides('JS.Test','JS.Test.Context','JS.Test.Mocking','JS.Test.FakeClock','JS.Test.AsyncSteps','JS.Test.Helpers',d,d+'.Assertions',d+'.TestCase',d+'.TestSuite',d+'.TestResult').requires('JS.Module','JS.Class','JS.Console','JS.DOM','JS.Enumerable','JS.SortedSet','JS.Comparable','JS.StackTrace').styling(b+'assets/testui.css');c('dom').provides('JS.DOM','JS.DOM.Builder').requires('JS.Class');c('console').provides('JS.Console').requires('JS.Module','JS.Enumerable');c('benchmark').provides('JS.Benchmark').requires('JS.Module').requires('JS.Console');c('comparable').provides('JS.Comparable').requires('JS.Module');c('constant_scope').provides('JS.ConstantScope').requires('JS.Module');c('forwardable').provides('JS.Forwardable').requires('JS.Module');c('enumerable').provides('JS.Enumerable').requires('JS.Module','JS.Class');c('deferrable').provides('JS.Deferrable').requires('JS.Module');c('observable').provides('JS.Observable').requires('JS.Module');c('hash').provides('JS.Hash','JS.OrderedHash').requires('JS.Class','JS.Enumerable','JS.Comparable');c('range').provides('JS.Range').requires('JS.Class','JS.Enumerable');c('set').provides('JS.Set','JS.HashSet','JS.OrderedSet','JS.SortedSet').requires('JS.Class','JS.Enumerable').uses('JS.Hash');c('linked_list').provides('JS.LinkedList','JS.LinkedList.Doubly','JS.LinkedList.Doubly.Circular').requires('JS.Class','JS.Enumerable');c('command').provides('JS.Command','JS.Command.Stack').requires('JS.Class','JS.Enumerable','JS.Observable');c('decorator').provides('JS.Decorator').requires('JS.Module','JS.Class');c('method_chain').provides('JS.MethodChain').requires('JS.Module','JS.Kernel');c('proxy').provides('JS.Proxy','JS.Proxy.Virtual').requires('JS.Module','JS.Class');c('stack_trace').provides('JS.StackTrace').requires('JS.Module','JS.Singleton','JS.Observable','JS.Enumerable','JS.Console');c('state').provides('JS.State').requires('JS.Module','JS.Class');c('tsort').provides('JS.TSort').requires('JS.Module').requires('JS.Class').requires('JS.Hash')}});
View
1 node_modules/jsclass/min/loader.js
@@ -0,0 +1 @@
+(function(){var a=(typeof this.global==='object')?this.global:this;a.JS=a.JS||{};JS.ENV=a})();JS.Package=function(a){var b=JS.Package.OrderedSet;JS.Package._6(this);this._0=a;this._4=new b();this._7=new b();this._e=new b();this._f=new b();this._5={};this._8={}};(function(f){f.displayName='Package';f.toString=function(){return f.displayName};f.log=function(a){if(typeof window==='undefined')return;if(typeof window.runtime==='object')window.runtime.trace(a);if(window.console&&console.info)console.info(a)};var q=f.OrderedSet=function(a){this._g=this.list=[];this._6={};if(!a)return;for(var b=0,c=a.length;b<c;b++)this.push(a[b])};q.prototype.push=function(a){var b=(a.id!==undefined)?a.id:a,c=this._6;if(c.hasOwnProperty(b))return;c[b]=this._g.length;this._g.push(a)};var n=f.Deferred=function(){this._h='deferred';this._i=null;this._j=[]};n.prototype.callback=function(a,b){if(this._h==='succeeded')a.call(b,this._i);else this._j.push([a,b])};n.prototype.succeed=function(a){this._h='succeeded';this._i=a;var b;while(b=this._j.shift())b[0].call(b[1],a)};f.ENV=JS.ENV;f.onerror=function(a){throw a};f._k=function(a){f.onerror(new Error(a));};var m=f.prototype,o=[['requires','_7'],['uses','_e'],['styling','_f']],p=o.length;while(p--)(function(pair){var r=pair[0],s=pair[1];m[r]=function(){var a=arguments.length,b;for(b=0;b<a;b++)this[s].push(arguments[b]);return this}})(o[p]);m.provides=function(){var a=arguments.length,b;for(b=0;b<a;b++){this._4.push(arguments[b]);f._9(arguments[b]).pkg=this}return this};m.setup=function(a){this._l=a;return this};m._s=function(a,b,c){if(this._8[a])return b.call(c);var d=this._5[a]=this._5[a]||[];d.push([b,c]);this._t()};m._3=function(a){if(this._8[a])return false;this._8[a]=true;var b=this._5[a];if(!b)return true;delete this._5[a];for(var c=0,d=b.length;c<d;c++)b[c][0].call(b[c][1]);return true};m._m=function(a){if(!a&&this.__isLoaded!==undefined)return this.__isLoaded;var b=this._4.list,c=b.length,d,g;while(c--){d=b[c];g=f._1(d,this._n);if(g!==undefined)continue;if(a)return f._k('Expected package at '+this._0+' to define '+d);else return this.__isLoaded=false}return this.__isLoaded=true};m._t=function(){if(!this._3('request'))return;this._u();var j=this._7.list.concat(this._e.list),i=this._a||[],l=(this._0||{}).length,k=this;f.when({load:j});f.when({complete:this._7.list},function(){f.when({complete:j,load:[this]},function(){this._3('complete')},this);var c=function(a){if(l===0)return d(a);l-=1;var b=k._0.length-l-1;f.Loader.loadFile(k._0[b],c,i[b])};var d=function(a){k._n=a;if(k._l)k._l();k._m(true);k._3('load')};if(this._m()){this._3('download');return this._3('load')}if(this._0===undefined)return f._k('No load path found for '+this._4.list[0]);if(typeof this._0==='function')this._0(d);else c();if(!f.Loader.loadStyle)return;var g=this._f.list,h=g.length;while(h--)f.Loader.loadStyle(g[h]);this._3('download')},this)};m._u=function(){if(this._a||!(this._0 instanceof Array)||!f.Loader.fetch)return;this._a=[];for(var a=0,b=this._0.length;a<b;a++)this._a[a]=f.Loader.fetch(this._0[a])};m.toString=function(){return'Package:'+this._4.list.join(',')};f.when=function(a,b,c){var d=[],g={},h,j,i;for(h in a){if(!a.hasOwnProperty(h))continue;g[h]=[];j=new f.OrderedSet(a[h]);i=j.list.length;while(i--)d.push([h,j.list[i],i])}var l=i=d.length;if(l===0)return b&&b.call(c,g);while(i--)(function(h){var k=f._b(h[1]);k._s(h[0],function(){g[h[0]][h[2]]=f._1(h[1],k._n);l-=1;if(l===0&&b)b.call(c,g)})})(d[i])};f._o=1;f._c={};f._d={};f._p=[];f._6=function(a){a.id=this._o;this._o+=1};f._q=function(a){var b=a.toString(),c=this._c[b];if(c)return c;if(typeof a==='string')a=[].slice.call(arguments);c=this._c[b]=new this(a);return c};f._b=function(a){if(typeof a!=='string')return a;var b=this._9(a);if(b.pkg)return b.pkg;var c=this._v(a);if(c)return c;var d=new this();d.provides(a);return d};f.remove=function(a){var b=this._b(a);delete this._d[a];delete this._c[b._0]};f._w=function(a,b){this._p.push([a,b])};f._v=function(d){var g=this._p,h=g.length,j,i,l;for(j=0;j<h;j++){i=g[j];if(!i[0].test(d))continue;l=i[1].from+'/'+d.replace(/([a-z])([A-Z])/g,function(a,b,c){return b+'_'+c}).replace(/\./g,'/').toLowerCase()+'.js';var k=new this([l]);k.provides(d);if(l=i[1].require)k.requires(d.replace(i[0],l));return k}return null};f._9=function(a){return this._d[a]=this._d[a]||{}};f._1=function(a,b){if(typeof a!=='string')return undefined;var c=b?{}:this._9(a);if(c.obj!==undefined)return c.obj;var d=b||this.ENV,g=a.split('.'),h;while(h=g.shift())d=d&&d[h];if(b&&d===undefined)return this._1(a);return c.obj=d}})(JS.Package);JS.Package.CommonJSLoader={usable:function(){return typeof require==='function'&&typeof exports==='object'},__FILE__:function(){return this._2},loadFile:function(a,b){var c=process.cwd(),d=a.replace(/\.[^\.]+$/g,''),a=require('path'),g=a.resolve(d);this._2=g+'.js';b(require(g))}};JS.Package.DomLoader={HOST_REGEX:/^https?\:\/\/[^\/]+/i,usable:function(){return!!JS.Package._1('window.document.getElementsByTagName')},__FILE__:function(){var a=document.getElementsByTagName('script');src=a[a.length-1].src,url=window.location.href;if(/^\w+\:\/+/.test(src))return src;if(/^\//.test(src))return window.location.origin+src;return url.replace(/[^\/]*$/g,'')+src},cacheBust:function(a){var b=new Date().getTime();return a+(/\?/.test(a)?'&':'?')+b},fetch:function(a){var b=a;if(JS.cacheBust)a=this.cacheBust(a);this.HOST=this.HOST||this.HOST_REGEX.exec(window.location.href);var c=this.HOST_REGEX.exec(a);if(!this.HOST||(c&&c[0]!==this.HOST[0]))return null;JS.Package.log('Loading '+a);var d=new JS.Package.Deferred(),g=this,h=window.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest();h.open('GET',a,true);h.onreadystatechange=function(){if(h.readyState!==4)return;h.onreadystatechange=g._r;d.succeed(h.responseText+'\n//@ sourceURL='+b);h=null};h.send(null);return d},loadFile:function(c,d,g){if(JS.cacheBust&&!g)c=this.cacheBust(c);var h=this,j=document.getElementsByTagName('head')[0],i=document.createElement('script');i.type='text/javascript';if(g)return g.callback(function(code){JS.Package.log('Executing '+c);eval(code);d()});JS.Package.log('Loading and executing '+c);i.src=c;i.onload=i.onreadystatechange=function(){var a=i.readyState,b=i.status;if(!a||a==='loaded'||a==='complete'||(a===4&&b===200)){d();i.onload=i.onreadystatechange=h._r;j=null;i=null}};j.appendChild(i)},loadStyle:function(a){var b=document.createElement('link');b.rel='stylesheet';b.type='text/css';b.href=a;document.getElementsByTagName('head')[0].appendChild(b)},_r:function(){}};JS.Package.RhinoLoader={usable:function(){return typeof java==='object'&&typeof require==='function'},__FILE__:function(){return this._2},loadFile:function(a,b){var c=java.lang.System.getProperty('user.dir'),d=a.replace(/\.[^\.]+$/g,'');var g=new java.io.File(c,d).toString();this._2=g+'.js';b(require(g))}};JS.Package.ServerLoader={usable:function(){return typeof JS.Package._1('load')==='function'&&typeof JS.Package._1('version')==='function'},__FILE__:function(){return this._2},loadFile:function(a,b){this._2=a;load(a);b()}};JS.Package.WshLoader={usable:function(){return!!JS.Package._1('ActiveXObject')&&!!JS.Package._1('WScript')},__FILE__:function(){return this._2},loadFile:function(a,b){this._2=a;var c=new ActiveXObject('Scripting.FileSystemObject'),d,g;try{d=c.OpenTextFile(a);g=function(){eval(d.ReadAll())};g();b()}finally{try{if(d)d.Close()}catch(e){}}}};JS.Package.XULRunnerLoader={jsloader:'@mozilla.org/moz/jssubscript-loader;1',cssservice:'@mozilla.org/content/style-sheet-service;1',ioservice:'@mozilla.org/network/io-service;1',usable:function(){try{var a=(Components||{}).classes;return!!(a&&a[this.jsloader]&&a[this.jsloader].getService)}catch(e){return false}},setup:function(){var a=Components.classes,b=Components.interfaces;this.ssl=a[this.jsloader].getService(b.mozIJSSubScriptLoader);this.sss=a[this.cssservice].getService(b.nsIStyleSheetService);this.ios=a[this.ioservice].getService(b.nsIIOService)},loadFile:function(a,b){if(window.console&&console.info)console.info('Loading '+a);this.ssl.loadSubScript(a);b()},loadStyle:function(a){var b=this.ios.newURI(a,null,null);this.sss.loadAndRegisterSheet(b,this.sss.USER_SHEET)}};(function(){var a=[JS.Package.XULRunnerLoader,JS.Package.DomLoader,JS.Package.RhinoLoader,JS.Package.CommonJSLoader,JS.Package.ServerLoader,JS.Package.WshLoader],b=a.length,c,d;for(c=0;c<b;c++){d=a[c];if(d.usable()){JS.Package.Loader=d;if(d.setup)d.setup();break}}})();JS.Package.DSL={__FILE__:function(){return JS.Package.Loader.__FILE__()},pkg:function(a,b){var c=b?JS.Package._q(b):JS.Package._b(a);c.provides(a);return c},file:function(){return JS.Package._q.apply(JS.Package,arguments)},load:function(a,b){JS.Package.Loader.loadFile(a,b)},autoload:function(a,b){JS.Package._w(a,b)}};JS.Package.DSL.files=JS.Package.DSL.file;JS.Package.DSL.loader=JS.Package.DSL.file;JS.Packages=function(a){a.call(JS.Package.DSL)};JS.cacheBust=false;JS.load=function(a,b){JS.Package.Loader.loadFile(a,function(){if(typeof b==='function')b()});return this};JS.require=function(){var b=[],c=0;while(typeof arguments[c]==='string'){b.push(arguments[c]);c+=1}var d=arguments[c],g=arguments[c+1];JS.Package.when({complete:b},function(a){if(!d)return;d.apply(g||null,a&&a.complete)});return this};JS.Packages(function(){with(this){JS.Package.ENV.JSCLASS_PATH=JS.Package.ENV.JSCLASS_PATH||__FILE__().replace(/[^\/]*$/g,'');var b=JS.Package.ENV.JSCLASS_PATH;if(!/\/$/.test(b))b=b+'/';var c=function(a){return file(b+a+'.js')};c('core').provides('JS.Module','JS.Class','JS.Method','JS.Kernel','JS.Singleton','JS.Interface');var d='JS.Test.Unit';c('test').provides('JS.Test','JS.Test.Context','JS.Test.Mocking','JS.Test.FakeClock','JS.Test.AsyncSteps','JS.Test.Helpers',d,d+'.Assertions',d+'.TestCase',d+'.TestSuite',d+'.TestResult').requires('JS.Module','JS.Class','JS.Console','JS.DOM','JS.Enumerable','JS.SortedSet','JS.Comparable','JS.StackTrace').styling(b+'assets/testui.css');c('dom').provides('JS.DOM','JS.DOM.Builder').requires('JS.Class');c('console').provides('JS.Console').requires('JS.Module','JS.Enumerable');c('benchmark').provides('JS.Benchmark').requires('JS.Module').requires('JS.Console');c('comparable').provides('JS.Comparable').requires('JS.Module');c('constant_scope').provides('JS.ConstantScope').requires('JS.Module');c('forwardable').provides('JS.Forwardable').requires('JS.Module');c('enumerable').provides('JS.Enumerable').requires('JS.Module','JS.Class');c('deferrable').provides('JS.Deferrable').requires('JS.Module');c('observable').provides('JS.Observable').requires('JS.Module');c('hash').provides('JS.Hash','JS.OrderedHash').requires('JS.Class','JS.Enumerable','JS.Comparable');c('range').provides('JS.Range').requires('JS.Class','JS.Enumerable');c('set').provides('JS.Set','JS.HashSet','JS.OrderedSet','JS.SortedSet').requires('JS.Class','JS.Enumerable').uses('JS.Hash');c('linked_list').provides('JS.LinkedList','JS.LinkedList.Doubly','JS.LinkedList.Doubly.Circular').requires('JS.Class','JS.Enumerable');c('command').provides('JS.Command','JS.Command.Stack').requires('JS.Class','JS.Enumerable','JS.Observable');c('decorator').provides('JS.Decorator').requires('JS.Module','JS.Class');c('method_chain').provides('JS.MethodChain').requires('JS.Module','JS.Kernel');c('proxy').provides('JS.Proxy','JS.Proxy.Virtual').requires('JS.Module','JS.Class');c('stack_trace').provides('JS.StackTrace').requires('JS.Module','JS.Singleton','JS.Observable','JS.Enumerable','JS.Console');c('state').provides('JS.State').requires('JS.Module','JS.Class');c('tsort').provides('JS.TSort').requires('JS.Module').requires('JS.Class').requires('JS.Hash')}});
View
1 node_modules/jsclass/min/method_chain.js
@@ -0,0 +1 @@
+JS.MethodChain=function(c){var d=[],e=c||{};this.____=function(a,b){d.push({func:a,args:b})};this.__exec__=function(a){return JS.MethodChain.exec(d,a||e)}};JS.MethodChain.exec=function(a,b){var c,d,e,f;loop:for(e=0,f=a.length;e<f;e++){c=a[e];if(b instanceof JS.MethodChain){b.____(c.func,c.args);continue}switch(typeof c.func){case'string':d=b[c.func];break;case'function':d=c.func;break;case'object':b=c.func;continue loop;break}b=(typeof d==='function')?d.apply(b,c.args):d}return b};JS.MethodChain.displayName='MethodChain';JS.MethodChain.toString=function(){return'MethodChain'};JS.MethodChain.prototype={_:function(){var a=arguments[0],b,c,d;switch(typeof a){case'object':case'function':b=[];for(c=1,d=arguments.length;c<d;c++)b.push(arguments[c]);this.____(a,b)}return this},toFunction:function(){var b=this;return function(a){return b.__exec__(a)}}};JS.MethodChain.reserved=(function(){var a=[],b;for(b in new JS.MethodChain)a.push(b);return new RegExp('^(?:'+a.join('|')+')$')})();JS.MethodChain.addMethod=function(a){if(this.reserved.test(a))return;var b=this.prototype[a]=function(){this.____(a,arguments);return this};b.displayName='MethodChain#'+a};JS.MethodChain.addMethods=function(a){var b=[],c,d;for(c in a){if(Number(c)!==c)b.push(c)}if(a instanceof Array){d=a.length;while(d--){if(typeof a[d]==='string')b.push(a[d])}}d=b.length;while(d--)this.addMethod(b[d]);a.__fns__&&this.addMethods(a.__fns__);a.prototype&&this.addMethods(a.prototype)};JS.ENV.it=JS.ENV.its=function(){return new JS.MethodChain()};JS.Method.added(function(a){if(a&&a.name)JS.MethodChain.addMethod(a.name)});JS.Kernel.include({wait:function(a){var b=new JS.MethodChain(),c=this;if(typeof a==='number')setTimeout(function(){b.__exec__(c)},a*1000);if(this.forEach&&typeof a==='function')this.forEach(function(item){setTimeout(function(){b.__exec__(item)},a.apply(this,arguments)*1000)});return b},_:function(){var a=arguments[0],b=[],c,d;for(c=1,d=arguments.length;c<d;c++)b.push(arguments[c]);return(typeof a==='object'&&a)||(typeof a==='function'&&a.apply(this,b))||this}});(function(){var a=JS.Module.__queue__,b=a.length;while(b--)JS.MethodChain.addMethods(a[b]);delete JS.Module.__queue__})();JS.MethodChain.addMethods(['abs','accept','acceptCharset','accesskey','acos','action','add','addEventListener','alt','altKey','anchor','appendChild','apply','archive','arguments','arity','asin','atan','atan2','attributes','autocomplete','autofocus','azimuth','background','backgroundAttachment','backgroundColor','backgroundImage','backgroundPosition','backgroundRepeat','baseURI','baseURIObject','big','bind','blink','blur','bold','border','borderBottom','borderBottomColor','borderBottomStyle','borderBottomWidth','borderCollapse','borderColor','borderLeft','borderLeftColor','borderLeftStyle','borderLeftWidth','borderRight','borderRightColor','borderRightStyle','borderRightWidth','borderSpacing','borderStyle','borderTop','borderTopColor','borderTopStyle','borderTopWidth','borderWidth','bottom','bubbles','button','call','caller','cancelBubble','cancelable','captionSide','ceil','charAt','charCode','charCodeAt','checkValidity','childNodes','classList','className','clear','click','clientHeight','clientLeft','clientTop','clientWidth','clientX','clientY','clip','cloneNode','codebase','codetype','color','cols','compareDocumentPosition','concat','constructor','content','cos','counterIncrement','counterReset','create','cssFloat','ctrlKey','cue','cueAfter','cueBefore','currentTarget','cursor','data','declare','defineProperties','defineProperty','description','detail','dir','direction','disabled','dispatchEvent','display','elements','elevation','emptyCells','encoding','enctype','eval','eventPhase','every','exec','exp','explicitOriginalTarget','fileName','filter','firstChild','fixed','floor','focus','font','fontFamily','fontSize','fontSizeAdjust','fontStretch','fontStyle','fontVariant','fontWeight','fontcolor','fontsize','for','forEach','formaction','formenctype','formmethod','formnovalidate','formtarget','freeze','fromCharCode','getAttribute','getAttributeNS','getAttributeNode','getAttributeNodeNS','getDate','getDay','getElementsByClassName','getElementsByTagName','getElementsByTagNameNS','getFullYear','getHours','getMilliseconds','getMinutes','getMonth','getOwnPropertyDescriptor','getOwnPropertyNames','getPrototypeOf','getSeconds','getTime','getTimezoneOffset','getUTCDate','getUTCDay','getUTCFullYear','getUTCHours','getUTCMilliseconds','getUTCMinutes','getUTCMonth','getUTCSeconds','getYear','global','hasAttribute','hasAttributeNS','hasAttributes','hasChildNodes','hasOwnProperty','height','href','id','ignoreCase','imeMode','index','indexOf','initEvent','initKeyEvent','initMessageEvent','initMouseEvent','initUIEvent','innerHTML','input','insertBefore','isArray','isChar','isDefaultNamespace','isExtensible','isFrozen','isPrototypeOf','isSameNode','isSealed','isSupported','ismap','italics','item','join','keyCode','keys','lang','lastChild','lastIndex','lastIndexOf','layerX','layerY','left','length','letterSpacing','lineHeight','lineNumber','link','listStyle','listStyleImage','listStylePosition','listStyleType','localName','localeCompare','log','map','margin','marginBottom','marginLeft','marginRight','marginTop','markerOffset','marks','match','max','maxHeight','maxWidth','maxlength','message','metaKey','method','min','minHeight','minWidth','mozGetFileNameArray','mozInputSource','mozMatchesSelector','mozSetFileNameArray','multiline','multiple','name','namedItem','namespaceURI','nextSibling','nodeArg','nodeName','nodePrincipal','nodeType','nodeValue','normalize','novalidate','now','nsIDOMNodeList','nsIPrincipal','nsIURI','number','offsetHeight','offsetLeft','offsetParent','offsetTop','offsetWidth','onafterprint','onbeforeprint','onbeforeunload','onhashchange','onmessage','onoffline','ononline','onpopstate','onredo','onresize','onundo','onunload','opacity','originalTarget','orphans','otherNode','outline','outlineColor','outlineOffset','outlineStyle','outlineWidth','overflow','overflowX','overflowY','ownerDocument','padding','paddingBottom','paddingLeft','paddingRight','paddingTop','page','pageBreakAfter','pageBreakBefore','pageBreakInside','pageX','pageY','parentNode','parse','pattern','pause','pauseAfter','pauseBefore','pitch','pitchRange','placeholder','playDuring','pop','position','pow','prefix','preventBubble','preventCapture','preventDefault','preventExtensions','previousSibling','propertyIsEnumerable','prototype','push','querySelector','querySelectorAll','quote','quotes','random','readonly','reduce','reduceRight','relatedTarget','remove','removeAttribute','removeAttributeNS','removeAttributeNode','removeChild','removeEventListener','replace','replaceChild','required','reset','reverse','richness','right','round','rows','screenX','screenY','scrollHeight','scrollIntoView','scrollLeft','scrollTop','scrollWidth','seal','search','select','setAttribute','setAttributeNS','setAttributeNode','setAttributeNodeNS','setCapture','setCustomValidity','setDate','setFullYear','setHours','setMilliseconds','setMinutes','setMonth','setSeconds','setSelectionRange','setTime','setUTCDate','setUTCFullYear','setUTCHours','setUTCMilliseconds','setUTCMinutes','setUTCMonth','setUTCSeconds','setYear','shift','shiftKey','sin','size','slice','small','some','sort','source','speak','speakHeader','speakNumeral','speakPunctuation','speechRate','spellcheck','splice','split','sqrt','src','stack','standby','step','sticky','stopPropagation','stress','strike','style','sub','submit','substr','substring','sup','tabIndex','tableLayout','tagName','tan','target','test','textAlign','textContent','textDecoration','textIndent','textShadow','textTransform','timeStamp','title','toDateString','toExponential','toFixed','toGMTString','toJSON','toLocaleDateString','toLocaleFormat','toLocaleLowerCase','toLocaleString','toLocaleTimeString','toLocaleUpperCase','toLowerCase','toPrecision','toSource','toString','toTimeString','toUTCString','toUpperCase','top','trim','trimLeft','trimRight','type','unicodeBidi','unshift','unwatch','usemap','valueOf','verticalAlign','view','visibility','voiceFamily','volume','watch','which','whiteSpace','widows','width','wordSpacing','wordWrap','wrap','zIndex']);
View
1 node_modules/jsclass/min/observable.js
@@ -0,0 +1 @@
+JS.Observable=new JS.Module('Observable',{extend:{DEFAULT_METHOD:'update'},addObserver:function(c,b){(this.__observers__=this.__observers__||[]).push({_0:c,_1:b||null})},removeObserver:function(c,b){this.__observers__=this.__observers__||[];b=b||null;var a=this.countObservers();while(a--){if(this.__observers__[a]._0===c&&this.__observers__[a]._1===b){this.__observers__.splice(a,1);return}}},removeObservers:function(){this.__observers__=[]},countObservers:function(){return(this.__observers__=this.__observers__||[]).length},notifyObservers:function(){if(!this.isChanged())return;var c=this.countObservers(),b,a,d;while(c--){b=this.__observers__[c];a=b._0;d=b._1;if(typeof a==='function')a.apply(d||null,arguments);else a[d||JS.Observable.DEFAULT_METHOD].apply(a,arguments)}},setChanged:function(c){this.__changed__=!(c===false)},isChanged:function(){if(this.__changed__===undefined)this.__changed__=true;return!!this.__changed__}});JS.Observable.alias({subscribe:'addObserver',unsubscribe:'removeObserver'},true);
View
1 node_modules/jsclass/min/package-browser.js
@@ -0,0 +1 @@
+(function(){var a=(typeof this.global==='object')?this.global:this;a.JS=a.JS||{};JS.ENV=a})();JS.Package=function(a){var b=JS.Package.OrderedSet;JS.Package._5(this);this._0=a;this._2=new b();this._6=new b();this._d=new b();this._e=new b();this._3={};this._7={}};(function(d){d.displayName='Package';d.toString=function(){return d.displayName};d.log=function(a){if(typeof window==='undefined')return;if(typeof window.runtime==='object')window.runtime.trace(a);if(window.console&&console.info)console.info(a)};var p=d.OrderedSet=function(a){this._f=this.list=[];this._5={};if(!a)return;for(var b=0,c=a.length;b<c;b++)this.push(a[b])};p.prototype.push=function(a){var b=(a.id!==undefined)?a.id:a,c=this._5;if(c.hasOwnProperty(b))return;c[b]=this._f.length;this._f.push(a)};var m=d.Deferred=function(){this._g='deferred';this._h=null;this._i=[]};m.prototype.callback=function(a,b){if(this._g==='succeeded')a.call(b,this._h);else this._i.push([a,b])};m.prototype.succeed=function(a){this._g='succeeded';this._h=a;var b;while(b=this._i.shift())b[0].call(b[1],a)};d.ENV=JS.ENV;d.onerror=function(a){throw a};d._j=function(a){d.onerror(new Error(a));};var l=d.prototype,n=[['requires','_6'],['uses','_d'],['styling','_e']],o=n.length;while(o--)(function(pair){var q=pair[0],r=pair[1];l[q]=function(){var a=arguments.length,b;for(b=0;b<a;b++)this[r].push(arguments[b]);return this}})(n[o]);l.provides=function(){var a=arguments.length,b;for(b=0;b<a;b++){this._2.push(arguments[b]);d._8(arguments[b]).pkg=this}return this};l.setup=function(a){this._k=a;return this};l._r=function(a,b,c){if(this._7[a])return b.call(c);var e=this._3[a]=this._3[a]||[];e.push([b,c]);this._s()};l._1=function(a){if(this._7[a])return false;this._7[a]=true;var b=this._3[a];if(!b)return true;delete this._3[a];for(var c=0,e=b.length;c<e;c++)b[c][0].call(b[c][1]);return true};l._l=function(a){if(!a&&this.__isLoaded!==undefined)return this.__isLoaded;var b=this._2.list,c=b.length,e,h;while(c--){e=b[c];h=d._4(e,this._m);if(h!==undefined)continue;if(a)return d._j('Expected package at '+this._0+' to define '+e);else return this.__isLoaded=false}return this.__isLoaded=true};l._s=function(){if(!this._1('request'))return;this._t();var i=this._6.list.concat(this._d.list),g=this._9||[],k=(this._0||{}).length,j=this;d.when({load:i});d.when({complete:this._6.list},function(){d.when({complete:i,load:[this]},function(){this._1('complete')},this);var c=function(a){if(k===0)return e(a);k-=1;var b=j._0.length-k-1;d.Loader.loadFile(j._0[b],c,g[b])};var e=function(a){j._m=a;if(j._k)j._k();j._l(true);j._1('load')};if(this._l()){this._1('download');return this._1('load')}if(this._0===undefined)return d._j('No load path found for '+this._2.list[0]);if(typeof this._0==='function')this._0(e);else c();if(!d.Loader.loadStyle)return;var h=this._e.list,f=h.length;while(f--)d.Loader.loadStyle(h[f]);this._1('download')},this)};l._t=function(){if(this._9||!(this._0 instanceof Array)||!d.Loader.fetch)return;this._9=[];for(var a=0,b=this._0.length;a<b;a++)this._9[a]=d.Loader.fetch(this._0[a])};l.toString=function(){return'Package:'+this._2.list.join(',')};d.when=function(a,b,c){var e=[],h={},f,i,g;for(f in a){if(!a.hasOwnProperty(f))continue;h[f]=[];i=new d.OrderedSet(a[f]);g=i.list.length;while(g--)e.push([f,i.list[g],g])}var k=g=e.length;if(k===0)return b&&b.call(c,h);while(g--)(function(f){var j=d._a(f[1]);j._r(f[0],function(){h[f[0]][f[2]]=d._4(f[1],j._m);k-=1;if(k===0&&b)b.call(c,h)})})(e[g])};d._n=1;d._b={};d._c={};d._o=[];d._5=function(a){a.id=this._n;this._n+=1};d._p=function(a){var b=a.toString(),c=this._b[b];if(c)return c;if(typeof a==='string')a=[].slice.call(arguments);c=this._b[b]=new this(a);return c};d._a=function(a){if(typeof a!=='string')return a;var b=this._8(a);if(b.pkg)return b.pkg;var c=this._u(a);if(c)return c;var e=new this();e.provides(a);return e};d.remove=function(a){var b=this._a(a);delete this._c[a];delete this._b[b._0]};d._v=function(a,b){this._o.push([a,b])};d._u=function(e){var h=this._o,f=h.length,i,g,k;for(i=0;i<f;i++){g=h[i];if(!g[0].test(e))continue;k=g[1].from+'/'+e.replace(/([a-z])([A-Z])/g,function(a,b,c){return b+'_'+c}).replace(/\./g,'/').toLowerCase()+'.js';var j=new this([k]);j.provides(e);if(k=g[1].require)j.requires(e.replace(g[0],k));return j}return null};d._8=function(a){return this._c[a]=this._c[a]||{}};d._4=function(a,b){if(typeof a!=='string')return undefined;var c=b?{}:this._8(a);if(c.obj!==undefined)return c.obj;var e=b||this.ENV,h=a.split('.'),f;while(f=h.shift())e=e&&e[f];if(b&&e===undefined)return this._4(a);return c.obj=e}})(JS.Package);JS.Package.DomLoader={HOST_REGEX:/^https?\:\/\/[^\/]+/i,usable:function(){return!!JS.Package._4('window.document.getElementsByTagName')},__FILE__:function(){var a=document.getElementsByTagName('script');src=a[a.length-1].src,url=window.location.href;if(/^\w+\:\/+/.test(src))return src;if(/^\//.test(src))return window.location.origin+src;return url.replace(/[^\/]*$/g,'')+src},cacheBust:function(a){var b=new Date().getTime();return a+(/\?/.test(a)?'&':'?')+b},fetch:function(a){var b=a;if(JS.cacheBust)a=this.cacheBust(a);this.HOST=this.HOST||this.HOST_REGEX.exec(window.location.href);var c=this.HOST_REGEX.exec(a);if(!this.HOST||(c&&c[0]!==this.HOST[0]))return null;JS.Package.log('Loading '+a);var e=new JS.Package.Deferred(),h=this,f=window.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest();f.open('GET',a,true);f.onreadystatechange=function(){if(f.readyState!==4)return;f.onreadystatechange=h._q;e.succeed(f.responseText+'\n//@ sourceURL='+b);f=null};f.send(null);return e},loadFile:function(c,e,h){if(JS.cacheBust&&!h)c=this.cacheBust(c);var f=this,i=document.getElementsByTagName('head')[0],g=document.createElement('script');g.type='text/javascript';if(h)return h.callback(function(code){JS.Package.log('Executing '+c);eval(code);e()});JS.Package.log('Loading and executing '+c);g.src=c;g.onload=g.onreadystatechange=function(){var a=g.readyState,b=g.status;if(!a||a==='loaded'||a==='complete'||(a===4&&b===200)){e();g.onload=g.onreadystatechange=f._q;i=null;g=null}};i.appendChild(g)},loadStyle:function(a){var b=document.createElement('link');b.rel='stylesheet';b.type='text/css';b.href=a;document.getElementsByTagName('head')[0].appendChild(b)},_q:function(){}};JS.Package.Loader=JS.Package.DomLoader;JS.Package.DSL={__FILE__:function(){return JS.Package.Loader.__FILE__()},pkg:function(a,b){var c=b?JS.Package._p(b):JS.Package._a(a);c.provides(a);return c},file:function(){return JS.Package._p.apply(JS.Package,arguments)},load:function(a,b){JS.Package.Loader.loadFile(a,b)},autoload:function(a,b){JS.Package._v(a,b)}};JS.Package.DSL.files=JS.Package.DSL.file;JS.Package.DSL.loader=JS.Package.DSL.file;JS.Packages=function(a){a.call(JS.Package.DSL)};JS.cacheBust=false;JS.load=function(a,b){JS.Package.Loader.loadFile(a,function(){if(typeof b==='function')b()});return this};JS.require=function(){var b=[],c=0;while(typeof arguments[c]==='string'){b.push(arguments[c]);c+=1}var e=arguments[c],h=arguments[c+1];JS.Package.when({complete:b},function(a){if(!e)return;e.apply(h||null,a&&a.complete)});return this};
View
1 node_modules/jsclass/min/package.js
@@ -0,0 +1 @@
+(function(){var a=(typeof this.global==='object')?this.global:this;a.JS=a.JS||{};JS.ENV=a})();JS.Package=function(a){var b=JS.Package.OrderedSet;JS.Package._6(this);this._0=a;this._4=new b();this._7=new b();this._e=new b();this._f=new b();this._5={};this._8={}};(function(f){f.displayName='Package';f.toString=function(){return f.displayName};f.log=function(a){if(typeof window==='undefined')return;if(typeof window.runtime==='object')window.runtime.trace(a);if(window.console&&console.info)console.info(a)};var q=f.OrderedSet=function(a){this._g=this.list=[];this._6={};if(!a)return;for(var b=0,c=a.length;b<c;b++)this.push(a[b])};q.prototype.push=function(a){var b=(a.id!==undefined)?a.id:a,c=this._6;if(c.hasOwnProperty(b))return;c[b]=this._g.length;this._g.push(a)};var n=f.Deferred=function(){this._h='deferred';this._i=null;this._j=[]};n.prototype.callback=function(a,b){if(this._h==='succeeded')a.call(b,this._i);else this._j.push([a,b])};n.prototype.succeed=function(a){this._h='succeeded';this._i=a;var b;while(b=this._j.shift())b[0].call(b[1],a)};f.ENV=JS.ENV;f.onerror=function(a){throw a};f._k=function(a){f.onerror(new Error(a));};var m=f.prototype,o=[['requires','_7'],['uses','_e'],['styling','_f']],p=o.length;while(p--)(function(pair){var r=pair[0],s=pair[1];m[r]=function(){var a=arguments.length,b;for(b=0;b<a;b++)this[s].push(arguments[b]);return this}})(o[p]);m.provides=function(){var a=arguments.length,b;for(b=0;b<a;b++){this._4.push(arguments[b]);f._9(arguments[b]).pkg=this}return this};m.setup=function(a){this._l=a;return this};m._s=function(a,b,c){if(this._8[a])return b.call(c);var d=this._5[a]=this._5[a]||[];d.push([b,c]);this._t()};m._3=function(a){if(this._8[a])return false;this._8[a]=true;var b=this._5[a];if(!b)return true;delete this._5[a];for(var c=0,d=b.length;c<d;c++)b[c][0].call(b[c][1]);return true};m._m=function(a){if(!a&&this.__isLoaded!==undefined)return this.__isLoaded;var b=this._4.list,c=b.length,d,g;while(c--){d=b[c];g=f._1(d,this._n);if(g!==undefined)continue;if(a)return f._k('Expected package at '+this._0+' to define '+d);else return this.__isLoaded=false}return this.__isLoaded=true};m._t=function(){if(!this._3('request'))return;this._u();var j=this._7.list.concat(this._e.list),i=this._a||[],l=(this._0||{}).length,k=this;f.when({load:j});f.when({complete:this._7.list},function(){f.when({complete:j,load:[this]},function(){this._3('complete')},this);var c=function(a){if(l===0)return d(a);l-=1;var b=k._0.length-l-1;f.Loader.loadFile(k._0[b],c,i[b])};var d=function(a){k._n=a;if(k._l)k._l();k._m(true);k._3('load')};if(this._m()){this._3('download');return this._3('load')}if(this._0===undefined)return f._k('No load path found for '+this._4.list[0]);if(typeof this._0==='function')this._0(d);else c();if(!f.Loader.loadStyle)return;var g=this._f.list,h=g.length;while(h--)f.Loader.loadStyle(g[h]);this._3('download')},this)};m._u=function(){if(this._a||!(this._0 instanceof Array)||!f.Loader.fetch)return;this._a=[];for(var a=0,b=this._0.length;a<b;a++)this._a[a]=f.Loader.fetch(this._0[a])};m.toString=function(){return'Package:'+this._4.list.join(',')};f.when=function(a,b,c){var d=[],g={},h,j,i;for(h in a){if(!a.hasOwnProperty(h))continue;g[h]=[];j=new f.OrderedSet(a[h]);i=j.list.length;while(i--)d.push([h,j.list[i],i])}var l=i=d.length;if(l===0)return b&&b.call(c,g);while(i--)(function(h){var k=f._b(h[1]);k._s(h[0],function(){g[h[0]][h[2]]=f._1(h[1],k._n);l-=1;if(l===0&&b)b.call(c,g)})})(d[i])};f._o=1;f._c={};f._d={};f._p=[];f._6=function(a){a.id=this._o;this._o+=1};f._q=function(a){var b=a.toString(),c=this._c[b];if(c)return c;if(typeof a==='string')a=[].slice.call(arguments);c=this._c[b]=new this(a);return c};f._b=function(a){if(typeof a!=='string')return a;var b=this._9(a);if(b.pkg)return b.pkg;var c=this._v(a);if(c)return c;var d=new this();d.provides(a);return d};f.remove=function(a){var b=this._b(a);delete this._d[a];delete this._c[b._0]};f._w=function(a,b){this._p.push([a,b])};f._v=function(d){var g=this._p,h=g.length,j,i,l;for(j=0;j<h;j++){i=g[j];if(!i[0].test(d))continue;l=i[1].from+'/'+d.replace(/([a-z])([A-Z])/g,function(a,b,c){return b+'_'+c}).replace(/\./g,'/').toLowerCase()+'.js';var k=new this([l]);k.provides(d);if(l=i[1].require)k.requires(d.replace(i[0],l));return k}return null};f._9=function(a){return this._d[a]=this._d[a]||{}};f._1=function(a,b){if(typeof a!=='string')return undefined;var c=b?{}:this._9(a);if(c.obj!==undefined)return c.obj;var d=b||this.ENV,g=a.split('.'),h;while(h=g.shift())d=d&&d[h];if(b&&d===undefined)return this._1(a);return c.obj=d}})(JS.Package);JS.Package.CommonJSLoader={usable:function(){return typeof require==='function'&&typeof exports==='object'},__FILE__:function(){return this._2},loadFile:function(a,b){var c=process.cwd(),d=a.replace(/\.[^\.]+$/g,''),a=require('path'),g=a.resolve(d);this._2=g+'.js';b(require(g))}};JS.Package.DomLoader={HOST_REGEX:/^https?\:\/\/[^\/]+/i,usable:function(){return!!JS.Package._1('window.document.getElementsByTagName')},__FILE__:function(){var a=document.getElementsByTagName('script');src=a[a.length-1].src,url=window.location.href;if(/^\w+\:\/+/.test(src))return src;if(/^\//.test(src))return window.location.origin+src;return url.replace(/[^\/]*$/g,'')+src},cacheBust:function(a){var b=new Date().getTime();return a+(/\?/.test(a)?'&':'?')+b},fetch:function(a){var b=a;if(JS.cacheBust)a=this.cacheBust(a);this.HOST=this.HOST||this.HOST_REGEX.exec(window.location.href);var c=this.HOST_REGEX.exec(a);if(!this.HOST||(c&&c[0]!==this.HOST[0]))return null;JS.Package.log('Loading '+a);var d=new JS.Package.Deferred(),g=this,h=window.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest();h.open('GET',a,true);h.onreadystatechange=function(){if(h.readyState!==4)return;h.onreadystatechange=g._r;d.succeed(h.responseText+'\n//@ sourceURL='+b);h=null};h.send(null);return d},loadFile:function(c,d,g){if(JS.cacheBust&&!g)c=this.cacheBust(c);var h=this,j=document.getElementsByTagName('head')[0],i=document.createElement('script');i.type='text/javascript';if(g)return g.callback(function(code){JS.Package.log('Executing '+c);eval(code);d()});JS.Package.log('Loading and executing '+c);i.src=c;i.onload=i.onreadystatechange=function(){var a=i.readyState,b=i.status;if(!a||a==='loaded'||a==='complete'||(a===4&&b===200)){d();i.onload=i.onreadystatechange=h._r;j=null;i=null}};j.appendChild(i)},loadStyle:function(a){var b=document.createElement('link');b.rel='stylesheet';b.type='text/css';b.href=a;document.getElementsByTagName('head')[0].appendChild(b)},_r:function(){}};JS.Package.RhinoLoader={usable:function(){return typeof java==='object'&&typeof require==='function'},__FILE__:function(){return this._2},loadFile:function(a,b){var c=java.lang.System.getProperty('user.dir'),d=a.replace(/\.[^\.]+$/g,'');var g=new java.io.File(c,d).toString();this._2=g+'.js';b(require(g))}};JS.Package.ServerLoader={usable:function(){return typeof JS.Package._1('load')==='function'&&typeof JS.Package._1('version')==='function'},__FILE__:function(){return this._2},loadFile:function(a,b){this._2=a;load(a);b()}};JS.Package.WshLoader={usable:function(){return!!JS.Package._1('ActiveXObject')&&!!JS.Package._1('WScript')},__FILE__:function(){return this._2},loadFile:function(a,b){this._2=a;var c=new ActiveXObject('Scripting.FileSystemObject'),d,g;try{d=c.OpenTextFile(a);g=function(){eval(d.ReadAll())};g();b()}finally{try{if(d)d.Close()}catch(e){}}}};JS.Package.XULRunnerLoader={jsloader:'@mozilla.org/moz/jssubscript-loader;1',cssservice:'@mozilla.org/content/style-sheet-service;1',ioservice:'@mozilla.org/network/io-service;1',usable:function(){try{var a=(Components||{}).classes;return!!(a&&a[this.jsloader]&&a[this.jsloader].getService)}catch(e){return false}},setup:function(){var a=Components.classes,b=Components.interfaces;this.ssl=a[this.jsloader].getService(b.mozIJSSubScriptLoader);this.sss=a[this.cssservice].getService(b.nsIStyleSheetService);this.ios=a[this.ioservice].getService(b.nsIIOService)},loadFile:function(a,b){if(window.console&&console.info)console.info('Loading '+a);this.ssl.loadSubScript(a);b()},loadStyle:function(a){var b=this.ios.newURI(a,null,null);this.sss.loadAndRegisterSheet(b,this.sss.USER_SHEET)}};(function(){var a=[JS.Package.XULRunnerLoader,JS.Package.DomLoader,JS.Package.RhinoLoader,JS.Package.CommonJSLoader,JS.Package.ServerLoader,JS.Package.WshLoader],b=a.length,c,d;for(c=0;c<b;c++){d=a[c];if(d.usable()){JS.Package.Loader=d;if(d.setup)d.setup();break}}})();JS.Package.DSL={__FILE__:function(){return JS.Package.Loader.__FILE__()},pkg:function(a,b){var c=b?JS.Package._q(b):JS.Package._b(a);c.provides(a);return c},file:function(){return JS.Package._q.apply(JS.Package,arguments)},load:function(a,b){JS.Package.Loader.loadFile(a,b)},autoload:function(a,b){JS.Package._w(a,b)}};JS.Package.DSL.files=JS.Package.DSL.file;JS.Package.DSL.loader=JS.Package.DSL.file;JS.Packages=function(a){a.call(JS.Package.DSL)};JS.cacheBust=false;JS.load=function(a,b){JS.Package.Loader.loadFile(a,function(){if(typeof b==='function')b()});return this};JS.require=function(){var b=[],c=0;while(typeof arguments[c]==='string'){b.push(arguments[c]);c+=1}var d=arguments[c],g=arguments[c+1];JS.Package.when({complete:b},function(a){if(!d)return;d.apply(g||null,a&&a.complete)});return this};
View
1 node_modules/jsclass/min/proxy.js
@@ -0,0 +1 @@
+JS.Proxy=new JS.Module('Proxy',{extend:{Virtual:new JS.Class({initialize:function(a){var g=function(){},e=new JS.Class(),h={},f,d;g.prototype=a.prototype;for(f in a.prototype){d=a.prototype[f];if(typeof d==='function'&&d!==a)d=this.klass.forward(f);h[f]=d}e.include({initialize:function(){var c=arguments,b=null;this.__getSubject__=function(){b=new g;a.apply(b,c);return(this.__getSubject__=function(){return b})()}},klass:a,constructor:a},{_0:false});e.include(new JS.Module(h),{_0:false});e.include(this.klass.InstanceMethods);return e},extend:{forward:function(b){return function(){var c=this.__getSubject__();return c[b].apply(c,arguments)}},InstanceMethods:new JS.Module({extend:function(c){this.__getSubject__().extend(c);var b,a;for(b in c){a=c[b];if(typeof a==='function')a=JS.Proxy.Virtual.forward(b);this[b]=a}}})}})}});
View
1 node_modules/jsclass/min/range.js
@@ -0,0 +1 @@
+JS.Range=new JS.Class('Range',{include:JS.Enumerable||{},extend:{compare:function(a,c){return JS.isType(a,Object)?a.compareTo(c):(a<c?-1:(a>c?1:0))},succ:function(b){if(JS.isType(b,'string')){var e=b.split(''),d=e.length,f=null,g=null,h=true;while(h&&d--){f=null;JS.Enumerable.forEach.call(this.SETS,function(a){var c=this[a];if(e[d]!==c._0)return;g=c;f=c._1},this);if(f===null){f=String.fromCharCode(e[d].charCodeAt(0)+1);h=false}e[d]=f}if(h)e.unshift(g._1==='0'?'1':g._1);return e.join('')}if(JS.isType(b,'number'))return b+1;if(typeof b.succ==='function')return b.succ();return null}},initialize:function(a,c,b){this._1=a;this._0=c;this._2=!!b},forEach:function(b,e){if(!b)return this.enumFor('forEach');b=JS.Enumerable.toFn(b);var d=this._1,f=this._2;if(this.klass.compare(d,this._0)>0)return;var g=JS.isType(d,Object)?function(a,c){return a.compareTo(c)<0}:function(a,c){return a!==c};while(g(d,this._0)){b.call(e||null,d);d=this.klass.succ(d);if(JS.isType(d,'string')&&d.length>this._0.length){f=true;break}}if(this.klass.compare(d,this._0)>0)return;if(!f)b.call(e||null,d)},equals:function(a){return JS.isType(a,JS.Range)&&JS.Enumerable.areEqual(a._1,this._1)&&JS.Enumerable.areEqual(a._0,this._0)&&a._2===this._2},hash:function(){var a=JS.Hash.codeFor(this._1)+'..';if(this._2)a+='.';a+=JS.Hash.codeFor(this._0);return a},first:function(){return this._1},last:function(){return this._0},excludesEnd:function(){return this._2},includes:function(a){var c=this.klass.compare(a,this._1),b=this.klass.compare(a,this._0);return c>=0&&(this._2?b<0:b<=0)},step:function(c,b,e){if(!b)return this.enumFor('step',c);b=JS.Enumerable.toFn(b);var d=0;this.forEach(function(a){if(d%c===0)b.call(e||null,a);d+=1})},toString:function(){var a=this._1.toString()+'..';if(this._2)a+='.';a+=this._0.toString();return a}});JS.Range.extend({DIGITS:new JS.Range('0','9'),LOWERCASE:new JS.Range('a','z'),UPPERCASE:new JS.Range('A','Z'),SETS:['DIGITS','LOWERCASE','UPPERCASE']});JS.Range.alias({begin:'first',end:'last',covers:'includes',match:'includes',member:'includes'});
View
1 node_modules/jsclass/min/set.js
@@ -0,0 +1 @@
+JS.Set=new JS.Class('Set',{extend:{forEach:function(a,b,c){if(!a||!b)return;if(a.forEach)return a.forEach(b,c);for(var d=0,e=a.length;d<e;d++){if(a[d]!==undefined)b.call(c||null,a[d],d)}}},include:JS.Enumerable||{},initialize:function(a,b,c){this.clear();if(b)this.klass.forEach(a,function(item){this.add(b.call(c||null,item))},this);else this.merge(a)},forEach:function(a,b){if(!a)return this.enumFor('forEach');a=JS.Enumerable.toFn(a);this._0.forEachKey(a,b);return this},add:function(a){if(this.contains(a))return false;this._0.store(a,true);this.length=this.size=this._0.length;return true},classify:function(c,d){if(!c)return this.enumFor('classify');c=JS.Enumerable.toFn(c);var e=new JS.Hash();this.forEach(function(a){var b=c.call(d||null,a);if(!e.hasKey(b))e.store(b,new this.klass);e.get(b).add(a)},this);return e},clear:function(){this._0=new JS.Hash();this.size=this.length=0},complement:function(b){var c=new this.klass;this.klass.forEach(b,function(a){if(!this.contains(a))c.add(a)},this);return c},contains:function(a){return this._0.hasKey(a)},difference:function(b){b=JS.isType(b,JS.Set)?b:new JS.Set(b);var c=new this.klass;this.forEach(function(a){if(!b.contains(a))c.add(a)});return c},divide:function(a,b){if(!a)return this.enumFor('divide');a=JS.Enumerable.toFn(a);var c=this.classify(a,b),d=new JS.Set;c.forEachValue(d.method('add'));return d},equals:function(b){if(this.length!==b.length||!JS.isType(b,JS.Set))return false;var c=true;this.forEach(function(a){if(!c)return;if(!b.contains(a))c=false});return c},hash:function(){var b=[];this.forEach(function(a){b.push(JS.Hash.codeFor(a))});return b.sort().join('')},flatten:function(b){var c=new this.klass;c._0=this._0;if(!b){b=this;b.clear()}c.forEach(function(a){if(JS.isType(a,JS.Set))a.flatten(b);else b.add(a)});return b},inspect:function(){return this.toString()},intersection:function(b){var c=new this.klass;this.klass.forEach(b,function(a){if(this.contains(a))c.add(a)},this);return c},isEmpty:function(){return this._0.length===0},isProperSubset:function(a){return this._0.length<a._0.length&&this.isSubset(a)},isProperSuperset:function(a){return this._0.length>a._0.length&&this.isSuperset(a)},isSubset:function(b){var c=true;this.forEach(function(a){if(!c)return;if(!b.contains(a))c=false});return c},isSuperset:function(a){return a.isSubset(this)},merge:function(b){this.klass.forEach(b,function(a){this.add(a)},this)},product:function(c){var d=new JS.Set;this.forEach(function(b){this.klass.forEach(c,function(a){d.add([b,a])})},this);return d},rebuild:function(){this._0.rehash();this.length=this.size=this._0.length},remove:function(a){this._0.remove(a);this.length=this.size=this._0.length},removeIf:function(b,c){if(!b)return this.enumFor('removeIf');b=JS.Enumerable.toFn(b);this._0.removeIf(function(a){return b.call(c||null,a.key)});this.length=this.size=this._0.length;return this},replace:function(a){this.clear();this.merge(a)},subtract:function(b){this.klass.forEach(b,function(a){this.remove(a)},this)},toString:function(){var b=[];this.forEach(function(a){b.push(a.toString())});return this.klass.displayName+':{'+b.join(',')+'}'},union:function(a){var b=new this.klass;b.merge(this);b.merge(a);return b},xor:function(b){var c=new this.klass(b);this.forEach(function(a){c[c.contains(a)?'remove':'add'](a)});return c},_1:function(a){var b=this._0.length,c=JS.Enumerable;while(b--){if(c.areEqual(a,this._0[b]))return b}return-1}});JS.Set.alias({n:'intersection',u:'union',x:'product'});JS.HashSet=JS.Set;JS.OrderedSet=new JS.Class('OrderedSet',JS.Set,{clear:function(){this._0=new JS.OrderedHash();this.size=this.length=0}});JS.SortedSet=new JS.Class('SortedSet',JS.Set,{extend:{compare:function(a,b){return JS.isType(a,Object)?a.compareTo(b):(a<b?-1:(a>b?1:0))}},forEach:function(a,b){if(!a)return this.enumFor('forEach');a=JS.Enumerable.toFn(a);this.klass.forEach(this._0,a,b);return this},add:function(a){var b=this._1(a,true);if(b===null)return false;this._0.splice(b,0,a);this.length=this.size=this._0.length;return true},clear:function(){this._0=[];this.size=this.length=0},contains:function(a){return this._1(a)!==-1},rebuild:function(){var a=this._0;this.clear();this.merge(a)},remove:function(a){var b=this._1(a);if(b===-1)return;this._0.splice(b,1);this.length=this.size=this._0.length},removeIf:function(a,b){if(!a)return this.enumFor('removeIf');a=JS.Enumerable.toFn(a);var c=this._0,d=c.length;while(d--){if(a.call(b||null,c[d]))this.remove(c[d])}return this},_1:function(a,b){var c=this._0,d=c.length,e=0,f=d,g=this.klass.compare,h=JS.Enumerable,i;if(d===0)return b?0:-1;if(g(a,c[0])<1){f=0;e=0}if(g(a,c[d-1])>0){f=0;e=d}while(!h.areEqual(a,c[e])&&f>0.5){f=f/2;e+=(g(a,c[e])>0?1:-1)*Math.round(f);if(e>0&&g(a,c[e-1])>0&&g(a,c[e])<1)f=0}while(c[e]&&!h.areEqual(a,c[e])&&g(a,c[e])===0)e+=1;i=h.areEqual(a,c[e]);return b?(i?null:e):(i?e:-1)}});JS.Enumerable.include({toSet:function(a,b,c){a=a||JS.Set;return new a(this,b,c)}});
View
1 node_modules/jsclass/min/stack_trace.js
@@ -0,0 +1 @@
+JS.StackTrace=new JS.Module('StackTrace',{extend:{logger:new JS.Singleton({include:JS.Console,active:false,update:function(a,b){if(!this.active)return;switch(a){case'call':return this.logEnter(b);case'return':return this.logExit(b);case'error':return this.logError(b)}},indent:function(){var a=' ';JS.StackTrace.forEach(function(){a+='| '});return a},fullName:function(a){var b=JS.Console,f=a.method,g=a.env,d=f.name,c=f.module;return b.nameOf(g)+(c===g?'':'('+b.nameOf(c)+')')+'#'+d},logEnter:function(a){var b=this.fullName(a),f=JS.Console.convert(a.args).replace(/^\[/,'(').replace(/\]$/,')');if(this._0)this.puts();this.reset();this.print(' ');this.consoleFormat('bgblack','white');this.print('TRACE');this.reset();this.print(this.indent());this.blue();this.print(b);this.red();this.print(f);this.reset();this._0=true},logExit:function(a){var b=this.fullName(a);if(a.leaf){this.consoleFormat('red');this.print(' --> ')}else{this.reset();this.print(' ');this.consoleFormat('bgblack','white');this.print('TRACE');this.reset();this.print(this.indent());this.blue();this.print(b);this.red();this.print(' --> ')}this.consoleFormat('yellow');this.puts(JS.Console.convert(a.result));this.reset();this.print('');this._0=false},logError:function(a){this.puts();this.reset();this.print(' ');this.consoleFormat('bgred','white');this.print('ERROR');this.consoleFormat('bold','red');this.print(' '+JS.Console.convert(a));this.reset();this.print(' thrown by ');this.bold();this.print(JS.StackTrace.top().name);this.reset();this.puts('. Backtrace:');this.backtrace()},backtrace:function(){JS.StackTrace.reverseForEach(function(a){var b=JS.Console.convert(a.args).replace(/^\[/,'(').replace(/\]$/,')');this.print(' | ');this.consoleFormat('blue');this.print(a.name);this.red();this.print(b);this.reset();this.puts(' in ');this.print(' | ');this.bold();this.puts(JS.Console.convert(a.object))},this);this.reset();this.puts()}}),include:[JS.Observable,JS.Enumerable],wrap:function(b,f,g){var d=JS.StackTrace;var c=function(){var a;d.push(this,f,g,Array.prototype.slice.call(arguments));try{a=b.apply(this,arguments)}catch(e){d.error(e)}d.pop(a);return a};c.toString=function(){return b.toString()};c.__traced__=true;return c},stack:[],forEach:function(a,b){JS.Enumerable.forEach.call(this.stack,a,b)},top:function(){return this.stack[this.stack.length-1]||{}},push:function(a,b,f,g){var d=this.stack;if(d.length>0)d[d.length-1].leaf=false;var c={object:a,method:b,env:f,args:g,leaf:true};c.name=this.logger.fullName(c);this.notifyObservers('call',c);d.push(c)},pop:function(a){var b=this.stack.pop();b.result=a;this.notifyObservers('return',b)},error:function(a){if(a.logged)throw a;a.logged=true;this.notifyObservers('error',a);this.stack=[];throw a;}}});JS.StackTrace.addObserver(JS.StackTrace.logger);
View
1 node_modules/jsclass/min/state.js
@@ -0,0 +1 @@
+JS.State=new JS.Module('State',{__getState__:function(a){if(typeof a==='object')return a;if(typeof a==='string')return(this.states||{})[a];return{}},setState:function(a){this.__state__=this.__getState__(a);JS.State.addMethods(this.__state__,this.klass)},inState:function(){var a=arguments.length;while(a--){if(this.__state__===this.__getState__(arguments[a]))return true}return false},extend:{ClassMethods:new JS.Module({states:function(a){this.define('states',JS.State.buildCollection(this,a))}}),included:function(a){a.extend(this.ClassMethods)},stub:function(){return this},buildStubs:function(a,c,d){var b,e;for(b in d){c[b]={};for(e in d[b])a[e]=this.stub}},findStates:function(a,c){var d=a.length,b=[];while(d--){if(a[d].hasOwnProperty(c))b.push(a[d][c])}return b},buildCollection:function(a,c){var d={},b={},e=a.lookup('states'),h,g,k,i,j,f,l;this.buildStubs(d,b,c);for(f=0,l=e.length;f<l;f++)this.buildStubs(d,b,e[f]);for(h in b){g=new JS.Class(c[h]);j=this.findStates(e,h);f=j.length;while(f--){if(j[f])g.include(j[f].klass)}k={};for(i in d){if(!g.prototype[i])k[i]=d[i]}g.include(k);b[h]=new g}if(a.__tgt__)this.addMethods(d,a.__tgt__.klass);return b},addMethods:function(a,c){if(!c)return;var d={},b=c.prototype,e;for(e in a){if(b[e])continue;c.define(e,this.wrapped(e))}},wrapped:function(c){return function(){var a=(this.__state__||{})[c];return a?a.apply(this,arguments):this}}}});
View
1 node_modules/jsclass/min/test.js
@@ -0,0 +1 @@
+JS.Test=new JS.Module('Test',{extend:{Unit:new JS.Module({extend:{AssertionFailedError:new JS.Class(Error,{initialize:function(a){this.message=a.toString()}})}}),asyncTimeout:10,showStack:true,filter:function(a,b){return this.Unit.AutoRunner.filter(a,b)}}});JS.Test.Unit.extend({Util:new JS.Module({extend:{Observable:new JS.Module({extend:{NOTHING:{}},addListener:function(a,b,c){if(b===undefined)throw new Error('No callback was passed as a listener');this.channels()[a]=this.channels()[a]||[];this.channels()[a].push([b,c]);return b},removeListener:function(a,b,c){var d=this.channels()[a];if(!d)return;var f=d.length;while(f--){if(d[f][0]===b){d.splice(f,1);return b}}return null},notifyListeners:function(a,b){var b=JS.array(arguments),a=b.shift(),c=this.channels()[a];if(!c)return 0;for(var d=0,f=c.length;d<f;d++)c[d][0].apply(c[d][1]||null,b);return c.length},channels:function(){return this.__channels__=this.__channels__||[]}})}})});JS.Test.Unit.extend({Assertions:new JS.Module({assertBlock:function(a,b,c){if(typeof a==='function'){c=b;b=a;a=null}this.__wrapAssertion__(function(){if(!b.call(c||null)){a=this.buildMessage(a||'assertBlock failed');throw new JS.Test.Unit.AssertionFailedError(a);}})},flunk:function(a){this.assertBlock(this.buildMessage(a||'Flunked'),function(){return false})},assert:function(a,b){this.__wrapAssertion__(function(){this.assertBlock(this.buildMessage(b,'<?> is not true',a),function(){return a})})},assertEqual:function(a,b,c){var d=this.buildMessage(c,'<?> expected but was\n<?>',a,b);this.assertBlock(d,function(){return JS.Enumerable.areEqual(a,b)})},assertNotEqual:function(a,b,c){var d=this.buildMessage(c,'<?> expected not to be equal to\n<?>',a,b);this.assertBlock(d,function(){return!JS.Enumerable.areEqual(a,b)})},assertNull:function(a,b){this.assertEqual(null,a,b)},assertNotNull:function(a,b){var c=this.buildMessage(b,'<?> expected not to be null',a);this.assertBlock(c,function(){return a!==null})},assertKindOf:function(c,d,f){this.__wrapAssertion__(function(){var a=(!d||typeof c==='string')?typeof d:(d.klass||d.constructor);var b=this.buildMessage(f,'<?> expected to be an instance of\n<?> but was\n<?>',d,c,a);this.assertBlock(b,function(){return JS.isType(d,c)})})},assertRespondTo:function(c,d,f){this.__wrapAssertion__(function(){var a=this.buildMessage('','<?>\ngiven as the method name argument to #assertRespondTo must be a String',d);this.assertBlock(a,function(){return typeof d==='string'});var b=c?c.constructor:typeof c;a=this.buildMessage(f,'<?>\nof type <?>\nexpected to respond to <?>',c,b,d);this.assertBlock(a,function(){return c&&c[d]!==undefined})})},assertMatch:function(b,c,d){this.__wrapAssertion__(function(){var a=this.buildMessage(d,'<?> expected to match\n<?>',c,b);this.assertBlock(a,function(){return JS.match(b,c)})})},assertNoMatch:function(b,c,d){this.__wrapAssertion__(function(){var a=this.buildMessage(d,'<?> expected not to match\n<?>',c,b);this.assertBlock(a,function(){return(typeof b.test==='function')?!b.test(c):!b.match(c)})})},assertSame:function(a,b,c){var d=this.buildMessage(c,'<?> expected to be the same as\n<?>',a,b);this.assertBlock(d,function(){return b===a})},assertNotSame:function(a,b,c){var d=this.buildMessage(c,'<?> expected not to be the same as\n<?>',a,b);this.assertBlock(d,function(){return b!==a})},assertInDelta:function(b,c,d,f){this.__wrapAssertion__(function(){this.assertKindOf('number',b);this.assertKindOf('number',c);this.assertKindOf('number',d);this.assert(d>=0,'The delta should not be negative');var a=this.buildMessage(f,'<?> and\n<?> expected to be within\n<?> of each other',b,c,d);this.assertBlock(a,function(){return Math.abs(b-c)<=d})})},assertSend:function(b,c){this.__wrapAssertion__(function(){this.assertKindOf(Array,b,'assertSend requires an array of send information');this.assert(b.length>=2,'assertSend requires at least a receiver and a message name');var a=this.buildMessage(c,'<?> expected to respond to\n<?(?)> with a true value',b[0],JS.Test.Unit.AssertionMessage.literal(b[1]),b.slice(2));this.assertBlock(a,function(){return b[0][b[1]].apply(b[0],b.slice(2))})})},__processExceptionArgs__:function(a){var a=JS.array(a),b=(typeof a[a.length-1]==='function')?null:a.pop(),c=a.pop(),d=JS.isType(a[a.length-1],'string')?a.pop():'',f=new JS.Enumerable.Collection(a);return[a,f,d,c,b]},assertThrow:function(){var d=this.__processExceptionArgs__(arguments),f=d[0],g=d[1],h=d[2],i=d[3],j=d[4];this.__wrapAssertion__(function(){var b=this.buildMessage(h,'<?> exception expected but none was thrown',f),c;this.assertBlock(b,function(){try{i.call(j)}catch(e){c=e;return true}return false});b=this.buildMessage(h,'<?> exception expected but was\n?',f,c);this.assertBlock(b,function(){return g.any(function(a){return JS.isType(c,a)||(c.name&&c.name===a.name)})})})},assertThrows:function(){return this.assertThrow.apply(this,arguments)},assertNothingThrown:function(){var a=this.__processExceptionArgs__(arguments),b=a[0],c=a[1],d=a[2],f=a[3],g=a[4];this.__wrapAssertion__(function(){try{f.call(g)}catch(e){if((b.length===0&&!JS.isType(e,JS.Test.Unit.AssertionFailedError))||c.any(function(type){return JS.isType(e,type)}))this.assertBlock(this.buildMessage(d,'Exception thrown:\n?',e),function(){return false});else throw e;}})},buildMessage:function(){var a=JS.array(arguments),b=a.shift(),c=a.shift();return new JS.Test.Unit.AssertionMessage(b,c,a)},__wrapAssertion__:function(a){if(this.__assertionWrapped__===undefined)this.__assertionWrapped__=false;if(!this.__assertionWrapped__){this.__assertionWrapped__=true;try{this.addAssertion();return a.call(this)}finally{this.__assertionWrapped__=false}}else{return a.call(this)}},addAssertion:function(){}})});JS.Test.Unit.extend({AssertionMessage:new JS.Class({extend:{Literal:new JS.Class({initialize:function(a){this._1f=a;this.toString=this.inspect},inspect:function(){return this._1f.toString()}}),literal:function(a){return new this.Literal(a)},Template:new JS.Class({extend:{create:function(a){var b=a?a.match(/\(\?\)|(?=[^\\])\?|(?:(?!\(\?\))(?:\\\?|[^\?]))+/g):[];return new this(b)}},initialize:function(b){this._V=new JS.Enumerable.Collection(b);this.count=this._V.findAll(function(a){return a==='?'||a==='(?)'}).length},result:function(b){if(b.length!==this.count)throw'The number of parameters does not match the number of substitutions';var c=JS.array(b);return this._V.collect(function(a){if(a==='(?)')return c.shift().replace(/^\[/,'(').replace(/\]$/,')');if(a==='?')return c.shift();return a.replace(/\\\?/g,'?')}).join('')}})},initialize:function(a,b,c){this._W=a;this._1g=b;this._1h=new JS.Enumerable.Collection(c)},template:function(){return this._1i=this._1i||this.klass.Template.create(this._1g)},toString:function(){var b=[],c,d;if(this._W)b.push(this._W);d=this.template().result(this._1h.collect(function(a){return JS.Console.convert(a)},this));if(d!=='')b.push(d);return b.join('\n')}})});JS.Test.Unit.extend({Failure:new JS.Class({extend:{SINGLE_CHARACTER:'F'},initialize:function(a,b){this._l=a;this._X=b},singleCharacterDisplay:function(){return this.klass.SINGLE_CHARACTER},shortDisplay:function(){return this._l+': '+this._X.split('\n')[0]},longDisplay:function(){return'Failure:\n'+this._l+':\n'+this._X},toString:function(){return this.longDisplay()}})});JS.Test.Unit.extend({Error:new JS.Class({extend:{SINGLE_CHARACTER:'E'},initialize:function(a,b){this._l=a;this._f=b},singleCharacterDisplay:function(){return this.klass.SINGLE_CHARACTER},message:function(){return this._f.name+': '+this._f.message},shortDisplay:function(){return this._l+': '+this.message().split('\n')[0]},longDisplay:function(){var a='Error:\n'+this._l+':\n',b=JS.Console.filterBacktrace(this._f.stack||'');if(b&&JS.Test.showStack)a+=b;else a+=this.message();return a},toString:function(){return this.longDisplay()}})});JS.Test.Unit.extend({TestResult:new JS.Class({include:JS.Test.Unit.Util.Observable,extend:{CHANGED:'CHANGED',FAULT:'FAULT'},initialize:function(){this._Y=this._Z=0;this._b=[];this._m=[]},addRun:function(){this._Y+=1;this.notifyListeners(this.klass.CHANGED,this)},addFailure:function(a){this._b.push(a);this.notifyListeners(this.klass.FAULT,a);this.notifyListeners(this.klass.CHANGED,this)},addError:function(a){this._m.push(a);this.notifyListeners(this.klass.FAULT,a);this.notifyListeners(this.klass.CHANGED,this)},addAssertion:function(){this._Z+=1;this.notifyListeners(this.klass.CHANGED,this)},toString:function(){return this.runCount()+' tests, '+this.assertionCount()+' assertions, '+this.failureCount()+' failures, '+this.errorCount()+' errors'},passed:function(){return this._b.length===0&&this._m.length===0},runCount:function(){return this._Y},assertionCount:function(){return this._Z},failureCount:function(){return this._b.length},errorCount:function(){return this._m.length}})});JS.Test.Unit.extend({TestSuite:new JS.Class({include:JS.Enumerable,extend:{STARTED:'Test.Unit.TestSuite.STARTED',FINISHED:'Test.Unit.TestSuite.FINISHED',forEach:function(b,c,d,f){var g=false,h=false,i=b.length,j=-1,k=new Date().getTime(),m=this.setTimeout;var l=function(){h=true;var a=new Date().getTime();if(JS.Console.BROWSER&&(a-k)>1000){k=a;g=false;m(n,0)}else if(!g){g=true;while(g)n()}};var n=function(){j+=1;if(j===i){g=false;return d&&d.call(f||null)}h=false;c.call(f||null,b[j],l);if(!h)g=false};l()},setTimeout:(function(){return(typeof setTimeout==='undefined')?undefined:setTimeout})()},initialize:function(a){this._c=a||'Unnamed TestSuite';this._3=[]},forEach:function(a,b,c){this.klass.forEach(this._3,a,b,c)},run:function(c,d,f,g){f.call(g||null,this.klass.STARTED,this._c);this.forEach(function(a,b){a.run(c,b,f,g)},function(){f.call(g||null,this.klass.FINISHED,this._c);d.call(g||null)},this)},push:function(a){this._3.push(a);return this},remove:function(a){var b=this._3.length;while(b--){if(this._3[b]===a)this._3.splice(b,1)}},size:function(){var a=0,b=this._3.length;while(b--){a+=this._3[b].size()}return a},empty:function(){return this._3.length===0},toString:function(){return this._c}})});JS.Test.Unit.extend({TestCase:new JS.Class({include:JS.Test.Unit.Assertions,extend:[JS.Enumerable,{testCases:[],reports:[],clear:function(){this.testCases=[]},inherited:function(a){this.testCases.push(a)},forEach:function(a,b){for(var c=0,d=this.testCases.length;c<d;c++)a.call(b||null,this.testCases[c])},STARTED:'Test.Unit.TestCase.STARTED',FINISHED:'Test.Unit.TestCase.FINISHED',suite:function(b,c,d){var f=new JS.Enumerable.Collection(this.instanceMethods(c)),g=f.select(function(a){return this.filter(a,b)},this).sort(),h=new JS.Test.Unit.TestSuite(this.displayName);for(var i=0,j=g.length;i<j;i++){try{h.push(new this(g[i]))}catch(e){}}if(h.empty()&&d){try{h.push(new this('defaultTest'))}catch(e){}}return h},filter:function(a,b){if(!/^test./.test(a))return false;if(!b||b.length===0)return true;var c=b.length;while(c--){if(a.substr(6,b[c].length)===b[c])return true}return false}}],initialize:function(a){if(typeof this[a]!=='function')throw'invalid_test';this._1=a;this._B=true},run:function(a,b,c,d){c.call(d||null,this.klass.STARTED,this);this._2=a;var f=function(){this.exec('teardown',function(){this.exec(function(){JS.Test.Unit.mocking.verify()},function(){a.addRun();c.call(d||null,this.klass.FINISHED,this);b()})})};this.exec('setup',function(){this.exec(this._1,f)},f)},exec:function(b,c,d){if(!b)return c.call(this);if(!d)d=c;var f=(typeof b==='function')?b.length:this.__eigen__().instanceMethod(b).arity,g=(typeof b==='function')?b:this[b],h=null,i=false,j=false,k=this;if(f===0)return this._10(function(){g.call(this);c.call(this)},this.processError(d));this._10(function(){g.call(this,function(a){j=true;if(i)return;if(h)JS.ENV.clearTimeout(h);k.exec(a,c,d)})},this.processError(d));if(!j&&JS.ENV.setTimeout)h=JS.ENV.setTimeout(function(){k.exec(function(){i=true;throw new Error('Timed out after waiting '+JS.Test.asyncTimeout+' seconds for test to resume');},c,d)},JS.Test.asyncTimeout*1000)},processError:function(b){return function(a){if(JS.isType(a,JS.Test.Unit.AssertionFailedError))this.addFailure(a.message);else this.addError(a);if(b)b.call(this)}},_10:function(a,b,c){try{a.call(this)}catch(e){if(b)b.call(this,e)}finally{if(c)c.call(this)}},setup:function(a){a()},teardown:function(a){a()},defaultTest:function(){return this.flunk('No tests were specified')},passed:function(){return this._B},size:function(){return 1},addAssertion:function(){this._2.addAssertion()},addFailure:function(a){this._B=false;this._2.addFailure(new JS.Test.Unit.Failure(this.name(),a))},addError:function(a){this._B=false;this._2.addError(new JS.Test.Unit.Error(this.name(),a))},name:function(){var a=this._1.replace(/^test\W*/ig,'');if(a.replace(this.klass.displayName,'')===a)return this._1+'('+this.klass.displayName+')';else return a},toString:function(){return this.name()}})});JS.Test.Unit.extend({UI:new JS.Module({extend:{SILENT:1,PROGRESS_ONLY:2,NORMAL:3,VERBOSE:4,TestRunnerUtilities:new JS.Module({run:function(a,b){return new this(a,b||JS.Test.Unit.UI.NORMAL).start()},getFilter:function(){if(JS.ENV.location&&/\btest=/.test(location.search)){var a=[],b=location.search.match(/\btest=([^&]+)/)[1].split(','),c=b.length;while(c--)a.push(decodeURIComponent(b[c]));return a}else if(typeof process==='object'){return process.argv.slice(2)}else return[]}})}})});JS.Test.Unit.UI.extend({TestRunnerMediator:new JS.Class({extend:{RESET:'Test.Unit.UI.TestRunnerMediator.RESET',STARTED:'Test.Unit.UI.TestRunnerMediator.STARTED',FINISHED:'Test.Unit.UI.TestRunnerMediator.FINISHED'},include:JS.Test.Unit.Util.Observable,initialize:function(a){this._5=a},runSuite:function(){var g=new Date().getTime();this.notifyListeners(this.klass.RESET,this._5.size());var h=this.createResult();this.notifyListeners(this.klass.STARTED,h);var i=JS.bind(function(){h.removeListener(JS.Test.Unit.TestResult.FAULT,k);h.removeListener(JS.Test.Unit.TestResult.CHANGED,j);var a=new Date().getTime(),b=(a-g)/1000,c=true;var d=JS.Test.Unit.TestCase.reports,f=d.length;while(f--){JS.Console.output('');c=c&&d[f].report()}JS.Test.Unit.TestCase.reports=[];this.notifyListeners(this.klass.FINISHED,b,c)},this);var j=h.addListener(JS.Test.Unit.TestResult.CHANGED,function(a){this.notifyListeners(JS.Test.Unit.TestResult.CHANGED,a)},this);var k=h.addListener(JS.Test.Unit.TestResult.FAULT,function(a){this.notifyListeners(JS.Test.Unit.TestResult.FAULT,a)},this);this._5.run(h,i,function(a,b){this.notifyListeners(a,b)},this)},createResult:function(){return new JS.Test.Unit.TestResult()}})});JS.Test.Unit.UI.extend({Console:new JS.Module({extend:{TestRunner:new JS.Class({extend:JS.Test.Unit.UI.TestRunnerUtilities,include:JS.Console,initialize:function(a,b){this._5=(typeof a.suite==='function')?a.suite():a;this._1j=b||JS.Test.Unit.UI.NORMAL;this._C=false;this._n=[]},start:function(){this._D();this._E();return this._F()},_D:function(){this._0=this._G(this._5);var a=this._5.toString();if(JS.isType(this._5,JS.Module))a=this._5.displayName;this.consoleFormat('bold');this._d('Loaded suite '+a)},_G:function(a){return new JS.Test.Unit.UI.TestRunnerMediator(a)},_E:function(){this._0.addListener(JS.Test.Unit.TestResult.FAULT,this.method('_H'));this._0.addListener(JS.Test.Unit.UI.TestRunnerMediator.STARTED,this.method('_I'));this._0.addListener(JS.Test.Unit.UI.TestRunnerMediator.FINISHED,this.method('_J'));this._0.addListener(JS.Test.Unit.TestCase.STARTED,this.method('_K'));this._0.addListener(JS.Test.Unit.TestCase.FINISHED,this.method('_L'))},_F:function(){return this._0.runSuite()},_H:function(a){this._n.push(a);this.consoleFormat('bold','red');this._M(a.singleCharacterDisplay(),JS.Test.Unit.UI.PROGRESS_ONLY);this.reset();this._C=true},_I:function(a){this._2=a;this._p();this.reset();this._d('Started')},_J:function(a,b){for(var c=0,d=this._n.length;c<d;c++){var f=this._n[c].longDisplay(),g=f.split('\n'),h=g.shift(),i=g.shift(),j;this.consoleFormat('bold','red');this._p();this._d('\n'+(c+1)+') '+h);this._d(i);this.reset();while(j=g.shift())this.puts(j)}this.reset();this._p();this._d('Finished in '+a+' seconds');var k=(b&&this._2.passed()),m=k?'green':'red';this.consoleFormat(m);this._d(this._2,JS.Test.Unit.UI.PROGRESS_ONLY);this.reset();this.puts('');var l=k?0:1;if(typeof WScript!=='undefined')WScript.Quit(l);if(typeof process==='object')process.exit(l);if(typeof system==='object'&&system.exit)system.exit(l);if(typeof quit=='function')quit(l)},_K:function(a){this._M(a.name()+': ',JS.Test.Unit.UI.VERBOSE)},_L:function(a){this.consoleFormat('green');if(!this._C)this._M('.',JS.Test.Unit.UI.PROGRESS_ONLY);this.reset();this._p(JS.Test.Unit.UI.VERBOSE);this._C=false},_p:function(a){this._d('',a||JS.Test.Unit.UI.NORMAL)},_d:function(a,b){if(!this._11(b||JS.Test.Unit.UI.NORMAL))return;this.puts(a)},_M:function(a,b){if(!this._11(b||JS.Test.Unit.UI.NORMAL))return;this.print(a)},_11:function(a){return a<=this._1j}})}})});JS.Test.Unit.UI.extend({Browser:new JS.Module({extend:{TestRunner:new JS.Class({extend:JS.Test.Unit.UI.TestRunnerUtilities,initialize:function(a,b){this._5=(typeof a.suite==='function')?a.suite():a;this._n=[];this._6()},_6:function(){return this._1k=this._1k||new this.klass.Display()},start:function(){this._D();this._E();return this._F()},_D:function(){this._0=this._G(this._5)},_G:function(a){return new JS.Test.Unit.UI.TestRunnerMediator(a)},_E:function(){this._0.addListener(JS.Test.Unit.TestResult.CHANGED,this.method('_1l'));this._0.addListener(JS.Test.Unit.TestResult.FAULT,this.method('_H'));this._0.addListener(JS.Test.Unit.UI.TestRunnerMediator.STARTED,this.method('_I'));this._0.addListener(JS.Test.Unit.UI.TestRunnerMediator.FINISHED,this.method('_J'));this._0.addListener(JS.Test.Unit.TestCase.STARTED,this.method('_K'));this._0.addListener(JS.Test.Unit.TestCase.FINISHED,this.method('_L'));if(!window.TestSwarm)return;TestSwarm.serialize=this.method('serialize');this._0.addListener(JS.Test.Unit.TestCase.FINISHED,TestSwarm.heartbeat);this._0.addListener(JS.Test.Unit.UI.TestRunnerMediator.FINISHED,function(){TestSwarm.submit(this._12())},this)},_12:function(){return{fail:this._2.failureCount(),error:this._2.errorCount(),total:this._2.runCount()}},_F:function(){return this._0.runSuite()},_1l:function(){this._6().setTestCount(this._2.runCount());this._6().setAssertionCount(this._2.assertionCount());this._6().setFailureCount(this._2.failureCount());this._6().setErrorCount(this._2.errorCount())},_H:function(a){this._n.push(a);this._13='failed';this._6().addFault(this._1m,a)},_I:function(a){this._2=a},_J:function(a){this._6().printSummary(a);this._14({jstest:this._12()})},_K:function(a){this._1m=a;this._13='passed';this._6().addTestCase(a)},_L:function(a){this._6().finishTestCase(a);this._14({jstest:{test:a.toString(),status:this._13}})},_14:function(a){if(window.console&&window.JSON&&!window.Components)console.log(JSON.stringify(a))},serialize:function(){var a=document.getElementsByTagName('li'),b=a.length;while(b--)JS.DOM.removeClass(a[b],'closed');var a=document.getElementsByTagName('script'),b=a.length;while(b--)a[b].parentNode.removeChild(a[b]);var c=document.getElementsByTagName('html')[0];return'<!doctype html><html>'+c.innerHTML+'</html>'}})}})});JS.Test.Unit.UI.Browser.TestRunner.extend({Display:new JS.Class({extend:{Context:new JS.Class({initialize:function(a,b,c){this._7=b;this._8=a;this._c=c;this._N=[];if(c===undefined){this._O=b;return}this._P(c)},_P:function(f){var g=this,h=this._7._O||this._7,i={_3:'Tests',_b:'Failed'};this._q=new JS.DOM.Builder(h).li({className:this._8+' passed'},function(d){d.ul({className:'stats'},function(b){for(var c in i)b.li(function(a){a.span({className:'label'},i[c]+': ');g[c]=a.span({className:'number'},'0')})});if(f){g._r=d.p({className:g._8+'-name'},f);if(g._8==='spec'){g._s=JS.DOM.span({className:'runner'},'Run');g._s.style.background='url("'+JSCLASS_PATH+'assets/bullet_go.png") center center no-repeat';g._r.insertBefore(g._s,g._r.firstChild)}}g._O=d.ul({className:'children'})});if(!/\btest=/.test(window.location.search))JS.DOM.addClass(this._q,'closed');JS.DOM.Event.on(this._r,'click',function(){JS.DOM.toggleClass(this._q,'closed')},this);if(this._s)JS.DOM.Event.on(this._s,'click',this.runTest,this)},child:function(a){return this._N[a]=this._N[a]||new this.klass('spec',this,a)},addTest:function(a){var b=this._N[a]=new this.klass('test',this,a);b.ping('_3')},addFault:function(g){var h=JS.DOM.li({className:'fault'},function(f){f.p(function(a){var b=g.split(/[\r\n]+/);b.splice(1,1);for(var c=0,d=b.length;c<d;c++){if(c>0)a.br();a.concat(b[c])}})});this._O.appendChild(h);this.ping('_b');this.fail()},getName:function(){var a=[],b=this._7&&this._7.getName&&this._7.getName();if(b)a.push(b);a.push(this._c);return a.join(' ')},runTest:function(){window.location.search='test='+encodeURIComponent(this.getName())},ping:function(a){if(!this[a])return;this[a].innerHTML=parseInt(this[a].innerHTML)+1;if(this._7.ping)this._7.ping(a)},fail:function(){if(!this._q)return;JS.DOM.removeClass(this._q,'passed');JS.DOM.addClass(this._r,'failed');if(this._7.fail)this._7.fail()}})},initialize:function(){this._P();document.body.insertBefore(this._1n,document.body.firstChild)},_P:function(){var f=this;f._1n=JS.DOM.div({className:'test-result-container'},function(d){d.table({className:'report'},function(c){c.thead(function(b){b.tr(function(a){a.th({scope:'col'},'Tests');a.th({scope:'col'},'Assertions');a.th({scope:'col'},'Failures');a.th({scope:'col'},'Errors')})});c.tbody(function(b){b.tr(function(a){f._3=a.td();f._1o=a.td();f._b=a.td();f._m=a.td()})})});f._15=d.div({className:'light light-pending'});d.p({className:'user-agent'},window.navigator.userAgent);f._1p=new f.klass.Context('spec',d.ul({className:'specs'}));f._1q=d.p({className:'summary'})})},setTestCount:function(a){this._3.innerHTML=String(a)},setAssertionCount:function(a){this._1o.innerHTML=String(a)},setFailureCount:function(a){this._b.innerHTML=String(a)},setErrorCount:function(a){this._m.innerHTML=String(a)},addTestCase:function(a){var b=this._16(a),c=b.name,d=b.context;d.addTest(c)},finishTestCase:function(a){},addFault:function(a,b){var c=this._16(a),d=c.name,f=c.context;f.child(d).addFault(b.longDisplay());this._1r=true},printSummary:function(a){JS.DOM.removeClass(this._15,'light-pending');JS.DOM.addClass(this._15,this._1r?'light-failed':'light-passed');this._1q.innerHTML='Finished in '+a+' seconds'},_16:function(c){var d=c.name(),f=c.klass,g=f.getContextName?f.getContextName():f.displayName,h=new JS.Enumerable.Collection();d=d.replace(g,'').replace(g,'').replace(/\(.*?\)$/g,'').replace(/^test\W+/g,'');while(f!==JS.Test.Unit.TestCase){h.push(f);f=f.superclass}g=h.reverseForEach().inject(this._1p,function(a,b){return a.child(b._t||b.displayName)});return{name:d,context:g}}})});JS.Test.Unit.extend({AutoRunner:new JS.Class({extend:{run:function(c){var d=this.getRunner(),f=d.getFilter(),g=[],h=[];JS.Test.Unit.TestCase.resolve();JS.Test.Unit.TestCase.forEach(function(a){var b=a.suite(f);if(b.size()>0)h.push(b);if(a.superclass===JS.Test.Unit.TestCase)g.push(a.displayName)});var i=new JS.Test.Unit.TestSuite(g.join(', '));for(var j=0,k=h.length;j<k;j++)i.push(h[j]);JS.Test.Unit.TestCase.clear();return d.run(i,this.OUTPUT_LEVELS[c||'normal'])},filter:function(a,b){var c=this.getRunner().getFilter(),d=[],f=c.length,g,h;if(f===0)return a;while(f--){g=a.length;while(g--){h=a[g].replace(new RegExp(b+'$'),'');if(c[f].substr(0,h.length)===h)d.push(a[g])}}return d},getRunner:function(){return(typeof window!=='undefined')?this.RUNNERS.browser:this.RUNNERS.console},RUNNERS:{console:JS.Test.Unit.UI.Console.TestRunner,browser:JS.Test.Unit.UI.Browser.TestRunner},OUTPUT_LEVELS:{silent:JS.Test.Unit.UI.SILENT,progress:JS.Test.Unit.UI.PROGRESS_ONLY,normal:JS.Test.Unit.UI.NORMAL,verbose:JS.Test.Unit.UI.VERBOSE}}})});JS.Test.extend({autorun:JS.Test.Unit.AutoRunner.method('run')});JS.Test.extend({Context:new JS.Module({extend:{included:function(a){a.extend(JS.Test.Context.Context,{_g:false});a.include(JS.Test.Context.LifeCycle,{_g:false});a.extend(JS.Test.Context.Test,{_g:false});a.include(JS.Console)},Context:new JS.Module({getContextName:function(){this._t=this._t||'';return(typeof this.superclass.getContextName==='function')?(this.superclass.getContextName()+' '+this._t).replace(/^\s+/,''):this.displayName},setContextName:function(a){this._t=a},context:function(a,b){var c=new JS.Class(this,{},{_g:false});c.__eigen__().resolve();c.setContextName(a.toString());c.setName(c.getContextName());b.call(c);return c},cover:function(a){var b=new JS.Test.Coverage(a);this.before_all_callbacks.push(b.method('attach'));this.after_all_callbacks.push(b.method('detach'));JS.Test.Unit.TestCase.reports.push(b)}})}}),describe:function(a,b){var c=new JS.Class(a.toString(),JS.Test.Unit.TestCase,{},{_g:false});c.include(JS.Test.Context,{_g:false});c.__eigen__().resolve();b.call(c);return c}});JS.Test.Context.Context.alias({describe:'context'});JS.Test.extend({context:JS.Test.describe});JS.Test.Context.LifeCycle=new JS.Module({extend:{included:function(b){b.extend(this.ClassMethods);b.before_all_callbacks=[];b.before_each_callbacks=[];b.after_all_callbacks=[];b.after_each_callbacks=[];b.before_should_callbacks={};b.extend({inherited:function(a){this.callSuper();a.before_all_callbacks=[];a.before_each_callbacks=[];a.after_all_callbacks=[];a.after_each_callbacks=[];a.before_should_callbacks={}}})},ClassMethods:new JS.Module({before:function(a,b){if((typeof a==='function')||!b){b=a;a='each'}this['before_'+(a+'_')+'callbacks'].push(b)},after:function(a,b){if((typeof a==='function')||!b){b=a;a='each'}this['after_'+(a+'_')+'callbacks'].push(b)},gatherCallbacks:function(a,b){var c=(typeof this.superclass.gatherCallbacks==='function')?this.superclass.gatherCallbacks(a,b):[];var d=this[a+'_'+(b+'_')+'callbacks'];return(a==='before')?c.concat(d):d.concat(c)}})},setup:function(a){var b=this;this.callSuper(function(){if(b.klass.before_should_callbacks[b._1])b.klass.before_should_callbacks[b._1].call(b);b.runCallbacks('before','each',a)})},teardown:function(a){var b=this;this.callSuper(function(){b.runCallbacks('after','each',a)})},runCallbacks:function(c,d,f){var g=this.klass.gatherCallbacks(c,d);JS.Test.Unit.TestSuite.forEach(g,function(a,b){this.exec(a,b)},f,this)},runAllCallbacks:function(d,f,g){var h=this.instanceVariables();this.runCallbacks(d,'all',function(){var c=this.instanceVariables().inject({},function(a,b){if(h.member(b))return a;a[b]=this[b];return a},this);if(f)f.call(g||null,c)})},setValuesFromCallbacks:function(a){for(var b in a)this[b]=a[b]},instanceVariables:function(){var a=[];for(var b in this){if(this.hasOwnProperty(b))a.push(b)}return new JS.Enumerable.Collection(a)}});(function(){var a=JS.Test.Context.LifeCycle.ClassMethods.method('instanceMethod');JS.Test.Context.LifeCycle.ClassMethods.include({setup:a('before'),teardown:a('after')})})();JS.Test.Context.extend({SharedBehavior:new JS.Class(JS.Module,{extend:{createFromBehavior:function(a){var b=new this();b._1s=a;return b},moduleName:function(c){return c.toLowerCase().replace(/[\s:',\.~;!#=\(\)&]+/g,'_').replace(/\/(.?)/g,function(a,b){return'.'+b.toUpperCase()}).replace(/(?:^|_)(.)/g,function(a,b){return b.toUpperCase()})}},included:function(a){this._1s.call(a)}})});JS.Test.Unit.TestCase.extend({shared:function(a,b){a=JS.Test.Context.SharedBehavior.moduleName(a);JS.ENV[a]=JS.Test.Context.SharedBehavior.createFromBehavior(b)},use:function(a){if(JS.isType(a,JS.Test.Context.SharedBehavior)||JS.isType(a,JS.Module))this.include(a);else if(JS.isType(a,'string')){var b=JS.Test.Context.SharedBehavior.moduleName(a),c=JS.ENV[b];if(!c)throw new Error('Could not find example group named "'+a+'"');this.include(c)}}});(function(){var g=function(a,b){var c={};for(var d=0,f=b.length;d<f;d++)c[b[d]]=JS.Test.Unit.TestCase[a];JS.Test.Unit.TestCase.extend(c)};g('shared',['sharedBehavior','shareAs','shareBehaviorAs','sharedExamplesFor']);g('use',['uses','itShouldBehaveLike','behavesLike','usesExamplesFrom'])})();JS.Test.Context.Test=new JS.Module({test:function(a,b,c){var d='test:',f=this.getContextName();if(f)d+=' '+f;d+=' '+a;if(this.instanceMethod(d))throw new Error(d+' is already defined in '+this.displayName);b=b||{};if(typeof b==='function'){c=b}else{if(b.before!==undefined)this.before_should_callbacks[d]=b.before}this.define(d,c,{_g:false})},beforeTest:function(a,b){this.test(a,{before:b},function(){})}});JS.Test.Context.Test.alias({it:'test',should:'test',tests:'test',beforeIt:'beforeTest',beforeShould:'beforeTest',beforeTests:'beforeTest'});(function(){var b=JS.Test.Unit.TestCase.suite;JS.Test.Unit.TestCase.extend({suite:function(a){return b.call(this,a,false,false)}})})();JS.Test.Unit.TestSuite.include({run:function(d,f,g,h){g.call(h||null,this.klass.STARTED,this._c);var i=function(c){this.forEach(function(a,b){if(c)a.setValuesFromCallbacks(c);a.run(d,b,g,h)},function(){var a=function(){g.call(h||null,this.klass.FINISHED,this._c);f()};if(c)j.runAllCallbacks('after',a,this);else a.call(this)},this)};var j=this._3[0],k=null;if(j&&j.runAllCallbacks)j.runAllCallbacks('before',i,this);else i.call(this,null)}});JS.Test.extend({Mocking:new JS.Module({extend:{ExpectationError:new JS.Class(JS.Test.Unit.AssertionFailedError),UnexpectedCallError:new JS.Class(Error,{initialize:function(a){this.message=a.toString()}}),__activeStubs__:[],stub:function(a,b,c){var d=false;if(a==='new'){a=b;b=c;c=undefined;d=true}if(JS.isType(a,'string')){c=b;b=a;a=JS.ENV}var f=this.__activeStubs__,g=f.length;while(g--){if(f[g]._9===a&&f[g]._1===b)return f[g].defaultMatcher(c)}var h=new JS.Test.Mocking.Stub(a,b,d);f.push(h);return h.defaultMatcher(c)},removeStubs:function(){var a=this.__activeStubs__,b=a.length;while(b--)a[b].revoke();this.__activeStubs__=[]},verify:function(){try{var a=this.__activeStubs__;for(var b=0,c=a.length;b<c;b++)a[b]._1t()}finally{this.removeStubs()}},Stub:new JS.Class({initialize:function(a,b,c){this._9=a;this._1=b;this._u=c;this._h=a[b];this._1u=a.hasOwnProperty?a.hasOwnProperty(b):(typeof this._h!=='undefined');var d=JS.Test.Mocking;this._v=[];this._i=new d.Parameters([new d.AnyArgs()]);this._a=false;this.apply()},defaultMatcher:function(a){if(a!==undefined&&typeof a!=='function'){this._9[this._1]=a;return this}this._17();this._4=this._i;if(typeof a==='function')this._4._18=a;return this},apply:function(){var a=this._9,b=this._1;if(a[b]!==this._h)return;var c=this;this._19=function(){return c._1v(this,arguments)};a[b]=this._19},revoke:function(){if(this._1u)this._9[this._1]=this._h;else try{delete this._9[this._1]}catch(e){this._9[this._1]=undefined}},expected:function(){this._a=true;this._i._a=true},_17:function(){if(this._4)this._4._1a=true},_1v:function(a,b){this._17();var c=this._v.concat(this._i),d,f,g;if(this._u&&!(a instanceof this._19)){g=new JS.Test.Unit.AssertionMessage('','<?> expected to be a constructor but called without `new`',[this._h]);throw new JS.Test.Mocking.UnexpectedCallError(g);}this._i.ping();for(var h=0,i=c.length;h<i;h++){d=c[h];f=d.match(b);if(!f)continue;if(d!==this._i)d.ping();if(f.fake)return f.fake.apply(this._9,b);if(f.exception)throw f.exception;if(f.hasOwnProperty('callback')){if(!f.callback)continue;f.callback.apply(f.context,d.nextYieldArgs())}if(f)return d.nextReturnValue()}if(this._u){g=new JS.Test.Unit.AssertionMessage('','<?> constructed with unexpected arguments:\n(?)',[this._h,JS.array(b)])}else{g=new JS.Test.Unit.AssertionMessage('','<?> received call to '+this._1+'() with unexpected arguments:\n(?)',[this._9,JS.array(b)])}throw new JS.Test.Mocking.UnexpectedCallError(g);},_1t:function(){if(!this._a)return;for(var a=0,b=this._v.length;a<b;a++)this._1b(this._v[a]);this._1b(this._i)},_1b:function(a){var b=this._u?this._h:this._9;a.verify(b,this._1,this._u)}})}})});JS.Test.Mocking.extend({Parameters:new JS.Class({initialize:function(a,b){this._1c=JS.array(a);this._a=b;this._1a=false;this._j=0},toArray:function(){var a=this._1c.slice();if(this._k)a.push(new JS.Test.Mocking.InstanceOf(Function));return a},returns:function(a){this._Q=0;this._R=a},nextReturnValue:function(){if(!this._R)return undefined;var a=this._R[this._Q];this._Q=(this._Q+1)%this._R.length;return a},yields:function(a){this._S=0;this._k=a},nextYieldArgs:function(){if(!this._k)return undefined;var a=this._k[this._S];this._S=(this._S+1)%this._k.length;return a},setMinimum:function(a){this._a=true;this._T=a},setMaximum:function(a){this._a=true;this._w=a},setExpected:function(a){this._a=true;this._x=a},match:function(a){if(!this._1a)return false;var b=JS.array(a),c,d;if(this._k){if(typeof b[b.length-2]==='function'){d=b.pop();c=b.pop()}else if(typeof b[b.length-1]==='function'){d=null;c=b.pop()}}if(!JS.Enumerable.areEqual(this._1c,b))return false;var f={};if(this._f){f.exception=this._f}if(this._k){f.callback=c;f.context=d}if(this._18){f.fake=this._18}return f},ping:function(){this._j+=1},verify:function(a,b,c){if(!this._a)return;var d=true,f;if(this._j===0&&this._w===undefined&&this._x===undefined){d=false}else if(this._x!==undefined&&this._j!==this._x){f=this._U('exactly');d=false}else if(this._w!==undefined&&this._j>this._w){f=this._U('at most');d=false}else if(this._T!==undefined&&this._j<this._T){f=this._U('at least');d=false}if(d)return;var g;if(c){g=new JS.Test.Unit.AssertionMessage('Mock expectation not met','<?> expected to be constructed with\n(?)'+(f?'\n'+f:''),[a,this.toArray()])}else{g=new JS.Test.Unit.AssertionMessage('Mock expectation not met','<?> expected to receive call\n'+b+'(?)'+(f?'\n'+f:''),[a,this.toArray()])}throw new JS.Test.Mocking.ExpectationError(g);},_U:function(a){var b=this._j,c='but '+b+' call'+(b===1?' was':'s were')+' made';var d={'exactly':this._x,'at most':this._w,'at least':this._T};return a+' '+d[a]+' times\n'+c}})});JS.Test.Mocking.extend({Anything:new JS.Class({equals:function(){return true},toString:function(){return'anything'}}),AnyArgs:new JS.Class({equals:function(){return JS.Enumerable.ALL_EQUAL},toString:function(){return'*arguments'}}),ArrayIncluding:new JS.Class({initialize:function(a){this._e=Array.prototype.slice.call(a)},equals:function(a){if(!JS.isType(a,Array))return false;var b=this._e.length,c;loop:while(b--){c=a.length;while(c--){if(JS.Enumerable.areEqual(this._e[b],a[c]))continue loop}return false}return true},toString:function(){var a=JS.Console.convert(this._e);return'arrayIncluding('+a+')'}}),ObjectIncluding:new JS.Class({initialize:function(a){this._e=a},equals:function(a){if(!JS.isType(a,Object))return false;for(var b in this._e){if(!JS.Enumerable.areEqual(this._e[b],a[b]))return false}return true},toString:function(){var a=JS.Console.convert(this._e);return'objectIncluding('+a+')'}}),InstanceOf:new JS.Class({initialize:function(a){this._8=a},equals:function(a){return JS.isType(a,this._8)},toString:function(){var a=JS.Console.convert(this._8),b=/^[aeiou]/i.test(a)?'an':'a';return b+'('+a+')'}}),Matcher:new JS.Class({initialize:function(a){this._8=a},equals:function(a){return JS.match(this._8,a)},toString:function(){var a=JS.Console.convert(this._8);return'matching('+a+')'}})});JS.Test.Mocking.Stub.include({given:function(){var a=new JS.Test.Mocking.Parameters(arguments,this._a);this._v.push(a);this._4=a;return this},raises:function(a){this._4._f=a;return this},returns:function(){this._4.returns(arguments);return this},yields:function(){this._4.yields(arguments);return this},atLeast:function(a){this._4.setMinimum(a);return this},atMost:function(a){this._4.setMaximum(a);return this},exactly:function(a){this._4.setExpected(a);return this}});JS.Test.Mocking.Stub.alias({raising:'raises',returning:'returns',yielding:'yields'});JS.Test.Mocking.extend({DSL:new JS.Module({stub:function(){return JS.Test.Mocking.stub.apply(JS.Test.Mocking,arguments)},expect:function(){var a=JS.Test.Mocking.stub.apply(JS.Test.Mocking,arguments);a.expected();this.addAssertion();return a},anything:function(){return new JS.Test.Mocking.Anything()},anyArgs:function(){return new JS.Test.Mocking.AnyArgs()},instanceOf:function(a){return new JS.Test.Mocking.InstanceOf(a)},match:function(a){return new JS.Test.Mocking.Matcher(a)},arrayIncluding:function(){return new JS.Test.Mocking.ArrayIncluding(arguments)},objectIncluding:function(a){return new JS.Test.Mocking.ObjectIncluding(a)}})});JS.Test.Unit.TestCase.include(JS.Test.Mocking.DSL);JS.Test.Unit.mocking=JS.Test.Mocking;JS.Test.extend({FakeClock:new JS.Module({extend:{API:new JS.Singleton({stub:function(){var a=JS.Test.Mocking,b=['Date','setTimeout','clearTimeout','setInterval','clearInterval'],c=b.length;JS.Test.FakeClock.reset();while(c--)a.stub(b[c],JS.Test.FakeClock.method(b[c]))},reset:function(){return JS.Test.FakeClock.reset()},tick:function(a){return JS.Test.FakeClock.tick(a)}}),JSDate:Date,Schedule:new JS.Class(JS.SortedSet,{nextScheduledAt:function(b){return this.find(function(a){return a.time<=b})}}),Timeout:new JS.Class({include:JS.Comparable,initialize:function(a,b,c){this.callback=a;this.interval=b;this.repeat=c},compareTo:function(a){return this.time-a.time},toString:function(){return(this.repeat?'Interval':'Timeout')+'('+this.interval+'):'+this.time}}),reset:function(){this._y=new Date().getTime();this._z=this._y;this._o=new this.Schedule()},tick:function(a){this._y+=a;var b;while(b=this._o.nextScheduledAt(this._y))this._1w(b);this._z=this._y},_1w:function(a){this._z=a.time;a.callback();if(a.repeat){a.time+=a.interval;this._o.rebuild()}else{this.clearTimeout(a)}},_1d:function(a,b,c){var d=new this.Timeout(a,b,c);d.time=this._z+b;this._o.add(d);return d},Date:function(){var a=new this.JSDate();a.setTime(this._z);return a},setTimeout:function(a,b){return this._1d(a,b,false)},setInterval:function(a,b){return this._1d(a,b,true)},clearTimeout:function(a){this._o.remove(a)},clearInterval:function(a){this._o.remove(a)}}})});JS.Test.FakeClock.include({clock:JS.Test.FakeClock.API});JS.Test.extend({AsyncSteps:new JS.Class(JS.Module,{define:function(b,c){this.callSuper(b,function(){var a=[b,c].concat(JS.array(arguments));this.__enqueue__(a)})},included:function(d){d.include(JS.Test.AsyncSteps.Sync);if(!d.includes(JS.Test.Context))return;d.after(function(a){this.sync(a)});d.extend({after:function(b,c){if((typeof b==='function')||!c){c=b;b='each'}this.callSuper(function(a){this.sync(function(){this.exec(c,a)})})}})},extend:{Sync:new JS.Module({__enqueue__:function(a){this.__stepQueue__=this.__stepQueue__||[];this.__stepQueue__.push(a);if(this.__runningSteps__)return;this.__runningSteps__=true;var b=JS.Test.Unit.TestSuite.setTimeout;b(this.method('__runNextStep__'),1)},__runNextStep__:function(){var a=this.__stepQueue__.shift(),b;if(!a){this.__runningSteps__=false;if(!this.__stepCallbacks__)return;b=this.__stepCallbacks__.length;while(b--)this.__stepCallbacks__.shift().call(this);return}var c=a.shift(),d=a.shift(),f=a.slice(),g=function(){d.apply(this,f)};f[d.length-1]=this.method('__runNextStep__');if(!this.exec)return g.call(this);this.exec(g,function(){},this.method('__endSteps__'))},__endSteps__:function(){this.__stepQueue__=[];this.__runNextStep__()},sync:function(a){if(!this.__runningSteps__)return a.call(this);this.__stepCallbacks__=this.__stepCallbacks__||[];this.__stepCallbacks__.push(a)}})}}),asyncSteps:function(a){return new this.AsyncSteps(a)}});JS.Test.extend({Coverage:new JS.Class({initialize:function(d){this._1e=d;this._A=new JS.Hash([]);var f=function(a){var b=a.instanceMethods(false),c=b.length;while(c--)this._A.store(a.instanceMethod(b[c]),0)};f.call(this,d);f.call(this,d.__eigen__())},attach:function(){var a=this._1e;JS.StackTrace.addObserver(this);JS.Method.trace([a,a.__eigen__()])},detach:function(){var a=this._1e;JS.Method.untrace([a,a.__eigen__()]);JS.StackTrace.removeObserver(this)},update:function(a,b){if(a!=='call')return;var c=this._A.assoc(b.method);if(c)c.setValue(c.value+1)},report:function(){var c=this._A.entries().sort(function(a,b){return b.value-a.value});var d=this._A.all(function(a){return a.value>0});JS.Console.printTable(c,function(a,b){if(a[1]===0)return['bgred','white'];return(b%2===0)?['bold']:[]});return d}})});JS.Test.extend({Helpers:new JS.Module({$R:function(a,b){return new JS.Range(a,b)},$w:function(a){return a.split(/\s+/)},forEach:function(a,b,c){for(var d=0,f=a.length;d<f;d++){b.call(c||null,a[d],d)}},its:function(){return new JS.MethodChain()},map:function(a,b,c){return new JS.Enumerable.Collection(a).map(b,c)},repeat:function(a,b,c){while(a--)b.call(c)}})});
View
1 node_modules/jsclass/min/tsort.js
@@ -0,0 +1 @@
+JS.TSort=new JS.Module('TSort',{extend:{Cyclic:new JS.Class(Error)},tsort:function(){var a=[];this.tsortEach(a.push,a);return a},tsortEach:function(c,e){this.eachStronglyConnectedComponent(function(a){if(a.length===1)c.call(e||null,a[0]);else throw new JS.TSort.Cyclic('topological sort failed: '+a.toString());})},stronglyConnectedComponents:function(){var a=[];this.eachStronglyConnectedComponent(a.push,a);return a},eachStronglyConnectedComponent:function(e,g){var b=new JS.Hash(),d=[];this.tsortEachNode(function(c){if(b.hasKey(c))return;this.eachStronglyConnectedComponentFrom(c,b,d,function(a){e.call(g||null,a)})},this)},eachStronglyConnectedComponentFrom:function(g,b,d,k,l){var i=b.size,m=d.length,f=i,h,j;b.store(g,i);d.push(g);this.tsortEachChild(g,function(a){if(b.hasKey(a)){var c=b.get(a);if(a!==undefined&&c<f)f=c}else{var e=this.eachStronglyConnectedComponentFrom(a,b,d,k,l);if(e<f)f=e}},this);if(i===f){h=d.splice(m,d.length-m);j=h.length;while(j--)b.store(h[j],undefined);k.call(l||null,h)}return f},tsortEachNode:function(){throw new JS.NotImplementedError('tsortEachNode');},tsortEachChild:function(){throw new JS.NotImplementedError('tsortEachChild');}});
View
1 node_modules/jsclass/node_modules/.bin/nopt
View
0 node_modules/jsclass/node_modules/nopt/.gitignore
No changes.
View
23 node_modules/jsclass/node_modules/nopt/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
208 node_modules/jsclass/node_modules/nopt/README.md
@@ -0,0 +1,208 @@
+If you want to write an option parser, and have it be good, there are
+two ways to do it. The Right Way, and the Wrong Way.
+
+The Wrong Way is to sit down and write an option parser. We've all done
+that.
+
+The Right Way is to write some complex configurable program with so many
+options that you go half-insane just trying to manage them all, and put
+it off with duct-tape solutions until you see exactly to the core of the
+problem, and finally snap and write an awesome option parser.
+
+If you want to write an option parser, don't write an option parser.
+Write a package manager, or a source control system, or a service
+restarter, or an operating system. You probably won't end up with a
+good one of those, but if you don't give up, and you are relentless and
+diligent enough in your procrastination, you may just end up with a very
+nice option parser.
+
+## USAGE
+
+ // my-program.js
+ var nopt = require("nopt")
+ , Stream = require("stream").Stream
+ , path = require("path")
+ , knownOpts = { "foo" : [String, null]
+ , "bar" : [Stream, Number]
+ , "baz" : path
+ , "bloo" : [ "big", "medium", "small" ]
+ , "flag" : Boolean
+ , "pick" : Boolean
+ , "many" : [String, Array]
+ }
+ , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
+ , "b7" : ["--bar", "7"]
+ , "m" : ["--bloo", "medium"]
+ , "p" : ["--pick"]
+ , "f" : ["--flag"]
+ }
+ // everything is optional.
+ // knownOpts and shorthands default to {}
+ // arg list defaults to process.argv
+ // slice defaults to 2
+ , parsed = nopt(knownOpts, shortHands, process.argv, 2)
+ console.log(parsed)
+
+This would give you support for any of the following:
+
+```bash
+$ node my-program.js --foo "blerp" --no-flag
+{ "foo" : "blerp", "flag" : false }
+
+$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag
+{ bar: 7, foo: "Mr. Hand", flag: true }
+
+$ node my-program.js --foo "blerp" -f -----p
+{ foo: "blerp", flag: true, pick: true }
+
+$ node my-program.js -fp --foofoo
+{ foo: "Mr. Foo", flag: true, pick: true }
+
+$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.
+{ foo: "Mr. Foo", argv: { remain: ["-fp"] } }
+
+$ node my-program.js --blatzk 1000 -fp # unknown opts are ok.
+{ blatzk: 1000, flag: true, pick: true }
+
+$ node my-program.js --blatzk true -fp # but they need a value
+{ blatzk: true, flag: true, pick: true }
+
+$ node my-program.js --no-blatzk -fp # unless they start with "no-"
+{ blatzk: false, flag: true, pick: true }
+
+$ node my-program.js --baz b/a/z # known paths are resolved.
+{ baz: "/Users/isaacs/b/a/z" }
+
+# if Array is one of the types, then it can take many
+# values, and will always be an array. The other types provided
+# specify what types are allowed in the list.
+
+$ node my-program.js --many 1 --many null --many foo
+{ many: ["1", "null", "foo"] }
+
+$ node my-program.js --many foo
+{ many: ["foo"] }
+```
+
+Read the tests at the bottom of `lib/nopt.js` for more examples of
+what this puppy can do.
+
+## Types
+
+The following types are supported, and defined on `nopt.typeDefs`
+
+* String: A normal string. No parsing is done.
+* path: A file system path. Gets resolved against cwd if not absolute.
+* url: A url. If it doesn't parse, it isn't accepted.
+* Number: Must be numeric.
+* Date: Must parse as a date. If it does, and `Date` is one of the options,
+ then it will return a Date object, not a string.
+* Boolean: Must be either `true` or `false`. If an option is a boolean,
+ then it does not need a value, and its presence will imply `true` as
+ the value. To negate boolean flags, do `--no-whatever` or `--whatever
+ false`
+* NaN: Means that the option is strictly not allowed. Any value will
+ fail.
+* Stream: An object matching the "Stream" class in node. Valuable
+ for use when validating programmatically. (npm uses this to let you
+ supply any WriteStream on the `outfd` and `logfd` config options.)
+* Array: If `Array` is specified as one of the types, then the value
+ will be parsed as a list of options. This means that multiple values
+ can be specified, and that the value will always be an array.
+
+If a type is an array of values not on this list, then those are
+considered valid values. For instance, in the example above, the
+`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`,
+and any other value will be rejected.
+
+When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be
+interpreted as their JavaScript equivalents, and numeric values will be
+interpreted as a number.
+
+You can also mix types and values, or multiple types, in a list. For
+instance `{ blah: [Number, null] }` would allow a value to be set to
+either a Number or null.
+
+To define a new type, add it to `nopt.typeDefs`. Each item in that
+hash is an object with a `type` member and a `validate` method. The
+`type` member is an object that matches what goes in the type list. The
+`validate` method is a function that gets called with `validate(data,
+key, val)`. Validate methods should assign `data[key]` to the valid
+value of `val` if it can be handled properly, or return boolean
+`false` if it cannot.
+
+You can also call `nopt.clean(data, types, typeDefs)` to clean up a
+config object and remove its invalid properties.
+
+## Error Handling
+
+By default, nopt outputs a warning to standard error when invalid
+options are found. You can change this behavior by assigning a method
+to `nopt.invalidHandler`. This method will be called with
+the offending `nopt.invalidHandler(key, val, types)`.
+
+If no `nopt.invalidHandler` is assigned, then it will console.error
+its whining. If it is assigned to boolean `false` then the warning is
+suppressed.
+
+## Abbreviations
+
+Yes, they are supported. If you define options like this:
+
+```javascript
+{ "foolhardyelephants" : Boolean
+, "pileofmonkeys" : Boolean }
+```
+
+Then this will work:
+
+```bash
+node program.js --foolhar --pil
+node program.js --no-f --pileofmon
+# etc.
+```
+
+## Shorthands
+
+Shorthands are a hash of shorter option names to a snippet of args that
+they expand to.
+
+If multiple one-character shorthands are all combined, and the
+combination does not unambiguously match any other option or shorthand,
+then they will be broken up into their constituent parts. For example:
+
+```json
+{ "s" : ["--loglevel", "silent"]
+, "g" : "--global"
+, "f" : "--force"
+, "p" : "--parseable"
+, "l" : "--long"
+}
+```
+
+```bash
+npm ls -sgflp
+# just like doing this:
+npm ls --loglevel silent --global --force --long --parseable
+```
+
+## The Rest of the args
+
+The config object returned by nopt is given a special member called
+`argv`, which is an object with the following fields:
+
+* `remain`: The remaining args after all the parsing has occurred.
+* `original`: The args as they originally appeared.
+* `cooked`: The args after flags and shorthands are expanded.
+
+## Slicing
+
+Node programs are called with more or less the exact argv as it appears
+in C land, after the v8 and node-specific options have been plucked off.
+As such, `argv[0]` is always `node` and `argv[1]` is always the
+JavaScript program being run.
+
+That's usually not very useful to you. So they're sliced off by
+default. If you want them, then you can pass in `0` as the last
+argument, or any other number that you'd like to slice off the start of
+the list.
View
44 node_modules/jsclass/node_modules/nopt/bin/nopt.js
@@ -0,0 +1,44 @@
+#!/usr/bin/env node
+var nopt = require("../lib/nopt")
+ , types = { num: Number
+ , bool: Boolean
+ , help: Boolean
+ , list: Array
+ , "num-list": [Number, Array]
+ , "str-list": [String, Array]
+ , "bool-list": [Boolean, Array]
+ , str: String }
+ , shorthands = { s: [ "--str", "astring" ]
+ , b: [ "--bool" ]
+ , nb: [ "--no-bool" ]
+ , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ]
+ , "?": ["--help"]
+ , h: ["--help"]
+ , H: ["--help"]
+ , n: [ "--num", "125" ] }
+ , parsed = nopt( types
+ , shorthands
+ , process.argv
+ , 2 )
+
+console.log("parsed", parsed)
+
+if (parsed.help) {
+ console.log("")
+ console.log("nopt cli tester")
+ console.log("")
+ console.log("types")
+ console.log(Object.keys(types).map(function M (t) {
+ var type = types[t]
+ if (Array.isArray(type)) {
+ return [t, type.map(function (type) { return type.name })]
+ }
+ return [t, type && type.name]
+ }).reduce(function (s, i) {
+ s[i[0]] = i[1]
+ return s
+ }, {}))
+ console.log("")
+ console.log("shorthands")
+ console.log(shorthands)
+}
View
30 node_modules/jsclass/node_modules/nopt/examples/my-program.js
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+
+//process.env.DEBUG_NOPT = 1
+
+// my-program.js
+var nopt = require("../lib/nopt")
+ , Stream = require("stream").Stream
+ , path = require("path")
+ , knownOpts = { "foo" : [String, null]
+ , "bar" : [Stream, Number]
+ , "baz" : path
+ , "bloo" : [ "big", "medium", "small" ]
+ , "flag" : Boolean
+ , "pick" : Boolean
+ }
+ , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
+ , "b7" : ["--bar", "7"]
+ , "m" : ["--bloo", "medium"]
+ , "p" : ["--pick"]
+ , "f" : ["--flag", "true"]
+ , "g" : ["--flag"]
+ , "s" : "--flag"
+ }
+ // everything is optional.
+ // knownOpts and shorthands default to {}
+ // arg list defaults to process.argv
+ // slice defaults to 2
+ , parsed = nopt(knownOpts, shortHands, process.argv, 2)
+
+console.log("parsed =\n"+ require("util").inspect(parsed))
View
23 node_modules/jsclass/node_modules/nopt/node_modules/abbrev/README.md
@@ -0,0 +1,23 @@
+# abbrev-js
+
+Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
+
+Usage:
+
+ var abbrev = require("abbrev");
+ abbrev("foo", "fool", "folding", "flop");
+
+ // returns:
+ { fl: 'flop'
+ , flo: 'flop'
+ , flop: 'flop'
+ , fol: 'folding'
+ , fold: 'folding'
+ , foldi: 'folding'
+ , foldin: 'folding'
+ , folding: 'folding'
+ , foo: 'foo'
+ , fool: 'fool'
+ }
+
+This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.
View
33 node_modules/jsclass/node_modules/nopt/node_modules/abbrev/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "abbrev",
+ "version": "1.0.3",
+ "description": "Like ruby's abbrev module, but in js",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "main": "./lib/abbrev.js",
+ "scripts": {
+ "test": "node lib/abbrev.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/abbrev-js.git"
+ },
+ "_npmUser": {
+ "name": "jcoglan",
+ "email": "jcoglan@gmail.com"
+ },
+ "_id": "abbrev@1.0.3",
+ "dependencies": {},
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "_engineSupported": true,
+ "_npmVersion": "1.1.21",
+ "_nodeVersion": "v0.6.18",
+ "_defaultsLoaded": true,
+ "_from": "abbrev@1"
+}
View
43 node_modules/jsclass/node_modules/nopt/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "nopt",
+ "version": "1.0.10",
+ "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "main": "lib/nopt.js",
+ "scripts": {
+ "test": "node lib/nopt.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/nopt.git"
+ },
+ "bin": {
+ "nopt": "./bin/nopt.js"
+ },
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/isaacs/nopt/raw/master/LICENSE"
+ },
+ "dependencies": {
+ "abbrev": "1"
+ },
+ "_npmUser": {
+ "name": "jcoglan",
+ "email": "jcoglan@gmail.com"
+ },
+ "_id": "nopt@1.0.10",
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "_engineSupported": true,
+ "_npmVersion": "1.1.21",
+ "_nodeVersion": "v0.6.18",
+ "_defaultsLoaded": true,
+ "_from": "nopt@"
+}
View
54 node_modules/jsclass/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "jsclass",
+ "description": "Portable class library for JavaScript",
+ "homepage": "http://jsclass.jcoglan.com",
+ "author": {
+ "name": "James Coglan",
+ "email": "jcoglan@gmail.com",
+ "url": "http://jcoglan.com/"
+ },
+ "keywords": [
+ "oop",
+ "class",
+ "data-structures",
+ "testing"
+ ],
+ "version": "3.0.7",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "main": "./index",
+ "bin": {
+ "jsbuild": "./bin/jsbuild"
+ },
+ "dependencies": {
+ "nopt": ""
+ },
+ "bugs": {
+ "name": "http://github.com/jcoglan/js.class/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/mit-license.php"
+ }
+ ],
+ "repositories": [
+ {
+ "type": "git",
+ "url": "git://github.com/jcoglan/js.class.git"
+ }
+ ],
+ "_npmUser": {
+ "name": "jcoglan",
+ "email": "jcoglan@gmail.com"
+ },
+ "_id": "jsclass@3.0.7",
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "_engineSupported": true,
+ "_npmVersion": "1.1.21",
+ "_nodeVersion": "v0.6.18",
+ "_defaultsLoaded": true,
+ "_from": "jsclass@"
+}
View
BIN node_modules/jsclass/src/assets/bullet_go.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
183 node_modules/jsclass/src/assets/testui.css
@@ -0,0 +1,183 @@
+.test-result-container {
+ background: #fff;
+ border: 2px solid #444;
+ color: #444;
+ font: normal 15px FreeSans, Helvetica, Arial, sans-serif;
+ overflow: hidden;
+ position: absolute;
+ right: 30px;
+ top: 30px;
+ width: 640px;
+
+ -webkit-border-radius: 16px;
+ -moz-border-radius: 16px;
+ border-radius: 16px;
+}
+
+.test-result-container p,
+.test-result-container ul,
+.test-result-container li {
+ list-style: circle outside;
+ margin: 0;
+ padding: 0;
+}
+
+.test-result-container .report {
+ border-collapse: collapse;
+ margin: 0;
+ padding: 0;
+}
+
+.test-result-container .report th:first-child {
+ -webkit-border-top-left-radius: 14px;
+ -moz-border-radius-topleft: 14px;
+ border-top-left-radius: 14px;
+}
+
+.test-result-container .report th:last-child {
+ -webkit-border-top-right-radius: 14px;
+ -moz-border-radius-topright: 14px;
+ border-top-right-radius: 14px;
+}
+
+.test-result-container .report th,
+.test-result-container .report td {
+ border-left: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+ font-weight: bold;
+ padding: 0 8px;
+ text-align: right;
+ width: 144px;
+}
+
+.test-result-container .report th:first-child,
+.test-result-container .report td:first-child {
+ border-left: none;
+}
+
+.test-result-container .report th:last-child,
+.test-result-container .report td:last-child {
+ border-right: none;
+}
+
+.test-result-container .report th {
+ background: #eee;
+ padding: 4px 8px;
+}
+
+.test-result-container .report td {
+ color: #999;
+ font-size: 300%;
+}
+
+.test-result-container .light {
+ font-size: 0;
+ height: 6px;
+ overflow: hidden;
+}
+.test-result-container .light-pending {
+ background: #fc6;
+}
+.test-result-container .light-passed {
+ background: #6c3;
+}
+.test-result-container .light-failed {
+ background: #e40;
+}
+
+.test-result-container .user-agent {
+ background: #444;
+ color: #fff;
+ font-size: 80%;
+ list-style: none;
+ padding: 4px 12px;
+}
+
+.test-result-container .specs .spec,
+.test-result-container .specs .test {
+ position: relative;
+}
+
+.test-result-container .specs .spec-name,
+.test-result-container .specs .test-name {
+ cursor: pointer;
+}
+
+.test-result-container .spec-name {
+ border-top: 1px solid #ddd;
+ cursor: pointer;
+ font-weight: bold;
+}
+
+.test-result-container .specs ul {
+ margin-left: 32px;
+}
+
+.test-result-container .specs p {
+ padding: 4px 12px;
+}
+
+.test-result-container .specs .runner {
+ cursor: pointer;
+ display: block;
+ float: left;
+ height: 0;
+ margin-right: 6px;
+ overflow: hidden;
+ padding-top: 18px;
+ width: 16px;
+}
+
+.test-result-container .specs .fault {
+ font-size: 75%;
+}
+
+.test-result-container .specs .failed {
+ color: #e40;
+}
+
+.test-result-container .specs .closed ul.children {
+ display: none;
+}
+
+.test-result-container .test .stats {
+ display: none;
+}
+
+.test-result-container .stats {
+ float: right;
+ list-style: none;
+ right: 0;
+ top: 0;
+}
+
+.test-result-container .stats li {
+ border-left: 1px solid #eee;
+ display: block;
+ float: left;
+ list-style: none;
+ padding: 4px 8px;
+ width: 64px;
+}
+
+.test-result-container .stats .number {
+ color: #666;
+ font-weight: bold;
+}
+
+.test-result-container .stats .label {
+ color: #999;
+ font-size: 80%;
+}
+
+.test-result-container .passed .number {
+ color: #6c3;
+}
+
+.test-result-container .summary {
+ border-top: 1px solid #999;
+ color: #666;
+ margin: 0;
+ padding: 4px 12px;
+}
+
View
70 node_modules/jsclass/src/benchmark.js
@@ -0,0 +1,70 @@
+JS.Benchmark = new JS.Module('Benchmark', {
+ include: JS.Console,
+ N: 5,
+
+ measure: function(name, runs, functions) {
+ var envs = [], env,
+ times = [],
+ block = functions.test;
+
+ var i = runs * JS.Benchmark.N;
+ while (i--) {
+ env = {};
+ if (functions.setup) functions.setup.call(env);
+ envs.push(env);
+ }
+
+ var n = JS.Benchmark.N, start, end;
+ while (n--) {
+ i = runs;
+ start = new Date().getTime();
+ while (i--) block.call(envs.pop());
+ end = new Date().getTime();
+ times.push(end - start);
+ }
+ this.printResult(name, tim