pax_global_header00006660000000000000000000000064124030277530014515gustar00rootroot0000000000000052 comment=6fc27c23e1ebf54a4f6ba8a7224dd48dfd9faf7c node-merge-1.2.0/000077500000000000000000000000001240302775300135375ustar00rootroot00000000000000node-merge-1.2.0/.npmignore000066400000000000000000000000051240302775300155310ustar00rootroot00000000000000testsnode-merge-1.2.0/LICENSE000066400000000000000000000021101240302775300145360ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2014 yeikos - http://www.yeikos.com 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.node-merge-1.2.0/README.md000066400000000000000000000020651240302775300150210ustar00rootroot00000000000000# Merge Merge multiple objects into one, optionally creating a new cloned object. Similar to the jQuery.extend but more flexible. Works in Node.js and the browser. ## Node.js Usage ```sh npm install merge --save ``` ```js var merge = require('merge'), original, cloned; console.log(merge({one:'hello'}, {two: 'world'})); // -> {"one": "hello", "two": "world"} original = { x: { y: 1 } }; cloned = merge(true, original); cloned.x.y++; console.log(original.x.y, cloned.x.y); // -> 1, 2 console.log(merge.recursive(true, original, { x: { z: 2 } })); // -> {"x": { "y": 1, "z": 2 } } ``` ## Browser Usage ```html ``` ## Tests ```sh npm test ``` node-merge-1.2.0/bower.json000066400000000000000000000007671240302775300155620ustar00rootroot00000000000000{ "name": "merge", "version": "1.2.0", "homepage": "https://github.com/yeikos/js.merge", "authors": [ "yeikos " ], "description": "Merge multiple objects into one, optionally creating a new cloned object. Similar to the jQuery.extend but more flexible. Works in Node.js and the browser.", "main": "merge.js", "keywords": [ "merge", "recursive", "extend", "clone", "object", "browser" ], "license": "MIT", "ignore": [ "tests" ] } node-merge-1.2.0/merge.js000066400000000000000000000052121240302775300151740ustar00rootroot00000000000000/*! * @name JavaScript/NodeJS Merge v1.2.0 * @author yeikos * @repository https://github.com/yeikos/js.merge * Copyright 2014 yeikos - MIT license * https://raw.github.com/yeikos/js.merge/master/LICENSE */ ;(function(isNode) { /** * Merge one or more objects * @param bool? clone * @param mixed,... arguments * @return object */ var Public = function(clone) { return merge(clone === true, false, arguments); }, publicName = 'merge'; /** * Merge two or more objects recursively * @param bool? clone * @param mixed,... arguments * @return object */ Public.recursive = function(clone) { return merge(clone === true, true, arguments); }; /** * Clone the input removing any reference * @param mixed input * @return mixed */ Public.clone = function(input) { var output = input, type = typeOf(input), index, size; if (type === 'array') { output = []; size = input.length; for (index=0;index JavaScript/NodeJS Merge v1.2.0
node-merge-1.2.0/tests/index.js000066400000000000000000000002251240302775300163450ustar00rootroot00000000000000var qunit = require('./qunit/node_modules/qunit/index.js'); qunit.run({ code: { path: '../merge.js', namespace: 'merge' }, tests: 'tests.js' });node-merge-1.2.0/tests/qunit/000077500000000000000000000000001240302775300160415ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/000077500000000000000000000000001240302775300205165ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/.bin/000077500000000000000000000000001240302775300213445ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/.bin/qunit000066400000000000000000000004201240302775300224230ustar00rootroot00000000000000#!/bin/sh basedir=`dirname "$0"` case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac if [ -x "$basedir/node" ]; then "$basedir/node" "$basedir/../qunit/bin/cli.js" "$@" ret=$? else node "$basedir/../qunit/bin/cli.js" "$@" ret=$? fi exit $ret node-merge-1.2.0/tests/qunit/node_modules/.bin/qunit.cmd000066400000000000000000000002011240302775300231620ustar00rootroot00000000000000@IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "%~dp0\..\qunit\bin\cli.js" %* ) ELSE ( node "%~dp0\..\qunit\bin\cli.js" %* )node-merge-1.2.0/tests/qunit/node_modules/qunit/000077500000000000000000000000001240302775300216565ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/.gitmodules000066400000000000000000000001351240302775300240320ustar00rootroot00000000000000[submodule "support/qunit"] path = support/qunit url = https://github.com/jquery/qunit.git node-merge-1.2.0/tests/qunit/node_modules/qunit/.npmignore000066400000000000000000000000271240302775300236540ustar00rootroot00000000000000.DS_Store node_modules node-merge-1.2.0/tests/qunit/node_modules/qunit/Makefile000066400000000000000000000000661240302775300233200ustar00rootroot00000000000000test: node ./test/testrunner.js .PHONY: install testnode-merge-1.2.0/tests/qunit/node_modules/qunit/bin/000077500000000000000000000000001240302775300224265ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/bin/cli.js000066400000000000000000000062241240302775300235370ustar00rootroot00000000000000#!/usr/bin/env node var util = require('util'), argsparser = require('argsparser'), fs = require('fs'); var root = __dirname + '/..', args = argsparser.parse(), testrunner = require(root), o = testrunner.options, code, tests, help; help = '' + '\nUsage: cli [options] value (boolean value can be used)' + '\n' + '\nOptions:' + '\n -c, --code path to code you want to test' + '\n -t, --tests path to tests (space separated)' + '\n -d, --deps dependency paths - files required before code (space separated)' + '\n -l, --log logging options, json have to be used' + '\n --cov create tests coverage report' + '\n -h, --help show this help' + '\n -v, --version show module version' + '\n'; /** * Parses a code or dependency argument, returning an object defining the * specified file path or/and module name. * The exports of the module will be exposed globally by default. To expose * exports as a named variable, prefix the resource with the desired variable * name followed by a colon. * This allows you to more accurately recreate browser usage of QUnit, for * tests which are portable between browser runtime environmemts and Node.js. * @param {string} path to file or module name to require. * @return {Object} resource */ function parsePath(path) { var parts = path.split(':'), resource = { path: path }; if (parts.length === 2) { resource.namespace = parts[0]; resource.path = parts[1]; } return resource; } for (var key in args) { switch(key) { case 'node': // Skip the 'node' argument break; case '-c': case '--code': code = parsePath(args[key]); break; case '-t': case '--tests': // it's assumed that tests arguments will be file paths whose // contents are to be made global. This is consistent with use // of QUnit in browsers. tests = args[key]; break; case '-d': case '--deps': o.deps = args[key]; if (!Array.isArray(o.deps)) { o.deps = [o.deps]; } o.deps = o.deps.map(parsePath); break; case '-l': case '--log': eval('o.log = ' + args[key]); break; case '--cov': o.coverage = args[key]; break; case '-p': case '--paths': o.paths = args[key]; break; case '-v': case '--version': util.print( JSON.parse( fs.readFileSync(__dirname + '/../package.json') ).version + '\n' ); return; case '-h': case '-?': case '--help': util.print(help); return; } } if(!code || !tests) { util.print(help); util.print('\nBoth --code and --tests arguments are required\n'); return; } testrunner.run({ code: code, tests: tests }, function(err, stats) { if (err) { console.error(err); process.exit(1); return; } process.exit(stats.failed > 0 ? 1 : 0); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/index.js000066400000000000000000000000561240302775300233240ustar00rootroot00000000000000module.exports = require("./lib/testrunner"); node-merge-1.2.0/tests/qunit/node_modules/qunit/lib/000077500000000000000000000000001240302775300224245ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/lib/child.js000066400000000000000000000060471240302775300240540ustar00rootroot00000000000000var QUnit = require('../support/qunit/qunit/qunit.js'), path = require('path'), _ = require('underscore'), trace = require('tracejs').trace; // cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle, // which make it possible to encode cyclical structures and dags in JSON, and to // then recover them. JSONPath is used to represent the links. // http://GOESSNER.net/articles/JsonPath/ require('../support/json/cycle'); var options = JSON.parse(process.argv[2]), currentModule = path.basename(options.code.path, '.js'), currentTest; process.on('uncaughtException', function(err) { process.send({event: 'uncaughtException'}); if (QUnit.config.current) { QUnit.ok(false, 'Test threw unexpected exception: ' + err); QUnit.start(); } else { throw err; } }); QUnit.config.autorun = false; QUnit.config.autostart = false; // make qunit api global, like it is in the browser _.extend(global, QUnit); // as well as the QUnit variable itself global.QUnit = QUnit; /** * Require a resource. * @param {Object} res */ function _require(res, addToGlobal) { var exports = require(res.path.replace(/\.js$/, '')); if (addToGlobal) { // resource can define 'namespace' to expose its exports as a named object if (res.namespace) { global[res.namespace] = exports; } else { _.extend(global, exports); } } QUnit.start(); } /** * Calculate coverage stats using bunker */ function calcCoverage() { } /** * Callback for each started test. * @param {Object} test */ QUnit.testStart(function(test) { // currentTest is undefined while first test is not done yet currentTest = test.name; // use last module name if no module name defined currentModule = test.module || currentModule; }); /** * Callback for each assertion. * @param {Object} data */ QUnit.log(function(data) { data.test = this.config.current.testName; data.module = currentModule; process.send({ event: 'assertionDone', data: JSON.decycle(data) }); }); /** * Callback for one done test. * @param {Object} test */ QUnit.testDone(function(data) { // use last module name if no module name defined data.module = data.module || currentModule; process.send({ event: 'testDone', data: data }); }); /** * Callback for all done tests in the file. * @param {Object} res */ QUnit.done(_.debounce(function(data) { if (options.coverage) { data.coverage = calcCoverage(); } process.send({ event: 'done', data: data }); }, 1000)); /** * Provide better stack traces */ var error = console.error; console.error = function(obj) { // log full stacktrace if (obj && obj.stack) { obj = trace(obj); } return error.apply(this, arguments); }; // require deps options.deps.forEach(function(dep) { _require(dep, true); }); // require code _require(options.code, true); // require tests options.tests.forEach(function(res) { _require(res, false); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/lib/coverage.js000066400000000000000000000014121240302775300245530ustar00rootroot00000000000000var fs = require('fs'), util = require('util'), _ = require('underscore'), bunker; try { bunker = require('bunker'); } catch (err) {} exports.instrument = function(path) { var src = fs.readFileSync(path, 'utf-8'), newSrc = bunker(src).compile(); fs.renameSync(src, '__' + src); fs.writeFileSync(path, newSrc, 'utf-8'); }; exports.restore = function(path) { // do it only if the original file exist if (fs.statSync('__' + path).isFile()) { fs.unlinkSync(path); fs.renameSync('__' + path, path); } }; if (!bunker) { _.each(exports, function(fn, name) { exports[name] = function() { util.error('Module "bunker" is not installed.'.red); process.exit(1); }; }); } node-merge-1.2.0/tests/qunit/node_modules/qunit/lib/log.js000066400000000000000000000107021240302775300235430ustar00rootroot00000000000000var Table = require('cli-table'); var data, log = console.log; data = { assertions: [], tests: [], summaries: [] }; exports.assertion = function(d) { if (d) { data.assertions.push(d); } return data.assertions; }; exports.test = function(d) { if (d) { data.tests.push(d); } return data.tests; }; exports.summary = function(d) { if (d) { data.summaries.push(d); } return data.summaries; }; /** * Get global tests stats in unified format */ exports.stats = function() { var stats = { files: 0, assertions: 0, failed: 0, passed: 0, runtime: 0 }; data.summaries.forEach(function(file) { stats.files++; stats.assertions += file.total; stats.failed += file.failed; stats.passed += file.passed; stats.runtime += file.runtime; }); stats.tests = data.tests.length; return stats; }; /** * Reset global stats data */ exports.reset = function() { data = { assertions: [], tests: [], summaries: [] }; }; var print = exports.print = {}; print.assertions = function() { var table, currentModule, module, currentTest, test; table = new Table({ head: ['Module', 'Test', 'Assertion', 'Result'], colWidths: [40, 40, 40, 8] }); data.assertions.forEach(function(data) { // just easier to read the table if (data.module === currentModule) { module = ''; } else { module = currentModule = data.module; } // just easier to read the table if (data.test === currentTest) { test = ''; } else { test = currentTest = data.test; } table.push([module, test, data.message, data.result ? 'ok' : 'fail']); }); log('\nAssertions:\n' + table.toString()); }; print.errors = function() { var errors = []; data.assertions.forEach(function(data) { if (!data.result) { errors.push(data); } }); if (errors.length) { log('\n\nErrors:'); errors.forEach(function(data) { log('\nModule: ' + data.module + ' Test: ' + data.test); if (data.message) { log(data.message); } if (data.source) { log(data.source); } if (data.expected != null || data.actual != null) { //it will be an error if data.expected !== data.actual, but if they're //both undefined, it means that they were just not filled out because //no assertions were hit (likely due to code error that would have been logged as source or message). log('Actual value:'); log(data.actual); log('Expected value:'); log(data.expected); } }); } }; print.tests = function() { var table, currentModule, module; table = new Table({ head: ['Module', 'Test', 'Failed', 'Passed', 'Total'], colWidths: [40, 40, 8, 8, 8] }); data.tests.forEach(function(data) { // just easier to read the table if (data.module === currentModule) { module = ''; } else { module = currentModule = data.module; } table.push([module, data.name, data.failed, data.passed, data.total]); }); log('\nTests:\n' + table.toString()); }; print.summary = function() { var table, fileColWidth = 50; table = new Table({ head: ['File', 'Failed', 'Passed', 'Total', 'Runtime'], colWidths: [fileColWidth + 2, 10, 10, 10, 10] }); data.summaries.forEach(function(data) { var code = data.code; // truncate file name if (code.length > fileColWidth) { code = '...' + code.slice(code.length - fileColWidth + 3); } table.push([code, data.failed, data.passed, data.total, data.runtime]); }); log('\nSummary:\n' + table.toString()); }; print.globalSummary = function() { var table, data = exports.stats(); table = new Table({ head: ['Files', 'Tests', 'Assertions', 'Failed', 'Passed', 'Runtime'], colWidths: [12, 12, 12, 12, 12, 12] }); table.push([data.files, data.tests, data.assertions, data.failed, data.passed, data.runtime]); log('\nGlobal summary:\n' + table.toString()); }; node-merge-1.2.0/tests/qunit/node_modules/qunit/lib/testrunner.js000066400000000000000000000076721240302775300252070ustar00rootroot00000000000000var fs = require('fs'), path = require('path'), coverage = require('./coverage'), cp = require('child_process'), _ = require('underscore'), log = exports.log = require('./log'), util = require('util'); var options, noop = function() {}; options = exports.options = { // logging options log: { // log assertions overview assertions: true, // log expected and actual values for failed tests errors: true, // log tests overview tests: true, // log summary summary: true, // log global summary (all files) globalSummary: true, // log currently testing code file testing: true }, // run test coverage tool coverage: false, // define dependencies, which are required then before code deps: null, // define namespace your code will be attached to on global['your namespace'] namespace: null }; /** * Run one spawned instance with tests * @param {Object} opts * @param {Function} callback */ function runOne(opts, callback) { var child; child = cp.fork( __dirname + '/child.js', [JSON.stringify(opts)], {env: process.env} ); function kill() { process.removeListener('exit', kill); child.kill(); } child.on('message', function(msg) { if (msg.event === 'assertionDone') { log.assertion(msg.data); } else if (msg.event === 'testDone') { log.test(msg.data); } else if (msg.event === 'done') { msg.data.code = opts.code.path; log.summary(msg.data); if (opts.log.testing) { util.print('done'); } callback(null, msg.data); kill(); } else if (msg.event === 'uncaughtException') { callback(new Error('Uncaught exception in child process.')); kill(); } }); process.on('exit', kill); if (opts.log.testing) { util.print('\nTesting ', opts.code.path + ' ... '); } } /** * Make an absolute path from relative * @param {string|Object} file * @return {Object} */ function absPath(file) { if (typeof file === 'string') { file = {path: file}; } if (file.path.charAt(0) != '/') { file.path = path.resolve(process.cwd(), file.path); } return file; } /** * Convert path or array of paths to array of abs paths * @param {Array|string} files * @return {Array} */ function absPaths(files) { var ret = []; if (Array.isArray(files)) { files.forEach(function(file) { ret.push(absPath(file)); }); } else if (files) { ret.push(absPath(files)); } return ret; } /** * Run tests in spawned node instance async for every test. * @param {Object|Array} files * @param {Function} callback optional */ exports.run = function(files, callback) { var filesCount = 0; callback || (callback = noop); if (!Array.isArray(files)) { files = [files]; } files.forEach(function(file) { var opts = _.extend({}, options, file); !opts.log && (opts.log = {}); opts.deps = absPaths(opts.deps); opts.code = absPath(opts.code); opts.tests = absPaths(opts.tests); function done(err, stat) { if (err) { return callback(err); } filesCount++; if (filesCount >= files.length) { _.each(opts.log, function(val, name) { if (val && log.print[name]) { log.print[name](); } }) callback(null, log.stats()); } } if (opts.coverage) { coverage.instrument(opts.code); } else { runOne(opts, done); } }); }; /** * Set options * @param {Object} */ exports.setup = function(opts) { _.extend(options, opts); }; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/000077500000000000000000000000001240302775300243335ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/000077500000000000000000000000001240302775300265045ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/.npmignore000066400000000000000000000000111240302775300304730ustar00rootroot00000000000000.DS_Storenode-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/Makefile000066400000000000000000000000461240302775300301440ustar00rootroot00000000000000test: node test/test.js .PHONY: testnode-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/index.js000066400000000000000000000000561240302775300301520ustar00rootroot00000000000000module.exports = require('./lib/argsparser'); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/lib/000077500000000000000000000000001240302775300272525ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/lib/argsparser.js000066400000000000000000000021541240302775300317630ustar00rootroot00000000000000/** * Parser arguments array * @param {Array} args optional arguments arrray. * @return {Object} opts key value hash. * @export */ exports.parse = function(args) { // args is optional, default is process.argv args = args || process.argv; var opts = {}, curSwitch; args.forEach(function(arg) { // its a switch if (/^(-|--)/.test(arg) || !curSwitch) { opts[arg] = true; curSwitch = arg; // this arg is a data } else { if (arg === 'false') { arg = false; } else if (arg === 'true') { arg = true; } else if (!isNaN(arg)) { arg = Number(arg); } // it was a boolean switch per default, // now it has got a val if (typeof opts[curSwitch] === 'boolean') { opts[curSwitch] = arg; } else if (Array.isArray(opts[curSwitch])) { opts[curSwitch].push(arg); } else { opts[curSwitch] = [opts[curSwitch], arg]; } } }); return opts; }; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/package.json000066400000000000000000000040331240302775300307720ustar00rootroot00000000000000{ "name": "argsparser", "description": "A tiny command line arguments parser", "version": "0.0.6", "author": { "name": "Oleg Slobodskoi", "email": "oleg008@gmail.com" }, "repository": { "type": "git", "url": "http://github.com/kof/node-argsparser.git" }, "keywords": [ "arguments", "options", "command line", "parser" ], "engines": { "node": ">= 0.2.0" }, "scripts": { "test": "node ./test/test.js" }, "licenses": [ { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ], "readme": "## Yet another tiny arguments parser for node\n\n## Features\n * extremely tiny\n * instead to parse all possible spellings, it uses just some simple rules\n\n## How this parser works\nThe target is to get a key-value object from an array. A key can be the first element or element prefixed by \"-\" and \"--\" (switch). \nSo the parser loops through the array and looks for keys. After he could detect an a key all next elements will be added as a value of this key until he find another key.\nIf there is no value, then the key is true (boolean). If there are a lot of values, then the key is an array.\n\n## Examples\n\nnode script.js -> {\"node\": \"script.js\"}\n\nnode script.js -o -> {\"node\": \"script.js\", \"-o\": true}\n\nnode script.js -o test -> {\"node\": \"script.js\", \"-o\": \"test\"}\n\nnode script.js -a testa --b testb -> {node: \"script.js\", \"-a\": \"testa\", \"--b\": \"testb\"}\n \nnode script.js -paths /test.js /test1.js -> {node: \"script.js\", \"-paths\": [\"/test.js\", \"/test1.js\"]}\n\n## Usage\n\n // per default it parses process.argv\n var args = require( \"argsparser\" ).parse(); // {\"node\": \"/path/to/your/script.js\"}\n \n // optional you can pass your own arguments array\n var args = require( \"argsparser\" ).parse([\"-a\", \"test\"]); // {\"-a\": \"test\"}\n\n \n## Installation\n npm install argsparser ", "readmeFilename": "readme.md", "_id": "argsparser@0.0.6", "_from": "argsparser@0.0.6" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/readme.md000066400000000000000000000024101240302775300302600ustar00rootroot00000000000000## Yet another tiny arguments parser for node ## Features * extremely tiny * instead to parse all possible spellings, it uses just some simple rules ## How this parser works The target is to get a key-value object from an array. A key can be the first element or element prefixed by "-" and "--" (switch). So the parser loops through the array and looks for keys. After he could detect an a key all next elements will be added as a value of this key until he find another key. If there is no value, then the key is true (boolean). If there are a lot of values, then the key is an array. ## Examples node script.js -> {"node": "script.js"} node script.js -o -> {"node": "script.js", "-o": true} node script.js -o test -> {"node": "script.js", "-o": "test"} node script.js -a testa --b testb -> {node: "script.js", "-a": "testa", "--b": "testb"} node script.js -paths /test.js /test1.js -> {node: "script.js", "-paths": ["/test.js", "/test1.js"]} ## Usage // per default it parses process.argv var args = require( "argsparser" ).parse(); // {"node": "/path/to/your/script.js"} // optional you can pass your own arguments array var args = require( "argsparser" ).parse(["-a", "test"]); // {"-a": "test"} ## Installation npm install argsparser node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/test/000077500000000000000000000000001240302775300274635ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/argsparser/test/test.js000066400000000000000000000035051240302775300310030ustar00rootroot00000000000000var a = require('assert'), util = require('util'), parse = require('../lib/argsparser').parse; util.print('Run tests...\n'); a.deepEqual(parse(), {node: __filename}, 'node script.js'); a.deepEqual(parse(['-o']), {'-o': true}, 'node script.js -o'); a.deepEqual(parse(['-o', 'true']), {'-o': true}, 'node script.js -o true'); a.deepEqual(parse(['-o', 'false']), {'-o': false}, 'node script.js -o false'); a.deepEqual(parse(['-o', '123']), {'-o': 123}, 'node script.js -o 123'); a.deepEqual(parse(['--token', 'bla--bla']), {'--token': 'bla--bla'}, 'node script.js --token bla--bla'); a.deepEqual(parse(['-o', '123.456']), {'-o': 123.456}, 'node script.js -o 123.456'); a.deepEqual(parse(['-o', 'test']), {'-o': 'test'}, 'node script.js -o test'); a.deepEqual(parse(['-a', 'testa', '-b', 'testb']), {'-a': 'testa', '-b': 'testb'}, 'node script.js -a testa -b testb'); a.deepEqual(parse(['--a', 'testa', '--b', 'testb']), {'--a': 'testa', '--b': 'testb'}, 'node script.js --a testa --b testb '); a.deepEqual(parse(['-a', 'testa', '--b', 'testb']), {'-a': 'testa', '--b': 'testb'}, 'node script.js -a testa --b testb'); a.deepEqual(parse(['--a', 'testa', '-b', 'testb']), {'--a': 'testa', '-b': 'testb'}, 'node script.js --a testa -b testb'); a.deepEqual(parse(['-paths', '/test.js', '/test1.js']), {'-paths': ['/test.js', '/test1.js']}, 'node script.js -paths /test.js /test1.js'); a.deepEqual(parse(['--paths', '/test.js', '/test1.js']), {'--paths': ['/test.js', '/test1.js']}, 'node script.js --paths /test.js /test1.js'); a.deepEqual(parse(['--paths', '/test.js', '/test1.js', '-a', 'testa']), {'--paths': ['/test.js', '/test1.js'], '-a': 'testa'}, 'node script.js --paths /test.js /test1.js -a testa'); a.deepEqual(parse(['--port', '80', '8080']), {'--port': [80, 8080]}, 'node server.js --port 80 8080'); util.print('All tests ok\n'); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/000077500000000000000000000000001240302775300256215ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/.npmignore000066400000000000000000000000151240302775300276140ustar00rootroot00000000000000node_modules node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/.travis.yml000066400000000000000000000000531240302775300277300ustar00rootroot00000000000000language: node_js node_js: - 0.4 - 0.6 node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/README.markdown000066400000000000000000000033071240302775300303250ustar00rootroot00000000000000bunker ====== Bunker is a module to calculate code coverage using native javascript [burrito](https://github.com/substack/node-burrito) AST trickery. [![build status](https://secure.travis-ci.org/substack/node-bunker.png)](http://travis-ci.org/substack/node-bunker) ![code coverage](http://substack.net/images/code_coverage.png) examples ======== tiny ---- ````javascript var bunker = require('bunker'); var b = bunker('var x = 0; for (var i = 0; i < 30; i++) { x++ }'); var counts = {}; b.on('node', function (node) { if (!counts[node.id]) { counts[node.id] = { times : 0, node : node }; } counts[node.id].times ++; }); b.run(); Object.keys(counts).forEach(function (key) { var count = counts[key]; console.log(count.times + ' : ' + count.node.source()); }); ```` output: $ node example/tiny.js 1 : var x=0; 31 : i<30 30 : i++ 30 : x++; 30 : x++ methods ======= var bunker = require('bunker'); var b = bunker(src) ------------------- Create a new bunker code coverageifier with some source `src`. The bunker object `b` is an `EventEmitter` that emits `'node'` events with two parameters: * `node` - the [burrito](https://github.com/substack/node-burrito) node object * `stack` - the stack, [stackedy](https://github.com/substack/node-stackedy) style b.include(src) -------------- Include some source into the bunker. b.compile() ----------- Return the source wrapped with burrito. b.assign(context={}) -------------------- Assign the statement-tracking functions into `context`. b.run(context={}) ----------------- Run the source using `vm.runInNewContext()` with some `context`. The statement-tracking functions will be added to `context` by `assign()`. node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/example/000077500000000000000000000000001240302775300272545ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/example/prof.js000066400000000000000000000020221240302775300305540ustar00rootroot00000000000000var bunker = require('bunker'); var b = bunker('(' + function () { function beep () { var x = 0; for (var i = 0; i < 1000; i++) { for (var j = 0; j < 100; j++) { x += j; } } return x; } beep(); } + ')()'); var counts = {}; b.on('node', function (node) { if (!counts[node.id]) { counts[node.id] = { times : 0, node : node, elapsed : 0 }; } counts[node.id].times ++; var now = Date.now(); if (last.id !== undefined) { counts[last.id].elapsed += last. } if (node.name === 'call') { var start = now; last.id = node.id; counts[node.id].elapsed += Date.now() - start; } else { counts[node.id].elapsed += now - last; last = now; } }); b.run(); Object.keys(counts).forEach(function (key) { var count = counts[key]; console.log( [ count.times, count.node.source(), count.elapsed ] .join(' : ') ); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/example/tiny.js000066400000000000000000000006441240302775300306010ustar00rootroot00000000000000var bunker = require('bunker'); var b = bunker('var x = 0; for (var i = 0; i < 30; i++) { x++ }'); var counts = {}; b.on('node', function (node) { if (!counts[node.id]) { counts[node.id] = { times : 0, node : node }; } counts[node.id].times ++; }); b.run(); Object.keys(counts).forEach(function (key) { var count = counts[key]; console.log(count.times + ' : ' + count.node.source()); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/example/top/000077500000000000000000000000001240302775300300565ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/example/top/run.js000066400000000000000000000013761240302775300312270ustar00rootroot00000000000000var bunker = require('bunker'); var fs = require('fs'); var src = fs.readFileSync(__dirname + '/src.js', 'utf8'); var counts = {}; var b = bunker(src); b.on('node', function (node) { if (!counts[node.id]) { counts[node.id] = { times : 0, node : node }; } counts[node.id].times ++; }); b.run({ setInterval : setInterval, clearInterval : clearInterval, end : function () { Object.keys(counts) .sort(function (a, b) { return counts[b].times - counts[a].times }) .forEach(function (key) { var count = counts[key]; console.log( count.times + ' : ' + count.node.source() ); }) ; } }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/example/top/src.js000066400000000000000000000004161240302775300312040ustar00rootroot00000000000000function boop () { for (var i = 0; i < 30; i++) { nop(); } } function nop () { return undefined; } var times = 0; var iv = setInterval(function () { if (++times === 10) { clearInterval(iv); end(); } else boop() }, 100); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/index.js000066400000000000000000000060421240302775300272700ustar00rootroot00000000000000var burrito = require('burrito'); var vm = require('vm'); var EventEmitter = require('events').EventEmitter; module.exports = function (src) { var b = new Bunker(); if (src) b.include(src); return b; }; function Bunker () { this.sources = []; this.nodes = []; this.names = { call : burrito.generateName(6), expr : burrito.generateName(6), stat : burrito.generateName(6), return : burrito.generateName(6) }; } Bunker.prototype = new EventEmitter; Bunker.prototype.include = function (src) { this.sources.push(src); this.source = null; return this; }; Bunker.prototype.compile = function () { var src = this.sources.join('\n'); var nodes = this.nodes; var names = this.names; return burrito(src, function (node) { var i = nodes.length; if (node.name === 'call') { nodes.push(node); node.wrap(names.call + '(' + i + ')(%s)'); } else if (node.name === 'stat' || node.name === 'throw' || node.name === 'var') { nodes.push(node); node.wrap('{' + names.stat + '(' + i + ');%s}'); } else if (node.name === 'return') { nodes.push(node); // We need to wrap the new source in a function definition // so that UglifyJS will allow the presence of return var stat = names.stat + '(' + i + ');'; var wrapped = 'function ' + names.return + '() {' + stat + node.source() +'}' ; var parsed = burrito.parse(wrapped); // Remove the function definition from the AST parsed[1] = parsed[1][0][3]; node.state.update(parsed, true); } else if (node.name === 'binary') { nodes.push(node); node.wrap(names.expr + '(' + i + ')(%s)'); } else if (node.name === 'unary-postfix' || node.name === 'unary-prefix') { nodes.push(node); node.wrap(names.expr + '(' + i + ')(%s)'); } if (i !== nodes.length) { node.id = i; } }); }; Bunker.prototype.assign = function (context) { if (!context) context = {}; var self = this; var stack = []; context[self.names.call] = function (i) { var node = self.nodes[i]; stack.unshift(node); self.emit('node', node, stack); return function (expr) { stack.shift(); return expr; }; }; context[self.names.expr] = function (i) { var node = self.nodes[i]; self.emit('node', node, stack); return function (expr) { return expr; }; }; context[self.names.stat] = function (i) { var node = self.nodes[i]; self.emit('node', node, stack); }; return context; }; Bunker.prototype.run = function (context) { var src = this.compile(); vm.runInNewContext(src, this.assign(context)); return this; }; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/000077500000000000000000000000001240302775300302765ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/000077500000000000000000000000001240302775300317645ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/.npmignore000066400000000000000000000000151240302775300337570ustar00rootroot00000000000000node_modules node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/.travis.yml000066400000000000000000000000531240302775300340730ustar00rootroot00000000000000language: node_js node_js: - 0.4 - 0.6 README.markdown000066400000000000000000000071071240302775300344130ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burritoburrito ======= Burrito makes it easy to do crazy stuff with the javascript AST. This is super useful if you want to roll your own stack traces or build a code coverage tool. [![build status](https://secure.travis-ci.org/substack/node-burrito.png)](http://travis-ci.org/substack/node-burrito) ![node.wrap("burrito")](http://substack.net/images/burrito.png) examples ======== microwave --------- examples/microwave.js ````javascript var burrito = require('burrito'); var res = burrito.microwave('Math.sin(2)', function (node) { if (node.name === 'num') node.wrap('Math.PI / %s'); }); console.log(res); // sin(pi / 2) == 1 ```` output: 1 wrap ---- examples/wrap.js ````javascript var burrito = require('burrito'); var src = burrito('f() && g(h())\nfoo()', function (node) { if (node.name === 'call') node.wrap('qqq(%s)'); }); console.log(src); ```` output: qqq(f()) && qqq(g(qqq(h()))); qqq(foo()); methods ======= var burrito = require('burrito'); burrito(code, cb) ----------------- Given some source `code` and a function `trace`, walk the ast by expression. The `cb` gets called with a node object described below. If `code` is an Array then it is assumbed to be an AST which you can generate yourself with `burrito.parse()`. The AST must be annotated, so make sure to `burrito.parse(src, false, true)`. burrito.microwave(code, context={}, cb) --------------------------------------- Like `burrito()` except the result is run using `vm.runInNewContext(res, context)`. node object =========== node.name --------- Name is a string that contains the type of the expression as named by uglify. node.wrap(s) ------------ Wrap the current expression in `s`. If `s` is a string, `"%s"` will be replaced with the stringified current expression. If `s` is a function, it is called with the stringified current expression and should return a new stringified expression. If the `node.name === "binary"`, you get the subterms "%a" and "%b" to play with too. These subterms are applied if `s` is a function too: `s(expr, a, b)`. Protip: to insert multiple statements you can use javascript's lesser-known block syntax that it gets from C: ````javascript if (node.name === 'stat') node.wrap('{ foo(); %s }') ```` node.node --------- raw ast data generated by uglify node.value ---------- `node.node.slice(1)` to skip the annotations node.start ---------- The start location of the expression, like this: ````javascript { type: 'name', value: 'b', line: 0, col: 3, pos: 3, nlb: false, comments_before: [] } ```` node.end -------- The end location of the expression, formatted the same as `node.start`. node.state ---------- The state of the traversal using traverse. node.source() ------------- Returns a stringified version of the expression. node.parent() ------------- Returns the parent `node` or `null` if the node is the root element. node.label() ------------ Return the label of the present node or `null` if there is no label. Labels are returned for "call", "var", "defun", and "function" nodes. Returns an array for "var" nodes since `var` statements can contain multiple labels in assignment. install ======= With [npm](http://npmjs.org) you can just: npm install burrito in the browser ============== Burrito works in browser with [browserify](https://github.com/substack/node-browserify). It has been tested against: * Internet Explorer 5.5, 6.0, 7.0, 8.0, 9.0 * Firefox 3.5 * Chrome 6.0 * Opera 10.6 * Safari 5.0 kudos ===== Heavily inspired by (and previously mostly lifted outright from) isaacs's nifty tmp/instrument.js thingy from uglify-js. node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/example/000077500000000000000000000000001240302775300334175ustar00rootroot00000000000000microwave.js000066400000000000000000000003321240302775300356700ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/examplevar burrito = require('burrito'); var res = burrito.microwave('Math.sin(2)', function (node) { console.dir(node); if (node.name === 'num') node.wrap('Math.PI / %s'); }); console.log(res); // sin(pi / 2) == 1 web/000077500000000000000000000000001240302775300341155ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/examplebs.js000066400000000000000000005432741240302775300350760ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/example/webvar require = function (file, cwd) { var resolved = require.resolve(file, cwd || '/'); var mod = require.modules[resolved]; if (!mod) throw new Error( 'Failed to resolve module ' + file + ', tried ' + resolved ); var res = mod._cached ? mod._cached : mod(); return res; } var __require = require; require.paths = []; require.modules = {}; require.extensions = [".js",".coffee"]; require.resolve = (function () { var core = { 'assert': true, 'events': true, 'fs': true, 'path': true, 'vm': true }; return function (x, cwd) { if (!cwd) cwd = '/'; if (core[x]) return x; var path = require.modules.path(); var y = cwd || '.'; if (x.match(/^(?:\.\.?\/|\/)/)) { var m = loadAsFileSync(path.resolve(y, x)) || loadAsDirectorySync(path.resolve(y, x)); if (m) return m; } var n = loadNodeModulesSync(x, y); if (n) return n; throw new Error("Cannot find module '" + x + "'"); function loadAsFileSync (x) { if (require.modules[x]) { return x; } for (var i = 0; i < require.extensions.length; i++) { var ext = require.extensions[i]; if (require.modules[x + ext]) return x + ext; } } function loadAsDirectorySync (x) { x = x.replace(/\/+$/, ''); var pkgfile = x + '/package.json'; if (require.modules[pkgfile]) { var pkg = require.modules[pkgfile](); var b = pkg.browserify; if (typeof b === 'object' && b.main) { var m = loadAsFileSync(path.resolve(x, b.main)); if (m) return m; } else if (typeof b === 'string') { var m = loadAsFileSync(path.resolve(x, b)); if (m) return m; } else if (pkg.main) { var m = loadAsFileSync(path.resolve(x, pkg.main)); if (m) return m; } } return loadAsFileSync(x + '/index'); } function loadNodeModulesSync (x, start) { var dirs = nodeModulesPathsSync(start); for (var i = 0; i < dirs.length; i++) { var dir = dirs[i]; var m = loadAsFileSync(dir + '/' + x); if (m) return m; var n = loadAsDirectorySync(dir + '/' + x); if (n) return n; } var m = loadAsFileSync(x); if (m) return m; } function nodeModulesPathsSync (start) { var parts; if (start === '/') parts = [ '' ]; else parts = path.normalize(start).split('/'); var dirs = []; for (var i = parts.length - 1; i >= 0; i--) { if (parts[i] === 'node_modules') continue; var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; dirs.push(dir); } return dirs; } }; })(); require.alias = function (from, to) { var path = require.modules.path(); var res = null; try { res = require.resolve(from + '/package.json', '/'); } catch (err) { res = require.resolve(from, '/'); } var basedir = path.dirname(res); var keys = Object_keys(require.modules); for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (key.slice(0, basedir.length + 1) === basedir + '/') { var f = key.slice(basedir.length); require.modules[to + f] = require.modules[basedir + f]; } else if (key === basedir) { require.modules[to] = require.modules[basedir]; } } }; var Object_keys = Object.keys || function (obj) { var res = []; for (var key in obj) res.push(key) return res; }; if (typeof process === 'undefined') process = {}; if (!process.nextTick) process.nextTick = function (fn) { setTimeout(fn, 0); }; if (!process.title) process.title = 'browser'; if (!process.binding) process.binding = function (name) { if (name === 'evals') return require('vm') else throw new Error('No such module') }; if (!process.cwd) process.cwd = function () { return '.' }; require.modules["path"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "."; var __filename = "path"; var require = function (file) { return __require(file, "."); }; require.resolve = function (file) { return __require.resolve(name, "."); }; require.modules = __require.modules; __require.modules["path"]._cached = module.exports; (function () { function filter (xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { if (fn(xs[i], i, xs)) res.push(xs[i]); } return res; } // resolves . and .. elements in a path array with directory names there // must be no slashes, empty elements, or device names (c:\) in the array // (so also no leading and trailing slashes - it does not distinguish // relative and absolute paths) function normalizeArray(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length; i >= 0; i--) { var last = parts[i]; if (last == '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up--; up) { parts.unshift('..'); } } return parts; } // Regex to split a filename into [*, dir, basename, ext] // posix version var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; // path.resolve([from ...], to) // posix version exports.resolve = function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); // Skip empty and invalid entries if (typeof path !== 'string' || !path) { continue; } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; // path.normalize(path) // posix version exports.normalize = function(path) { var isAbsolute = path.charAt(0) === '/', trailingSlash = path.slice(-1) === '/'; // Normalize the path path = normalizeArray(filter(path.split('/'), function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; }; // posix version exports.join = function() { var paths = Array.prototype.slice.call(arguments, 0); return exports.normalize(filter(paths, function(p, index) { return p && typeof p === 'string'; }).join('/')); }; exports.dirname = function(path) { var dir = splitPathRe.exec(path)[1] || ''; var isWindows = false; if (!dir) { // No dirname return '.'; } else if (dir.length === 1 || (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { // It is just a slash or a drive letter with a slash return dir; } else { // It is a full dirname, strip trailing slash return dir.substring(0, dir.length - 1); } }; exports.basename = function(path, ext) { var f = splitPathRe.exec(path)[2] || ''; // TODO: make this comparison case-insensitive on windows? if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; exports.extname = function(path) { return splitPathRe.exec(path)[3] || ''; }; ; }).call(module.exports); __require.modules["path"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/package.json"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito"; var __filename = "/node_modules/burrito/package.json"; var require = function (file) { return __require(file, "/node_modules/burrito"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/package.json"]._cached = module.exports; (function () { module.exports = {"name":"burrito","description":"Wrap up expressions with a trace function while walking the AST with rice and beans on the side","version":"0.2.8","repository":{"type":"git","url":"git://github.com/substack/node-burrito.git"},"main":"./index.js","keywords":["trace","ast","walk","syntax","source","tree","uglify"],"directories":{"lib":".","example":"example","test":"test"},"scripts":{"test":"expresso"},"dependencies":{"traverse":">=0.5.1 <0.6","uglify-js":"1.0.4"},"devDependencies":{"expresso":"=0.7.x"},"engines":{"node":">=0.4.0"},"license":"BSD","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"}}; }).call(module.exports); __require.modules["/node_modules/burrito/package.json"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/uglify-js/package.json"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/uglify-js"; var __filename = "/node_modules/burrito/node_modules/uglify-js/package.json"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/uglify-js"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/uglify-js"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/uglify-js/package.json"]._cached = module.exports; (function () { module.exports = {"name":"uglify-js","author":{"name":"Mihai Bazon","email":"mihai.bazon@gmail.com","url":"http://mihai.bazon.net/blog"},"version":"1.0.4","main":"./uglify-js.js","bin":{"uglifyjs":"./bin/uglifyjs"},"repository":{"type":"git","url":"git@github.com:mishoo/UglifyJS.git"}}; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/uglify-js/package.json"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/uglify-js/uglify-js.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/uglify-js"; var __filename = "/node_modules/burrito/node_modules/uglify-js/uglify-js.js"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/uglify-js"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/uglify-js"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/uglify-js/uglify-js.js"]._cached = module.exports; (function () { //convienence function(src, [options]); function uglify(orig_code, options){ options || (options = {}); var jsp = uglify.parser; var pro = uglify.uglify; var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations var final_code = pro.gen_code(ast, options.gen_options); // compressed code here return final_code; }; uglify.parser = require("./lib/parse-js"); uglify.uglify = require("./lib/process"); module.exports = uglify; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/uglify-js/uglify-js.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/uglify-js/lib/parse-js.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/uglify-js/lib"; var __filename = "/node_modules/burrito/node_modules/uglify-js/lib/parse-js.js"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/uglify-js/lib"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/uglify-js/lib"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/uglify-js/lib/parse-js.js"]._cached = module.exports; (function () { /*********************************************************************** A JavaScript tokenizer / parser / beautifier / compressor. This version is suitable for Node.js. With minimal changes (the exports stuff) it should work on any JS platform. This file contains the tokenizer/parser. It is a port to JavaScript of parse-js [1], a JavaScript parser library written in Common Lisp by Marijn Haverbeke. Thank you Marijn! [1] http://marijn.haverbeke.nl/parse-js/ Exported functions: - tokenizer(code) -- returns a function. Call the returned function to fetch the next token. - parse(code) -- returns an AST of the given JavaScript code. -------------------------------- (C) --------------------------------- Author: Mihai Bazon http://mihai.bazon.net/blog Distributed under the BSD license: Copyright 2010 (c) Mihai Bazon Based on parse-js (http://marijn.haverbeke.nl/parse-js/). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /* -----[ Tokenizer (constants) ]----- */ var KEYWORDS = array_to_hash([ "break", "case", "catch", "const", "continue", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "new", "return", "switch", "throw", "try", "typeof", "var", "void", "while", "with" ]); var RESERVED_WORDS = array_to_hash([ "abstract", "boolean", "byte", "char", "class", "debugger", "double", "enum", "export", "extends", "final", "float", "goto", "implements", "import", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "super", "synchronized", "throws", "transient", "volatile" ]); var KEYWORDS_BEFORE_EXPRESSION = array_to_hash([ "return", "new", "delete", "throw", "else", "case" ]); var KEYWORDS_ATOM = array_to_hash([ "false", "null", "true", "undefined" ]); var OPERATOR_CHARS = array_to_hash(characters("+-*&%=<>!?|~^")); var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i; var RE_OCT_NUMBER = /^0[0-7]+$/; var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i; var OPERATORS = array_to_hash([ "in", "instanceof", "typeof", "new", "void", "delete", "++", "--", "+", "-", "!", "~", "&", "|", "^", "*", "/", "%", ">>", "<<", ">>>", "<", ">", "<=", ">=", "==", "===", "!=", "!==", "?", "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=", "&&", "||" ]); var WHITESPACE_CHARS = array_to_hash(characters(" \u00a0\n\r\t\f\v\u200b")); var PUNC_BEFORE_EXPRESSION = array_to_hash(characters("[{}(,.;:")); var PUNC_CHARS = array_to_hash(characters("[]{}(),;:")); var REGEXP_MODIFIERS = array_to_hash(characters("gmsiy")); /* -----[ Tokenizer ]----- */ // regexps adapted from http://xregexp.com/plugins/#unicode var UNICODE = { letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), non_spacing_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"), space_combining_mark: new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"), connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]") }; function is_letter(ch) { return UNICODE.letter.test(ch); }; function is_digit(ch) { ch = ch.charCodeAt(0); return ch >= 48 && ch <= 57; //XXX: find out if "UnicodeDigit" means something else than 0..9 }; function is_alphanumeric_char(ch) { return is_digit(ch) || is_letter(ch); }; function is_unicode_combining_mark(ch) { return UNICODE.non_spacing_mark.test(ch) || UNICODE.space_combining_mark.test(ch); }; function is_unicode_connector_punctuation(ch) { return UNICODE.connector_punctuation.test(ch); }; function is_identifier_start(ch) { return ch == "$" || ch == "_" || is_letter(ch); }; function is_identifier_char(ch) { return is_identifier_start(ch) || is_unicode_combining_mark(ch) || is_digit(ch) || is_unicode_connector_punctuation(ch) || ch == "\u200c" // zero-width non-joiner || ch == "\u200d" // zero-width joiner (in my ECMA-262 PDF, this is also 200c) ; }; function parse_js_number(num) { if (RE_HEX_NUMBER.test(num)) { return parseInt(num.substr(2), 16); } else if (RE_OCT_NUMBER.test(num)) { return parseInt(num.substr(1), 8); } else if (RE_DEC_NUMBER.test(num)) { return parseFloat(num); } }; function JS_Parse_Error(message, line, col, pos) { this.message = message; this.line = line; this.col = col; this.pos = pos; try { ({})(); } catch(ex) { this.stack = ex.stack; }; }; JS_Parse_Error.prototype.toString = function() { return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack; }; function js_error(message, line, col, pos) { throw new JS_Parse_Error(message, line, col, pos); }; function is_token(token, type, val) { return token.type == type && (val == null || token.value == val); }; var EX_EOF = {}; function tokenizer($TEXT) { var S = { text : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, ''), pos : 0, tokpos : 0, line : 0, tokline : 0, col : 0, tokcol : 0, newline_before : false, regex_allowed : false, comments_before : [] }; function peek() { return S.text.charAt(S.pos); }; function next(signal_eof) { var ch = S.text.charAt(S.pos++); if (signal_eof && !ch) throw EX_EOF; if (ch == "\n") { S.newline_before = true; ++S.line; S.col = 0; } else { ++S.col; } return ch; }; function eof() { return !S.peek(); }; function find(what, signal_eof) { var pos = S.text.indexOf(what, S.pos); if (signal_eof && pos == -1) throw EX_EOF; return pos; }; function start_token() { S.tokline = S.line; S.tokcol = S.col; S.tokpos = S.pos; }; function token(type, value, is_comment) { S.regex_allowed = ((type == "operator" && !HOP(UNARY_POSTFIX, value)) || (type == "keyword" && HOP(KEYWORDS_BEFORE_EXPRESSION, value)) || (type == "punc" && HOP(PUNC_BEFORE_EXPRESSION, value))); var ret = { type : type, value : value, line : S.tokline, col : S.tokcol, pos : S.tokpos, nlb : S.newline_before }; if (!is_comment) { ret.comments_before = S.comments_before; S.comments_before = []; } S.newline_before = false; return ret; }; function skip_whitespace() { while (HOP(WHITESPACE_CHARS, peek())) next(); }; function read_while(pred) { var ret = "", ch = peek(), i = 0; while (ch && pred(ch, i++)) { ret += next(); ch = peek(); } return ret; }; function parse_error(err) { js_error(err, S.tokline, S.tokcol, S.tokpos); }; function read_num(prefix) { var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; var num = read_while(function(ch, i){ if (ch == "x" || ch == "X") { if (has_x) return false; return has_x = true; } if (!has_x && (ch == "E" || ch == "e")) { if (has_e) return false; return has_e = after_e = true; } if (ch == "-") { if (after_e || (i == 0 && !prefix)) return true; return false; } if (ch == "+") return after_e; after_e = false; if (ch == ".") { if (!has_dot && !has_x) return has_dot = true; return false; } return is_alphanumeric_char(ch); }); if (prefix) num = prefix + num; var valid = parse_js_number(num); if (!isNaN(valid)) { return token("num", valid); } else { parse_error("Invalid syntax: " + num); } }; function read_escaped_char() { var ch = next(true); switch (ch) { case "n" : return "\n"; case "r" : return "\r"; case "t" : return "\t"; case "b" : return "\b"; case "v" : return "\v"; case "f" : return "\f"; case "0" : return "\0"; case "x" : return String.fromCharCode(hex_bytes(2)); case "u" : return String.fromCharCode(hex_bytes(4)); default : return ch; } }; function hex_bytes(n) { var num = 0; for (; n > 0; --n) { var digit = parseInt(next(true), 16); if (isNaN(digit)) parse_error("Invalid hex-character pattern in string"); num = (num << 4) | digit; } return num; }; function read_string() { return with_eof_error("Unterminated string constant", function(){ var quote = next(), ret = ""; for (;;) { var ch = next(true); if (ch == "\\") ch = read_escaped_char(); else if (ch == quote) break; ret += ch; } return token("string", ret); }); }; function read_line_comment() { next(); var i = find("\n"), ret; if (i == -1) { ret = S.text.substr(S.pos); S.pos = S.text.length; } else { ret = S.text.substring(S.pos, i); S.pos = i; } return token("comment1", ret, true); }; function read_multiline_comment() { next(); return with_eof_error("Unterminated multiline comment", function(){ var i = find("*/", true), text = S.text.substring(S.pos, i), tok = token("comment2", text, true); S.pos = i + 2; S.line += text.split("\n").length - 1; S.newline_before = text.indexOf("\n") >= 0; // https://github.com/mishoo/UglifyJS/issues/#issue/100 if (/^@cc_on/i.test(text)) { warn("WARNING: at line " + S.line); warn("*** Found \"conditional comment\": " + text); warn("*** UglifyJS DISCARDS ALL COMMENTS. This means your code might no longer work properly in Internet Explorer."); } return tok; }); }; function read_name() { var backslash = false, name = "", ch; while ((ch = peek()) != null) { if (!backslash) { if (ch == "\\") backslash = true, next(); else if (is_identifier_char(ch)) name += next(); else break; } else { if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); ch = read_escaped_char(); if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); name += ch; backslash = false; } } return name; }; function read_regexp() { return with_eof_error("Unterminated regular expression", function(){ var prev_backslash = false, regexp = "", ch, in_class = false; while ((ch = next(true))) if (prev_backslash) { regexp += "\\" + ch; prev_backslash = false; } else if (ch == "[") { in_class = true; regexp += ch; } else if (ch == "]" && in_class) { in_class = false; regexp += ch; } else if (ch == "/" && !in_class) { break; } else if (ch == "\\") { prev_backslash = true; } else { regexp += ch; } var mods = read_name(); return token("regexp", [ regexp, mods ]); }); }; function read_operator(prefix) { function grow(op) { if (!peek()) return op; var bigger = op + peek(); if (HOP(OPERATORS, bigger)) { next(); return grow(bigger); } else { return op; } }; return token("operator", grow(prefix || next())); }; function handle_slash() { next(); var regex_allowed = S.regex_allowed; switch (peek()) { case "/": S.comments_before.push(read_line_comment()); S.regex_allowed = regex_allowed; return next_token(); case "*": S.comments_before.push(read_multiline_comment()); S.regex_allowed = regex_allowed; return next_token(); } return S.regex_allowed ? read_regexp() : read_operator("/"); }; function handle_dot() { next(); return is_digit(peek()) ? read_num(".") : token("punc", "."); }; function read_word() { var word = read_name(); return !HOP(KEYWORDS, word) ? token("name", word) : HOP(OPERATORS, word) ? token("operator", word) : HOP(KEYWORDS_ATOM, word) ? token("atom", word) : token("keyword", word); }; function with_eof_error(eof_error, cont) { try { return cont(); } catch(ex) { if (ex === EX_EOF) parse_error(eof_error); else throw ex; } }; function next_token(force_regexp) { if (force_regexp) return read_regexp(); skip_whitespace(); start_token(); var ch = peek(); if (!ch) return token("eof"); if (is_digit(ch)) return read_num(); if (ch == '"' || ch == "'") return read_string(); if (HOP(PUNC_CHARS, ch)) return token("punc", next()); if (ch == ".") return handle_dot(); if (ch == "/") return handle_slash(); if (HOP(OPERATOR_CHARS, ch)) return read_operator(); if (ch == "\\" || is_identifier_start(ch)) return read_word(); parse_error("Unexpected character '" + ch + "'"); }; next_token.context = function(nc) { if (nc) S = nc; return S; }; return next_token; }; /* -----[ Parser (constants) ]----- */ var UNARY_PREFIX = array_to_hash([ "typeof", "void", "delete", "--", "++", "!", "~", "-", "+" ]); var UNARY_POSTFIX = array_to_hash([ "--", "++" ]); var ASSIGNMENT = (function(a, ret, i){ while (i < a.length) { ret[a[i]] = a[i].substr(0, a[i].length - 1); i++; } return ret; })( ["+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="], { "=": true }, 0 ); var PRECEDENCE = (function(a, ret){ for (var i = 0, n = 1; i < a.length; ++i, ++n) { var b = a[i]; for (var j = 0; j < b.length; ++j) { ret[b[j]] = n; } } return ret; })( [ ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"] ], {} ); var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); /* -----[ Parser ]----- */ function NodeWithToken(str, start, end) { this.name = str; this.start = start; this.end = end; }; NodeWithToken.prototype.toString = function() { return this.name; }; function parse($TEXT, exigent_mode, embed_tokens) { var S = { input : typeof $TEXT == "string" ? tokenizer($TEXT, true) : $TEXT, token : null, prev : null, peeked : null, in_function : 0, in_loop : 0, labels : [] }; S.token = next(); function is(type, value) { return is_token(S.token, type, value); }; function peek() { return S.peeked || (S.peeked = S.input()); }; function next() { S.prev = S.token; if (S.peeked) { S.token = S.peeked; S.peeked = null; } else { S.token = S.input(); } return S.token; }; function prev() { return S.prev; }; function croak(msg, line, col, pos) { var ctx = S.input.context(); js_error(msg, line != null ? line : ctx.tokline, col != null ? col : ctx.tokcol, pos != null ? pos : ctx.tokpos); }; function token_error(token, msg) { croak(msg, token.line, token.col); }; function unexpected(token) { if (token == null) token = S.token; token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); }; function expect_token(type, val) { if (is(type, val)) { return next(); } token_error(S.token, "Unexpected token " + S.token.type + ", expected " + type); }; function expect(punc) { return expect_token("punc", punc); }; function can_insert_semicolon() { return !exigent_mode && ( S.token.nlb || is("eof") || is("punc", "}") ); }; function semicolon() { if (is("punc", ";")) next(); else if (!can_insert_semicolon()) unexpected(); }; function as() { return slice(arguments); }; function parenthesised() { expect("("); var ex = expression(); expect(")"); return ex; }; function add_tokens(str, start, end) { return str instanceof NodeWithToken ? str : new NodeWithToken(str, start, end); }; function maybe_embed_tokens(parser) { if (embed_tokens) return function() { var start = S.token; var ast = parser.apply(this, arguments); ast[0] = add_tokens(ast[0], start, prev()); return ast; }; else return parser; }; var statement = maybe_embed_tokens(function() { if (is("operator", "/")) { S.peeked = null; S.token = S.input(true); // force regexp } switch (S.token.type) { case "num": case "string": case "regexp": case "operator": case "atom": return simple_statement(); case "name": return is_token(peek(), "punc", ":") ? labeled_statement(prog1(S.token.value, next, next)) : simple_statement(); case "punc": switch (S.token.value) { case "{": return as("block", block_()); case "[": case "(": return simple_statement(); case ";": next(); return as("block"); default: unexpected(); } case "keyword": switch (prog1(S.token.value, next)) { case "break": return break_cont("break"); case "continue": return break_cont("continue"); case "debugger": semicolon(); return as("debugger"); case "do": return (function(body){ expect_token("keyword", "while"); return as("do", prog1(parenthesised, semicolon), body); })(in_loop(statement)); case "for": return for_(); case "function": return function_(true); case "if": return if_(); case "return": if (S.in_function == 0) croak("'return' outside of function"); return as("return", is("punc", ";") ? (next(), null) : can_insert_semicolon() ? null : prog1(expression, semicolon)); case "switch": return as("switch", parenthesised(), switch_block_()); case "throw": return as("throw", prog1(expression, semicolon)); case "try": return try_(); case "var": return prog1(var_, semicolon); case "const": return prog1(const_, semicolon); case "while": return as("while", parenthesised(), in_loop(statement)); case "with": return as("with", parenthesised(), statement()); default: unexpected(); } } }); function labeled_statement(label) { S.labels.push(label); var start = S.token, stat = statement(); if (exigent_mode && !HOP(STATEMENTS_WITH_LABELS, stat[0])) unexpected(start); S.labels.pop(); return as("label", label, stat); }; function simple_statement() { return as("stat", prog1(expression, semicolon)); }; function break_cont(type) { var name; if (!can_insert_semicolon()) { name = is("name") ? S.token.value : null; } if (name != null) { next(); if (!member(name, S.labels)) croak("Label " + name + " without matching loop or statement"); } else if (S.in_loop == 0) croak(type + " not inside a loop or switch"); semicolon(); return as(type, name); }; function for_() { expect("("); var init = null; if (!is("punc", ";")) { init = is("keyword", "var") ? (next(), var_(true)) : expression(true, true); if (is("operator", "in")) return for_in(init); } return regular_for(init); }; function regular_for(init) { expect(";"); var test = is("punc", ";") ? null : expression(); expect(";"); var step = is("punc", ")") ? null : expression(); expect(")"); return as("for", init, test, step, in_loop(statement)); }; function for_in(init) { var lhs = init[0] == "var" ? as("name", init[1][0]) : init; next(); var obj = expression(); expect(")"); return as("for-in", init, lhs, obj, in_loop(statement)); }; var function_ = maybe_embed_tokens(function(in_statement) { var name = is("name") ? prog1(S.token.value, next) : null; if (in_statement && !name) unexpected(); expect("("); return as(in_statement ? "defun" : "function", name, // arguments (function(first, a){ while (!is("punc", ")")) { if (first) first = false; else expect(","); if (!is("name")) unexpected(); a.push(S.token.value); next(); } next(); return a; })(true, []), // body (function(){ ++S.in_function; var loop = S.in_loop; S.in_loop = 0; var a = block_(); --S.in_function; S.in_loop = loop; return a; })()); }); function if_() { var cond = parenthesised(), body = statement(), belse; if (is("keyword", "else")) { next(); belse = statement(); } return as("if", cond, body, belse); }; function block_() { expect("{"); var a = []; while (!is("punc", "}")) { if (is("eof")) unexpected(); a.push(statement()); } next(); return a; }; var switch_block_ = curry(in_loop, function(){ expect("{"); var a = [], cur = null; while (!is("punc", "}")) { if (is("eof")) unexpected(); if (is("keyword", "case")) { next(); cur = []; a.push([ expression(), cur ]); expect(":"); } else if (is("keyword", "default")) { next(); expect(":"); cur = []; a.push([ null, cur ]); } else { if (!cur) unexpected(); cur.push(statement()); } } next(); return a; }); function try_() { var body = block_(), bcatch, bfinally; if (is("keyword", "catch")) { next(); expect("("); if (!is("name")) croak("Name expected"); var name = S.token.value; next(); expect(")"); bcatch = [ name, block_() ]; } if (is("keyword", "finally")) { next(); bfinally = block_(); } if (!bcatch && !bfinally) croak("Missing catch/finally blocks"); return as("try", body, bcatch, bfinally); }; function vardefs(no_in) { var a = []; for (;;) { if (!is("name")) unexpected(); var name = S.token.value; next(); if (is("operator", "=")) { next(); a.push([ name, expression(false, no_in) ]); } else { a.push([ name ]); } if (!is("punc", ",")) break; next(); } return a; }; function var_(no_in) { return as("var", vardefs(no_in)); }; function const_() { return as("const", vardefs()); }; function new_() { var newexp = expr_atom(false), args; if (is("punc", "(")) { next(); args = expr_list(")"); } else { args = []; } return subscripts(as("new", newexp, args), true); }; var expr_atom = maybe_embed_tokens(function(allow_calls) { if (is("operator", "new")) { next(); return new_(); } if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) { return make_unary("unary-prefix", prog1(S.token.value, next), expr_atom(allow_calls)); } if (is("punc")) { switch (S.token.value) { case "(": next(); return subscripts(prog1(expression, curry(expect, ")")), allow_calls); case "[": next(); return subscripts(array_(), allow_calls); case "{": next(); return subscripts(object_(), allow_calls); } unexpected(); } if (is("keyword", "function")) { next(); return subscripts(function_(false), allow_calls); } if (HOP(ATOMIC_START_TOKEN, S.token.type)) { var atom = S.token.type == "regexp" ? as("regexp", S.token.value[0], S.token.value[1]) : as(S.token.type, S.token.value); return subscripts(prog1(atom, next), allow_calls); } unexpected(); }); function expr_list(closing, allow_trailing_comma, allow_empty) { var first = true, a = []; while (!is("punc", closing)) { if (first) first = false; else expect(","); if (allow_trailing_comma && is("punc", closing)) break; if (is("punc", ",") && allow_empty) { a.push([ "atom", "undefined" ]); } else { a.push(expression(false)); } } next(); return a; }; function array_() { return as("array", expr_list("]", !exigent_mode, true)); }; function object_() { var first = true, a = []; while (!is("punc", "}")) { if (first) first = false; else expect(","); if (!exigent_mode && is("punc", "}")) // allow trailing comma break; var type = S.token.type; var name = as_property_name(); if (type == "name" && (name == "get" || name == "set") && !is("punc", ":")) { a.push([ as_name(), function_(false), name ]); } else { expect(":"); a.push([ name, expression(false) ]); } } next(); return as("object", a); }; function as_property_name() { switch (S.token.type) { case "num": case "string": return prog1(S.token.value, next); } return as_name(); }; function as_name() { switch (S.token.type) { case "name": case "operator": case "keyword": case "atom": return prog1(S.token.value, next); default: unexpected(); } }; function subscripts(expr, allow_calls) { if (is("punc", ".")) { next(); return subscripts(as("dot", expr, as_name()), allow_calls); } if (is("punc", "[")) { next(); return subscripts(as("sub", expr, prog1(expression, curry(expect, "]"))), allow_calls); } if (allow_calls && is("punc", "(")) { next(); return subscripts(as("call", expr, expr_list(")")), true); } if (allow_calls && is("operator") && HOP(UNARY_POSTFIX, S.token.value)) { return prog1(curry(make_unary, "unary-postfix", S.token.value, expr), next); } return expr; }; function make_unary(tag, op, expr) { if ((op == "++" || op == "--") && !is_assignable(expr)) croak("Invalid use of " + op + " operator"); return as(tag, op, expr); }; function expr_op(left, min_prec, no_in) { var op = is("operator") ? S.token.value : null; if (op && op == "in" && no_in) op = null; var prec = op != null ? PRECEDENCE[op] : null; if (prec != null && prec > min_prec) { next(); var right = expr_op(expr_atom(true), prec, no_in); return expr_op(as("binary", op, left, right), min_prec, no_in); } return left; }; function expr_ops(no_in) { return expr_op(expr_atom(true), 0, no_in); }; function maybe_conditional(no_in) { var expr = expr_ops(no_in); if (is("operator", "?")) { next(); var yes = expression(false); expect(":"); return as("conditional", expr, yes, expression(false, no_in)); } return expr; }; function is_assignable(expr) { if (!exigent_mode) return true; switch (expr[0]) { case "dot": case "sub": case "new": case "call": return true; case "name": return expr[1] != "this"; } }; function maybe_assign(no_in) { var left = maybe_conditional(no_in), val = S.token.value; if (is("operator") && HOP(ASSIGNMENT, val)) { if (is_assignable(left)) { next(); return as("assign", ASSIGNMENT[val], left, maybe_assign(no_in)); } croak("Invalid assignment"); } return left; }; var expression = maybe_embed_tokens(function(commas, no_in) { if (arguments.length == 0) commas = true; var expr = maybe_assign(no_in); if (commas && is("punc", ",")) { next(); return as("seq", expr, expression(true, no_in)); } return expr; }); function in_loop(cont) { try { ++S.in_loop; return cont(); } finally { --S.in_loop; } }; return as("toplevel", (function(a){ while (!is("eof")) a.push(statement()); return a; })([])); }; /* -----[ Utilities ]----- */ function curry(f) { var args = slice(arguments, 1); return function() { return f.apply(this, args.concat(slice(arguments))); }; }; function prog1(ret) { if (ret instanceof Function) ret = ret(); for (var i = 1, n = arguments.length; --n > 0; ++i) arguments[i](); return ret; }; function array_to_hash(a) { var ret = {}; for (var i = 0; i < a.length; ++i) ret[a[i]] = true; return ret; }; function slice(a, start) { return Array.prototype.slice.call(a, start == null ? 0 : start); }; function characters(str) { return str.split(""); }; function member(name, array) { for (var i = array.length; --i >= 0;) if (array[i] === name) return true; return false; }; function HOP(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }; var warn = function() {}; /* -----[ Exports ]----- */ exports.tokenizer = tokenizer; exports.parse = parse; exports.slice = slice; exports.curry = curry; exports.member = member; exports.array_to_hash = array_to_hash; exports.PRECEDENCE = PRECEDENCE; exports.KEYWORDS_ATOM = KEYWORDS_ATOM; exports.RESERVED_WORDS = RESERVED_WORDS; exports.KEYWORDS = KEYWORDS; exports.ATOMIC_START_TOKEN = ATOMIC_START_TOKEN; exports.OPERATORS = OPERATORS; exports.is_alphanumeric_char = is_alphanumeric_char; exports.set_logger = function(logger) { warn = logger; }; ; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/uglify-js/lib/parse-js.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/uglify-js/lib/process.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/uglify-js/lib"; var __filename = "/node_modules/burrito/node_modules/uglify-js/lib/process.js"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/uglify-js/lib"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/uglify-js/lib"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/uglify-js/lib/process.js"]._cached = module.exports; (function () { /*********************************************************************** A JavaScript tokenizer / parser / beautifier / compressor. This version is suitable for Node.js. With minimal changes (the exports stuff) it should work on any JS platform. This file implements some AST processors. They work on data built by parse-js. Exported functions: - ast_mangle(ast, options) -- mangles the variable/function names in the AST. Returns an AST. - ast_squeeze(ast) -- employs various optimizations to make the final generated code even smaller. Returns an AST. - gen_code(ast, options) -- generates JS code from the AST. Pass true (or an object, see the code for some options) as second argument to get "pretty" (indented) code. -------------------------------- (C) --------------------------------- Author: Mihai Bazon http://mihai.bazon.net/blog Distributed under the BSD license: Copyright 2010 (c) Mihai Bazon Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ var jsp = require("./parse-js"), slice = jsp.slice, member = jsp.member, PRECEDENCE = jsp.PRECEDENCE, OPERATORS = jsp.OPERATORS; /* -----[ helper for AST traversal ]----- */ function ast_walker(ast) { function _vardefs(defs) { return [ this[0], MAP(defs, function(def){ var a = [ def[0] ]; if (def.length > 1) a[1] = walk(def[1]); return a; }) ]; }; function _block(statements) { var out = [ this[0] ]; if (statements != null) out.push(MAP(statements, walk)); return out; }; var walkers = { "string": function(str) { return [ this[0], str ]; }, "num": function(num) { return [ this[0], num ]; }, "name": function(name) { return [ this[0], name ]; }, "toplevel": function(statements) { return [ this[0], MAP(statements, walk) ]; }, "block": _block, "splice": _block, "var": _vardefs, "const": _vardefs, "try": function(t, c, f) { return [ this[0], MAP(t, walk), c != null ? [ c[0], MAP(c[1], walk) ] : null, f != null ? MAP(f, walk) : null ]; }, "throw": function(expr) { return [ this[0], walk(expr) ]; }, "new": function(ctor, args) { return [ this[0], walk(ctor), MAP(args, walk) ]; }, "switch": function(expr, body) { return [ this[0], walk(expr), MAP(body, function(branch){ return [ branch[0] ? walk(branch[0]) : null, MAP(branch[1], walk) ]; }) ]; }, "break": function(label) { return [ this[0], label ]; }, "continue": function(label) { return [ this[0], label ]; }, "conditional": function(cond, t, e) { return [ this[0], walk(cond), walk(t), walk(e) ]; }, "assign": function(op, lvalue, rvalue) { return [ this[0], op, walk(lvalue), walk(rvalue) ]; }, "dot": function(expr) { return [ this[0], walk(expr) ].concat(slice(arguments, 1)); }, "call": function(expr, args) { return [ this[0], walk(expr), MAP(args, walk) ]; }, "function": function(name, args, body) { return [ this[0], name, args.slice(), MAP(body, walk) ]; }, "defun": function(name, args, body) { return [ this[0], name, args.slice(), MAP(body, walk) ]; }, "if": function(conditional, t, e) { return [ this[0], walk(conditional), walk(t), walk(e) ]; }, "for": function(init, cond, step, block) { return [ this[0], walk(init), walk(cond), walk(step), walk(block) ]; }, "for-in": function(vvar, key, hash, block) { return [ this[0], walk(vvar), walk(key), walk(hash), walk(block) ]; }, "while": function(cond, block) { return [ this[0], walk(cond), walk(block) ]; }, "do": function(cond, block) { return [ this[0], walk(cond), walk(block) ]; }, "return": function(expr) { return [ this[0], walk(expr) ]; }, "binary": function(op, left, right) { return [ this[0], op, walk(left), walk(right) ]; }, "unary-prefix": function(op, expr) { return [ this[0], op, walk(expr) ]; }, "unary-postfix": function(op, expr) { return [ this[0], op, walk(expr) ]; }, "sub": function(expr, subscript) { return [ this[0], walk(expr), walk(subscript) ]; }, "object": function(props) { return [ this[0], MAP(props, function(p){ return p.length == 2 ? [ p[0], walk(p[1]) ] : [ p[0], walk(p[1]), p[2] ]; // get/set-ter }) ]; }, "regexp": function(rx, mods) { return [ this[0], rx, mods ]; }, "array": function(elements) { return [ this[0], MAP(elements, walk) ]; }, "stat": function(stat) { return [ this[0], walk(stat) ]; }, "seq": function() { return [ this[0] ].concat(MAP(slice(arguments), walk)); }, "label": function(name, block) { return [ this[0], name, walk(block) ]; }, "with": function(expr, block) { return [ this[0], walk(expr), walk(block) ]; }, "atom": function(name) { return [ this[0], name ]; } }; var user = {}; var stack = []; function walk(ast) { if (ast == null) return null; try { stack.push(ast); var type = ast[0]; var gen = user[type]; if (gen) { var ret = gen.apply(ast, ast.slice(1)); if (ret != null) return ret; } gen = walkers[type]; return gen.apply(ast, ast.slice(1)); } finally { stack.pop(); } }; function with_walkers(walkers, cont){ var save = {}, i; for (i in walkers) if (HOP(walkers, i)) { save[i] = user[i]; user[i] = walkers[i]; } var ret = cont(); for (i in save) if (HOP(save, i)) { if (!save[i]) delete user[i]; else user[i] = save[i]; } return ret; }; return { walk: walk, with_walkers: with_walkers, parent: function() { return stack[stack.length - 2]; // last one is current node }, stack: function() { return stack; } }; }; /* -----[ Scope and mangling ]----- */ function Scope(parent) { this.names = {}; // names defined in this scope this.mangled = {}; // mangled names (orig.name => mangled) this.rev_mangled = {}; // reverse lookup (mangled => orig.name) this.cname = -1; // current mangled name this.refs = {}; // names referenced from this scope this.uses_with = false; // will become TRUE if with() is detected in this or any subscopes this.uses_eval = false; // will become TRUE if eval() is detected in this or any subscopes this.parent = parent; // parent scope this.children = []; // sub-scopes if (parent) { this.level = parent.level + 1; parent.children.push(this); } else { this.level = 0; } }; var base54 = (function(){ var DIGITS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_"; return function(num) { var ret = ""; do { ret = DIGITS.charAt(num % 54) + ret; num = Math.floor(num / 54); } while (num > 0); return ret; }; })(); Scope.prototype = { has: function(name) { for (var s = this; s; s = s.parent) if (HOP(s.names, name)) return s; }, has_mangled: function(mname) { for (var s = this; s; s = s.parent) if (HOP(s.rev_mangled, mname)) return s; }, toJSON: function() { return { names: this.names, uses_eval: this.uses_eval, uses_with: this.uses_with }; }, next_mangled: function() { // we must be careful that the new mangled name: // // 1. doesn't shadow a mangled name from a parent // scope, unless we don't reference the original // name from this scope OR from any sub-scopes! // This will get slow. // // 2. doesn't shadow an original name from a parent // scope, in the event that the name is not mangled // in the parent scope and we reference that name // here OR IN ANY SUBSCOPES! // // 3. doesn't shadow a name that is referenced but not // defined (possibly global defined elsewhere). for (;;) { var m = base54(++this.cname), prior; // case 1. prior = this.has_mangled(m); if (prior && this.refs[prior.rev_mangled[m]] === prior) continue; // case 2. prior = this.has(m); if (prior && prior !== this && this.refs[m] === prior && !prior.has_mangled(m)) continue; // case 3. if (HOP(this.refs, m) && this.refs[m] == null) continue; // I got "do" once. :-/ if (!is_identifier(m)) continue; return m; } }, set_mangle: function(name, m) { this.rev_mangled[m] = name; return this.mangled[name] = m; }, get_mangled: function(name, newMangle) { if (this.uses_eval || this.uses_with) return name; // no mangle if eval or with is in use var s = this.has(name); if (!s) return name; // not in visible scope, no mangle if (HOP(s.mangled, name)) return s.mangled[name]; // already mangled in this scope if (!newMangle) return name; // not found and no mangling requested return s.set_mangle(name, s.next_mangled()); }, define: function(name) { if (name != null) return this.names[name] = name; } }; function ast_add_scope(ast) { var current_scope = null; var w = ast_walker(), walk = w.walk; var having_eval = []; function with_new_scope(cont) { current_scope = new Scope(current_scope); var ret = current_scope.body = cont(); ret.scope = current_scope; current_scope = current_scope.parent; return ret; }; function define(name) { return current_scope.define(name); }; function reference(name) { current_scope.refs[name] = true; }; function _lambda(name, args, body) { var is_defun = this[0] == "defun"; return [ this[0], is_defun ? define(name) : name, args, with_new_scope(function(){ if (!is_defun) define(name); MAP(args, define); return MAP(body, walk); })]; }; return with_new_scope(function(){ // process AST var ret = w.with_walkers({ "function": _lambda, "defun": _lambda, "with": function(expr, block) { for (var s = current_scope; s; s = s.parent) s.uses_with = true; }, "var": function(defs) { MAP(defs, function(d){ define(d[0]) }); }, "const": function(defs) { MAP(defs, function(d){ define(d[0]) }); }, "try": function(t, c, f) { if (c != null) return [ this[0], MAP(t, walk), [ define(c[0]), MAP(c[1], walk) ], f != null ? MAP(f, walk) : null ]; }, "name": function(name) { if (name == "eval") having_eval.push(current_scope); reference(name); } }, function(){ return walk(ast); }); // the reason why we need an additional pass here is // that names can be used prior to their definition. // scopes where eval was detected and their parents // are marked with uses_eval, unless they define the // "eval" name. MAP(having_eval, function(scope){ if (!scope.has("eval")) while (scope) { scope.uses_eval = true; scope = scope.parent; } }); // for referenced names it might be useful to know // their origin scope. current_scope here is the // toplevel one. function fixrefs(scope, i) { // do children first; order shouldn't matter for (i = scope.children.length; --i >= 0;) fixrefs(scope.children[i]); for (i in scope.refs) if (HOP(scope.refs, i)) { // find origin scope and propagate the reference to origin for (var origin = scope.has(i), s = scope; s; s = s.parent) { s.refs[i] = origin; if (s === origin) break; } } }; fixrefs(current_scope); return ret; }); }; /* -----[ mangle names ]----- */ function ast_mangle(ast, options) { var w = ast_walker(), walk = w.walk, scope; options = options || {}; function get_mangled(name, newMangle) { if (!options.toplevel && !scope.parent) return name; // don't mangle toplevel if (options.except && member(name, options.except)) return name; return scope.get_mangled(name, newMangle); }; function get_define(name) { if (options.defines) { // we always lookup a defined symbol for the current scope FIRST, so declared // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value if (!scope.has(name)) { if (HOP(options.defines, name)) { return options.defines[name]; } } return null; } }; function _lambda(name, args, body) { var is_defun = this[0] == "defun", extra; if (name) { if (is_defun) name = get_mangled(name); else { extra = {}; name = extra[name] = scope.next_mangled(); } } body = with_scope(body.scope, function(){ args = MAP(args, function(name){ return get_mangled(name) }); return MAP(body, walk); }, extra); return [ this[0], name, args, body ]; }; function with_scope(s, cont, extra) { var _scope = scope; scope = s; if (extra) for (var i in extra) if (HOP(extra, i)) { s.set_mangle(i, extra[i]); } for (var i in s.names) if (HOP(s.names, i)) { get_mangled(i, true); } var ret = cont(); ret.scope = s; scope = _scope; return ret; }; function _vardefs(defs) { return [ this[0], MAP(defs, function(d){ return [ get_mangled(d[0]), walk(d[1]) ]; }) ]; }; return w.with_walkers({ "function": _lambda, "defun": function() { // move function declarations to the top when // they are not in some block. var ast = _lambda.apply(this, arguments); switch (w.parent()[0]) { case "toplevel": case "function": case "defun": return MAP.at_top(ast); } return ast; }, "var": _vardefs, "const": _vardefs, "name": function(name) { return get_define(name) || [ this[0], get_mangled(name) ]; }, "try": function(t, c, f) { return [ this[0], MAP(t, walk), c != null ? [ get_mangled(c[0]), MAP(c[1], walk) ] : null, f != null ? MAP(f, walk) : null ]; }, "toplevel": function(body) { var self = this; return with_scope(self.scope, function(){ return [ self[0], MAP(body, walk) ]; }); } }, function() { return walk(ast_add_scope(ast)); }); }; /* -----[ - compress foo["bar"] into foo.bar, - remove block brackets {} where possible - join consecutive var declarations - various optimizations for IFs: - if (cond) foo(); else bar(); ==> cond?foo():bar(); - if (cond) foo(); ==> cond&&foo(); - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); // also for throw - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} ]----- */ var warn = function(){}; function best_of(ast1, ast2) { return gen_code(ast1).length > gen_code(ast2[0] == "stat" ? ast2[1] : ast2).length ? ast2 : ast1; }; function last_stat(b) { if (b[0] == "block" && b[1] && b[1].length > 0) return b[1][b[1].length - 1]; return b; } function aborts(t) { if (t) { t = last_stat(t); if (t[0] == "return" || t[0] == "break" || t[0] == "continue" || t[0] == "throw") return true; } }; function boolean_expr(expr) { return ( (expr[0] == "unary-prefix" && member(expr[1], [ "!", "delete" ])) || (expr[0] == "binary" && member(expr[1], [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ])) || (expr[0] == "binary" && member(expr[1], [ "&&", "||" ]) && boolean_expr(expr[2]) && boolean_expr(expr[3])) || (expr[0] == "conditional" && boolean_expr(expr[2]) && boolean_expr(expr[3])) || (expr[0] == "assign" && expr[1] === true && boolean_expr(expr[3])) || (expr[0] == "seq" && boolean_expr(expr[expr.length - 1])) ); }; function make_conditional(c, t, e) { var make_real_conditional = function() { if (c[0] == "unary-prefix" && c[1] == "!") { return e ? [ "conditional", c[2], e, t ] : [ "binary", "||", c[2], t ]; } else { return e ? [ "conditional", c, t, e ] : [ "binary", "&&", c, t ]; } }; // shortcut the conditional if the expression has a constant value return when_constant(c, function(ast, val){ warn_unreachable(val ? e : t); return (val ? t : e); }, make_real_conditional); }; function empty(b) { return !b || (b[0] == "block" && (!b[1] || b[1].length == 0)); }; function is_string(node) { return (node[0] == "string" || node[0] == "unary-prefix" && node[1] == "typeof" || node[0] == "binary" && node[1] == "+" && (is_string(node[2]) || is_string(node[3]))); }; var when_constant = (function(){ var $NOT_CONSTANT = {}; // this can only evaluate constant expressions. If it finds anything // not constant, it throws $NOT_CONSTANT. function evaluate(expr) { switch (expr[0]) { case "string": case "num": return expr[1]; case "name": case "atom": switch (expr[1]) { case "true": return true; case "false": return false; } break; case "unary-prefix": switch (expr[1]) { case "!": return !evaluate(expr[2]); case "typeof": return typeof evaluate(expr[2]); case "~": return ~evaluate(expr[2]); case "-": return -evaluate(expr[2]); case "+": return +evaluate(expr[2]); } break; case "binary": var left = expr[2], right = expr[3]; switch (expr[1]) { case "&&" : return evaluate(left) && evaluate(right); case "||" : return evaluate(left) || evaluate(right); case "|" : return evaluate(left) | evaluate(right); case "&" : return evaluate(left) & evaluate(right); case "^" : return evaluate(left) ^ evaluate(right); case "+" : return evaluate(left) + evaluate(right); case "*" : return evaluate(left) * evaluate(right); case "/" : return evaluate(left) / evaluate(right); case "-" : return evaluate(left) - evaluate(right); case "<<" : return evaluate(left) << evaluate(right); case ">>" : return evaluate(left) >> evaluate(right); case ">>>" : return evaluate(left) >>> evaluate(right); case "==" : return evaluate(left) == evaluate(right); case "===" : return evaluate(left) === evaluate(right); case "!=" : return evaluate(left) != evaluate(right); case "!==" : return evaluate(left) !== evaluate(right); case "<" : return evaluate(left) < evaluate(right); case "<=" : return evaluate(left) <= evaluate(right); case ">" : return evaluate(left) > evaluate(right); case ">=" : return evaluate(left) >= evaluate(right); case "in" : return evaluate(left) in evaluate(right); case "instanceof" : return evaluate(left) instanceof evaluate(right); } } throw $NOT_CONSTANT; }; return function(expr, yes, no) { try { var val = evaluate(expr), ast; switch (typeof val) { case "string": ast = [ "string", val ]; break; case "number": ast = [ "num", val ]; break; case "boolean": ast = [ "name", String(val) ]; break; default: throw new Error("Can't handle constant of type: " + (typeof val)); } return yes.call(expr, ast, val); } catch(ex) { if (ex === $NOT_CONSTANT) { if (expr[0] == "binary" && (expr[1] == "===" || expr[1] == "!==") && ((is_string(expr[2]) && is_string(expr[3])) || (boolean_expr(expr[2]) && boolean_expr(expr[3])))) { expr[1] = expr[1].substr(0, 2); } else if (no && expr[0] == "binary" && (expr[1] == "||" || expr[1] == "&&")) { // the whole expression is not constant but the lval may be... try { var lval = evaluate(expr[2]); expr = ((expr[1] == "&&" && (lval ? expr[3] : lval)) || (expr[1] == "||" && (lval ? lval : expr[3])) || expr); } catch(ex2) { // IGNORE... lval is not constant } } return no ? no.call(expr, expr) : null; } else throw ex; } }; })(); function warn_unreachable(ast) { if (!empty(ast)) warn("Dropping unreachable code: " + gen_code(ast, true)); }; function prepare_ifs(ast) { var w = ast_walker(), walk = w.walk; // In this first pass, we rewrite ifs which abort with no else with an // if-else. For example: // // if (x) { // blah(); // return y; // } // foobar(); // // is rewritten into: // // if (x) { // blah(); // return y; // } else { // foobar(); // } function redo_if(statements) { statements = MAP(statements, walk); for (var i = 0; i < statements.length; ++i) { var fi = statements[i]; if (fi[0] != "if") continue; if (fi[3] && walk(fi[3])) continue; var t = walk(fi[2]); if (!aborts(t)) continue; var conditional = walk(fi[1]); var e_body = statements.slice(i + 1); var e; if (e_body.length == 1) e = e_body[0]; else e = [ "block", e_body ]; var ret = statements.slice(0, i).concat([ [ fi[0], // "if" conditional, // conditional t, // then e // else ] ]); return redo_if(ret); } return statements; }; function redo_if_lambda(name, args, body) { body = redo_if(body); return [ this[0], name, args.slice(), body ]; }; function redo_if_block(statements) { var out = [ this[0] ]; if (statements != null) out.push(redo_if(statements)); return out; }; return w.with_walkers({ "defun": redo_if_lambda, "function": redo_if_lambda, "block": redo_if_block, "splice": redo_if_block, "toplevel": function(statements) { return [ this[0], redo_if(statements) ]; }, "try": function(t, c, f) { return [ this[0], redo_if(t), c != null ? [ c[0], redo_if(c[1]) ] : null, f != null ? redo_if(f) : null ]; }, "with": function(expr, block) { return [ this[0], walk(expr), redo_if(block) ]; } }, function() { return walk(ast); }); }; function ast_squeeze(ast, options) { options = defaults(options, { make_seqs : true, dead_code : true, keep_comps : true, no_warnings : false }); var w = ast_walker(), walk = w.walk, scope; function negate(c) { var not_c = [ "unary-prefix", "!", c ]; switch (c[0]) { case "unary-prefix": return c[1] == "!" && boolean_expr(c[2]) ? c[2] : not_c; case "seq": c = slice(c); c[c.length - 1] = negate(c[c.length - 1]); return c; case "conditional": return best_of(not_c, [ "conditional", c[1], negate(c[2]), negate(c[3]) ]); case "binary": var op = c[1], left = c[2], right = c[3]; if (!options.keep_comps) switch (op) { case "<=" : return [ "binary", ">", left, right ]; case "<" : return [ "binary", ">=", left, right ]; case ">=" : return [ "binary", "<", left, right ]; case ">" : return [ "binary", "<=", left, right ]; } switch (op) { case "==" : return [ "binary", "!=", left, right ]; case "!=" : return [ "binary", "==", left, right ]; case "===" : return [ "binary", "!==", left, right ]; case "!==" : return [ "binary", "===", left, right ]; case "&&" : return best_of(not_c, [ "binary", "||", negate(left), negate(right) ]); case "||" : return best_of(not_c, [ "binary", "&&", negate(left), negate(right) ]); } break; } return not_c; }; function with_scope(s, cont) { var _scope = scope; scope = s; var ret = cont(); ret.scope = s; scope = _scope; return ret; }; function rmblock(block) { if (block != null && block[0] == "block" && block[1]) { if (block[1].length == 1) block = block[1][0]; else if (block[1].length == 0) block = [ "block" ]; } return block; }; function _lambda(name, args, body) { var is_defun = this[0] == "defun"; body = with_scope(body.scope, function(){ var ret = tighten(MAP(body, walk), "lambda"); if (!is_defun && name && !HOP(scope.refs, name)) name = null; return ret; }); return [ this[0], name, args, body ]; }; // we get here for blocks that have been already transformed. // this function does a few things: // 1. discard useless blocks // 2. join consecutive var declarations // 3. remove obviously dead code // 4. transform consecutive statements using the comma operator // 5. if block_type == "lambda" and it detects constructs like if(foo) return ... - rewrite like if (!foo) { ... } function tighten(statements, block_type) { statements = statements.reduce(function(a, stat){ if (stat[0] == "block") { if (stat[1]) { a.push.apply(a, stat[1]); } } else { a.push(stat); } return a; }, []); statements = (function(a, prev){ statements.forEach(function(cur){ if (prev && ((cur[0] == "var" && prev[0] == "var") || (cur[0] == "const" && prev[0] == "const"))) { prev[1] = prev[1].concat(cur[1]); } else { a.push(cur); prev = cur; } }); return a; })([]); if (options.dead_code) statements = (function(a, has_quit){ statements.forEach(function(st){ if (has_quit) { if (member(st[0], [ "function", "defun" , "var", "const" ])) { a.push(st); } else if (!options.no_warnings) warn_unreachable(st); } else { a.push(st); if (member(st[0], [ "return", "throw", "break", "continue" ])) has_quit = true; } }); return a; })([]); if (options.make_seqs) statements = (function(a, prev) { statements.forEach(function(cur){ if (prev && prev[0] == "stat" && cur[0] == "stat") { prev[1] = [ "seq", prev[1], cur[1] ]; } else { a.push(cur); prev = cur; } }); return a; })([]); if (block_type == "lambda") statements = (function(i, a, stat){ while (i < statements.length) { stat = statements[i++]; if (stat[0] == "if" && !stat[3]) { if (stat[2][0] == "return" && stat[2][1] == null) { a.push(make_if(negate(stat[1]), [ "block", statements.slice(i) ])); break; } var last = last_stat(stat[2]); if (last[0] == "return" && last[1] == null) { a.push(make_if(stat[1], [ "block", stat[2][1].slice(0, -1) ], [ "block", statements.slice(i) ])); break; } } a.push(stat); } return a; })(0, []); return statements; }; function make_if(c, t, e) { return when_constant(c, function(ast, val){ if (val) { warn_unreachable(e); return t; } else { warn_unreachable(t); return e; } }, function() { return make_real_if(c, t, e); }); }; function make_real_if(c, t, e) { c = walk(c); t = walk(t); e = walk(e); if (empty(t)) { c = negate(c); t = e; e = null; } else if (empty(e)) { e = null; } else { // if we have both else and then, maybe it makes sense to switch them? (function(){ var a = gen_code(c); var n = negate(c); var b = gen_code(n); if (b.length < a.length) { var tmp = t; t = e; e = tmp; c = n; } })(); } if (empty(e) && empty(t)) return [ "stat", c ]; var ret = [ "if", c, t, e ]; if (t[0] == "if" && empty(t[3]) && empty(e)) { ret = best_of(ret, walk([ "if", [ "binary", "&&", c, t[1] ], t[2] ])); } else if (t[0] == "stat") { if (e) { if (e[0] == "stat") { ret = best_of(ret, [ "stat", make_conditional(c, t[1], e[1]) ]); } } else { ret = best_of(ret, [ "stat", make_conditional(c, t[1]) ]); } } else if (e && t[0] == e[0] && (t[0] == "return" || t[0] == "throw") && t[1] && e[1]) { ret = best_of(ret, [ t[0], make_conditional(c, t[1], e[1] ) ]); } else if (e && aborts(t)) { ret = [ [ "if", c, t ] ]; if (e[0] == "block") { if (e[1]) ret = ret.concat(e[1]); } else { ret.push(e); } ret = walk([ "block", ret ]); } else if (t && aborts(e)) { ret = [ [ "if", negate(c), e ] ]; if (t[0] == "block") { if (t[1]) ret = ret.concat(t[1]); } else { ret.push(t); } ret = walk([ "block", ret ]); } return ret; }; function _do_while(cond, body) { return when_constant(cond, function(cond, val){ if (!val) { warn_unreachable(body); return [ "block" ]; } else { return [ "for", null, null, null, walk(body) ]; } }); }; ast = prepare_ifs(ast); ast = ast_add_scope(ast); return w.with_walkers({ "sub": function(expr, subscript) { if (subscript[0] == "string") { var name = subscript[1]; if (is_identifier(name)) return [ "dot", walk(expr), name ]; else if (/^[1-9][0-9]*$/.test(name) || name === "0") return [ "sub", walk(expr), [ "num", parseInt(name, 10) ] ]; } }, "if": make_if, "toplevel": function(body) { return [ "toplevel", with_scope(this.scope, function(){ return tighten(MAP(body, walk)); }) ]; }, "switch": function(expr, body) { var last = body.length - 1; return [ "switch", walk(expr), MAP(body, function(branch, i){ var block = tighten(MAP(branch[1], walk)); if (i == last && block.length > 0) { var node = block[block.length - 1]; if (node[0] == "break" && !node[1]) block.pop(); } return [ branch[0] ? walk(branch[0]) : null, block ]; }) ]; }, "function": _lambda, "defun": _lambda, "block": function(body) { if (body) return rmblock([ "block", tighten(MAP(body, walk)) ]); }, "binary": function(op, left, right) { return when_constant([ "binary", op, walk(left), walk(right) ], function yes(c){ return best_of(walk(c), this); }, function no() { return this; }); }, "conditional": function(c, t, e) { return make_conditional(walk(c), walk(t), walk(e)); }, "try": function(t, c, f) { return [ "try", tighten(MAP(t, walk)), c != null ? [ c[0], tighten(MAP(c[1], walk)) ] : null, f != null ? tighten(MAP(f, walk)) : null ]; }, "unary-prefix": function(op, expr) { expr = walk(expr); var ret = [ "unary-prefix", op, expr ]; if (op == "!") ret = best_of(ret, negate(expr)); return when_constant(ret, function(ast, val){ return walk(ast); // it's either true or false, so minifies to !0 or !1 }, function() { return ret }); }, "name": function(name) { switch (name) { case "true": return [ "unary-prefix", "!", [ "num", 0 ]]; case "false": return [ "unary-prefix", "!", [ "num", 1 ]]; } }, "new": function(ctor, args) { if (ctor[0] == "name" && ctor[1] == "Array" && !scope.has("Array")) { if (args.length != 1) { return [ "array", args ]; } else { return [ "call", [ "name", "Array" ], args ]; } } }, "call": function(expr, args) { if (expr[0] == "name" && expr[1] == "Array" && args.length != 1 && !scope.has("Array")) { return [ "array", args ]; } }, "while": _do_while }, function() { return walk(ast); }); }; /* -----[ re-generate code from the AST ]----- */ var DOT_CALL_NO_PARENS = jsp.array_to_hash([ "name", "array", "object", "string", "dot", "sub", "call", "regexp" ]); function make_string(str, ascii_only) { var dq = 0, sq = 0; str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029]/g, function(s){ switch (s) { case "\\": return "\\\\"; case "\b": return "\\b"; case "\f": return "\\f"; case "\n": return "\\n"; case "\r": return "\\r"; case "\t": return "\\t"; case "\u2028": return "\\u2028"; case "\u2029": return "\\u2029"; case '"': ++dq; return '"'; case "'": ++sq; return "'"; } return s; }); if (ascii_only) str = to_ascii(str); if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; else return '"' + str.replace(/\x22/g, '\\"') + '"'; }; function to_ascii(str) { return str.replace(/[\u0080-\uffff]/g, function(ch) { var code = ch.charCodeAt(0).toString(16); while (code.length < 4) code = "0" + code; return "\\u" + code; }); }; var SPLICE_NEEDS_BRACKETS = jsp.array_to_hash([ "if", "while", "do", "for", "for-in", "with" ]); function gen_code(ast, options) { options = defaults(options, { indent_start : 0, indent_level : 4, quote_keys : false, space_colon : false, beautify : false, ascii_only : false }); var beautify = !!options.beautify; var indentation = 0, newline = beautify ? "\n" : "", space = beautify ? " " : ""; function encode_string(str) { return make_string(str, options.ascii_only); }; function make_name(name) { name = name.toString(); if (options.ascii_only) name = to_ascii(name); return name; }; function indent(line) { if (line == null) line = ""; if (beautify) line = repeat_string(" ", options.indent_start + indentation * options.indent_level) + line; return line; }; function with_indent(cont, incr) { if (incr == null) incr = 1; indentation += incr; try { return cont.apply(null, slice(arguments, 1)); } finally { indentation -= incr; } }; function add_spaces(a) { if (beautify) return a.join(" "); var b = []; for (var i = 0; i < a.length; ++i) { var next = a[i + 1]; b.push(a[i]); if (next && ((/[a-z0-9_\x24]$/i.test(a[i].toString()) && /^[a-z0-9_\x24]/i.test(next.toString())) || (/[\+\-]$/.test(a[i].toString()) && /^[\+\-]/.test(next.toString())))) { b.push(" "); } } return b.join(""); }; function add_commas(a) { return a.join("," + space); }; function parenthesize(expr) { var gen = make(expr); for (var i = 1; i < arguments.length; ++i) { var el = arguments[i]; if ((el instanceof Function && el(expr)) || expr[0] == el) return "(" + gen + ")"; } return gen; }; function best_of(a) { if (a.length == 1) { return a[0]; } if (a.length == 2) { var b = a[1]; a = a[0]; return a.length <= b.length ? a : b; } return best_of([ a[0], best_of(a.slice(1)) ]); }; function needs_parens(expr) { if (expr[0] == "function" || expr[0] == "object") { // dot/call on a literal function requires the // function literal itself to be parenthesized // only if it's the first "thing" in a // statement. This means that the parent is // "stat", but it could also be a "seq" and // we're the first in this "seq" and the // parent is "stat", and so on. Messy stuff, // but it worths the trouble. var a = slice($stack), self = a.pop(), p = a.pop(); while (p) { if (p[0] == "stat") return true; if (((p[0] == "seq" || p[0] == "call" || p[0] == "dot" || p[0] == "sub" || p[0] == "conditional") && p[1] === self) || ((p[0] == "binary" || p[0] == "assign" || p[0] == "unary-postfix") && p[2] === self)) { self = p; p = a.pop(); } else { return false; } } } return !HOP(DOT_CALL_NO_PARENS, expr[0]); }; function make_num(num) { var str = num.toString(10), a = [ str.replace(/^0\./, ".") ], m; if (Math.floor(num) === num) { a.push("0x" + num.toString(16).toLowerCase(), // probably pointless "0" + num.toString(8)); // same. if ((m = /^(.*?)(0+)$/.exec(num))) { a.push(m[1] + "e" + m[2].length); } } else if ((m = /^0?\.(0+)(.*)$/.exec(num))) { a.push(m[2] + "e-" + (m[1].length + m[2].length), str.substr(str.indexOf("."))); } return best_of(a); }; var generators = { "string": encode_string, "num": make_num, "name": make_name, "toplevel": function(statements) { return make_block_statements(statements) .join(newline + newline); }, "splice": function(statements) { var parent = $stack[$stack.length - 2][0]; if (HOP(SPLICE_NEEDS_BRACKETS, parent)) { // we need block brackets in this case return make_block.apply(this, arguments); } else { return MAP(make_block_statements(statements, true), function(line, i) { // the first line is already indented return i > 0 ? indent(line) : line; }).join(newline); } }, "block": make_block, "var": function(defs) { return "var " + add_commas(MAP(defs, make_1vardef)) + ";"; }, "const": function(defs) { return "const " + add_commas(MAP(defs, make_1vardef)) + ";"; }, "try": function(tr, ca, fi) { var out = [ "try", make_block(tr) ]; if (ca) out.push("catch", "(" + ca[0] + ")", make_block(ca[1])); if (fi) out.push("finally", make_block(fi)); return add_spaces(out); }, "throw": function(expr) { return add_spaces([ "throw", make(expr) ]) + ";"; }, "new": function(ctor, args) { args = args.length > 0 ? "(" + add_commas(MAP(args, make)) + ")" : ""; return add_spaces([ "new", parenthesize(ctor, "seq", "binary", "conditional", "assign", function(expr){ var w = ast_walker(), has_call = {}; try { w.with_walkers({ "call": function() { throw has_call }, "function": function() { return this } }, function(){ w.walk(expr); }); } catch(ex) { if (ex === has_call) return true; throw ex; } }) + args ]); }, "switch": function(expr, body) { return add_spaces([ "switch", "(" + make(expr) + ")", make_switch_block(body) ]); }, "break": function(label) { var out = "break"; if (label != null) out += " " + make_name(label); return out + ";"; }, "continue": function(label) { var out = "continue"; if (label != null) out += " " + make_name(label); return out + ";"; }, "conditional": function(co, th, el) { return add_spaces([ parenthesize(co, "assign", "seq", "conditional"), "?", parenthesize(th, "seq"), ":", parenthesize(el, "seq") ]); }, "assign": function(op, lvalue, rvalue) { if (op && op !== true) op += "="; else op = "="; return add_spaces([ make(lvalue), op, parenthesize(rvalue, "seq") ]); }, "dot": function(expr) { var out = make(expr), i = 1; if (expr[0] == "num") { if (!/\./.test(expr[1])) out += "."; } else if (needs_parens(expr)) out = "(" + out + ")"; while (i < arguments.length) out += "." + make_name(arguments[i++]); return out; }, "call": function(func, args) { var f = make(func); if (needs_parens(func)) f = "(" + f + ")"; return f + "(" + add_commas(MAP(args, function(expr){ return parenthesize(expr, "seq"); })) + ")"; }, "function": make_function, "defun": make_function, "if": function(co, th, el) { var out = [ "if", "(" + make(co) + ")", el ? make_then(th) : make(th) ]; if (el) { out.push("else", make(el)); } return add_spaces(out); }, "for": function(init, cond, step, block) { var out = [ "for" ]; init = (init != null ? make(init) : "").replace(/;*\s*$/, ";" + space); cond = (cond != null ? make(cond) : "").replace(/;*\s*$/, ";" + space); step = (step != null ? make(step) : "").replace(/;*\s*$/, ""); var args = init + cond + step; if (args == "; ; ") args = ";;"; out.push("(" + args + ")", make(block)); return add_spaces(out); }, "for-in": function(vvar, key, hash, block) { return add_spaces([ "for", "(" + (vvar ? make(vvar).replace(/;+$/, "") : make(key)), "in", make(hash) + ")", make(block) ]); }, "while": function(condition, block) { return add_spaces([ "while", "(" + make(condition) + ")", make(block) ]); }, "do": function(condition, block) { return add_spaces([ "do", make(block), "while", "(" + make(condition) + ")" ]) + ";"; }, "return": function(expr) { var out = [ "return" ]; if (expr != null) out.push(make(expr)); return add_spaces(out) + ";"; }, "binary": function(operator, lvalue, rvalue) { var left = make(lvalue), right = make(rvalue); // XXX: I'm pretty sure other cases will bite here. // we need to be smarter. // adding parens all the time is the safest bet. if (member(lvalue[0], [ "assign", "conditional", "seq" ]) || lvalue[0] == "binary" && PRECEDENCE[operator] > PRECEDENCE[lvalue[1]]) { left = "(" + left + ")"; } if (member(rvalue[0], [ "assign", "conditional", "seq" ]) || rvalue[0] == "binary" && PRECEDENCE[operator] >= PRECEDENCE[rvalue[1]] && !(rvalue[1] == operator && member(operator, [ "&&", "||", "*" ]))) { right = "(" + right + ")"; } return add_spaces([ left, operator, right ]); }, "unary-prefix": function(operator, expr) { var val = make(expr); if (!(expr[0] == "num" || (expr[0] == "unary-prefix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr))) val = "(" + val + ")"; return operator + (jsp.is_alphanumeric_char(operator.charAt(0)) ? " " : "") + val; }, "unary-postfix": function(operator, expr) { var val = make(expr); if (!(expr[0] == "num" || (expr[0] == "unary-postfix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr))) val = "(" + val + ")"; return val + operator; }, "sub": function(expr, subscript) { var hash = make(expr); if (needs_parens(expr)) hash = "(" + hash + ")"; return hash + "[" + make(subscript) + "]"; }, "object": function(props) { if (props.length == 0) return "{}"; return "{" + newline + with_indent(function(){ return MAP(props, function(p){ if (p.length == 3) { // getter/setter. The name is in p[0], the arg.list in p[1][2], the // body in p[1][3] and type ("get" / "set") in p[2]. return indent(make_function(p[0], p[1][2], p[1][3], p[2])); } var key = p[0], val = make(p[1]); if (options.quote_keys) { key = encode_string(key); } else if ((typeof key == "number" || !beautify && +key + "" == key) && parseFloat(key) >= 0) { key = make_num(+key); } else if (!is_identifier(key)) { key = encode_string(key); } return indent(add_spaces(beautify && options.space_colon ? [ key, ":", val ] : [ key + ":", val ])); }).join("," + newline); }) + newline + indent("}"); }, "regexp": function(rx, mods) { return "/" + rx + "/" + mods; }, "array": function(elements) { if (elements.length == 0) return "[]"; return add_spaces([ "[", add_commas(MAP(elements, function(el){ if (!beautify && el[0] == "atom" && el[1] == "undefined") return ""; return parenthesize(el, "seq"); })), "]" ]); }, "stat": function(stmt) { return make(stmt).replace(/;*\s*$/, ";"); }, "seq": function() { return add_commas(MAP(slice(arguments), make)); }, "label": function(name, block) { return add_spaces([ make_name(name), ":", make(block) ]); }, "with": function(expr, block) { return add_spaces([ "with", "(" + make(expr) + ")", make(block) ]); }, "atom": function(name) { return make_name(name); } }; // The squeezer replaces "block"-s that contain only a single // statement with the statement itself; technically, the AST // is correct, but this can create problems when we output an // IF having an ELSE clause where the THEN clause ends in an // IF *without* an ELSE block (then the outer ELSE would refer // to the inner IF). This function checks for this case and // adds the block brackets if needed. function make_then(th) { if (th[0] == "do") { // https://github.com/mishoo/UglifyJS/issues/#issue/57 // IE croaks with "syntax error" on code like this: // if (foo) do ... while(cond); else ... // we need block brackets around do/while return make([ "block", [ th ]]); } var b = th; while (true) { var type = b[0]; if (type == "if") { if (!b[3]) // no else, we must add the block return make([ "block", [ th ]]); b = b[3]; } else if (type == "while" || type == "do") b = b[2]; else if (type == "for" || type == "for-in") b = b[4]; else break; } return make(th); }; function make_function(name, args, body, keyword) { var out = keyword || "function"; if (name) { out += " " + make_name(name); } out += "(" + add_commas(MAP(args, make_name)) + ")"; return add_spaces([ out, make_block(body) ]); }; function make_block_statements(statements, noindent) { for (var a = [], last = statements.length - 1, i = 0; i <= last; ++i) { var stat = statements[i]; var code = make(stat); if (code != ";") { if (!beautify && i == last) { if ((stat[0] == "while" && empty(stat[2])) || (member(stat[0], [ "for", "for-in"] ) && empty(stat[4])) || (stat[0] == "if" && empty(stat[2]) && !stat[3]) || (stat[0] == "if" && stat[3] && empty(stat[3]))) { code = code.replace(/;*\s*$/, ";"); } else { code = code.replace(/;+\s*$/, ""); } } a.push(code); } } return noindent ? a : MAP(a, indent); }; function make_switch_block(body) { var n = body.length; if (n == 0) return "{}"; return "{" + newline + MAP(body, function(branch, i){ var has_body = branch[1].length > 0, code = with_indent(function(){ return indent(branch[0] ? add_spaces([ "case", make(branch[0]) + ":" ]) : "default:"); }, 0.5) + (has_body ? newline + with_indent(function(){ return make_block_statements(branch[1]).join(newline); }) : ""); if (!beautify && has_body && i < n - 1) code += ";"; return code; }).join(newline) + newline + indent("}"); }; function make_block(statements) { if (!statements) return ";"; if (statements.length == 0) return "{}"; return "{" + newline + with_indent(function(){ return make_block_statements(statements).join(newline); }) + newline + indent("}"); }; function make_1vardef(def) { var name = def[0], val = def[1]; if (val != null) name = add_spaces([ make_name(name), "=", parenthesize(val, "seq") ]); return name; }; var $stack = []; function make(node) { var type = node[0]; var gen = generators[type]; if (!gen) throw new Error("Can't find generator for \"" + type + "\""); $stack.push(node); var ret = gen.apply(type, node.slice(1)); $stack.pop(); return ret; }; return make(ast); }; function split_lines(code, max_line_length) { var splits = [ 0 ]; jsp.parse(function(){ var next_token = jsp.tokenizer(code); var last_split = 0; var prev_token; function current_length(tok) { return tok.pos - last_split; }; function split_here(tok) { last_split = tok.pos; splits.push(last_split); }; function custom(){ var tok = next_token.apply(this, arguments); out: { if (prev_token) { if (prev_token.type == "keyword") break out; } if (current_length(tok) > max_line_length) { switch (tok.type) { case "keyword": case "atom": case "name": case "punc": split_here(tok); break out; } } } prev_token = tok; return tok; }; custom.context = function() { return next_token.context.apply(this, arguments); }; return custom; }()); return splits.map(function(pos, i){ return code.substring(pos, splits[i + 1] || code.length); }).join("\n"); }; /* -----[ Utilities ]----- */ function repeat_string(str, i) { if (i <= 0) return ""; if (i == 1) return str; var d = repeat_string(str, i >> 1); d += d; if (i & 1) d += str; return d; }; function defaults(args, defs) { var ret = {}; if (args === true) args = {}; for (var i in defs) if (HOP(defs, i)) { ret[i] = (args && HOP(args, i)) ? args[i] : defs[i]; } return ret; }; function is_identifier(name) { return /^[a-z_$][a-z0-9_$]*$/i.test(name) && name != "this" && !HOP(jsp.KEYWORDS_ATOM, name) && !HOP(jsp.RESERVED_WORDS, name) && !HOP(jsp.KEYWORDS, name); }; function HOP(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }; // some utilities var MAP; (function(){ MAP = function(a, f, o) { var ret = []; for (var i = 0; i < a.length; ++i) { var val = f.call(o, a[i], i); if (val instanceof AtTop) ret.unshift(val.v); else ret.push(val); } return ret; }; MAP.at_top = function(val) { return new AtTop(val) }; function AtTop(val) { this.v = val }; })(); /* -----[ Exports ]----- */ exports.ast_walker = ast_walker; exports.ast_mangle = ast_mangle; exports.ast_squeeze = ast_squeeze; exports.gen_code = gen_code; exports.ast_add_scope = ast_add_scope; exports.set_logger = function(logger) { warn = logger }; exports.make_string = make_string; exports.split_lines = split_lines; exports.MAP = MAP; // keep this last! exports.ast_squeeze_more = require("./squeeze-more").ast_squeeze_more; ; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/uglify-js/lib/process.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/uglify-js/lib/squeeze-more.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/uglify-js/lib"; var __filename = "/node_modules/burrito/node_modules/uglify-js/lib/squeeze-more.js"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/uglify-js/lib"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/uglify-js/lib"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/uglify-js/lib/squeeze-more.js"]._cached = module.exports; (function () { var jsp = require("./parse-js"), pro = require("./process"), slice = jsp.slice, member = jsp.member, PRECEDENCE = jsp.PRECEDENCE, OPERATORS = jsp.OPERATORS; function ast_squeeze_more(ast) { var w = pro.ast_walker(), walk = w.walk; return w.with_walkers({ "call": function(expr, args) { if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) { // foo.toString() ==> foo+"" return [ "binary", "+", expr[1], [ "string", "" ]]; } } }, function() { return walk(ast); }); }; exports.ast_squeeze_more = ast_squeeze_more; ; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/uglify-js/lib/squeeze-more.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/traverse/package.json"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/traverse"; var __filename = "/node_modules/burrito/node_modules/traverse/package.json"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/traverse"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/traverse"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/traverse/package.json"]._cached = module.exports; (function () { module.exports = {"name":"traverse","version":"0.5.0","description":"Traverse and transform objects by visiting every node on a recursive walk","author":"James Halliday","license":"MIT/X11","main":"./index","repository":{"type":"git","url":"http://github.com/substack/js-traverse.git"},"devDependencies":{"expresso":"0.7.x"},"scripts":{"test":"expresso"}}; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/traverse/package.json"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/node_modules/traverse/index.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito/node_modules/traverse"; var __filename = "/node_modules/burrito/node_modules/traverse/index.js"; var require = function (file) { return __require(file, "/node_modules/burrito/node_modules/traverse"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito/node_modules/traverse"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/node_modules/traverse/index.js"]._cached = module.exports; (function () { module.exports = Traverse; function Traverse (obj) { if (!(this instanceof Traverse)) return new Traverse(obj); this.value = obj; } Traverse.prototype.get = function (ps) { var node = this.value; for (var i = 0; i < ps.length; i ++) { var key = ps[i]; if (!Object.hasOwnProperty.call(node, key)) { node = undefined; break; } node = node[key]; } return node; }; Traverse.prototype.set = function (ps, value) { var node = this.value; for (var i = 0; i < ps.length - 1; i ++) { var key = ps[i]; if (!Object.hasOwnProperty.call(node, key)) node[key] = {}; node = node[key]; } node[ps[i]] = value; return value; }; Traverse.prototype.map = function (cb) { return walk(this.value, cb, true); }; Traverse.prototype.forEach = function (cb) { this.value = walk(this.value, cb, false); return this.value; }; Traverse.prototype.reduce = function (cb, init) { var skip = arguments.length === 1; var acc = skip ? this.value : init; this.forEach(function (x) { if (!this.isRoot || !skip) { acc = cb.call(this, acc, x); } }); return acc; }; Traverse.prototype.paths = function () { var acc = []; this.forEach(function (x) { acc.push(this.path); }); return acc; }; Traverse.prototype.nodes = function () { var acc = []; this.forEach(function (x) { acc.push(this.node); }); return acc; }; Traverse.prototype.clone = function () { var parents = [], nodes = []; return (function clone (src) { for (var i = 0; i < parents.length; i++) { if (parents[i] === src) { return nodes[i]; } } if (typeof src === 'object' && src !== null) { var dst = copy(src); parents.push(src); nodes.push(dst); forEach(Object_keys(src), function (key) { dst[key] = clone(src[key]); }); parents.pop(); nodes.pop(); return dst; } else { return src; } })(this.value); }; function walk (root, cb, immutable) { var path = []; var parents = []; var alive = true; return (function walker (node_) { var node = immutable ? copy(node_) : node_; var modifiers = {}; var keepGoing = true; var state = { node : node, node_ : node_, path : [].concat(path), parent : parents[parents.length - 1], parents : parents, key : path.slice(-1)[0], isRoot : path.length === 0, level : path.length, circular : null, update : function (x, stopHere) { if (!state.isRoot) { state.parent.node[state.key] = x; } state.node = x; if (stopHere) keepGoing = false; }, 'delete' : function () { delete state.parent.node[state.key]; }, remove : function () { if (Array_isArray(state.parent.node)) { state.parent.node.splice(state.key, 1); } else { delete state.parent.node[state.key]; } }, keys : null, before : function (f) { modifiers.before = f }, after : function (f) { modifiers.after = f }, pre : function (f) { modifiers.pre = f }, post : function (f) { modifiers.post = f }, stop : function () { alive = false }, block : function () { keepGoing = false } }; if (!alive) return state; if (typeof node === 'object' && node !== null) { state.keys = Object_keys(node); state.isLeaf = state.keys.length == 0; for (var i = 0; i < parents.length; i++) { if (parents[i].node_ === node_) { state.circular = parents[i]; break; } } } else { state.isLeaf = true; } state.notLeaf = !state.isLeaf; state.notRoot = !state.isRoot; // use return values to update if defined var ret = cb.call(state, state.node); if (ret !== undefined && state.update) state.update(ret); if (modifiers.before) modifiers.before.call(state, state.node); if (!keepGoing) return state; if (typeof state.node == 'object' && state.node !== null && !state.circular) { parents.push(state); forEach(state.keys, function (key, i) { path.push(key); if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); var child = walker(state.node[key]); if (immutable && Object.hasOwnProperty.call(state.node, key)) { state.node[key] = child.node; } child.isLast = i == state.keys.length - 1; child.isFirst = i == 0; if (modifiers.post) modifiers.post.call(state, child); path.pop(); }); parents.pop(); } if (modifiers.after) modifiers.after.call(state, state.node); return state; })(root).node; } function copy (src) { if (typeof src === 'object' && src !== null) { var dst; if (Array_isArray(src)) { dst = []; } else if (src instanceof Date) { dst = new Date(src); } else if (src instanceof Boolean) { dst = new Boolean(src); } else if (src instanceof Number) { dst = new Number(src); } else if (src instanceof String) { dst = new String(src); } else if (Object.create && Object.getPrototypeOf) { dst = Object.create(Object.getPrototypeOf(src)); } else if (src.__proto__ || src.constructor.prototype) { var proto = src.__proto__ || src.constructor.prototype || {}; var T = function () {}; T.prototype = proto; dst = new T; if (!dst.__proto__) dst.__proto__ = proto; } forEach(Object_keys(src), function (key) { dst[key] = src[key]; }); return dst; } else return src; } var Object_keys = Object.keys || function keys (obj) { var res = []; for (var key in obj) res.push(key) return res; }; var Array_isArray = Array.isArray || function isArray (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; var forEach = function (xs, fn) { if (xs.forEach) return xs.forEach(fn) else for (var i = 0; i < xs.length; i++) { fn(xs[i], i, xs); } }; forEach(Object_keys(Traverse.prototype), function (key) { Traverse[key] = function (obj) { var args = [].slice.call(arguments, 1); var t = Traverse(obj); return t[key].apply(t, args); }; }); ; }).call(module.exports); __require.modules["/node_modules/burrito/node_modules/traverse/index.js"]._cached = module.exports; return module.exports; }; require.modules["vm"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "."; var __filename = "vm"; var require = function (file) { return __require(file, "."); }; require.resolve = function (file) { return __require.resolve(name, "."); }; require.modules = __require.modules; __require.modules["vm"]._cached = module.exports; (function () { var Object_keys = function (obj) { if (Object.keys) return Object.keys(obj) else { var res = []; for (var key in obj) res.push(key) return res; } }; var forEach = function (xs, fn) { if (xs.forEach) return xs.forEach(fn) else for (var i = 0; i < xs.length; i++) { fn(xs[i], i, xs); } }; var Script = exports.Script = function NodeScript (code) { if (!(this instanceof Script)) return new Script(code); this.code = code; }; var iframe = document.createElement('iframe'); if (!iframe.style) iframe.style = {}; iframe.style.display = 'none'; var iframeCapable = true; // until proven otherwise if (navigator.appName === 'Microsoft Internet Explorer') { var m = navigator.appVersion.match(/\bMSIE (\d+\.\d+);/); if (m && parseFloat(m[1]) <= 9.0) { iframeCapable = false; } } Script.prototype.runInNewContext = function (context) { if (!context) context = {}; if (!iframeCapable) { var keys = Object_keys(context); var args = []; for (var i = 0; i < keys.length; i++) { args.push(context[keys[i]]); } var fn = Function(keys, this.code); return fn.apply(null, args); } document.body.appendChild(iframe); var win = iframe.contentWindow || (window.frames && window.frames[window.frames.length - 1]) || window[window.length - 1] ; forEach(Object_keys(context), function (key) { win[key] = context[key]; iframe[key] = context[key]; }); if (win.eval) { // chrome and ff can just .eval() var res = win.eval(this.code); } else { // this works in IE9 but not anything newer iframe.setAttribute('src', 'javascript:__browserifyVmResult=(' + this.code + ')' ); if ('__browserifyVmResult' in win) { var res = win.__browserifyVmResult; } else { iframeCapable = false; res = this.runInThisContext(context); } } forEach(Object_keys(win), function (key) { context[key] = win[key]; }); document.body.removeChild(iframe); return res; }; Script.prototype.runInThisContext = function () { return eval(this.code); // maybe... }; Script.prototype.runInContext = function (context) { // seems to be just runInNewContext on magical context objects which are // otherwise indistinguishable from objects except plain old objects // for the parameter segfaults node return this.runInNewContext(context); }; forEach(Object_keys(Script.prototype), function (name) { exports[name] = Script[name] = function (code) { var s = Script(code); return s[name].apply(s, [].slice.call(arguments, 1)); }; }); exports.createScript = function (code) { return exports.Script(code); }; exports.createContext = Script.createContext = function (context) { // not really sure what this one does // seems to just make a shallow copy var copy = {}; forEach(Object_keys(context), function (key) { copy[key] = context[key]; }); return copy; }; ; }).call(module.exports); __require.modules["vm"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/jsonify/package.json"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/jsonify"; var __filename = "/node_modules/jsonify/package.json"; var require = function (file) { return __require(file, "/node_modules/jsonify"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/jsonify"); }; require.modules = __require.modules; __require.modules["/node_modules/jsonify/package.json"]._cached = module.exports; (function () { module.exports = {"name":"jsonify","version":"0.0.0","description":"JSON without touching any globals","main":"index.js","directories":{"lib":".","test":"test"},"devDependencies":{"tap":"0.0.x","garbage":"0.0.x"},"scripts":{"test":"tap test"},"repository":{"type":"git","url":"http://github.com/substack/jsonify.git"},"keywords":["json","browser"],"author":{"name":"Douglas Crockford","url":"http://crockford.com/"},"license":"Public Domain"}; }).call(module.exports); __require.modules["/node_modules/jsonify/package.json"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/jsonify/index.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/jsonify"; var __filename = "/node_modules/jsonify/index.js"; var require = function (file) { return __require(file, "/node_modules/jsonify"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/jsonify"); }; require.modules = __require.modules; __require.modules["/node_modules/jsonify/index.js"]._cached = module.exports; (function () { exports.parse = require('./lib/parse'); exports.stringify = require('./lib/stringify'); ; }).call(module.exports); __require.modules["/node_modules/jsonify/index.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/jsonify/lib/parse.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/jsonify/lib"; var __filename = "/node_modules/jsonify/lib/parse.js"; var require = function (file) { return __require(file, "/node_modules/jsonify/lib"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/jsonify/lib"); }; require.modules = __require.modules; __require.modules["/node_modules/jsonify/lib/parse.js"]._cached = module.exports; (function () { var at, // The index of the current character ch, // The current character escapee = { '"': '"', '\\': '\\', '/': '/', b: '\b', f: '\f', n: '\n', r: '\r', t: '\t' }, text, error = function (m) { // Call error when something is wrong. throw { name: 'SyntaxError', message: m, at: at, text: text }; }, next = function (c) { // If a c parameter is provided, verify that it matches the current character. if (c && c !== ch) { error("Expected '" + c + "' instead of '" + ch + "'"); } // Get the next character. When there are no more characters, // return the empty string. ch = text.charAt(at); at += 1; return ch; }, number = function () { // Parse a number value. var number, string = ''; if (ch === '-') { string = '-'; next('-'); } while (ch >= '0' && ch <= '9') { string += ch; next(); } if (ch === '.') { string += '.'; while (next() && ch >= '0' && ch <= '9') { string += ch; } } if (ch === 'e' || ch === 'E') { string += ch; next(); if (ch === '-' || ch === '+') { string += ch; next(); } while (ch >= '0' && ch <= '9') { string += ch; next(); } } number = +string; if (!isFinite(number)) { error("Bad number"); } else { return number; } }, string = function () { // Parse a string value. var hex, i, string = '', uffff; // When parsing for string values, we must look for " and \ characters. if (ch === '"') { while (next()) { if (ch === '"') { next(); return string; } else if (ch === '\\') { next(); if (ch === 'u') { uffff = 0; for (i = 0; i < 4; i += 1) { hex = parseInt(next(), 16); if (!isFinite(hex)) { break; } uffff = uffff * 16 + hex; } string += String.fromCharCode(uffff); } else if (typeof escapee[ch] === 'string') { string += escapee[ch]; } else { break; } } else { string += ch; } } } error("Bad string"); }, white = function () { // Skip whitespace. while (ch && ch <= ' ') { next(); } }, word = function () { // true, false, or null. switch (ch) { case 't': next('t'); next('r'); next('u'); next('e'); return true; case 'f': next('f'); next('a'); next('l'); next('s'); next('e'); return false; case 'n': next('n'); next('u'); next('l'); next('l'); return null; } error("Unexpected '" + ch + "'"); }, value, // Place holder for the value function. array = function () { // Parse an array value. var array = []; if (ch === '[') { next('['); white(); if (ch === ']') { next(']'); return array; // empty array } while (ch) { array.push(value()); white(); if (ch === ']') { next(']'); return array; } next(','); white(); } } error("Bad array"); }, object = function () { // Parse an object value. var key, object = {}; if (ch === '{') { next('{'); white(); if (ch === '}') { next('}'); return object; // empty object } while (ch) { key = string(); white(); next(':'); if (Object.hasOwnProperty.call(object, key)) { error('Duplicate key "' + key + '"'); } object[key] = value(); white(); if (ch === '}') { next('}'); return object; } next(','); white(); } } error("Bad object"); }; value = function () { // Parse a JSON value. It could be an object, an array, a string, a number, // or a word. white(); switch (ch) { case '{': return object(); case '[': return array(); case '"': return string(); case '-': return number(); default: return ch >= '0' && ch <= '9' ? number() : word(); } }; // Return the json_parse function. It will have access to all of the above // functions and variables. module.exports = function (source, reviver) { var result; text = source; at = 0; ch = ' '; result = value(); white(); if (ch) { error("Syntax error"); } // If there is a reviver function, we recursively walk the new structure, // passing each name/value pair to the reviver function for possible // transformation, starting with a temporary root object that holds the result // in an empty key. If there is not a reviver function, we simply return the // result. return typeof reviver === 'function' ? (function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === 'object') { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v; } else { delete value[k]; } } } } return reviver.call(holder, key, value); }({'': result}, '')) : result; }; ; }).call(module.exports); __require.modules["/node_modules/jsonify/lib/parse.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/jsonify/lib/stringify.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/jsonify/lib"; var __filename = "/node_modules/jsonify/lib/stringify.js"; var require = function (file) { return __require(file, "/node_modules/jsonify/lib"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/jsonify/lib"); }; require.modules = __require.modules; __require.modules["/node_modules/jsonify/lib/stringify.js"]._cached = module.exports; (function () { var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { // table of character substitutions '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }, rep; function quote(string) { // If the string contains no control characters, no quote characters, and no // backslash characters, then we can safely slap some quotes around it. // Otherwise we must also replace the offending characters with safe escape // sequences. escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + string + '"'; } function str(key, holder) { // Produce a string from holder[key]. var i, // The loop counter. k, // The member key. v, // The member value. length, mind = gap, partial, value = holder[key]; // If the value has a toJSON method, call it to obtain a replacement value. if (value && typeof value === 'object' && typeof value.toJSON === 'function') { value = value.toJSON(key); } // If we were called with a replacer function, then call the replacer to // obtain a replacement value. if (typeof rep === 'function') { value = rep.call(holder, key, value); } // What happens next depends on the value's type. switch (typeof value) { case 'string': return quote(value); case 'number': // JSON numbers must be finite. Encode non-finite numbers as null. return isFinite(value) ? String(value) : 'null'; case 'boolean': case 'null': // If the value is a boolean or null, convert it to a string. Note: // typeof null does not produce 'null'. The case is included here in // the remote chance that this gets fixed someday. return String(value); case 'object': if (!value) return 'null'; gap += indent; partial = []; // Array.isArray if (Object.prototype.toString.apply(value) === '[object Array]') { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || 'null'; } // Join all of the elements together, separated with commas, and // wrap them in brackets. v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; gap = mind; return v; } // If the replacer is an array, use it to select the members to be // stringified. if (rep && typeof rep === 'object') { length = rep.length; for (i = 0; i < length; i += 1) { k = rep[i]; if (typeof k === 'string') { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } } else { // Otherwise, iterate through all of the keys in the object. for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } } // Join all of the member texts together, separated with commas, // and wrap them in braces. v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}'; gap = mind; return v; } } module.exports = function (value, replacer, space) { var i; gap = ''; indent = ''; // If the space parameter is a number, make an indent string containing that // many spaces. if (typeof space === 'number') { for (i = 0; i < space; i += 1) { indent += ' '; } } // If the space parameter is a string, it will be used as the indent string. else if (typeof space === 'string') { indent = space; } // If there is a replacer, it must be a function or an array. // Otherwise, throw an error. rep = replacer; if (replacer && typeof replacer !== 'function' && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { throw new Error('JSON.stringify'); } // Make a fake root object containing our value under the key of ''. // Return the result of stringifying the value. return str('', {'': value}); }; ; }).call(module.exports); __require.modules["/node_modules/jsonify/lib/stringify.js"]._cached = module.exports; return module.exports; }; require.modules["/node_modules/burrito/index.js"] = function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/node_modules/burrito"; var __filename = "/node_modules/burrito/index.js"; var require = function (file) { return __require(file, "/node_modules/burrito"); }; require.resolve = function (file) { return __require.resolve(name, "/node_modules/burrito"); }; require.modules = __require.modules; __require.modules["/node_modules/burrito/index.js"]._cached = module.exports; (function () { var uglify = require('uglify-js'); var parser = uglify.parser; var parse = function (expr) { if (typeof expr !== 'string') throw 'expression should be a string'; //try { var args = [].slice.call(arguments); var ast = parser.parse.apply(null, args); /* } catch (err) { if (err.message === undefined || err.line === undefined || err.col === undefined || err.pos === undefined ) { throw err } var e = new SyntaxError( err.message + '\n at line ' + err.line + ':' + err.col + ' in expression:\n\n' + ' ' + expr.split(/\r?\n/)[err.line] ); e.original = err; e.line = err.line; e.col = err.col; e.pos = err.pos; throw e; } */ return ast; }; var deparse = function (ast, b) { return uglify.uglify.gen_code(ast, { beautify : b }); }; var traverse = require('traverse'); var vm = require('vm'); var burrito = module.exports = function (code, cb) { var ast = Array_isArray(code) ? code // already an ast : parse(code.toString(), false, true) ; var ast_ = traverse(ast).map(function mapper () { wrapNode(this, cb); }); return deparse(parse(deparse(ast_)), true); }; var wrapNode = burrito.wrapNode = function (state, cb) { var node = state.node; var ann = Array_isArray(node) && node[0] && typeof node[0] === 'object' && node[0].name ? node[0] : null ; if (!ann) return undefined; var self = { name : ann.name, node : node, start : node[0].start, end : node[0].end, value : node.slice(1), state : state }; self.wrap = function (s) { var subsrc = deparse( traverse(node).map(function (x) { if (!this.isRoot) wrapNode(this, cb) }) ); if (self.name === 'binary') { var a = deparse(traverse(node[2]).map(function (x) { if (!this.isRoot) wrapNode(this, cb) })); var b = deparse(traverse(node[3]).map(function (x) { if (!this.isRoot) wrapNode(this, cb) })); } var src = ''; if (typeof s === 'function') { if (self.name === 'binary') { src = s(subsrc, a, b); } else { src = s(subsrc); } } else { src = s.toString() .replace(/%s/g, function () { return subsrc }) ; if (self.name === 'binary') { src = src .replace(/%a/g, function () { return a }) .replace(/%b/g, function () { return b }) ; } } var expr = parse(src); state.update(expr, true); }; var cache = {}; self.parent = state.isRoot ? null : function () { if (!cache.parent) { var s = state; var x; do { s = s.parent; if (s) x = wrapNode(s); } while (s && !x); cache.parent = x; } return cache.parent; }; self.source = function () { if (!cache.source) cache.source = deparse(node); return cache.source; }; self.label = function () { return burrito.label(self); }; if (cb) cb.call(state, self); if (self.node[0].name === 'conditional') { self.wrap('[%s][0]'); } return self; } burrito.microwave = function (code, context, cb) { if (!cb) { cb = context; context = {} }; if (!context) context = {}; var src = burrito(code, cb); return vm.runInNewContext(src, context); }; burrito.generateName = function (len) { var name = ''; var lower = '$'.charCodeAt(0); var upper = 'z'.charCodeAt(0); while (name.length < len) { var c = String.fromCharCode(Math.floor( Math.random() * (upper - lower + 1) + lower )); if ((name + c).match(/^[A-Za-z_$][A-Za-z0-9_$]*$/)) name += c; } return name; }; burrito.parse = parse; burrito.deparse = deparse; burrito.label = function (node) { if (node.name === 'call') { if (typeof node.value[0] === 'string') { return node.value[0]; } else if (node.value[0] && typeof node.value[0][1] === 'string') { return node.value[0][1]; } else { return null; } } else if (node.name === 'var') { return node.value[0].map(function (x) { return x[0] }); } else if (node.name === 'defun') { return node.value[0]; } else if (node.name === 'function') { return node.value[0]; } else { return null; } }; var Array_isArray = Array.isArray || function isArray (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; ; }).call(module.exports); __require.modules["/node_modules/burrito/index.js"]._cached = module.exports; return module.exports; }; process.nextTick(function () { var module = { exports : {} }; var exports = module.exports; var __dirname = "/"; var __filename = "//home/substack/projects/node-burrito/example/web"; var require = function (file) { return __require(file, "/"); }; require.modules = __require.modules; var burrito = require('burrito'); var json = require('jsonify'); var src = [ 'function f () { g() }', 'function g () { h() }', 'function h () { throw "moo" + Array(x).join("!") }', 'var x = 4', 'f()' ].join('\r\n'); window.onload = function () { burrito(src, function (node) { document.body.innerHTML += node.name + '
\n'; }); }; if (document.readyState === 'complete') window.onload(); ; }); index.html000066400000000000000000000003551240302775300361150ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/example/web



main.js000066400000000000000000000006541240302775300354040ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/example/webvar burrito = require('burrito');
var json = require('jsonify');

var src = [
    'function f () { g() }',
    'function g () { h() }',
    'function h () { throw "moo" + Array(x).join("!") }',
    'var x = 4',
    'f()'
].join('\r\n');

window.onload = function () {
    burrito(src, function (node) {
        document.body.innerHTML += node.name + '
\n'; }); }; if (document.readyState === 'complete') window.onload(); server.js000066400000000000000000000004271240302775300357640ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/example/webvar express = require('express'); var browserify = require('browserify'); var app = express.createServer(); app.use(express.static(__dirname)); app.use(browserify({ entry : __dirname + '/main.js', watch : true, })); app.listen(8081); console.log('Listening on :8081'); wrap.js000066400000000000000000000002521240302775300346460ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/examplevar burrito = require('burrito'); var src = burrito('f() && g(h())\nfoo()', function (node) { if (node.name === 'call') node.wrap('qqq(%s)'); }); console.log(src); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/index.js000066400000000000000000000121671240302775300334400ustar00rootroot00000000000000var uglify = require('uglify-js'); var parser = uglify.parser; var parse = function (expr) { if (typeof expr !== 'string') throw 'expression should be a string'; try { var ast = parser.parse.apply(null, arguments); } catch (err) { if (err.message === undefined || err.line === undefined || err.col === undefined || err.pos === undefined ) { throw err } var e = new SyntaxError( err.message + '\n at line ' + err.line + ':' + err.col + ' in expression:\n\n' + ' ' + expr.split(/\r?\n/)[err.line] ); e.original = err; e.line = err.line; e.col = err.col; e.pos = err.pos; throw e; } return ast; }; var deparse = function (ast, b) { return uglify.uglify.gen_code(ast, { beautify : b }); }; var traverse = require('traverse'); var vm = require('vm'); var burrito = module.exports = function (code, cb) { var ast = Array_isArray(code) ? code // already an ast : parse(code.toString(), false, true) ; var ast_ = traverse(ast).map(function mapper () { wrapNode(this, cb); }); return deparse(parse(deparse(ast_)), true); }; var wrapNode = burrito.wrapNode = function (state, cb) { var node = state.node; var ann = Array_isArray(node) && node[0] && typeof node[0] === 'object' && node[0].name ? node[0] : null ; if (!ann) return undefined; var self = { name : ann.name, node : node, start : node[0].start, end : node[0].end, value : node.slice(1), state : state }; self.wrap = function (s) { var subsrc = deparse( traverse(node).map(function (x) { if (!this.isRoot) wrapNode(this, cb) }) ); if (self.name === 'binary') { var a = deparse(traverse(node[2]).map(function (x) { if (!this.isRoot) wrapNode(this, cb) })); var b = deparse(traverse(node[3]).map(function (x) { if (!this.isRoot) wrapNode(this, cb) })); } var src = ''; if (typeof s === 'function') { if (self.name === 'binary') { src = s(subsrc, a, b); } else { src = s(subsrc); } } else { src = s.toString() .replace(/%s/g, function () { return subsrc }) ; if (self.name === 'binary') { src = src .replace(/%a/g, function () { return a }) .replace(/%b/g, function () { return b }) ; } } var expr = parse(src); state.update(expr, true); }; var cache = {}; self.parent = state.isRoot ? null : function () { if (!cache.parent) { var s = state; var x; do { s = s.parent; if (s) x = wrapNode(s); } while (s && !x); cache.parent = x; } return cache.parent; }; self.source = function () { if (!cache.source) cache.source = deparse(node); return cache.source; }; self.label = function () { return burrito.label(self); }; if (cb) cb.call(state, self); if (self.node[0].name === 'conditional') { self.wrap('[%s][0]'); } return self; } burrito.microwave = function (code, context, cb) { if (!cb) { cb = context; context = {} }; if (!context) context = {}; var src = burrito(code, cb); return vm.runInNewContext(src, context); }; burrito.generateName = function (len) { var name = ''; var lower = '$'.charCodeAt(0); var upper = 'z'.charCodeAt(0); while (name.length < len) { var c = String.fromCharCode(Math.floor( Math.random() * (upper - lower + 1) + lower )); if ((name + c).match(/^[A-Za-z_$][A-Za-z0-9_$]*$/)) name += c; } return name; }; burrito.parse = parse; burrito.deparse = deparse; burrito.label = function (node) { if (node.name === 'call') { if (typeof node.value[0] === 'string') { return node.value[0]; } else if (node.value[0] && typeof node.value[0][1] === 'string') { return node.value[0][1]; } else if (node.value[0][0] === 'dot') { return node.value[0][node.value[0].length - 1]; } else { return null; } } else if (node.name === 'var') { return node.value[0].map(function (x) { return x[0] }); } else if (node.name === 'defun') { return node.value[0]; } else if (node.name === 'function') { return node.value[0]; } else { return null; } }; var Array_isArray = Array.isArray || function isArray (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; node_modules/000077500000000000000000000000001240302775300343625ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito.bin/000077500000000000000000000000001240302775300352105ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modulesuglifyjs000066400000000000000000000004341240302775300367700ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/.bin#!/bin/sh basedir=`dirname "$0"` case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac if [ -x "$basedir/node" ]; then "$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@" ret=$? else node "$basedir/../uglify-js/bin/uglifyjs" "$@" ret=$? fi exit $ret uglifyjs.cmd000066400000000000000000000002151240302775300375270ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/.bin@IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "%~dp0\..\uglify-js\bin\uglifyjs" %* ) ELSE ( node "%~dp0\..\uglify-js\bin\uglifyjs" %* )traverse/000077500000000000000000000000001240302775300362155ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules.npmignore000066400000000000000000000000151240302775300402100ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traversenode_modules LICENSE000066400000000000000000000023341240302775300372240ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverseCopyright 2010 James Halliday (mail@substack.net) This project is free software released under the MIT/X11 license: http://www.opensource.org/licenses/mit-license.php Copyright 2010 James Halliday (mail@substack.net) 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. README.markdown000066400000000000000000000105051240302775300407170ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traversetraverse ======== Traverse and transform objects by visiting every node on a recursive walk. examples ======== transform negative numbers in-place ----------------------------------- negative.js ````javascript var traverse = require('traverse'); var obj = [ 5, 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ]; traverse(obj).forEach(function (x) { if (x < 0) this.update(x + 128); }); console.dir(obj); ```` Output: [ 5, 6, 125, [ 7, 8, 126, 1 ], { f: 10, g: 115 } ] collect leaf nodes ------------------ leaves.js ````javascript var traverse = require('traverse'); var obj = { a : [1,2,3], b : 4, c : [5,6], d : { e : [7,8], f : 9 }, }; var leaves = traverse(obj).reduce(function (acc, x) { if (this.isLeaf) acc.push(x); return acc; }, []); console.dir(leaves); ```` Output: [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] scrub circular references ------------------------- scrub.js: ````javascript var traverse = require('traverse'); var obj = { a : 1, b : 2, c : [ 3, 4 ] }; obj.c.push(obj); var scrubbed = traverse(obj).map(function (x) { if (this.circular) this.remove() }); console.dir(scrubbed); ```` output: { a: 1, b: 2, c: [ 3, 4 ] } context ======= Each method that takes a callback has a context (its `this` object) with these attributes: this.node --------- The present node on the recursive walk this.path --------- An array of string keys from the root to the present node this.parent ----------- The context of the node's parent. This is `undefined` for the root node. this.key -------- The name of the key of the present node in its parent. This is `undefined` for the root node. this.isRoot, this.notRoot ------------------------- Whether the present node is the root node this.isLeaf, this.notLeaf ------------------------- Whether or not the present node is a leaf node (has no children) this.level ---------- Depth of the node within the traversal this.circular ------------- If the node equals one of its parents, the `circular` attribute is set to the context of that parent and the traversal progresses no deeper. this.update(value, stopHere=false) ---------------------------------- Set a new value for the present node. All the elements in `value` will be recursively traversed unless `stopHere` is true. this.remove(stopHere=false) ------------- Remove the current element from the output. If the node is in an Array it will be spliced off. Otherwise it will be deleted from its parent. this.delete(stopHere=false) ------------- Delete the current element from its parent in the output. Calls `delete` even on Arrays. this.before(fn) --------------- Call this function before any of the children are traversed. You can assign into `this.keys` here to traverse in a custom order. this.after(fn) -------------- Call this function after any of the children are traversed. this.pre(fn) ------------ Call this function before each of the children are traversed. this.post(fn) ------------- Call this function after each of the children are traversed. methods ======= .map(fn) -------- Execute `fn` for each node in the object and return a new object with the results of the walk. To update nodes in the result use `this.update(value)`. .forEach(fn) ------------ Execute `fn` for each node in the object but unlike `.map()`, when `this.update()` is called it updates the object in-place. .reduce(fn, acc) ---------------- For each node in the object, perform a [left-fold](http://en.wikipedia.org/wiki/Fold_(higher-order_function)) with the return value of `fn(acc, node)`. If `acc` isn't specified, `acc` is set to the root object for the first step and the root element is skipped. .paths() -------- Return an `Array` of every possible non-cyclic path in the object. Paths are `Array`s of string keys. .nodes() -------- Return an `Array` of every node in the object. .clone() -------- Create a deep clone of the object. install ======= Using [npm](http://npmjs.org) do: $ npm install traverse test ==== Using [expresso](http://github.com/visionmedia/expresso) do: $ expresso 100% wahoo, your stuff is not broken! in the browser ============== Use [browserify](https://github.com/substack/node-browserify) to run traverse in the browser. traverse has been tested and works with: * Internet Explorer 5.5, 6.0, 7.0, 8.0, 9.0 * Firefox 3.5 * Chrome 6.0 * Opera 10.6 * Safari 5.0 examples/000077500000000000000000000000001240302775300400335ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traversejson.js000066400000000000000000000006061240302775300413440ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/examplesvar traverse = require('traverse'); var id = 54; var callbacks = {}; var obj = { moo : function () {}, foo : [2,3,4, function () {}] }; var scrubbed = traverse(obj).map(function (x) { if (typeof x === 'function') { callbacks[id] = { id : id, f : x, path : this.path }; this.update('[Function]'); id++; } }); console.dir(scrubbed); console.dir(callbacks); leaves.js000066400000000000000000000004041240302775300416460ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/examplesvar traverse = require('traverse'); var obj = { a : [1,2,3], b : 4, c : [5,6], d : { e : [7,8], f : 9 }, }; var leaves = traverse(obj).reduce(function (acc, x) { if (this.isLeaf) acc.push(x); return acc; }, []); console.dir(leaves); negative.js000066400000000000000000000003041240302775300421700ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/examplesvar traverse = require('traverse'); var obj = [ 5, 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ]; traverse(obj).forEach(function (x) { if (x < 0) this.update(x + 128); }); console.dir(obj); scrub.js000066400000000000000000000003621240302775300415100ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples// scrub out circular references var traverse = require('traverse'); var obj = { a : 1, b : 2, c : [ 3, 4 ] }; obj.c.push(obj); var scrubbed = traverse(obj).map(function (x) { if (this.circular) this.remove() }); console.dir(scrubbed); stringify.js000066400000000000000000000020271240302775300424100ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/examples#!/usr/bin/env node var traverse = require('traverse'); var obj = [ 'five', 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ]; var s = ''; traverse(obj).forEach(function to_s (node) { if (Array.isArray(node)) { this.before(function () { s += '[' }); this.post(function (child) { if (!child.isLast) s += ','; }); this.after(function () { s += ']' }); } else if (typeof node == 'object') { this.before(function () { s += '{' }); this.pre(function (x, key) { to_s(key); s += ':'; }); this.post(function (child) { if (!child.isLast) s += ','; }); this.after(function () { s += '}' }); } else if (typeof node == 'string') { s += '"' + node.toString().replace(/"/g, '\\"') + '"'; } else if (typeof node == 'function') { s += 'null'; } else { s += node.toString(); } }); console.log('JSON.stringify: ' + JSON.stringify(obj)); console.log('this stringify: ' + s); index.js000066400000000000000000000166451240302775300376760ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traversemodule.exports = Traverse; function Traverse (obj) { if (!(this instanceof Traverse)) return new Traverse(obj); this.value = obj; } Traverse.prototype.get = function (ps) { var node = this.value; for (var i = 0; i < ps.length; i ++) { var key = ps[i]; if (!Object.hasOwnProperty.call(node, key)) { node = undefined; break; } node = node[key]; } return node; }; Traverse.prototype.set = function (ps, value) { var node = this.value; for (var i = 0; i < ps.length - 1; i ++) { var key = ps[i]; if (!Object.hasOwnProperty.call(node, key)) node[key] = {}; node = node[key]; } node[ps[i]] = value; return value; }; Traverse.prototype.map = function (cb) { return walk(this.value, cb, true); }; Traverse.prototype.forEach = function (cb) { this.value = walk(this.value, cb, false); return this.value; }; Traverse.prototype.reduce = function (cb, init) { var skip = arguments.length === 1; var acc = skip ? this.value : init; this.forEach(function (x) { if (!this.isRoot || !skip) { acc = cb.call(this, acc, x); } }); return acc; }; Traverse.prototype.paths = function () { var acc = []; this.forEach(function (x) { acc.push(this.path); }); return acc; }; Traverse.prototype.nodes = function () { var acc = []; this.forEach(function (x) { acc.push(this.node); }); return acc; }; Traverse.prototype.clone = function () { var parents = [], nodes = []; return (function clone (src) { for (var i = 0; i < parents.length; i++) { if (parents[i] === src) { return nodes[i]; } } if (typeof src === 'object' && src !== null) { var dst = copy(src); parents.push(src); nodes.push(dst); forEach(Object_keys(src), function (key) { dst[key] = clone(src[key]); }); parents.pop(); nodes.pop(); return dst; } else { return src; } })(this.value); }; function walk (root, cb, immutable) { var path = []; var parents = []; var alive = true; return (function walker (node_) { var node = immutable ? copy(node_) : node_; var modifiers = {}; var keepGoing = true; var state = { node : node, node_ : node_, path : [].concat(path), parent : parents[parents.length - 1], parents : parents, key : path.slice(-1)[0], isRoot : path.length === 0, level : path.length, circular : null, update : function (x, stopHere) { if (!state.isRoot) { state.parent.node[state.key] = x; } state.node = x; if (stopHere) keepGoing = false; }, 'delete' : function (stopHere) { delete state.parent.node[state.key]; if (stopHere) keepGoing = false; }, remove : function (stopHere) { if (Array_isArray(state.parent.node)) { state.parent.node.splice(state.key, 1); } else { delete state.parent.node[state.key]; } if (stopHere) keepGoing = false; }, keys : null, before : function (f) { modifiers.before = f }, after : function (f) { modifiers.after = f }, pre : function (f) { modifiers.pre = f }, post : function (f) { modifiers.post = f }, stop : function () { alive = false }, block : function () { keepGoing = false } }; if (!alive) return state; if (typeof node === 'object' && node !== null) { state.keys = Object_keys(node); state.isLeaf = state.keys.length == 0; for (var i = 0; i < parents.length; i++) { if (parents[i].node_ === node_) { state.circular = parents[i]; break; } } } else { state.isLeaf = true; } state.notLeaf = !state.isLeaf; state.notRoot = !state.isRoot; // use return values to update if defined var ret = cb.call(state, state.node); if (ret !== undefined && state.update) state.update(ret); if (modifiers.before) modifiers.before.call(state, state.node); if (!keepGoing) return state; if (typeof state.node == 'object' && state.node !== null && !state.circular) { parents.push(state); forEach(state.keys, function (key, i) { path.push(key); if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); var child = walker(state.node[key]); if (immutable && Object.hasOwnProperty.call(state.node, key)) { state.node[key] = child.node; } child.isLast = i == state.keys.length - 1; child.isFirst = i == 0; if (modifiers.post) modifiers.post.call(state, child); path.pop(); }); parents.pop(); } if (modifiers.after) modifiers.after.call(state, state.node); return state; })(root).node; } function copy (src) { if (typeof src === 'object' && src !== null) { var dst; if (Array_isArray(src)) { dst = []; } else if (src instanceof Date) { dst = new Date(src); } else if (src instanceof Boolean) { dst = new Boolean(src); } else if (src instanceof Number) { dst = new Number(src); } else if (src instanceof String) { dst = new String(src); } else if (Object.create && Object.getPrototypeOf) { dst = Object.create(Object.getPrototypeOf(src)); } else if (src.__proto__ || src.constructor.prototype) { var proto = src.__proto__ || src.constructor.prototype || {}; var T = function () {}; T.prototype = proto; dst = new T; if (!dst.__proto__) dst.__proto__ = proto; } forEach(Object_keys(src), function (key) { dst[key] = src[key]; }); return dst; } else return src; } var Object_keys = Object.keys || function keys (obj) { var res = []; for (var key in obj) res.push(key) return res; }; var Array_isArray = Array.isArray || function isArray (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; var forEach = function (xs, fn) { if (xs.forEach) return xs.forEach(fn) else for (var i = 0; i < xs.length; i++) { fn(xs[i], i, xs); } }; forEach(Object_keys(Traverse.prototype), function (key) { Traverse[key] = function (obj) { var args = [].slice.call(arguments, 1); var t = Traverse(obj); return t[key].apply(t, args); }; }); main.js000066400000000000000000000003641240302775300375020ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse// scrub out circular references var traverse = require('./index.js'); var obj = { a : 1, b : 2, c : [ 3, 4 ] }; obj.c.push(obj); var scrubbed = traverse(obj).map(function (x) { if (this.circular) this.remove() }); console.dir(scrubbed); package.json000066400000000000000000000121151240302775300405030ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse{ "name": "traverse", "version": "0.5.2", "description": "Traverse and transform objects by visiting every node on a recursive walk", "author": { "name": "James Halliday" }, "license": "MIT/X11", "main": "./index", "repository": { "type": "git", "url": "http://github.com/substack/js-traverse.git" }, "devDependencies": { "expresso": "0.7.x" }, "scripts": { "test": "expresso" }, "readme": "traverse\n========\n\nTraverse and transform objects by visiting every node on a recursive walk.\n\nexamples\n========\n\ntransform negative numbers in-place\n-----------------------------------\n\nnegative.js\n\n````javascript\nvar traverse = require('traverse');\nvar obj = [ 5, 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ];\n\ntraverse(obj).forEach(function (x) {\n if (x < 0) this.update(x + 128);\n});\n\nconsole.dir(obj);\n````\n\nOutput:\n\n [ 5, 6, 125, [ 7, 8, 126, 1 ], { f: 10, g: 115 } ]\n\ncollect leaf nodes\n------------------\n\nleaves.js\n\n````javascript\nvar traverse = require('traverse');\n\nvar obj = {\n a : [1,2,3],\n b : 4,\n c : [5,6],\n d : { e : [7,8], f : 9 },\n};\n\nvar leaves = traverse(obj).reduce(function (acc, x) {\n if (this.isLeaf) acc.push(x);\n return acc;\n}, []);\n\nconsole.dir(leaves);\n````\n\nOutput:\n\n [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]\n\nscrub circular references\n-------------------------\n\nscrub.js:\n\n````javascript\nvar traverse = require('traverse');\n\nvar obj = { a : 1, b : 2, c : [ 3, 4 ] };\nobj.c.push(obj);\n\nvar scrubbed = traverse(obj).map(function (x) {\n if (this.circular) this.remove()\n});\nconsole.dir(scrubbed);\n````\n\noutput:\n\n { a: 1, b: 2, c: [ 3, 4 ] }\n\ncontext\n=======\n\nEach method that takes a callback has a context (its `this` object) with these\nattributes:\n\nthis.node\n---------\n\nThe present node on the recursive walk\n\nthis.path\n---------\n\nAn array of string keys from the root to the present node\n\nthis.parent\n-----------\n\nThe context of the node's parent.\nThis is `undefined` for the root node.\n\nthis.key\n--------\n\nThe name of the key of the present node in its parent.\nThis is `undefined` for the root node.\n\nthis.isRoot, this.notRoot\n-------------------------\n\nWhether the present node is the root node\n\nthis.isLeaf, this.notLeaf\n-------------------------\n\nWhether or not the present node is a leaf node (has no children)\n\nthis.level\n----------\n\nDepth of the node within the traversal\n\nthis.circular\n-------------\n\nIf the node equals one of its parents, the `circular` attribute is set to the\ncontext of that parent and the traversal progresses no deeper.\n\nthis.update(value, stopHere=false)\n----------------------------------\n\nSet a new value for the present node.\n\nAll the elements in `value` will be recursively traversed unless `stopHere` is\ntrue.\n\nthis.remove(stopHere=false)\n-------------\n\nRemove the current element from the output. If the node is in an Array it will\nbe spliced off. Otherwise it will be deleted from its parent.\n\nthis.delete(stopHere=false)\n-------------\n\nDelete the current element from its parent in the output. Calls `delete` even on\nArrays.\n\nthis.before(fn)\n---------------\n\nCall this function before any of the children are traversed.\n\nYou can assign into `this.keys` here to traverse in a custom order.\n\nthis.after(fn)\n--------------\n\nCall this function after any of the children are traversed.\n\nthis.pre(fn)\n------------\n\nCall this function before each of the children are traversed.\n\nthis.post(fn)\n-------------\n\nCall this function after each of the children are traversed.\n\nmethods\n=======\n\n.map(fn)\n--------\n\nExecute `fn` for each node in the object and return a new object with the\nresults of the walk. To update nodes in the result use `this.update(value)`.\n\n.forEach(fn)\n------------\n\nExecute `fn` for each node in the object but unlike `.map()`, when\n`this.update()` is called it updates the object in-place.\n\n.reduce(fn, acc)\n----------------\n\nFor each node in the object, perform a\n[left-fold](http://en.wikipedia.org/wiki/Fold_(higher-order_function))\nwith the return value of `fn(acc, node)`.\n\nIf `acc` isn't specified, `acc` is set to the root object for the first step\nand the root element is skipped.\n\n.paths()\n--------\n\nReturn an `Array` of every possible non-cyclic path in the object.\nPaths are `Array`s of string keys.\n\n.nodes()\n--------\n\nReturn an `Array` of every node in the object.\n\n.clone()\n--------\n\nCreate a deep clone of the object.\n\ninstall\n=======\n\nUsing [npm](http://npmjs.org) do:\n\n $ npm install traverse\n\ntest\n====\n\nUsing [expresso](http://github.com/visionmedia/expresso) do:\n\n $ expresso\n \n 100% wahoo, your stuff is not broken!\n\nin the browser\n==============\n\nUse [browserify](https://github.com/substack/node-browserify) to run traverse in\nthe browser.\n\ntraverse has been tested and works with:\n\n* Internet Explorer 5.5, 6.0, 7.0, 8.0, 9.0\n* Firefox 3.5\n* Chrome 6.0\n* Opera 10.6\n* Safari 5.0\n", "readmeFilename": "README.markdown", "_id": "traverse@0.5.2", "_from": "traverse@~0.5.1" } test/000077500000000000000000000000001240302775300371745ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traversecircular.js000066400000000000000000000056471240302775300413520ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); var deepEqual = require('./lib/deep_equal'); var util = require('util'); exports.circular = function () { var obj = { x : 3 }; obj.y = obj; var foundY = false; Traverse(obj).forEach(function (x) { if (this.path.join('') == 'y') { assert.equal( util.inspect(this.circular.node), util.inspect(obj) ); foundY = true; } }); assert.ok(foundY); }; exports.deepCirc = function () { var obj = { x : [ 1, 2, 3 ], y : [ 4, 5 ] }; obj.y[2] = obj; var times = 0; Traverse(obj).forEach(function (x) { if (this.circular) { assert.deepEqual(this.circular.path, []); assert.deepEqual(this.path, [ 'y', 2 ]); times ++; } }); assert.deepEqual(times, 1); }; exports.doubleCirc = function () { var obj = { x : [ 1, 2, 3 ], y : [ 4, 5 ] }; obj.y[2] = obj; obj.x.push(obj.y); var circs = []; Traverse(obj).forEach(function (x) { if (this.circular) { circs.push({ circ : this.circular, self : this, node : x }); } }); assert.deepEqual(circs[0].self.path, [ 'x', 3, 2 ]); assert.deepEqual(circs[0].circ.path, []); assert.deepEqual(circs[1].self.path, [ 'y', 2 ]); assert.deepEqual(circs[1].circ.path, []); assert.deepEqual(circs.length, 2); }; exports.circDubForEach = function () { var obj = { x : [ 1, 2, 3 ], y : [ 4, 5 ] }; obj.y[2] = obj; obj.x.push(obj.y); Traverse(obj).forEach(function (x) { if (this.circular) this.update('...'); }); assert.deepEqual(obj, { x : [ 1, 2, 3, [ 4, 5, '...' ] ], y : [ 4, 5, '...' ] }); }; exports.circDubMap = function () { var obj = { x : [ 1, 2, 3 ], y : [ 4, 5 ] }; obj.y[2] = obj; obj.x.push(obj.y); var c = Traverse(obj).map(function (x) { if (this.circular) { this.update('...'); } }); assert.deepEqual(c, { x : [ 1, 2, 3, [ 4, 5, '...' ] ], y : [ 4, 5, '...' ] }); }; exports.circClone = function () { var obj = { x : [ 1, 2, 3 ], y : [ 4, 5 ] }; obj.y[2] = obj; obj.x.push(obj.y); var clone = Traverse.clone(obj); assert.ok(obj !== clone); assert.ok(clone.y[2] === clone); assert.ok(clone.y[2] !== obj); assert.ok(clone.x[3][2] === clone); assert.ok(clone.x[3][2] !== obj); assert.deepEqual(clone.x.slice(0,3), [1,2,3]); assert.deepEqual(clone.y.slice(0,2), [4,5]); }; exports.circMapScrub = function () { var obj = { a : 1, b : 2 }; obj.c = obj; var scrubbed = Traverse(obj).map(function (node) { if (this.circular) this.remove(); }); assert.deepEqual( Object.keys(scrubbed).sort(), [ 'a', 'b' ] ); assert.ok(deepEqual(scrubbed, { a : 1, b : 2 })); assert.equal(obj.c, obj); }; date.js000066400000000000000000000014071240302775300404510ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports.dateEach = function () { var obj = { x : new Date, y : 10, z : 5 }; var counts = {}; Traverse(obj).forEach(function (node) { var t = (node instanceof Date && 'Date') || typeof node; counts[t] = (counts[t] || 0) + 1; }); assert.deepEqual(counts, { object : 1, Date : 1, number : 2, }); }; exports.dateMap = function () { var obj = { x : new Date, y : 10, z : 5 }; var res = Traverse(obj).map(function (node) { if (typeof node === 'number') this.update(node + 100); }); assert.ok(obj.x !== res.x); assert.deepEqual(res, { x : obj.x, y : 110, z : 105, }); }; equal.js000066400000000000000000000123501240302775300406420ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var traverse = require('../'); var deepEqual = require('./lib/deep_equal'); exports.deepDates = function () { assert.ok( deepEqual( { d : new Date, x : [ 1, 2, 3 ] }, { d : new Date, x : [ 1, 2, 3 ] } ), 'dates should be equal' ); var d0 = new Date; setTimeout(function () { assert.ok( !deepEqual( { d : d0, x : [ 1, 2, 3 ], }, { d : new Date, x : [ 1, 2, 3 ] } ), 'microseconds should count in date equality' ); }, 5); }; exports.deepCircular = function () { var a = [1]; a.push(a); // a = [ 1, *a ] var b = [1]; b.push(a); // b = [ 1, [ 1, *a ] ] assert.ok( !deepEqual(a, b), 'circular ref mount points count towards equality' ); var c = [1]; c.push(c); // c = [ 1, *c ] assert.ok( deepEqual(a, c), 'circular refs are structurally the same here' ); var d = [1]; d.push(a); // c = [ 1, [ 1, *d ] ] assert.ok( deepEqual(b, d), 'non-root circular ref structural comparison' ); }; exports.deepInstances = function () { assert.ok( !deepEqual([ new Boolean(false) ], [ false ]), 'boolean instances are not real booleans' ); assert.ok( !deepEqual([ new String('x') ], [ 'x' ]), 'string instances are not real strings' ); assert.ok( !deepEqual([ new Number(4) ], [ 4 ]), 'number instances are not real numbers' ); assert.ok( deepEqual([ new RegExp('x') ], [ /x/ ]), 'regexp instances are real regexps' ); assert.ok( !deepEqual([ new RegExp(/./) ], [ /../ ]), 'these regexps aren\'t the same' ); assert.ok( !deepEqual( [ function (x) { return x * 2 } ], [ function (x) { return x * 2 } ] ), 'functions with the same .toString() aren\'t necessarily the same' ); var f = function (x) { return x * 2 }; assert.ok( deepEqual([ f ], [ f ]), 'these functions are actually equal' ); }; exports.deepEqual = function () { assert.ok( !deepEqual([ 1, 2, 3 ], { 0 : 1, 1 : 2, 2 : 3 }), 'arrays are not objects' ); }; exports.falsy = function () { assert.ok( !deepEqual([ undefined ], [ null ]), 'null is not undefined!' ); assert.ok( !deepEqual([ null ], [ undefined ]), 'undefined is not null!' ); assert.ok( !deepEqual( { a : 1, b : 2, c : [ 3, undefined, 5 ] }, { a : 1, b : 2, c : [ 3, null, 5 ] } ), 'undefined is not null, however deeply!' ); assert.ok( !deepEqual( { a : 1, b : 2, c : [ 3, undefined, 5 ] }, { a : 1, b : 2, c : [ 3, null, 5 ] } ), 'null is not undefined, however deeply!' ); assert.ok( !deepEqual( { a : 1, b : 2, c : [ 3, undefined, 5 ] }, { a : 1, b : 2, c : [ 3, null, 5 ] } ), 'null is not undefined, however deeply!' ); }; exports.deletedArrayEqual = function () { var xs = [ 1, 2, 3, 4 ]; delete xs[2]; var ys = Object.create(Array.prototype); ys[0] = 1; ys[1] = 2; ys[3] = 4; assert.ok( deepEqual(xs, ys), 'arrays with deleted elements are only equal to' + ' arrays with similarly deleted elements' ); assert.ok( !deepEqual(xs, [ 1, 2, undefined, 4 ]), 'deleted array elements cannot be undefined' ); assert.ok( !deepEqual(xs, [ 1, 2, null, 4 ]), 'deleted array elements cannot be null' ); }; exports.deletedObjectEqual = function () { var obj = { a : 1, b : 2, c : 3 }; delete obj.c; assert.ok( deepEqual(obj, { a : 1, b : 2 }), 'deleted object elements should not show up' ); assert.ok( !deepEqual(obj, { a : 1, b : 2, c : undefined }), 'deleted object elements are not undefined' ); assert.ok( !deepEqual(obj, { a : 1, b : 2, c : null }), 'deleted object elements are not null' ); }; exports.emptyKeyEqual = function () { assert.ok(!deepEqual( { a : 1 }, { a : 1, '' : 55 } )); }; exports.deepArguments = function () { assert.ok( !deepEqual( [ 4, 5, 6 ], (function () { return arguments })(4, 5, 6) ), 'arguments are not arrays' ); assert.ok( deepEqual( (function () { return arguments })(4, 5, 6), (function () { return arguments })(4, 5, 6) ), 'arguments should equal' ); }; exports.deepUn = function () { assert.ok(!deepEqual({ a : 1, b : 2 }, undefined)); assert.ok(!deepEqual({ a : 1, b : 2 }, {})); assert.ok(!deepEqual(undefined, { a : 1, b : 2 })); assert.ok(!deepEqual({}, { a : 1, b : 2 })); assert.ok(deepEqual(undefined, undefined)); assert.ok(deepEqual(null, null)); assert.ok(!deepEqual(undefined, null)); }; exports.deepLevels = function () { var xs = [ 1, 2, [ 3, 4, [ 5, 6 ] ] ]; assert.ok(!deepEqual(xs, [])); }; instance.js000066400000000000000000000006771240302775300413500ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); var EventEmitter = require('events').EventEmitter; exports['check instanceof on node elems'] = function () { var counts = { emitter : 0 }; Traverse([ new EventEmitter, 3, 4, { ev : new EventEmitter }]) .forEach(function (node) { if (node instanceof EventEmitter) counts.emitter ++; }) ; assert.equal(counts.emitter, 2); }; interface.js000066400000000000000000000020021240302775300414640ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports['interface map'] = function () { var obj = { a : [ 5,6,7 ], b : { c : [8] } }; assert.deepEqual( Traverse.paths(obj) .sort() .map(function (path) { return path.join('/') }) .slice(1) .join(' ') , 'a a/0 a/1 a/2 b b/c b/c/0' ); assert.deepEqual( Traverse.nodes(obj), [ { a: [ 5, 6, 7 ], b: { c: [ 8 ] } }, [ 5, 6, 7 ], 5, 6, 7, { c: [ 8 ] }, [ 8 ], 8 ] ); assert.deepEqual( Traverse.map(obj, function (node) { if (typeof node == 'number') { return node + 1000; } else if (Array.isArray(node)) { return node.join(' '); } }), { a: '5 6 7', b: { c: '8' } } ); var nodes = 0; Traverse.forEach(obj, function (node) { nodes ++ }); assert.deepEqual(nodes, 8); }; json.js000066400000000000000000000023531240302775300405060ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports['json test'] = function () { var id = 54; var callbacks = {}; var obj = { moo : function () {}, foo : [2,3,4, function () {}] }; var scrubbed = Traverse(obj).map(function (x) { if (typeof x === 'function') { callbacks[id] = { id : id, f : x, path : this.path }; this.update('[Function]'); id++; } }); assert.equal( scrubbed.moo, '[Function]', 'obj.moo replaced with "[Function]"' ); assert.equal( scrubbed.foo[3], '[Function]', 'obj.foo[3] replaced with "[Function]"' ); assert.deepEqual(scrubbed, { moo : '[Function]', foo : [ 2, 3, 4, "[Function]" ] }, 'Full JSON string matches'); assert.deepEqual( typeof obj.moo, 'function', 'Original obj.moo still a function' ); assert.deepEqual( typeof obj.foo[3], 'function', 'Original obj.foo[3] still a function' ); assert.deepEqual(callbacks, { 54: { id: 54, f : obj.moo, path: [ 'moo' ] }, 55: { id: 55, f : obj.foo[3], path: [ 'foo', '3' ] }, }, 'Check the generated callbacks list'); }; keys.js000066400000000000000000000014071240302775300405070ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports['sort test'] = function () { var acc = []; Traverse({ a: 30, b: 22, id: 9 }).forEach(function (node) { if ((! Array.isArray(node)) && typeof node === 'object') { this.before(function(node) { this.keys = Object.keys(node); this.keys.sort(function(a, b) { a = [a === "id" ? 0 : 1, a]; b = [b === "id" ? 0 : 1, b]; return a < b ? -1 : a > b ? 1 : 0; }); }); } if (this.isLeaf) acc.push(node); }); assert.equal( acc.join(' '), '9 30 22', 'Traversal in a custom order' ); }; leaves.js000066400000000000000000000006541240302775300410160ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports['leaves test'] = function () { var acc = []; Traverse({ a : [1,2,3], b : 4, c : [5,6], d : { e : [7,8], f : 9 } }).forEach(function (x) { if (this.isLeaf) acc.push(x); }); assert.equal( acc.join(' '), '1 2 3 4 5 6 7 8 9', 'Traversal in the right(?) order' ); }; lib/000077500000000000000000000000001240302775300377425ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testdeep_equal.js000066400000000000000000000052121240302775300424040ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/libvar traverse = require('../../'); module.exports = function (a, b) { if (arguments.length !== 2) { throw new Error( 'deepEqual requires exactly two objects to compare against' ); } var equal = true; var node = b; traverse(a).forEach(function (y) { var notEqual = (function () { equal = false; //this.stop(); return undefined; }).bind(this); //if (node === undefined || node === null) return notEqual(); if (!this.isRoot) { /* if (!Object.hasOwnProperty.call(node, this.key)) { return notEqual(); } */ if (typeof node !== 'object') return notEqual(); node = node[this.key]; } var x = node; this.post(function () { node = x; }); var toS = function (o) { return Object.prototype.toString.call(o); }; if (this.circular) { if (traverse(b).get(this.circular.path) !== x) notEqual(); } else if (typeof x !== typeof y) { notEqual(); } else if (x === null || y === null || x === undefined || y === undefined) { if (x !== y) notEqual(); } else if (x.__proto__ !== y.__proto__) { notEqual(); } else if (x === y) { // nop } else if (typeof x === 'function') { if (x instanceof RegExp) { // both regexps on account of the __proto__ check if (x.toString() != y.toString()) notEqual(); } else if (x !== y) notEqual(); } else if (typeof x === 'object') { if (toS(y) === '[object Arguments]' || toS(x) === '[object Arguments]') { if (toS(x) !== toS(y)) { notEqual(); } } else if (x instanceof Date || y instanceof Date) { if (!(x instanceof Date) || !(y instanceof Date) || x.getTime() !== y.getTime()) { notEqual(); } } else { var kx = Object.keys(x); var ky = Object.keys(y); if (kx.length !== ky.length) return notEqual(); for (var i = 0; i < kx.length; i++) { var k = kx[i]; if (!Object.hasOwnProperty.call(y, k)) { notEqual(); } } } } }); return equal; }; mutability.js000066400000000000000000000144471240302775300417270ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); var deepEqual = require('./lib/deep_equal'); exports.mutate = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).forEach(function (x) { if (typeof x === 'number' && x % 2 === 0) { this.update(x * 10); } }); assert.deepEqual(obj, res); assert.deepEqual(obj, { a : 1, b : 20, c : [ 3, 40 ] }); }; exports.mutateT = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse.forEach(obj, function (x) { if (typeof x === 'number' && x % 2 === 0) { this.update(x * 10); } }); assert.deepEqual(obj, res); assert.deepEqual(obj, { a : 1, b : 20, c : [ 3, 40 ] }); }; exports.map = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).map(function (x) { if (typeof x === 'number' && x % 2 === 0) { this.update(x * 10); } }); assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] }); assert.deepEqual(res, { a : 1, b : 20, c : [ 3, 40 ] }); }; exports.mapT = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse.map(obj, function (x) { if (typeof x === 'number' && x % 2 === 0) { this.update(x * 10); } }); assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] }); assert.deepEqual(res, { a : 1, b : 20, c : [ 3, 40 ] }); }; exports.clone = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).clone(); assert.deepEqual(obj, res); assert.ok(obj !== res); obj.a ++; assert.deepEqual(res.a, 1); obj.c.push(5); assert.deepEqual(res.c, [ 3, 4 ]); }; exports.cloneT = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse.clone(obj); assert.deepEqual(obj, res); assert.ok(obj !== res); obj.a ++; assert.deepEqual(res.a, 1); obj.c.push(5); assert.deepEqual(res.c, [ 3, 4 ]); }; exports.reduce = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).reduce(function (acc, x) { if (this.isLeaf) acc.push(x); return acc; }, []); assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] }); assert.deepEqual(res, [ 1, 2, 3, 4 ]); }; exports.reduceInit = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).reduce(function (acc, x) { if (this.isRoot) assert.fail('got root'); return acc; }); assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] }); assert.deepEqual(res, obj); }; exports.remove = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; Traverse(obj).forEach(function (x) { if (this.isLeaf && x % 2 == 0) this.remove(); }); assert.deepEqual(obj, { a : 1, c : [ 3 ] }); }; exports.removeNoStop = function() { var obj = { a : 1, b : 2, c : { d: 3, e: 4 }, f: 5 }; var keys = []; Traverse(obj).forEach(function (x) { keys.push(this.key) if (this.key == 'c') this.remove(); }); assert.deepEqual(keys, [undefined, 'a', 'b', 'c', 'd', 'e', 'f']) } exports.removeStop = function() { var obj = { a : 1, b : 2, c : { d: 3, e: 4 }, f: 5 }; var keys = []; Traverse(obj).forEach(function (x) { keys.push(this.key) if (this.key == 'c') this.remove(true); }); assert.deepEqual(keys, [undefined, 'a', 'b', 'c', 'f']) } exports.removeMap = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).map(function (x) { if (this.isLeaf && x % 2 == 0) this.remove(); }); assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] }); assert.deepEqual(res, { a : 1, c : [ 3 ] }); }; exports.delete = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; Traverse(obj).forEach(function (x) { if (this.isLeaf && x % 2 == 0) this.delete(); }); assert.ok(!deepEqual( obj, { a : 1, c : [ 3, undefined ] } )); assert.ok(deepEqual( obj, { a : 1, c : [ 3 ] } )); assert.ok(!deepEqual( obj, { a : 1, c : [ 3, null ] } )); }; exports.deleteNoStop = function() { var obj = { a : 1, b : 2, c : { d: 3, e: 4 } }; var keys = []; Traverse(obj).forEach(function (x) { keys.push(this.key) if (this.key == 'c') this.delete(); }); assert.deepEqual(keys, [undefined, 'a', 'b', 'c', 'd', 'e']) } exports.deleteStop = function() { var obj = { a : 1, b : 2, c : { d: 3, e: 4 } }; var keys = []; Traverse(obj).forEach(function (x) { keys.push(this.key) if (this.key == 'c') this.delete(true); }); assert.deepEqual(keys, [undefined, 'a', 'b', 'c']) } exports.deleteRedux = function () { var obj = { a : 1, b : 2, c : [ 3, 4, 5 ] }; Traverse(obj).forEach(function (x) { if (this.isLeaf && x % 2 == 0) this.delete(); }); assert.ok(!deepEqual( obj, { a : 1, c : [ 3, undefined, 5 ] } )); assert.ok(deepEqual( obj, { a : 1, c : [ 3 ,, 5 ] } )); assert.ok(!deepEqual( obj, { a : 1, c : [ 3, null, 5 ] } )); assert.ok(!deepEqual( obj, { a : 1, c : [ 3, 5 ] } )); }; exports.deleteMap = function () { var obj = { a : 1, b : 2, c : [ 3, 4 ] }; var res = Traverse(obj).map(function (x) { if (this.isLeaf && x % 2 == 0) this.delete(); }); assert.ok(deepEqual( obj, { a : 1, b : 2, c : [ 3, 4 ] } )); var xs = [ 3, 4 ]; delete xs[1]; assert.ok(deepEqual( res, { a : 1, c : xs } )); assert.ok(deepEqual( res, { a : 1, c : [ 3, ] } )); assert.ok(deepEqual( res, { a : 1, c : [ 3 ] } )); }; exports.deleteMapRedux = function () { var obj = { a : 1, b : 2, c : [ 3, 4, 5 ] }; var res = Traverse(obj).map(function (x) { if (this.isLeaf && x % 2 == 0) this.delete(); }); assert.ok(deepEqual( obj, { a : 1, b : 2, c : [ 3, 4, 5 ] } )); var xs = [ 3, 4, 5 ]; delete xs[1]; assert.ok(deepEqual( res, { a : 1, c : xs } )); assert.ok(!deepEqual( res, { a : 1, c : [ 3, 5 ] } )); assert.ok(deepEqual( res, { a : 1, c : [ 3 ,, 5 ] } )); }; negative.js000066400000000000000000000010471240302775300413360ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar Traverse = require('../'); var assert = require('assert'); exports['negative update test'] = function () { var obj = [ 5, 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ]; var fixed = Traverse.map(obj, function (x) { if (x < 0) this.update(x + 128); }); assert.deepEqual(fixed, [ 5, 6, 125, [ 7, 8, 126, 1 ], { f: 10, g: 115 } ], 'Negative values += 128' ); assert.deepEqual(obj, [ 5, 6, -3, [ 7, 8, -2, 1 ], { f: 10, g: -13 } ], 'Original references not modified' ); } obj.js000066400000000000000000000005251240302775300403060ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports['traverse an object with nested functions'] = function () { var to = setTimeout(function () { assert.fail('never ran'); }, 1000); function Cons (x) { clearTimeout(to); assert.equal(x, 10); }; Traverse(new Cons(10)); }; siblings.js000066400000000000000000000022351240302775300413460ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var traverse = require('../'); exports.siblings = function () { var obj = { a : 1, b : 2, c : [ 4, 5, 6 ] }; var res = traverse(obj).reduce(function (acc, x) { var p = '/' + this.path.join('/'); if (this.parent) { acc[p] = { siblings : this.parent.keys, key : this.key, index : this.parent.keys.indexOf(this.key) }; } else { acc[p] = { siblings : [], key : this.key, index : -1 } } return acc; }, {}); assert.deepEqual(res, { '/' : { siblings : [], key : undefined, index : -1 }, '/a' : { siblings : [ 'a', 'b', 'c' ], key : 'a', index : 0 }, '/b' : { siblings : [ 'a', 'b', 'c' ], key : 'b', index : 1 }, '/c' : { siblings : [ 'a', 'b', 'c' ], key : 'c', index : 2 }, '/c/0' : { siblings : [ '0', '1', '2' ], key : '0', index : 0 }, '/c/1' : { siblings : [ '0', '1', '2' ], key : '1', index : 1 }, '/c/2' : { siblings : [ '0', '1', '2' ], key : '2', index : 2 } }); }; stop.js000066400000000000000000000017311240302775300405210ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var traverse = require('../'); exports.stop = function () { var visits = 0; traverse('abcdefghij'.split('')).forEach(function (node) { if (typeof node === 'string') { visits ++; if (node === 'e') this.stop() } }); assert.equal(visits, 5); }; exports.stopMap = function () { var s = traverse('abcdefghij'.split('')).map(function (node) { if (typeof node === 'string') { if (node === 'e') this.stop() return node.toUpperCase(); } }).join(''); assert.equal(s, 'ABCDEfghij'); }; exports.stopReduce = function () { var obj = { a : [ 4, 5 ], b : [ 6, [ 7, 8, 9 ] ] }; var xs = traverse(obj).reduce(function (acc, node) { if (this.isLeaf) { if (node === 7) this.stop(); else acc.push(node) } return acc; }, []); assert.deepEqual(xs, [ 4, 5, 6 ]); }; stringify.js000066400000000000000000000020111240302775300415420ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var Traverse = require('../'); exports.stringify = function () { var obj = [ 5, 6, -3, [ 7, 8, -2, 1 ], { f : 10, g : -13 } ]; var s = ''; Traverse(obj).forEach(function (node) { if (Array.isArray(node)) { this.before(function () { s += '[' }); this.post(function (child) { if (!child.isLast) s += ','; }); this.after(function () { s += ']' }); } else if (typeof node == 'object') { this.before(function () { s += '{' }); this.pre(function (x, key) { s += '"' + key + '"' + ':'; }); this.post(function (child) { if (!child.isLast) s += ','; }); this.after(function () { s += '}' }); } else if (typeof node == 'function') { s += 'null'; } else { s += node.toString(); } }); assert.equal(s, JSON.stringify(obj)); } subexpr.js000066400000000000000000000015511240302775300412240ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar traverse = require('../'); var assert = require('assert'); exports.subexpr = function () { var obj = [ 'a', 4, 'b', 5, 'c', 6 ]; var r = traverse(obj).map(function (x) { if (typeof x === 'number') { this.update([ x - 0.1, x, x + 0.1 ], true); } }); assert.deepEqual(obj, [ 'a', 4, 'b', 5, 'c', 6 ]); assert.deepEqual(r, [ 'a', [ 3.9, 4, 4.1 ], 'b', [ 4.9, 5, 5.1 ], 'c', [ 5.9, 6, 6.1 ], ]); }; exports.block = function () { var obj = [ [ 1 ], [ 2 ], [ 3 ] ]; var r = traverse(obj).map(function (x) { if (Array.isArray(x) && !this.isRoot) { if (x[0] === 5) this.block() else this.update([ [ x[0] + 1 ] ]) } }); assert.deepEqual(r, [ [ [ [ [ [ 5 ] ] ] ] ], [ [ [ [ 5 ] ] ] ], [ [ [ 5 ] ] ], ]); }; super_deep.js000066400000000000000000000016411240302775300416670ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/traverse/testvar assert = require('assert'); var traverse = require('../'); var deepEqual = require('./lib/deep_equal'); exports.super_deep = function () { var util = require('util'); var a0 = make(); var a1 = make(); assert.ok(deepEqual(a0, a1)); a0.c.d.moo = true; assert.ok(!deepEqual(a0, a1)); a1.c.d.moo = true; assert.ok(deepEqual(a0, a1)); // TODO: this one //a0.c.a = a1; //assert.ok(!deepEqual(a0, a1)); }; function make () { var a = { self : 'a' }; var b = { self : 'b' }; var c = { self : 'c' }; var d = { self : 'd' }; var e = { self : 'e' }; a.a = a; a.b = b; a.c = c; b.a = a; b.b = b; b.c = c; c.a = a; c.b = b; c.c = c; c.d = d; d.a = a; d.b = b; d.c = c; d.d = d; d.e = e; e.a = a; e.b = b; e.c = c; e.d = d; e.e = e; return a; } uglify-js/000077500000000000000000000000001240302775300362735ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules.npmignore000066400000000000000000000000421240302775300402660ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js.DS_Store .tmp*~ *.local.* .pinf-*README.html000066400000000000000000001130371240302775300401230ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js UglifyJS -- a JavaScript parser/compressor/beautifier

UglifyJS – a JavaScript parser/compressor/beautifier

1 UglifyJS — a JavaScript parser/compressor/beautifier

This package implements a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on NodeJS, but it should work on any JavaScript platform supporting the CommonJS module system (and if your platform of choice doesn't support CommonJS, you can easily implement it, or discard the exports.* lines from UglifyJS sources).

The tokenizer/parser generates an abstract syntax tree from JS code. You can then traverse the AST to learn more about the code, or do various manipulations on it. This part is implemented in parse-js.js and it's a port to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke.

( See cl-uglify-js if you're looking for the Common Lisp version of UglifyJS. )

The second part of this package, implemented in process.js, inspects and manipulates the AST generated by the parser to provide the following:

  • ability to re-generate JavaScript code from the AST. Optionally indented—you can use this if you want to “beautify” a program that has been compressed, so that you can inspect the source. But you can also run our code generator to print out an AST without any whitespace, so you achieve compression as well.
  • shorten variable names (usually to single characters). Our mangler will analyze the code and generate proper variable names, depending on scope and usage, and is smart enough to deal with globals defined elsewhere, or with eval() calls or with{} statements. In short, if eval() or with{} are used in some scope, then all variables in that scope and any variables in the parent scopes will remain unmangled, and any references to such variables remain unmangled as well.
  • various small optimizations that may lead to faster code but certainly lead to smaller code. Where possible, we do the following:
    • foo["bar"] ==> foo.bar
    • remove block brackets {}
    • join consecutive var declarations: var a = 10; var b = 20; ==> var a=10,b=20;
    • resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the replacement if the result occupies less bytes; for example 1/3 would translate to 0.333333333333, so in this case we don't replace it.
    • consecutive statements in blocks are merged into a sequence; in many cases, this leaves blocks with a single statement, so then we can remove the block brackets.
    • various optimizations for IF statements:
      • if (foo) bar(); else baz(); ==> foo?bar():baz();
      • if (!foo) bar(); else baz(); ==> foo?baz():bar();
      • if (foo) bar(); ==> foo&&bar();
      • if (!foo) bar(); ==> foo||bar();
      • if (foo) return bar(); else return baz(); ==> return foo?bar():baz();
      • if (foo) return bar(); else something(); ==> {if(foo)return bar();something()}
    • remove some unreachable code and warn about it (code that follows a return, throw, break or continue statement, except function/variable declarations).
    • act a limited version of a pre-processor (c.f. the pre-processor of C/C++) to allow you to safely replace selected global symbols with specified values. When combined with the optimisations above this can make UglifyJS operate slightly more like a compilation process, in that when certain symbols are replaced by constant values, entire code blocks may be optimised away as unreachable.

1.1 Unsafe transformations

The following transformations can in theory break code, although they're probably safe in most practical cases. To enable them you need to pass the --unsafe flag.

1.1.1 Calls involving the global Array constructor

The following transformations occur:

new Array(1, 2, 3, 4)  => [1,2,3,4]
Array(a, b, c)         => [a,b,c]
new Array(5)           => Array(5)
new Array(a)           => Array(a)

These are all safe if the Array name isn't redefined. JavaScript does allow one to globally redefine Array (and pretty much everything, in fact) but I personally don't see why would anyone do that.

UglifyJS does handle the case where Array is redefined locally, or even globally but with a function or var declaration. Therefore, in the following cases UglifyJS doesn't touch calls or instantiations of Array:

// case 1.  globally declared variable
  var Array;
  new Array(1, 2, 3);
  Array(a, b);

  // or (can be declared later)
  new Array(1, 2, 3);
  var Array;

  // or (can be a function)
  new Array(1, 2, 3);
  function Array() { ... }

// case 2.  declared in a function
  (function(){
    a = new Array(1, 2, 3);
    b = Array(5, 6);
    var Array;
  })();

  // or
  (function(Array){
    return Array(5, 6, 7);
  })();

  // or
  (function(){
    return new Array(1, 2, 3, 4);
    function Array() { ... }
  })();

  // etc.

1.1.2 obj.toString() ==> obj+“”

1.2 Install (NPM)

UglifyJS is now available through NPM — npm install uglify-js should do the job.

1.3 Install latest code from GitHub

## clone the repository
mkdir -p /where/you/wanna/put/it
cd /where/you/wanna/put/it
git clone git://github.com/mishoo/UglifyJS.git

## make the module available to Node
mkdir -p ~/.node_libraries/
cd ~/.node_libraries/
ln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js

## and if you want the CLI script too:
mkdir -p ~/bin
cd ~/bin
ln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs
  # (then add ~/bin to your $PATH if it's not there already)

1.4 Usage

There is a command-line tool that exposes the functionality of this library for your shell-scripting needs:

uglifyjs [ options... ] [ filename ]

filename should be the last argument and should name the file from which to read the JavaScript code. If you don't specify it, it will read code from STDIN.

Supported options:

  • -b or --beautify — output indented code; when passed, additional options control the beautifier:
    • -i N or --indent N — indentation level (number of spaces)
    • -q or --quote-keys — quote keys in literal objects (by default, only keys that cannot be identifier names will be quotes).
  • --ascii — pass this argument to encode non-ASCII characters as \uXXXX sequences. By default UglifyJS won't bother to do it and will output Unicode characters instead. (the output is always encoded in UTF8, but if you pass this option you'll only get ASCII).
  • -nm or --no-mangle — don't mangle variable names
  • -ns or --no-squeeze — don't call ast_squeeze() (which does various optimizations that result in smaller, less readable code).
  • -mt or --mangle-toplevel — mangle names in the toplevel scope too (by default we don't do this).
  • --no-seqs — when ast_squeeze() is called (thus, unless you pass --no-squeeze) it will reduce consecutive statements in blocks into a sequence. For example, "a = 10; b = 20; foo();" will be written as "a=10,b=20,foo();". In various occasions, this allows us to discard the block brackets (since the block becomes a single statement). This is ON by default because it seems safe and saves a few hundred bytes on some libs that I tested it on, but pass --no-seqs to disable it.
  • --no-dead-code — by default, UglifyJS will remove code that is obviously unreachable (code that follows a return, throw, break or continue statement and is not a function/variable declaration). Pass this option to disable this optimization.
  • -nc or --no-copyright — by default, uglifyjs will keep the initial comment tokens in the generated code (assumed to be copyright information etc.). If you pass this it will discard it.
  • -o filename or --output filename — put the result in filename. If this isn't given, the result goes to standard output (or see next one).
  • --overwrite — if the code is read from a file (not from STDIN) and you pass --overwrite then the output will be written in the same file.
  • --ast — pass this if you want to get the Abstract Syntax Tree instead of JavaScript as output. Useful for debugging or learning more about the internals.
  • -v or --verbose — output some notes on STDERR (for now just how long each operation takes).
  • -d SYMBOL[=VALUE] or --define SYMBOL[=VALUE] — will replace all instances of the specified symbol where used as an identifier (except where symbol has properly declared by a var declaration or use as function parameter or similar) with the specified value. This argument may be specified multiple times to define multiple symbols - if no value is specified the symbol will be replaced with the value true, or you can specify a numeric value (such as 1024), a quoted string value (such as ="object"= or ='https://github.com'), or the name of another symbol or keyword (such as =null or document). This allows you, for example, to assign meaningful names to key constant values but discard the symbolic names in the uglified version for brevity/efficiency, or when used wth care, allows UglifyJS to operate as a form of conditional compilation whereby defining appropriate values may, by dint of the constant folding and dead code removal features above, remove entire superfluous code blocks (e.g. completely remove instrumentation or trace code for production use). Where string values are being defined, the handling of quotes are likely to be subject to the specifics of your command shell environment, so you may need to experiment with quoting styles depending on your platform, or you may find the option --define-from-module more suitable for use.
  • -define-from-module SOMEMODULE — will load the named module (as per the NodeJS require() function) and iterate all the exported properties of the module defining them as symbol names to be defined (as if by the --define option) per the name of each property (i.e. without the module name prefix) and given the value of the property. This is a much easier way to handle and document groups of symbols to be defined rather than a large number of --define options.
  • --unsafe — enable other additional optimizations that are known to be unsafe in some contrived situations, but could still be generally useful. For now only these:
    • foo.toString() ==> foo+""
    • new Array(x,…) ==> [x,…]
    • new Array(x) ==> Array(x)
  • --max-line-len (default 32K characters) — add a newline after around 32K characters. I've seen both FF and Chrome croak when all the code was on a single line of around 670K. Pass –max-line-len 0 to disable this safety feature.
  • --reserved-names — some libraries rely on certain names to be used, as pointed out in issue #92 and #81, so this option allow you to exclude such names from the mangler. For example, to keep names require and $super intact you'd specify –reserved-names "require,$super".
  • --inline-script – when you want to include the output literally in an HTML <script> tag you can use this option to prevent </script from showing up in the output.
  • --lift-vars – when you pass this, UglifyJS will apply the following transformations (see the notes in API, ast_lift_variables):
    • put all var declarations at the start of the scope
    • make sure a variable is declared only once
    • discard unused function arguments
    • discard unused inner (named) functions
    • finally, try to merge assignments into that one var declaration, if possible.

1.4.1 API

To use the library from JavaScript, you'd do the following (example for NodeJS):

var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;

var orig_code = "... JS code here";
var ast = jsp.parse(orig_code); // parse code and get the initial AST
ast = pro.ast_mangle(ast); // get a new AST with mangled names
ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
var final_code = pro.gen_code(ast); // compressed code here

The above performs the full compression that is possible right now. As you can see, there are a sequence of steps which you can apply. For example if you want compressed output but for some reason you don't want to mangle variable names, you would simply skip the line that calls pro.ast_mangle(ast).

Some of these functions take optional arguments. Here's a description:

  • jsp.parse(code, strict_semicolons) – parses JS code and returns an AST. strict_semicolons is optional and defaults to false. If you pass true then the parser will throw an error when it expects a semicolon and it doesn't find it. For most JS code you don't want that, but it's useful if you want to strictly sanitize your code.
  • pro.ast_lift_variables(ast) – merge and move var declarations to the scop of the scope; discard unused function arguments or variables; discard unused (named) inner functions. It also tries to merge assignments following the var declaration into it.

    If your code is very hand-optimized concerning var declarations, this lifting variable declarations might actually increase size. For me it helps out. On jQuery it adds 865 bytes (243 after gzip). YMMV. Also note that (since it's not enabled by default) this operation isn't yet heavily tested (please report if you find issues!).

    Note that although it might increase the image size (on jQuery it gains 865 bytes, 243 after gzip) it's technically more correct: in certain situations, dead code removal might drop variable declarations, which would not happen if the variables are lifted in advance.

    Here's an example of what it does:

function f(a, b, c, d, e) {
    var q;
    var w;
    w = 10;
    q = 20;
    for (var i = 1; i < 10; ++i) {
        var boo = foo(a);
    }
    for (var i = 0; i < 1; ++i) {
        var boo = bar(c);
    }
    function foo(){ ... }
    function bar(){ ... }
    function baz(){ ... }
}

// transforms into ==>

function f(a, b, c) {
    var i, boo, w = 10, q = 20;
    for (i = 1; i < 10; ++i) {
        boo = foo(a);
    }
    for (i = 0; i < 1; ++i) {
        boo = bar(c);
    }
    function foo() { ... }
    function bar() { ... }
}
  • pro.ast_mangle(ast, options) – generates a new AST containing mangled (compressed) variable and function names. It supports the following options:
    • toplevel – mangle toplevel names (by default we don't touch them).
    • except – an array of names to exclude from compression.
    • defines – an object with properties named after symbols to replace (see the --define option for the script) and the values representing the AST replacement value.
  • pro.ast_squeeze(ast, options) – employs further optimizations designed to reduce the size of the code that gen_code would generate from the AST. Returns a new AST. options can be a hash; the supported options are:
    • make_seqs (default true) which will cause consecutive statements in a block to be merged using the "sequence" (comma) operator
    • dead_code (default true) which will remove unreachable code.
  • pro.gen_code(ast, options) – generates JS code from the AST. By default it's minified, but using the options argument you can get nicely formatted output. options is, well, optional :-) and if you pass it it must be an object and supports the following properties (below you can see the default values):
    • beautify: false – pass true if you want indented output
    • indent_start: 0 (only applies when beautify is true) – initial indentation in spaces
    • indent_level: 4 (only applies when beautify is true) -- indentation level, in spaces (pass an even number)
    • quote_keys: false – if you pass true it will quote all keys in literal objects
    • space_colon: false (only applies when beautify is true) – wether to put a space before the colon in object literals
    • ascii_only: false – pass true if you want to encode non-ASCII characters as \uXXXX.
    • inline_script: false – pass true to escape occurrences of </script in strings

1.4.2 Beautifier shortcoming – no more comments

The beautifier can be used as a general purpose indentation tool. It's useful when you want to make a minified file readable. One limitation, though, is that it discards all comments, so you don't really want to use it to reformat your code, unless you don't have, or don't care about, comments.

In fact it's not the beautifier who discards comments — they are dumped at the parsing stage, when we build the initial AST. Comments don't really make sense in the AST, and while we could add nodes for them, it would be inconvenient because we'd have to add special rules to ignore them at all the processing stages.

1.4.3 Use as a code pre-processor

The --define option can be used, particularly when combined with the constant folding logic, as a form of pre-processor to enable or remove particular constructions, such as might be used for instrumenting development code, or to produce variations aimed at a specific platform.

The code below illustrates the way this can be done, and how the symbol replacement is performed.

CLAUSE1: if (typeof DEVMODE === 'undefined') {
    DEVMODE = true;
}

CLAUSE2: function init() {
    if (DEVMODE) {
        console.log("init() called");
    }
    ....
    DEVMODE &amp;&amp; console.log("init() complete");
}

CLAUSE3: function reportDeviceStatus(device) {
    var DEVMODE = device.mode, DEVNAME = device.name;
    if (DEVMODE === 'open') {
        ....
    }
}

When the above code is normally executed, the undeclared global variable DEVMODE will be assigned the value true (see CLAUSE1) and so the init() function (CLAUSE2) will write messages to the console log when executed, but in CLAUSE3 a locally declared variable will mask access to the DEVMODE global symbol.

If the above code is processed by UglifyJS with an argument of --define DEVMODE=false then UglifyJS will replace DEVMODE with the boolean constant value false within CLAUSE1 and CLAUSE2, but it will leave CLAUSE3 as it stands because there DEVMODE resolves to a validly declared variable.

And more so, the constant-folding features of UglifyJS will recognise that the if condition of CLAUSE1 is thus always false, and so will remove the test and body of CLAUSE1 altogether (including the otherwise slightly problematical statement false = true; which it will have formed by replacing DEVMODE in the body). Similarly, within CLAUSE2 both calls to console.log() will be removed altogether.

In this way you can mimic, to a limited degree, the functionality of the C/C++ pre-processor to enable or completely remove blocks depending on how certain symbols are defined - perhaps using UglifyJS to generate different versions of source aimed at different environments

It is recommmended (but not made mandatory) that symbols designed for this purpose are given names consisting of UPPER_CASE_LETTERS to distinguish them from other (normal) symbols and avoid the sort of clash that CLAUSE3 above illustrates.

1.5 Compression – how good is it?

Here are updated statistics. (I also updated my Google Closure and YUI installations).

We're still a lot better than YUI in terms of compression, though slightly slower. We're still a lot faster than Closure, and compression after gzip is comparable.

FileUglifyJSUglifyJS+gzipClosureClosure+gzipYUIYUI+gzip
jquery-1.6.2.js91001 (0:01.59)3189690678 (0:07.40)31979101527 (0:01.82)34646
paper.js142023 (0:01.65)43334134301 (0:07.42)42495173383 (0:01.58)48785
prototype.js88544 (0:01.09)2668086955 (0:06.97)2632692130 (0:00.79)28624
thelib-full.js (DynarchLIB)251939 (0:02.55)72535249911 (0:09.05)72696258869 (0:01.94)76584

1.6 Bugs?

Unfortunately, for the time being there is no automated test suite. But I ran the compressor manually on non-trivial code, and then I tested that the generated code works as expected. A few hundred times.

DynarchLIB was started in times when there was no good JS minifier. Therefore I was quite religious about trying to write short code manually, and as such DL contains a lot of syntactic hacks1 such as “foo == bar ? a = 10 : b = 20”, though the more readable version would clearly be to use “if/else”.

Since the parser/compressor runs fine on DL and jQuery, I'm quite confident that it's solid enough for production use. If you can identify any bugs, I'd love to hear about them (use the Google Group or email me directly).

1.7 Links

1.8 License

UglifyJS is released under the BSD license:

Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
Based on parse-js (http://marijn.haverbeke.nl/parse-js/).

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

    * Redistributions of source code must retain the above
      copyright notice, this list of conditions and the following
      disclaimer.

    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials
      provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

Footnotes:

1 I even reported a few bugs and suggested some fixes in the original parse-js library, and Marijn pushed fixes literally in minutes.

Author: Mihai Bazon

Date: 2011-08-29 19:17:55 EEST

HTML generated by org-mode 7.01trans in emacs 23

README.org000066400000000000000000000565361240302775300377600ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js#+TITLE: UglifyJS -- a JavaScript parser/compressor/beautifier #+KEYWORDS: javascript, js, parser, compiler, compressor, mangle, minify, minifier #+DESCRIPTION: a JavaScript parser/compressor/beautifier in JavaScript #+STYLE: #+AUTHOR: Mihai Bazon #+EMAIL: mihai.bazon@gmail.com * UglifyJS --- a JavaScript parser/compressor/beautifier This package implements a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on [[http://nodejs.org/][NodeJS]], but it should work on any JavaScript platform supporting the CommonJS module system (and if your platform of choice doesn't support CommonJS, you can easily implement it, or discard the =exports.*= lines from UglifyJS sources). The tokenizer/parser generates an abstract syntax tree from JS code. You can then traverse the AST to learn more about the code, or do various manipulations on it. This part is implemented in [[../lib/parse-js.js][parse-js.js]] and it's a port to JavaScript of the excellent [[http://marijn.haverbeke.nl/parse-js/][parse-js]] Common Lisp library from [[http://marijn.haverbeke.nl/][Marijn Haverbeke]]. ( See [[http://github.com/mishoo/cl-uglify-js][cl-uglify-js]] if you're looking for the Common Lisp version of UglifyJS. ) The second part of this package, implemented in [[../lib/process.js][process.js]], inspects and manipulates the AST generated by the parser to provide the following: - ability to re-generate JavaScript code from the AST. Optionally indented---you can use this if you want to “beautify” a program that has been compressed, so that you can inspect the source. But you can also run our code generator to print out an AST without any whitespace, so you achieve compression as well. - shorten variable names (usually to single characters). Our mangler will analyze the code and generate proper variable names, depending on scope and usage, and is smart enough to deal with globals defined elsewhere, or with =eval()= calls or =with{}= statements. In short, if =eval()= or =with{}= are used in some scope, then all variables in that scope and any variables in the parent scopes will remain unmangled, and any references to such variables remain unmangled as well. - various small optimizations that may lead to faster code but certainly lead to smaller code. Where possible, we do the following: - foo["bar"] ==> foo.bar - remove block brackets ={}= - join consecutive var declarations: var a = 10; var b = 20; ==> var a=10,b=20; - resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the replacement if the result occupies less bytes; for example 1/3 would translate to 0.333333333333, so in this case we don't replace it. - consecutive statements in blocks are merged into a sequence; in many cases, this leaves blocks with a single statement, so then we can remove the block brackets. - various optimizations for IF statements: - if (foo) bar(); else baz(); ==> foo?bar():baz(); - if (!foo) bar(); else baz(); ==> foo?baz():bar(); - if (foo) bar(); ==> foo&&bar(); - if (!foo) bar(); ==> foo||bar(); - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - remove some unreachable code and warn about it (code that follows a =return=, =throw=, =break= or =continue= statement, except function/variable declarations). - act a limited version of a pre-processor (c.f. the pre-processor of C/C++) to allow you to safely replace selected global symbols with specified values. When combined with the optimisations above this can make UglifyJS operate slightly more like a compilation process, in that when certain symbols are replaced by constant values, entire code blocks may be optimised away as unreachable. ** <> The following transformations can in theory break code, although they're probably safe in most practical cases. To enable them you need to pass the =--unsafe= flag. *** Calls involving the global Array constructor The following transformations occur: #+BEGIN_SRC js new Array(1, 2, 3, 4) => [1,2,3,4] Array(a, b, c) => [a,b,c] new Array(5) => Array(5) new Array(a) => Array(a) #+END_SRC These are all safe if the Array name isn't redefined. JavaScript does allow one to globally redefine Array (and pretty much everything, in fact) but I personally don't see why would anyone do that. UglifyJS does handle the case where Array is redefined locally, or even globally but with a =function= or =var= declaration. Therefore, in the following cases UglifyJS *doesn't touch* calls or instantiations of Array: #+BEGIN_SRC js // case 1. globally declared variable var Array; new Array(1, 2, 3); Array(a, b); // or (can be declared later) new Array(1, 2, 3); var Array; // or (can be a function) new Array(1, 2, 3); function Array() { ... } // case 2. declared in a function (function(){ a = new Array(1, 2, 3); b = Array(5, 6); var Array; })(); // or (function(Array){ return Array(5, 6, 7); })(); // or (function(){ return new Array(1, 2, 3, 4); function Array() { ... } })(); // etc. #+END_SRC *** =obj.toString()= ==> =obj+“”= ** Install (NPM) UglifyJS is now available through NPM --- =npm install uglify-js= should do the job. ** Install latest code from GitHub #+BEGIN_SRC sh ## clone the repository mkdir -p /where/you/wanna/put/it cd /where/you/wanna/put/it git clone git://github.com/mishoo/UglifyJS.git ## make the module available to Node mkdir -p ~/.node_libraries/ cd ~/.node_libraries/ ln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js ## and if you want the CLI script too: mkdir -p ~/bin cd ~/bin ln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs # (then add ~/bin to your $PATH if it's not there already) #+END_SRC ** Usage There is a command-line tool that exposes the functionality of this library for your shell-scripting needs: #+BEGIN_SRC sh uglifyjs [ options... ] [ filename ] #+END_SRC =filename= should be the last argument and should name the file from which to read the JavaScript code. If you don't specify it, it will read code from STDIN. Supported options: - =-b= or =--beautify= --- output indented code; when passed, additional options control the beautifier: - =-i N= or =--indent N= --- indentation level (number of spaces) - =-q= or =--quote-keys= --- quote keys in literal objects (by default, only keys that cannot be identifier names will be quotes). - =--ascii= --- pass this argument to encode non-ASCII characters as =\uXXXX= sequences. By default UglifyJS won't bother to do it and will output Unicode characters instead. (the output is always encoded in UTF8, but if you pass this option you'll only get ASCII). - =-nm= or =--no-mangle= --- don't mangle variable names - =-ns= or =--no-squeeze= --- don't call =ast_squeeze()= (which does various optimizations that result in smaller, less readable code). - =-mt= or =--mangle-toplevel= --- mangle names in the toplevel scope too (by default we don't do this). - =--no-seqs= --- when =ast_squeeze()= is called (thus, unless you pass =--no-squeeze=) it will reduce consecutive statements in blocks into a sequence. For example, "a = 10; b = 20; foo();" will be written as "a=10,b=20,foo();". In various occasions, this allows us to discard the block brackets (since the block becomes a single statement). This is ON by default because it seems safe and saves a few hundred bytes on some libs that I tested it on, but pass =--no-seqs= to disable it. - =--no-dead-code= --- by default, UglifyJS will remove code that is obviously unreachable (code that follows a =return=, =throw=, =break= or =continue= statement and is not a function/variable declaration). Pass this option to disable this optimization. - =-nc= or =--no-copyright= --- by default, =uglifyjs= will keep the initial comment tokens in the generated code (assumed to be copyright information etc.). If you pass this it will discard it. - =-o filename= or =--output filename= --- put the result in =filename=. If this isn't given, the result goes to standard output (or see next one). - =--overwrite= --- if the code is read from a file (not from STDIN) and you pass =--overwrite= then the output will be written in the same file. - =--ast= --- pass this if you want to get the Abstract Syntax Tree instead of JavaScript as output. Useful for debugging or learning more about the internals. - =-v= or =--verbose= --- output some notes on STDERR (for now just how long each operation takes). - =-d SYMBOL[=VALUE]= or =--define SYMBOL[=VALUE]= --- will replace all instances of the specified symbol where used as an identifier (except where symbol has properly declared by a var declaration or use as function parameter or similar) with the specified value. This argument may be specified multiple times to define multiple symbols - if no value is specified the symbol will be replaced with the value =true=, or you can specify a numeric value (such as =1024=), a quoted string value (such as ="object"= or ='https://github.com'=), or the name of another symbol or keyword (such as =null= or =document=). This allows you, for example, to assign meaningful names to key constant values but discard the symbolic names in the uglified version for brevity/efficiency, or when used wth care, allows UglifyJS to operate as a form of *conditional compilation* whereby defining appropriate values may, by dint of the constant folding and dead code removal features above, remove entire superfluous code blocks (e.g. completely remove instrumentation or trace code for production use). Where string values are being defined, the handling of quotes are likely to be subject to the specifics of your command shell environment, so you may need to experiment with quoting styles depending on your platform, or you may find the option =--define-from-module= more suitable for use. - =-define-from-module SOMEMODULE= --- will load the named module (as per the NodeJS =require()= function) and iterate all the exported properties of the module defining them as symbol names to be defined (as if by the =--define= option) per the name of each property (i.e. without the module name prefix) and given the value of the property. This is a much easier way to handle and document groups of symbols to be defined rather than a large number of =--define= options. - =--unsafe= --- enable other additional optimizations that are known to be unsafe in some contrived situations, but could still be generally useful. For now only these: - foo.toString() ==> foo+"" - new Array(x,...) ==> [x,...] - new Array(x) ==> Array(x) - =--max-line-len= (default 32K characters) --- add a newline after around 32K characters. I've seen both FF and Chrome croak when all the code was on a single line of around 670K. Pass --max-line-len 0 to disable this safety feature. - =--reserved-names= --- some libraries rely on certain names to be used, as pointed out in issue #92 and #81, so this option allow you to exclude such names from the mangler. For example, to keep names =require= and =$super= intact you'd specify --reserved-names "require,$super". - =--inline-script= -- when you want to include the output literally in an HTML =\n\n\n\n
\n\n

UglifyJS – a JavaScript parser/compressor/beautifier

\n\n\n\n\n
\n

1 UglifyJS — a JavaScript parser/compressor/beautifier

\n
\n\n\n

\nThis package implements a general-purpose JavaScript\nparser/compressor/beautifier toolkit. It is developed on NodeJS, but it\nshould work on any JavaScript platform supporting the CommonJS module system\n(and if your platform of choice doesn't support CommonJS, you can easily\nimplement it, or discard the exports.* lines from UglifyJS sources).\n

\n

\nThe tokenizer/parser generates an abstract syntax tree from JS code. You\ncan then traverse the AST to learn more about the code, or do various\nmanipulations on it. This part is implemented in parse-js.js and it's a\nport to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke.\n

\n

\n( See cl-uglify-js if you're looking for the Common Lisp version of\nUglifyJS. )\n

\n

\nThe second part of this package, implemented in process.js, inspects and\nmanipulates the AST generated by the parser to provide the following:\n

\n
    \n
  • \nability to re-generate JavaScript code from the AST. Optionally\nindented—you can use this if you want to “beautify” a program that has\nbeen compressed, so that you can inspect the source. But you can also run\nour code generator to print out an AST without any whitespace, so you\nachieve compression as well.\n\n
  • \n
  • \nshorten variable names (usually to single characters). Our mangler will\nanalyze the code and generate proper variable names, depending on scope\nand usage, and is smart enough to deal with globals defined elsewhere, or\nwith eval() calls or with{} statements. In short, if eval() or\nwith{} are used in some scope, then all variables in that scope and any\nvariables in the parent scopes will remain unmangled, and any references\nto such variables remain unmangled as well.\n\n
  • \n
  • \nvarious small optimizations that may lead to faster code but certainly\nlead to smaller code. Where possible, we do the following:\n\n
      \n
    • \nfoo[\"bar\"] ==> foo.bar\n\n
    • \n
    • \nremove block brackets {}\n\n
    • \n
    • \njoin consecutive var declarations:\nvar a = 10; var b = 20; ==> var a=10,b=20;\n\n
    • \n
    • \nresolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the\nreplacement if the result occupies less bytes; for example 1/3 would\ntranslate to 0.333333333333, so in this case we don't replace it.\n\n
    • \n
    • \nconsecutive statements in blocks are merged into a sequence; in many\ncases, this leaves blocks with a single statement, so then we can remove\nthe block brackets.\n\n
    • \n
    • \nvarious optimizations for IF statements:\n\n
        \n
      • \nif (foo) bar(); else baz(); ==> foo?bar():baz();\n
      • \n
      • \nif (!foo) bar(); else baz(); ==> foo?baz():bar();\n
      • \n
      • \nif (foo) bar(); ==> foo&&bar();\n
      • \n
      • \nif (!foo) bar(); ==> foo||bar();\n
      • \n
      • \nif (foo) return bar(); else return baz(); ==> return foo?bar():baz();\n
      • \n
      • \nif (foo) return bar(); else something(); ==> {if(foo)return bar();something()}\n\n
      • \n
      \n
    • \n
    • \nremove some unreachable code and warn about it (code that follows a\nreturn, throw, break or continue statement, except\nfunction/variable declarations).\n\n
    • \n
    • \nact a limited version of a pre-processor (c.f. the pre-processor of\nC/C++) to allow you to safely replace selected global symbols with\nspecified values. When combined with the optimisations above this can\nmake UglifyJS operate slightly more like a compilation process, in\nthat when certain symbols are replaced by constant values, entire code\nblocks may be optimised away as unreachable.\n
    • \n
    \n
  • \n
\n\n\n\n
\n\n
\n

1.1 Unsafe transformations

\n
\n\n\n

\nThe following transformations can in theory break code, although they're\nprobably safe in most practical cases. To enable them you need to pass the\n--unsafe flag.\n

\n\n
\n\n
\n

1.1.1 Calls involving the global Array constructor

\n
\n\n\n

\nThe following transformations occur:\n

\n\n\n\n
new Array(1, 2, 3, 4)  => [1,2,3,4]\nArray(a, b, c)         => [a,b,c]\nnew Array(5)           => Array(5)\nnew Array(a)           => Array(a)\n
\n\n\n\n

\nThese are all safe if the Array name isn't redefined. JavaScript does allow\none to globally redefine Array (and pretty much everything, in fact) but I\npersonally don't see why would anyone do that.\n

\n

\nUglifyJS does handle the case where Array is redefined locally, or even\nglobally but with a function or var declaration. Therefore, in the\nfollowing cases UglifyJS doesn't touch calls or instantiations of Array:\n

\n\n\n\n
// case 1.  globally declared variable\n  var Array;\n  new Array(1, 2, 3);\n  Array(a, b);\n\n  // or (can be declared later)\n  new Array(1, 2, 3);\n  var Array;\n\n  // or (can be a function)\n  new Array(1, 2, 3);\n  function Array() { ... }\n\n// case 2.  declared in a function\n  (function(){\n    a = new Array(1, 2, 3);\n    b = Array(5, 6);\n    var Array;\n  })();\n\n  // or\n  (function(Array){\n    return Array(5, 6, 7);\n  })();\n\n  // or\n  (function(){\n    return new Array(1, 2, 3, 4);\n    function Array() { ... }\n  })();\n\n  // etc.\n
\n\n\n\n
\n\n
\n\n
\n

1.1.2 obj.toString() ==> obj+“”

\n
\n\n\n
\n
\n\n
\n\n
\n

1.2 Install (NPM)

\n
\n\n\n

\nUglifyJS is now available through NPM — npm install uglify-js should do\nthe job.\n

\n
\n\n
\n\n
\n

1.3 Install latest code from GitHub

\n
\n\n\n\n\n\n
## clone the repository\nmkdir -p /where/you/wanna/put/it\ncd /where/you/wanna/put/it\ngit clone git://github.com/mishoo/UglifyJS.git\n\n## make the module available to Node\nmkdir -p ~/.node_libraries/\ncd ~/.node_libraries/\nln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js\n\n## and if you want the CLI script too:\nmkdir -p ~/bin\ncd ~/bin\nln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs\n  # (then add ~/bin to your $PATH if it's not there already)\n
\n\n\n\n
\n\n
\n\n
\n

1.4 Usage

\n
\n\n\n

\nThere is a command-line tool that exposes the functionality of this library\nfor your shell-scripting needs:\n

\n\n\n\n
uglifyjs [ options... ] [ filename ]\n
\n\n\n\n

\nfilename should be the last argument and should name the file from which\nto read the JavaScript code. If you don't specify it, it will read code\nfrom STDIN.\n

\n

\nSupported options:\n

\n
    \n
  • \n-b or --beautify — output indented code; when passed, additional\noptions control the beautifier:\n\n
      \n
    • \n-i N or --indent N — indentation level (number of spaces)\n\n
    • \n
    • \n-q or --quote-keys — quote keys in literal objects (by default,\nonly keys that cannot be identifier names will be quotes).\n\n
    • \n
    \n
  • \n
  • \n--ascii — pass this argument to encode non-ASCII characters as\n\\uXXXX sequences. By default UglifyJS won't bother to do it and will\noutput Unicode characters instead. (the output is always encoded in UTF8,\nbut if you pass this option you'll only get ASCII).\n\n
  • \n
  • \n-nm or --no-mangle — don't mangle variable names\n\n
  • \n
  • \n-ns or --no-squeeze — don't call ast_squeeze() (which does various\noptimizations that result in smaller, less readable code).\n\n
  • \n
  • \n-mt or --mangle-toplevel — mangle names in the toplevel scope too\n(by default we don't do this).\n\n
  • \n
  • \n--no-seqs — when ast_squeeze() is called (thus, unless you pass\n--no-squeeze) it will reduce consecutive statements in blocks into a\nsequence. For example, \"a = 10; b = 20; foo();\" will be written as\n\"a=10,b=20,foo();\". In various occasions, this allows us to discard the\nblock brackets (since the block becomes a single statement). This is ON\nby default because it seems safe and saves a few hundred bytes on some\nlibs that I tested it on, but pass --no-seqs to disable it.\n\n
  • \n
  • \n--no-dead-code — by default, UglifyJS will remove code that is\nobviously unreachable (code that follows a return, throw, break or\ncontinue statement and is not a function/variable declaration). Pass\nthis option to disable this optimization.\n\n
  • \n
  • \n-nc or --no-copyright — by default, uglifyjs will keep the initial\ncomment tokens in the generated code (assumed to be copyright information\netc.). If you pass this it will discard it.\n\n
  • \n
  • \n-o filename or --output filename — put the result in filename. If\nthis isn't given, the result goes to standard output (or see next one).\n\n
  • \n
  • \n--overwrite — if the code is read from a file (not from STDIN) and you\npass --overwrite then the output will be written in the same file.\n\n
  • \n
  • \n--ast — pass this if you want to get the Abstract Syntax Tree instead\nof JavaScript as output. Useful for debugging or learning more about the\ninternals.\n\n
  • \n
  • \n-v or --verbose — output some notes on STDERR (for now just how long\neach operation takes).\n\n
  • \n
  • \n-d SYMBOL[=VALUE] or --define SYMBOL[=VALUE] — will replace\nall instances of the specified symbol where used as an identifier\n(except where symbol has properly declared by a var declaration or\nuse as function parameter or similar) with the specified value. This\nargument may be specified multiple times to define multiple\nsymbols - if no value is specified the symbol will be replaced with\nthe value true, or you can specify a numeric value (such as\n1024), a quoted string value (such as =\"object\"= or\n='https://github.com'), or the name of another symbol or keyword (such as =null or document). \nThis allows you, for example, to assign meaningful names to key\nconstant values but discard the symbolic names in the uglified\nversion for brevity/efficiency, or when used wth care, allows\nUglifyJS to operate as a form of conditional compilation\nwhereby defining appropriate values may, by dint of the constant\nfolding and dead code removal features above, remove entire\nsuperfluous code blocks (e.g. completely remove instrumentation or\ntrace code for production use).\nWhere string values are being defined, the handling of quotes are\nlikely to be subject to the specifics of your command shell\nenvironment, so you may need to experiment with quoting styles\ndepending on your platform, or you may find the option\n--define-from-module more suitable for use.\n\n
  • \n
  • \n-define-from-module SOMEMODULE — will load the named module (as\nper the NodeJS require() function) and iterate all the exported\nproperties of the module defining them as symbol names to be defined\n(as if by the --define option) per the name of each property\n(i.e. without the module name prefix) and given the value of the\nproperty. This is a much easier way to handle and document groups of\nsymbols to be defined rather than a large number of --define\noptions.\n\n
  • \n
  • \n--unsafe — enable other additional optimizations that are known to be\nunsafe in some contrived situations, but could still be generally useful.\nFor now only these:\n\n
      \n
    • \nfoo.toString() ==> foo+\"\"\n
    • \n
    • \nnew Array(x,…) ==> [x,…]\n
    • \n
    • \nnew Array(x) ==> Array(x)\n\n
    • \n
    \n
  • \n
  • \n--max-line-len (default 32K characters) — add a newline after around\n32K characters. I've seen both FF and Chrome croak when all the code was\non a single line of around 670K. Pass –max-line-len 0 to disable this\nsafety feature.\n\n
  • \n
  • \n--reserved-names — some libraries rely on certain names to be used, as\npointed out in issue #92 and #81, so this option allow you to exclude such\nnames from the mangler. For example, to keep names require and $super\nintact you'd specify –reserved-names \"require,$super\".\n\n
  • \n
  • \n--inline-script – when you want to include the output literally in an\nHTML <script> tag you can use this option to prevent </script from\nshowing up in the output.\n\n
  • \n
  • \n--lift-vars – when you pass this, UglifyJS will apply the following\ntransformations (see the notes in API, ast_lift_variables):\n\n
      \n
    • \nput all var declarations at the start of the scope\n
    • \n
    • \nmake sure a variable is declared only once\n
    • \n
    • \ndiscard unused function arguments\n
    • \n
    • \ndiscard unused inner (named) functions\n
    • \n
    • \nfinally, try to merge assignments into that one var declaration, if\npossible.\n
    • \n
    \n
  • \n
\n\n\n\n
\n\n
\n

1.4.1 API

\n
\n\n\n

\nTo use the library from JavaScript, you'd do the following (example for\nNodeJS):\n

\n\n\n\n
var jsp = require(\"uglify-js\").parser;\nvar pro = require(\"uglify-js\").uglify;\n\nvar orig_code = \"... JS code here\";\nvar ast = jsp.parse(orig_code); // parse code and get the initial AST\nast = pro.ast_mangle(ast); // get a new AST with mangled names\nast = pro.ast_squeeze(ast); // get an AST with compression optimizations\nvar final_code = pro.gen_code(ast); // compressed code here\n
\n\n\n\n

\nThe above performs the full compression that is possible right now. As you\ncan see, there are a sequence of steps which you can apply. For example if\nyou want compressed output but for some reason you don't want to mangle\nvariable names, you would simply skip the line that calls\npro.ast_mangle(ast).\n

\n

\nSome of these functions take optional arguments. Here's a description:\n

\n
    \n
  • \njsp.parse(code, strict_semicolons) – parses JS code and returns an AST.\nstrict_semicolons is optional and defaults to false. If you pass\ntrue then the parser will throw an error when it expects a semicolon and\nit doesn't find it. For most JS code you don't want that, but it's useful\nif you want to strictly sanitize your code.\n\n
  • \n
  • \npro.ast_lift_variables(ast) – merge and move var declarations to the\nscop of the scope; discard unused function arguments or variables; discard\nunused (named) inner functions. It also tries to merge assignments\nfollowing the var declaration into it.\n\n

    \nIf your code is very hand-optimized concerning var declarations, this\nlifting variable declarations might actually increase size. For me it\nhelps out. On jQuery it adds 865 bytes (243 after gzip). YMMV. Also\nnote that (since it's not enabled by default) this operation isn't yet\nheavily tested (please report if you find issues!).\n

    \n

    \nNote that although it might increase the image size (on jQuery it gains\n865 bytes, 243 after gzip) it's technically more correct: in certain\nsituations, dead code removal might drop variable declarations, which\nwould not happen if the variables are lifted in advance.\n

    \n

    \nHere's an example of what it does:\n

    \n
  • \n
\n\n\n\n\n
function f(a, b, c, d, e) {\n    var q;\n    var w;\n    w = 10;\n    q = 20;\n    for (var i = 1; i < 10; ++i) {\n        var boo = foo(a);\n    }\n    for (var i = 0; i < 1; ++i) {\n        var boo = bar(c);\n    }\n    function foo(){ ... }\n    function bar(){ ... }\n    function baz(){ ... }\n}\n\n// transforms into ==>\n\nfunction f(a, b, c) {\n    var i, boo, w = 10, q = 20;\n    for (i = 1; i < 10; ++i) {\n        boo = foo(a);\n    }\n    for (i = 0; i < 1; ++i) {\n        boo = bar(c);\n    }\n    function foo() { ... }\n    function bar() { ... }\n}\n
\n\n\n\n
    \n
  • \npro.ast_mangle(ast, options) – generates a new AST containing mangled\n(compressed) variable and function names. It supports the following\noptions:\n\n
      \n
    • \ntoplevel – mangle toplevel names (by default we don't touch them).\n
    • \n
    • \nexcept – an array of names to exclude from compression.\n
    • \n
    • \ndefines – an object with properties named after symbols to\nreplace (see the --define option for the script) and the values\nrepresenting the AST replacement value.\n\n
    • \n
    \n
  • \n
  • \npro.ast_squeeze(ast, options) – employs further optimizations designed\nto reduce the size of the code that gen_code would generate from the\nAST. Returns a new AST. options can be a hash; the supported options\nare:\n\n
      \n
    • \nmake_seqs (default true) which will cause consecutive statements in a\nblock to be merged using the \"sequence\" (comma) operator\n\n
    • \n
    • \ndead_code (default true) which will remove unreachable code.\n\n
    • \n
    \n
  • \n
  • \npro.gen_code(ast, options) – generates JS code from the AST. By\ndefault it's minified, but using the options argument you can get nicely\nformatted output. options is, well, optional :-) and if you pass it it\nmust be an object and supports the following properties (below you can see\nthe default values):\n\n
      \n
    • \nbeautify: false – pass true if you want indented output\n
    • \n
    • \nindent_start: 0 (only applies when beautify is true) – initial\nindentation in spaces\n
    • \n
    • \nindent_level: 4 (only applies when beautify is true) --\nindentation level, in spaces (pass an even number)\n
    • \n
    • \nquote_keys: false – if you pass true it will quote all keys in\nliteral objects\n
    • \n
    • \nspace_colon: false (only applies when beautify is true) – wether\nto put a space before the colon in object literals\n
    • \n
    • \nascii_only: false – pass true if you want to encode non-ASCII\ncharacters as \\uXXXX.\n
    • \n
    • \ninline_script: false – pass true to escape occurrences of\n</script in strings\n
    • \n
    \n
  • \n
\n\n\n
\n\n
\n\n
\n

1.4.2 Beautifier shortcoming – no more comments

\n
\n\n\n

\nThe beautifier can be used as a general purpose indentation tool. It's\nuseful when you want to make a minified file readable. One limitation,\nthough, is that it discards all comments, so you don't really want to use it\nto reformat your code, unless you don't have, or don't care about, comments.\n

\n

\nIn fact it's not the beautifier who discards comments — they are dumped at\nthe parsing stage, when we build the initial AST. Comments don't really\nmake sense in the AST, and while we could add nodes for them, it would be\ninconvenient because we'd have to add special rules to ignore them at all\nthe processing stages.\n

\n
\n\n
\n\n
\n

1.4.3 Use as a code pre-processor

\n
\n\n\n

\nThe --define option can be used, particularly when combined with the\nconstant folding logic, as a form of pre-processor to enable or remove\nparticular constructions, such as might be used for instrumenting\ndevelopment code, or to produce variations aimed at a specific\nplatform.\n

\n

\nThe code below illustrates the way this can be done, and how the\nsymbol replacement is performed.\n

\n\n\n\n
CLAUSE1: if (typeof DEVMODE === 'undefined') {\n    DEVMODE = true;\n}\n\nCLAUSE2: function init() {\n    if (DEVMODE) {\n        console.log(\"init() called\");\n    }\n    ....\n    DEVMODE &amp;&amp; console.log(\"init() complete\");\n}\n\nCLAUSE3: function reportDeviceStatus(device) {\n    var DEVMODE = device.mode, DEVNAME = device.name;\n    if (DEVMODE === 'open') {\n        ....\n    }\n}\n
\n\n\n\n

\nWhen the above code is normally executed, the undeclared global\nvariable DEVMODE will be assigned the value true (see CLAUSE1)\nand so the init() function (CLAUSE2) will write messages to the\nconsole log when executed, but in CLAUSE3 a locally declared\nvariable will mask access to the DEVMODE global symbol.\n

\n

\nIf the above code is processed by UglifyJS with an argument of\n--define DEVMODE=false then UglifyJS will replace DEVMODE with the\nboolean constant value false within CLAUSE1 and CLAUSE2, but it\nwill leave CLAUSE3 as it stands because there DEVMODE resolves to\na validly declared variable.\n

\n

\nAnd more so, the constant-folding features of UglifyJS will recognise\nthat the if condition of CLAUSE1 is thus always false, and so will\nremove the test and body of CLAUSE1 altogether (including the\notherwise slightly problematical statement false = true; which it\nwill have formed by replacing DEVMODE in the body). Similarly,\nwithin CLAUSE2 both calls to console.log() will be removed\naltogether.\n

\n

\nIn this way you can mimic, to a limited degree, the functionality of\nthe C/C++ pre-processor to enable or completely remove blocks\ndepending on how certain symbols are defined - perhaps using UglifyJS\nto generate different versions of source aimed at different\nenvironments\n

\n

\nIt is recommmended (but not made mandatory) that symbols designed for\nthis purpose are given names consisting of UPPER_CASE_LETTERS to\ndistinguish them from other (normal) symbols and avoid the sort of\nclash that CLAUSE3 above illustrates.\n

\n
\n
\n\n
\n\n
\n

1.5 Compression – how good is it?

\n
\n\n\n

\nHere are updated statistics. (I also updated my Google Closure and YUI\ninstallations).\n

\n

\nWe're still a lot better than YUI in terms of compression, though slightly\nslower. We're still a lot faster than Closure, and compression after gzip\nis comparable.\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
FileUglifyJSUglifyJS+gzipClosureClosure+gzipYUIYUI+gzip
jquery-1.6.2.js91001 (0:01.59)3189690678 (0:07.40)31979101527 (0:01.82)34646
paper.js142023 (0:01.65)43334134301 (0:07.42)42495173383 (0:01.58)48785
prototype.js88544 (0:01.09)2668086955 (0:06.97)2632692130 (0:00.79)28624
thelib-full.js (DynarchLIB)251939 (0:02.55)72535249911 (0:09.05)72696258869 (0:01.94)76584
\n\n\n
\n\n
\n\n
\n

1.6 Bugs?

\n
\n\n\n

\nUnfortunately, for the time being there is no automated test suite. But I\nran the compressor manually on non-trivial code, and then I tested that the\ngenerated code works as expected. A few hundred times.\n

\n

\nDynarchLIB was started in times when there was no good JS minifier.\nTherefore I was quite religious about trying to write short code manually,\nand as such DL contains a lot of syntactic hacks1 such as “foo == bar ? a\n= 10 : b = 20”, though the more readable version would clearly be to use\n“if/else”.\n

\n

\nSince the parser/compressor runs fine on DL and jQuery, I'm quite confident\nthat it's solid enough for production use. If you can identify any bugs,\nI'd love to hear about them (use the Google Group or email me directly).\n

\n
\n\n
\n\n
\n

1.7 Links

\n
\n\n\n\n\n\n
\n\n
\n\n
\n

1.8 License

\n
\n\n\n

\nUglifyJS is released under the BSD license:\n

\n\n\n\n
Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>\nBased on parse-js (http://marijn.haverbeke.nl/parse-js/).\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n    * Redistributions of source code must retain the above\n      copyright notice, this list of conditions and the following\n      disclaimer.\n\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials\n      provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\nTHE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGE.\n
\n\n\n\n\n
\n
\n
\n
\n

Footnotes:

\n
\n

1 I even reported a few bugs and suggested some fixes in the original\nparse-js library, and Marijn pushed fixes literally in minutes.\n

\n
\n
\n
\n

Author: Mihai Bazon\n

\n

Date: 2011-08-29 19:17:55 EEST

\n

HTML generated by org-mode 7.01trans in emacs 23

\n
\n
\n\n\n", "readmeFilename": "README.html", "_id": "uglify-js@1.1.1", "_from": "uglify-js@~1.1.1" } package.json~000066400000000000000000000010761240302775300407630ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js{ "name" : "uglify-js", "description" : "JavaScript parser and compressor/beautifier toolkit", "author" : { "name" : "Mihai Bazon", "email" : "mihai.bazon@gmail.com", "url" : "http://mihai.bazon.net/blog" }, "version" : "1.1.0", "main" : "./uglify-js.js", "bin" : { "uglifyjs" : "./bin/uglifyjs" }, "repository": { "type": "git", "url": "git@github.com:mishoo/UglifyJS.git" } } test/000077500000000000000000000000001240302775300372525ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-jsbeautify.js000066400000000000000000000017611240302775300414250ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test#! /usr/bin/env node global.sys = require("sys"); var fs = require("fs"); var jsp = require("../lib/parse-js"); var pro = require("../lib/process"); var filename = process.argv[2]; fs.readFile(filename, "utf8", function(err, text){ try { var ast = time_it("parse", function(){ return jsp.parse(text); }); ast = time_it("mangle", function(){ return pro.ast_mangle(ast); }); ast = time_it("squeeze", function(){ return pro.ast_squeeze(ast); }); var gen = time_it("generate", function(){ return pro.gen_code(ast, false); }); sys.puts(gen); } catch(ex) { sys.debug(ex.stack); sys.debug(sys.inspect(ex)); sys.debug(JSON.stringify(ex)); } }); function time_it(name, cont) { var t1 = new Date().getTime(); try { return cont(); } finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); } }; testparser.js000066400000000000000000000365611240302775300420170ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test#! /usr/bin/env node var parseJS = require("../lib/parse-js"); var sys = require("sys"); // write debug in a very straightforward manner var debug = function(){ sys.log(Array.prototype.slice.call(arguments).join(', ')); }; ParserTestSuite(function(i, input, desc){ try { parseJS.parse(input); debug("ok " + i + ": " + desc); } catch(e){ debug("FAIL " + i + " " + desc + " (" + e + ")"); } }); function ParserTestSuite(callback){ var inps = [ ["var abc;", "Regular variable statement w/o assignment"], ["var abc = 5;", "Regular variable statement with assignment"], ["/* */;", "Multiline comment"], ['/** **/;', 'Double star multiline comment'], ["var f = function(){;};", "Function expression in var assignment"], ['hi; // moo\n;', 'single line comment'], ['var varwithfunction;', 'Dont match keywords as substrings'], // difference between `var withsomevar` and `"str"` (local search and lits) ['a + b;', 'addition'], ["'a';", 'single string literal'], ["'a\\n';", 'single string literal with escaped return'], ['"a";', 'double string literal'], ['"a\\n";', 'double string literal with escaped return'], ['"var";', 'string is a keyword'], ['"variable";', 'string starts with a keyword'], ['"somevariable";', 'string contains a keyword'], ['"somevar";', 'string ends with a keyword'], ['500;', 'int literal'], ['500.;', 'float literal w/o decimals'], ['500.432;', 'float literal with decimals'], ['.432432;', 'float literal w/o int'], ['(a,b,c);', 'parens and comma'], ['[1,2,abc];', 'array literal'], ['var o = {a:1};', 'object literal unquoted key'], ['var o = {"b":2};', 'object literal quoted key'], // opening curly may not be at the start of a statement... ['var o = {c:c};', 'object literal keyname is identifier'], ['var o = {a:1,"b":2,c:c};', 'object literal combinations'], ['var x;\nvar y;', 'two lines'], ['var x;\nfunction n(){; }', 'function def'], ['var x;\nfunction n(abc){; }', 'function def with arg'], ['var x;\nfunction n(abc, def){ ;}', 'function def with args'], ['function n(){ "hello"; }', 'function def with body'], ['/a/;', 'regex literal'], ['/a/b;', 'regex literal with flag'], ['/a/ / /b/;', 'regex div regex'], ['a/b/c;', 'triple division looks like regex'], ['+function(){/regex/;};', 'regex at start of function body'], // http://code.google.com/p/es-lab/source/browse/trunk/tests/parser/parsertests.js?r=86 // http://code.google.com/p/es-lab/source/browse/trunk/tests/parser/parsertests.js?r=430 // first tests for the lexer, should also parse as program (when you append a semi) // comments ['//foo!@#^&$1234\nbar;', 'single line comment'], ['/* abcd!@#@$* { } && null*/;', 'single line multi line comment'], ['/*foo\nbar*/;','multi line comment'], ['/*x*x*/;','multi line comment with *'], ['/**/;','empty comment'], // identifiers ["x;",'1 identifier'], ["_x;",'2 identifier'], ["xyz;",'3 identifier'], ["$x;",'4 identifier'], ["x$;",'5 identifier'], ["_;",'6 identifier'], ["x5;",'7 identifier'], ["x_y;",'8 identifier'], ["x+5;",'9 identifier'], ["xyz123;",'10 identifier'], ["x1y1z1;",'11 identifier'], ["foo\\u00D8bar;",'12 identifier unicode escape'], //["foo�bar;",'13 identifier unicode embedded (might fail)'], // numbers ["5;", '1 number'], ["5.5;", '2 number'], ["0;", '3 number'], ["0.0;", '4 number'], ["0.001;", '5 number'], ["1.e2;", '6 number'], ["1.e-2;", '7 number'], ["1.E2;", '8 number'], ["1.E-2;", '9 number'], [".5;", '10 number'], [".5e3;", '11 number'], [".5e-3;", '12 number'], ["0.5e3;", '13 number'], ["55;", '14 number'], ["123;", '15 number'], ["55.55;", '16 number'], ["55.55e10;", '17 number'], ["123.456;", '18 number'], ["1+e;", '20 number'], ["0x01;", '22 number'], ["0XCAFE;", '23 number'], ["0x12345678;", '24 number'], ["0x1234ABCD;", '25 number'], ["0x0001;", '26 number'], // strings ["\"foo\";", '1 string'], ["\'foo\';", '2 string'], ["\"x\";", '3 string'], ["\'\';", '4 string'], ["\"foo\\tbar\";", '5 string'], ["\"!@#$%^&*()_+{}[]\";", '6 string'], ["\"/*test*/\";", '7 string'], ["\"//test\";", '8 string'], ["\"\\\\\";", '9 string'], ["\"\\u0001\";", '10 string'], ["\"\\uFEFF\";", '11 string'], ["\"\\u10002\";", '12 string'], ["\"\\x55\";", '13 string'], ["\"\\x55a\";", '14 string'], ["\"a\\\\nb\";", '15 string'], ['";"', '16 string: semi in a string'], ['"a\\\nb";', '17 string: line terminator escape'], // literals ["null;", "null"], ["true;", "true"], ["false;", "false"], // regex ["/a/;", "1 regex"], ["/abc/;", "2 regex"], ["/abc[a-z]*def/g;", "3 regex"], ["/\\b/;", "4 regex"], ["/[a-zA-Z]/;", "5 regex"], // program tests (for as far as they havent been covered above) // regexp ["/foo(.*)/g;", "another regexp"], // arrays ["[];", "1 array"], ["[ ];", "2 array"], ["[1];", "3 array"], ["[1,2];", "4 array"], ["[1,2,,];", "5 array"], ["[1,2,3];", "6 array"], ["[1,2,3,,,];", "7 array"], // objects ["{};", "1 object"], ["({x:5});", "2 object"], ["({x:5,y:6});", "3 object"], ["({x:5,});", "4 object"], ["({if:5});", "5 object"], ["({ get x() {42;} });", "6 object"], ["({ set y(a) {1;} });", "7 object"], // member expression ["o.m;", "1 member expression"], ["o['m'];", "2 member expression"], ["o['n']['m'];", "3 member expression"], ["o.n.m;", "4 member expression"], ["o.if;", "5 member expression"], // call and invoke expressions ["f();", "1 call/invoke expression"], ["f(x);", "2 call/invoke expression"], ["f(x,y);", "3 call/invoke expression"], ["o.m();", "4 call/invoke expression"], ["o['m'];", "5 call/invoke expression"], ["o.m(x);", "6 call/invoke expression"], ["o['m'](x);", "7 call/invoke expression"], ["o.m(x,y);", "8 call/invoke expression"], ["o['m'](x,y);", "9 call/invoke expression"], ["f(x)(y);", "10 call/invoke expression"], ["f().x;", "11 call/invoke expression"], // eval ["eval('x');", "1 eval"], ["(eval)('x');", "2 eval"], ["(1,eval)('x');", "3 eval"], ["eval(x,y);", "4 eval"], // new expression ["new f();", "1 new expression"], ["new o;", "2 new expression"], ["new o.m;", "3 new expression"], ["new o.m(x);", "4 new expression"], ["new o.m(x,y);", "5 new expression"], // prefix/postfix ["++x;", "1 pre/postfix"], ["x++;", "2 pre/postfix"], ["--x;", "3 pre/postfix"], ["x--;", "4 pre/postfix"], ["x ++;", "5 pre/postfix"], ["x /* comment */ ++;", "6 pre/postfix"], ["++ /* comment */ x;", "7 pre/postfix"], // unary operators ["delete x;", "1 unary operator"], ["void x;", "2 unary operator"], ["+ x;", "3 unary operator"], ["-x;", "4 unary operator"], ["~x;", "5 unary operator"], ["!x;", "6 unary operator"], // meh ["new Date++;", "new date ++"], ["+x++;", " + x ++"], // expression expressions ["1 * 2;", "1 expression expressions"], ["1 / 2;", "2 expression expressions"], ["1 % 2;", "3 expression expressions"], ["1 + 2;", "4 expression expressions"], ["1 - 2;", "5 expression expressions"], ["1 << 2;", "6 expression expressions"], ["1 >>> 2;", "7 expression expressions"], ["1 >> 2;", "8 expression expressions"], ["1 * 2 + 3;", "9 expression expressions"], ["(1+2)*3;", "10 expression expressions"], ["1*(2+3);", "11 expression expressions"], ["xy;", "13 expression expressions"], ["x<=y;", "14 expression expressions"], ["x>=y;", "15 expression expressions"], ["x instanceof y;", "16 expression expressions"], ["x in y;", "17 expression expressions"], ["x&y;", "18 expression expressions"], ["x^y;", "19 expression expressions"], ["x|y;", "20 expression expressions"], ["x+y>>= y;", "1 assignment"], ["x <<= y;", "2 assignment"], ["x = y;", "3 assignment"], ["x += y;", "4 assignment"], ["x /= y;", "5 assignment"], // comma ["x, y;", "comma"], // block ["{};", "1 block"], ["{x;};", "2 block"], ["{x;y;};", "3 block"], // vars ["var x;", "1 var"], ["var x,y;", "2 var"], ["var x=1,y=2;", "3 var"], ["var x,y=2;", "4 var"], // empty [";", "1 empty"], ["\n;", "2 empty"], // expression statement ["x;", "1 expression statement"], ["5;", "2 expression statement"], ["1+2;", "3 expression statement"], // if ["if (c) x; else y;", "1 if statement"], ["if (c) x;", "2 if statement"], ["if (c) {} else {};", "3 if statement"], ["if (c1) if (c2) s1; else s2;", "4 if statement"], // while ["do s; while (e);", "1 while statement"], ["do { s; } while (e);", "2 while statement"], ["while (e) s;", "3 while statement"], ["while (e) { s; };", "4 while statement"], // for ["for (;;) ;", "1 for statement"], ["for (;c;x++) x;", "2 for statement"], ["for (i;i> 1; var c = 8 >>> 1;issue34.js000066400000000000000000000000511240302775300446740ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testvar a = {}; a["this"] = 1; a["that"] = 2;issue4.js000066400000000000000000000000501240302775300446100ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testvar a = 2e3; var b = 2e-3; var c = 2e-5;issue48.js000066400000000000000000000000301240302775300446760ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testvar s, i; s = ''; i = 0;issue50.js000066400000000000000000000003421240302775300446750ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testfunction bar(a) { try { foo(); } catch(e) { alert("Exception caught (foo not defined)"); } alert(a); // 10 in FF, "[object Error]" in IE } bar(10); issue53.js000066400000000000000000000000131240302775300446730ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testx = (y, z) issue54.1.js000066400000000000000000000000641240302775300450410ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testfoo.toString(); a.toString(16); b.toString.call(c); issue68.js000066400000000000000000000001151240302775300447040ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testfunction f() { if (a) return; g(); function g(){} }; issue69.js000066400000000000000000000000101240302775300446770ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test[(a,b)] issue9.js000066400000000000000000000000671240302775300446250ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testvar a = { a: 1, b: 2, // <-- trailing comma }; mangle.js000066400000000000000000000001251240302775300446420ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test(function() { var x = function fun(a, fun, b) { return fun; }; }()); null_string.js000066400000000000000000000000251240302775300457360ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testvar nullString = "\0"strict-equals.js000066400000000000000000000000701240302775300461760ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testtypeof a === 'string' b + "" !== c + "" d < e === f < g var.js000066400000000000000000000001151240302775300441660ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/test// var declarations after each other should be combined var a = 1; var b = 2;whitespace.js000066400000000000000000000006701240302775300455400ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testfunction id(a) { // Form-Feed // Vertical Tab // No-Break Space ᠎// Mongolian Vowel Separator  // En quad  // Em quad  // En space  // Em space  // Three-Per-Em Space  // Four-Per-Em Space  // Six-Per-Em Space  // Figure Space  // Punctuation Space  // Thin Space  // Hair Space  // Narrow No-Break Space  // Medium Mathematical Space  // Ideographic Space return a; } with.js000066400000000000000000000000161240302775300443510ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unit/compress/testwith({}) { }; scripts.js000066400000000000000000000027531240302775300422650ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/test/unitvar fs = require('fs'), uglify = require('uglify-js'), jsp = uglify.parser, nodeunit = require('nodeunit'), path = require('path'), pro = uglify.uglify; var Script = process.binding('evals').Script; var scriptsPath = __dirname; function compress(code) { var ast = jsp.parse(code); ast = pro.ast_mangle(ast); ast = pro.ast_squeeze(ast, { no_warnings: true }); ast = pro.ast_squeeze_more(ast); return pro.gen_code(ast); }; var testDir = path.join(scriptsPath, "compress", "test"); var expectedDir = path.join(scriptsPath, "compress", "expected"); function getTester(script) { return function(test) { var testPath = path.join(testDir, script); var expectedPath = path.join(expectedDir, script); var content = fs.readFileSync(testPath, 'utf-8'); var outputCompress = compress(content); // Check if the noncompressdata is larger or same size as the compressed data test.ok(content.length >= outputCompress.length); // Check that a recompress gives the same result var outputReCompress = compress(content); test.equal(outputCompress, outputReCompress); // Check if the compressed output is what is expected var expected = fs.readFileSync(expectedPath, 'utf-8'); test.equal(outputCompress, expected.replace(/(\r?\n)+$/, "")); test.done(); }; }; var tests = {}; var scripts = fs.readdirSync(testDir); for (var i in scripts) { var script = scripts[i]; if (/\.js$/.test(script)) { tests[script] = getTester(script); } } module.exports = nodeunit.testCase(tests); tmp/000077500000000000000000000000001240302775300370735ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-jshoist.js000066400000000000000000000012271240302775300405610ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmpfunction foo(arg1, arg2, arg3, arg4, arg5, arg6) { var a = 5; { var d = 10, mak = 20, buz = 30; var q = buz * 2; } if (moo) { var a, b, c; } for (var arg1 = 0, d = 20; arg1 < 10; ++arg1) console.log(arg3); for (var i in mak) {} for (j in d) {} var d; function test() { }; //test(); (function moo(first, second){ console.log(first); })(1); (function moo(first, second){ console.log(moo()); })(1); } var foo; var bar; instrument.js000066400000000000000000000063711240302775300416500ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp// sample on how to use the parser and walker API to instrument some code var jsp = require("uglify-js").parser; var pro = require("uglify-js").uglify; function instrument(code) { var ast = jsp.parse(code, false, true); // true for the third arg specifies that we want // to have start/end tokens embedded in the // statements var w = pro.ast_walker(); // we're gonna need this to push elements that we're currently looking at, to avoid // endless recursion. var analyzing = []; function do_stat() { var ret; if (this[0].start && analyzing.indexOf(this) < 0) { // without the `analyzing' hack, w.walk(this) would re-enter here leading // to infinite recursion analyzing.push(this); ret = [ "splice", // XXX: "block" is safer [ [ "stat", [ "call", [ "name", "trace" ], [ [ "string", this[0].toString() ], [ "num", this[0].start.line ], [ "num", this[0].start.col ], [ "num", this[0].end.line ], [ "num", this[0].end.col ]]]], w.walk(this) ]]; analyzing.pop(this); } return ret; }; var new_ast = w.with_walkers({ "stat" : do_stat, "label" : do_stat, "break" : do_stat, "continue" : do_stat, "debugger" : do_stat, "var" : do_stat, "const" : do_stat, "return" : do_stat, "throw" : do_stat, "try" : do_stat, "defun" : do_stat, "if" : do_stat, "while" : do_stat, "do" : do_stat, "for" : do_stat, "for-in" : do_stat, "switch" : do_stat, "with" : do_stat }, function(){ return w.walk(ast); }); return pro.gen_code(new_ast, { beautify: true }); } ////// test code follows. var code = instrument(test.toString()); console.log(code); function test() { // simple stats a = 5; c += a + b; "foo"; // var var foo = 5; const bar = 6, baz = 7; // switch block. note we can't track case lines the same way. switch ("foo") { case "foo": return 1; case "bar": return 2; } // for/for in for (var i = 0; i < 5; ++i) { console.log("Hello " + i); } for (var i in [ 1, 2, 3]) { console.log(i); } // note however that the following is broken. I guess we // should add the block brackets in this case... for (var i = 0; i < 5; ++i) console.log("foo"); } instrument2.js000066400000000000000000000107471240302775300417340ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp// sample on how to use the parser and walker API to instrument some code var jsp = require("uglify-js").parser; var pro = require("uglify-js").uglify; function instrument(code) { var ast = jsp.parse(code, false, true); // true for the third arg specifies that we want // to have start/end tokens embedded in the // statements var w = pro.ast_walker(); function trace (line, comment) { var code = pro.gen_code(line, { beautify: true }); var data = line[0] var args = [] if (!comment) comment = "" if (typeof data === "object") { code = code.split(/\n/).shift() args = [ [ "string", data.toString() ], [ "string", code ], [ "num", data.start.line ], [ "num", data.start.col ], [ "num", data.end.line ], [ "num", data.end.col ]] } else { args = [ [ "string", data ], [ "string", code ]] } return [ "call", [ "name", "trace" ], args ]; } // we're gonna need this to push elements that we're currently looking at, to avoid // endless recursion. var analyzing = []; function do_stat() { var ret; if (this[0].start && analyzing.indexOf(this) < 0) { // without the `analyzing' hack, w.walk(this) would re-enter here leading // to infinite recursion analyzing.push(this); ret = [ "splice", [ [ "stat", trace(this) ], w.walk(this) ]]; analyzing.pop(this); } return ret; } function do_cond(c, t, f) { return [ this[0], w.walk(c), ["seq", trace(t), w.walk(t) ], ["seq", trace(f), w.walk(f) ]]; } function do_binary(c, l, r) { if (c !== "&&" && c !== "||") { return [this[0], c, w.walk(l), w.walk(r)]; } return [ this[0], c, ["seq", trace(l), w.walk(l) ], ["seq", trace(r), w.walk(r) ]]; } var new_ast = w.with_walkers({ "stat" : do_stat, "label" : do_stat, "break" : do_stat, "continue" : do_stat, "debugger" : do_stat, "var" : do_stat, "const" : do_stat, "return" : do_stat, "throw" : do_stat, "try" : do_stat, "defun" : do_stat, "if" : do_stat, "while" : do_stat, "do" : do_stat, "for" : do_stat, "for-in" : do_stat, "switch" : do_stat, "with" : do_stat, "conditional" : do_cond, "binary" : do_binary }, function(){ return w.walk(ast); }); return pro.gen_code(new_ast, { beautify: true }); } ////// test code follows. var code = instrument(test.toString()); console.log(code); function test() { // simple stats a = 5; c += a + b; "foo"; // var var foo = 5; const bar = 6, baz = 7; // switch block. note we can't track case lines the same way. switch ("foo") { case "foo": return 1; case "bar": return 2; } // for/for in for (var i = 0; i < 5; ++i) { console.log("Hello " + i); } for (var i in [ 1, 2, 3]) { console.log(i); } for (var i = 0; i < 5; ++i) console.log("foo"); for (var i = 0; i < 5; ++i) { console.log("foo"); } var k = plurp() ? 1 : 0; var x = a ? doX(y) && goZoo("zoo") : b ? blerg({ x: y }) : null; var x = X || Y; } test.js000066400000000000000000000014701240302775300404120ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js/tmp#! /usr/bin/env node global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util"); var fs = require("fs"); var uglify = require("uglify-js"), // symlink ~/.node_libraries/uglify-js.js to ../uglify-js.js jsp = uglify.parser, pro = uglify.uglify; var code = fs.readFileSync("hoist.js", "utf8"); var ast = jsp.parse(code); ast = pro.ast_lift_variables(ast); var w = pro.ast_walker(); ast = w.with_walkers({ "function": function() { var node = w.dive(this); // walk depth first console.log(pro.gen_code(node, { beautify: true })); return node; }, "name": function(name) { return [ this[0], "X" ]; } }, function(){ return w.walk(ast); }); console.log(pro.gen_code(ast, { beautify: true })); uglify-js.js000066400000000000000000000012321240302775300405400ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/node_modules/uglify-js//convienence function(src, [options]); function uglify(orig_code, options){ options || (options = {}); var jsp = uglify.parser; var pro = uglify.uglify; var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations var final_code = pro.gen_code(ast, options.gen_options); // compressed code here return final_code; }; uglify.parser = require("./lib/parse-js"); uglify.uglify = require("./lib/process"); module.exports = uglifypackage.json000066400000000000000000000113131240302775300341720ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito{ "name": "burrito", "description": "Wrap up expressions with a trace function while walking the AST with rice and beans on the side", "version": "0.2.12", "repository": { "type": "git", "url": "git://github.com/substack/node-burrito.git" }, "main": "./index.js", "keywords": [ "trace", "ast", "walk", "syntax", "source", "tree", "uglify" ], "directories": { "lib": ".", "example": "example", "test": "test" }, "scripts": { "test": "tap test/*.js" }, "dependencies": { "traverse": "~0.5.1", "uglify-js": "~1.1.1" }, "devDependencies": { "tap": "~0.2.5" }, "engines": { "node": ">=0.4.0" }, "license": "BSD", "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "readme": "burrito\n=======\n\nBurrito makes it easy to do crazy stuff with the javascript AST.\n\nThis is super useful if you want to roll your own stack traces or build a code\ncoverage tool.\n\n[![build status](https://secure.travis-ci.org/substack/node-burrito.png)](http://travis-ci.org/substack/node-burrito)\n\n![node.wrap(\"burrito\")](http://substack.net/images/burrito.png)\n\nexamples\n========\n\nmicrowave\n---------\n\nexamples/microwave.js\n\n````javascript\nvar burrito = require('burrito');\n\nvar res = burrito.microwave('Math.sin(2)', function (node) {\n if (node.name === 'num') node.wrap('Math.PI / %s');\n});\n\nconsole.log(res); // sin(pi / 2) == 1\n````\n\noutput:\n\n 1\n\nwrap\n----\n\nexamples/wrap.js\n\n````javascript\nvar burrito = require('burrito');\n\nvar src = burrito('f() && g(h())\\nfoo()', function (node) {\n if (node.name === 'call') node.wrap('qqq(%s)');\n});\n\nconsole.log(src);\n````\n\noutput:\n\n qqq(f()) && qqq(g(qqq(h())));\n\n qqq(foo());\n\nmethods\n=======\n\n var burrito = require('burrito');\n\nburrito(code, cb)\n-----------------\n\nGiven some source `code` and a function `trace`, walk the ast by expression.\n\nThe `cb` gets called with a node object described below.\n\nIf `code` is an Array then it is assumbed to be an AST which you can generate\nyourself with `burrito.parse()`. The AST must be annotated, so make sure to\n`burrito.parse(src, false, true)`.\n\nburrito.microwave(code, context={}, cb)\n---------------------------------------\n\nLike `burrito()` except the result is run using\n`vm.runInNewContext(res, context)`.\n\nnode object\n===========\n\nnode.name\n---------\n\nName is a string that contains the type of the expression as named by uglify.\n\nnode.wrap(s)\n------------\n\nWrap the current expression in `s`.\n\nIf `s` is a string, `\"%s\"` will be replaced with the stringified current\nexpression.\n\nIf `s` is a function, it is called with the stringified current expression and\nshould return a new stringified expression.\n\nIf the `node.name === \"binary\"`, you get the subterms \"%a\" and \"%b\" to play with\ntoo. These subterms are applied if `s` is a function too: `s(expr, a, b)`.\n\nProtip: to insert multiple statements you can use javascript's lesser-known block\nsyntax that it gets from C:\n\n````javascript\nif (node.name === 'stat') node.wrap('{ foo(); %s }')\n````\n\nnode.node\n---------\n\nraw ast data generated by uglify\n\nnode.value\n----------\n\n`node.node.slice(1)` to skip the annotations\n\nnode.start\n----------\n\nThe start location of the expression, like this:\n\n````javascript\n{ type: 'name',\n value: 'b',\n line: 0,\n col: 3,\n pos: 3,\n nlb: false,\n comments_before: [] }\n````\n\nnode.end\n--------\n\nThe end location of the expression, formatted the same as `node.start`.\n\nnode.state\n----------\n\nThe state of the traversal using traverse.\n\nnode.source()\n-------------\n\nReturns a stringified version of the expression.\n\nnode.parent()\n-------------\n\nReturns the parent `node` or `null` if the node is the root element.\n\nnode.label()\n------------\n\nReturn the label of the present node or `null` if there is no label.\n\nLabels are returned for \"call\", \"var\", \"defun\", and \"function\" nodes.\n\nReturns an array for \"var\" nodes since `var` statements can\ncontain multiple labels in assignment.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) you can just:\n\n npm install burrito\n\nin the browser\n==============\n\nBurrito works in browser with\n[browserify](https://github.com/substack/node-browserify).\n\nIt has been tested against:\n\n* Internet Explorer 5.5, 6.0, 7.0, 8.0, 9.0\n* Firefox 3.5\n* Chrome 6.0\n* Opera 10.6\n* Safari 5.0\n\nkudos\n=====\n\nHeavily inspired by (and previously mostly lifted outright from) isaacs's nifty\ntmp/instrument.js thingy from uglify-js.\n", "readmeFilename": "README.markdown", "_id": "burrito@0.2.12", "_from": "burrito@>=0.2.5 <0.3" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/test/000077500000000000000000000000001240302775300327435ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/test/ast.js000066400000000000000000000014251240302775300340720ustar00rootroot00000000000000var test = require('tap').test; var burrito = require('../'); var vm = require('vm'); test('ast', function (t) { t.plan(2); var ast = burrito.parse('f(g(h(5)))', false, true); var src = burrito(ast, function (node) { if (node.name === 'call') { node.wrap(function (s) { return 'z(' + s + ')'; }); } }); var times = 0; t.equal( vm.runInNewContext(src, { f : function (x) { return x + 1 }, g : function (x) { return x + 2 }, h : function (x) { return x + 3 }, z : function (x) { times ++; return x * 10; }, }), (((((5 + 3) * 10) + 2) * 10) + 1) * 10 ); t.equal(times, 3); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/test/err.js000066400000000000000000000023411240302775300340710ustar00rootroot00000000000000var test = require('tap').test; var burrito = require('../'); test('wrap error', function (t) { t.plan(6); try { var src = burrito('f() && g()', function (node) { if (node.name === 'binary') node.wrap('h(%a, %b') }); t.fail('should have blown up'); } catch (err) { t.ok(err.message.match(/unexpected/i)); t.ok(err instanceof SyntaxError); t.ok(!err.stack.match(/uglify-js/)); t.equal(err.line, 0); t.equal(err.col, 10); t.equal(err.pos, 10); } }); test('non string', function (t) { t.plan(3); t.throws(function () { burrito.parse(new Buffer('[]')); }); t.throws(function () { burrito.parse(new String('[]')); }); t.throws(function () { burrito.parse(); }); }); test('syntax error', function (t) { t.plan(3); try { var src = burrito('f() && g())', function (node) { if (node.name === 'binary') node.wrap('h(%a, %b)') }); assert.fail('should have blown up'); } catch (err) { t.ok(err.message.match(/unexpected/i)); t.ok(err instanceof SyntaxError); t.ok(!err.stack.match(/uglify-js/)); } }); fail.js000066400000000000000000000003511240302775300341340ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/testvar burrito = require('../'); var test = require('tap').test; var fs = require('fs'); var src = fs.readFileSync(__dirname + '/fail/src.js', 'utf8'); test('fail', function (t) { burrito(src, function (node) {}); t.end(); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/test/fail/000077500000000000000000000000001240302775300336565ustar00rootroot00000000000000src.js000066400000000000000000000026571240302775300347360ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/test/failvar path = require('path') module.exports = function(fs, ready) { var global_files = {} var recurse = function(dir, okay) { fs.readdir(dir, function(err, dir_files) { var countdown = 0 , files = [] , dirs = [] , checked = 0 dir_files.forEach(function(file, idx, all) { fs.stat(path.join(dir, file), function(err, stat) { if(stat.isDirectory() && !/node_modules/g.test(dir)) { dirs.push(file) } else if(/\.js$/g.test(file)) { files.push(file) } if(++checked >= dir_files.length) recurse_dirs() }) }) function recurse_dirs() { var total = 0 dirs.forEach(function(this_dir) { recurse(path.join(dir, this_dir), function(err, data) { if(++total >= dirs.length) recurse_files() }) }) if(!dirs.length) recurse_files() } function recurse_files() { var total = 0 files.forEach(function(file) { fs.readFile(path.join(dir, file), 'utf8', function(err, src) { global_files[path.join(dir, file)] = src ++total >= files.length && okay(null, global_files) }) }) if(!files.length) okay(null, global_files) } if(!dir_files.length) okay(null, global_files) }) } recurse('.', ready) } label.js000066400000000000000000000036121240302775300343030ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/testvar test = require('tap').test; var burrito = require('../'); test('call label', function (t) { t.plan(1); burrito('foo(10)', function (node) { if (node.name === 'call') { t.equal(node.label(), 'foo'); } }); }); test('var label', function (t) { t.plan(1); burrito('var x = 2', function (node) { if (node.name === 'var') { t.same(node.label(), [ 'x' ]); } }); }); test('vars label', function (t) { t.plan(1); burrito('var x = 2, y = 3', function (node) { if (node.name === 'var') { t.same(node.label(), [ 'x', 'y' ]); } }); }); test('defun label', function (t) { t.plan(1); burrito('function moo () {}', function (node) { if (node.name === 'defun') { t.same(node.label(), 'moo'); } }); }); test('function label', function (t) { t.plan(1); burrito('(function zzz () {})()', function (node) { if (node.name === 'function') { t.same(node.label(), 'zzz'); } }); }); test('anon function label', function (t) { t.plan(1); burrito('(function () {})()', function (node) { if (node.name === 'function') { t.equal(node.label(), null); } }); }); test('dot call label', function (t) { t.plan(1); burrito('process.nextTick(fn)', function (node) { if (node.name === 'call') { t.equal(node.label(), 'nextTick'); } }); }); test('triple dot label', function (t) { t.plan(1); burrito('a.b.c(fn)', function (node) { if (node.name === 'call') { t.equal(node.label(), 'c'); } }); }); test('expr label', function (t) { t.plan(1); burrito('a.b[x+1](fn)', function (node) { if (node.name === 'call') { t.ok(node.label() === null); } }); }); microwave.js000066400000000000000000000015501240302775300352170ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/testvar test = require('tap').test; var burrito = require('../'); test('microwave', function (t) { t.plan(4); var context = { f : function (x) { return x + 1 }, g : function (x) { return x + 2 }, h : function (x) { return x + 3 }, z : function (x) { t.ok(true); // 3 times return x * 10; }, }; var res = burrito.microwave('f(g(h(5)))', context, function (node) { if (node.name === 'call') { node.wrap(function (s) { return 'z(' + s + ')'; }); } }); t.equal(res, (((((5 + 3) * 10) + 2) * 10) + 1) * 10); }); test('empty context', function (t) { var res = burrito.microwave('Math.sin(2)', function (node) { if (node.name === 'num') node.wrap('Math.PI / %s'); }); t.equal(res, 1); t.end(); }); parent.js000066400000000000000000000014061240302775300345140ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/testvar test = require('tap').test; var burrito = require('../'); test('check parent', function (t) { t.plan(5); var src = 'Math.tan(0) + Math.sin(0)'; var res = burrito.microwave(src, function (node) { if (node.name === 'binary') { node.wrap('%a - %b'); } else if (node.name === 'num') { t.equal(node.parent().value[0][0], 'dot'); var fn = node.parent().value[0][2]; if (fn === 'sin') { node.wrap('Math.PI / 2'); } else if (fn === 'tan') { node.wrap('Math.PI / 4'); } else t.fail('Unknown fn'); } }); t.equal(res, Math.tan(Math.PI / 4) - Math.sin(Math.PI / 2)); // ~ 0 }); wrap.js000066400000000000000000000076221240302775300342020ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/node_modules/burrito/testvar test = require('tap').test; var burrito = require('../'); var vm = require('vm'); test('preserve ternary parentheses', function (t) { var originalSource = '"anything" + (x ? y : z) + "anything"'; var burritoSource = burrito(originalSource, function (node) { // do nothing. we just want to check that ternary parens are persisted }); var ctxt = { x : false, y : 'y_'+~~(Math.random()*10), z : 'z_'+~~(Math.random()*10) }; var expectedOutput = vm.runInNewContext(originalSource, ctxt); var burritoOutput = vm.runInNewContext(burritoSource, ctxt); t.equal(burritoOutput, expectedOutput); ctxt.x = true; expectedOutput = vm.runInNewContext(originalSource, ctxt); burritoOutput = vm.runInNewContext(burritoSource, ctxt); t.equal(burritoOutput, expectedOutput); t.end(); }); test('wrap calls', function (t) { t.plan(20); var src = burrito('f() && g(h())\nfoo()', function (node) { if (node.name === 'call') node.wrap('qqq(%s)'); if (node.name === 'binary') node.wrap('bbb(%s)'); t.ok(node.state); t.equal(this, node.state); }); var times = { bbb : 0, qqq : 0 }; var res = []; vm.runInNewContext(src, { bbb : function (x) { times.bbb ++; res.push(x); return x; }, qqq : function (x) { times.qqq ++; res.push(x); return x; }, f : function () { return true }, g : function (h) { t.equal(h, 7); return h !== 7 }, h : function () { return 7 }, foo : function () { return 'foo!' }, }); t.same(res, [ true, // f() 7, // h() false, // g(h()) false, // f() && g(h()) 'foo!', // foo() ]); t.equal(times.bbb, 1); t.equal(times.qqq, 4); t.end(); }); test('wrap fn', function (t) { var src = burrito('f(g(h(5)))', function (node) { if (node.name === 'call') { node.wrap(function (s) { return 'z(' + s + ')'; }); } }); var times = 0; t.equal( vm.runInNewContext(src, { f : function (x) { return x + 1 }, g : function (x) { return x + 2 }, h : function (x) { return x + 3 }, z : function (x) { times ++; return x * 10; }, }), (((((5 + 3) * 10) + 2) * 10) + 1) * 10 ); t.equal(times, 3); t.end(); }); test('binary string', function (t) { var src = 'z(x + y)'; var context = { x : 3, y : 4, z : function (n) { return n * 10 }, }; var res = burrito.microwave(src, context, function (node) { if (node.name === 'binary') { node.wrap('%a*2 - %b*2'); } }); t.equal(res, 10 * (3*2 - 4*2)); t.end(); }); test('binary fn', function (t) { var src = 'z(x + y)'; var context = { x : 3, y : 4, z : function (n) { return n * 10 }, }; var res = burrito.microwave(src, context, function (node) { if (node.name === 'binary') { node.wrap(function (expr, a, b) { return '(' + a + ')*2 - ' + '(' + b + ')*2'; }); } }); t.equal(res, 10 * (3*2 - 4*2)); t.end(); }); test('intersperse', function (t) { var src = '(' + (function () { f(); g(); }).toString() + ')()'; var times = { f : 0, g : 0, zzz : 0 }; var context = { f : function () { times.f ++ }, g : function () { times.g ++ }, zzz : function () { times.zzz ++ }, }; burrito.microwave(src, context, function (node) { if (node.name === 'stat') node.wrap('{ zzz(); %s }'); }); t.same(times, { f : 1, g : 1, zzz : 3 }); t.end(); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/package.json000066400000000000000000000050571240302775300301160ustar00rootroot00000000000000{ "name": "bunker", "version": "0.1.2", "description": "code coverage in native javascript", "main": "index.js", "directories": { "lib": ".", "example": "example", "test": "test" }, "dependencies": { "burrito": ">=0.2.5 <0.3" }, "devDependencies": { "tap": "~0.2.4" }, "scripts": { "test": "tap test/*.js" }, "repository": { "type": "git", "url": "http://github.com/substack/node-bunker.git" }, "keywords": [ "code", "coverage" ], "author": { "name": "James Halliday", "email": "mail@substack.net", "url": "http://substack.net" }, "license": "MIT/X11", "engine": { "node": ">=0.4" }, "readme": "bunker\n======\n\nBunker is a module to calculate code coverage using native javascript\n[burrito](https://github.com/substack/node-burrito) AST trickery.\n\n[![build status](https://secure.travis-ci.org/substack/node-bunker.png)](http://travis-ci.org/substack/node-bunker)\n\n![code coverage](http://substack.net/images/code_coverage.png)\n\nexamples\n========\n\ntiny\n----\n\n````javascript\nvar bunker = require('bunker');\nvar b = bunker('var x = 0; for (var i = 0; i < 30; i++) { x++ }');\n\nvar counts = {};\n\nb.on('node', function (node) {\n if (!counts[node.id]) {\n counts[node.id] = { times : 0, node : node };\n }\n counts[node.id].times ++;\n});\n\nb.run();\n\nObject.keys(counts).forEach(function (key) {\n var count = counts[key];\n console.log(count.times + ' : ' + count.node.source());\n});\n````\n\noutput:\n\n $ node example/tiny.js \n 1 : var x=0;\n 31 : i<30\n 30 : i++\n 30 : x++;\n 30 : x++\n\nmethods\n=======\n\nvar bunker = require('bunker');\n\nvar b = bunker(src)\n-------------------\n\nCreate a new bunker code coverageifier with some source `src`.\n\nThe bunker object `b` is an `EventEmitter` that emits `'node'` events with two\nparameters:\n\n* `node` - the [burrito](https://github.com/substack/node-burrito) node object\n* `stack` - the stack, [stackedy](https://github.com/substack/node-stackedy) style\n\nb.include(src)\n--------------\n\nInclude some source into the bunker.\n\nb.compile()\n-----------\n\nReturn the source wrapped with burrito.\n\nb.assign(context={})\n--------------------\n\nAssign the statement-tracking functions into `context`.\n\nb.run(context={})\n-----------------\n\nRun the source using `vm.runInNewContext()` with some `context`.\nThe statement-tracking functions will be added to `context` by `assign()`.\n", "readmeFilename": "README.markdown", "_id": "bunker@0.1.2", "_from": "bunker@0.1.2" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/test/000077500000000000000000000000001240302775300266005ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/test/cover.js000066400000000000000000000017231240302775300302570ustar00rootroot00000000000000var test = require('tap').test; var bunker = require('../'); var fs = require('fs'); var src = fs.readdirSync(__dirname + '/src').reduce(function (acc, file) { acc[file] = fs.readFileSync(__dirname + '/src/' + file, 'utf8'); return acc; }, {}); test('cover', function (t) { t.plan(1); var b = bunker(src['cover.js']); var counts = {}; b.on('node', function (node) { counts[node.name] = (counts[node.name] || 0) + 1; }); b.run({ setInterval : setInterval, clearInterval : function () { process.nextTick(function () { t.same(counts, { binary : 11, 'unary-postfix' : 11, 'var' : 2, call : 2, // setInterval and clearInterval stat : 1, // clearInterval }); }); return clearInterval.apply(this, arguments); }, }); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/test/return.js000066400000000000000000000011151240302775300304530ustar00rootroot00000000000000var test = require('tap').test; var bunker = require('../'); test('cover', function (t) { t.plan(1); var b = bunker('(' + function () { function foo () {} function bar () {} (function () { return foo(); })(); } + ')()'); var counts = {}; b.on('node', function (node) { counts[node.name] = (counts[node.name] || 0) + 1; }); b.run(); process.nextTick(function () { t.same(counts, { stat : 2, call : 2, return : 1, }); }); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/test/src/000077500000000000000000000000001240302775300273675ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/bunker/test/src/cover.js000066400000000000000000000001551240302775300310440ustar00rootroot00000000000000var i = 0; var iv = setInterval(function () { if (i++ === 10) { clearInterval(iv); } }, 10); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/000077500000000000000000000000001240302775300261675ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/.npmignore000066400000000000000000000000101240302775300301550ustar00rootroot00000000000000lib-cov node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/History.md000066400000000000000000000000711240302775300301500ustar00rootroot00000000000000 0.0.1 / 2011-01-03 ================== Initial release node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/Makefile000066400000000000000000000003541240302775300276310ustar00rootroot00000000000000 test: @NODE_ENV=test ./support/expresso/bin/expresso \ -I lib \ -I support \ -I support/should.js/lib \ -I support/colors.js \ $(TESTFLAGS) \ test/*.test.js test-cov: @TESTFLAGS=--cov $(MAKE) test .PHONY: test test-cov node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/README.md000066400000000000000000000042741240302775300274550ustar00rootroot00000000000000CLI Table ========= This utility allows you to render unicode-aided tables on the command line from your node.js scripts. ![Screenshot](http://i.imgur.com/sYq4T.png) ## Features - Customizable characters that constitute the table. - Color/background styling in the header through [colors.js](http://github.com/marak/colors.js) - Column width customization - Text truncation based on predefined widths - Text alignment (left, right, center) - Padding (left, right) - Easy-to-use API ## Installation ```bash npm install cli-table ``` ## How to use ```javascript var Table = require('cli-table'); // instantiate var table = new Table({ head: ['TH 1 label', 'TH 2 label'] , colWidths: [100, 200] }); // table is an Array, so you can `push`, `unshift`, `splice` and friends table.push( ['First value', 'Second value'] , ['First value', 'Second value'] ); // render console.log(table.toString()); ``` ## Running tests Clone the repository with all its submodules and run: ```bash $ make test ``` ## Credits - Guillermo Rauch <guillermo@learnboost.com> ([Guille](http://github.com/guille)) ## License (The MIT License) Copyright (c) 2010 LearnBoost <dev@learnboost.com> 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.node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/examples/000077500000000000000000000000001240302775300300055ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/examples/revs.js000066400000000000000000000016611240302775300313260ustar00rootroot00000000000000 /** * Module requirements. */ // this line is only needed if you refuse to use npm require.paths.unshift(__dirname + '/../support/colors'); var Table = require('../lib/cli-table'); /** * Example. */ var table = new Table({ head: ['Rel', 'Change', 'By', 'When'] , colWidths: [6, 21, 25, 17] }); table.push( ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago'] , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] ); console.log(table.toString()); var table = new Table({ head: ['Rel', 'Change', 'By', 'When'] , colWidths: [6, 21, 25, 17] , style : {compact : true, 'padding-left' : 1} }); table.push( ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago'] , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] , [] , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] ); console.log(table.toString());node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/examples/table.js000066400000000000000000000013761240302775300314410ustar00rootroot00000000000000 /** * Module requirements. */ // this line is only needed if you refuse to use npm require.paths.unshift(__dirname + '/../support/colors'); var Table = require('../lib/cli-table'); /** * Example. */ var table = new Table({ head: ['First', 'Last', 'Email', 'Twitter'] , chars: { 'top': '-' , 'top-mid': '-' , 'top-left': '-' , 'top-right': '-' , 'bottom': '-' , 'bottom-mid': '-' , 'bottom-left': '-' , 'bottom-right': '-' , 'left': '|' , 'left-mid': '|' , 'mid': '-' , 'mid-mid': '-' , 'right': '|' , 'right-mid': '-' } , colWidths: [14, 10, 25, 17] }); table.push( ['Guillermo', 'Rauch', 'rauchg@gmail.com', 'rauchg'] ); console.log(table.toString()); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/index.js000066400000000000000000000000561240302775300276350ustar00rootroot00000000000000 module.exports = require('./lib/cli-table'); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/lib/000077500000000000000000000000001240302775300267355ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/lib/cli-table/000077500000000000000000000000001240302775300305715ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/lib/cli-table/index.js000066400000000000000000000113541240302775300322420ustar00rootroot00000000000000 /** * Module dependencies. */ var utils = require('./utils') , repeat = utils.repeat , truncate = utils.truncate , pad = utils.pad; require('colors'); /** * Table constructor * * @param {Object} options * @api public */ function Table (options){ this.options = utils.options({ chars: { 'top': '━' , 'top-mid': '┳' , 'top-left': '┏' , 'top-right': '┓' , 'bottom': '━' , 'bottom-mid': '┻' , 'bottom-left': '┗' , 'bottom-right': '┛' , 'left': '┃' , 'left-mid': '┣' , 'mid': '━' , 'mid-mid': '╋' , 'right': '┃' , 'right-mid': '┫' } , truncate: '…' , colWidths: [] , colAligns: [] , style: { 'padding-left': 1 , 'padding-right': 1 , head: ['cyan'] , compact : false } , head: [] }, options); }; /** * Inherit from Array. */ Table.prototype.__proto__ = Array.prototype; /** * Width getter * * @return {Number} width * @api public */ Table.prototype.__defineGetter__('width', function (){ var str = this.toString().split("\n"); if (str.length) return str[0].length; return 0; }); /** * Render to a string. * * @return {String} table representation * @api public */ Table.prototype.render Table.prototype.toString = function (){ var ret = '' , options = this.options , style = options.style , head = options.head , chars = options.chars , truncater = options.truncate , colWidths = options.colWidths || new Array(this.head.length) , totalWidth = 0; if (!head.length && !this.length) return ''; if (!colWidths.length){ this.slice(0).concat([head]).forEach(function(cells){ cells.forEach(function(cell, i){ var width = typeof cell == 'object' && cell.width != undefined ? cell.width : ((typeof cell == 'object' ? utils.strlen(cell.text) : utils.strlen(cell)) + (style['padding-left'] || 0) + (style['padding-right'] || 0)) colWidths[i] = Math.max(colWidths[i] || 0, width || 0); }); }); }; totalWidth = (colWidths.length == 1 ? colWidths[0] : colWidths.reduce( function (a, b){ return a + b })) + colWidths.length + 1; // draws a line function line (line, left, right, intersection){ var width = 0 , line = left + repeat(line, totalWidth - 2) + right; colWidths.forEach(function (w, i){ if (i == colWidths.length - 1) return; width += w + 1; line = line.substr(0, width) + intersection + line.substr(width + 1); }); ret += line; }; // draws the top line function lineTop (){ line(chars.top , chars['top-left'] || chars.top , chars['top-right'] || chars.top , chars['top-mid']); ret += "\n"; }; // renders a string, by padding it or truncating it function string (str, index){ var str = String(typeof str == 'object' && str.text ? str.text : str) , length = utils.strlen(str) , width = colWidths[index] - (style['padding-left'] || 0) - (style['padding-right'] || 0) , align = options.colAligns[index] || 'left'; return repeat(' ', style['padding-left'] || 0) + (length == width ? str : (length < width ? pad(str, ( width + (str.length - length) ), ' ', align == 'left' ? 'right' : (align == 'middle' ? 'both' : 'left')) : (truncater ? truncate(str, width, truncater) : str)) ) + repeat(' ', style['padding-right'] || 0); }; if (head.length){ lineTop(); ret += chars.left; head.forEach(function (th, index){ var text = string(th, index); if (style.head){ style.head.forEach(function(style){ text = text[style]; }); } ret += text; ret += chars.right; }); ret += "\n"; } if (this.length) this.forEach(function (cells, i){ if (!head.length && i == 0) lineTop(); else { if (!style.compact || i<(!!head.length) ?1:0 || cells.length == 0){ line(chars.mid , chars['left-mid'] , chars['right-mid'] , chars['mid-mid']); ret += "\n" } if (!cells.length) return; ret += chars.left; cells.forEach(function(cell, i){ ret += string(cell, i); ret += chars.right; }); ret += "\n"; } }); line(chars.bottom , chars['bottom-left'] || chars.bottom , chars['bottom-right'] || chars.bottom , chars['bottom-mid']); return ret; }; /** * Module exports. */ module.exports = Table; module.exports.version = '0.0.1'; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/lib/cli-table/utils.js000066400000000000000000000037421240302775300322750ustar00rootroot00000000000000 /** * Repeats a string. * * @param {String} char(s) * @param {Number} number of times * @return {String} repeated string */ exports.repeat = function (str, times){ return Array(times + 1).join(str); }; /** * Pads a string * * @api public */ exports.pad = function (str, len, pad, dir) { if (len + 1 >= str.length) switch (dir){ case 'left': str = Array(len + 1 - str.length).join(pad) + str; break; case 'both': var right = Math.ceil((padlen = len - str.length) / 2); var left = padlen - right; str = Array(left + 1).join(pad) + str + Array(right + 1).join(pad); break; default: str = str + Array(len + 1 - str.length).join(pad); }; return str; }; /** * Truncates a string * * @api public */ exports.truncate = function (str, length, chr){ chr = chr || '…'; return str.length >= length ? str.substr(0, length - chr.length) + chr : str; }; /** * Copies and merges options with defaults. * * @param {Object} defaults * @param {Object} supplied options * @return {Object} new (merged) object */ function clone(a){ var b; if (Array.isArray(a)){ b = []; for (var i = 0, l = a.length; i < l; i++) b.push(typeof a[i] == 'object' ? clone(a[i]) : a[i]); return b; } else if (typeof a == 'object'){ b = {}; for (var i in a) b[i] = typeof a[i] == 'object' ? clone(a[i]) : a[i]; return b; } return a; }; exports.options = function (defaults, opts){ var c = clone(opts); for (var i in defaults) if (!(i in opts)) c[i] = defaults[i]; return c; }; // // For consideration of terminal "color" programs like colors.js, // which can add ANSI escape color codes to strings, // we destyle the ANSI color escape codes for padding calculations. // // see: http://en.wikipedia.org/wiki/ANSI_escape_code // exports.strlen = function(str){ var code = /\u001b\[\d+m/g; var stripped = ("" + str).replace(code,''); return stripped.length; } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/000077500000000000000000000000001240302775300306445ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/colors/000077500000000000000000000000001240302775300321455ustar00rootroot00000000000000MIT-LICENSE.txt000066400000000000000000000021011240302775300343320ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/colorsCopyright (c) 2010 Marak Squires http://github.com/marak/say.js/ 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. node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/colors/ReadMe.md000066400000000000000000000012761240302775300336320ustar00rootroot00000000000000

colors.js - get color and style in your node.js console like what

var sys = require('sys'); var colors = require('./colors'); sys.puts('hello'.green); // outputs green text sys.puts('i like cake and pies'.underline.red) // outputs red underlined text sys.puts('inverse the color'.inverse); // inverses the color sys.puts('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)

colors and styles!

- bold - italic - underline - inverse - yellow - cyan - white - magenta - green - red - grey - blue ### Authors #### Alexis Sellier (cloudhead) , Marak Squires , Justin Campbell node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/colors/colors.js000066400000000000000000000047751240302775300340210ustar00rootroot00000000000000/* colors.js Copyright (c) 2010 Alexis Sellier (cloudhead) , Marak Squires 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. */ // prototypes the string object to have additional method calls that add terminal colors ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'].forEach(function (style) { Object.defineProperty(String.prototype, style, { get: function () { return stylize(this, style); } }); }); // prototypes string with method "rainbow" // rainbow will apply a the color spectrum to a string, changing colors every letter Object.defineProperty(String.prototype, 'rainbow', { get: function () { var rainbowcolors = ['red','yellow','green','blue','magenta']; //RoY G BiV var exploded = this.split(""); var i=0; exploded = exploded.map(function(letter) { if (letter==" ") { return letter; } else { return stylize(letter,rainbowcolors[i++ % rainbowcolors.length]); } }); return exploded.join(""); } }); function stylize(str, style) { var styles = { //styles 'bold' : [1, 22], 'italic' : [3, 23], 'underline' : [4, 24], 'inverse' : [7, 27], //grayscale 'white' : [37, 39], 'grey' : [90, 39], 'black' : [90, 39], //colors 'blue' : [34, 39], 'cyan' : [36, 39], 'green' : [32, 39], 'magenta' : [35, 39], 'red' : [31, 39], 'yellow' : [33, 39] }; return '\033[' + styles[style][0] + 'm' + str + '\033[' + styles[style][1] + 'm'; };example.js000066400000000000000000000004571240302775300340650ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/colorsvar sys = require('sys'); var colors = require('./colors'); sys.puts('Rainbows are fun!'.rainbow); sys.puts('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported sys.puts('Chains are also cool.'.bold.italic.underline.red); // styles not widely supportedpackage.json000066400000000000000000000021721240302775300343560ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/node_modules/colors{ "name": "colors", "description": "get colors in your node.js console like what", "version": "0.3.0", "author": { "name": "Marak Squires" }, "repository": { "type": "git", "url": "http://github.com/Marak/colors.js.git" }, "engine": [ "node >=0.1.90" ], "main": "colors", "readme": "

colors.js - get color and style in your node.js console like what

\n\n\n\n var sys = require('sys');\n var colors = require('./colors');\n\n sys.puts('hello'.green); // outputs green text\n sys.puts('i like cake and pies'.underline.red) // outputs red underlined text\n sys.puts('inverse the color'.inverse); // inverses the color\n sys.puts('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n \n

colors and styles!

\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n\n\n### Authors \n\n#### Alexis Sellier (cloudhead) , Marak Squires , Justin Campbell\n", "readmeFilename": "ReadMe.md", "_id": "colors@0.3.0", "_from": "colors@0.3.0" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/package.json000066400000000000000000000053441240302775300304630ustar00rootroot00000000000000{ "name": "cli-table", "description": "Pretty unicode tables for the CLI", "version": "0.0.2", "author": { "name": "Guillermo Rauch", "email": "guillermo@learnboost.com" }, "keywords": [ "cli", "colors", "table" ], "dependencies": { "colors": "0.3.0" }, "main": "./index.js", "engines": { "node": ">= 0.2.0" }, "readme": "CLI Table\n=========\n\nThis utility allows you to render unicode-aided tables on the command line from\nyour node.js scripts.\n\n![Screenshot](http://i.imgur.com/sYq4T.png)\n\n## Features\n\n- Customizable characters that constitute the table.\n- Color/background styling in the header through\n [colors.js](http://github.com/marak/colors.js)\n- Column width customization\n- Text truncation based on predefined widths\n- Text alignment (left, right, center)\n- Padding (left, right)\n- Easy-to-use API\n\n## Installation\n\n```bash \nnpm install cli-table\n```\n\n## How to use\n\n```javascript\nvar Table = require('cli-table');\n\n// instantiate\nvar table = new Table({\n head: ['TH 1 label', 'TH 2 label']\n , colWidths: [100, 200]\n});\n\n// table is an Array, so you can `push`, `unshift`, `splice` and friends\ntable.push(\n ['First value', 'Second value']\n , ['First value', 'Second value']\n);\n\n// render\nconsole.log(table.toString());\n```\n\n## Running tests\n\nClone the repository with all its submodules and run:\n\n```bash\n$ make test\n```\n\n## Credits\n\n- Guillermo Rauch <guillermo@learnboost.com> ([Guille](http://github.com/guille))\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 LearnBoost <dev@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "readmeFilename": "README.md", "_id": "cli-table@0.0.2", "_from": "cli-table@0.0.2" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/test/000077500000000000000000000000001240302775300271465ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/test/common.js000066400000000000000000000000651240302775300307750ustar00rootroot00000000000000 /** * Module dependencies. */ require('should'); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/cli-table/test/index.test.js000066400000000000000000000037261240302775300316010ustar00rootroot00000000000000 /** * Module requirements. */ require('./common'); var Table = require('cli-table'); /** * Tests. */ module.exports = { 'test complete table': function (){ var table = new Table({ head: ['Rel', 'Change', 'By', 'When'] , style: { 'padding-left': 1 , 'padding-right': 1 } , colWidths: [6, 21, 25, 17] }); table.push( ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago'] , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] ); var expected = [ '┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓' , '┃ Rel ┃ Change ┃ By ┃ When ┃' , '┣━━━━━━╋━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫' , '┃ v0.1 ┃ Testing something … ┃ rauchg@gmail.com ┃ 7 minutes ago ┃' , '┣━━━━━━╋━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━┫' , '┃ v0.1 ┃ Testing something … ┃ rauchg@gmail.com ┃ 8 minutes ago ┃' , '┗━━━━━━┻━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━┛' ]; table.toString().should.eql(expected.join("\n")); }, 'test width property': function (){ var table = new Table({ head: ['Cool'] }); table.width.should.eql(8); } }; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/000077500000000000000000000000001240302775300257665ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/README.md000066400000000000000000000063351240302775300272540ustar00rootroot00000000000000Trace.js ======== Providing better stack traces for V8 by giving you full-fledged objects for each frame in the trace. Examples ======== Creating a nice color trace with context, reversed so that the latest call is printed last: ````javascript var trace = require('tracejs').trace; try { somethingThatThrowsAnError(); } catch(err) { var stacktrace = trace(err); console.error(stacktrace.toString()); } ```` Iterating through frames and grabbing the constituent files: ````javascript var trace = require('tracejs').trace; try { somethingThatThrowsAnError(); } catch(err) { var stacktrace = trace(err); for(var i = 0, len = stacktrace.frames.length; i < len; ++i) { console.error(stacktrace.frames[i].filename, stacktrace.frames[i].filedata()); } } ```` API === trace(err) ----- Creates and returns a `Trace` object by parsing an `Error` object. object Trace ------------ Holds the original error, the first line of the trace (the message), and the frames that make up the stack trace. Returned by `trace`. Members: * `frames`: an `Array` of `Frame` objects. * `first_line`: the first line of the original stack trace -- usually contains the error message, if any. * `original_error`: the original `Error` object that the `Trace` was generated from. The default output of `Trace#toString` looks like the following: ![trace](http://neversaw.us/media/traces.png) Trace.defaults -------------- The default printing mode for the trace; an array of `[context_lines:int, `print_cursor:boolean`, `highlight_character_color:string`]. Defaults to two lines of context with a cursor, with the character that caused the error appearing red. Trace#toString(reversed[, contextLines, showCursor, highlightErrorCharacterColor]) -------------- Returns the prettified stack trace as a string, using `Trace.defaults`. `reversed` defaults to `true`, meaning the most recent call is displayed last. The remaining arguments are passed to `Frame#toString` for each frame in `Trace#frames`. object Frame ------------ Contains information about a specific stack frame. Members: * `named_location`: The name of the scope where the frame originated; e.g., `'ReadStream.emit'`. * `filename`: The filename of the frame. * `line`: The integer line number of the frame. * `character`: The character at which the error occurred in the line of the frame. Frame#filedata() -------------- Returns a string containing the text of the file the frame originated from. Works on both native modules as well as userland modules. Cached and synchronous. Frame#toString([contextLines, showCursor, highlightErrorCharacterColor]) --------------- Wraps the output from `Frame#get_lines()` with information about the file, line number, character, and scope if available. Frame#get_lines(context, ascii_cursor, highlight_error_start) --------------- Returns a string containing `context` lines surrounding the error line from the file of this frame. If `ascii_cursor` is `true`, it will insert a `>` at the line where the error occurred, and a space before all other lines. `highlight_error_start` can be any value that [ansi-colors](https://github.com/loopj/commonjs-ansi-color) will accept, or false to avoid highlighting the character. License ======= new BSD. node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/package.json000066400000000000000000000077631240302775300302710ustar00rootroot00000000000000{ "author": { "name": "Chris Dickinson", "email": "chris@neversaw.us", "url": "http://neversaw.us/" }, "name": "tracejs", "description": "Expand Error.stack traces into usable objects providing context and highlighting", "version": "0.1.4", "homepage": "http://github.com/chrisdickinson/tracejs/", "repository": { "type": "git", "url": "git://github.com/chrisdickinson/tracejs.git" }, "scripts": { "test": "node test/test.js" }, "main": "trace.js", "engines": { "node": ">=0.4.0" }, "dependencies": {}, "devDependencies": {}, "readme": "Trace.js\n========\n\nProviding better stack traces for V8 by giving you full-fledged objects for each frame in the trace.\n\nExamples\n========\n\nCreating a nice color trace with context, reversed so that the latest call is printed last:\n\n````javascript\nvar trace = require('tracejs').trace;\n\ntry {\n somethingThatThrowsAnError();\n} catch(err) {\n var stacktrace = trace(err);\n console.error(stacktrace.toString());\n}\n````\n\nIterating through frames and grabbing the constituent files:\n\n````javascript\nvar trace = require('tracejs').trace;\n\ntry {\n somethingThatThrowsAnError();\n} catch(err) {\n var stacktrace = trace(err);\n for(var i = 0, len = stacktrace.frames.length; i < len; ++i) {\n console.error(stacktrace.frames[i].filename, stacktrace.frames[i].filedata());\n }\n}\n````\n\nAPI\n===\n\ntrace(err)\n-----\n\nCreates and returns a `Trace` object by parsing an `Error` object.\n\nobject Trace\n------------\n\nHolds the original error, the first line of the trace (the message), and the frames that make up the stack trace. Returned by `trace`.\n\nMembers:\n\n* `frames`: an `Array` of `Frame` objects.\n* `first_line`: the first line of the original stack trace -- usually contains the error message, if any.\n* `original_error`: the original `Error` object that the `Trace` was generated from.\n\nThe default output of `Trace#toString` looks like the following:\n\n![trace](http://neversaw.us/media/traces.png)\n\nTrace.defaults\n--------------\n\nThe default printing mode for the trace; an array of `[context_lines:int, `print_cursor:boolean`, `highlight_character_color:string`].\nDefaults to two lines of context with a cursor, with the character that caused the error appearing red.\n\nTrace#toString(reversed[, contextLines, showCursor, highlightErrorCharacterColor])\n--------------\n\nReturns the prettified stack trace as a string, using `Trace.defaults`. `reversed` defaults to `true`, meaning the most recent call is displayed last. The remaining arguments are passed to `Frame#toString` for each frame in `Trace#frames`. \n\nobject Frame\n------------ \n\nContains information about a specific stack frame.\n\nMembers:\n\n* `named_location`: The name of the scope where the frame originated; e.g., `'ReadStream.emit'`.\n* `filename`: The filename of the frame.\n* `line`: The integer line number of the frame.\n* `character`: The character at which the error occurred in the line of the frame.\n\nFrame#filedata()\n--------------\n\nReturns a string containing the text of the file the frame originated from. Works on both native modules as well as userland modules. Cached and synchronous.\n\nFrame#toString([contextLines, showCursor, highlightErrorCharacterColor])\n---------------\n\nWraps the output from `Frame#get_lines()` with information about the file, line number, character, and scope if available.\n\nFrame#get_lines(context, ascii_cursor, highlight_error_start)\n---------------\n\nReturns a string containing `context` lines surrounding the error line from the file of this frame. If `ascii_cursor` is `true`, it will\ninsert a `>` at the line where the error occurred, and a space before all other lines. `highlight_error_start` can be any value that [ansi-colors](https://github.com/loopj/commonjs-ansi-color) will accept, or false to avoid highlighting the character.\n\nLicense\n=======\n\nnew BSD.\n", "readmeFilename": "README.md", "_id": "tracejs@0.1.4", "_from": "tracejs@0.1.4" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/test/000077500000000000000000000000001240302775300267455ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/test/fixture/000077500000000000000000000000001240302775300304335ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/test/fixture/example.js000066400000000000000000000002031240302775300324170ustar00rootroot00000000000000exports.unnamed = function(text) { throw new Error(text); }; exports.named = function named(text) { throw new Error(text); }; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/test/test.js000066400000000000000000000037441240302775300302720ustar00rootroot00000000000000var assert = require('assert'); var fixture = require('./fixture/example'); var unnamed = fixture.unnamed, named = fixture.named; var trace = require('../trace').trace; var expected = 'random_'+~~(Math.random()*100) var local_unnamed = function(text) { throw new Error(text); }; try { local_unnamed(expected); } catch(err) { var traced = trace(err); assert.equal(traced.frames.length, err.stack.split('\n').length - 1); assert.equal(traced.frames[0].named_location, ''); assert.equal(traced.first_line, err.stack.split('\n')[0]); assert.strictEqual(traced.original_error, err); var lines = err.stack.split('\n').slice(1); for(var i = 0, len = lines.length; i < len; ++i) { assert.notStrictEqual(lines[i].indexOf(traced.frames[i].line + ':' + traced.frames[i].character), -1); assert.notStrictEqual(lines[i].indexOf(traced.frames[i].filename), -1); } } try { unnamed(expected); } catch(err) { var traced = trace(err); assert.equal(traced.frames.length, err.stack.split('\n').length - 1); assert.equal(traced.first_line, err.stack.split('\n')[0]); assert.strictEqual(traced.original_error, err); var lines = err.stack.split('\n').slice(1); for(var i = 0, len = lines.length; i < len; ++i) { assert.notStrictEqual(lines[i].indexOf(traced.frames[i].line + ':' + traced.frames[i].character), -1); assert.notStrictEqual(lines[i].indexOf(traced.frames[i].filename), -1); } } try { named(expected); } catch(err) { var traced = trace(err); assert.equal(traced.frames.length, err.stack.split('\n').length - 1); assert.equal(traced.first_line, err.stack.split('\n')[0]); assert.strictEqual(traced.original_error, err); var lines = err.stack.split('\n').slice(1); for(var i = 0, len = lines.length; i < len; ++i) { assert.notStrictEqual(lines[i].indexOf(traced.frames[i].line + ':' + traced.frames[i].character), -1); assert.notStrictEqual(lines[i].indexOf(traced.frames[i].filename), -1); } } console.error('Tests passed'); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/tracejs/trace.js000066400000000000000000000122731240302775300274270ustar00rootroot00000000000000var fs = require('fs'), tty = require('tty'), natives = process.binding('natives'); var is_tty = function() { return tty.isatty(process.stdout.fd) && tty.isatty(process.stderr.fd); }; var Color = function(code) { this.code = code; }; Color.prototype.start = function() { Color.stack.push(this); return '\033['+this.code+'m'; }; Color.prototype.end = function() { Color.stack.pop(); return '\033['+Color.stack[Color.stack.length-1].code+'m'; }; Color.prototype.wrap = function(text) { return this.start() + text + this.end(); }; var color = is_tty() ? function(code) { return new Color(code); } : function(code) { return { start:function(){return ''}, end:function(){return ''}, wrap:function(text){ return text; } } }; var colors = { off:color(0), bold:color(1), italic:color(3), underline:color(4), blink:color(5), inverse:color(7), hidden:color(8), black:color(30), red:color(31), green:color(32), yellow:color(33), blue:color(34), magenta:color(35), cyan:color(36), white:color(37), black_bg:color(40), red_bg:color(41), green_bg:color(42), yellow_bg:color(43), blue_bg:color(44), magenta_bg:color(45), cyan_bg:color(46), white_bg:color(47) }; Color.stack = [colors.off]; var err_re1 = / at (.*?) \(([\w\d\._\-\/]+):(\d+):(\d+)\)/, err_re2 = / at ([^:]+):(\d+):(\d+)/; var Trace = function(first_line, frames, original_error) { this.first_line = first_line; this.frames = frames; this.original_error = original_error; }; Trace.defaults = [2, true, 'red']; Trace.prototype.toString = function(reversed) { reversed === undefined && (reversed = true); var args = [].slice.call(arguments, 1); args.length === 0 && (args = Trace.defaults.slice()); var frame_data = [this.first_line, '======\n'].concat(this.frames.map(function(frame) { return frame.toString.apply(frame, args); })); if(reversed) frame_data = frame_data.reverse(); return frame_data.join(''); }; var Frame = function(named_location, filename, line, character) { this.named_location = named_location; this.filename = filename; this.line = line; this.character = character; this._filedata = null; }; Frame.prototype.load_file_native = function() { var base_name = this.filename.replace(/\.js$/g, ''), data = natives[base_name] || ''; return data; }; Frame.prototype.load_file_path = function() { try { return fs.readFileSync(this.filename, 'utf8').toString(); } catch(err) { return ''; } }; Frame.prototype.filedata = function() { if(this._filedata) return this._filedata; if(this.filename.indexOf('/') === -1) { this._filedata = this.load_file_native(); } else { this._filedata = this.load_file_path(); } return this._filedata; }; Frame.prototype.toString = function() { var args = [].slice.call(arguments); return [ 'file ', colors.cyan.wrap('"'+this.filename.replace(process.cwd(), '.')+'"'), ' line ', colors.red.wrap( colors.bold.wrap( this.line ) ), ', char ', colors.red.wrap( colors.bold.wrap( this.character ) ), ', in ', colors.cyan.wrap(this.named_location), ':\n', colors.yellow.wrap(this.get_lines.apply(this, args)), '\n' ].join(''); }; Frame.prototype.get_lines = function(context, ascii_cursor, highlight_error_start) { context = context || 0; filedata = this.filedata().split('\n'); var start_line = this.line - context - 1, end_line = this.line + context, character = this.character; start_line < 0 && (start_line = 0); var lines = filedata.slice(start_line, end_line); if(this.line - context < 0) { context += (this.line - context) - 1; } if(highlight_error_start) { colors.yellow.start(); lines = lines.map(function(line, idx) { if(idx === context) { line = line.split(/\b/g); var start = 0; line = line.map(function(word) { var next = start + word.length; if(character <= next && character >= start) { word = colors[highlight_error_start].wrap(word); } start = next; return word; }).join(''); } return line; }); colors.yellow.end(); } if(ascii_cursor) { lines = lines.map(function(line, idx) { return (idx === context ? '>' : ' ') + line; }); } return lines.join('\n'); }; var trace = function(err) { if(!err) { err = {}; Error.captureStackTrace(err); } var lines = err.stack.split('\n'), first = lines[0], stack = lines.slice(1); var frames, match1, match2; frames = stack.map(function(line) { match1 = err_re1.exec(line); match2 = err_re2.exec(line); if(match1) { return new Frame(match1[1], match1[2], parseInt(match1[3], 10), parseInt(match1[4], 10)) } else if(match2) { return new Frame('', match2[1], parseInt(match2[2], 10), parseInt(match2[3], 10)) } }); return new Trace(first, frames, err); }; exports.trace = trace; exports.Frame = Frame; exports.Trace = Trace; exports.set_context = function(context) { Trace.defaults[0] = context; }; exports.set_add_cursor = function(tf) { Trace.defaults[1] = tf; }; node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/000077500000000000000000000000001240302775300265045ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/.npmignore000066400000000000000000000000241240302775300304770ustar00rootroot00000000000000test/ Rakefile docs/node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/CNAME000066400000000000000000000000211240302775300272430ustar00rootroot00000000000000underscorejs.org node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/LICENSE000066400000000000000000000020661240302775300275150ustar00rootroot00000000000000Copyright (c) 2009-2012 Jeremy Ashkenas, DocumentCloud 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.node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/README.md000066400000000000000000000024441240302775300277670ustar00rootroot00000000000000 __ /\ \ __ __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ \ \____/ \/___/ Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter...) without extending any core JavaScript objects. For Docs, License, Tests, and pre-packed downloads, see: http://documentcloud.github.com/underscore/ Many thanks to our contributors: https://github.com/documentcloud/underscore/contributors node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/favicon.ico000066400000000000000000000025761240302775300306370ustar00rootroot00000000000000h( qA*node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/index.html000066400000000000000000002252751240302775300305160ustar00rootroot00000000000000 Underscore.js

Underscore.js

Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux, and Backbone.js's suspenders.

Underscore provides 60-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so modern browsers will use the native implementations of forEach, map, reduce, filter, every, some and indexOf.

A complete Test & Benchmark Suite is included for your perusal.

You may also read through the annotated source code.

The project is hosted on GitHub. You can report bugs and discuss features on the issues page, on Freenode in the #documentcloud channel, or send tweets to @documentcloud.

Underscore is an open-source component of DocumentCloud.

Downloads (Right-click, and use "Save As")

Development Version (1.3.3) 37kb, Uncompressed with Plentiful Comments
Production Version (1.3.3) 4kb, Minified and Gzipped
Upgrade warning: versions 1.3.0 and higher remove AMD (RequireJS) support.

Collection Functions (Arrays or Objects)

each_.each(list, iterator, [context]) Alias: forEach
Iterates over a list of elements, yielding each in turn to an iterator function. The iterator is bound to the context object, if one is passed. Each invocation of iterator is called with three arguments: (element, index, list). If list is a JavaScript object, iterator's arguments will be (value, key, list). Delegates to the native forEach function if it exists.

_.each([1, 2, 3], function(num){ alert(num); });
=> alerts each number in turn...
_.each({one : 1, two : 2, three : 3}, function(num, key){ alert(num); });
=> alerts each number in turn...

map_.map(list, iterator, [context]) Alias: collect
Produces a new array of values by mapping each value in list through a transformation function (iterator). If the native map method exists, it will be used instead. If list is a JavaScript object, iterator's arguments will be (value, key, list).

_.map([1, 2, 3], function(num){ return num * 3; });
=> [3, 6, 9]
_.map({one : 1, two : 2, three : 3}, function(num, key){ return num * 3; });
=> [3, 6, 9]

reduce_.reduce(list, iterator, memo, [context]) Aliases: inject, foldl
Also known as inject and foldl, reduce boils down a list of values into a single value. Memo is the initial state of the reduction, and each successive step of it should be returned by iterator.

var sum = _.reduce([1, 2, 3], function(memo, num){ return memo + num; }, 0);
=> 6

reduceRight_.reduceRight(list, iterator, memo, [context]) Alias: foldr
The right-associative version of reduce. Delegates to the JavaScript 1.8 version of reduceRight, if it exists. Foldr is not as useful in JavaScript as it would be in a language with lazy evaluation.

var list = [[0, 1], [2, 3], [4, 5]];
var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
=> [4, 5, 2, 3, 0, 1]

find_.find(list, iterator, [context]) Alias: detect
Looks through each value in the list, returning the first one that passes a truth test (iterator). The function returns as soon as it finds an acceptable element, and doesn't traverse the entire list.

var even = _.find([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
=> 2

filter_.filter(list, iterator, [context]) Alias: select
Looks through each value in the list, returning an array of all the values that pass a truth test (iterator). Delegates to the native filter method, if it exists.

var evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
=> [2, 4, 6]

reject_.reject(list, iterator, [context])
Returns the values in list without the elements that the truth test (iterator) passes. The opposite of filter.

var odds = _.reject([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
=> [1, 3, 5]

all_.all(list, iterator, [context]) Alias: every
Returns true if all of the values in the list pass the iterator truth test. Delegates to the native method every, if present.

_.all([true, 1, null, 'yes'], _.identity);
=> false

any_.any(list, [iterator], [context]) Alias: some
Returns true if any of the values in the list pass the iterator truth test. Short-circuits and stops traversing the list if a true element is found. Delegates to the native method some, if present.

_.any([null, 0, 'yes', false]);
=> true

include_.include(list, value) Alias: contains
Returns true if the value is present in the list, using === to test equality. Uses indexOf internally, if list is an Array.

_.include([1, 2, 3], 3);
=> true

invoke_.invoke(list, methodName, [*arguments])
Calls the method named by methodName on each value in the list. Any extra arguments passed to invoke will be forwarded on to the method invocation.

_.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
=> [[1, 5, 7], [1, 2, 3]]

pluck_.pluck(list, propertyName)
A convenient version of what is perhaps the most common use-case for map: extracting a list of property values.

var stooges = [{name : 'moe', age : 40}, {name : 'larry', age : 50}, {name : 'curly', age : 60}];
_.pluck(stooges, 'name');
=> ["moe", "larry", "curly"]

max_.max(list, [iterator], [context])
Returns the maximum value in list. If iterator is passed, it will be used on each value to generate the criterion by which the value is ranked.

var stooges = [{name : 'moe', age : 40}, {name : 'larry', age : 50}, {name : 'curly', age : 60}];
_.max(stooges, function(stooge){ return stooge.age; });
=> {name : 'curly', age : 60};

min_.min(list, [iterator], [context])
Returns the minimum value in list. If iterator is passed, it will be used on each value to generate the criterion by which the value is ranked.

var numbers = [10, 5, 100, 2, 1000];
_.min(numbers);
=> 2

sortBy_.sortBy(list, iterator, [context])
Returns a sorted copy of list, ranked in ascending order by the results of running each value through iterator. Iterator may also be the string name of the property to sort by (eg. length).

_.sortBy([1, 2, 3, 4, 5, 6], function(num){ return Math.sin(num); });
=> [5, 4, 6, 3, 1, 2]

groupBy_.groupBy(list, iterator)
Splits a collection into sets, grouped by the result of running each value through iterator. If iterator is a string instead of a function, groups by the property named by iterator on each of the values.

_.groupBy([1.3, 2.1, 2.4], function(num){ return Math.floor(num); });
=> {1: [1.3], 2: [2.1, 2.4]}

_.groupBy(['one', 'two', 'three'], 'length');
=> {3: ["one", "two"], 5: ["three"]}

sortedIndex_.sortedIndex(list, value, [iterator])
Uses a binary search to determine the index at which the value should be inserted into the list in order to maintain the list's sorted order. If an iterator is passed, it will be used to compute the sort ranking of each value.

_.sortedIndex([10, 20, 30, 40, 50], 35);
=> 3

shuffle_.shuffle(list)
Returns a shuffled copy of the list, using a version of the Fisher-Yates shuffle.

_.shuffle([1, 2, 3, 4, 5, 6]);
=> [4, 1, 6, 3, 5, 2]

toArray_.toArray(list)
Converts the list (anything that can be iterated over), into a real Array. Useful for transmuting the arguments object.

(function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4);
=> [2, 3, 4]

size_.size(list)
Return the number of values in the list.

_.size({one : 1, two : 2, three : 3});
=> 3

Array Functions

Note: All array functions will also work on the arguments object.

first_.first(array, [n]) Alias: head
Returns the first element of an array. Passing n will return the first n elements of the array.

_.first([5, 4, 3, 2, 1]);
=> 5

initial_.initial(array, [n])
Returns everything but the last entry of the array. Especially useful on the arguments object. Pass n to exclude the last n elements from the result.

_.initial([5, 4, 3, 2, 1]);
=> [5, 4, 3, 2]

last_.last(array, [n])
Returns the last element of an array. Passing n will return the last n elements of the array.

_.last([5, 4, 3, 2, 1]);
=> 1

rest_.rest(array, [index]) Alias: tail
Returns the rest of the elements in an array. Pass an index to return the values of the array from that index onward.

_.rest([5, 4, 3, 2, 1]);
=> [4, 3, 2, 1]

compact_.compact(array)
Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", undefined and NaN are all falsy.

_.compact([0, 1, false, 2, '', 3]);
=> [1, 2, 3]

flatten_.flatten(array, [shallow])
Flattens a nested array (the nesting can be to any depth). If you pass shallow, the array will only be flattened a single level.

_.flatten([1, [2], [3, [[4]]]]);
=> [1, 2, 3, 4];

_.flatten([1, [2], [3, [[4]]]], true);
=> [1, 2, 3, [[4]]];

without_.without(array, [*values])
Returns a copy of the array with all instances of the values removed. === is used for the equality test.

_.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
=> [2, 3, 4]

union_.union(*arrays)
Computes the union of the passed-in arrays: the list of unique items, in order, that are present in one or more of the arrays.

_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
=> [1, 2, 3, 101, 10]

intersection_.intersection(*arrays)
Computes the list of values that are the intersection of all the arrays. Each value in the result is present in each of the arrays.

_.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
=> [1, 2]

difference_.difference(array, *others)
Similar to without, but returns the values from array that are not present in the other arrays.

_.difference([1, 2, 3, 4, 5], [5, 2, 10]);
=> [1, 3, 4]

uniq_.uniq(array, [isSorted], [iterator]) Alias: unique
Produces a duplicate-free version of the array, using === to test object equality. If you know in advance that the array is sorted, passing true for isSorted will run a much faster algorithm. If you want to compute unique items based on a transformation, pass an iterator function.

_.uniq([1, 2, 1, 3, 1, 4]);
=> [1, 2, 3, 4]

zip_.zip(*arrays)
Merges together the values of each of the arrays with the values at the corresponding position. Useful when you have separate data sources that are coordinated through matching array indexes. If you're working with a matrix of nested arrays, zip.apply can transpose the matrix in a similar fashion.

_.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
=> [["moe", 30, true], ["larry", 40, false], ["curly", 50, false]]

indexOf_.indexOf(array, value, [isSorted])
Returns the index at which value can be found in the array, or -1 if value is not present in the array. Uses the native indexOf function unless it's missing. If you're working with a large array, and you know that the array is already sorted, pass true for isSorted to use a faster binary search.

_.indexOf([1, 2, 3], 2);
=> 1

lastIndexOf_.lastIndexOf(array, value)
Returns the index of the last occurrence of value in the array, or -1 if value is not present. Uses the native lastIndexOf function if possible.

_.lastIndexOf([1, 2, 3, 1, 2, 3], 2);
=> 4

range_.range([start], stop, [step])
A function to create flexibly-numbered lists of integers, handy for each and map loops. start, if omitted, defaults to 0; step defaults to 1. Returns a list of integers from start to stop, incremented (or decremented) by step, exclusive.

_.range(10);
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
_.range(1, 11);
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
_.range(0, 30, 5);
=> [0, 5, 10, 15, 20, 25]
_.range(0, -10, -1);
=> [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
_.range(0);
=> []

Function (uh, ahem) Functions

bind_.bind(function, object, [*arguments])
Bind a function to an object, meaning that whenever the function is called, the value of this will be the object. Optionally, bind arguments to the function to pre-fill them, also known as partial application.

var func = function(greeting){ return greeting + ': ' + this.name };
func = _.bind(func, {name : 'moe'}, 'hi');
func();
=> 'hi: moe'

bindAll_.bindAll(object, [*methodNames])
Binds a number of methods on the object, specified by methodNames, to be run in the context of that object whenever they are invoked. Very handy for binding functions that are going to be used as event handlers, which would otherwise be invoked with a fairly useless this. If no methodNames are provided, all of the object's function properties will be bound to it.

var buttonView = {
  label   : 'underscore',
  onClick : function(){ alert('clicked: ' + this.label); },
  onHover : function(){ console.log('hovering: ' + this.label); }
};
_.bindAll(buttonView);
jQuery('#underscore_button').bind('click', buttonView.onClick);
=> When the button is clicked, this.label will have the correct value...

memoize_.memoize(function, [hashFunction])
Memoizes a given function by caching the computed result. Useful for speeding up slow-running computations. If passed an optional hashFunction, it will be used to compute the hash key for storing the result, based on the arguments to the original function. The default hashFunction just uses the first argument to the memoized function as the key.

var fibonacci = _.memoize(function(n) {
  return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
});

delay_.delay(function, wait, [*arguments])
Much like setTimeout, invokes function after wait milliseconds. If you pass the optional arguments, they will be forwarded on to the function when it is invoked.

var log = _.bind(console.log, console);
_.delay(log, 1000, 'logged later');
=> 'logged later' // Appears after one second.

defer_.defer(function)
Defers invoking the function until the current call stack has cleared, similar to using setTimeout with a delay of 0. Useful for performing expensive computations or HTML rendering in chunks without blocking the UI thread from updating.

_.defer(function(){ alert('deferred'); });
// Returns from the function before the alert runs.

throttle_.throttle(function, wait)
Creates and returns a new, throttled version of the passed function, that, when invoked repeatedly, will only actually call the original function at most once per every wait milliseconds. Useful for rate-limiting events that occur faster than you can keep up with.

var throttled = _.throttle(updatePosition, 100);
$(window).scroll(throttled);

debounce_.debounce(function, wait, [immediate])
Creates and returns a new debounced version of the passed function that will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked. Useful for implementing behavior that should only happen after the input has stopped arriving. For example: rendering a preview of a Markdown comment, recalculating a layout after the window has stopped being resized, and so on.

Pass true for the immediate parameter to cause debounce to trigger the function on the leading intead of the trailing edge of the wait interval. Useful in circumstances like preventing accidental double-clicks on a "submit" button from firing a second time.

var lazyLayout = _.debounce(calculateLayout, 300);
$(window).resize(lazyLayout);

once_.once(function)
Creates a version of the function that can only be called one time. Repeated calls to the modified function will have no effect, returning the value from the original call. Useful for initialization functions, instead of having to set a boolean flag and then check it later.

var initialize = _.once(createApplication);
initialize();
initialize();
// Application is only created once.

after_.after(count, function)
Creates a version of the function that will only be run after first being called count times. Useful for grouping asynchronous responses, where you want to be sure that all the async calls have finished, before proceeding.

var renderNotes = _.after(notes.length, render);
_.each(notes, function(note) {
  note.asyncSave({success: renderNotes});
});
// renderNotes is run once, after all notes have saved.

wrap_.wrap(function, wrapper)
Wraps the first function inside of the wrapper function, passing it as the first argument. This allows the wrapper to execute code before and after the function runs, adjust the arguments, and execute it conditionally.

var hello = function(name) { return "hello: " + name; };
hello = _.wrap(hello, function(func) {
  return "before, " + func("moe") + ", after";
});
hello();
=> 'before, hello: moe, after'

compose_.compose(*functions)
Returns the composition of a list of functions, where each function consumes the return value of the function that follows. In math terms, composing the functions f(), g(), and h() produces f(g(h())).

var greet    = function(name){ return "hi: " + name; };
var exclaim  = function(statement){ return statement + "!"; };
var welcome = _.compose(exclaim, greet);
welcome('moe');
=> 'hi: moe!'

Object Functions

keys_.keys(object)
Retrieve all the names of the object's properties.

_.keys({one : 1, two : 2, three : 3});
=> ["one", "two", "three"]

values_.values(object)
Return all of the values of the object's properties.

_.values({one : 1, two : 2, three : 3});
=> [1, 2, 3]

functions_.functions(object) Alias: methods
Returns a sorted list of the names of every method in an object — that is to say, the name of every function property of the object.

_.functions(_);
=> ["all", "any", "bind", "bindAll", "clone", "compact", "compose" ...

extend_.extend(destination, *sources)
Copy all of the properties in the source objects over to the destination object, and return the destination object. It's in-order, so the last source will override properties of the same name in previous arguments.

_.extend({name : 'moe'}, {age : 50});
=> {name : 'moe', age : 50}

pick_.pick(object, *keys)
Return a copy of the object, filtered to only have values for the whitelisted keys (or array of valid keys).

_.pick({name : 'moe', age: 50, userid : 'moe1'}, 'name', 'age');
=> {name : 'moe', age : 50}

defaults_.defaults(object, *defaults)
Fill in missing properties in object with default values from the defaults objects, and return the object. As soon as the property is filled, further defaults will have no effect.

var iceCream = {flavor : "chocolate"};
_.defaults(iceCream, {flavor : "vanilla", sprinkles : "lots"});
=> {flavor : "chocolate", sprinkles : "lots"}

clone_.clone(object)
Create a shallow-copied clone of the object. Any nested objects or arrays will be copied by reference, not duplicated.

_.clone({name : 'moe'});
=> {name : 'moe'};

tap_.tap(object, interceptor)
Invokes interceptor with the object, and then returns object. The primary purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.

_.chain([1,2,3,200])
  .filter(function(num) { return num % 2 == 0; })
  .tap(alert)
  .map(function(num) { return num * num })
  .value();
=> // [2, 200] (alerted)
=> [4, 40000]

has_.has(object, key)
Does the object contain the given key? Identical to object.hasOwnProperty(key), but uses a safe reference to the hasOwnProperty function, in case it's been overridden accidentally.

_.has({a: 1, b: 2, c: 3}, "b");
=> true

isEqual_.isEqual(object, other)
Performs an optimized deep comparison between the two objects, to determine if they should be considered equal.

var moe   = {name : 'moe', luckyNumbers : [13, 27, 34]};
var clone = {name : 'moe', luckyNumbers : [13, 27, 34]};
moe == clone;
=> false
_.isEqual(moe, clone);
=> true

isEmpty_.isEmpty(object)
Returns true if object contains no values.

_.isEmpty([1, 2, 3]);
=> false
_.isEmpty({});
=> true

isElement_.isElement(object)
Returns true if object is a DOM element.

_.isElement(jQuery('body')[0]);
=> true

isArray_.isArray(object)
Returns true if object is an Array.

(function(){ return _.isArray(arguments); })();
=> false
_.isArray([1,2,3]);
=> true

isObject_.isObject(value)
Returns true if value is an Object.

_.isObject({});
=> true
_.isObject(1);
=> false

isArguments_.isArguments(object)
Returns true if object is an Arguments object.

(function(){ return _.isArguments(arguments); })(1, 2, 3);
=> true
_.isArguments([1,2,3]);
=> false

isFunction_.isFunction(object)
Returns true if object is a Function.

_.isFunction(alert);
=> true

isString_.isString(object)
Returns true if object is a String.

_.isString("moe");
=> true

isNumber_.isNumber(object)
Returns true if object is a Number (including NaN).

_.isNumber(8.4 * 5);
=> true

isFinite_.isFinite(object)
Returns true if object is a finite Number.

_.isFinite(-101);
=> true

_.isFinite(-Infinity);
=> false

isBoolean_.isBoolean(object)
Returns true if object is either true or false.

_.isBoolean(null);
=> false

isDate_.isDate(object)
Returns true if object is a Date.

_.isDate(new Date());
=> true

isRegExp_.isRegExp(object)
Returns true if object is a RegExp.

_.isRegExp(/moe/);
=> true

isNaN_.isNaN(object)
Returns true if object is NaN.
Note: this is not the same as the native isNaN function, which will also return true if the variable is undefined.

_.isNaN(NaN);
=> true
isNaN(undefined);
=> true
_.isNaN(undefined);
=> false

isNull_.isNull(object)
Returns true if the value of object is null.

_.isNull(null);
=> true
_.isNull(undefined);
=> false

isUndefined_.isUndefined(variable)
Returns true if variable is undefined.

_.isUndefined(window.missingVariable);
=> true

Utility Functions

noConflict_.noConflict()
Give control of the "_" variable back to its previous owner. Returns a reference to the Underscore object.

var underscore = _.noConflict();

identity_.identity(value)
Returns the same value that is used as the argument. In math: f(x) = x
This function looks useless, but is used throughout Underscore as a default iterator.

var moe = {name : 'moe'};
moe === _.identity(moe);
=> true

times_.times(n, iterator)
Invokes the given iterator function n times.

_(3).times(function(){ genie.grantWish(); });

mixin_.mixin(object)
Allows you to extend Underscore with your own utility functions. Pass a hash of {name: function} definitions to have your functions added to the Underscore object, as well as the OOP wrapper.

_.mixin({
  capitalize : function(string) {
    return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase();
  }
});
_("fabio").capitalize();
=> "Fabio"

uniqueId_.uniqueId([prefix])
Generate a globally-unique id for client-side models or DOM elements that need one. If prefix is passed, the id will be appended to it. Without prefix, returns an integer.

_.uniqueId('contact_');
=> 'contact_104'

escape_.escape(string)
Escapes a string for insertion into HTML, replacing &, <, >, ", ', and / characters.

_.escape('Curly, Larry & Moe');
=> "Curly, Larry &amp; Moe"

result_.result(object, property)
If the value of the named property is a function then invoke it; otherwise, return it.

var object = {cheese: 'crumpets', stuff: function(){ return 'nonsense'; }};
_.result(object, 'cheese');
=> "crumpets"
_.result(object, 'stuff');
=> "nonsense"

template_.template(templateString, [data], [settings])
Compiles JavaScript templates into functions that can be evaluated for rendering. Useful for rendering complicated bits of HTML from JSON data sources. Template functions can both interpolate variables, using <%= … %>, as well as execute arbitrary JavaScript code, with <% … %>. If you wish to interpolate a value, and have it be HTML-escaped, use <%- … %> When you evaluate a template function, pass in a data object that has properties corresponding to the template's free variables. If you're writing a one-off, you can pass the data object as the second parameter to template in order to render immediately instead of returning a template function. The settings argument should be a hash containing any _.templateSettings that should be overriden.

var compiled = _.template("hello: <%= name %>");
compiled({name : 'moe'});
=> "hello: moe"

var list = "<% _.each(people, function(name) { %> <li><%= name %></li> <% }); %>";
_.template(list, {people : ['moe', 'curly', 'larry']});
=> "<li>moe</li><li>curly</li><li>larry</li>"

var template = _.template("<b><%- value %></b>");
template({value : '<script>'});
=> "<b>&lt;script&gt;</b>"

You can also use print from within JavaScript code. This is sometimes more convenient than using <%= ... %>.

var compiled = _.template("<% print('Hello ' + epithet); %>");
compiled({epithet: "stooge"});
=> "Hello stooge."

If ERB-style delimiters aren't your cup of tea, you can change Underscore's template settings to use different symbols to set off interpolated code. Define an interpolate regex to match expressions that should be interpolated verbatim, an escape regex to match expressions that should be inserted after being HTML escaped, and an evaluate regex to match expressions that should be evaluated without insertion into the resulting string. You may define or omit any combination of the three. For example, to perform Mustache.js style templating:

_.templateSettings = {
  interpolate : /\{\{(.+?)\}\}/g
};

var template = _.template("Hello {{ name }}!");
template({name : "Mustache"});
=> "Hello Mustache!"

By default, template places the values from your data in the local scope via the with statement. However, you can specify a single variable name with the variable setting. This can significantly improve the speed at which a template is able to render.

_.template("<%= data.hasWith %>", {hasWith: 'no'}, {variable: 'data'});
=> "no"

Precompiling your templates can be a big help when debugging errors you can't reproduce. This is because precompiled templates can provide line numbers and a stack trace, something that is not possible when compiling templates on the client. The source property is available on the compiled template function for easy precompilation.

<script>
  JST.project = <%= _.template(jstText).source %>;
</script>

Chaining

You can use Underscore in either an object-oriented or a functional style, depending on your preference. The following two lines of code are identical ways to double a list of numbers.

_.map([1, 2, 3], function(n){ return n * 2; });
_([1, 2, 3]).map(function(n){ return n * 2; });

Calling chain on a wrapped object will cause all future method calls to return wrapped objects as well. When you've finished the computation, use value to retrieve the final value. Here's an example of chaining together a map/flatten/reduce, in order to get the word count of every word in a song.

var lyrics = [
  {line : 1, words : "I'm a lumberjack and I'm okay"},
  {line : 2, words : "I sleep all night and I work all day"},
  {line : 3, words : "He's a lumberjack and he's okay"},
  {line : 4, words : "He sleeps all night and he works all day"}
];

_.chain(lyrics)
  .map(function(line) { return line.words.split(' '); })
  .flatten()
  .reduce(function(counts, word) {
    counts[word] = (counts[word] || 0) + 1;
    return counts;
}, {}).value();

=> {lumberjack : 2, all : 4, night : 2 ... }

In addition, the Array prototype's methods are proxied through the chained Underscore object, so you can slip a reverse or a push into your chain, and continue to modify the array.

chain_.chain(obj)
Returns a wrapped object. Calling methods on this object will continue to return wrapped objects until value is used.

var stooges = [{name : 'curly', age : 25}, {name : 'moe', age : 21}, {name : 'larry', age : 23}];
var youngest = _.chain(stooges)
  .sortBy(function(stooge){ return stooge.age; })
  .map(function(stooge){ return stooge.name + ' is ' + stooge.age; })
  .first()
  .value();
=> "moe is 21"

value_(obj).value()
Extracts the value of a wrapped object.

_([1, 2, 3]).value();
=> [1, 2, 3]

Underscore.lua, a Lua port of the functions that are applicable in both languages. Includes OOP-wrapping and chaining. The source is available on GitHub.

Underscore.php, a PHP port of the functions that are applicable in both languages. Includes OOP-wrapping and chaining. The source is available on GitHub.

Underscore-perl, a Perl port of many of the Underscore.js functions, aimed at on Perl hashes and arrays, also available on GitHub.

Underscore.string, an Underscore extension that adds functions for string-manipulation: trim, startsWith, contains, capitalize, reverse, sprintf, and more.

Ruby's Enumerable module.

Prototype.js, which provides JavaScript with collection functions in the manner closest to Ruby's Enumerable.

Oliver Steele's Functional JavaScript, which includes comprehensive higher-order function support as well as string lambdas.

Michael Aufreiter's Data.js, a data manipulation + persistence library for JavaScript.

Python's itertools.

Change Log

1.3.3April 10, 2012

  • Many improvements to _.template, which now provides the source of the template function as a property, for potentially even more efficient pre-compilation on the server-side. You may now also set the variable option when creating a template, which will cause your passed-in data to be made available under the variable you named, instead of using a with statement — significantly improving the speed of rendering the template.
  • Added the pick function, which allows you to filter an object literal with a whitelist of allowed property names.
  • Added the result function, for convenience when working with APIs that allow either functions or raw properties.
  • Added the isFinite function, because sometimes knowing that a value is a number just ain't quite enough.
  • The sortBy function may now also be passed the string name of a property to use as the sort order on each object.
  • Fixed uniq to work with sparse arrays.
  • The difference function now performs a shallow flatten instead of a deep one when computing array differences.
  • The debounce function now takes an immediate parameter, which will cause the callback to fire on the leading instead of the trailing edge.

1.3.1Jan. 23, 2012

  • Added an _.has function, as a safer way to use hasOwnProperty.
  • Added _.collect as an alias for _.map. Smalltalkers, rejoice.
  • Reverted an old change so that _.extend will correctly copy over keys with undefined values again.
  • Bugfix to stop escaping slashes within interpolations in _.template.

1.3.0Jan. 11, 2012

  • Removed AMD (RequireJS) support from Underscore. If you'd like to use Underscore with RequireJS, you can load it as a normal script, wrap or patch your copy, or download a forked version.

1.2.4Jan. 4, 2012

  • You now can (and probably should, as it's simpler) write _.chain(list) instead of _(list).chain().
  • Fix for escaped characters in Underscore templates, and for supporting customizations of _.templateSettings that only define one or two of the required regexes.
  • Fix for passing an array as the first argument to an _.wrap'd function.
  • Improved compatibility with ClojureScript, which adds a call function to String.prototype.

1.2.3Dec. 7, 2011

  • Dynamic scope is now preserved for compiled _.template functions, so you can use the value of this if you like.
  • Sparse array support of _.indexOf, _.lastIndexOf.
  • Both _.reduce and _.reduceRight can now be passed an explicitly undefined value. (There's no reason why you'd want to do this.)

1.2.2Nov. 14, 2011

  • Continued tweaks to _.isEqual semantics. Now JS primitives are considered equivalent to their wrapped versions, and arrays are compared by their numeric properties only (#351).
  • _.escape no longer tries to be smart about not double-escaping already-escaped HTML entities. Now it just escapes regardless (#350).
  • In _.template, you may now leave semicolons out of evaluated statements if you wish: <% }) %> (#369).
  • _.after(callback, 0) will now trigger the callback immediately, making "after" easier to use with asynchronous APIs (#366).

1.2.1Oct. 24, 2011

  • Several important bug fixes for _.isEqual, which should now do better on mutated Arrays, and on non-Array objects with length properties. (#329)
  • jrburke contributed Underscore exporting for AMD module loaders, and tonylukasavage for Appcelerator Titanium. (#335, #338)
  • You can now _.groupBy(list, 'property') as a shortcut for grouping values by a particular common property.
  • _.throttle'd functions now fire immediately upon invocation, and are rate-limited thereafter (#170, #266).
  • Most of the _.is[Type] checks no longer ducktype.
  • The _.bind function now also works on constructors, a-la ES5 ... but you would never want to use _.bind on a constructor function.
  • _.clone no longer wraps non-object types in Objects.
  • _.find and _.filter are now the preferred names for _.detect and _.select.

1.2.0Oct. 5, 2011

  • The _.isEqual function now supports true deep equality comparisons, with checks for cyclic structures, thanks to Kit Cambridge.
  • Underscore templates now support HTML escaping interpolations, using <%- ... %> syntax.
  • Ryan Tenney contributed _.shuffle, which uses a modified Fisher-Yates to give you a shuffled copy of an array.
  • _.uniq can now be passed an optional iterator, to determine by what criteria an object should be considered unique.
  • _.last now takes an optional argument which will return the last N elements of the list.
  • A new _.initial function was added, as a mirror of _.rest, which returns all the initial values of a list (except the last N).

1.1.7July 13, 2011
Added _.groupBy, which aggregates a collection into groups of like items. Added _.union and _.difference, to complement the (re-named) _.intersection. Various improvements for support of sparse arrays. _.toArray now returns a clone, if directly passed an array. _.functions now also returns the names of functions that are present in the prototype chain.

1.1.6April 18, 2011
Added _.after, which will return a function that only runs after first being called a specified number of times. _.invoke can now take a direct function reference. _.every now requires an iterator function to be passed, which mirrors the ECMA5 API. _.extend no longer copies keys when the value is undefined. _.bind now errors when trying to bind an undefined value.

1.1.5Mar 20, 2011
Added an _.defaults function, for use merging together JS objects representing default options. Added an _.once function, for manufacturing functions that should only ever execute a single time. _.bind now delegates to the native ECMAScript 5 version, where available. _.keys now throws an error when used on non-Object values, as in ECMAScript 5. Fixed a bug with _.keys when used over sparse arrays.

1.1.4Jan 9, 2011
Improved compliance with ES5's Array methods when passing null as a value. _.wrap now correctly sets this for the wrapped function. _.indexOf now takes an optional flag for finding the insertion index in an array that is guaranteed to already be sorted. Avoiding the use of .callee, to allow _.isArray to work properly in ES5's strict mode.

1.1.3Dec 1, 2010
In CommonJS, Underscore may now be required with just:
var _ = require("underscore"). Added _.throttle and _.debounce functions. Removed _.breakLoop, in favor of an ECMA5-style un-break-able each implementation — this removes the try/catch, and you'll now have better stack traces for exceptions that are thrown within an Underscore iterator. Improved the isType family of functions for better interoperability with Internet Explorer host objects. _.template now correctly escapes backslashes in templates. Improved _.reduce compatibility with the ECMA5 version: if you don't pass an initial value, the first item in the collection is used. _.each no longer returns the iterated collection, for improved consistency with ES5's forEach.

1.1.2
Fixed _.contains, which was mistakenly pointing at _.intersect instead of _.include, like it should have been. Added _.unique as an alias for _.uniq.

1.1.1
Improved the speed of _.template, and its handling of multiline interpolations. Ryan Tenney contributed optimizations to many Underscore functions. An annotated version of the source code is now available.

1.1.0
The method signature of _.reduce has been changed to match the ECMAScript 5 signature, instead of the Ruby/Prototype.js version. This is a backwards-incompatible change. _.template may now be called with no arguments, and preserves whitespace. _.contains is a new alias for _.include.

1.0.4
Andri Möll contributed the _.memoize function, which can be used to speed up expensive repeated computations by caching the results.

1.0.3
Patch that makes _.isEqual return false if any property of the compared object has a NaN value. Technically the correct thing to do, but of questionable semantics. Watch out for NaN comparisons.

1.0.2
Fixes _.isArguments in recent versions of Opera, which have arguments objects as real Arrays.

1.0.1
Bugfix for _.isEqual, when comparing two objects with the same number of undefined keys, but with different names.

1.0.0
Things have been stable for many months now, so Underscore is now considered to be out of beta, at 1.0. Improvements since 0.6 include _.isBoolean, and the ability to have _.extend take multiple source objects.

0.6.0
Major release. Incorporates a number of Mile Frawley's refactors for safer duck-typing on collection functions, and cleaner internals. A new _.mixin method that allows you to extend Underscore with utility functions of your own. Added _.times, which works the same as in Ruby or Prototype.js. Native support for ECMAScript 5's Array.isArray, and Object.keys.

0.5.8
Fixed Underscore's collection functions to work on NodeLists and HTMLCollections once more, thanks to Justin Tulloss.

0.5.7
A safer implementation of _.isArguments, and a faster _.isNumber,
thanks to Jed Schmidt.

0.5.6
Customizable delimiters for _.template, contributed by Noah Sloan.

0.5.5
Fix for a bug in MobileSafari's OOP-wrapper, with the arguments object.

0.5.4
Fix for multiple single quotes within a template string for _.template. See: Rick Strahl's blog post.

0.5.2
New implementations of isArray, isDate, isFunction, isNumber, isRegExp, and isString, thanks to a suggestion from Robert Kieffer. Instead of doing Object#toString comparisons, they now check for expected properties, which is less safe, but more than an order of magnitude faster. Most other Underscore functions saw minor speed improvements as a result. Evgeniy Dolzhenko contributed _.tap, similar to Ruby 1.9's, which is handy for injecting side effects (like logging) into chained calls.

0.5.1
Added an _.isArguments function. Lots of little safety checks and optimizations contributed by Noah Sloan and Andri Möll.

0.5.0
[API Changes] _.bindAll now takes the context object as its first parameter. If no method names are passed, all of the context object's methods are bound to it, enabling chaining and easier binding. _.functions now takes a single argument and returns the names of its Function properties. Calling _.functions(_) will get you the previous behavior. Added _.isRegExp so that isEqual can now test for RegExp equality. All of the "is" functions have been shrunk down into a single definition. Karl Guertin contributed patches.

0.4.7
Added isDate, isNaN, and isNull, for completeness. Optimizations for isEqual when checking equality between Arrays or Dates. _.keys is now 25%–2X faster (depending on your browser) which speeds up the functions that rely on it, such as _.each.

0.4.6
Added the range function, a port of the Python function of the same name, for generating flexibly-numbered lists of integers. Original patch contributed by Kirill Ishanov.

0.4.5
Added rest for Arrays and arguments objects, and aliased first as head, and rest as tail, thanks to Luke Sutton's patches. Added tests ensuring that all Underscore Array functions also work on arguments objects.

0.4.4
Added isString, and isNumber, for consistency. Fixed _.isEqual(NaN, NaN) to return true (which is debatable).

0.4.3
Started using the native StopIteration object in browsers that support it. Fixed Underscore setup for CommonJS environments.

0.4.2
Renamed the unwrapping function to value, for clarity.

0.4.1
Chained Underscore objects now support the Array prototype methods, so that you can perform the full range of operations on a wrapped array without having to break your chain. Added a breakLoop method to break in the middle of any Underscore iteration. Added an isEmpty function that works on arrays and objects.

0.4.0
All Underscore functions can now be called in an object-oriented style, like so: _([1, 2, 3]).map(...);. Original patch provided by Marc-André Cournoyer. Wrapped objects can be chained through multiple method invocations. A functions method was added, providing a sorted list of all the functions in Underscore.

0.3.3
Added the JavaScript 1.8 function reduceRight. Aliased it as foldr, and aliased reduce as foldl.

0.3.2
Now runs on stock Rhino interpreters with: load("underscore.js"). Added identity as a utility function.

0.3.1
All iterators are now passed in the original collection as their third argument, the same as JavaScript 1.6's forEach. Iterating over objects is now called with (value, key, collection), for details see _.each.

0.3.0
Added Dmitry Baranovskiy's comprehensive optimizations, merged in Kris Kowal's patches to make Underscore CommonJS and Narwhal compliant.

0.2.0
Added compose and lastIndexOf, renamed inject to reduce, added aliases for inject, filter, every, some, and forEach.

0.1.1
Added noConflict, so that the "Underscore" object can be assigned to other variables.

0.1.0
Initial release of Underscore.js.

A DocumentCloud Project

node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/index.js000066400000000000000000000000521240302775300301460ustar00rootroot00000000000000module.exports = require('./underscore'); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/package.json000066400000000000000000000037771240302775300310100ustar00rootroot00000000000000{ "name": "underscore", "description": "JavaScript's functional programming helper library.", "homepage": "http://documentcloud.github.com/underscore/", "keywords": [ "util", "functional", "server", "client", "browser" ], "author": { "name": "Jeremy Ashkenas", "email": "jeremy@documentcloud.org" }, "repository": { "type": "git", "url": "git://github.com/documentcloud/underscore.git" }, "main": "underscore.js", "version": "1.3.3", "readme": " __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n", "readmeFilename": "README.md", "_id": "underscore@1.3.3", "_from": "underscore@1.3.3" } node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/raw/000077500000000000000000000000001240302775300272755ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/raw/underscore.psd000066400000000000000000006447641240302775300322030ustar00rootroot000000000000008BPSEd8BIM%8BIM$B Adobe Photoshop CS4 Macintosh 2012-01-04T17:18:29-05:00 2012-01-04T23:02:20-05:00 2012-01-04T23:02:20-05:00 application/vnd.adobe.photoshop xmp.iid:FC7F117407206811871F8E4872766309 xmp.did:F77F117407206811871F8E4872766309 xmp.did:F77F117407206811871F8E4872766309 created xmp.iid:F77F117407206811871F8E4872766309 2012-01-04T17:18:29-05:00 Adobe Photoshop CS4 Macintosh saved xmp.iid:F87F117407206811871F8E4872766309 2012-01-04T17:26:44-05:00 Adobe Photoshop CS4 Macintosh / saved xmp.iid:F97F117407206811871F8E4872766309 2012-01-04T17:27:19-05:00 Adobe Photoshop CS4 Macintosh / saved xmp.iid:FB7F117407206811871F8E4872766309 2012-01-04T17:30:21-05:00 Adobe Photoshop CS4 Macintosh / saved xmp.iid:FC7F117407206811871F8E4872766309 2012-01-04T23:02:20-05:00 Adobe Photoshop CS4 Macintosh / 1 720000/10000 720000/10000 2 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;6A76065779F552F89C70D21D9E95D349 396 69 65535 36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;FC26DAFD7A614305AFD2DCEA5D957F7E 3 8BIMHH8BIM&?8BIM Z8BIM8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM 8BIM8BIM0 8BIM-8BIM@@8BIM6nullVrsnlongenabbool numBeforelongnumAfterlongSpcnlong minOpacitylong maxOpacitylong2BlnMlong8BIM3null Vrsnlong frameStepObjcnull numeratorlong denominatorlongX frameRatedoub@>timeObjcnull numeratorlong denominatorlongXdurationObjcnull numeratorlongp denominatorlongX workInTimeObjcnull numeratorlong denominatorlongX workOutTimeObjcnull numeratorlongp denominatorlongXLCntlongglobalTrackListVlLs hasMotionbool8BIM4FnullVrsnlongsheetTimelineOptionsVlLs8BIM8BIMnullbaseNameTEXTUserboundsObjcRct1Top longLeftlongBtomlongERghtlongslicesVlLsObjcslicesliceIDlonggroupIDlongoriginenum ESliceOrigin autoGeneratedTypeenum ESliceTypeImg boundsObjcRct1Top longLeftlongBtomlongERghtlongurlTEXTnullTEXTMsgeTEXTaltTagTEXTcellTextIsHTMLboolcellTextTEXT horzAlignenumESliceHorzAligndefault vertAlignenumESliceVertAligndefault bgColorTypeenumESliceBGColorTypeNone topOutsetlong leftOutsetlong bottomOutsetlong rightOutsetlong8BIM( ?8BIM8BIM8BIM %4 JFIFHH Adobe_CMAdobed            " ?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?98%ē9)1l&vߒ{ޏz7Tʧ3 ˁُO[ucݛkFSgu2l`ђ#ӹYvS?^}w4t ;߇V=YNV$b[a$-^mrx[snsd? MIg}WLn{kܭ1Ȳ.2_W; $cn{ٗL ]6W%)ʆ՟tQrmߑʹcO[k\ַ5u웲X:m:I}ձovI>fYmzyS@mxב_MǶr^=rk]&I윌B2ʪoSg5mHWF7\}0j5׸ߥݿz}Gv.uM;&Shx ͿjJ_R0vLm o>OoO[𱺅 ʥ;&`/h.TK3 /[}U;>]~OGWT~t(}=n*~MVekQa~c?Ht\lo^]lt׀˄}vuܜmS5uOG9R ]Y{_~tt߫=cՔ -{mxͩ2sNE8}muHEol 5౗V䰹ݹp̳~wX Ju_ԘX_\[ȭ}l;2Yw2lD^ղcp"kk5ߘԒ+zYϯ<:gLuxa>:̤21袋Z?=?H]g}]³lv22ǧUte6jc.#ZOGթ:ٍլfN&m6si'vSn:qOBְ{//M-c߶=VQ}UbR[WNZs1ْ0B!uSg6%pQx6>ΙF5odjcYUf߲+ҡE=[^,Z ,/Kn[[cQ>_H'1A{Z ql=8ܜ+U˵LIN_tg~JNW}aާܻmu0%o}MgΕ^VoMmm̲L6ƽ۷{KKQ/a*_CfV]#KskO{cmh#?jkۻ;۷v%PU8BIM!UAdobe PhotoshopAdobe Photoshop CS48BIM".MM*bj(1r2i ' 'Adobe Photoshop CS4 Macintosh2012:01:04 23:02:20E&(.HH8BIMmopt4TargetSettingsMttCObjc NativeQuadBl longGrn longRd longTrnsbool fileFormatenum FileFormatPNG24 interlacedbool noMatteColorbooltransparencyDitherAlgorithmenumDitherAlgorithmNonetransparencyDitherAmountlong8BIMmsetnullHTMLBackgroundSettingsObjcnullBackgroundColorBluelongBackgroundColorGreenlongBackgroundColorRedlongBackgroundColorStatelongBackgroundImagePathTEXTUseImageAsBackgroundbool HTMLSettingsObjcnullAlwaysAddAltAttributebool AttributeCaselong CloseAllTagsboolEncodinglongFileSavingSettingsObjcnull CopyBackgroundboolDuplicateFileNameBehaviorlongHtmlFileNameComponentsVlLslonglonglonglonglonglongImageSubfolderNameTEXTimagesNameCompatibilityObjcnull NameCompatMacboolNameCompatUNIXboolNameCompatWindowsboolOutputMultipleFilesboolSavingFileNameComponentsVlLs longlonglonglonglonglonglonglonglongSliceFileNameComponentsVlLslonglonglonglonglonglongUseImageSubfolderboolUseLongExtensionsboolGoLiveCompatibleboolImageMapLocationlong ImageMapTypelongIncludeCommentsboolIncludeZeroMarginsboolIndentlong LineEndingslong OutputXHTMLboolQuoteAllAttributesboolSpacersEmptyCellslongSpacersHorizontallongSpacersVerticallong StylesFormatlong TDWidthHeightlongTagCaselongUseCSSboolUseLongHTMLExtensionboolMetadataOutputSettingsObjcnull AddCustomIRboolAddEXIFboolAddXMPboolAddXMPSourceFileURIbool ColorPolicylongMetadataPolicylongWriteMinimalXMPboolWriteXMPToSidecarFilesboolVersionlong8BIMms4w E8BIMnorm <(Layer 18BIMluniLayer 18BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 8BIMfxrpa@\@248BIMnormH( Underscore.js8BIMTyShF??@D2TxLrTxt TEXTUnderscore.js textGriddingenum textGriddingNoneOrntenumOrntHrznAntAenumAnntAnSm TextIndexlong EngineDatatdtaD << /EngineDict << /Editor << /Text (Underscore.js ) >> /ParagraphRun << /DefaultRunData << /ParagraphSheet << /DefaultStyleSheet 0 /Properties << >> >> /Adjustments << /Axis [ 1.0 0.0 1.0 ] /XY [ 0.0 0.0 ] >> >> /RunArray [ << /ParagraphSheet << /DefaultStyleSheet 0 /Properties << /Justification 0 /FirstLineIndent 0.0 /StartIndent 0.0 /EndIndent 0.0 /SpaceBefore 0.0 /SpaceAfter 0.0 /AutoHyphenate true /HyphenatedWordSize 8 /PreHyphen 3 /PostHyphen 3 /ConsecutiveHyphens 2 /Zone 36.0 /WordSpacing [ .8 1.0 1.33 ] /LetterSpacing [ 0.0 0.0 0.0 ] /GlyphSpacing [ 1.0 1.0 1.0 ] /AutoLeading 1.2 /LeadingType 0 /Hanging false /Burasagari false /KinsokuOrder 0 /EveryLineComposer false >> >> /Adjustments << /Axis [ 1.0 0.0 1.0 ] /XY [ 0.0 0.0 ] >> >> ] /RunLengthArray [ 14 ] /IsJoinable 1 >> /StyleRun << /DefaultRunData << /StyleSheet << /StyleSheetData << >> >> >> /RunArray [ << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -40 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -10 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -30 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -10 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -15 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> << /StyleSheet << /StyleSheetData << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 2 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> /StrokeColor << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> /FillFlag true /StrokeFlag false /FillFirst false /YUnderline 1 /OutlineWidth 1.05645 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> >> ] /RunLengthArray [ 2 1 2 1 1 1 1 1 1 3 ] /IsJoinable 2 >> /GridInfo << /GridIsOn false /ShowGrid false /GridSize 18.0 /GridLeading 22.0 /GridColor << /Type 1 /Values [ 0.0 0.0 0.0 1.0 ] >> /GridLeadingFillColor << /Type 1 /Values [ 0.0 0.0 0.0 1.0 ] >> /AlignLineHeightToGridFlags false >> /AntiAlias 3 /UseFractionalGlyphWidths true /Rendered << /Version 1 /Shapes << /WritingDirection 0 /Children [ << /ShapeType 0 /Procession 0 /Lines << /WritingDirection 0 /Children [ ] >> /Cookie << /Photoshop << /ShapeType 0 /PointBase [ 0.0 0.0 ] /Base << /ShapeType 0 /TransformPoint0 [ 1.0 0.0 ] /TransformPoint1 [ 0.0 1.0 ] /TransformPoint2 [ 0.0 0.0 ] >> >> >> >> ] >> >> >> /ResourceDict << /KinsokuSet [ << /Name (PhotoshopKinsokuHard) /NoStart (00 00    0=]0 0 0 00000000A0C0E0G0I0c000000000000000000?!\)]},.:;!!  0) /NoEnd (  0;[00 0 00\([{ 0) /Keep (  %) /Hanging (00.,) >> << /Name (PhotoshopKinsokuSoft) /NoStart (00 0   0=]0 0 0 0000000) /NoEnd (  0;[00 0 00) /Keep (  %) /Hanging (00.,) >> ] /MojiKumiSet [ << /InternalName (Photoshop6MojiKumiSet1) >> << /InternalName (Photoshop6MojiKumiSet2) >> << /InternalName (Photoshop6MojiKumiSet3) >> << /InternalName (Photoshop6MojiKumiSet4) >> ] /TheNormalStyleSheet 0 /TheNormalParagraphSheet 0 /ParagraphSheetSet [ << /Name (Normal RGB) /DefaultStyleSheet 0 /Properties << /Justification 0 /FirstLineIndent 0.0 /StartIndent 0.0 /EndIndent 0.0 /SpaceBefore 0.0 /SpaceAfter 0.0 /AutoHyphenate true /HyphenatedWordSize 6 /PreHyphen 2 /PostHyphen 2 /ConsecutiveHyphens 8 /Zone 36.0 /WordSpacing [ .8 1.0 1.33 ] /LetterSpacing [ 0.0 0.0 0.0 ] /GlyphSpacing [ 1.0 1.0 1.0 ] /AutoLeading 1.2 /LeadingType 0 /Hanging false /Burasagari false /KinsokuOrder 0 /EveryLineComposer false >> >> ] /StyleSheetSet [ << /Name (Normal RGB) /StyleSheetData << /Font 1 /FontSize 12.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 0.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 0 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 2 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> /StrokeColor << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> /FillFlag true /StrokeFlag false /FillFirst true /YUnderline 1 /OutlineWidth 1.0 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> ] /FontSet [ << /Name (OpenSans-Light) /Script 0 /FontType 1 /Synthetic 0 >> << /Name (MyriadPro-Regular) /Script 0 /FontType 0 /Synthetic 0 >> << /Name (AdobeInvisFont) /Script 0 /FontType 0 /Synthetic 0 >> ] /SuperscriptSize .583 /SuperscriptPosition .333 /SubscriptSize .583 /SubscriptPosition .333 /SmallCapSize .7 >> /DocumentResources << /KinsokuSet [ << /Name (PhotoshopKinsokuHard) /NoStart (00 00    0=]0 0 0 00000000A0C0E0G0I0c000000000000000000?!\)]},.:;!!  0) /NoEnd (  0;[00 0 00\([{ 0) /Keep (  %) /Hanging (00.,) >> << /Name (PhotoshopKinsokuSoft) /NoStart (00 0   0=]0 0 0 0000000) /NoEnd (  0;[00 0 00) /Keep (  %) /Hanging (00.,) >> ] /MojiKumiSet [ << /InternalName (Photoshop6MojiKumiSet1) >> << /InternalName (Photoshop6MojiKumiSet2) >> << /InternalName (Photoshop6MojiKumiSet3) >> << /InternalName (Photoshop6MojiKumiSet4) >> ] /TheNormalStyleSheet 0 /TheNormalParagraphSheet 0 /ParagraphSheetSet [ << /Name (Normal RGB) /DefaultStyleSheet 0 /Properties << /Justification 0 /FirstLineIndent 0.0 /StartIndent 0.0 /EndIndent 0.0 /SpaceBefore 0.0 /SpaceAfter 0.0 /AutoHyphenate true /HyphenatedWordSize 6 /PreHyphen 2 /PostHyphen 2 /ConsecutiveHyphens 8 /Zone 36.0 /WordSpacing [ .8 1.0 1.33 ] /LetterSpacing [ 0.0 0.0 0.0 ] /GlyphSpacing [ 1.0 1.0 1.0 ] /AutoLeading 1.2 /LeadingType 0 /Hanging false /Burasagari false /KinsokuOrder 0 /EveryLineComposer false >> >> ] /StyleSheetSet [ << /Name (Normal RGB) /StyleSheetData << /Font 1 /FontSize 12.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 0.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /AutoKerning true /Kerning 0 /BaselineShift 0.0 /FontCaps 0 /FontBaseline 0 /Underline false /Strikethrough false /Ligatures true /DLigatures false /BaselineDirection 2 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /NoBreak false /FillColor << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> /StrokeColor << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> /FillFlag true /StrokeFlag false /FillFirst true /YUnderline 1 /OutlineWidth 1.0 /CharacterDirection 0 /HindiNumbers false /Kashida 1 /DiacriticPos 2 >> >> ] /FontSet [ << /Name (OpenSans-Light) /Script 0 /FontType 1 /Synthetic 0 >> << /Name (MyriadPro-Regular) /Script 0 /FontType 0 /Synthetic 0 >> << /Name (AdobeInvisFont) /Script 0 /FontType 0 /Synthetic 0 >> ] /SuperscriptSize .583 /SuperscriptPosition .333 /SubscriptSize .583 /SubscriptPosition .333 /SmallCapSize .7 >> >>warp warpStyleenum warpStylewarpNone warpValuedoubwarpPerspectivedoubwarpPerspectiveOtherdoub warpRotateenumOrntHrzn8BIMluni Underscore.js8BIMlnsrrend8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 =:8BIMfxrpq]8BIMnorm0(8BIMluni </Layer group>8BIMlnsrlset8BIMlyid 8BIMlsct8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 ?8BIMfxrpa@\@8BIMnorm<(Layer 38BIMluniLayer 38BIMlnsrlayr8BIMlyid 8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 @8BIMfxrpeԎz@Io8BIMnorm(T(Layer 28BIMlfx2tnullScl UntF#Prc@YmasterFXSwitchboolDrShObjcDrSh enabboolMd enumBlnMOvrlClr ObjcRGBCRd doubGrn doubBl doubOpctUntF#Prc@GuglgboollaglUntF#Ang@^DstnUntF#Pxl@CkmtUntF#PxlblurUntF#Pxl@NoseUntF#PrcAntAboolTrnSObjcShpCNm TEXTLinearCrv VlLsObjcCrPtHrzndoubVrtcdoubObjcCrPtHrzndoub@oVrtcdoub@o layerConcealsbool8BIMlrFX8BIMcmnS8BIMdsdw3x8BIMoverx8BIMisdw3x8BIMmul 8BIMoglw*8BIMscrn8BIMiglw+8BIMscrn8BIMbevlNx8BIMscrn8BIMmul 8BIMsofi"8BIMnorm8BIMluniLayer 28BIMlnsrlayr8BIMlyid 8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 A8BIMfxrpj]|,Gh28BIMnorm (side8BIMluni side8BIMlyid 8BIMlsct 8BIMpass8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 B8BIMfxrpa@\@8BIMnorm0(8BIMluni </Layer group>8BIMlnsrlset8BIMlyid8BIMlsct8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 C8BIMfxrpa@\@8BIMnorm( Shape 1 copy8BIMSoCopnullClr ObjcRGBCRd doubGrn doub@DBl doub@P@/8BIMvmskzoo zoo zoo zoe-zoe-zoe-+e-+e-+e-+o +o +o 8BIMluni Shape 1 copy8BIMlnsrshap8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 C8BIMfxrp6p2Y&6Zce8BIMnorm(Shape 18BIMSoCopnullClr ObjcRGBCRd doubGrn doub@\@#Bl doub@f @8BIMvmskzoPzoPzoPzoqzoqzoq+q+q+q+P+P+P8BIMluniShape 18BIMlnsrshap8BIMlyid 8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 D8BIMfxrpb(t"Y&6Zce9Cf8BIMnorm(p(Shape 1 (merged)8BIMlfx2tnullScl UntF#Prc@YmasterFXSwitchboolDrShObjcDrSh enabboolMd enumBlnMMltpClr ObjcRGBCRd doubGrn doubBl doubOpctUntF#Prc@DuglgboollaglUntF#Ang@^DstnUntF#Pxl?CkmtUntF#PxlblurUntF#Pxl@NoseUntF#PrcAntAboolTrnSObjcShpCNm TEXTLinearCrv VlLsObjcCrPtHrzndoubVrtcdoubObjcCrPtHrzndoub@oVrtcdoub@o layerConcealsbool8BIMlrFX8BIMcmnS8BIMdsdw3x8BIMmul f8BIMisdw3x8BIMmul 8BIMoglw*8BIMscrn8BIMiglw+8BIMscrn8BIMbevlNx8BIMscrn8BIMmul 8BIMsofi"8BIMnorm8BIMluni$Shape 1 (merged)8BIMlnsrshap8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 I 8BIMfxrp8BIMnorm(under 18BIMluniunder 18BIMlyid8BIMlsct 8BIMpass8BIMlspf8BIMlclr8BIMshmdH8BIMcust4metadata layerTimedoubA5 Q8BIMfxrpa@\@|~xI@0@@ @@0@0@@0@@P 0p@ `p 0@0 @@00p`0@P@ϟ`@PߟP@ @`߯p ``@@@@p@00@@0@@@` @@0@@0` @p0 `P`00p@`p@`p0@p@P@ p`@ 0P P  ``P@P`@@``@@0 @``@p`p@`@@`@P0`0@p@@P@0@`0p``@@0@@0`P0p@ @@ `@P`p  0@@@P@@@```@@@0@@@`P@@@@@@P @@P@P@`pPP@@@0@@0`pP@`@@@@   @@`@0@P@P@P` 0 @ @0@@`@p0@  @@@@P@0`@P@@`` 0@0P@0@`@0p`@`p@@@`0@@ @ pp@P@@`P@@0@0@`@`@ P@ 0@@@@p`@@@@0@p@@00@ ``@@P @0@`pp @@@p@p@@p00@@@p@P@`@0  P@0 @@@p@`p@@ppp@@0@p 0@ @p@p@0`p` 0@p@@ @0P@@p0 0@0`@p@@@``@@0@p@p@0@ @@00 @P@@ 00@  @P0`p@@@000 0@0P`00ߏP0@`@ `@@P@ @` ϏP00@p@p@@p`@00P0@ @ߏ @pp`@@@`` @p@Ͽ`0@ p`P߯`@@P `  @p@0@@p`@ @@ @@  `@`p@0`p p@ϯ``0߯`&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&  qqm***qqm***qqm***qqm***qqm***qqm***qqm***qqm***qqm***qqm*** ӵAAAӵAAAӵAAAӵAAAӵAAAӵAAAӵAAAӵAAAӵAAAӵAAA8BIMPatt8BIMTxt2 /DocumentResources << /FontSet << /Resources [ << /Resource << /StreamTag /CoolTypeFont /Identifier << /Name (OpenSans-Light) /Type 1 >> >> >> << /Resource << /StreamTag /CoolTypeFont /Identifier << /Name (MyriadPro-Regular) /Type 0 >> >> >> << /Resource << /StreamTag /CoolTypeFont /Identifier << /Name (AdobeInvisFont) /Type 0 >> >> >> ] >> /MojiKumiCodeToClassSet << /Resources [ << /Resource << /Name () /Members << /ClassMappings [ << /R (55) /C 1 >> << /R (77) /C 1 >> << /R (99) /C 1 >> << /R (;;) /C 1 >> << /R (==) /C 1 >> << /R (??) /C 1 >> << /R (AA) /C 1 >> << /R (CC) /C 1 >> << /R () /C 1 >> << /R (;;) /C 1 >> << /R ([[) /C 1 >> << /R (  ) /C 1 >> << /R (00) /C 1 >> << /R (0 0 ) /C 1 >> << /R (0 0 ) /C 1 >> << /R (00) /C 1 >> << /R (00) /C 1 >> << /R (00) /C 1 >> << /R (66) /C 2 >> << /R (88) /C 2 >> << /R (::) /C 2 >> << /R (<<) /C 2 >> << /R (>>) /C 2 >> << /R (@@) /C 2 >> << /R (BB) /C 2 >> << /R (DD) /C 2 >> << /R ( ) /C 2 >> << /R (==) /C 2 >> << /R (]]) /C 2 >> << /R (  ) /C 2 >> << /R (0 0 ) /C 2 >> << /R (0 0 ) /C 2 >> << /R (0 0 ) /C 2 >> << /R (00) /C 2 >> << /R (00) /C 2 >> << /R (00) /C 2 >> << /R () /C 3 >> << /R (^^) /C 3 >> << /R (0A0A) /C 3 >> << /R (0C0C) /C 3 >> << /R (0E0E) /C 3 >> << /R (0G0G) /C 3 >> << /R (0I0I) /C 3 >> << /R (0c0c) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R (00) /C 3 >> << /R () /C 4 >> << /R () /C 4 >> << /R () /C 5 >> << /R (00) /C 5 >> << /R (  ) /C 5 >> << /R () /C 6 >> << /R (00) /C 6 >> << /R ( ) /C 7 >> << /R (00) /C 7 >> << /R (  ) /C 8 >> << /R ( % &) /C 8 >> << /R () /C 9 >> << /R () /C 9 >> << /R () /C 9 >> << /R () /C 10 >> << /R () /C 10 >> << /R () /C 10 >> << /R ( 0 0) /C 10 >> << /R ( 2 4) /C 10 >> << /R (00) /C 11 >> << /R (0B0B) /C 12 >> << /R (0D0D) /C 12 >> << /R (0F0F) /C 12 >> << /R (0H0H) /C 12 >> << /R (0J0b) /C 12 >> << /R (0d0) /C 12 >> << /R (00) /C 12 >> << /R (00) /C 12 >> << /R (00) /C 12 >> << /R () /C 13 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (00) /C 14 >> << /R (2 2C) /C 14 >> << /R (22) /C 14 >> << /R (22) /C 14 >> << /R (33W) /C 14 >> << /R (3q3v) /C 14 >> << /R (33) /C 14 >> << /R (N) /C 14 >> << /R (09) /C 15 >> << /R (!~) /C 16 >> << /R () /C 16 >> << /R (  ) /C 16 >> << /R (  ) /C 16 >> ] >> >> >> ] /DisplayList [ << /Resource 0 >> ] >> /MojiKumiTableSet << /Resources [ << /Resource << /Name (Photoshop6MojiKumiSet4) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 17 ] /Data << /B << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 17 ] /Data << /B << /R [ .25 .25 .25 ] >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .75 .75 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 17 ] /Data << /B << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 17 ] /Data << /B << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 17 /Elements [ << /P [ 17 1 ] /Data << /A << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 18 /Elements [ << /P [ 18 1 ] /Data << /A << /R [ .5 .5 .5 ] >> >> >> ] >> ] >> >> /PredefinedTag 2 >> >> >> << /Resource << /Name (Photoshop6MojiKumiSet3) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 17 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .75 .75 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 17 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 17 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> ] >> >> /PredefinedTag 4 >> >> >> << /Resource << /Name (Photoshop6MojiKumiSet2) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .75 .75 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> ] >> >> /PredefinedTag 3 >> >> >> << /Resource << /Name (Photoshop6MojiKumiSet1) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> ] >> >> /PredefinedTag 1 >> >> >> << /Resource << /Name (YakumonoHankaku) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 2 >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> ] >> >> /PredefinedTag 1 >> >> >> << /Resource << /Name (GyomatsuYakumonoHankaku) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .75 .75 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> ] >> >> /PredefinedTag 3 >> >> >> << /Resource << /Name (GyomatsuYakumonoZenkaku) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 17 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .75 .75 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 17 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 17 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> ] >> >> /PredefinedTag 4 >> >> >> << /Resource << /Name (YakumonoZenkaku) /Members << /CodeToClass 0 /AutoTsume << /TsumeMappings [ << /Before -.5 /Code () >> << /Before -.5 /Code (;) >> << /Before -.5 /Code ([) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code ( ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0 ) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /Before -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (=) >> << /After -.5 /Code (]) >> << /After -.5 /Code ( ) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0 ) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code (0) >> << /After -.5 /Code () >> << /After -.5 /Code (0) >> << /After -.5 /Code ( ) >> << /After -.5 /Code (0) >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code () >> << /Before -.25 /After -.25 /Code (0) >> << /Before -.25 /After -.25 /Code ( ) >> ] >> /Table << /DataArray << /SparseArray [ << /Index 1 /Elements [ << /P [ 1 5 ] /Data << /A << /R [ .25 .25 .25 ] /P 1 >> >> >> ] >> << /Index 2 /Elements [ << /P [ 2 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 2 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 2 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 2 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 11 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 3 >> >> >> << /P [ 2 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 2 17 ] /Data << /B << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 3 /Elements [ << /P [ 3 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 3 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 3 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 3 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 3 15 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 3 16 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 4 /Elements [ << /P [ 4 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 4 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 4 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 4 15 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 4 16 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> ] >> << /Index 5 /Elements [ << /P [ 5 1 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 2 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 3 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 4 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 5 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 1 >> >> >> << /P [ 5 6 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 7 ] /Data << /B << /R [ .25 .25 .25 ] /P 1 >> >> >> << /P [ 5 8 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 9 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 10 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 11 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 12 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 13 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 14 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 15 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 16 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 5 17 ] /Data << /B << /R [ .25 .25 .25 ] >> >> >> ] >> << /Index 6 /Elements [ << /P [ 6 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 6 3 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 4 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 5 ] /Data << /B << /R [ 0.0 .75 .75 ] /P 1 >> >> >> << /P [ 6 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 6 8 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 9 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 10 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 11 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 12 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 13 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 14 ] /Data << /B << /R [ 0.0 .5 .5 ] >> >> >> << /P [ 6 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 4 >> >> >> << /P [ 6 17 ] /Data << /B << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 7 /Elements [ << /P [ 7 1 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 3 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 4 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 5 ] /Data << /B << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 7 7 ] /Data << /B << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 7 8 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 9 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 10 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 12 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 13 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 14 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 15 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 16 ] /Data << /B << /R [ 0.0 .5 .5 ] /P 2 >> >> >> << /P [ 7 17 ] /Data << /B << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 8 /Elements [ << /P [ 8 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 8 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 8 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 8 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 8 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 8 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 9 /Elements [ << /P [ 9 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 9 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 9 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 9 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 9 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 9 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 10 /Elements [ << /P [ 10 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 10 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 10 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 10 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 10 15 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 10 16 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 11 /Elements [ << /P [ 11 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 11 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 11 15 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> << /P [ 11 16 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 4 >> >> >> ] >> << /Index 12 /Elements [ << /P [ 12 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 12 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 12 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 12 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 12 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 12 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 13 /Elements [ << /P [ 13 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 13 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 13 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 13 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 13 15 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 13 16 ] /Data << /B << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> ] >> << /Index 14 /Elements [ << /P [ 14 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 14 3 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 14 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 14 8 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 9 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 10 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 12 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 13 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 14 ] /Data << /A << /R [ 0.0 0.0 1.0 ] >> >> >> << /P [ 14 15 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 14 16 ] /Data << /B << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 15 /Elements [ << /P [ 15 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 15 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 15 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 15 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 15 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 15 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 15 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 15 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 16 /Elements [ << /P [ 16 1 ] /Data << /A << /R [ 0.0 .5 .5 ] /P 3 >> >> >> << /P [ 16 3 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 4 ] /Data << /A << /R [ .125 .25 .25 ] /P 4 >> >> >> << /P [ 16 5 ] /Data << /A << /R [ 0.0 .25 .25 ] /P 1 >> >> >> << /P [ 16 7 ] /Data << /A << /R [ 0.0 0.0 0.0 ] /P 2 >> >> >> << /P [ 16 8 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 9 ] /Data << /A << /R [ 0.0 0.0 .5 ] /P 4 >> >> >> << /P [ 16 10 ] /Data << /A << /R [ 0.0 0.0 .5 ] >> >> >> << /P [ 16 12 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> << /P [ 16 14 ] /Data << /A << /R [ .125 .25 .5 ] /P 4 >> >> >> ] >> << /Index 17 /Elements [ << /P [ 17 1 ] /Data << /A << /R [ .5 .5 .5 ] >> >> >> ] >> << /Index 18 /Elements [ << /P [ 18 1 ] /Data << /A << /R [ .5 .5 .5 ] >> >> >> ] >> ] >> >> /PredefinedTag 2 >> >> >> ] /DisplayList [ << /Resource 0 >> << /Resource 1 >> << /Resource 2 >> << /Resource 3 >> << /Resource 4 >> << /Resource 5 >> << /Resource 6 >> << /Resource 7 >> ] >> /KinsokuSet << /Resources [ << /Resource << /Name (None) /Data << /NoStart () /NoEnd () /Keep () /Hanging () /PredefinedTag 0 >> >> >> << /Resource << /Name (PhotoshopKinsokuHard) /Data << /NoStart (!\),.:;?]}    0!! 0000 0 0 0000A0C0E0G0I0c000000000000000000000000 =]) /NoEnd (\([{  00 0 0000 ;[) /Keep (  % &) /Hanging (00 ) /PredefinedTag 1 >> >> >> << /Resource << /Name (PhotoshopKinsokuSoft) /Data << /NoStart (  0000 0 0 00000000 =]) /NoEnd (  00 0 000;[) /Keep (  % &) /Hanging (00 ) /PredefinedTag 2 >> >> >> << /Resource << /Name (Hard) /Data << /NoStart (!\),.:;?]}    0!! 0000 0 0 0000A0C0E0G0I0c000000000000000000000000 =]) /NoEnd (\([{  00 0 0000 ;[) /Keep (  % &) /Hanging (00 ) /PredefinedTag 1 >> >> >> << /Resource << /Name (Soft) /Data << /NoStart (  0000 0 0 00000000 =]) /NoEnd (  00 0 000;[) /Keep (  % &) /Hanging (00 ) /PredefinedTag 2 >> >> >> ] /DisplayList [ << /Resource 0 >> << /Resource 1 >> << /Resource 2 >> << /Resource 3 >> << /Resource 4 >> ] >> /StyleSheetSet << /Resources [ << /Resource << /Name (Normal RGB) /Features << /Font 1 /FontSize 12.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 0.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 1 /FontCaps 0 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 2 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst true /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.0 /MiterLimit 4.0 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> ] /DisplayList [ << /Resource 0 >> ] >> /ParagraphSheetSet << /Resources [ << /Resource << /Name (Normal RGB) /Features << /Justification 0 /FirstLineIndent 0.0 /StartIndent 0.0 /EndIndent 0.0 /SpaceBefore 0.0 /SpaceAfter 0.0 /DropCaps 1 /AutoLeading 1.2 /LeadingType 0 /AutoHyphenate true /HyphenatedWordSize 6 /PreHyphen 2 /PostHyphen 2 /ConsecutiveHyphens 0 /Zone 36.0 /HyphenateCapitalized true /HyphenationPreference .5 /WordSpacing [ .8 1.0 1.33 ] /LetterSpacing [ 0.0 0.0 0.0 ] /GlyphSpacing [ 1.0 1.0 1.0 ] /SingleWordJustification 6 /Hanging false /AutoTCY 0 /KeepTogether true /BurasagariType 0 /KinsokuOrder 0 /Kinsoku /nil /KurikaeshiMojiShori false /MojiKumiTable /nil /EveryLineComposer false /TabStops << >> /DefaultTabWidth 36.0 /DefaultStyle << >> /ParagraphDirection 0 /JustificationMethod 0 /ComposerEngine 0 >> >> >> ] /DisplayList [ << /Resource 0 >> ] >> /TextFrameSet << /Resources [ << /Resource << /Bezier << /Points [ 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ] >> /Data << /Type 0 /LineOrientation 0 /TextOnPathTRange [ -1.0 -1.0 ] /RowGutter 0.0 /ColumnGutter 0.0 /FirstBaselineAlignment << /Flag 1 /Min 0.0 >> /PathData << /Spacing -1 >> >> >> >> ] >> >> /DocumentObjects << /DocumentSettings << /HiddenGlyphFont << /AlternateGlyphFont 2 /WhitespaceCharacterMapping [ << /WhitespaceCharacter ( ) /AlternateCharacter (1) >> << /WhitespaceCharacter ( ) /AlternateCharacter (6) >> << /WhitespaceCharacter ( ) /AlternateCharacter (0) >> << /WhitespaceCharacter ( \)) /AlternateCharacter (5) >> << /WhitespaceCharacter () /AlternateCharacter (5) >> << /WhitespaceCharacter (0) /AlternateCharacter (1) >> << /WhitespaceCharacter () /AlternateCharacter (3) >> ] >> /NormalStyleSheet 0 /NormalParagraphSheet 0 /SuperscriptSize .583 /SuperscriptPosition .333 /SubscriptSize .583 /SubscriptPosition .333 /SmallCapSize .7 /UseSmartQuotes true /SmartQuoteSets [ << /Language 0 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 1 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 2 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 3 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 4 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 5 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 6 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( 9) /CloseSingleQuote ( :) >> << /Language 7 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 8 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 9 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 10 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 11 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 12 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 13 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 14 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 15 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 16 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 17 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 18 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 19 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 20 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 21 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 22 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 23 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 24 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 25 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( 9) /CloseSingleQuote ( :) >> << /Language 26 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 27 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 28 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 29 /OpenDoubleQuote (0) /CloseDoubleQuote (0) >> << /Language 30 /OpenDoubleQuote (0 ) /CloseDoubleQuote (0 ) >> << /Language 31 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 32 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 33 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 34 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 35 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 36 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 37 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 38 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 39 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote (<) /CloseSingleQuote (>) >> << /Language 40 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 41 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote (<) /CloseSingleQuote (>) >> << /Language 42 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 43 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> << /Language 44 /OpenDoubleQuote () /CloseDoubleQuote () /OpenSingleQuote ( 9) /CloseSingleQuote ( :) >> << /Language 45 /OpenDoubleQuote ( ) /CloseDoubleQuote ( ) /OpenSingleQuote ( ) /CloseSingleQuote ( ) >> ] >> /TextObjects [ << /Model << /Text (Underscore.js ) /ParagraphRun << /RunArray [ << /RunData << /ParagraphSheet << /Name () /Features << /Justification 0 /FirstLineIndent 0.0 /StartIndent 0.0 /EndIndent 0.0 /SpaceBefore 0.0 /SpaceAfter 0.0 /DropCaps 1 /AutoLeading 1.2 /LeadingType 0 /AutoHyphenate true /HyphenatedWordSize 8 /PreHyphen 3 /PostHyphen 3 /ConsecutiveHyphens 2 /Zone 36.0 /HyphenateCapitalized true /HyphenationPreference .5 /WordSpacing [ .8 1.0 1.33 ] /LetterSpacing [ 0.0 0.0 0.0 ] /GlyphSpacing [ 1.0 1.0 1.0 ] /SingleWordJustification 6 /Hanging false /AutoTCY 1 /KeepTogether true /BurasagariType 0 /KinsokuOrder 0 /Kinsoku /nil /KurikaeshiMojiShori false /MojiKumiTable /nil /EveryLineComposer false /TabStops << >> /DefaultTabWidth 36.0 /DefaultStyle << /Font 1 /FontSize 12.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 0.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 1 /FontCaps 0 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 2 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst true /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.0 /MiterLimit 4.0 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> /ParagraphDirection 0 /JustificationMethod 0 /ComposerEngine 0 >> /Parent 0 >> >> /Length 14 >> ] >> /StyleRun << /RunArray [ << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 2 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -40 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 2 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -10 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -30 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -10 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking -15 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 1 >> << /RunData << /StyleSheet << /Name () /Parent 0 /Features << /Font 0 /FontSize 55.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 72.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 0 /FontCaps 2 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 1 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 .07452 .14902 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 1.0 1.0 1.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst false /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.05645 /MiterLimit 4.22582 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> >> >> /Length 3 >> ] >> /KernRun << /RunArray [ << /RunData << >> /Length 14 >> ] >> /AlternateGlyphRun << /RunArray [ << /RunData << >> /Length 14 >> ] >> >> /View << /Frames [ << /Resource 0 >> ] /RenderedData << /RunArray [ << /RunData << /LineCount 1 >> /Length 14 >> ] >> /Strikes [ << /StreamTag /PathSelectGroupCharacter /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 0.0 0.0 0.0 ] /ChildProcession 0 /Children [ << /StreamTag /FrameStrike /Frame 0 /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 0.0 0.0 0.0 ] /ChildProcession 2 /Children [ << /StreamTag /RowColStrike /RowColIndex 0 /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 0.0 0.0 0.0 ] /ChildProcession 1 /Children [ << /StreamTag /RowColStrike /RowColIndex 0 /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 0.0 0.0 0.0 ] /ChildProcession 2 /Children [ << /StreamTag /LineStrike /Baseline 0.0 /Leading 66.0 /EMHeight 55.0 /DHeight 41.7997 /SelectionAscent -47.13135 /SelectionDescent 14.79736 /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 -47.13135 0.0 14.79736 ] /ChildProcession 1 /Children [ << /StreamTag /Segment /Mapping << /CharacterCount 14 /GlyphCount 0 /WRValid false >> /FirstCharacterIndexInSegment 0 /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 0.0 0.0 0.0 ] /ChildProcession 1 /Children [ << /StreamTag /GlyphStrike /Transform << /Origin [ 0.0 0.0 ] >> /Bounds [ 0.0 -47.13135 401.13907 14.79736 ] /Glyphs [ 56 49 39 40 53 54 38 50 53 40 17 45 54 3 ] /GlyphAdjustments << /Data [ << >> << /BackFixed -2.2 >> << >> << /BackFixed -.55 >> << >> << /BackFixed -1.65 >> << /BackFixed -.55 >> << >> << /BackFixed -.825 >> << >> ] /RunLengths [ 2 1 2 1 1 1 1 1 1 3 ] >> /VisualBounds [ 0.0 -47.13135 401.13907 14.79736 ] /RenderedBounds [ 0.0 -47.13135 401.13907 14.79736 ] /Invalidation [ 0.0 -47.13135 427.53882 14.79736 ] /ShadowStylesRun << /Data [ << /Index 0 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 2 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 3 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 5 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 6 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 7 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 8 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 9 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 10 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> << /Index 11 /Font 0 /Scale [ 1.0 1.0 ] /Orientation 0 /BaselineDirection 2 /BaselineShift 0.0 /KernType 0 /EmbeddingLevel 0 /ComplementaryFontIndex 0 >> ] /RunLengths [ 2 1 2 1 1 1 1 1 1 3 ] >> /EndsInCR true /SelectionAscent -47.13135 /SelectionDescent 14.79736 /MainDir 0 >> ] >> ] >> ] >> ] >> ] >> ] >> ] >> /OpticalAlignment false >> ] /OriginalNormalStyleFeatures << /Font 1 /FontSize 12.0 /FauxBold false /FauxItalic false /AutoLeading true /Leading 0.0 /HorizontalScale 1.0 /VerticalScale 1.0 /Tracking 0 /BaselineShift 0.0 /CharacterRotation 0.0 /AutoKern 1 /FontCaps 0 /FontBaseline 0 /FontOTPosition 0 /StrikethroughPosition 0 /UnderlinePosition 0 /UnderlineOffset 0.0 /Ligatures true /DiscretionaryLigatures false /ContextualLigatures false /AlternateLigatures false /OldStyle false /Fractions false /Ordinals false /Swash false /Titling false /ConnectionForms false /StylisticAlternates false /Ornaments false /FigureStyle 0 /ProportionalMetrics false /Kana false /Italics false /Ruby false /BaselineDirection 2 /Tsume 0.0 /StyleRunAlignment 2 /Language 0 /JapaneseAlternateFeature 0 /EnableWariChu false /WariChuLineCount 2 /WariChuLineGap 0 /WariChuSubLineAmount << /WariChuSubLineScale .5 >> /WariChuWidowAmount 2 /WariChuOrphanAmount 2 /WariChuJustification 7 /TCYUpDownAdjustment 0 /TCYLeftRightAdjustment 0 /LeftAki -1.0 /RightAki -1.0 /JiDori 0 /NoBreak false /FillColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> >> /StrokeColor << /StreamTag /SimplePaint /Color << /Type 1 /Values [ 1.0 0.0 0.0 0.0 ] >> >> /Blend << /StreamTag /SimpleBlender >> /FillFlag true /StrokeFlag false /FillFirst true /FillOverPrint false /StrokeOverPrint false /LineCap 0 /LineJoin 0 /LineWidth 1.0 /MiterLimit 4.0 /LineDashOffset 0.0 /LineDashArray [ ] /Type1EncodingNames [ ] /Kashidas 0 /DirOverride 0 /DigitSet 0 /DiacVPos 4 /DiacXOffset 0.0 /DiacYOffset 0.0 /OverlapSwash false /JustificationAlternates false /StretchedAlternates false /FillVisibleFlag true /StrokeVisibleFlag true >> /OriginalNormalParagraphFeatures << /Justification 0 /FirstLineIndent 0.0 /StartIndent 0.0 /EndIndent 0.0 /SpaceBefore 0.0 /SpaceAfter 0.0 /DropCaps 1 /AutoLeading 1.2 /LeadingType 0 /AutoHyphenate true /HyphenatedWordSize 6 /PreHyphen 2 /PostHyphen 2 /ConsecutiveHyphens 0 /Zone 36.0 /HyphenateCapitalized true /HyphenationPreference .5 /WordSpacing [ .8 1.0 1.33 ] /LetterSpacing [ 0.0 0.0 0.0 ] /GlyphSpacing [ 1.0 1.0 1.0 ] /SingleWordJustification 6 /Hanging false /AutoTCY 0 /KeepTogether true /BurasagariType 0 /KinsokuOrder 0 /Kinsoku /nil /KurikaeshiMojiShori false /MojiKumiTable /nil /EveryLineComposer false /TabStops << >> /DefaultTabWidth 36.0 /DefaultStyle << >> /ParagraphDirection 0 /JustificationMethod 0 /ComposerEngine 0 >> >>8BIMFMsk 2"Zu t *)rnwXp"Zu t *)rnwXp"Zu t *)rnwXp               node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/underscore-min.js000066400000000000000000000310251240302775300317750ustar00rootroot00000000000000// Underscore.js 1.3.3 // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. // Underscore is freely distributable under the MIT license. // Portions of Underscore are inspired or borrowed from Prototype, // Oliver Steele's Functional, and John Resig's Micro-Templating. // For all details and documentation: // http://documentcloud.github.com/underscore (function(){function r(a,c,d){if(a===c)return 0!==a||1/a==1/c;if(null==a||null==c)return a===c;a._chain&&(a=a._wrapped);c._chain&&(c=c._wrapped);if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return!1;switch(e){case "[object String]":return a==""+c;case "[object Number]":return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof a||"object"!=typeof c)return!1;for(var f=d.length;f--;)if(d[f]==a)return!0;d.push(a);var f=0,g=!0;if("[object Array]"==e){if(f=a.length,g=f==c.length)for(;f--&&(g=f in a==f in c&&r(a[f],c[f],d)););}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return!1;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&r(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,h)&&!f--)break; g=!f}}d.pop();return g}var s=this,I=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,J=k.unshift,l=p.toString,K=p.hasOwnProperty,y=k.forEach,z=k.map,A=k.reduce,B=k.reduceRight,C=k.filter,D=k.every,E=k.some,q=k.indexOf,F=k.lastIndexOf,p=Array.isArray,L=Object.keys,t=Function.prototype.bind,b=function(a){return new m(a)};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=b),exports._=b):s._=b;b.VERSION="1.3.3";var j=b.each=b.forEach=function(a, c,d){if(a!=null)if(y&&a.forEach===y)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==null&&(a=[]);if(A&& a.reduce===A){e&&(c=b.bind(c,e));return f?a.reduce(c,d):a.reduce(c)}j(a,function(a,b,i){if(f)d=c.call(e,d,a,b,i);else{d=a;f=true}});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(B&&a.reduceRight===B){e&&(c=b.bind(c,e));return f?a.reduceRight(c,d):a.reduceRight(c)}var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=function(a, c,b){var e;G(a,function(a,g,h){if(c.call(b,a,g,h)){e=a;return true}});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(C&&a.filter===C)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(D&&a.every===D)return a.every(c,b);j(a,function(a,g,h){if(!(e=e&&c.call(b, a,g,h)))return o});return!!e};var G=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(E&&a.some===E)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;if(q&&a.indexOf===q)return a.indexOf(c)!=-1;return b=G(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]}; j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1),true);return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a= i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=L||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&& c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.pick=function(a){var c={};j(b.flatten(i.call(arguments,1)),function(b){b in a&&(c[b]=a[b])});return c};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty= function(a){if(a==null)return true;if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=function(a){return l.call(a)=="[object Arguments]"};b.isArguments(arguments)||(b.isArguments=function(a){return!(!a||!b.has(a,"callee"))});b.isFunction=function(a){return l.call(a)=="[object Function]"}; b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isFinite=function(a){return b.isNumber(a)&&isFinite(a)};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a, b){return K.call(a,b)};b.noConflict=function(){s._=I;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.result=function(a,c){if(a==null)return null;var d=a[c];return b.isFunction(d)?d.call(a):d};b.mixin=function(a){j(b.functions(a),function(c){M(c,b[c]=a[c])})};var N=0;b.uniqueId= function(a){var b=N++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var u=/.^/,n={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},v;for(v in n)n[n[v]]=v;var O=/\\|'|\r|\n|\t|\u2028|\u2029/g,P=/\\(\\|'|r|n|t|u2028|u2029)/g,w=function(a){return a.replace(P,function(a,b){return n[b]})};b.template=function(a,c,d){d=b.defaults(d||{},b.templateSettings);a="__p+='"+a.replace(O,function(a){return"\\"+n[a]}).replace(d.escape|| u,function(a,b){return"'+\n_.escape("+w(b)+")+\n'"}).replace(d.interpolate||u,function(a,b){return"'+\n("+w(b)+")+\n'"}).replace(d.evaluate||u,function(a,b){return"';\n"+w(b)+"\n;__p+='"})+"';\n";d.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",e=new Function(d.variable||"obj","_",a);if(c)return e(c,b);c=function(a){return e.call(this,a,b)};c.source="function("+(d.variable||"obj")+"){\n"+a+"}";return c}; b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var x=function(a,c){return c?b(a).chain():a},M=function(a,c){m.prototype[a]=function(){var a=i.call(arguments);J.call(a,this._wrapped);return x(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return x(d, this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return x(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); node-merge-1.2.0/tests/qunit/node_modules/qunit/node_modules/underscore/underscore.js000066400000000000000000001110161240302775300312130ustar00rootroot00000000000000// Underscore.js 1.3.3 // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. // Underscore is freely distributable under the MIT license. // Portions of Underscore are inspired or borrowed from Prototype, // Oliver Steele's Functional, and John Resig's Micro-Templating. // For all details and documentation: // http://documentcloud.github.com/underscore (function() { // Baseline setup // -------------- // Establish the root object, `window` in the browser, or `global` on the server. var root = this; // Save the previous value of the `_` variable. var previousUnderscore = root._; // Establish the object that gets returned to break out of a loop iteration. var breaker = {}; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; // Create quick reference variables for speed access to core prototypes. var slice = ArrayProto.slice, unshift = ArrayProto.unshift, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. var nativeForEach = ArrayProto.forEach, nativeMap = ArrayProto.map, nativeReduce = ArrayProto.reduce, nativeReduceRight = ArrayProto.reduceRight, nativeFilter = ArrayProto.filter, nativeEvery = ArrayProto.every, nativeSome = ArrayProto.some, nativeIndexOf = ArrayProto.indexOf, nativeLastIndexOf = ArrayProto.lastIndexOf, nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeBind = FuncProto.bind; // Create a safe reference to the Underscore object for use below. var _ = function(obj) { return new wrapper(obj); }; // Export the Underscore object for **Node.js**, with // backwards-compatibility for the old `require()` API. If we're in // the browser, add `_` as a global object via a string identifier, // for Closure Compiler "advanced" mode. if (typeof exports !== 'undefined') { if (typeof module !== 'undefined' && module.exports) { exports = module.exports = _; } exports._ = _; } else { root['_'] = _; } // Current version. _.VERSION = '1.3.3'; // Collection Functions // -------------------- // The cornerstone, an `each` implementation, aka `forEach`. // Handles objects with the built-in `forEach`, arrays, and raw objects. // Delegates to **ECMAScript 5**'s native `forEach` if available. var each = _.each = _.forEach = function(obj, iterator, context) { if (obj == null) return; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { for (var i = 0, l = obj.length; i < l; i++) { if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return; } } else { for (var key in obj) { if (_.has(obj, key)) { if (iterator.call(context, obj[key], key, obj) === breaker) return; } } } }; // Return the results of applying the iterator to each element. // Delegates to **ECMAScript 5**'s native `map` if available. _.map = _.collect = function(obj, iterator, context) { var results = []; if (obj == null) return results; if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); each(obj, function(value, index, list) { results[results.length] = iterator.call(context, value, index, list); }); if (obj.length === +obj.length) results.length = obj.length; return results; }; // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { var initial = arguments.length > 2; if (obj == null) obj = []; if (nativeReduce && obj.reduce === nativeReduce) { if (context) iterator = _.bind(iterator, context); return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); } each(obj, function(value, index, list) { if (!initial) { memo = value; initial = true; } else { memo = iterator.call(context, memo, value, index, list); } }); if (!initial) throw new TypeError('Reduce of empty array with no initial value'); return memo; }; // The right-associative version of reduce, also known as `foldr`. // Delegates to **ECMAScript 5**'s native `reduceRight` if available. _.reduceRight = _.foldr = function(obj, iterator, memo, context) { var initial = arguments.length > 2; if (obj == null) obj = []; if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { if (context) iterator = _.bind(iterator, context); return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); } var reversed = _.toArray(obj).reverse(); if (context && !initial) iterator = _.bind(iterator, context); return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator); }; // Return the first value which passes a truth test. Aliased as `detect`. _.find = _.detect = function(obj, iterator, context) { var result; any(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) { result = value; return true; } }); return result; }; // Return all the elements that pass a truth test. // Delegates to **ECMAScript 5**'s native `filter` if available. // Aliased as `select`. _.filter = _.select = function(obj, iterator, context) { var results = []; if (obj == null) return results; if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); each(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) results[results.length] = value; }); return results; }; // Return all the elements for which a truth test fails. _.reject = function(obj, iterator, context) { var results = []; if (obj == null) return results; each(obj, function(value, index, list) { if (!iterator.call(context, value, index, list)) results[results.length] = value; }); return results; }; // Determine whether all of the elements match a truth test. // Delegates to **ECMAScript 5**'s native `every` if available. // Aliased as `all`. _.every = _.all = function(obj, iterator, context) { var result = true; if (obj == null) return result; if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); each(obj, function(value, index, list) { if (!(result = result && iterator.call(context, value, index, list))) return breaker; }); return !!result; }; // Determine if at least one element in the object matches a truth test. // Delegates to **ECMAScript 5**'s native `some` if available. // Aliased as `any`. var any = _.some = _.any = function(obj, iterator, context) { iterator || (iterator = _.identity); var result = false; if (obj == null) return result; if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); each(obj, function(value, index, list) { if (result || (result = iterator.call(context, value, index, list))) return breaker; }); return !!result; }; // Determine if a given value is included in the array or object using `===`. // Aliased as `contains`. _.include = _.contains = function(obj, target) { var found = false; if (obj == null) return found; if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; found = any(obj, function(value) { return value === target; }); return found; }; // Invoke a method (with arguments) on every item in a collection. _.invoke = function(obj, method) { var args = slice.call(arguments, 2); return _.map(obj, function(value) { return (_.isFunction(method) ? method || value : value[method]).apply(value, args); }); }; // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { return _.map(obj, function(value){ return value[key]; }); }; // Return the maximum element or (element-based computation). _.max = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.max.apply(Math, obj); if (!iterator && _.isEmpty(obj)) return -Infinity; var result = {computed : -Infinity}; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed >= result.computed && (result = {value : value, computed : computed}); }); return result.value; }; // Return the minimum element (or element-based computation). _.min = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.min.apply(Math, obj); if (!iterator && _.isEmpty(obj)) return Infinity; var result = {computed : Infinity}; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed < result.computed && (result = {value : value, computed : computed}); }); return result.value; }; // Shuffle an array. _.shuffle = function(obj) { var shuffled = [], rand; each(obj, function(value, index, list) { rand = Math.floor(Math.random() * (index + 1)); shuffled[index] = shuffled[rand]; shuffled[rand] = value; }); return shuffled; }; // Sort the object's values by a criterion produced by an iterator. _.sortBy = function(obj, val, context) { var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; }; return _.pluck(_.map(obj, function(value, index, list) { return { value : value, criteria : iterator.call(context, value, index, list) }; }).sort(function(left, right) { var a = left.criteria, b = right.criteria; if (a === void 0) return 1; if (b === void 0) return -1; return a < b ? -1 : a > b ? 1 : 0; }), 'value'); }; // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. _.groupBy = function(obj, val) { var result = {}; var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; }; each(obj, function(value, index) { var key = iterator(value, index); (result[key] || (result[key] = [])).push(value); }); return result; }; // Use a comparator function to figure out at what index an object should // be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iterator) { iterator || (iterator = _.identity); var low = 0, high = array.length; while (low < high) { var mid = (low + high) >> 1; iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid; } return low; }; // Safely convert anything iterable into a real, live array. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); if (_.isArguments(obj)) return slice.call(obj); if (obj.toArray && _.isFunction(obj.toArray)) return obj.toArray(); return _.values(obj); }; // Return the number of elements in an object. _.size = function(obj) { return _.isArray(obj) ? obj.length : _.keys(obj).length; }; // Array Functions // --------------- // Get the first element of an array. Passing **n** will return the first N // values in the array. Aliased as `head` and `take`. The **guard** check // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; }; // Returns everything but the last entry of the array. Especcialy useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. The **guard** check allows it to work with // `_.map`. _.initial = function(array, n, guard) { return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); }; // Get the last element of an array. Passing **n** will return the last N // values in the array. The **guard** check allows it to work with `_.map`. _.last = function(array, n, guard) { if ((n != null) && !guard) { return slice.call(array, Math.max(array.length - n, 0)); } else { return array[array.length - 1]; } }; // Returns everything but the first entry of the array. Aliased as `tail`. // Especially useful on the arguments object. Passing an **index** will return // the rest of the values in the array from that index onward. The **guard** // check allows it to work with `_.map`. _.rest = _.tail = function(array, index, guard) { return slice.call(array, (index == null) || guard ? 1 : index); }; // Trim out all falsy values from an array. _.compact = function(array) { return _.filter(array, function(value){ return !!value; }); }; // Return a completely flattened version of an array. _.flatten = function(array, shallow) { return _.reduce(array, function(memo, value) { if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value)); memo[memo.length] = value; return memo; }, []); }; // Return a version of the array that does not contain the specified value(s). _.without = function(array) { return _.difference(array, slice.call(arguments, 1)); }; // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. _.uniq = _.unique = function(array, isSorted, iterator) { var initial = iterator ? _.map(array, iterator) : array; var results = []; // The `isSorted` flag is irrelevant if the array only contains two elements. if (array.length < 3) isSorted = true; _.reduce(initial, function (memo, value, index) { if (isSorted ? _.last(memo) !== value || !memo.length : !_.include(memo, value)) { memo.push(value); results.push(array[index]); } return memo; }, []); return results; }; // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = function() { return _.uniq(_.flatten(arguments, true)); }; // Produce an array that contains every item shared between all the // passed-in arrays. (Aliased as "intersect" for back-compat.) _.intersection = _.intersect = function(array) { var rest = slice.call(arguments, 1); return _.filter(_.uniq(array), function(item) { return _.every(rest, function(other) { return _.indexOf(other, item) >= 0; }); }); }; // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. _.difference = function(array) { var rest = _.flatten(slice.call(arguments, 1), true); return _.filter(array, function(value){ return !_.include(rest, value); }); }; // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { var args = slice.call(arguments); var length = _.max(_.pluck(args, 'length')); var results = new Array(length); for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i); return results; }; // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), // we need this function. Return the position of the first occurrence of an // item in an array, or -1 if the item is not included in the array. // Delegates to **ECMAScript 5**'s native `indexOf` if available. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. _.indexOf = function(array, item, isSorted) { if (array == null) return -1; var i, l; if (isSorted) { i = _.sortedIndex(array, item); return array[i] === item ? i : -1; } if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item); for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i; return -1; }; // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. _.lastIndexOf = function(array, item) { if (array == null) return -1; if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item); var i = array.length; while (i--) if (i in array && array[i] === item) return i; return -1; }; // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](http://docs.python.org/library/functions.html#range). _.range = function(start, stop, step) { if (arguments.length <= 1) { stop = start || 0; start = 0; } step = arguments[2] || 1; var len = Math.max(Math.ceil((stop - start) / step), 0); var idx = 0; var range = new Array(len); while(idx < len) { range[idx++] = start; start += step; } return range; }; // Function (ahem) Functions // ------------------ // Reusable constructor function for prototype setting. var ctor = function(){}; // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Binding with arguments is also known as `curry`. // Delegates to **ECMAScript 5**'s native `Function.bind` if available. // We check for `func.bind` first, to fail fast when `func` is undefined. _.bind = function bind(func, context) { var bound, args; if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); if (!_.isFunction(func)) throw new TypeError; args = slice.call(arguments, 2); return bound = function() { if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); ctor.prototype = func.prototype; var self = new ctor; var result = func.apply(self, args.concat(slice.call(arguments))); if (Object(result) === result) return result; return self; }; }; // Bind all of an object's methods to that object. Useful for ensuring that // all callbacks defined on an object belong to it. _.bindAll = function(obj) { var funcs = slice.call(arguments, 1); if (funcs.length == 0) funcs = _.functions(obj); each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); return obj; }; // Memoize an expensive function by storing its results. _.memoize = function(func, hasher) { var memo = {}; hasher || (hasher = _.identity); return function() { var key = hasher.apply(this, arguments); return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); }; }; // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. _.delay = function(func, wait) { var args = slice.call(arguments, 2); return setTimeout(function(){ return func.apply(null, args); }, wait); }; // Defers a function, scheduling it to run after the current call stack has // cleared. _.defer = function(func) { return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); }; // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. _.throttle = function(func, wait) { var context, args, timeout, throttling, more, result; var whenDone = _.debounce(function(){ more = throttling = false; }, wait); return function() { context = this; args = arguments; var later = function() { timeout = null; if (more) func.apply(context, args); whenDone(); }; if (!timeout) timeout = setTimeout(later, wait); if (throttling) { more = true; } else { result = func.apply(context, args); } whenDone(); throttling = true; return result; }; }; // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) func.apply(context, args); }; if (immediate && !timeout) func.apply(context, args); clearTimeout(timeout); timeout = setTimeout(later, wait); }; }; // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. _.once = function(func) { var ran = false, memo; return function() { if (ran) return memo; ran = true; return memo = func.apply(this, arguments); }; }; // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { return function() { var args = [func].concat(slice.call(arguments, 0)); return wrapper.apply(this, args); }; }; // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. _.compose = function() { var funcs = arguments; return function() { var args = arguments; for (var i = funcs.length - 1; i >= 0; i--) { args = [funcs[i].apply(this, args)]; } return args[0]; }; }; // Returns a function that will only be executed after being called N times. _.after = function(times, func) { if (times <= 0) return func(); return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; // Object Functions // ---------------- // Retrieve the names of an object's properties. // Delegates to **ECMAScript 5**'s native `Object.keys` _.keys = nativeKeys || function(obj) { if (obj !== Object(obj)) throw new TypeError('Invalid object'); var keys = []; for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; return keys; }; // Retrieve the values of an object's properties. _.values = function(obj) { return _.map(obj, _.identity); }; // Return a sorted list of the function names available on the object. // Aliased as `methods` _.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); }; // Extend a given object with all the properties in passed-in object(s). _.extend = function(obj) { each(slice.call(arguments, 1), function(source) { for (var prop in source) { obj[prop] = source[prop]; } }); return obj; }; // Return a copy of the object only containing the whitelisted properties. _.pick = function(obj) { var result = {}; each(_.flatten(slice.call(arguments, 1)), function(key) { if (key in obj) result[key] = obj[key]; }); return result; }; // Fill in a given object with default properties. _.defaults = function(obj) { each(slice.call(arguments, 1), function(source) { for (var prop in source) { if (obj[prop] == null) obj[prop] = source[prop]; } }); return obj; }; // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { if (!_.isObject(obj)) return obj; return _.isArray(obj) ? obj.slice() : _.extend({}, obj); }; // Invokes interceptor with the obj, and then returns obj. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. _.tap = function(obj, interceptor) { interceptor(obj); return obj; }; // Internal recursive comparison function. function eq(a, b, stack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. if (a === b) return a !== 0 || 1 / a == 1 / b; // A strict comparison is necessary because `null == undefined`. if (a == null || b == null) return a === b; // Unwrap any wrapped objects. if (a._chain) a = a._wrapped; if (b._chain) b = b._wrapped; // Invoke a custom `isEqual` method if one is provided. if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b); if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a); // Compare `[[Class]]` names. var className = toString.call(a); if (className != toString.call(b)) return false; switch (className) { // Strings, numbers, dates, and booleans are compared by value. case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return a == String(b); case '[object Number]': // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for // other numeric values. return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a == +b; // RegExps are compared by their source patterns and flags. case '[object RegExp]': return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; } if (typeof a != 'object' || typeof b != 'object') return false; // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. var length = stack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (stack[length] == a) return true; } // Add the first object to the stack of traversed objects. stack.push(a); var size = 0, result = true; // Recursively compare objects and arrays. if (className == '[object Array]') { // Compare array lengths to determine if a deep comparison is necessary. size = a.length; result = size == b.length; if (result) { // Deep compare the contents, ignoring non-numeric properties. while (size--) { // Ensure commutative equality for sparse arrays. if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break; } } } else { // Objects with different constructors are not equivalent. if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false; // Deep compare objects. for (var key in a) { if (_.has(a, key)) { // Count the expected number of properties. size++; // Deep compare each member. if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break; } } // Ensure that both objects contain the same number of properties. if (result) { for (key in b) { if (_.has(b, key) && !(size--)) break; } result = !size; } } // Remove the first object from the stack of traversed objects. stack.pop(); return result; } // Perform a deep comparison to check if two objects are equal. _.isEqual = function(a, b) { return eq(a, b, []); }; // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. _.isEmpty = function(obj) { if (obj == null) return true; if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; for (var key in obj) if (_.has(obj, key)) return false; return true; }; // Is a given value a DOM element? _.isElement = function(obj) { return !!(obj && obj.nodeType == 1); }; // Is a given value an array? // Delegates to ECMA5's native Array.isArray _.isArray = nativeIsArray || function(obj) { return toString.call(obj) == '[object Array]'; }; // Is a given variable an object? _.isObject = function(obj) { return obj === Object(obj); }; // Is a given variable an arguments object? _.isArguments = function(obj) { return toString.call(obj) == '[object Arguments]'; }; if (!_.isArguments(arguments)) { _.isArguments = function(obj) { return !!(obj && _.has(obj, 'callee')); }; } // Is a given value a function? _.isFunction = function(obj) { return toString.call(obj) == '[object Function]'; }; // Is a given value a string? _.isString = function(obj) { return toString.call(obj) == '[object String]'; }; // Is a given value a number? _.isNumber = function(obj) { return toString.call(obj) == '[object Number]'; }; // Is a given object a finite number? _.isFinite = function(obj) { return _.isNumber(obj) && isFinite(obj); }; // Is the given value `NaN`? _.isNaN = function(obj) { // `NaN` is the only value for which `===` is not reflexive. return obj !== obj; }; // Is a given value a boolean? _.isBoolean = function(obj) { return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; }; // Is a given value a date? _.isDate = function(obj) { return toString.call(obj) == '[object Date]'; }; // Is the given value a regular expression? _.isRegExp = function(obj) { return toString.call(obj) == '[object RegExp]'; }; // Is a given value equal to null? _.isNull = function(obj) { return obj === null; }; // Is a given variable undefined? _.isUndefined = function(obj) { return obj === void 0; }; // Has own property? _.has = function(obj, key) { return hasOwnProperty.call(obj, key); }; // Utility Functions // ----------------- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its // previous owner. Returns a reference to the Underscore object. _.noConflict = function() { root._ = previousUnderscore; return this; }; // Keep the identity function around for default iterators. _.identity = function(value) { return value; }; // Run a function **n** times. _.times = function (n, iterator, context) { for (var i = 0; i < n; i++) iterator.call(context, i); }; // Escape a string for HTML interpolation. _.escape = function(string) { return (''+string).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/'); }; // If the value of the named property is a function then invoke it; // otherwise, return it. _.result = function(object, property) { if (object == null) return null; var value = object[property]; return _.isFunction(value) ? value.call(object) : value; }; // Add your own custom functions to the Underscore object, ensuring that // they're correctly added to the OOP wrapper as well. _.mixin = function(obj) { each(_.functions(obj), function(name){ addToWrapper(name, _[name] = obj[name]); }); }; // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; _.uniqueId = function(prefix) { var id = idCounter++; return prefix ? prefix + id : id; }; // By default, Underscore uses ERB-style template delimiters, change the // following template settings to use alternative delimiters. _.templateSettings = { evaluate : /<%([\s\S]+?)%>/g, interpolate : /<%=([\s\S]+?)%>/g, escape : /<%-([\s\S]+?)%>/g }; // When customizing `templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /.^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { '\\': '\\', "'": "'", 'r': '\r', 'n': '\n', 't': '\t', 'u2028': '\u2028', 'u2029': '\u2029' }; for (var p in escapes) escapes[escapes[p]] = p; var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; var unescaper = /\\(\\|'|r|n|t|u2028|u2029)/g; // Within an interpolation, evaluation, or escaping, remove HTML escaping // that had been previously added. var unescape = function(code) { return code.replace(unescaper, function(match, escape) { return escapes[escape]; }); }; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. _.template = function(text, data, settings) { settings = _.defaults(settings || {}, _.templateSettings); // Compile the template source, taking care to escape characters that // cannot be included in a string literal and then unescape them in code // blocks. var source = "__p+='" + text .replace(escaper, function(match) { return '\\' + escapes[match]; }) .replace(settings.escape || noMatch, function(match, code) { return "'+\n_.escape(" + unescape(code) + ")+\n'"; }) .replace(settings.interpolate || noMatch, function(match, code) { return "'+\n(" + unescape(code) + ")+\n'"; }) .replace(settings.evaluate || noMatch, function(match, code) { return "';\n" + unescape(code) + "\n;__p+='"; }) + "';\n"; // If a variable is not specified, place data values in local scope. if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; source = "var __p='';" + "var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" + source + "return __p;\n"; var render = new Function(settings.variable || 'obj', '_', source); if (data) return render(data, _); var template = function(data) { return render.call(this, data, _); }; // Provide the compiled function source as a convenience for build time // precompilation. template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; return template; }; // Add a "chain" function, which will delegate to the wrapper. _.chain = function(obj) { return _(obj).chain(); }; // The OOP Wrapper // --------------- // If Underscore is called as a function, it returns a wrapped object that // can be used OO-style. This wrapper holds altered versions of all the // underscore functions. Wrapped objects may be chained. var wrapper = function(obj) { this._wrapped = obj; }; // Expose `wrapper.prototype` as `_.prototype` _.prototype = wrapper.prototype; // Helper function to continue chaining intermediate results. var result = function(obj, chain) { return chain ? _(obj).chain() : obj; }; // A method to easily add functions to the OOP wrapper. var addToWrapper = function(name, func) { wrapper.prototype[name] = function() { var args = slice.call(arguments); unshift.call(args, this._wrapped); return result(func.apply(_, args), this._chain); }; }; // Add all of the Underscore functions to the wrapper object. _.mixin(_); // Add all mutator Array functions to the wrapper. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; wrapper.prototype[name] = function() { var wrapped = this._wrapped; method.apply(wrapped, arguments); var length = wrapped.length; if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0]; return result(wrapped, this._chain); }; }); // Add all accessor Array functions to the wrapper. each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; wrapper.prototype[name] = function() { return result(method.apply(this._wrapped, arguments), this._chain); }; }); // Start chaining a wrapped Underscore object. wrapper.prototype.chain = function() { this._chain = true; return this; }; // Extracts the result from a wrapped and chained object. wrapper.prototype.value = function() { return this._wrapped; }; }).call(this); node-merge-1.2.0/tests/qunit/node_modules/qunit/package.json000066400000000000000000000167331240302775300241560ustar00rootroot00000000000000{ "name": "qunit", "description": "QUnit testing framework for nodejs", "version": "0.5.16", "author": { "name": "Oleg Slobodskoi", "email": "oleg008@gmail.com" }, "contributors": [ { "name": "Jonathan Buchanan" }, { "name": "Ashar Voultoiz" } ], "repository": { "type": "git", "url": "http: //github.com/kof/node-qunit.git" }, "keywords": [ "TDD", "QUnit", "unit", "testing", "tests", "async" ], "bin": { "qunit": "./bin/cli.js" }, "engines": { "node": ">=0.6.0 < 0.11.0" }, "scripts": { "test": "make test" }, "dependencies": { "underscore": "1.3.3", "argsparser": "0.0.6", "cli-table": "0.0.2", "tracejs": "0.1.4", "bunker": "0.1.2" }, "devDependencies": { "chainer": "0.0.5", "timekeeper": "0.0.2" }, "optionalDependencies": { "bunker": "0.1.2" }, "licenses": [ { "type": "MIT", "url": "http: //www.opensource.org/licenses/mit-license.php" } ], "readme": "## QUnit testing framework for nodejs.\n\nhttp://qunitjs.com\n\nhttp://github.com/jquery/qunit\n\n### Features\n\n- cli\n- testrunner api\n- test coverage via jscoverage is removed, node-bunker have to be implemented #26\n- tests inside of one testfile run synchronous, but every testfile runs parallel\n- tests from each file run in its own spawned node process\n- same API for client and server side code (original QUnit is used)\n- the simplest API of the world, especially for asynchronous testing\n- you can write tests in TDD or BDD style depending on your task and test type\n- you can run the same tests in browser if there is no dependencies to node\n\n### Installation\n\n npm i qunit\n\n### API\n\n http://api.qunitjs.com\n\n#### The only exception\n\n // Separate tests into modules.\n // Use `QUnit` namespace, because `module` is reserved\n QUnit.module(name, lifecycle)\n\n### Usage\n\n#### Command line\n\nRead full cli api doc using \"--help\" or \"-h\":\n\n $ qunit -h\n\n $ qunit -c ./code.js -t ./tests.js\n\nBy default, code and dependencies are added to the global scope. To specify\nrequiring them into a namespace object, prefix the path or module name with the\nvariable name to be used for the namespace object, followed by a colon:\n\n $ qunit -c code:./code.js -d utils:utilmodule -t ./time.js\n\n#### via api\n\n var testrunner = require(\"qunit\");\n\n Defaults:\n\n {\n // logging options\n log: {\n\n // log assertions overview\n assertions: true,\n\n // log expected and actual values for failed tests\n errors: true,\n\n // log tests overview\n tests: true,\n\n // log summary\n summary: true,\n\n // log global summary (all files)\n globalSummary: true,\n\n // log currently testing code file\n testing: true\n },\n\n // run test coverage tool\n coverage: false,\n\n // define dependencies, which are required then before code\n deps: null,\n\n // define namespace your code will be attached to on global['your namespace']\n namespace: null\n }\n\n\n // change any option for all tests globally\n testrunner.options.optionName = value;\n\n // or use setup function\n testrunner.setup({\n log: {\n summary: true\n }\n });\n\n\n // one code and tests file\n testrunner.run({\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }, callback);\n\n // require code into a namespace object, rather than globally\n testrunner.run({\n code: {path: \"/path/to/your/code.js\", namespace: \"code\"},\n tests: \"/path/to/your/tests.js\"\n }, callback);\n\n // one code and multiple tests file\n testrunner.run({\n code: \"/path/to/your/code.js\",\n tests: [\"/path/to/your/tests.js\", \"/path/to/your/tests1.js\"]\n }, callback);\n\n // array of code and test files\n testrunner.run([\n {\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n },\n {\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }\n ], callback);\n\n // using testrunner callback\n testrunner.run({\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }, function(err, report) {\n console.dir(report);\n });\n\n // specify dependency\n testrunner.run({\n deps: \"/path/to/your/dependency.js\",\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }, callback);\n\n // dependencies can be modules or files\n testrunner.run({\n deps: \"modulename\",\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }, callback);\n\n // dependencies can required into a namespace object\n testrunner.run({\n deps: {path: \"utilmodule\", namespace: \"utils\"},\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }, callback);\n\n // specify multiple dependencies\n testrunner.run({\n deps: [\"/path/to/your/dependency1.js\", \"/path/to/your/dependency2.js\"],\n code: \"/path/to/your/code.js\",\n tests: \"/path/to/your/tests.js\"\n }, callback);\n\n### Writing tests\n\nQUnit API and code which have to be tested are already loaded and attached to the global context.\n\nSome tests examples\n\n\n test(\"a basic test example\", function (assert) {\n ok(true, \"this test is fine\");\n var value = \"hello\";\n equal(\"hello\", value, \"We expect value to be hello\");\n });\n\n QUnit.module(\"Module A\");\n\n test(\"first test within module\", 1, function (assert) {\n ok(true, \"a dummy\");\n });\n\n test(\"second test within module\", 2, function (assert) {\n ok(true, \"dummy 1 of 2\");\n ok(true, \"dummy 2 of 2\");\n });\n\n QUnit.module(\"Module B\", {\n setup: function () {\n // do some initial stuff before every test for this module\n },\n teardown: function () {\n // do some stuff after every test for this module\n }\n });\n\n test(\"some other test\", function (assert) {\n expect(2);\n equal(true, false, \"failing test\");\n equal(true, true, \"passing test\");\n });\n\n QUnit.module(\"Module C\", {\n setup: function() {\n // setup a shared environment for each test\n this.options = { test: 123 };\n }\n });\n\n test(\"this test is using shared environment\", 1, function (assert) {\n deepEqual({ test: 123 }, this.options, \"passing test\");\n });\n\n test(\"this is an async test example\", function (assert) {\n expect(2);\n stop();\n setTimeout(function () {\n ok(true, \"finished async test\");\n strictEqual(true, true, \"Strict equal assertion uses ===\");\n start();\n }, 100);\n });\n\n\n### Run tests\n\n git submodule init\n git submodule update\n npm i\n make test\n\n### Coverage\n\nJscoverage is removed due to a lot of installation problems and bad api,\nnode-bunker is planned to use but not implemented yet.\n", "readmeFilename": "readme.md", "_id": "qunit@0.5.16", "_from": "qunit@" } node-merge-1.2.0/tests/qunit/node_modules/qunit/readme.md000066400000000000000000000140371240302775300234420ustar00rootroot00000000000000## QUnit testing framework for nodejs. http://qunitjs.com http://github.com/jquery/qunit ### Features - cli - testrunner api - test coverage via jscoverage is removed, node-bunker have to be implemented #26 - tests inside of one testfile run synchronous, but every testfile runs parallel - tests from each file run in its own spawned node process - same API for client and server side code (original QUnit is used) - the simplest API of the world, especially for asynchronous testing - you can write tests in TDD or BDD style depending on your task and test type - you can run the same tests in browser if there is no dependencies to node ### Installation npm i qunit ### API http://api.qunitjs.com #### The only exception // Separate tests into modules. // Use `QUnit` namespace, because `module` is reserved QUnit.module(name, lifecycle) ### Usage #### Command line Read full cli api doc using "--help" or "-h": $ qunit -h $ qunit -c ./code.js -t ./tests.js By default, code and dependencies are added to the global scope. To specify requiring them into a namespace object, prefix the path or module name with the variable name to be used for the namespace object, followed by a colon: $ qunit -c code:./code.js -d utils:utilmodule -t ./time.js #### via api var testrunner = require("qunit"); Defaults: { // logging options log: { // log assertions overview assertions: true, // log expected and actual values for failed tests errors: true, // log tests overview tests: true, // log summary summary: true, // log global summary (all files) globalSummary: true, // log currently testing code file testing: true }, // run test coverage tool coverage: false, // define dependencies, which are required then before code deps: null, // define namespace your code will be attached to on global['your namespace'] namespace: null } // change any option for all tests globally testrunner.options.optionName = value; // or use setup function testrunner.setup({ log: { summary: true } }); // one code and tests file testrunner.run({ code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, callback); // require code into a namespace object, rather than globally testrunner.run({ code: {path: "/path/to/your/code.js", namespace: "code"}, tests: "/path/to/your/tests.js" }, callback); // one code and multiple tests file testrunner.run({ code: "/path/to/your/code.js", tests: ["/path/to/your/tests.js", "/path/to/your/tests1.js"] }, callback); // array of code and test files testrunner.run([ { code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, { code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" } ], callback); // using testrunner callback testrunner.run({ code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, function(err, report) { console.dir(report); }); // specify dependency testrunner.run({ deps: "/path/to/your/dependency.js", code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, callback); // dependencies can be modules or files testrunner.run({ deps: "modulename", code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, callback); // dependencies can required into a namespace object testrunner.run({ deps: {path: "utilmodule", namespace: "utils"}, code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, callback); // specify multiple dependencies testrunner.run({ deps: ["/path/to/your/dependency1.js", "/path/to/your/dependency2.js"], code: "/path/to/your/code.js", tests: "/path/to/your/tests.js" }, callback); ### Writing tests QUnit API and code which have to be tested are already loaded and attached to the global context. Some tests examples test("a basic test example", function (assert) { ok(true, "this test is fine"); var value = "hello"; equal("hello", value, "We expect value to be hello"); }); QUnit.module("Module A"); test("first test within module", 1, function (assert) { ok(true, "a dummy"); }); test("second test within module", 2, function (assert) { ok(true, "dummy 1 of 2"); ok(true, "dummy 2 of 2"); }); QUnit.module("Module B", { setup: function () { // do some initial stuff before every test for this module }, teardown: function () { // do some stuff after every test for this module } }); test("some other test", function (assert) { expect(2); equal(true, false, "failing test"); equal(true, true, "passing test"); }); QUnit.module("Module C", { setup: function() { // setup a shared environment for each test this.options = { test: 123 }; } }); test("this test is using shared environment", 1, function (assert) { deepEqual({ test: 123 }, this.options, "passing test"); }); test("this is an async test example", function (assert) { expect(2); stop(); setTimeout(function () { ok(true, "finished async test"); strictEqual(true, true, "Strict equal assertion uses ==="); start(); }, 100); }); ### Run tests git submodule init git submodule update npm i make test ### Coverage Jscoverage is removed due to a lot of installation problems and bad api, node-bunker is planned to use but not implemented yet. node-merge-1.2.0/tests/qunit/node_modules/qunit/support/000077500000000000000000000000001240302775300233725ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/json/000077500000000000000000000000001240302775300243435ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/json/cycle.js000066400000000000000000000132461240302775300260060ustar00rootroot00000000000000// cycle.js // 2011-08-24 /*jslint evil: true, regexp: true */ /*members $ref, apply, call, decycle, hasOwnProperty, length, prototype, push, retrocycle, stringify, test, toString */ if (typeof JSON.decycle !== 'function') { JSON.decycle = function decycle(object) { 'use strict'; // Make a deep copy of an object or array, assuring that there is at most // one instance of each object or array in the resulting structure. The // duplicate references (which might be forming cycles) are replaced with // an object of the form // {$ref: PATH} // where the PATH is a JSONPath string that locates the first occurance. // So, // var a = []; // a[0] = a; // return JSON.stringify(JSON.decycle(a)); // produces the string '[{"$ref":"$"}]'. // JSONPath is used to locate the unique object. $ indicates the top level of // the object or array. [NUMBER] or [STRING] indicates a child member or // property. var objects = [], // Keep a reference to each unique object or array paths = []; // Keep the path to each unique object or array return (function derez(value, path) { // The derez recurses through the object, producing the deep copy. var i, // The loop counter name, // Property name nu; // The new object or array switch (typeof value) { case 'object': // typeof null === 'object', so get out if this value is not really an object. if (!value) { return null; } // If the value is an object or array, look to see if we have already // encountered it. If so, return a $ref/path object. This is a hard way, // linear search that will get slower as the number of unique objects grows. for (i = 0; i < objects.length; i += 1) { if (objects[i] === value) { return {$ref: paths[i]}; } } // Otherwise, accumulate the unique value and its path. objects.push(value); paths.push(path); // If it is an array, replicate the array. if (Object.prototype.toString.apply(value) === '[object Array]') { nu = []; for (i = 0; i < value.length; i += 1) { nu[i] = derez(value[i], path + '[' + i + ']'); } } else { // If it is an object, replicate the object. nu = {}; for (name in value) { if (Object.prototype.hasOwnProperty.call(value, name)) { nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']'); } } } return nu; case 'number': case 'string': case 'boolean': return value; } }(object, '$')); }; } if (typeof JSON.retrocycle !== 'function') { JSON.retrocycle = function retrocycle($) { 'use strict'; // Restore an object that was reduced by decycle. Members whose values are // objects of the form // {$ref: PATH} // are replaced with references to the value found by the PATH. This will // restore cycles. The object will be mutated. // The eval function is used to locate the values described by a PATH. The // root object is kept in a $ variable. A regular expression is used to // assure that the PATH is extremely well formed. The regexp contains nested // * quantifiers. That has been known to have extremely bad performance // problems on some browsers for very long strings. A PATH is expected to be // reasonably short. A PATH is allowed to belong to a very restricted subset of // Goessner's JSONPath. // So, // var s = '[{"$ref":"$"}]'; // return JSON.retrocycle(JSON.parse(s)); // produces an array containing a single element which is the array itself. var px = /^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/; (function rez(value) { // The rez function walks recursively through the object looking for $ref // properties. When it finds one that has a value that is a path, then it // replaces the $ref object with a reference to the value that is found by // the path. var i, item, name, path; if (value && typeof value === 'object') { if (Object.prototype.toString.apply(value) === '[object Array]') { for (i = 0; i < value.length; i += 1) { item = value[i]; if (item && typeof item === 'object') { path = item.$ref; if (typeof path === 'string' && px.test(path)) { value[i] = eval(path); } else { rez(item); } } } } else { for (name in value) { if (typeof value[name] === 'object') { item = value[name]; if (item) { path = item.$ref; if (typeof path === 'string' && px.test(path)) { value[name] = eval(path); } else { rez(item); } } } } } } }($)); return $; }; }node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/000077500000000000000000000000001240302775300245325ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/.npmignore000066400000000000000000000000741240302775300265320ustar00rootroot00000000000000.project *~ *.diff *.patch .DS_Store .settings node_modules node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/AUTHORS.txt000066400000000000000000000037641240302775300264320ustar00rootroot00000000000000Jörn Zaefferer Ariel Flesler Scott González Richard Worth Philippe Rathé John Resig Will Moffat Jan Kassens Ziling Zhao Ryan Szulczewski Chris Lloyd Louis-Rémi Babé Jake Archibald Frances Berriman Rune Halvorsen Chris Thatcher Fábio Rehm Leon Sorokin Douglas Neiner Paul Elliott Nikita Vasilyev Benjamin Lee Paul Irish Oleg Slobodskoi Anton Matzneller Aurélien Bombo Mathias Bynens Erik Vold Wesley Walser Rob Kinninmont Marc Portier Michael Righi Timo Tijhof Jan Alonzo Daniel Trebbien Bob Fanger Markus Messner-Chaney Trevor Parscal Ashar Voultoiz Jimmy Mabey Domenic Denicola Mike Sherov Seong-A Kong Graham Conzett Niall Smart Johan Sörlin Gijs Kruitbosch Erkan Yilmaz Jonathan Sanchez Keith Cirkel Rick Waldron Herbert Vojčík Richard Gibson Alex J Burke Sergii Kliuchnyk node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/History.md000066400000000000000000001044551240302775300265260ustar00rootroot00000000000000 1.9.0 / 2012-07-11 ================== * added jsdoc for QUnit.assert functions * Styling: radius to 5px and small pass/error border, remove inner shadow * Move checkboxes into toolbar and give them labels and descriptions (as tooltip). Fixes #274 - Improve urlFilter API and UI * Where we recieve no exception in throws() use a relevant message. * Also make module filter case-insensitive. Follow-up to #252 * Banner: Link should ignore "testNumber" and "module". Fixes #270 * Rename assert.raises to assert.throws. Fixes #267 * Change package.json name property to 'qunitjs' to avoid conflicht with node-qunit; will publish next release to npm 1.8.0 / 2012-06-14 ================== * Improve window.onerror handling * (issue #260) config.current should be reset at the right time. * Filter: Implement 'module' url parameter. Fixes #252 * raises: ignore global exceptions stemming from test. Fixes #257 - Globally-executed errors sneak past raises in IE 1.7.0 / 2012-06-07 ================== * Add config.requireExpects. Fixes #207 - Add option to require all tests to call expect(). * Improve extractStacktrace() implementation. Fixes #254 - Include all relevant stack lines * Make filters case-insensitive. Partial fix for #252 * is() expects lowercase types. Fixes #250 - Expected Date value is not displayed properly * Fix phantomjs addon header and add readme. Fixes #239 * Add some hints to composite addon readme. Fixes #251 * Track tests by the order in which they were run and create rerun links based on that number. Fixes #241 - Make Rerun link run only a single test. * Use QUnit.push for raises implementation. Fixes #243 * CLI runner for phantomjs * Fix jshint validation until they deal with /** */ comments properly * Update validTest() : Simplify logic, clarify vars and add comments * Refactor assertion helpers into QUnit.assert (backwards compatible) * Add Rerun link to placeholders. Fixes #240 1.6.0 / 2012-05-04 ================== * Save stack for each test, use that for failed expect() results, points at the line where test() was called. Fixes #209 * Prefix test-output id and ignore that in noglobals check. Fixes #212 * Only check for an exports object to detect a CommonJS enviroment. Fixes #237 - Incompatibility with require.js * Add testswarm integration as grunt task * Added padding on URL config checkboxes. * Cleanup composite addon: Use callback registration instead of overwriting them. Set the correct src on rerun link (and dblclick). Remove the composite test itself, as that was a crazy hack not worth maintaining * Cleanup reset() test and usage - run testDone callback first, to allow listeneres ignoring reset assertions * Double clicking on composite test rows opens individual test page * test-message for all message-bearing API reporting details 1.5.0 / 2012-04-04 ================== * Modify "Running..." to display test name. Fixes #220 * Fixed clearing of sessionStorage in Firefox 3.6. * Fixes #217 by calling "block" with config.current.testEnvironment * Add stats results to data. QUnit.jUnitReport function take one argument { xml:' QUnit.start() * Remove the 'let teardown clean up globals test' - IE<9 doesn't support (==buggy) deleting window properties, and that's not worth the trouble, as everything else passes just fine. Fixes #155 * Fix globals in test.js, part 2 * Fix globals in test.js. ?tell wwalser to use ?noglobals everyonce in a while * Extend readme regarding release process 1.1.0 / 2011-10-11 ================== * Fixes #134 - Add a window.onerror handler. Makes uncaught errors actually fail the testsuite, instead of going by unnoticed. * Whitespace cleanup * Merge remote branch 'trevorparscal/master' * Fixed IE compatibility issues with using toString on NodeList objects, which in some browsers results in [object Object] rather than [object NodeList]. Now using duck typing for NodeList objects based on the presence of length, length being a number, presence of item method (which will be typeof string in IE and function in others, so we just check that it's not undefined) and that item(0) returns the same value as [0], unless it's empty, in which case item(0) will return 0, while [0] would return undefined. Tested in IE6, IE8, Firefox 6, Safari 5 and Chrome 16. * Update readme with basic notes on releases * More whitespace/parens cleanup * Check if setTimeout is available before trying to delay running the next task. Fixes #160 * Whitespace/formatting fix, remove unnecessary parens * Use alias for Object.prototype.toString * Merge remote branch 'trevorparscal/master' * Merge remote branch 'wwalser/recursionBug' * Default 'expected' to null in asyncTest(), same as in test() itself. * Whitespace cleanup * Merge remote branch 'mmchaney/master' * Merge remote branch 'Krinkle/master' * Using === instead of == * Added more strict array type detection for dump output, and allowed NodeList objects to be output as arrays * Fixes a bug where after an async test, assertions could move between test cases because of internal state (config.current) being incorrectly set * Simplified check for assertion count and adjusted whitespace * Redo of fixing issue #156 (Support Object.prototype extending environment). * QUnit.diff: Throws exception without this if Object.prototype is set (Property 'length' of undefined. Since Object.prototype.foo doesn't have a property 'rows') * QUnit.url: Without this fix, if Object.prototype.foo is set, the url will be set to ?foo=...&the=rest. * saveGlobals: Without this fix, whenever a member is added to Object.prototype, saveGlobals will think it was a global variable in this loop. --- This time using the call method instead of obj.hasOwnProperty(key), which may fail if the object has that as it's own property (touché!). * Handle expect(0) as expected, i.e. expect(0); ok(true, foo); will cause a test to fail 1.0.0 / 2011-10-06 ================== * Make QUnit work with TestSwarm * Run other addons tests as composite addon demo. Need to move that to /test folder once this setup actually works * Add-on: New assertion-type: step() * added parameter to start and stop allowing a user to increment/decrement the semaphore more than once per call * Update readmes with .md extension for GitHub to render them as markdown * Update close-enough addon to include readme and match (new) naming convetions * Merge remote branch 'righi/close-enough-addon' * Canvas addon: Update file referneces * Update canvas addon: Rename files and add README * Merge remote branch 'wwalser/composite' * Fix #142 - Backslash characters in messages should not be escaped * Add module name to testStart and testDone callbacks * Removed extra columns in object literals. Closes #153 * Remove dead links in comments. * Merge remote branch 'wwalser/multipleCallbacks' * Fixed syntax error and CommonJS incompatibilities in package.json * Allow multiple callbacks to be registered. * Add placeholder for when Safari may end up providing useful error handling * changed file names to match addon naming convention * Whitespace * Created the composite addon. * Using array and object literals. * Issue #140: Make toggle system configurable. * Merge remote branch 'tweetdeck/master' * Adds the 'close enough' addon to determine if numbers are acceptably close enough in value. * Fix recursion support in jsDump, along with tests. Fixes #63 and #100 * Adding a QUnit.config.altertitle flag which will allow users to opt-out of the functionality introduced in 60147ca0164e3d810b8a9bf46981c3d9cc569efc * Refactor window.load handler into QUnit.load, makes it possible to call it manually. * More whitespace cleanup * Merge remote branch 'erikvold/one-chk-in-title' * Whitespace * Merge remote branch 'wwalser/syncStopCalls' * Introducing the first QUnit addon, based on https://github.com/jquery/qunit/pull/84 - adds QUnit.pixelEqual assertion method, along with example tests. * Remove config.hidepassed setting in test.js, wasn't intended to land in master. * Expose QUnit.config.hidepassed setting. Overrides sessionStorage and enables enabling the feature programmatically. Fixes #133 * Fix formatting (css whitespace) for tracebacks. * Expose extend, id, and addEvent methods. * minor comment typo correction * Ignore Eclipse WTP .settings * Set 'The jQuery Project' as author in package.json * Fixes a bug where synchronous calls to stop would cause tests to end before start was called again * Point to planning testing wiki in readme * only add one checkmark to the document.title * Escape the stacktrace output before setting it as innerHTML, since it tends to contain `<` and `>` characters. * Cleanup whitespace * Run module.teardown before checking for pollution. Fixes #109 - noglobals should run after module teardown * Fix accidental global variable "not" * Update document.title status to use more robust unicode escape sequences, works even when served with non-utf-8-charset. * Modify document.title when suite is done to show success/failure in tab, allows you to see the overall result without seeing the tab content. * Merge pull request #107 from sexyprout/master * Set a generic font * Add/update headers * Drop support for deprecated #main in favor of #qunit-fixture. If this breaks your testsuite, replace id="main" with id="qunit-fixture". Fixes #103 * Remove the same key as the one being set. Partial fix for #101 * Don't modify expected-count when checking pollution. The failing assertion isn't expected, so shouldn't be counted. And if expect wasn't used, the count is misleading. * Fix order of noglobals check to produce correct introduced/delete error messages * Prepend module name to sessionStorage keys to avoid conflicts * Store filter-tests only when checked * Write to sessionStorage only bad tests * Moved QUnit.url() defintion after QUnit properties are merged into the global scope. Fixes #93 - QUnit url/extend function breaking urls in jQuery ajax test component * Add a "Rerun" link to each test to replce the dblclick (still supported, for now). * Fixed the regex for parsing the name of a test when double clicking to filter. * Merge remote branch 'scottgonzalez/url' * Added checkboxes to show which flags are currently on and allow toggling them. * Retain all querystring parameters when filtering a test via double click. * Added better querystring parsing. Now storing all querystring params in QUnit.urlParams so that we can carry the params forward when filtering to a specific test. This removes the ability to specify multiple filters. * Make reordering optional (QUnit.config.reorder = false) and optimize "Hide passed tests" mode by also hiding "Running [testname]" entries. * Added missing semicolons and wrapped undefined key in quotes. * Optimize test hiding, add class on page load if stored in sessionStorage * Optimize the hiding of passed tests. * Position test results above test list, making it visible without ever having to scroll. Create a placeholder to avoid pushing down results later. * Don't check for existing qunit-testresult element, it gets killed on init anyway. * Added URL flag ?notrycatch (ala ?noglobals) for debugging exceptions. Won't try/catch test code, giving better debugging changes on the original exceptions. Fixes #72 * Always show quni-toolbar (if at all specified), persist checkbox via sessionStorage. Fixes #47 * Use non-html testname for calls to fail(). Fixes #77 * Overhaul of QUnit.callbacks. Consistent single argument with related properties, with additonal runtime property for QUnit.done * Extended test/logs.html to capture more of the callbacks. * Fixed moduleStart/Done callbacks. Added test/logs.html to test these callbacks. To be extended. * Update copyright and license header. Fixes #61 * Formatting fix. * Use a semaphore to synchronize stop() and start() calls. Fixes #76 * Merge branch 'master' of https://github.com/paulirish/qunit into paulirish-master * Added two tests for previous QUnit.raises behaviour. For #69 * add optional 2. arg to QUnit.raises #69. * fix references inside Complex Instances Nesting to what was originally intended. * Qualify calls to ok() in raises() for compability with CLI enviroments. * Fix done() handling, check for blocking, not block property * Fix moduleStart/Done and done callbacks. * Replacing sessionStorage test with the one from Modernizr/master (instead of current release). Here's hoping it'll work for some time. * Updated test for availibility of sessionStorage, based on test from Modernizr. Fixes #64 * Defer test execution when previous run passed, persisted via sessionStorage. Fixes #49 * Refactored module handling and queuing to enable selective defer of test runs. * Move assertions property from config to Test * Move expected-tests property from config to Test * Refactored test() method to delegate to a Test object to encapsulate all properties and methods of a single test, allowing further modifications. * Adding output of sourcefile and linenumber of failed assertions (except ok()). Only limited cross-browser support for now. Fixes #60 * Drop 'hide missing tests' feature. Fixes #48 * Adding readme. Fixes #58 * Merge branch 'prettydiff' * Improve jsDump output with formatted diffs. * Cleanup whitespace * Cleanup whitespace * Added additional guards around browser specific code and cleaned up jsDump code * Added guards around tests which are only for browsers * cleaned up setTimeout undefined checking and double done on test finish * fixing .gitignore * making window setTimeout query more consistent * Moved expect-code back to beginning of function, where it belongs. Fixes #52 * Bread crumb in header: Link to suite without filters, add link to current page based on the filter, if present. Fixes #50 * Make the toolbar element optional when checking for show/hide of test results. Fixes #46 * Adding headless.html to manually test logging and verify that QUnit works without output elements. Keeping #qunit-fixture as a few tests actually use that. * Fix for QUnit.moduleDone, get rid of initial bogus log. Fixes #33 * Pass raw data (result, message, actual, expected) as third argument to QUnit.log. Fixes #32 * Dump full exception. Not pretty, but functional (see issue Pretty diff for pretty output). Fixes #31 * Don't let QUnit.reset() cause assertions to run. Manually applied from Scott Gonzalez branch. Fixes #34 * Added missing semicolons. Fixes #37 * Show okay/failed instead of undefined. Fixes #38 * Expose push as QUnit.push to build custom assertions. Fixes #39 * Respect filter pass selection when writing new results. Fixes #43 * Cleanup tests, removing asyncTest-undefined check and formatting * Reset: Fall back to innerHTML when jQuery isn't available. Fixes #44 * Merge branch 'master' of github.com:jquery/qunit * reset doesn't exist here - fixes #28. * - less css cruft, better readability - replaced inline style for test counts with "counts" class - test counts now use a "failed"/"passed" vs "pass"/"fail", shorter/more distinct selectors - pulled all test counts styling together and up (they're always the same regardless of section pass/fail state) * Adding .gitignore file * Removing diff test - diffing works fine, as the browser collapses whitespace in its output, but the test can't do that and isn't worth fixing. * Always synchronize the done-step (it'll set the timeout when necessary), fixes timing race conditions. * Insert location.href as an anchor around the header. Fixes issue #29 * - kill double ;; in escapeHtml. oops * Removed html escaping from QUnit.diff, as input is already escaped, only leads to double escaping. Replaced newlines with single whitespace. * Optimized and cleaned up CSS file * Making the reset-method non-global (only module, test and assertions should be global), and fixing the fixture reset by using jQuery's html() method again, doesn't work with innerHTML, yet * Introducing #qunit-fixture element, deprecating the (never documented) #main element. Doesn't require inline styles and is now independent of jQuery. * Ammending previous commit: Remove jQuery-core specific resets (will be replaced within jQuery testsuite). Fixes issue #19 - QUnit.reset() removes global jQuery ajax event handlers * Remove jQuery-core specific resets (will be replaced within jQuery testsuite). Fixes issue #19 - QUnit.reset() removes global jQuery ajax event handlers * Cleaning up rubble from the previous commit. * Added raises assertion, reusing some of kennsnyder's code. * Merged kensnyder's object detection code. Original message: Streamlined object detection and exposed QUnit.objectType as a function. * Fixed some bad formatting. * Move various QUnit properties below the globals-export to avoid init becoming a global method. Fixes issue #11 - Remove 'init' function from a global namespace * Improved output when expected != actual: Output both only then, and add a diff. Fixes issue #10 - Show diff if equal() or deepEqual() failed * Expand failed tests on load. Fixes issue #8 - Failed tests expanded on load * Set location.search for url-filtering instead of location.href. Fixes issue #7 - Modify location.search instead of location.href on test double-click * Add QUnit.begin() callback. Fixes issue #6 - Add 'start' callback. * add css style for result (".test-actual") in passed tests * Fixed output escaping by using leeoniya's custom escaping along with innerHTML. Also paves the way for outputting diffs. * Cleanup * Revert "Revert part of bad merge, back to using createTextNode" * Revert part of bad merge, back to using createTextNode * Fixed doubleclick-handler and filtering to rerun only a single test. * Add ability to css style a test's messages, expected and actual results. Merged from Leon Sorokin (leeoniya). * Remove space between module name and colon * - removed "module" wording from reports (unneeded and cluttery) - added and modified css to make module & test names styleable * Logging support for Each test can extend the module testEnvironment * Fixing whitespace * Update tests to use equal() and deepEqual() rather than the deprecated equals() and same() * Consistent argument names for deepEqual * Skip DOM part of jsDump test if using a SSJS environment without a DOM * Improve async testing by creating the result element before running the test, updating it later. If the test fails, its clear which test is the culprit. * Add autostart option to config. Set via QUnit.config.autostart = false; start later via QUnit.start() * Expose QUnit.config, but don't make config a global * Expose QUnit.config as global to make external workarounds easier * Merge branch 'asyncsetup' * Allowing async setup and teardown. Fixes http://github.com/jquery/qunit/issues#issue/20 * Always output expected and actual result (no reason not to). Fixes http://github.com/jquery/qunit/issues#issue/21 * More changes to the detection of types in jsDump's typeOf. * Change the typeOf checks in QUnit to be more accurate. * Added test for jsDump and modified its options to properly output results when document.createTextNode is used; currently tests for DOM elements cause a stackoverflow error in IEs, works fine, with the correct output, elsewhere * Always use jsDump to output result objects into messages, making the output for passing assertions more useful * Make it so that the display is updated, at least, once a second - also prevents scripts from executing for too long and causing problems. * added tests and patch for qunit.equiv to avoid circular references in objects and arrays * No reason to continue looping, we can stop at this point. Thanks to Chris Thatcher for the suggestion. * Use createTextNode instead of innerHTML for showing test result since expected and actual might be something that looks like a tag. * 'Test card' design added * switched green to blue for top-level pass + reduced padding * Bringing the QUnit API in line with the CommonJS API. * Explicitly set list-style-position: inside on result LIs. * Madness with border-radius. * Corrected banner styles for new class names * Added rounded corners and removed body rules for embedded tests * Resolving merge conflicts. * added colouring for value summary * adding some extra text colours * added styles for toolbar * added new styles * IE 6 and 7 weren't respecting the CSS rules for the banner, used a different technique instead. * Went a bit further and made extra-sure that the target was specified correctly. * Fixed problem where double-clicking an entry in IE caused an error to occur. * Path for http://dev.jquery.com/ticket/5426 - fix the microformat test result * Fixed test() to use 'expected' 2nd param * Remove the named function expressions, to stop Safari 2 from freaking out. Fixes #5. * Each test can extend the module testEnvironment * Extra test for current test environment * Make the current testEnvironment available to utility functions * typeOf in QUnit.jsDump now uses QUnit.is * hoozit in QUnit.equiv now uses QUnit.is * Properly set label attributes. * Some minor tweaks to RyanS' GETParams change. * left a console.log in :( * Took into account a fringe case when using qunit with testswarm. Trying to run all the tests with the extra url params from testswarm would make qunit look for a testsuite that did not exist * need to set config.currentModule to have correct names and working filters * Support logging of testEnvironment * async tests aren't possible on rhino * Fixed a missing QUnit.reset(). * The QUnit. prefix was missing from the uses of the start() method. * Merged lifecycle object into testEnvironment * "replacing totally wrong diff algorithm with a working one" Patch from kassens (manually applied). * fixing jslint errors in test.js * Fixed: testDone() was always called with 0 failures in CommonJS mode * Fixed: moduleDone() was invoked on first call to module() * Added a new asyncTest method - removes the need for having to call start() at the beginning of an asynchronous test. * Added support for expected numbers in the test method. * Fixed broken dynamic loading of tests (can now dynamically load tests and done still works properly). * Simplified the logic for calling 'done' and pushing off new tests - was causing too many inconsistencies otherwise. * Simplified the markup for the QUnit test test suite. * Realized that it's really easy to handle the case where stop() has been called and then an exception is thrown. * Added in better logging support. Now handle moduleStart/moduleDone and testStart/testDone. Also make sure that done only fires once at the end. * Made it so that you can reset the suite to an initial state (at which point tests can be dynamically loaded and run, for example). * Re-worked QUnit to handle dynamic loading of additional code (the 'done' code will be re-run after additional code is loaded). * Removed the old SVN version stuff. * Moved the QUnit source into a separate directory and updated the test suite/packages files. * Added in CommonJS support for exporting the QUnit functionality. * Missing quote from package.json. * Fixed trailing comma in package.json. * Added a CommonJS/Narwhal package.json file. * Accidentally reverted the jsDump/equiv changes that had been made. * Hide the filter toolbar if it's not needed. Also exposed the jsDump and equiv objects on QUnit. * Retooled the QUnit CSS to be more generic. * Renamed the QUnit files from testrunner/testsuite to QUnit. * Expose QUnit.equiv and QUnit.jsDump in QUnit. * Moved the QUnit test directory into the QUnit directory. * Reworked the QUnit CSS (moved jQuery-specific stuff out, made all the other selectors more specific). * Removed the #main reset for non-jQuery code (QUnit.reset can be overwritten with your own reset code). * Moved the QUnit toolbar inline. * Switched to using a qunit- prefix for special elements (banner, userAgent, and tests). * Missed a case in QUnit where an element was assumed to exist. * QUnit's isSet and isObj are no longer needed - you should use same instead. * Make sure that QUnit's equiv entity escaping is enabled by default (otherwise the output gets kind of crazy). * Refactored QUnit, completely reorganized the structure of the file. Additionally made it so that QUnit can run outside of a browser (inside Rhino, for example). * Removed some legacy and jQuery-specific test methods. * Added callbacks for tests and modules. It's now possible to reproduce the full display of the testrunner without using the regular rendering. * QUnit no longer depends upon rendering the results (it can work simply by using the logging callbacks). * Made QUnit no longer require jQuery (it is now a standalone, framework independent, test runner). * Reverted the noglobals changed from QUnit - causing chaos in the jQuery test suite. * qunit: removed noglobals flag, instead always check for globals after teardown; if a test has to introduce a global "myVar", use delete window.myVar in teardown or at the end of a test * qunit: don't child selectors when IE should behave nicely, too * qunit: improvment for the test-scope: create a new object and call setup, the test, and teardown in the scope of that object - allows you to provide test fixtures to each test without messing with global data; kudos to Martin Häcker for the contribution * qunit: added missing semicolons * qunit: fixed a semicolon, that should have been a comma * QUnit: implemented error handling for Opera as proposed by #3628 * qunit: fix for http://dev.jquery.com/ticket/3215 changing wording of testresults, to something more positive (x of y passed, z failed) * QUnit: testrunner.js: Ensures equality of types (String, Boolean, Number) declared with the 'new' prefix. See comments #3, #4 and #5 on http://philrathe.com/articles/equiv * qunit: wrap name of test in span when a module is used for better styling * qunit: auto-prepend default mark (#header, #banner, #userAgent, #tests) when not present * Landing some changes to add logging to QUnit (so that it's easier to hook in to when a test finishes). * Added checkbox for hiding missing tests (tests that fail with the text 'missing test - untested code is broken code') * qunit: eol-style:native and mime-type * HTML being injected for the test result wasn't valid HTML. * qunit: setting mimetype for testsuite.css * qunit: update to Ariel's noglobals patch to support async tests as well * Landing Ariel's change - checks for global variable leakage. * qunit: run module-teardown in its own synchronize block to synchronize with async tests (ugh) * qunit: same: equiv - completely refactored in the testrunner. * testrunner.js: - Update equiv to support Date and RegExp. - Change behavior when comparing function: - abort when in an instance of Object (when references comparison failed) - skip otherwise (like before) * qunit: code refactoring and cleanup * QUnit: update equiv to latest version, handling multiple arguments and NaN, see http://philrathe.com/articles/equiv * QUnit: cleanup, deprecating compare, compare2 and serialArray: usage now throws an error with a helpful message * QUnit: optional timeout argument for stop, while making tests undetermined, useful for debugging * QUnit: added toolbar with "hide passed tests" checkbox to help focus on failed tests * QUnit: minor output formatting * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests * qunit: use window.load to initialize tests, allowing other code to run on document-ready before starting to run tests * qunit: allow either setup or teardown, instead of both or nothing * qunit: make everything private by default, expose only public API; removed old timeout-option (non-deterministic, disabled for a long time anyway); use local $ reference instead of global jQuery reference; minor code cleanup (var config instead of _config; queue.shift instead of slice) * qunit: added support for module level setup/teardown callbacks * qunit: modified example for equals to avoid confusion with parameter ordering * qunit: added id/classes to result element to enable integration with browser automation tools, see http://docs.jquery.com/QUnit#Integration_into_Browser_Automation_Tools * qunit: replaced $ alias with jQuery (merged from jquery/test/data/testrunner.js) * qunit: fixed inline documentation for equals * qunit testrunner - catch and log possible error during reset() * QUnit: Switched out Date and Rev for Id. * qunit: when errors are thrown in a test, the message is successfully show on all browsers. * qunit: added license header * qunit: moved jquery testrunner to top-level project, see http://docs.jquery.com/QUnit * Share project 'qunit' into 'https://jqueryjs.googlecode.com/svn' node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/README.md000066400000000000000000000051731240302775300260170ustar00rootroot00000000000000[QUnit](http://docs.jquery.com/QUnit) - A JavaScript Unit Testing framework. ================================ QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript code (and even capable of testing JavaScript code on the server-side). QUnit is especially useful for regression testing: Whenever a bug is reported, write a test that asserts the existence of that particular bug. Then fix it and commit both. Every time you work on the code again, run the tests. If the bug comes up again - a regression - you'll spot it immediately and know how to fix it, because you know what code you just changed. Having good unit test coverage makes safe refactoring easy and cheap. You can run the tests after each small refactoring step and always know what change broke something. QUnit is similar to other unit testing frameworks like JUnit, but makes use of the features JavaScript provides and helps with testing code in the browser, e.g. with its stop/start facilities for testing asynchronous code. If you are interested in helping developing QUnit, you are in the right place. For related discussions, visit the [QUnit and Testing forum](http://forum.jquery.com/qunit-and-testing). Planning for a qunitjs.com site and other testing tools related work now happens on the [jQuery Testing Team planning wiki](http://jquerytesting.pbworks.com/w/page/41556026/FrontPage). Development ----------- To submit patches, fork the repository, create a branch for the change. Then implement the change, run `grunt` to lint and test it, then commit, push and create a pull request. Include some background for the change in the commit message and `Fixes #nnn`, referring to the issue number you're addressing. To run `grunt`, you need `node` and `npm`, then `npm install grunt -g`. Releases -------- Install git-extras and run `git changelog` to update History.md. Update qunit/qunit.js|css and package.json to the release version, commit and tag, update them again to the next version, commit and push commits and tags (`git push --tags origin master`). Put the 'v' in front of the tag, e.g. `v1.8.0`. Clean up the changelog, removing merge commits or whitespace cleanups. To upload to code.jquery.com (replace $version accordingly): scp -q qunit/qunit.js jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/qunit/qunit-$version.js scp -q qunit/qunit.css jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/qunit/qunit-$version.css Then update /var/www/html/code.jquery.com/index.html and purge it with: curl -s http://code.origin.jquery.com/?reloadnode-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/000077500000000000000000000000001240302775300260025ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/canvas/000077500000000000000000000000001240302775300272555ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/canvas/README.md000066400000000000000000000007471240302775300305440ustar00rootroot00000000000000Canvas - A QUnit Addon For Testing Canvas Rendering ================================ This addon for QUnit adds a pixelEqual method that allows you to assert individual pixel values in a given canvas. Usage: pixelEqual(canvas, x, y, r, g, b, a, message) Where: * canvas: Reference to a canvas element * x, y: Coordinates of the pixel to test * r, g, b, a: The color and opacity value of the pixel that you except * message: Optional message, same as for other assertions node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/canvas/canvas-test.js000066400000000000000000000051171240302775300320470ustar00rootroot00000000000000test("Canvas pixels", function () { var canvas = document.getElementById('qunit-canvas'), context; try { context = canvas.getContext('2d'); } catch(e) { // propably no canvas support, just exit return; } context.fillStyle = 'rgba(0, 0, 0, 0)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(255, 0, 0, 0)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 255, 0, 0)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 255, 0)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 0, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(255, 0, 0, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 255, 0, 0, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 255, 0, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 255, 0, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 255, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 0, 0, 0, 0, 255, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 0, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 2, 2, 0, 0, 0, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(255, 0, 0, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 2, 2, 255, 0, 0, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 255, 0, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 2, 2, 0, 255, 0, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 255, 0.5)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 2, 2, 0, 0, 255, 127); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 0, 1)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 4, 4, 0, 0, 0, 255); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(255, 0, 0, 1)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 4, 4, 255, 0, 0, 255); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 255, 0, 1)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 4, 4, 0, 255, 0, 255); context.clearRect(0,0,5,5); context.fillStyle = 'rgba(0, 0, 255, 1)'; context.fillRect(0, 0, 5, 5); QUnit.pixelEqual(canvas, 4, 4, 0, 0, 255, 255); context.clearRect(0,0,5,5); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/canvas/canvas.html000066400000000000000000000007621240302775300314230ustar00rootroot00000000000000 QUnit Test Suite - Canvas Addon
node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/canvas/qunit-canvas.js000066400000000000000000000004351240302775300322260ustar00rootroot00000000000000QUnit.extend( QUnit, { pixelEqual: function(canvas, x, y, r, g, b, a, message) { var actual = Array.prototype.slice.apply(canvas.getContext('2d').getImageData(x, y, 1, 1).data), expected = [r, g, b, a]; QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); } }); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/close-enough/000077500000000000000000000000001240302775300303725ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/close-enough/README.md000066400000000000000000000011671240302775300316560ustar00rootroot00000000000000Close-Enough - A QUnit Addon For Number Approximations ================================ This addon for QUnit adds close and notClose assertion methods, to test that numbers are close enough (or different enough) from an expected number, with a specified accuracy. Usage: close(actual, expected, maxDifference, message) notClose(actual, expected, minDifference, message) Where: * maxDifference: the maximum inclusive difference allowed between the actual and expected numbers * minDifference: the minimum exclusive difference allowed between the actual and expected numbers * actual, expected, message: The usual close-enough-test.js000066400000000000000000000013521240302775300342170ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/close-enoughtest("Close Numbers", function () { var halfPi = Math.PI / 2, sqrt2 = Math.sqrt(2); QUnit.close(7, 7, 0); QUnit.close(7, 7.1, 0.1); QUnit.close(7, 7.1, 0.2); QUnit.close(3.141, Math.PI, 0.001); QUnit.close(3.1, Math.PI, 0.1); QUnit.close(halfPi, 1.57, 0.001); QUnit.close(sqrt2, 1.4142, 0.0001); QUnit.close(Infinity, Infinity, 1); }); test("Distant Numbers", function () { var halfPi = Math.PI / 2, sqrt2 = Math.sqrt(2); QUnit.notClose(6, 7, 0); QUnit.notClose(7, 7.2, 0.1); QUnit.notClose(7, 7.2, 0.19999999999); QUnit.notClose(3.141, Math.PI, 0.0001); QUnit.notClose(3.1, Math.PI, 0.001); QUnit.notClose(halfPi, 1.57, 0.0001); QUnit.notClose(sqrt2, 1.4142, 0.00001); QUnit.notClose(Infinity, -Infinity, 5); });node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/close-enough/close-enough.html000066400000000000000000000007121240302775300336500ustar00rootroot00000000000000 QUnit Test Suite - Close Enough Addon
qunit-close-enough.js000066400000000000000000000022441240302775300344010ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/close-enoughQUnit.extend( QUnit, { /** * Checks that the first two arguments are equal, or are numbers close enough to be considered equal * based on a specified maximum allowable difference. * * @example close(3.141, Math.PI, 0.001); * * @param Number actual * @param Number expected * @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers) * @param String message (optional) */ close: function(actual, expected, maxDifference, message) { var passes = (actual === expected) || Math.abs(actual - expected) <= maxDifference; QUnit.push(passes, actual, expected, message); }, /** * Checks that the first two arguments are numbers with differences greater than the specified * minimum difference. * * @example notClose(3.1, Math.PI, 0.001); * * @param Number actual * @param Number expected * @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers) * @param String message (optional) */ notClose: function(actual, expected, minDifference, message) { QUnit.push(Math.abs(actual - expected) > minDifference, actual, expected, message); } });node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/composite/000077500000000000000000000000001240302775300300045ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/composite/README.md000066400000000000000000000007721240302775300312710ustar00rootroot00000000000000Composite - A QUnit Addon For Running Multiple Test Files ================================ Composite is a QUnit addon that, when handed an array of files, will open each of those files inside of an iframe, run the tests and display the results as a single suite of QUnit tests. The Rerun link next to each suite allows you to quickly rerun that suite, outside the composite runner. If you want to see what assertion failed in a long list of assertions, just use the regular "Hide passed tests" checkbox.composite-demo-test.html000066400000000000000000000011231240302775300345110ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/composite QUnit SubsuiteRunner Test Suite
node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/composite/index.html000066400000000000000000000020341240302775300320000ustar00rootroot00000000000000 Composite

Composite

A QUnit Addon For Running Multiple Test Files

Composite is a QUnit addon that, when handed an array of files, will open each of those files inside of an iframe, run the tests and display the results as a single suite of QUnit tests.

Using Composite

To use Composite, setup a standard QUnit html page as you would with other QUnit tests. Remember to include composite.js and composite.css. Then, inside of either an external js file, or a script block call the only new method that Composite exposes, QUnit.testSuites().

QUnit.testSuites() is passed an array of test files to run as follows:

QUnit.testSuites([
    "test-file-1.html",
    "test-file-2.html",
    "test-file-3.html"
]);
		

Tests

Composite Demo: A suite which demoes how Composite is bootstrapped and run.

node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/composite/qunit-composite.css000066400000000000000000000003011240302775300336500ustar00rootroot00000000000000iframe.qunit-subsuite{ position: fixed; bottom: 0; left: 0; margin: 0; padding: 0; border-width: 1px 0 0; height: 45%; width: 100%; background: #fff; }node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/composite/qunit-composite.js000066400000000000000000000045671240302775300335160ustar00rootroot00000000000000(function( QUnit ) { QUnit.extend( QUnit, { testSuites: function( suites ) { QUnit.begin(function() { QUnit.initIframe(); }); for ( var i = 0; i < suites.length; i++ ) { QUnit.runSuite( suites[i] ); } QUnit.done(function() { this.iframe.style.display = "none"; }); }, runSuite: function( suite ) { asyncTest( suite, function() { QUnit.iframe.setAttribute( "src", suite ); }); }, initIframe: function() { var body = document.body, iframe = this.iframe = document.createElement( "iframe" ), iframeWin; iframe.className = "qunit-subsuite"; body.appendChild( iframe ); function onIframeLoad() { var module, test, count = 0; iframeWin.QUnit.moduleStart(function( data ) { // capture module name for messages module = data.name; }); iframeWin.QUnit.testStart(function( data ) { // capture test name for messages test = data.name; }); iframeWin.QUnit.testDone(function() { test = null; }); iframeWin.QUnit.log(function( data ) { if (test === null) { return; } // pass all test details through to the main page var message = module + ": " + test + ": " + data.message; expect( ++count ); QUnit.push( data.result, data.actual, data.expected, message ); }); iframeWin.QUnit.done(function() { // start the wrapper test from the main page start(); }); } QUnit.addEvent( iframe, "load", onIframeLoad ); iframeWin = iframe.contentWindow; } }); QUnit.testStart(function( data ) { // update the test status to show which test suite is running QUnit.id( "qunit-testresult" ).innerHTML = "Running " + data.name + "...
 "; }); QUnit.testDone(function() { var i, current = QUnit.id( this.config.current.id ), children = current.children, src = this.iframe.src; // undo the auto-expansion of failed tests for ( i = 0; i < children.length; i++ ) { if ( children[i].nodeName === "OL" ) { children[i].style.display = "none"; } } QUnit.addEvent(current, "dblclick", function( e ) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) { target = target.parentNode; } if ( window.location && target.nodeName.toLowerCase() === "strong" ) { window.location = src; } }); current.getElementsByTagName('a')[0].href = src; }); }( QUnit ) ); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/junitlogger/000077500000000000000000000000001240302775300303335ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/junitlogger/index.html000066400000000000000000000017401240302775300323320ustar00rootroot00000000000000 QUnit Test Suite - JUnit report
node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/junitlogger/junitlogger.js000066400000000000000000000125551240302775300332320ustar00rootroot00000000000000(function() { var count = 0, suiteCount = 0, currentSuite, currentTest, suites = [], assertCount, start, results = {failed:0, passed:0, total:0, time:0}; QUnit.jUnitReport = function(data) { // Gets called when a report is generated }; QUnit.moduleStart(function(data) { currentSuite = { name: data.name, tests: [], failures: 0, time: 0, stdout : '', stderr : '' }; suites.push(currentSuite); }); QUnit.moduleDone(function(data) { }); QUnit.testStart(function(data) { if(!start){ start = new Date(); } assertCount = 0; currentTest = { name: data.name, failures: [], start: new Date() }; // Setup default suite if no module was specified if (!currentSuite) { currentSuite = { name: "default", tests: [], failures: 0, time: 0, stdout : '', stderr : '' }; suites.push(currentSuite); } currentSuite.tests.push(currentTest); }); QUnit.testDone(function(data) { currentTest.failed = data.failed; currentTest.total = data.total; currentSuite.failures += data.failed; results.failed += data.failed; results.passed += data.passed; results.total += data.total; }); QUnit.log(function(data) { assertCount++; if (!data.result) { currentTest.failures.push(data.message); // Add log message of failure to make it easier to find in jenkins UI currentSuite.stdout += '[' + currentSuite.name + ', ' + currentTest.name + ', ' + assertCount + '] ' + data.message + '\n'; } }); QUnit.done(function(data) { function ISODateString(d) { function pad(n) { return n < 10 ? '0' + n : n; } return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1)+'-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + 'Z'; } // Generate XML report var i, ti, fi, test, suite, xmlWriter = new XmlWriter({ linebreak_at : "testsuites,testsuite,testcase,failure,system-out,system-err" }), now = new Date(); xmlWriter.start('testsuites'); for (i = 0; i < suites.length; i++) { suite = suites[i]; // Calculate time for (ti = 0; ti < suite.tests.length; ti++) { test = suite.tests[ti]; test.time = (now.getTime() - test.start.getTime()) / 1000; suite.time += test.time; } xmlWriter.start('testsuite', { id: "" + i, name: suite.name, errors: "0", failures: suite.failures, hostname: "localhost", tests: suite.tests.length, time: Math.round(suite.time * 1000) / 1000, timestamp: ISODateString(now) }); for (ti = 0; ti < suite.tests.length; ti++) { test = suite.tests[ti]; xmlWriter.start('testcase', { name: test.name, total: test.total, failed: test.failed, time: Math.round(test.time * 1000) / 1000 }); for (fi = 0; fi < test.failures.length; fi++) { xmlWriter.start('failure', {type: "AssertionFailedError", message: test.failures[fi]}, true); } xmlWriter.end('testcase'); } if (suite.stdout) { xmlWriter.start('system-out'); xmlWriter.cdata('\n' + suite.stdout); xmlWriter.end('system-out'); } if (suite.stderr) { xmlWriter.start('system-err'); xmlWriter.cdata('\n' + suite.stderr); xmlWriter.end('system-err'); } xmlWriter.end('testsuite'); } xmlWriter.end('testsuites'); results.time = new Date() - start; QUnit.jUnitReport({ results:results, xml: xmlWriter.getString() }); }); function XmlWriter(settings) { function addLineBreak(name) { if (lineBreakAt[name] && data[data.length - 1] !== '\n') { data.push('\n'); } } function makeMap(items, delim, map) { var i; items = items || []; if (typeof(items) === "string") { items = items.split(','); } map = map || {}; i = items.length; while (i--) { map[items[i]] = {}; } return map; } function encode(text) { var baseEntities = { '"' : '"', "'" : ''', '<' : '<', '>' : '>', '&' : '&' }; return ('' + text).replace(/[<>&\"\']/g, function(chr) { return baseEntities[chr] || chr; }); } var data = [], stack = [], lineBreakAt; settings = settings || {}; lineBreakAt = makeMap(settings.linebreak_at || 'mytag'); this.start = function(name, attrs, empty) { if (!empty) { stack.push(name); } data.push('<', name); for (var aname in attrs) { data.push(" " + encode(aname), '="', encode(attrs[aname]), '"'); } data.push(empty ? ' />' : '>'); addLineBreak(name); }; this.end = function(name) { stack.pop(); addLineBreak(name); data.push(''); addLineBreak(name); }; this.text = function(text) { data.push(encode(text)); }; this.cdata = function(text) { data.push(''); }; this.comment = function(text) { data.push(''); }; this.pi = function(name, text) { if (text) { data.push('\n'); } else { data.push('\n'); } }; this.doctype = function(text) { data.push('\n'); }; this.getString = function() { for (var i = stack.length - 1; i >= 0; i--) { this.end(stack[i]); } stack = []; return data.join('').replace(/\n$/, ''); }; this.reset = function() { data = []; stack = []; }; this.pi(settings.xmldecl || 'xml version="1.0" encoding="UTF-8"'); } })();node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/phantomjs/000077500000000000000000000000001240302775300300055ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/phantomjs/README.md000066400000000000000000000005001240302775300312570ustar00rootroot00000000000000PhantomJS Runner ================ A runner for PhantomJS, providing console output for tests. Usage: phantomjs runner.js url Example: phantomjs runner.js http://localhost/qunit/test If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md).node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/phantomjs/runner.js000066400000000000000000000044511240302775300316600ustar00rootroot00000000000000/* * Qt+WebKit powered headless test runner using Phantomjs * * Phantomjs installation: http://code.google.com/p/phantomjs/wiki/BuildInstructions * * Run with: * phantomjs runner.js [url-of-your-qunit-testsuite] * * E.g. * phantomjs runner.js http://localhost/qunit/test */ var url = phantom.args[0]; var page = require('webpage').create(); // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") page.onConsoleMessage = function(msg) { console.log(msg); }; page.onInitialized = function() { page.evaluate(addLogging); }; page.open(url, function(status){ if (status !== "success") { console.log("Unable to access network: " + status); phantom.exit(1); } else { // page.evaluate(addLogging); var interval = setInterval(function() { if (finished()) { clearInterval(interval); onfinishedTests(); } }, 500); } }); function finished() { return page.evaluate(function(){ return !!window.qunitDone; }); } function onfinishedTests() { var output = page.evaluate(function() { return JSON.stringify(window.qunitDone); }); phantom.exit(JSON.parse(output).failed > 0 ? 1 : 0); } function addLogging() { window.document.addEventListener( "DOMContentLoaded", function() { var current_test_assertions = []; var module; QUnit.moduleStart(function(context) { module = context.name; }); QUnit.testDone(function(result) { var name = module + ': ' + result.name; var i; if (result.failed) { console.log('Assertion Failed: ' + name); for (i = 0; i < current_test_assertions.length; i++) { console.log(' ' + current_test_assertions[i]); } } current_test_assertions = []; }); QUnit.log(function(details) { var response; if (details.result) { return; } response = details.message || ''; if (typeof details.expected !== 'undefined') { if (response) { response += ', '; } response += 'expected: ' + details.expected + ', but was: ' + details.actual; } current_test_assertions.push('Failed assertion: ' + response); }); QUnit.done(function(result){ console.log('Took ' + result.runtime + 'ms to run ' + result.total + ' tests. ' + result.passed + ' passed, ' + result.failed + ' failed.'); window.qunitDone = result; }); }, false ); } node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/step/000077500000000000000000000000001240302775300267555ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/step/README.md000066400000000000000000000007161240302775300302400ustar00rootroot00000000000000QUnit.step() - A QUnit Addon For Testing execution in order ============================================================ This addon for QUnit adds a step method that allows you to assert the proper sequence in which the code should execute. Example: test("example test", function () { function x() { QUnit.step(2, "function y should be called first"); } function y() { QUnit.step(1); } y(); x(); });node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/step/qunit-step.js000066400000000000000000000012241240302775300314230ustar00rootroot00000000000000QUnit.extend( QUnit, { /** * Check the sequence/order * * @example step(1); setTimeout(function () { step(3); }, 100); step(2); * @param Number expected The excepted step within the test() * @param String message (optional) */ step: function (expected, message) { this.config.current.step++; // increment internal step counter. if (typeof message === "undefined") { message = "step " + expected; } var actual = this.config.current.step; QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); } }); /** * Reset the step counter for every test() */ QUnit.testStart(function () { this.config.current.step = 0; }); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/step/step-test.js000066400000000000000000000004751240302775300312510ustar00rootroot00000000000000module('Step Addon'); test("step", 3, function () { QUnit.step(1, "step starts at 1"); setTimeout(function () { start(); QUnit.step(3); }, 100); QUnit.step(2, "before the setTimeout callback is run"); stop(); }); test("step counter", 1, function () { QUnit.step(1, "each test has its own step counter"); });node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/step/step.html000066400000000000000000000006621240302775300306220ustar00rootroot00000000000000 QUnit Test Suite - Step Addon
node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/themes/000077500000000000000000000000001240302775300272675ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/themes/README.md000066400000000000000000000003201240302775300305410ustar00rootroot00000000000000Themes ====== These custom themes fully replace the default qunit.css file and should work with the default markup. To see them in action, open the html file for each. They'll run the QUnit testsuite itself.node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/themes/gabe.css000066400000000000000000000425571240302775300307140ustar00rootroot00000000000000/** * QUnit Theme by Gabe Hendry * * http://docs.jquery.com/QUnit * * Copyright 2012 jQuery Foundation and other contributors * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ /** General Styles and Page Sturcture */ body { font-family:Arial, 'sans serif'; padding:20px 20px 0 20px; position:relative; } h1, h2, h3, h4, h5, h6, #qunit-header, #qunit-banner { font-family:Calibri, Arial, 'sans-serif'; } h2 #qunit-tests, h2 #qunit-testrunner-toolbar, h2 #qunit-userAgent, #qunit-testresult { font-family: Arial, 'sans-serif'; } #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } /** Resets */ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { margin: 0; padding: 0; } /** Headers */ #qunit-header { padding: 10px 0px 25px 0px; color: #3B73B9; font-size: 1.8em; font-weight: normal; height:2em; } #qunit-header a { text-decoration: none; color: #3B73B9; font-weight:bold; padding-right:22px; float:left; } #qunit-header label { font-size:14px; color:#6BC9ED; float:right; font-family:Arial, 'sans-serif'; display: inline-block; } #qunit-header a + label:after { content: ' }'; } #qunit-header label + label { margin-right:8px; } #qunit-header a:hover, #qunit-header a:focus { color: #3B73B9; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAABoMT8aAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpERkFDNTFBMjMwREYxMUUxQTA3RjlDQkNDQzY3MkI4MCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpERkFDNTFBMTMwREYxMUUxQTA3RjlDQkNDQzY3MkI4MCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjKftvwAAAFqSURBVHja5NTNKwVRHMbxey9X3rrXStlY2ljJRiQLGytLIkUpIks7lIUFC9laCX+DhUiSlMRdsFBSdkqSt4u8ju+vnqkxZriZheTUp1NzzvxmzjnPTNxxnFiUlohFbL9fIL9xeOUf7EEiSgEbf8XUTwv04A59mIuyB2VowyqKvytQjkU8YwaFul6CJmQ+5MB38zSGUIAs8vCi3loc6bA3mECvJl2o0Jhn/B47qAorMIgU9lGJBc/YDZbQgNugAt1I4gGtepq1ZTxiHu2B34L6LpRiD6ee8UPUqfe2lPbl0i1Qoz4T8JCgm89hf6IKdwnX6tM5ZGIEb1py1i2wporNORToUDa2LStugVntdPKr3GvMUnmFUe8p2No3FNOBkCIWsn7NOcC6Pwd2EicoUiZsnVvYxZNutpM601F/CpIFpNazH5bIel1LqOAmqrWEwG/BirQorp3KgL3yMSZxFBYkf7OJ43/jp/ouwAB8JktCUeXXIAAAAABJRU5ErkJggg==') center right no-repeat; } h2, p { padding: 10px 0 10px 0; margin:0; font-size:1.3em; } p { padding-top:0; font-size:small; color:#7B7979; line-height:1.6em; } h2#qunit-banner { height: 16px; padding:5px 5px 5px 25px; line-height:16px; margin:0px 0 15px 0; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; background-position:0px; background-repeat:no-repeat; font-size:1em; font-weight:normal; } h2#qunit-banner.qunit-pass { background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc1RjgyNEY5MzE2NzExRTFCQTA0RTIzMEVFNkY4ODM2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc1RjgyNEZBMzE2NzExRTFCQTA0RTIzMEVFNkY4ODM2Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzVGODI0RjczMTY3MTFFMUJBMDRFMjMwRUU2Rjg4MzYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzVGODI0RjgzMTY3MTFFMUJBMDRFMjMwRUU2Rjg4MzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4C94F5AAAAwklEQVR42mL8//8/AyWAiYFCQLEBLOW7GEnVYwzEaUC8B4hXs5CoWRCIVwGxEtQQE1K9ANMMN5AUAzqA2AWJ/x6IzxJrAMi55WhiriBDYAYoEQi0DjSxdJDtsGgESd4F4jNYDAIF2m4oDQOzoBieDsqRbDoDpWEAXfMeqO0oCWkPmo1noH6eiWbYPSAOw5YSQYKr0cRnQg1BDvEwKI1hAEyyAk9AVsACDV9e6MRhSydyoBHKTKuh8bsHSTM+lzEABBgAXD0oIFydPtEAAAAASUVORK5CYII='); color:#76B900; } h2#qunit-banner.qunit-pass:after { content:'Congrats! All of your tests passed!'; } h2#qunit-banner.qunit-fail { background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjU5QUIzNEU2MzE2NzExRTE4ODc3OEVFNEY2NzhDMjM4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjU5QUIzNEU3MzE2NzExRTE4ODc3OEVFNEY2NzhDMjM4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTlBQjM0RTQzMTY3MTFFMTg4Nzc4RUU0RjY3OEMyMzgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTlBQjM0RTUzMTY3MTFFMTg4Nzc4RUU0RjY3OEMyMzgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz46NEjgAAAAzElEQVR42mL8//8/AyWABUS8N1EFUS5AfA+KcQFBIE6DsjsFz9yGGAAEu6EGgEA6EM/CoRmkzhiJX8EE5bggKZyJZAsuzQwwNhMOp6IbsgpNM9jn8DCAOnsmFkNgNrlg0dyJbMAsNE0MOPgwza5AfBbdC7OgLsEHUDRjCwNChqBoxhWIxngMQI8dDAPKsSlCM2AmLgNAkh04/I3TECZcJiNFrys+Q2AGhOLQPAsaaLgMwZkS0fMDLkPgBqzGoxnZEBMg3gM1CBzdAAEGABpTMr+umvCXAAAAAElFTkSuQmCC'); color:#ee3324; } h2#qunit-banner.qunit-fail:after { content:'Oops! One or more tests failed!'; } /** Test Runner Result Styles */ #qunit-testrunner-toolbar { position:absolute; top:55px; right:20px; color:#6BC9ED; font-size:14px; } #qunit-testrunner-toolbar:after { content:' }'; } h2#qunit-userAgent { padding: 0; color: #7B7979; border:0; font-size:small; font-family: Arial, 'sans-serif'; font-weight:normal; font-style:italic; } h2#qunit-userAgent:before { content:'User Agents: '; } /** Tests: Pass/Fail */ #qunit-tests { list-style-position: inside; list-style-type:none; } #qunit-tests li { padding: 4px 10px; list-style-position:outside; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; margin-bottom:5px; position:relative; *zoom:1; list-style-type:none; } #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { display: none; } #qunit-tests li strong { cursor: pointer; } #qunit-tests li a { display:block; position:absolute; right:10px; padding:0px 16px 0 0; font-size:0.8em; background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAYCAYAAADOMhxqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENEZDRDdDQTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENEZDRDdDOTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MDRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpE8SAQAAAD3SURBVHjaYsw5+YYBC5gGxN+BuBhdgoUBO1AFYlMgFgXiOGQJJjSFrEDcC8RaQMwPxEFAvBuXDSDFP6D4F1SMG4gtgFgBiB+g2/ATiL8C8UIgPgMV+wvEujDFyBoWQRVPB+IsqOa3QCyFrBhZgysQMwLxFCjfB4hFgPgVlH8DiOcha/jHgBu0ALEMEH9G1rAXqikHi4ZkIP4DxEuQNaQBMReUngjEdkAcDPU8KKROAPFp5GAFBSUPNHZToZEFM+wsEHtgiziQJmYg7gPiy0B8HIiTgNgRX0yD/FFzYdXZK0B8Fchei5GWgBI40xJQbjQtjdi0BBBgAAsUYVWmfe1CAAAAAElFTkSuQmCC') bottom right no-repeat; color: #3b73b9; text-decoration: none; height:12px; top:5px; } #qunit-tests li a:hover, #qunit-tests li a:focus { color: #6bc9ed; background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAYCAYAAADOMhxqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENEZDRDdDQTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENEZDRDdDOTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MDRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpE8SAQAAAD3SURBVHjaYsw5+YYBC5gGxN+BuBhdgoUBO1AFYlMgFgXiOGQJJjSFrEDcC8RaQMwPxEFAvBuXDSDFP6D4F1SMG4gtgFgBiB+g2/ATiL8C8UIgPgMV+wvEujDFyBoWQRVPB+IsqOa3QCyFrBhZgysQMwLxFCjfB4hFgPgVlH8DiOcha/jHgBu0ALEMEH9G1rAXqikHi4ZkIP4DxEuQNaQBMReUngjEdkAcDPU8KKROAPFp5GAFBSUPNHZToZEFM+wsEHtgiziQJmYg7gPiy0B8HIiTgNgRX0yD/FFzYdXZK0B8Fchei5GWgBI40xJQbjQtjdi0BBBgAAsUYVWmfe1CAAAAAElFTkSuQmCC') top right no-repeat; } #qunit-tests li.pass strong > span {color:#76B900;} #qunit-tests li.pass strong:first-child { padding-left:20px; background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODgyNDY5QzMxN0ExMUUxOTdFMkVCQkNENjFBMjc3RSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODgyNDY5QjMxN0ExMUUxOTdFMkVCQkNENjFBMjc3RSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv7qI08AAAClSURBVHjaYvz//z8DKYClfBcjMeqUgFgQiM+yEKEYpHA3VFMYExEaVkEVg20ipKEDiF2g7LNAPIsJaqUgFsVpQFwOZb8H4nQQzQR13zuoAhgwhpoOA2FQGxiYkNw3E4phnoTZWgHEe2A6maC63yM54y6S4llA3InsTiaobhOYlUiKz0JNZ0DXAAL3gNgViFcjeRLZZkRMI7FhioyhBrzHFs4AAQYAz08iXvWgossAAAAASUVORK5CYII=') center left no-repeat; } #qunit-tests li.fail strong > span {color:#EE3324;} #qunit-tests li.fail strong:first-child { padding-left:20px; background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0MzNBNEM0QzMxN0ExMUUxQjk0MUYyOEJCODA0OTM1OSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MzNBNEM0QjMxN0ExMUUxQjk0MUYyOEJCODA0OTM1OSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PnO7dSIAAACtSURBVHjaYnxnrMIABEpA/B6K0YEgEBsD8VnBM7ffM0E5d6HYGIvi3UiYgQkqiCyJrAmZbwzTcBaKYZrOAHEaEM9E05wOIlig7nZFM20mmtM6gXgWzAYGJE1nsXgapLACxmFCkniPQwOKGLKGmVC3owMUcZiGDjTFs9BMhmuCxUM5muJ0qJ9Wo2lCcRII7IEFH9RPYbDQgaUCFqjVYdDkMQuLH9Khau6BOAABBgDmhyuetyQ3ywAAAABJRU5ErkJggg==') center left no-repeat; } #qunit-tests li ol { margin:0; padding:10px 0 0 0; background-color: #fff; } #qunit-tests li ol li { list-style-position: inside; list-style-type:decimal; *list-style-position: outside; } #qunit-tests table { border-collapse: collapse; margin-top: .2em; } #qunit-tests th { text-align: right; vertical-align: top; padding: 0 .5em 0 0; } #qunit-tests td { vertical-align: top; } #qunit-tests pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; } #qunit-tests del { background-color: #add566; color: #555; text-decoration: none; } #qunit-tests ins { background-color: #f5857c; color: #555; text-decoration: none; } /*** Test Counts */ #qunit-tests b.counts { color: #7B7979; font-size:0.8em; margin-left:10px; } b.counts b.passed, b.counts b.failed { display:inline-block; padding:0px 1px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; color:#FFF; } b.counts b.passed { background:#76b900; } b.counts b.failed { background:#ee3324; } #qunit-tests li li { margin:0 0 5px; padding: 0.4em 0.5em 0.4em 0.5em; background-color: #fff; border-bottom: none; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; overflow:auto; } /*** Passing Styles */ #qunit-tests li li.pass { color: #7B7979; background-color: #fff; border-left: 20px solid #76B900; } #qunit-tests .pass { color: #76B900; background-color: #FFF; border: 1px solid #add566; } #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } /*** Failing Styles */ #qunit-tests li.fail ol { background:#f7f7f7; } #qunit-tests li li.fail { color: #7B7979; background-color: #fff; border-left: 20px solid #EE3324; white-space: pre; } #qunit-tests .fail { color: #EE3324; border: 1px solid #f5857c; background-color: #f7f7f7; } #qunit-tests .fail .test-actual, #qunit-tests .fail .test-expected { color: #999999; } /** Result */ p#qunit-testresult { padding: 10px 0; font-weight:bold; line-height:1.6em; color: #7B7979; } p#qunit-testresult span.passed, p#qunit-testresult span.failed { font-size:1.5em; font-weight:bold; display:inline-block; padding:3px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } p#qunit-testresult span.passed { color:#FFF; background:#76b900 } p#qunit-testresult span.failed { color:#FFF; background:#ee3324; } /** Fixture */ #qunit-fixture { position: absolute; top: -10000px; left: -10000px; width: 1000px; height: 1000px; } node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/themes/gabe.html000066400000000000000000000007061240302775300310560ustar00rootroot00000000000000 QUnit Test Suite - Gabe Theme
test markup
node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/themes/nv.css000066400000000000000000000073501240302775300304310ustar00rootroot00000000000000/** * QUnit Theme by NV * * http://docs.jquery.com/QUnit * * Copyright 2012 jQuery Foundation and other contributors * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ /** Font Family and Sizes */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { font-family: "Helvetica Neue", Helvetica, sans-serif; } #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } /** Resets */ #qunit-wrapper, #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { margin: 0; padding: 0; } /** Header */ #qunit-header { font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Helvetica, sans-serif; padding: 0.5em 0 0.5em 1.3em; color: #8699a4; background-color: #0d3349; font-size: 1.5em; line-height: 1em; font-weight: normal; } #qunit-header a { text-decoration: none; color: #c2ccd1; } #qunit-header a:hover, #qunit-header a:focus { color: #fff; } #qunit-header label { display: inline-block; } #qunit-banner.qunit-pass { height: 3px; } #qunit-banner.qunit-fail { height: 5px; } #qunit-testrunner-toolbar { padding: 0 0 0.5em 2em; } #qunit-testrunner-toolbar label { margin-right: 1em; } #qunit-userAgent { padding: 0.5em 0 0.5em 2.5em; font-weight: normal; color: #666; } /** Tests: Pass/Fail */ #qunit-tests { list-style-type: none; background-color: #D2E0E6; } #qunit-tests li { padding: 0.4em 0.5em 0.4em 2.5em; } #qunit-tests li strong { font-weight: normal; cursor: pointer; } #qunit-tests ol { margin: 0.5em 0 1em; background-color: #fff; } #qunit-tests table { border-collapse: collapse; margin-top: .2em; } #qunit-tests th { text-align: right; vertical-align: top; padding: 0 .5em 0 0; } #qunit-tests td { vertical-align: top; } #qunit-tests pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; } #qunit-tests del { background-color: #e0f2be; color: #374e0c; text-decoration: none; } #qunit-tests ins { background-color: #ffcaca; color: #500; text-decoration: none; } /*** Test Counts */ #qunit-tests b.passed { color: #5E740B; } #qunit-tests b.failed { color: #710909; } #qunit-tests li.fail .failed { color: #E48989; } #qunit-tests li.fail .passed { color: #E3C987; } #qunit-tests li li { margin-left: 2.5em; padding: 0.7em 0.5em 0.7em 0; background-color: #fff; border-bottom: none; } #qunit-tests b.counts { font-weight: normal; } /*** Passing Styles */ #qunit-tests li li.pass { color: #5E740B; background-color: #fff; } #qunit-tests .pass { color: #2f3424; background-color: #d9dec3; } #qunit-tests .pass .module-name { color: #636b51; } #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } #qunit-banner.qunit-pass { background-color: #C6E746; } /*** Failing Styles */ #qunit-tests li li.fail { color: #710909; background-color: #fff; } #qunit-tests .fail { color: #fff; background-color: #962323; } #qunit-tests .fail .module-name, #qunit-tests .fail .counts { color: #DEC1C1; } #qunit-tests .fail .test-actual { color: #B72F2F; } #qunit-tests .fail .test-expected { color: green; } #qunit-banner.qunit-fail, #qunit-testrunner-toolbar { color: #dec1c1; background-color: #962323; } /** Footer */ #qunit-testresult { padding: 0.5em 0.5em 0.5em 2.5em; color: #333; } #qunit-testresult .module-name { font-weight: bold; } /** Fixture */ #qunit-fixture { position: absolute; top: -10000px; left: -10000px; width: 1000px; height: 1000px; } node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/addons/themes/nv.html000066400000000000000000000007021240302775300305770ustar00rootroot00000000000000 QUnit Test Suite - NV Theme
test markup
node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/grunt.js000066400000000000000000000037611240302775300262360ustar00rootroot00000000000000/*global config:true, task:true*/ module.exports = function( grunt ) { grunt.loadNpmTasks( "grunt-git-authors" ); grunt.initConfig({ pkg: '', qunit: { // TODO include 'test/logs.html' as well qunit: 'test/index.html', addons: [ 'addons/canvas/canvas.html', 'addons/close-enough/close-enough.html', 'addons/composite/composite-demo-test.html' ] }, lint: { qunit: 'qunit/qunit.js', // addons: 'addons/**/*.js', grunt: 'grunt.js' // TODO need to figure out which warnings to fix and which to disable // tests: 'test/test.js' }, jshint: { qunit: { options: { onevar: true, browser: true, bitwise: true, curly: true, trailing: true, immed: true, latedef: false, newcap: true, noarg: false, noempty: true, nonew: true, sub: true, undef: true, eqnull: true, proto: true, smarttabs: true }, globals: { jQuery: true, exports: true } }, addons: { options: { browser: true, curly: true, eqnull: true, eqeqeq: true, expr: true, evil: true, jquery: true, latedef: true, noarg: true, onevar: true, smarttabs: true, trailing: true, undef: true }, globals: { module: true, test: true, asyncTest: true, expect: true, start: true, stop: true, QUnit: true } }, tests: { } } }); grunt.registerTask( "testswarm", function( commit, configFile ) { var testswarm = require( "testswarm" ), config = grunt.file.readJSON( configFile ).qunit; testswarm({ url: config.swarmUrl, pollInterval: 10000, done: this.async() }, { authUsername: "qunit", authToken: config.authToken, jobName: 'QUnit commit #' + commit.substr( 0, 10 ) + '', runMax: config.runMax, "runNames[]": "QUnit", "runUrls[]": config.testUrl + commit + "/test/index.html", "browserSets[]": ["popular"] }); }); grunt.registerTask('default', 'lint qunit'); }; node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/package.json000066400000000000000000000015121240302775300270170ustar00rootroot00000000000000{ "name": "qunitjs", "title": "QUnit", "description": "An easy-to-use JavaScript Unit Testing framework.", "version": "1.10.0pre", "author": "The jQuery Project", "contributors": [ "John Resig (http://ejohn.org/)", "Jörn Zaefferer (http://bassistance.de/)" ], "homepage": "http://docs.jquery.com/QUnit", "repository": { "type": "git", "url": "git://github.com/jquery/qunit.git" }, "bugs": { "url": "https://github.com/jquery/qunit/issues" }, "license": { "name": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" }, "keywords": [ "testing", "unit", "jquery" ], "main": "qunit/qunit.js", "devDependencies": { "grunt": "0.3.x", "grunt-git-authors": "1.0.0", "testswarm": "0.2.2" } } node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/qunit/000077500000000000000000000000001240302775300256725ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/qunit/qunit.css000066400000000000000000000106551240302775300275530ustar00rootroot00000000000000/** * QUnit v1.10.0pre - A JavaScript Unit Testing Framework * * http://docs.jquery.com/QUnit * * Copyright 2012 jQuery Foundation and other contributors * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ /** Font Family and Sizes */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; } #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } /** Resets */ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { margin: 0; padding: 0; } /** Header */ #qunit-header { padding: 0.5em 0 0.5em 1em; color: #8699a4; background-color: #0d3349; font-size: 1.5em; line-height: 1em; font-weight: normal; border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px; } #qunit-header a { text-decoration: none; color: #c2ccd1; } #qunit-header a:hover, #qunit-header a:focus { color: #fff; } #qunit-testrunner-toolbar label { display: inline-block; padding: 0 .5em 0 .1em; } #qunit-banner { height: 5px; } #qunit-testrunner-toolbar { padding: 0.5em 0 0.5em 2em; color: #5E740B; background-color: #eee; } #qunit-userAgent { padding: 0.5em 0 0.5em 2.5em; background-color: #2b81af; color: #fff; text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; } /** Tests: Pass/Fail */ #qunit-tests { list-style-position: inside; } #qunit-tests li { padding: 0.4em 0.5em 0.4em 2.5em; border-bottom: 1px solid #fff; list-style-position: inside; } #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { display: none; } #qunit-tests li strong { cursor: pointer; } #qunit-tests li a { padding: 0.5em; color: #c2ccd1; text-decoration: none; } #qunit-tests li a:hover, #qunit-tests li a:focus { color: #000; } #qunit-tests ol { margin-top: 0.5em; padding: 0.5em; background-color: #fff; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } #qunit-tests table { border-collapse: collapse; margin-top: .2em; } #qunit-tests th { text-align: right; vertical-align: top; padding: 0 .5em 0 0; } #qunit-tests td { vertical-align: top; } #qunit-tests pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; } #qunit-tests del { background-color: #e0f2be; color: #374e0c; text-decoration: none; } #qunit-tests ins { background-color: #ffcaca; color: #500; text-decoration: none; } /*** Test Counts */ #qunit-tests b.counts { color: black; } #qunit-tests b.passed { color: #5E740B; } #qunit-tests b.failed { color: #710909; } #qunit-tests li li { padding: 5px; background-color: #fff; border-bottom: none; list-style-position: inside; } /*** Passing Styles */ #qunit-tests li li.pass { color: #3c510c; background-color: #fff; border-left: 10px solid #C6E746; } #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } #qunit-tests .pass .test-name { color: #366097; } #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } #qunit-banner.qunit-pass { background-color: #C6E746; } /*** Failing Styles */ #qunit-tests li li.fail { color: #710909; background-color: #fff; border-left: 10px solid #EE5757; white-space: pre; } #qunit-tests > li:last-child { border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px; } #qunit-tests .fail { color: #000000; background-color: #EE5757; } #qunit-tests .fail .test-name, #qunit-tests .fail .module-name { color: #000000; } #qunit-tests .fail .test-actual { color: #EE5757; } #qunit-tests .fail .test-expected { color: green; } #qunit-banner.qunit-fail { background-color: #EE5757; } /** Result */ #qunit-testresult { padding: 0.5em 0.5em 0.5em 2.5em; color: #2b81af; background-color: #D2E0E6; border-bottom: 1px solid white; } #qunit-testresult .module-name { font-weight: bold; } /** Fixture */ #qunit-fixture { position: absolute; top: -10000px; left: -10000px; width: 1000px; height: 1000px; } node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/qunit/qunit.js000066400000000000000000001416771240302775300274100ustar00rootroot00000000000000/** * QUnit v1.10.0pre - A JavaScript Unit Testing Framework * * http://docs.jquery.com/QUnit * * Copyright 2012 jQuery Foundation and other contributors * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license */ (function( window ) { var QUnit, config, onErrorFnPrev, testId = 0, fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""), toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty, // Keep a local reference to Date (GH-283) Date = window.Date, defined = { setTimeout: typeof window.setTimeout !== "undefined", sessionStorage: (function() { var x = "qunit-test-string"; try { sessionStorage.setItem( x, x ); sessionStorage.removeItem( x ); return true; } catch( e ) { return false; } }()) }; function Test( settings ) { extend( this, settings ); this.assertions = []; this.testNumber = ++Test.count; } Test.count = 0; Test.prototype = { init: function() { var a, b, li, tests = id( "qunit-tests" ); if ( tests ) { b = document.createElement( "strong" ); b.innerHTML = this.name; // `a` initialized at top of scope a = document.createElement( "a" ); a.innerHTML = "Rerun"; a.href = QUnit.url({ testNumber: this.testNumber }); li = document.createElement( "li" ); li.appendChild( b ); li.appendChild( a ); li.className = "running"; li.id = this.id = "qunit-test-output" + testId++; tests.appendChild( li ); } }, setup: function() { if ( this.module !== config.previousModule ) { if ( config.previousModule ) { runLoggingCallbacks( "moduleDone", QUnit, { name: config.previousModule, failed: config.moduleStats.bad, passed: config.moduleStats.all - config.moduleStats.bad, total: config.moduleStats.all }); } config.previousModule = this.module; config.moduleStats = { all: 0, bad: 0 }; runLoggingCallbacks( "moduleStart", QUnit, { name: this.module }); } else if ( config.autorun ) { runLoggingCallbacks( "moduleStart", QUnit, { name: this.module }); } config.current = this; this.testEnvironment = extend({ setup: function() {}, teardown: function() {} }, this.moduleTestEnvironment ); runLoggingCallbacks( "testStart", QUnit, { name: this.testName, module: this.module }); // allow utility functions to access the current test environment // TODO why?? QUnit.current_testEnvironment = this.testEnvironment; if ( !config.pollution ) { saveGlobal(); } if ( config.notrycatch ) { this.testEnvironment.setup.call( this.testEnvironment ); return; } try { this.testEnvironment.setup.call( this.testEnvironment ); } catch( e ) { QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); } }, run: function() { config.current = this; var running = id( "qunit-testresult" ); if ( running ) { running.innerHTML = "Running:
" + this.name; } if ( this.async ) { QUnit.stop(); } if ( config.notrycatch ) { this.callback.call( this.testEnvironment, QUnit.assert ); return; } try { this.callback.call( this.testEnvironment, QUnit.assert ); } catch( e ) { QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + e.message, extractStacktrace( e, 0 ) ); // else next test will carry the responsibility saveGlobal(); // Restart the tests if they're blocking if ( config.blocking ) { QUnit.start(); } } }, teardown: function() { config.current = this; if ( config.notrycatch ) { this.testEnvironment.teardown.call( this.testEnvironment ); return; } else { try { this.testEnvironment.teardown.call( this.testEnvironment ); } catch( e ) { QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); } } checkPollution(); }, finish: function() { config.current = this; if ( config.requireExpects && this.expected == null ) { QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack ); } else if ( this.expected != null && this.expected != this.assertions.length ) { QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack ); } else if ( this.expected == null && !this.assertions.length ) { QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack ); } var assertion, a, b, i, li, ol, test = this, good = 0, bad = 0, tests = id( "qunit-tests" ); config.stats.all += this.assertions.length; config.moduleStats.all += this.assertions.length; if ( tests ) { ol = document.createElement( "ol" ); for ( i = 0; i < this.assertions.length; i++ ) { assertion = this.assertions[i]; li = document.createElement( "li" ); li.className = assertion.result ? "pass" : "fail"; li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" ); ol.appendChild( li ); if ( assertion.result ) { good++; } else { bad++; config.stats.bad++; config.moduleStats.bad++; } } // store result when possible if ( QUnit.config.reorder && defined.sessionStorage ) { if ( bad ) { sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad ); } else { sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName ); } } if ( bad === 0 ) { ol.style.display = "none"; } // `b` initialized at top of scope b = document.createElement( "strong" ); b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; addEvent(b, "click", function() { var next = b.nextSibling.nextSibling, display = next.style.display; next.style.display = display === "none" ? "block" : "none"; }); addEvent(b, "dblclick", function( e ) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { target = target.parentNode; } if ( window.location && target.nodeName.toLowerCase() === "strong" ) { window.location = QUnit.url({ testNumber: test.testNumber }); } }); // `li` initialized at top of scope li = id( this.id ); li.className = bad ? "fail" : "pass"; li.removeChild( li.firstChild ); a = li.firstChild; li.appendChild( b ); li.appendChild ( a ); li.appendChild( ol ); } else { for ( i = 0; i < this.assertions.length; i++ ) { if ( !this.assertions[i].result ) { bad++; config.stats.bad++; config.moduleStats.bad++; } } } runLoggingCallbacks( "testDone", QUnit, { name: this.testName, module: this.module, failed: bad, passed: this.assertions.length - bad, total: this.assertions.length }); QUnit.reset(); config.current = undefined; }, queue: function() { var bad, test = this; synchronize(function() { test.init(); }); function run() { // each of these can by async synchronize(function() { test.setup(); }); synchronize(function() { test.run(); }); synchronize(function() { test.teardown(); }); synchronize(function() { test.finish(); }); } // `bad` initialized at top of scope // defer when previous test run passed, if storage is available bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName ); if ( bad ) { run(); } else { synchronize( run, true ); } } }; // Root QUnit object. // `QUnit` initialized at top of scope QUnit = { // call on start of module test to prepend name to all tests module: function( name, testEnvironment ) { config.currentModule = name; config.currentModuleTestEnviroment = testEnvironment; }, asyncTest: function( testName, expected, callback ) { if ( arguments.length === 2 ) { callback = expected; expected = null; } QUnit.test( testName, expected, callback, true ); }, test: function( testName, expected, callback, async ) { var test, name = "" + escapeInnerText( testName ) + ""; if ( arguments.length === 2 ) { callback = expected; expected = null; } if ( config.currentModule ) { name = "" + config.currentModule + ": " + name; } test = new Test({ name: name, testName: testName, expected: expected, async: async, callback: callback, module: config.currentModule, moduleTestEnvironment: config.currentModuleTestEnviroment, stack: sourceFromStacktrace( 2 ) }); if ( !validTest( test ) ) { return; } test.queue(); }, // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. expect: function( asserts ) { config.current.expected = asserts; }, start: function( count ) { config.semaphore -= count || 1; // don't start until equal number of stop-calls if ( config.semaphore > 0 ) { return; } // ignore if start is called more often then stop if ( config.semaphore < 0 ) { config.semaphore = 0; } // A slight delay, to avoid any current callbacks if ( defined.setTimeout ) { window.setTimeout(function() { if ( config.semaphore > 0 ) { return; } if ( config.timeout ) { clearTimeout( config.timeout ); } config.blocking = false; process( true ); }, 13); } else { config.blocking = false; process( true ); } }, stop: function( count ) { config.semaphore += count || 1; config.blocking = true; if ( config.testTimeout && defined.setTimeout ) { clearTimeout( config.timeout ); config.timeout = window.setTimeout(function() { QUnit.ok( false, "Test timed out" ); config.semaphore = 1; QUnit.start(); }, config.testTimeout ); } } }; // Asssert helpers // All of these must call either QUnit.push() or manually do: // - runLoggingCallbacks( "log", .. ); // - config.current.assertions.push({ .. }); QUnit.assert = { /** * Asserts rough true-ish result. * @name ok * @function * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); */ ok: function( result, msg ) { if ( !config.current ) { throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) ); } result = !!result; var source, details = { result: result, message: msg }; msg = escapeInnerText( msg || (result ? "okay" : "failed" ) ); msg = "" + msg + ""; if ( !result ) { source = sourceFromStacktrace( 2 ); if ( source ) { details.source = source; msg += "
Source:
" + escapeInnerText( source ) + "
"; } } runLoggingCallbacks( "log", QUnit, details ); config.current.assertions.push({ result: result, message: msg }); }, /** * Assert that the first two arguments are equal, with an optional message. * Prints out both actual and expected values. * @name equal * @function * @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" ); */ equal: function( actual, expected, message ) { QUnit.push( expected == actual, actual, expected, message ); }, /** * @name notEqual * @function */ notEqual: function( actual, expected, message ) { QUnit.push( expected != actual, actual, expected, message ); }, /** * @name deepEqual * @function */ deepEqual: function( actual, expected, message ) { QUnit.push( QUnit.equiv(actual, expected), actual, expected, message ); }, /** * @name notDeepEqual * @function */ notDeepEqual: function( actual, expected, message ) { QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message ); }, /** * @name strictEqual * @function */ strictEqual: function( actual, expected, message ) { QUnit.push( expected === actual, actual, expected, message ); }, /** * @name notStrictEqual * @function */ notStrictEqual: function( actual, expected, message ) { QUnit.push( expected !== actual, actual, expected, message ); }, throws: function( block, expected, message ) { var actual, ok = false; // 'expected' is optional if ( typeof expected === "string" ) { message = expected; expected = null; } config.current.ignoreGlobalErrors = true; try { block.call( config.current.testEnvironment ); } catch (e) { actual = e; } config.current.ignoreGlobalErrors = false; if ( actual ) { // we don't want to validate thrown error if ( !expected ) { ok = true; // expected is a regexp } else if ( QUnit.objectType( expected ) === "regexp" ) { ok = expected.test( actual ); // expected is a constructor } else if ( actual instanceof expected ) { ok = true; // expected is a validation function which returns true is validation passed } else if ( expected.call( {}, actual ) === true ) { ok = true; } QUnit.push( ok, actual, null, message ); } else { QUnit.pushFailure( message, null, 'No exception was thrown.' ); } } }; /** * @deprecate since 1.8.0 * Kept assertion helpers in root for backwards compatibility */ extend( QUnit, QUnit.assert ); /** * @deprecated since 1.9.0 * Kept global "raises()" for backwards compatibility */ QUnit.raises = QUnit.assert.throws; /** * @deprecated since 1.0.0, replaced with error pushes since 1.3.0 * Kept to avoid TypeErrors for undefined methods. */ QUnit.equals = function() { QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" ); }; QUnit.same = function() { QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" ); }; // We want access to the constructor's prototype (function() { function F() {} F.prototype = QUnit; QUnit = new F(); // Make F QUnit's constructor so that we can add to the prototype later QUnit.constructor = F; }()); /** * Config object: Maintain internal state * Later exposed as QUnit.config * `config` initialized at top of scope */ config = { // The queue of tests to run queue: [], // block until document ready blocking: true, // when enabled, show only failing tests // gets persisted through sessionStorage and can be changed in UI via checkbox hidepassed: false, // by default, run previously failed tests first // very useful in combination with "Hide passed tests" checked reorder: true, // by default, modify document.title when suite is done altertitle: true, // when enabled, all tests must call expect() requireExpects: false, // add checkboxes that are persisted in the query-string // when enabled, the id is set to `true` as a `QUnit.config` property urlConfig: [ { id: "noglobals", label: "Check for Globals", tooltip: "Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings." }, { id: "notrycatch", label: "No try-catch", tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings." } ], // logging callback queues begin: [], done: [], log: [], testStart: [], testDone: [], moduleStart: [], moduleDone: [] }; // Initialize more QUnit.config and QUnit.urlParams (function() { var i, location = window.location || { search: "", protocol: "file:" }, params = location.search.slice( 1 ).split( "&" ), length = params.length, urlParams = {}, current; if ( params[ 0 ] ) { for ( i = 0; i < length; i++ ) { current = params[ i ].split( "=" ); current[ 0 ] = decodeURIComponent( current[ 0 ] ); // allow just a key to turn on a flag, e.g., test.html?noglobals current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; urlParams[ current[ 0 ] ] = current[ 1 ]; } } QUnit.urlParams = urlParams; // String search anywhere in moduleName+testName config.filter = urlParams.filter; // Exact match of the module name config.module = urlParams.module; config.testNumber = parseInt( urlParams.testNumber, 10 ) || null; // Figure out if we're running the tests from a server or not QUnit.isLocal = location.protocol === "file:"; }()); // Export global variables, unless an 'exports' object exists, // in that case we assume we're in CommonJS (dealt with on the bottom of the script) if ( typeof exports === "undefined" ) { extend( window, QUnit ); // Expose QUnit object window.QUnit = QUnit; } // Extend QUnit object, // these after set here because they should not be exposed as global functions extend( QUnit, { config: config, // Initialize the configuration options init: function() { extend( config, { stats: { all: 0, bad: 0 }, moduleStats: { all: 0, bad: 0 }, started: +new Date(), updateRate: 1000, blocking: false, autostart: true, autorun: false, filter: "", queue: [], semaphore: 0 }); var tests, banner, result, qunit = id( "qunit" ); if ( qunit ) { qunit.innerHTML = "

" + escapeInnerText( document.title ) + "

" + "

" + "
" + "

" + "
    "; } tests = id( "qunit-tests" ); banner = id( "qunit-banner" ); result = id( "qunit-testresult" ); if ( tests ) { tests.innerHTML = ""; } if ( banner ) { banner.className = ""; } if ( result ) { result.parentNode.removeChild( result ); } if ( tests ) { result = document.createElement( "p" ); result.id = "qunit-testresult"; result.className = "result"; tests.parentNode.insertBefore( result, tests ); result.innerHTML = "Running...
     "; } }, // Resets the test setup. Useful for tests that modify the DOM. // If jQuery is available, uses jQuery's html(), otherwise just innerHTML. reset: function() { var fixture; if ( window.jQuery ) { jQuery( "#qunit-fixture" ).html( config.fixture ); } else { fixture = id( "qunit-fixture" ); if ( fixture ) { fixture.innerHTML = config.fixture; } } }, // Trigger an event on an element. // @example triggerEvent( document.body, "click" ); triggerEvent: function( elem, type, event ) { if ( document.createEvent ) { event = document.createEvent( "MouseEvents" ); event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null); elem.dispatchEvent( event ); } else if ( elem.fireEvent ) { elem.fireEvent( "on" + type ); } }, // Safe object type checking is: function( type, obj ) { return QUnit.objectType( obj ) == type; }, objectType: function( obj ) { if ( typeof obj === "undefined" ) { return "undefined"; // consider: typeof null === object } if ( obj === null ) { return "null"; } var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || ""; switch ( type ) { case "Number": if ( isNaN(obj) ) { return "nan"; } return "number"; case "String": case "Boolean": case "Array": case "Date": case "RegExp": case "Function": return type.toLowerCase(); } if ( typeof obj === "object" ) { return "object"; } return undefined; }, push: function( result, actual, expected, message ) { if ( !config.current ) { throw new Error( "assertion outside test context, was " + sourceFromStacktrace() ); } var output, source, details = { result: result, message: message, actual: actual, expected: expected }; message = escapeInnerText( message ) || ( result ? "okay" : "failed" ); message = "" + message + ""; output = message; if ( !result ) { expected = escapeInnerText( QUnit.jsDump.parse(expected) ); actual = escapeInnerText( QUnit.jsDump.parse(actual) ); output += ""; if ( actual != expected ) { output += ""; output += ""; } source = sourceFromStacktrace(); if ( source ) { details.source = source; output += ""; } output += "
    Expected:
    " + expected + "
    Result:
    " + actual + "
    Diff:
    " + QUnit.diff( expected, actual ) + "
    Source:
    " + escapeInnerText( source ) + "
    "; } runLoggingCallbacks( "log", QUnit, details ); config.current.assertions.push({ result: !!result, message: output }); }, pushFailure: function( message, source, actual ) { if ( !config.current ) { throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) ); } var output, details = { result: false, message: message }; message = escapeInnerText( message ) || "error"; message = "" + message + ""; output = message; output += ""; if ( actual ) { output += ""; } if ( source ) { details.source = source; output += ""; } output += "
    Result:
    " + escapeInnerText( actual ) + "
    Source:
    " + escapeInnerText( source ) + "
    "; runLoggingCallbacks( "log", QUnit, details ); config.current.assertions.push({ result: false, message: output }); }, url: function( params ) { params = extend( extend( {}, QUnit.urlParams ), params ); var key, querystring = "?"; for ( key in params ) { if ( !hasOwn.call( params, key ) ) { continue; } querystring += encodeURIComponent( key ) + "=" + encodeURIComponent( params[ key ] ) + "&"; } return window.location.pathname + querystring.slice( 0, -1 ); }, extend: extend, id: id, addEvent: addEvent // load, equiv, jsDump, diff: Attached later }); /** * @deprecated: Created for backwards compatibility with test runner that set the hook function * into QUnit.{hook}, instead of invoking it and passing the hook function. * QUnit.constructor is set to the empty F() above so that we can add to it's prototype here. * Doing this allows us to tell if the following methods have been overwritten on the actual * QUnit object. */ extend( QUnit.constructor.prototype, { // Logging callbacks; all receive a single argument with the listed properties // run test/logs.html for any related changes begin: registerLoggingCallback( "begin" ), // done: { failed, passed, total, runtime } done: registerLoggingCallback( "done" ), // log: { result, actual, expected, message } log: registerLoggingCallback( "log" ), // testStart: { name } testStart: registerLoggingCallback( "testStart" ), // testDone: { name, failed, passed, total } testDone: registerLoggingCallback( "testDone" ), // moduleStart: { name } moduleStart: registerLoggingCallback( "moduleStart" ), // moduleDone: { name, failed, passed, total } moduleDone: registerLoggingCallback( "moduleDone" ) }); if ( typeof document === "undefined" || document.readyState === "complete" ) { config.autorun = true; } QUnit.load = function() { runLoggingCallbacks( "begin", QUnit, {} ); // Initialize the config, saving the execution queue var banner, filter, i, label, len, main, ol, toolbar, userAgent, val, urlConfigCheckboxes, urlConfigHtml = "", oldconfig = extend( {}, config ); QUnit.init(); extend(config, oldconfig); config.blocking = false; len = config.urlConfig.length; for ( i = 0; i < len; i++ ) { val = config.urlConfig[i]; if ( typeof val === "string" ) { val = { id: val, label: val, tooltip: "[no tooltip available]" }; } config[ val.id ] = QUnit.urlParams[ val.id ]; urlConfigHtml += ""; } // `userAgent` initialized at top of scope userAgent = id( "qunit-userAgent" ); if ( userAgent ) { userAgent.innerHTML = navigator.userAgent; } // `banner` initialized at top of scope banner = id( "qunit-header" ); if ( banner ) { banner.innerHTML = "" + banner.innerHTML + " "; } // `toolbar` initialized at top of scope toolbar = id( "qunit-testrunner-toolbar" ); if ( toolbar ) { // `filter` initialized at top of scope filter = document.createElement( "input" ); filter.type = "checkbox"; filter.id = "qunit-filter-pass"; addEvent( filter, "click", function() { var tmp, ol = document.getElementById( "qunit-tests" ); if ( filter.checked ) { ol.className = ol.className + " hidepass"; } else { tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; ol.className = tmp.replace( / hidepass /, " " ); } if ( defined.sessionStorage ) { if (filter.checked) { sessionStorage.setItem( "qunit-filter-passed-tests", "true" ); } else { sessionStorage.removeItem( "qunit-filter-passed-tests" ); } } }); if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) { filter.checked = true; // `ol` initialized at top of scope ol = document.getElementById( "qunit-tests" ); ol.className = ol.className + " hidepass"; } toolbar.appendChild( filter ); // `label` initialized at top of scope label = document.createElement( "label" ); label.setAttribute( "for", "qunit-filter-pass" ); label.setAttribute( "title", "Only show tests and assertons that fail. Stored in sessionStorage." ); label.innerHTML = "Hide passed tests"; toolbar.appendChild( label ); urlConfigCheckboxes = document.createElement( 'span' ); urlConfigCheckboxes.innerHTML = urlConfigHtml; addEvent( urlConfigCheckboxes, "change", function( event ) { var params = {}; params[ event.target.name ] = event.target.checked ? true : undefined; window.location = QUnit.url( params ); }); toolbar.appendChild( urlConfigCheckboxes ); } // `main` initialized at top of scope main = id( "qunit-fixture" ); if ( main ) { config.fixture = main.innerHTML; } if ( config.autostart ) { QUnit.start(); } }; addEvent( window, "load", QUnit.load ); // `onErrorFnPrev` initialized at top of scope // Preserve other handlers onErrorFnPrev = window.onerror; // Cover uncaught exceptions // Returning true will surpress the default browser handler, // returning false will let it run. window.onerror = function ( error, filePath, linerNr ) { var ret = false; if ( onErrorFnPrev ) { ret = onErrorFnPrev( error, filePath, linerNr ); } // Treat return value as window.onerror itself does, // Only do our handling if not surpressed. if ( ret !== true ) { if ( QUnit.config.current ) { if ( QUnit.config.current.ignoreGlobalErrors ) { return true; } QUnit.pushFailure( error, filePath + ":" + linerNr ); } else { QUnit.test( "global failure", function() { QUnit.pushFailure( error, filePath + ":" + linerNr ); }); } return false; } return ret; }; function done() { config.autorun = true; // Log the last module results if ( config.currentModule ) { runLoggingCallbacks( "moduleDone", QUnit, { name: config.currentModule, failed: config.moduleStats.bad, passed: config.moduleStats.all - config.moduleStats.bad, total: config.moduleStats.all }); } var i, key, banner = id( "qunit-banner" ), tests = id( "qunit-tests" ), runtime = +new Date() - config.started, passed = config.stats.all - config.stats.bad, html = [ "Tests completed in ", runtime, " milliseconds.
    ", "", passed, " tests of ", config.stats.all, " passed, ", config.stats.bad, " failed." ].join( "" ); if ( banner ) { banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" ); } if ( tests ) { id( "qunit-testresult" ).innerHTML = html; } if ( config.altertitle && typeof document !== "undefined" && document.title ) { // show ✖ for good, ✔ for bad suite result in title // use escape sequences in case file gets loaded with non-utf-8-charset document.title = [ ( config.stats.bad ? "\u2716" : "\u2714" ), document.title.replace( /^[\u2714\u2716] /i, "" ) ].join( " " ); } // clear own sessionStorage items if all tests passed if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) { // `key` & `i` initialized at top of scope for ( i = 0; i < sessionStorage.length; i++ ) { key = sessionStorage.key( i++ ); if ( key.indexOf( "qunit-test-" ) === 0 ) { sessionStorage.removeItem( key ); } } } runLoggingCallbacks( "done", QUnit, { failed: config.stats.bad, passed: passed, total: config.stats.all, runtime: runtime }); } /** @return Boolean: true if this test should be ran */ function validTest( test ) { var include, filter = config.filter && config.filter.toLowerCase(), module = config.module && config.module.toLowerCase(), fullName = (test.module + ": " + test.testName).toLowerCase(); if ( config.testNumber ) { return test.testNumber === config.testNumber; } if ( module && ( !test.module || test.module.toLowerCase() !== module ) ) { return false; } if ( !filter ) { return true; } include = filter.charAt( 0 ) !== "!"; if ( !include ) { filter = filter.slice( 1 ); } // If the filter matches, we need to honour include if ( fullName.indexOf( filter ) !== -1 ) { return include; } // Otherwise, do the opposite return !include; } // so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions) // Later Safari and IE10 are supposed to support error.stack as well // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack function extractStacktrace( e, offset ) { offset = offset === undefined ? 3 : offset; var stack, include, i, regex; if ( e.stacktrace ) { // Opera return e.stacktrace.split( "\n" )[ offset + 3 ]; } else if ( e.stack ) { // Firefox, Chrome stack = e.stack.split( "\n" ); if (/^error$/i.test( stack[0] ) ) { stack.shift(); } if ( fileName ) { include = []; for ( i = offset; i < stack.length; i++ ) { if ( stack[ i ].indexOf( fileName ) != -1 ) { break; } include.push( stack[ i ] ); } if ( include.length ) { return include.join( "\n" ); } } return stack[ offset ]; } else if ( e.sourceURL ) { // Safari, PhantomJS // hopefully one day Safari provides actual stacktraces // exclude useless self-reference for generated Error objects if ( /qunit.js$/.test( e.sourceURL ) ) { return; } // for actual exceptions, this is useful return e.sourceURL + ":" + e.line; } } function sourceFromStacktrace( offset ) { try { throw new Error(); } catch ( e ) { return extractStacktrace( e, offset ); } } function escapeInnerText( s ) { if ( !s ) { return ""; } s = s + ""; return s.replace( /[\&<>]/g, function( s ) { switch( s ) { case "&": return "&"; case "<": return "<"; case ">": return ">"; default: return s; } }); } function synchronize( callback, last ) { config.queue.push( callback ); if ( config.autorun && !config.blocking ) { process( last ); } } function process( last ) { function next() { process( last ); } var start = new Date().getTime(); config.depth = config.depth ? config.depth + 1 : 1; while ( config.queue.length && !config.blocking ) { if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { config.queue.shift()(); } else { window.setTimeout( next, 13 ); break; } } config.depth--; if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { done(); } } function saveGlobal() { config.pollution = []; if ( config.noglobals ) { for ( var key in window ) { // in Opera sometimes DOM element ids show up here, ignore them if ( !hasOwn.call( window, key ) || /^qunit-test-output/.test( key ) ) { continue; } config.pollution.push( key ); } } } function checkPollution( name ) { var newGlobals, deletedGlobals, old = config.pollution; saveGlobal(); newGlobals = diff( config.pollution, old ); if ( newGlobals.length > 0 ) { QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") ); } deletedGlobals = diff( old, config.pollution ); if ( deletedGlobals.length > 0 ) { QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") ); } } // returns a new Array with the elements that are in a but not in b function diff( a, b ) { var i, j, result = a.slice(); for ( i = 0; i < result.length; i++ ) { for ( j = 0; j < b.length; j++ ) { if ( result[i] === b[j] ) { result.splice( i, 1 ); i--; break; } } } return result; } function extend( a, b ) { for ( var prop in b ) { if ( b[ prop ] === undefined ) { delete a[ prop ]; // Avoid "Member not found" error in IE8 caused by setting window.constructor } else if ( prop !== "constructor" || a !== window ) { a[ prop ] = b[ prop ]; } } return a; } function addEvent( elem, type, fn ) { if ( elem.addEventListener ) { elem.addEventListener( type, fn, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, fn ); } else { fn(); } } function id( name ) { return !!( typeof document !== "undefined" && document && document.getElementById ) && document.getElementById( name ); } function registerLoggingCallback( key ) { return function( callback ) { config[key].push( callback ); }; } // Supports deprecated method of completely overwriting logging callbacks function runLoggingCallbacks( key, scope, args ) { //debugger; var i, callbacks; if ( QUnit.hasOwnProperty( key ) ) { QUnit[ key ].call(scope, args ); } else { callbacks = config[ key ]; for ( i = 0; i < callbacks.length; i++ ) { callbacks[ i ].call( scope, args ); } } } // Test for equality any JavaScript type. // Author: Philippe Rathé QUnit.equiv = (function() { // Call the o related callback with the given arguments. function bindCallbacks( o, callbacks, args ) { var prop = QUnit.objectType( o ); if ( prop ) { if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) { return callbacks[ prop ].apply( callbacks, args ); } else { return callbacks[ prop ]; // or undefined } } } // the real equiv function var innerEquiv, // stack to decide between skip/abort functions callers = [], // stack to avoiding loops from circular referencing parents = [], getProto = Object.getPrototypeOf || function ( obj ) { return obj.__proto__; }, callbacks = (function () { // for string, boolean, number and null function useStrictEquality( b, a ) { if ( b instanceof a.constructor || a instanceof b.constructor ) { // to catch short annotaion VS 'new' annotation of a // declaration // e.g. var i = 1; // var j = new Number(1); return a == b; } else { return a === b; } } return { "string": useStrictEquality, "boolean": useStrictEquality, "number": useStrictEquality, "null": useStrictEquality, "undefined": useStrictEquality, "nan": function( b ) { return isNaN( b ); }, "date": function( b, a ) { return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf(); }, "regexp": function( b, a ) { return QUnit.objectType( b ) === "regexp" && // the regex itself a.source === b.source && // and its modifers a.global === b.global && // (gmi) ... a.ignoreCase === b.ignoreCase && a.multiline === b.multiline; }, // - skip when the property is a method of an instance (OOP) // - abort otherwise, // initial === would have catch identical references anyway "function": function() { var caller = callers[callers.length - 1]; return caller !== Object && typeof caller !== "undefined"; }, "array": function( b, a ) { var i, j, len, loop; // b could be an object literal here if ( QUnit.objectType( b ) !== "array" ) { return false; } len = a.length; if ( len !== b.length ) { // safe and faster return false; } // track reference to avoid circular references parents.push( a ); for ( i = 0; i < len; i++ ) { loop = false; for ( j = 0; j < parents.length; j++ ) { if ( parents[j] === a[i] ) { loop = true;// dont rewalk array } } if ( !loop && !innerEquiv(a[i], b[i]) ) { parents.pop(); return false; } } parents.pop(); return true; }, "object": function( b, a ) { var i, j, loop, // Default to true eq = true, aProperties = [], bProperties = []; // comparing constructors is more strict than using // instanceof if ( a.constructor !== b.constructor ) { // Allow objects with no prototype to be equivalent to // objects with Object as their constructor. if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) || ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) { return false; } } // stack constructor before traversing properties callers.push( a.constructor ); // track reference to avoid circular references parents.push( a ); for ( i in a ) { // be strict: don't ensures hasOwnProperty // and go deep loop = false; for ( j = 0; j < parents.length; j++ ) { if ( parents[j] === a[i] ) { // don't go down the same path twice loop = true; } } aProperties.push(i); // collect a's properties if (!loop && !innerEquiv( a[i], b[i] ) ) { eq = false; break; } } callers.pop(); // unstack, we are done parents.pop(); for ( i in b ) { bProperties.push( i ); // collect b's properties } // Ensures identical properties name return eq && innerEquiv( aProperties.sort(), bProperties.sort() ); } }; }()); innerEquiv = function() { // can take multiple arguments var args = [].slice.apply( arguments ); if ( args.length < 2 ) { return true; // end transition } return (function( a, b ) { if ( a === b ) { return true; // catch the most you can } else if ( a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b) ) { return false; // don't lose time with error prone cases } else { return bindCallbacks(a, callbacks, [ b, a ]); } // apply transition with (1..n) arguments }( args[0], args[1] ) && arguments.callee.apply( this, args.splice(1, args.length - 1 )) ); }; return innerEquiv; }()); /** * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | * http://flesler.blogspot.com Licensed under BSD * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008 * * @projectDescription Advanced and extensible data dumping for Javascript. * @version 1.0.0 * @author Ariel Flesler * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} */ QUnit.jsDump = (function() { function quote( str ) { return '"' + str.toString().replace( /"/g, '\\"' ) + '"'; } function literal( o ) { return o + ""; } function join( pre, arr, post ) { var s = jsDump.separator(), base = jsDump.indent(), inner = jsDump.indent(1); if ( arr.join ) { arr = arr.join( "," + s + inner ); } if ( !arr ) { return pre + post; } return [ pre, inner + arr, base + post ].join(s); } function array( arr, stack ) { var i = arr.length, ret = new Array(i); this.up(); while ( i-- ) { ret[i] = this.parse( arr[i] , undefined , stack); } this.down(); return join( "[", ret, "]" ); } var reName = /^function (\w+)/, jsDump = { parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance stack = stack || [ ]; var inStack, res, parser = this.parsers[ type || this.typeOf(obj) ]; type = typeof parser; inStack = inArray( obj, stack ); if ( inStack != -1 ) { return "recursion(" + (inStack - stack.length) + ")"; } //else if ( type == "function" ) { stack.push( obj ); res = parser.call( this, obj, stack ); stack.pop(); return res; } // else return ( type == "string" ) ? parser : this.parsers.error; }, typeOf: function( obj ) { var type; if ( obj === null ) { type = "null"; } else if ( typeof obj === "undefined" ) { type = "undefined"; } else if ( QUnit.is( "regexp", obj) ) { type = "regexp"; } else if ( QUnit.is( "date", obj) ) { type = "date"; } else if ( QUnit.is( "function", obj) ) { type = "function"; } else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) { type = "window"; } else if ( obj.nodeType === 9 ) { type = "document"; } else if ( obj.nodeType ) { type = "node"; } else if ( // native arrays toString.call( obj ) === "[object Array]" || // NodeList objects ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) ) ) { type = "array"; } else { type = typeof obj; } return type; }, separator: function() { return this.multiline ? this.HTML ? "
    " : "\n" : this.HTML ? " " : " "; }, indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing if ( !this.multiline ) { return ""; } var chr = this.indentChar; if ( this.HTML ) { chr = chr.replace( /\t/g, " " ).replace( / /g, " " ); } return new Array( this._depth_ + (extra||0) ).join(chr); }, up: function( a ) { this._depth_ += a || 1; }, down: function( a ) { this._depth_ -= a || 1; }, setParser: function( name, parser ) { this.parsers[name] = parser; }, // The next 3 are exposed so you can use them quote: quote, literal: literal, join: join, // _depth_: 1, // This is the list of parsers, to modify them, use jsDump.setParser parsers: { window: "[Window]", document: "[Document]", error: "[ERROR]", //when no parser is found, shouldn"t happen unknown: "[Unknown]", "null": "null", "undefined": "undefined", "function": function( fn ) { var ret = "function", name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];//functions never have name in IE if ( name ) { ret += " " + name; } ret += "( "; ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" ); return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" ); }, array: array, nodelist: array, "arguments": array, object: function( map, stack ) { var ret = [ ], keys, key, val, i; QUnit.jsDump.up(); if ( Object.keys ) { keys = Object.keys( map ); } else { keys = []; for ( key in map ) { keys.push( key ); } } keys.sort(); for ( i = 0; i < keys.length; i++ ) { key = keys[ i ]; val = map[ key ]; ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) ); } QUnit.jsDump.down(); return join( "{", ret, "}" ); }, node: function( node ) { var a, val, open = QUnit.jsDump.HTML ? "<" : "<", close = QUnit.jsDump.HTML ? ">" : ">", tag = node.nodeName.toLowerCase(), ret = open + tag; for ( a in QUnit.jsDump.DOMAttrs ) { val = node[ QUnit.jsDump.DOMAttrs[a] ]; if ( val ) { ret += " " + a + "=" + QUnit.jsDump.parse( val, "attribute" ); } } return ret + close + open + "/" + tag + close; }, functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function var args, l = fn.length; if ( !l ) { return ""; } args = new Array(l); while ( l-- ) { args[l] = String.fromCharCode(97+l);//97 is 'a' } return " " + args.join( ", " ) + " "; }, key: quote, //object calls it internally, the key part of an item in a map functionCode: "[code]", //function calls it internally, it's the content of the function attribute: quote, //node calls it internally, it's an html attribute value string: quote, date: quote, regexp: literal, //regex number: literal, "boolean": literal }, DOMAttrs: { //attributes to dump from nodes, name=>realName id: "id", name: "name", "class": "className" }, HTML: false,//if true, entities are escaped ( <, >, \t, space and \n ) indentChar: " ",//indentation unit multiline: true //if true, items in a collection, are separated by a \n, else just a space. }; return jsDump; }()); // from Sizzle.js function getText( elems ) { var i, elem, ret = ""; for ( i = 0; elems[i]; i++ ) { elem = elems[i]; // Get the text from text nodes and CDATA nodes if ( elem.nodeType === 3 || elem.nodeType === 4 ) { ret += elem.nodeValue; // Traverse everything else, except comment nodes } else if ( elem.nodeType !== 8 ) { ret += getText( elem.childNodes ); } } return ret; } // from jquery.js function inArray( elem, array ) { if ( array.indexOf ) { return array.indexOf( elem ); } for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; } } return -1; } /* * Javascript Diff Algorithm * By John Resig (http://ejohn.org/) * Modified by Chu Alan "sprite" * * Released under the MIT license. * * More Info: * http://ejohn.org/projects/javascript-diff-algorithm/ * * Usage: QUnit.diff(expected, actual) * * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick brown fox jumped jumps over" */ QUnit.diff = (function() { function diff( o, n ) { var i, ns = {}, os = {}; for ( i = 0; i < n.length; i++ ) { if ( ns[ n[i] ] == null ) { ns[ n[i] ] = { rows: [], o: null }; } ns[ n[i] ].rows.push( i ); } for ( i = 0; i < o.length; i++ ) { if ( os[ o[i] ] == null ) { os[ o[i] ] = { rows: [], n: null }; } os[ o[i] ].rows.push( i ); } for ( i in ns ) { if ( !hasOwn.call( ns, i ) ) { continue; } if ( ns[i].rows.length == 1 && typeof os[i] != "undefined" && os[i].rows.length == 1 ) { n[ ns[i].rows[0] ] = { text: n[ ns[i].rows[0] ], row: os[i].rows[0] }; o[ os[i].rows[0] ] = { text: o[ os[i].rows[0] ], row: ns[i].rows[0] }; } } for ( i = 0; i < n.length - 1; i++ ) { if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null && n[ i + 1 ] == o[ n[i].row + 1 ] ) { n[ i + 1 ] = { text: n[ i + 1 ], row: n[i].row + 1 }; o[ n[i].row + 1 ] = { text: o[ n[i].row + 1 ], row: i + 1 }; } } for ( i = n.length - 1; i > 0; i-- ) { if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null && n[ i - 1 ] == o[ n[i].row - 1 ]) { n[ i - 1 ] = { text: n[ i - 1 ], row: n[i].row - 1 }; o[ n[i].row - 1 ] = { text: o[ n[i].row - 1 ], row: i - 1 }; } } return { o: o, n: n }; } return function( o, n ) { o = o.replace( /\s+$/, "" ); n = n.replace( /\s+$/, "" ); var i, pre, str = "", out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ), oSpace = o.match(/\s+/g), nSpace = n.match(/\s+/g); if ( oSpace == null ) { oSpace = [ " " ]; } else { oSpace.push( " " ); } if ( nSpace == null ) { nSpace = [ " " ]; } else { nSpace.push( " " ); } if ( out.n.length === 0 ) { for ( i = 0; i < out.o.length; i++ ) { str += "" + out.o[i] + oSpace[i] + ""; } } else { if ( out.n[0].text == null ) { for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) { str += "" + out.o[n] + oSpace[n] + ""; } } for ( i = 0; i < out.n.length; i++ ) { if (out.n[i].text == null) { str += "" + out.n[i] + nSpace[i] + ""; } else { // `pre` initialized at top of scope pre = ""; for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) { pre += "" + out.o[n] + oSpace[n] + ""; } str += " " + out.n[i].text + nSpace[i] + pre; } } } return str; }; }()); // for CommonJS enviroments, export everything if ( typeof exports !== "undefined" ) { extend(exports, QUnit); } // get at whatever the global object is, like window in browsers }( (function() {return this;}.call()) )); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/000077500000000000000000000000001240302775300255115ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/deepEqual.js000066400000000000000000001150371240302775300277630ustar00rootroot00000000000000module("equiv"); test("Primitive types and constants", function () { equal(QUnit.equiv(null, null), true, "null"); equal(QUnit.equiv(null, {}), false, "null"); equal(QUnit.equiv(null, undefined), false, "null"); equal(QUnit.equiv(null, 0), false, "null"); equal(QUnit.equiv(null, false), false, "null"); equal(QUnit.equiv(null, ''), false, "null"); equal(QUnit.equiv(null, []), false, "null"); equal(QUnit.equiv(undefined, undefined), true, "undefined"); equal(QUnit.equiv(undefined, null), false, "undefined"); equal(QUnit.equiv(undefined, 0), false, "undefined"); equal(QUnit.equiv(undefined, false), false, "undefined"); equal(QUnit.equiv(undefined, {}), false, "undefined"); equal(QUnit.equiv(undefined, []), false, "undefined"); equal(QUnit.equiv(undefined, ""), false, "undefined"); // Nan usually doest not equal to Nan using the '==' operator. // Only isNaN() is able to do it. equal(QUnit.equiv(0/0, 0/0), true, "NaN"); // NaN VS NaN equal(QUnit.equiv(1/0, 2/0), true, "Infinity"); // Infinity VS Infinity equal(QUnit.equiv(-1/0, 2/0), false, "-Infinity, Infinity"); // -Infinity VS Infinity equal(QUnit.equiv(-1/0, -2/0), true, "-Infinity, -Infinity"); // -Infinity VS -Infinity equal(QUnit.equiv(0/0, 1/0), false, "NaN, Infinity"); // Nan VS Infinity equal(QUnit.equiv(1/0, 0/0), false, "NaN, Infinity"); // Nan VS Infinity equal(QUnit.equiv(0/0, null), false, "NaN"); equal(QUnit.equiv(0/0, undefined), false, "NaN"); equal(QUnit.equiv(0/0, 0), false, "NaN"); equal(QUnit.equiv(0/0, false), false, "NaN"); equal(QUnit.equiv(0/0, function () {}), false, "NaN"); equal(QUnit.equiv(1/0, null), false, "NaN, Infinity"); equal(QUnit.equiv(1/0, undefined), false, "NaN, Infinity"); equal(QUnit.equiv(1/0, 0), false, "NaN, Infinity"); equal(QUnit.equiv(1/0, 1), false, "NaN, Infinity"); equal(QUnit.equiv(1/0, false), false, "NaN, Infinity"); equal(QUnit.equiv(1/0, true), false, "NaN, Infinity"); equal(QUnit.equiv(1/0, function () {}), false, "NaN, Infinity"); equal(QUnit.equiv(0, 0), true, "number"); equal(QUnit.equiv(0, 1), false, "number"); equal(QUnit.equiv(1, 0), false, "number"); equal(QUnit.equiv(1, 1), true, "number"); equal(QUnit.equiv(1.1, 1.1), true, "number"); equal(QUnit.equiv(0.0000005, 0.0000005), true, "number"); equal(QUnit.equiv(0, ''), false, "number"); equal(QUnit.equiv(0, '0'), false, "number"); equal(QUnit.equiv(1, '1'), false, "number"); equal(QUnit.equiv(0, false), false, "number"); equal(QUnit.equiv(1, true), false, "number"); equal(QUnit.equiv(true, true), true, "boolean"); equal(QUnit.equiv(true, false), false, "boolean"); equal(QUnit.equiv(false, true), false, "boolean"); equal(QUnit.equiv(false, 0), false, "boolean"); equal(QUnit.equiv(false, null), false, "boolean"); equal(QUnit.equiv(false, undefined), false, "boolean"); equal(QUnit.equiv(true, 1), false, "boolean"); equal(QUnit.equiv(true, null), false, "boolean"); equal(QUnit.equiv(true, undefined), false, "boolean"); equal(QUnit.equiv('', ''), true, "string"); equal(QUnit.equiv('a', 'a'), true, "string"); equal(QUnit.equiv("foobar", "foobar"), true, "string"); equal(QUnit.equiv("foobar", "foo"), false, "string"); equal(QUnit.equiv('', 0), false, "string"); equal(QUnit.equiv('', false), false, "string"); equal(QUnit.equiv('', null), false, "string"); equal(QUnit.equiv('', undefined), false, "string"); // Short annotation VS new annotation equal(QUnit.equiv(0, new Number()), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Number(), 0), true, "short annotation VS new annotation"); equal(QUnit.equiv(1, new Number(1)), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Number(1), 1), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Number(0), 1), false, "short annotation VS new annotation"); equal(QUnit.equiv(0, new Number(1)), false, "short annotation VS new annotation"); equal(QUnit.equiv(new String(), ""), true, "short annotation VS new annotation"); equal(QUnit.equiv("", new String()), true, "short annotation VS new annotation"); equal(QUnit.equiv(new String("My String"), "My String"), true, "short annotation VS new annotation"); equal(QUnit.equiv("My String", new String("My String")), true, "short annotation VS new annotation"); equal(QUnit.equiv("Bad String", new String("My String")), false, "short annotation VS new annotation"); equal(QUnit.equiv(new String("Bad String"), "My String"), false, "short annotation VS new annotation"); equal(QUnit.equiv(false, new Boolean()), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Boolean(), false), true, "short annotation VS new annotation"); equal(QUnit.equiv(true, new Boolean(true)), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Boolean(true), true), true, "short annotation VS new annotation"); equal(QUnit.equiv(true, new Boolean(1)), true, "short annotation VS new annotation"); equal(QUnit.equiv(false, new Boolean(false)), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Boolean(false), false), true, "short annotation VS new annotation"); equal(QUnit.equiv(false, new Boolean(0)), true, "short annotation VS new annotation"); equal(QUnit.equiv(true, new Boolean(false)), false, "short annotation VS new annotation"); equal(QUnit.equiv(new Boolean(false), true), false, "short annotation VS new annotation"); equal(QUnit.equiv(new Object(), {}), true, "short annotation VS new annotation"); equal(QUnit.equiv({}, new Object()), true, "short annotation VS new annotation"); equal(QUnit.equiv(new Object(), {a:1}), false, "short annotation VS new annotation"); equal(QUnit.equiv({a:1}, new Object()), false, "short annotation VS new annotation"); equal(QUnit.equiv({a:undefined}, new Object()), false, "short annotation VS new annotation"); equal(QUnit.equiv(new Object(), {a:undefined}), false, "short annotation VS new annotation"); }); test("Objects Basics.", function() { equal(QUnit.equiv({}, {}), true); equal(QUnit.equiv({}, null), false); equal(QUnit.equiv({}, undefined), false); equal(QUnit.equiv({}, 0), false); equal(QUnit.equiv({}, false), false); // This test is a hard one, it is very important // REASONS: // 1) They are of the same type "object" // 2) [] instanceof Object is true // 3) Their properties are the same (doesn't exists) equal(QUnit.equiv({}, []), false); equal(QUnit.equiv({a:1}, {a:1}), true); equal(QUnit.equiv({a:1}, {a:"1"}), false); equal(QUnit.equiv({a:[]}, {a:[]}), true); equal(QUnit.equiv({a:{}}, {a:null}), false); equal(QUnit.equiv({a:1}, {}), false); equal(QUnit.equiv({}, {a:1}), false); // Hard ones equal(QUnit.equiv({a:undefined}, {}), false); equal(QUnit.equiv({}, {a:undefined}), false); equal(QUnit.equiv( { a: [{ bar: undefined }] }, { a: [{ bat: undefined }] } ), false); // Objects with no prototype, created via Object.create(null), are used e.g. as dictionaries. // Being able to test equivalence against object literals is quite useful. if (typeof Object.create === 'function') { equal(QUnit.equiv(Object.create(null), {}), true, "empty object without prototype VS empty object"); var nonEmptyWithNoProto = Object.create(null); nonEmptyWithNoProto.foo = "bar"; equal(QUnit.equiv(nonEmptyWithNoProto, { foo: "bar" }), true, "object without prototype VS object"); } }); test("Arrays Basics.", function() { equal(QUnit.equiv([], []), true); // May be a hard one, can invoke a crash at execution. // because their types are both "object" but null isn't // like a true object, it doesn't have any property at all. equal(QUnit.equiv([], null), false); equal(QUnit.equiv([], undefined), false); equal(QUnit.equiv([], false), false); equal(QUnit.equiv([], 0), false); equal(QUnit.equiv([], ""), false); // May be a hard one, but less hard // than {} with [] (note the order) equal(QUnit.equiv([], {}), false); equal(QUnit.equiv([null],[]), false); equal(QUnit.equiv([undefined],[]), false); equal(QUnit.equiv([],[null]), false); equal(QUnit.equiv([],[undefined]), false); equal(QUnit.equiv([null],[undefined]), false); equal(QUnit.equiv([[]],[[]]), true); equal(QUnit.equiv([[],[],[]],[[],[],[]]), true); equal(QUnit.equiv( [[],[],[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], [[],[],[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]), true); equal(QUnit.equiv( [[],[],[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], [[],[],[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]), // shorter false); equal(QUnit.equiv( [[],[],[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[{}]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], [[],[],[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]), // deepest element not an array false); // same multidimensional equal(QUnit.equiv( [1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,[ [6,7,8,9, [ [ 1,2,3,4,[ 2,3,4,[ 1,2,[ 1,2,3,4,[ 1,2,3,4,5,6,7,8,9,[ 0 ],1,2,3,4,5,6,7,8,9 ],5,6,7,8,9 ],4,5,6,7,8,9 ],5,6,7,8,9 ],5,6,7 ] ] ] ] ]]], [1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,[ [6,7,8,9, [ [ 1,2,3,4,[ 2,3,4,[ 1,2,[ 1,2,3,4,[ 1,2,3,4,5,6,7,8,9,[ 0 ],1,2,3,4,5,6,7,8,9 ],5,6,7,8,9 ],4,5,6,7,8,9 ],5,6,7,8,9 ],5,6,7 ] ] ] ] ]]]), true, "Multidimensional"); // different multidimensional equal(QUnit.equiv( [1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,[ [6,7,8,9, [ [ 1,2,3,4,[ 2,3,4,[ 1,2,[ 1,2,3,4,[ 1,2,3,4,5,6,7,8,9,[ 0 ],1,2,3,4,5,6,7,8,9 ],5,6,7,8,9 ],4,5,6,7,8,9 ],5,6,7,8,9 ],5,6,7 ] ] ] ] ]]], [1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,[ [6,7,8,9, [ [ 1,2,3,4,[ 2,3,4,[ 1,2,[ '1',2,3,4,[ // string instead of number 1,2,3,4,5,6,7,8,9,[ 0 ],1,2,3,4,5,6,7,8,9 ],5,6,7,8,9 ],4,5,6,7,8,9 ],5,6,7,8,9 ],5,6,7 ] ] ] ] ]]]), false, "Multidimensional"); // different multidimensional equal(QUnit.equiv( [1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,[ [6,7,8,9, [ [ 1,2,3,4,[ 2,3,4,[ 1,2,[ 1,2,3,4,[ 1,2,3,4,5,6,7,8,9,[ 0 ],1,2,3,4,5,6,7,8,9 ],5,6,7,8,9 ],4,5,6,7,8,9 ],5,6,7,8,9 ],5,6,7 ] ] ] ] ]]], [1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,6,7,8,9, [ 1,2,3,4,5,[ [6,7,8,9, [ [ 1,2,3,4,[ 2,3,[ // missing an element (4) 1,2,[ 1,2,3,4,[ 1,2,3,4,5,6,7,8,9,[ 0 ],1,2,3,4,5,6,7,8,9 ],5,6,7,8,9 ],4,5,6,7,8,9 ],5,6,7,8,9 ],5,6,7 ] ] ] ] ]]]), false, "Multidimensional"); }); test("Functions.", function() { var f0 = function () {}; var f1 = function () {}; // f2 and f3 have the same code, formatted differently var f2 = function () {var i = 0;}; var f3 = function () { var i = 0 // this comment and no semicoma as difference }; equal(QUnit.equiv(function() {}, function() {}), false, "Anonymous functions"); // exact source code equal(QUnit.equiv(function() {}, function() {return true;}), false, "Anonymous functions"); equal(QUnit.equiv(f0, f0), true, "Function references"); // same references equal(QUnit.equiv(f0, f1), false, "Function references"); // exact source code, different references equal(QUnit.equiv(f2, f3), false, "Function references"); // equivalent source code, different references equal(QUnit.equiv(f1, f2), false, "Function references"); // different source code, different references equal(QUnit.equiv(function() {}, true), false); equal(QUnit.equiv(function() {}, undefined), false); equal(QUnit.equiv(function() {}, null), false); equal(QUnit.equiv(function() {}, {}), false); }); test("Date instances.", function() { // Date, we don't need to test Date.parse() because it returns a number. // Only test the Date instances by setting them a fix date. // The date use is midnight January 1, 1970 var d1 = new Date(); d1.setTime(0); // fix the date var d2 = new Date(); d2.setTime(0); // fix the date var d3 = new Date(); // The very now // Anyway their types differs, just in case the code fails in the order in which it deals with date equal(QUnit.equiv(d1, 0), false); // d1.valueOf() returns 0, but d1 and 0 are different // test same values date and different instances equality equal(QUnit.equiv(d1, d2), true); // test different date and different instances difference equal(QUnit.equiv(d1, d3), false); }); test("RegExp.", function() { // Must test cases that imply those traps: // var a = /./; // a instanceof Object; // Oops // a instanceof RegExp; // Oops // typeof a === "function"; // Oops, false in IE and Opera, true in FF and Safari ("object") // Tests same regex with same modifiers in different order var r = /foo/; var r5 = /foo/gim; var r6 = /foo/gmi; var r7 = /foo/igm; var r8 = /foo/img; var r9 = /foo/mig; var r10 = /foo/mgi; var ri1 = /foo/i; var ri2 = /foo/i; var rm1 = /foo/m; var rm2 = /foo/m; var rg1 = /foo/g; var rg2 = /foo/g; equal(QUnit.equiv(r5, r6), true, "Modifier order"); equal(QUnit.equiv(r5, r7), true, "Modifier order"); equal(QUnit.equiv(r5, r8), true, "Modifier order"); equal(QUnit.equiv(r5, r9), true, "Modifier order"); equal(QUnit.equiv(r5, r10), true, "Modifier order"); equal(QUnit.equiv(r, r5), false, "Modifier"); equal(QUnit.equiv(ri1, ri2), true, "Modifier"); equal(QUnit.equiv(r, ri1), false, "Modifier"); equal(QUnit.equiv(ri1, rm1), false, "Modifier"); equal(QUnit.equiv(r, rm1), false, "Modifier"); equal(QUnit.equiv(rm1, ri1), false, "Modifier"); equal(QUnit.equiv(rm1, rm2), true, "Modifier"); equal(QUnit.equiv(rg1, rm1), false, "Modifier"); equal(QUnit.equiv(rm1, rg1), false, "Modifier"); equal(QUnit.equiv(rg1, rg2), true, "Modifier"); // Different regex, same modifiers var r11 = /[a-z]/gi; var r13 = /[0-9]/gi; // oops! different equal(QUnit.equiv(r11, r13), false, "Regex pattern"); var r14 = /0/ig; var r15 = /"0"/ig; // oops! different equal(QUnit.equiv(r14, r15), false, "Regex pattern"); var r1 = /[\n\r\u2028\u2029]/g; var r2 = /[\n\r\u2028\u2029]/g; var r3 = /[\n\r\u2028\u2028]/g; // differs from r1 var r4 = /[\n\r\u2028\u2029]/; // differs from r1 equal(QUnit.equiv(r1, r2), true, "Regex pattern"); equal(QUnit.equiv(r1, r3), false, "Regex pattern"); equal(QUnit.equiv(r1, r4), false, "Regex pattern"); // More complex regex var regex1 = "^[-_.a-z0-9]+@([-_a-z0-9]+\\.)+([A-Za-z][A-Za-z]|[A-Za-z][A-Za-z][A-Za-z])|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$"; var regex2 = "^[-_.a-z0-9]+@([-_a-z0-9]+\\.)+([A-Za-z][A-Za-z]|[A-Za-z][A-Za-z][A-Za-z])|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$"; // regex 3 is different: '.' not escaped var regex3 = "^[-_.a-z0-9]+@([-_a-z0-9]+.)+([A-Za-z][A-Za-z]|[A-Za-z][A-Za-z][A-Za-z])|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$"; var r21 = new RegExp(regex1); var r22 = new RegExp(regex2); var r23 = new RegExp(regex3); // diff from r21, not same pattern var r23a = new RegExp(regex3, "gi"); // diff from r23, not same modifier var r24a = new RegExp(regex3, "ig"); // same as r23a equal(QUnit.equiv(r21, r22), true, "Complex Regex"); equal(QUnit.equiv(r21, r23), false, "Complex Regex"); equal(QUnit.equiv(r23, r23a), false, "Complex Regex"); equal(QUnit.equiv(r23a, r24a), true, "Complex Regex"); // typeof r1 is "function" in some browsers and "object" in others so we must cover this test var re = / /; equal(QUnit.equiv(re, function () {}), false, "Regex internal"); equal(QUnit.equiv(re, {}), false, "Regex internal"); }); test("Complex Objects.", function() { function fn1() { return "fn1"; } function fn2() { return "fn2"; } // Try to invert the order of some properties to make sure it is covered. // It can failed when properties are compared between unsorted arrays. equal(QUnit.equiv( { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", s: [1,2,3], t: undefined, u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, q: [], p: 1/0, o: 99 }, l: undefined, m: null } }, d: 0, i: true, h: "false" } }, e: undefined, g: "", h: "h", f: {}, i: [] }, { a: 1, b: null, c: [{}], d: { b: false, a: 3.14159, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", t: undefined, u: 0, s: [1,2,3], v: { w: { x: { z: null, y: "Yahoo!" } } } }, o: 99, p: 1/0, q: [] }, l: undefined, m: null } }, i: true, h: "false" } }, e: undefined, g: "", f: {}, h: "h", i: [] } ), true); equal(QUnit.equiv( { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { //r: "r", // different: missing a property s: [1,2,3], t: undefined, u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, o: 99, p: 1/0, q: [] }, l: undefined, m: null } }, h: "false", i: true } }, e: undefined, f: {}, g: "", h: "h", i: [] }, { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", s: [1,2,3], t: undefined, u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, o: 99, p: 1/0, q: [] }, l: undefined, m: null } }, h: "false", i: true } }, e: undefined, f: {}, g: "", h: "h", i: [] } ), false); equal(QUnit.equiv( { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", s: [1,2,3], t: undefined, u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, o: 99, p: 1/0, q: [] }, l: undefined, m: null } }, h: "false", i: true } }, e: undefined, f: {}, g: "", h: "h", i: [] }, { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", s: [1,2,3], //t: undefined, // different: missing a property with an undefined value u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, o: 99, p: 1/0, q: [] }, l: undefined, m: null } }, h: "false", i: true } }, e: undefined, f: {}, g: "", h: "h", i: [] } ), false); equal(QUnit.equiv( { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", s: [1,2,3], t: undefined, u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, o: 99, p: 1/0, q: [] }, l: undefined, m: null } }, h: "false", i: true } }, e: undefined, f: {}, g: "", h: "h", i: [] }, { a: 1, b: null, c: [{}], d: { a: 3.14159, b: false, c: { d: 0, e: fn1, f: [[[]]], g: { j: { k: { n: { r: "r", s: [1,2,3], t: undefined, u: 0, v: { w: { x: { y: "Yahoo!", z: null } } } }, o: 99, p: 1/0, q: {} // different was [] }, l: undefined, m: null } }, h: "false", i: true } }, e: undefined, f: {}, g: "", h: "h", i: [] } ), false); var same1 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,null,{}, [], [1,2,3]], bar: undefined }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ ας" ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; var same2 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,null,{}, [], [1,2,3]], bar: undefined }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ ας" ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; var diff1 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,null,{}, [], [1,2,3,4]], // different: 4 was add to the array bar: undefined }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ ας" ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; var diff2 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,null,{}, [], [1,2,3]], newprop: undefined, // different: newprop was added bar: undefined }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ ας" ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; var diff3 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,null,{}, [], [1,2,3]], bar: undefined }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ α" // different: missing last char ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; var diff4 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,undefined,{}, [], [1,2,3]], // different: undefined instead of null bar: undefined }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ ας" ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; var diff5 = { a: [ "string", null, 0, "1", 1, { prop: null, foo: [1,2,null,{}, [], [1,2,3]], bat: undefined // different: property name not "bar" }, 3, "Hey!", "Κάνε πάντα γνωÏ�ίζουμε ας των, μηχανής επιδιόÏ�θωσης επιδιοÏ�θώσεις ÏŽÏ‚ μια. Κλπ ας" ], unicode: "è€� 汉语中存在 港澳和海外的å�Žäººåœˆä¸­ 贵州 我去了书店 现在尚有争", b: "b", c: fn1 }; equal(QUnit.equiv(same1, same2), true); equal(QUnit.equiv(same2, same1), true); equal(QUnit.equiv(same2, diff1), false); equal(QUnit.equiv(diff1, same2), false); equal(QUnit.equiv(same1, diff1), false); equal(QUnit.equiv(same1, diff2), false); equal(QUnit.equiv(same1, diff3), false); equal(QUnit.equiv(same1, diff3), false); equal(QUnit.equiv(same1, diff4), false); equal(QUnit.equiv(same1, diff5), false); equal(QUnit.equiv(diff5, diff1), false); }); test("Complex Arrays.", function() { function fn() { } equal(QUnit.equiv( [1, 2, 3, true, {}, null, [ { a: ["", '1', 0] }, 5, 6, 7 ], "foo"], [1, 2, 3, true, {}, null, [ { a: ["", '1', 0] }, 5, 6, 7 ], "foo"]), true); equal(QUnit.equiv( [1, 2, 3, true, {}, null, [ { a: ["", '1', 0] }, 5, 6, 7 ], "foo"], [1, 2, 3, true, {}, null, [ { b: ["", '1', 0] // not same property name }, 5, 6, 7 ], "foo"]), false); var a = [{ b: fn, c: false, "do": "reserved word", "for": { ar: [3,5,9,"hey!", [], { ar: [1,[ 3,4,6,9, null, [], [] ]], e: fn, f: undefined }] }, e: 0.43445 }, 5, "string", 0, fn, false, null, undefined, 0, [ 4,5,6,7,8,9,11,22,33,44,55,"66", null, [], [[[[[3]]]], "3"], {}, 1/0 ], [], [[[], "foo", null, { n: 1/0, z: { a: [3,4,5,6,"yep!", undefined, undefined], b: {} } }, {}]]]; equal(QUnit.equiv(a, [{ b: fn, c: false, "do": "reserved word", "for": { ar: [3,5,9,"hey!", [], { ar: [1,[ 3,4,6,9, null, [], [] ]], e: fn, f: undefined }] }, e: 0.43445 }, 5, "string", 0, fn, false, null, undefined, 0, [ 4,5,6,7,8,9,11,22,33,44,55,"66", null, [], [[[[[3]]]], "3"], {}, 1/0 ], [], [[[], "foo", null, { n: 1/0, z: { a: [3,4,5,6,"yep!", undefined, undefined], b: {} } }, {}]]]), true); equal(QUnit.equiv(a, [{ b: fn, c: false, "do": "reserved word", "for": { ar: [3,5,9,"hey!", [], { ar: [1,[ 3,4,6,9, null, [], [] ]], e: fn, f: undefined }] }, e: 0.43445 }, 5, "string", 0, fn, false, null, undefined, 0, [ 4,5,6,7,8,9,11,22,33,44,55,"66", null, [], [[[[[2]]]], "3"], {}, 1/0 // different: [[[[[2]]]]] instead of [[[[[3]]]]] ], [], [[[], "foo", null, { n: 1/0, z: { a: [3,4,5,6,"yep!", undefined, undefined], b: {} } }, {}]]]), false); equal(QUnit.equiv(a, [{ b: fn, c: false, "do": "reserved word", "for": { ar: [3,5,9,"hey!", [], { ar: [1,[ 3,4,6,9, null, [], [] ]], e: fn, f: undefined }] }, e: 0.43445 }, 5, "string", 0, fn, false, null, undefined, 0, [ 4,5,6,7,8,9,11,22,33,44,55,"66", null, [], [[[[[3]]]], "3"], {}, 1/0 ], [], [[[], "foo", null, { n: -1/0, // different, -Infinity instead of Infinity z: { a: [3,4,5,6,"yep!", undefined, undefined], b: {} } }, {}]]]), false); equal(QUnit.equiv(a, [{ b: fn, c: false, "do": "reserved word", "for": { ar: [3,5,9,"hey!", [], { ar: [1,[ 3,4,6,9, null, [], [] ]], e: fn, f: undefined }] }, e: 0.43445 }, 5, "string", 0, fn, false, null, undefined, 0, [ 4,5,6,7,8,9,11,22,33,44,55,"66", null, [], [[[[[3]]]], "3"], {}, 1/0 ], [], [[[], "foo", { // different: null is missing n: 1/0, z: { a: [3,4,5,6,"yep!", undefined, undefined], b: {} } }, {}]]]), false); equal(QUnit.equiv(a, [{ b: fn, c: false, "do": "reserved word", "for": { ar: [3,5,9,"hey!", [], { ar: [1,[ 3,4,6,9, null, [], [] ]], e: fn // different: missing property f: undefined }] }, e: 0.43445 }, 5, "string", 0, fn, false, null, undefined, 0, [ 4,5,6,7,8,9,11,22,33,44,55,"66", null, [], [[[[[3]]]], "3"], {}, 1/0 ], [], [[[], "foo", null, { n: 1/0, z: { a: [3,4,5,6,"yep!", undefined, undefined], b: {} } }, {}]]]), false); }); test("Prototypal inheritance", function() { function Gizmo(id) { this.id = id; } function Hoozit(id) { this.id = id; } Hoozit.prototype = new Gizmo(); var gizmo = new Gizmo("ok"); var hoozit = new Hoozit("ok"); // Try this test many times after test on instances that hold function // to make sure that our code does not mess with last object constructor memoization. equal(QUnit.equiv(function () {}, function () {}), false); // Hoozit inherit from Gizmo // hoozit instanceof Hoozit; // true // hoozit instanceof Gizmo; // true equal(QUnit.equiv(hoozit, gizmo), true); Gizmo.prototype.bar = true; // not a function just in case we skip them // Hoozit inherit from Gizmo // They are equivalent equal(QUnit.equiv(hoozit, gizmo), true); // Make sure this is still true !important // The reason for this is that I forgot to reset the last // caller to where it were called from. equal(QUnit.equiv(function () {}, function () {}), false); // Make sure this is still true !important equal(QUnit.equiv(hoozit, gizmo), true); Hoozit.prototype.foo = true; // not a function just in case we skip them // Gizmo does not inherit from Hoozit // gizmo instanceof Gizmo; // true // gizmo instanceof Hoozit; // false // They are not equivalent equal(QUnit.equiv(hoozit, gizmo), false); // Make sure this is still true !important equal(QUnit.equiv(function () {}, function () {}), false); }); test("Instances", function() { function A() {} var a1 = new A(); var a2 = new A(); function B() { this.fn = function () {}; } var b1 = new B(); var b2 = new B(); equal(QUnit.equiv(a1, a2), true, "Same property, same constructor"); // b1.fn and b2.fn are functions but they are different references // But we decided to skip function for instances. equal(QUnit.equiv(b1, b2), true, "Same property, same constructor"); equal(QUnit.equiv(a1, b1), false, "Same properties but different constructor"); // failed function Car(year) { var privateVar = 0; this.year = year; this.isOld = function() { return year > 10; }; } function Human(year) { var privateVar = 1; this.year = year; this.isOld = function() { return year > 80; }; } var car = new Car(30); var carSame = new Car(30); var carDiff = new Car(10); var human = new Human(30); var diff = { year: 30 }; var same = { year: 30, isOld: function () {} }; equal(QUnit.equiv(car, car), true); equal(QUnit.equiv(car, carDiff), false); equal(QUnit.equiv(car, carSame), true); equal(QUnit.equiv(car, human), false); }); test("Complex Instances Nesting (with function value in literals and/or in nested instances)", function() { function A(fn) { this.a = {}; this.fn = fn; this.b = {a: []}; this.o = {}; this.fn1 = fn; } function B(fn) { this.fn = fn; this.fn1 = function () {}; this.a = new A(function () {}); } function fnOutside() { } function C(fn) { function fnInside() { } this.x = 10; this.fn = fn; this.fn1 = function () {}; this.fn2 = fnInside; this.fn3 = { a: true, b: fnOutside // ok make reference to a function in all instances scope }; this.o1 = {}; // This function will be ignored. // Even if it is not visible for all instances (e.g. locked in a closures), // it is from a property that makes part of an instance (e.g. from the C constructor) this.b1 = new B(function () {}); this.b2 = new B({ x: { b2: new B(function() {}) } }); } function D(fn) { function fnInside() { } this.x = 10; this.fn = fn; this.fn1 = function () {}; this.fn2 = fnInside; this.fn3 = { a: true, b: fnOutside, // ok make reference to a function in all instances scope // This function won't be ingored. // It isn't visible for all C insances // and it is not in a property of an instance. (in an Object instances e.g. the object literal) c: fnInside }; this.o1 = {}; // This function will be ignored. // Even if it is not visible for all instances (e.g. locked in a closures), // it is from a property that makes part of an instance (e.g. from the C constructor) this.b1 = new B(function () {}); this.b2 = new B({ x: { b2: new B(function() {}) } }); } function E(fn) { function fnInside() { } this.x = 10; this.fn = fn; this.fn1 = function () {}; this.fn2 = fnInside; this.fn3 = { a: true, b: fnOutside // ok make reference to a function in all instances scope }; this.o1 = {}; // This function will be ignored. // Even if it is not visible for all instances (e.g. locked in a closures), // it is from a property that makes part of an instance (e.g. from the C constructor) this.b1 = new B(function () {}); this.b2 = new B({ x: { b1: new B({a: function() {}}), b2: new B(function() {}) } }); } var a1 = new A(function () {}); var a2 = new A(function () {}); equal(QUnit.equiv(a1, a2), true); equal(QUnit.equiv(a1, a2), true); // different instances var b1 = new B(function () {}); var b2 = new B(function () {}); equal(QUnit.equiv(b1, b2), true); var c1 = new C(function () {}); var c2 = new C(function () {}); equal(QUnit.equiv(c1, c2), true); var d1 = new D(function () {}); var d2 = new D(function () {}); equal(QUnit.equiv(d1, d2), false); var e1 = new E(function () {}); var e2 = new E(function () {}); equal(QUnit.equiv(e1, e2), false); }); test('object with references to self wont loop', function(){ var circularA = { abc:null }, circularB = { abc:null }; circularA.abc = circularA; circularB.abc = circularB; equal(QUnit.equiv(circularA, circularB), true, "Should not repeat test on object (ambigous test)"); circularA.def = 1; circularB.def = 1; equal(QUnit.equiv(circularA, circularB), true, "Should not repeat test on object (ambigous test)"); circularA.def = 1; circularB.def = 0; equal(QUnit.equiv(circularA, circularB), false, "Should not repeat test on object (unambigous test)"); }); test('array with references to self wont loop', function(){ var circularA = [], circularB = []; circularA.push(circularA); circularB.push(circularB); equal(QUnit.equiv(circularA, circularB), true, "Should not repeat test on array (ambigous test)"); circularA.push( 'abc' ); circularB.push( 'abc' ); equal(QUnit.equiv(circularA, circularB), true, "Should not repeat test on array (ambigous test)"); circularA.push( 'hello' ); circularB.push( 'goodbye' ); equal(QUnit.equiv(circularA, circularB), false, "Should not repeat test on array (unambigous test)"); }); test('mixed object/array with references to self wont loop', function(){ var circularA = [{abc:null}], circularB = [{abc:null}]; circularA[0].abc = circularA; circularB[0].abc = circularB; circularA.push(circularA); circularB.push(circularB); equal(QUnit.equiv(circularA, circularB), true, "Should not repeat test on object/array (ambigous test)"); circularA[0].def = 1; circularB[0].def = 1; equal(QUnit.equiv(circularA, circularB), true, "Should not repeat test on object/array (ambigous test)"); circularA[0].def = 1; circularB[0].def = 0; equal(QUnit.equiv(circularA, circularB), false, "Should not repeat test on object/array (unambigous test)"); }); test("Test that must be done at the end because they extend some primitive's prototype", function() { // Try that a function looks like our regular expression. // This tests if we check that a and b are really both instance of RegExp Function.prototype.global = true; Function.prototype.multiline = true; Function.prototype.ignoreCase = false; Function.prototype.source = "my regex"; var re = /my regex/gm; equal(QUnit.equiv(re, function () {}), false, "A function that looks that a regex isn't a regex"); // This test will ensures it works in both ways, and ALSO especially that we can make differences // between RegExp and Function constructor because typeof on a RegExpt instance is "function" equal(QUnit.equiv(function () {}, re), false, "Same conversely, but ensures that function and regexp are distinct because their constructor are different"); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/headless.html000066400000000000000000000012521240302775300301670ustar00rootroot00000000000000 QUnit Test Suite
    test markup
    node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/index.html000066400000000000000000000006101240302775300275030ustar00rootroot00000000000000 QUnit Test Suite
    test markup
    node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/logs.html000066400000000000000000000005551240302775300273500ustar00rootroot00000000000000 QUnit Test Suite
    test markup
    node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/logs.js000066400000000000000000000057601240302775300270230ustar00rootroot00000000000000// TODO disable reordering for this suite! var begin = 0, moduleStart = 0, moduleDone = 0, testStart = 0, testDone = 0, log = 0, moduleContext, moduleDoneContext, testContext, testDoneContext, logContext; QUnit.begin(function() { begin++; }); QUnit.done(function() { }); QUnit.moduleStart(function(context) { moduleStart++; moduleContext = context; }); QUnit.moduleDone(function(context) { moduleDone++; moduleDoneContext = context; }); QUnit.testStart(function(context) { testStart++; testContext = context; }); QUnit.testDone(function(context) { testDone++; testDoneContext = context; }); QUnit.log(function(context) { log++; logContext = context; }); var logs = ["begin", "testStart", "testDone", "log", "moduleStart", "moduleDone", "done"]; for (var i = 0; i < logs.length; i++) { (function() { var log = logs[i]; QUnit[log](function() { console.log(log, arguments); }); })(); } module("logs1"); test("test1", 13, function() { equal(begin, 1); equal(moduleStart, 1); equal(testStart, 1); equal(testDone, 0); equal(moduleDone, 0); deepEqual(logContext, { result: true, message: undefined, actual: 0, expected: 0 }); equal("foo", "foo", "msg"); deepEqual(logContext, { result: true, message: "msg", actual: "foo", expected: "foo" }); strictEqual(testDoneContext, undefined); deepEqual(testContext, { module: "logs1", name: "test1" }); strictEqual(moduleDoneContext, undefined); deepEqual(moduleContext, { name: "logs1" }); equal(log, 12); }); test("test2", 10, function() { equal(begin, 1); equal(moduleStart, 1); equal(testStart, 2); equal(testDone, 1); equal(moduleDone, 0); deepEqual(testDoneContext, { module: "logs1", name: "test1", failed: 0, passed: 13, total: 13 }); deepEqual(testContext, { module: "logs1", name: "test2" }); strictEqual(moduleDoneContext, undefined); deepEqual(moduleContext, { name: "logs1" }); equal(log, 22); }); module("logs2"); test("test1", 9, function() { equal(begin, 1); equal(moduleStart, 2); equal(testStart, 3); equal(testDone, 2); equal(moduleDone, 1); deepEqual(testContext, { module: "logs2", name: "test1" }); deepEqual(moduleDoneContext, { name: "logs1", failed: 0, passed: 23, total: 23 }); deepEqual(moduleContext, { name: "logs2" }); equal(log, 31); }); test("test2", 8, function() { equal(begin, 1); equal(moduleStart, 2); equal(testStart, 4); equal(testDone, 3); equal(moduleDone, 1); deepEqual(testContext, { module: "logs2", name: "test2" }); deepEqual(moduleContext, { name: "logs2" }); equal(log, 39); }); var testAutorun = true; QUnit.done(function() { if (!testAutorun) { return; } testAutorun = false; module("autorun"); test("reset", 0, function() {}); moduleStart = moduleDone = 0; test("first", function(){ equal(moduleStart, 1, "test started"); equal(moduleDone, 0, "test in progress"); }); test("second", function(){ equal(moduleStart, 2, "test started"); equal(moduleDone, 1, "test in progress"); }); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/narwhal-test.js000066400000000000000000000010311240302775300304530ustar00rootroot00000000000000// run with // node test/node-test.js var QUnit = require("../qunit/qunit"); QUnit.log(function(details) { if (!details.result) { var output = "FAILED: " + (details.message ? details.message + ", " : ""); if (details.actual) { output += "expected: " + details.expected + ", actual: " + details.actual; } if (details.source) { output += ", " + details.source; } print(output); } else { print("ok!"); } }); QUnit.test("yo", function() { QUnit.equal(true, false); QUnit.equal(true, false, "gotta fail"); x.y.z; });node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/node-test.js000066400000000000000000000010051240302775300277450ustar00rootroot00000000000000// run with // node test/node-test.js var QUnit = require("../qunit/qunit"); QUnit.log(function(details) { if (!details.result) { var output = "FAILED: " + (details.message ? details.message + ", " : ""); if (details.actual) { output += "expected: " + details.expected + ", actual: " + details.actual; } if (details.source) { output += ", " + details.source; } console.log(output); } }); QUnit.test("yo", function() { QUnit.equal(true, false); QUnit.equal(true, false, "gotta fail"); x.y.z; });node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/swarminject.js000066400000000000000000000005161240302775300303770ustar00rootroot00000000000000// load testswarm agent (function() { var url = window.location.search; url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) ); if ( !url || url.indexOf("http") !== 0 ) { return; } document.write(""); })(); node-merge-1.2.0/tests/qunit/node_modules/qunit/support/qunit/test/test.js000066400000000000000000000315541240302775300270360ustar00rootroot00000000000000test("module without setup/teardown (default)", function() { expect(1); ok(true); }); test("expect in test", 3, function() { ok(true); ok(true); ok(true); }); test("expect in test", 1, function() { ok(true); }); QUnit.module("assertion helpers"); QUnit.test( "QUnit.assert compatibility", function( assert ) { QUnit.expect(4); assert.ok( true, "Calling method on `assert` argument to test() callback" ); // Should also work, although not documented QUnit.assert.ok( true, "Calling method on QUnit.assert object" ); // Test compatibility aliases QUnit.ok( true, "Calling aliased method in QUnit root object" ); ok( true, "Calling aliased function in global namespace" ); }); module("setup test", { setup: function() { ok(true); } }); test("module with setup", function() { expect(2); ok(true); }); test("module with setup, expect in test call", 2, function() { ok(true); }); var state; module("setup/teardown test", { setup: function() { state = true; ok(true); x = 1; }, teardown: function() { ok(true); // can introduce and delete globals in setup/teardown // without noglobals sounding the alarm delete x; } }); test("module with setup/teardown", function() { expect(3); ok(true); }); module("setup/teardown test 2"); test("module without setup/teardown", function() { expect(1); ok(true); }); var orgDate; module("Date test", { setup: function() { orgDate = Date; Date = function () { ok( false, 'QUnit should internally be independant from Date-related manipulation and testing' ); return new orgDate(); }; }, teardown: function() { Date = orgDate; } }); test("sample test for Date test", function () { expect(1); ok(true); }); if (typeof setTimeout !== 'undefined') { state = 'fail'; module("teardown and stop", { teardown: function() { equal(state, "done", "Test teardown."); } }); test("teardown must be called after test ended", function() { expect(1); stop(); setTimeout(function() { state = "done"; start(); }, 13); }); test("parameter passed to stop increments semaphore n times", function() { expect(1); stop(3); setTimeout(function() { state = "not enough starts"; start(), start(); }, 13); setTimeout(function() { state = "done"; start(); }, 15); }); test("parameter passed to start decrements semaphore n times", function() { expect(1); stop(), stop(), stop(); setTimeout(function() { state = "done"; start(3); }, 18); }); module("async setup test", { setup: function() { stop(); setTimeout(function(){ ok(true); start(); }, 500); } }); asyncTest("module with async setup", function() { expect(2); ok(true); start(); }); module("async teardown test", { teardown: function() { stop(); setTimeout(function(){ ok(true); start(); }, 500); } }); asyncTest("module with async teardown", function() { expect(2); ok(true); start(); }); module("asyncTest"); asyncTest("asyncTest", function() { expect(2); ok(true); setTimeout(function() { state = "done"; ok(true); start(); }, 13); }); asyncTest("asyncTest", 2, function() { ok(true); setTimeout(function() { state = "done"; ok(true); start(); }, 13); }); test("sync", 2, function() { stop(); setTimeout(function() { ok(true); start(); }, 13); stop(); setTimeout(function() { ok(true); start(); }, 125); }); test("test synchronous calls to stop", 2, function() { stop(); setTimeout(function(){ ok(true, 'first'); start(); stop(); setTimeout(function(){ ok(true, 'second'); start(); }, 150); }, 150); }); } module("save scope", { setup: function() { this.foo = "bar"; }, teardown: function() { deepEqual(this.foo, "bar"); } }); test("scope check", function() { expect(2); deepEqual(this.foo, "bar"); }); module("simple testEnvironment setup", { foo: "bar", bugid: "#5311" // example of meta-data }); test("scope check", function() { deepEqual(this.foo, "bar"); }); test("modify testEnvironment",function() { expect(0); this.foo="hamster"; }); test("testEnvironment reset for next test",function() { deepEqual(this.foo, "bar"); }); module("testEnvironment with object", { options:{ recipe:"soup", ingredients:["hamster","onions"] } }); test("scope check", function() { deepEqual(this.options, {recipe:"soup",ingredients:["hamster","onions"]}) ; }); test("modify testEnvironment",function() { expect(0); // since we do a shallow copy, the testEnvironment can be modified this.options.ingredients.push("carrots"); }); test("testEnvironment reset for next test",function() { deepEqual(this.options, {recipe:"soup",ingredients:["hamster","onions","carrots"]}, "Is this a bug or a feature? Could do a deep copy") ; }); module("testEnvironment tests"); function makeurl() { var testEnv = QUnit.current_testEnvironment; var url = testEnv.url || 'http://example.com/search'; var q = testEnv.q || 'a search test'; return url + '?q='+encodeURIComponent(q); } test("makeurl working",function() { equal( QUnit.current_testEnvironment, this, 'The current testEnvironment is global'); equal( makeurl(), 'http://example.com/search?q=a%20search%20test', 'makeurl returns a default url if nothing specified in the testEnvironment'); }); module("testEnvironment with makeurl settings", { url: 'http://google.com/', q: 'another_search_test' }); test("makeurl working with settings from testEnvironment", function() { equal( makeurl(), 'http://google.com/?q=another_search_test', 'rather than passing arguments, we use test metadata to from the url'); }); module("jsDump"); test("jsDump output", function() { equal( QUnit.jsDump.parse([1, 2]), "[\n 1,\n 2\n]" ); equal( QUnit.jsDump.parse({top: 5, left: 0}), "{\n \"left\": 0,\n \"top\": 5\n}" ); if (typeof document !== 'undefined' && document.getElementById("qunit-header")) { equal( QUnit.jsDump.parse(document.getElementById("qunit-header")), "

    " ); equal( QUnit.jsDump.parse(document.getElementsByTagName("h1")), "[\n

    \n]" ); } }); module("assertions"); test("raises",function() { function CustomError( message ) { this.message = message; } CustomError.prototype.toString = function() { return this.message; }; throws( function() { throw "my error" } ); throws( function() { throw "my error" }, "simple string throw, no 'expected' value given" ); throws( function() { throw new CustomError(); }, CustomError, 'thrown error is an instance of CustomError' ); throws( function() { throw new CustomError("some error description"); }, /description/, "use a regex to match against the stringified error" ); throws( function() { throw new CustomError("some error description"); }, function( err ) { if ( (err instanceof CustomError) && /description/.test(err) ) { return true; } }, "custom validation function" ); throws( function() { ( window.execScript || function( data ) { window["eval"].call( window, data ); })( "throw 'error'" ); }, 'globally-executed errors caught' ); this.CustomError = CustomError; throws( function() { throw new this.CustomError("some error description"); }, /description/, "throw error from property of 'this' context" ); raises( function() { throw "error" }, "simple throw, asserting with deprecated raises() function" ); }); if (typeof document !== "undefined") { module("fixture"); test("setup", function() { expect(0); document.getElementById("qunit-fixture").innerHTML = "foobar"; }); test("basics", function() { equal( document.getElementById("qunit-fixture").innerHTML, "test markup", "automatically reset" ); }); test("running test name displayed", function() { expect(2); var displaying = document.getElementById("qunit-testresult"); ok( /running test name displayed/.test(displaying.innerHTML), "Expect test name to be found in displayed text" ); ok( /fixture/.test(displaying.innerHTML), "Expect module name to be found in displayed text" ); }); } module("custom assertions"); (function() { function mod2(value, expected, message) { var actual = value % 2; QUnit.push(actual == expected, actual, expected, message); } test("mod2", function() { mod2(2, 0, "2 % 2 == 0"); mod2(3, 1, "3 % 2 == 1"); }); })(); module("recursions"); function Wrap(x) { this.wrap = x; if (x == undefined) this.first = true; } function chainwrap(depth, first, prev) { depth = depth || 0; var last = prev || new Wrap(); first = first || last; if (depth == 1) { first.wrap = last; } if (depth > 1) { last = chainwrap(depth-1, first, new Wrap(last)); } return last; } test("check jsDump recursion", function() { expect(4); var noref = chainwrap(0); var nodump = QUnit.jsDump.parse(noref); equal(nodump, '{\n "first": true,\n "wrap": undefined\n}'); var selfref = chainwrap(1); var selfdump = QUnit.jsDump.parse(selfref); equal(selfdump, '{\n "first": true,\n "wrap": recursion(-1)\n}'); var parentref = chainwrap(2); var parentdump = QUnit.jsDump.parse(parentref); equal(parentdump, '{\n "wrap": {\n "first": true,\n "wrap": recursion(-2)\n }\n}'); var circref = chainwrap(10); var circdump = QUnit.jsDump.parse(circref); ok(new RegExp("recursion\\(-10\\)").test(circdump), "(" +circdump + ") should show -10 recursion level"); }); test("check (deep-)equal recursion", function() { var noRecursion = chainwrap(0); equal(noRecursion, noRecursion, "I should be equal to me."); deepEqual(noRecursion, noRecursion, "... and so in depth."); var selfref = chainwrap(1); equal(selfref, selfref, "Even so if I nest myself."); deepEqual(selfref, selfref, "... into the depth."); var circref = chainwrap(10); equal(circref, circref, "Or hide that through some levels of indirection."); deepEqual(circref, circref, "... and checked on all levels!"); }); test('Circular reference with arrays', function() { // pure array self-ref var arr = []; arr.push(arr); var arrdump = QUnit.jsDump.parse(arr); equal(arrdump, '[\n recursion(-1)\n]'); equal(arr, arr[0], 'no endless stack when trying to dump arrays with circular ref'); // mix obj-arr circular ref var obj = {}; var childarr = [obj]; obj.childarr = childarr; var objdump = QUnit.jsDump.parse(obj); var childarrdump = QUnit.jsDump.parse(childarr); equal(objdump, '{\n "childarr": [\n recursion(-2)\n ]\n}'); equal(childarrdump, '[\n {\n "childarr": recursion(-2)\n }\n]'); equal(obj.childarr, childarr, 'no endless stack when trying to dump array/object mix with circular ref'); equal(childarr[0], obj, 'no endless stack when trying to dump array/object mix with circular ref'); }); test('Circular reference - test reported by soniciq in #105', function() { var MyObject = function() {}; MyObject.prototype.parent = function(obj) { if (obj === undefined) { return this._parent; } this._parent = obj; }; MyObject.prototype.children = function(obj) { if (obj === undefined) { return this._children; } this._children = obj; }; var a = new MyObject(), b = new MyObject(); var barr = [b]; a.children(barr); b.parent(a); equal(a.children(), barr); deepEqual(a.children(), [b]); }); (function() { var reset = QUnit.reset; module("reset"); test("reset runs assertions", function() { expect(0); QUnit.reset = function() { ok( false, "reset should not modify test status" ); reset.apply( this, arguments ); }; }); test("reset runs assertions, cleanup", function() { expect(0); QUnit.reset = reset; }); })(); if (typeof setTimeout !== 'undefined') { function testAfterDone(){ var testName = "ensure has correct number of assertions"; function secondAfterDoneTest(){ QUnit.config.done = []; //QUnit.done = function(){}; //because when this does happen, the assertion count parameter doesn't actually //work we use this test to check the assertion count. module("check previous test's assertion counts"); test('count previous two test\'s assertions', function(){ var spans = document.getElementsByTagName('span'), tests = [], countNodes; //find these two tests for (var i = 0; i < spans.length; i++) { if (spans[i].innerHTML.indexOf(testName) !== -1) { tests.push(spans[i]); } } //walk dom to counts countNodes = tests[0].nextSibling.nextSibling.getElementsByTagName('b'); equal(countNodes[1].innerHTML, "99"); countNodes = tests[1].nextSibling.nextSibling.getElementsByTagName('b'); equal(countNodes[1].innerHTML, "99"); }); } QUnit.config.done = []; QUnit.done(secondAfterDoneTest); module("Synchronous test after load of page"); asyncTest('Async test', function(){ start(); for (var i = 1; i < 100; i++) { ok(i); } }); test(testName, 99, function(){ for (var i = 1; i < 100; i++) { ok(i); } }); //we need two of these types of tests in order to ensure that assertions //don't move between tests. test(testName + ' 2', 99, function(){ for (var i = 1; i < 100; i++) { ok(i); } }); } QUnit.done(testAfterDone); } node-merge-1.2.0/tests/qunit/node_modules/qunit/test/000077500000000000000000000000001240302775300226355ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/000077500000000000000000000000001240302775300245065ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/async-code.js000066400000000000000000000000241240302775300270650ustar00rootroot00000000000000exports.blubb = 123;node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/async-test.js000066400000000000000000000007521240302775300271420ustar00rootroot00000000000000test('1', 1, function (){ ok(true, "tests intermixing sync and async tests #1") }); test('a', 2, function(){ stop(); setTimeout(function() { ok(true, 'test a1'); ok(true, 'test a2'); start(); }, 10000); }) test('2', 1, function (){ ok(true, "tests intermixing sync and async tests #2") }); test('b', 2, function(){ stop(); setTimeout(function() { ok(true, 'test b1'); ok(true, 'test b2'); start(); }, 10); }) node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/child-code-global.js000066400000000000000000000001111240302775300302660ustar00rootroot00000000000000exports.whereFrom = function() { return "I was required as global"; }; node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/child-code-namespace.js000066400000000000000000000001241240302775300307660ustar00rootroot00000000000000exports.whereFrom = function() { return "I was required as a namespace object"; };node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/child-tests-global.js000066400000000000000000000002321240302775300305220ustar00rootroot00000000000000 test("Dependency file required as global", function() { equal(typeof whereFrom, "function"); equal(whereFrom(), "I was required as global"); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/child-tests-namespace.js000066400000000000000000000004351240302775300312230ustar00rootroot00000000000000test("Dependency file required as a namespace object", function() { strictEqual(typeof testns != "undefined", true); equal(typeof testns.whereFrom, "function", "right method attached to right object"); equal(testns.whereFrom(), "I was required as a namespace object"); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/testrunner-code.js000066400000000000000000000002431240302775300301640ustar00rootroot00000000000000exports.myMethod = function() { return 123; }; exports.myAsyncMethod = function(callback) { setTimeout(function() { callback(123); }, 100); };node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/testrunner-tests.js000066400000000000000000000013021240302775300304110ustar00rootroot00000000000000test('myMethod test', function() { equal(myMethod(), 123, 'myMethod returns right result'); equal(myMethod(), 321, 'this should trigger an error'); }) test('myAsyncMethod test', function() { ok(true, 'myAsyncMethod started'); stop(); expect(3); myAsyncMethod(function(data) { equal(data, 123, 'myAsyncMethod returns right result'); equal(data, 321, 'this should trigger an error'); start(); }); }) test('circular reference', function() { equal(global, global, 'test global'); }); test('use original Date', function() { var timekeeper = require('timekeeper'); timekeeper.travel(Date.now() - 1000000); ok(true, 'date modified'); }); node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/uncaught-exception-code.js000066400000000000000000000000001240302775300315540ustar00rootroot00000000000000node-merge-1.2.0/tests/qunit/node_modules/qunit/test/fixtures/uncaught-exception-test.js000066400000000000000000000000371240302775300316330ustar00rootroot00000000000000throw new Error('Some error.') node-merge-1.2.0/tests/qunit/node_modules/qunit/test/testrunner.js000066400000000000000000000076151240302775300254150ustar00rootroot00000000000000var a = require('assert'), chainer = require('chainer'), _ = require('underscore'); var tr = require('../lib/testrunner'), log = require('../lib/log'); var fixtures = __dirname + '/fixtures', chain = chainer(); tr.options.log = { // log assertions overview // assertions: true, // log expected and actual values for failed tests // errors: true, // log tests overview // tests: true, // log summary // summary: true, // log global summary (all files) // globalSummary: true, // log currently testing code file testing: true }; // reset log stats every time .next is called chain.next = function() { log.reset(); return chainer.prototype.next.apply(this, arguments); }; chain.add('base testrunner', function() { tr.run({ code: fixtures + '/testrunner-code.js', tests: fixtures + '/testrunner-tests.js', }, function(err, res) { var stat = { files: 1, tests: 4, assertions: 7, failed: 2, passed: 5 }; a.equal(err, null, 'no errors'); a.ok(res.runtime > 0, 'Date was modified'); delete res.runtime; a.deepEqual(stat, res, 'base testrunner test'); chain.next(); }); }); chain.add('attach code to global', function() { tr.run({ code: fixtures + '/child-code-global.js', tests: fixtures + '/child-tests-global.js', }, function(err, res) { var stat = { files: 1, tests: 1, assertions: 2, failed: 0, passed: 2 }; delete res.runtime; a.equal(err, null, 'no errors'); a.deepEqual(stat, res, 'attaching code to global works'); chain.next(); }); }); chain.add('attach deps to global', function() { tr.run({ deps: fixtures + '/child-code-global.js', code: fixtures + '/testrunner-code.js', tests: fixtures + '/child-tests-global.js', }, function(err, res) { var stat = { files: 1, tests: 1, assertions: 2, failed: 0, passed: 2 }; delete res.runtime; a.equal(err, null, 'no errors'); a.deepEqual(stat, res, 'attaching dependencies to global works'); chain.next(); }); }); chain.add('attach code to a namespace', function() { tr.run({ code: { path: fixtures + '/child-code-namespace.js', namespace: 'testns' }, tests: fixtures + '/child-tests-namespace.js', }, function(err, res) { var stat = { files: 1, tests: 1, assertions: 3, failed: 0, passed: 3 }; delete res.runtime; a.equal(err, null, 'no errors'); a.deepEqual(stat, res, 'attaching code to specified namespace works'); chain.next(); }); }); chain.add('async testing logs', function() { tr.run({ code: fixtures + '/async-code.js', tests: fixtures + '/async-test.js', }, function(err, res) { var stat = { files: 1, tests: 4, assertions: 6, failed: 0, passed: 6 }; delete res.runtime; a.equal(err, null, 'no errors'); a.deepEqual(stat, res, 'async code testing works'); chain.next(); }); }); chain.add('uncaught exception', function() { tr.run({ code: fixtures + '/uncaught-exception-code.js', tests: fixtures + '/uncaught-exception-test.js', }, function(err, res) { a.ok(err instanceof Error, 'error was forwarded') chain.next(); }); }); chain.add(function() { console.log('\nAll tests ok.'); }); chain.start(); node-merge-1.2.0/tests/qunit/qunit.css000066400000000000000000000111621240302775300177140ustar00rootroot00000000000000/** * QUnit v1.11.0pre-5542510a63bae14cbffc571033369aa9962ec946 2012-12-19 - A JavaScript Unit Testing Framework * * http://qunitjs.com * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ /** Font Family and Sizes */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; } #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } #qunit-tests { font-size: smaller; } /** Resets */ #qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter { margin: 0; padding: 0; } /** Header */ #qunit-header { padding: 0.5em 0 0.5em 1em; color: #8699a4; background-color: #0d3349; font-size: 1.5em; line-height: 1em; font-weight: normal; border-radius: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px; } #qunit-header a { text-decoration: none; color: #c2ccd1; } #qunit-header a:hover, #qunit-header a:focus { color: #fff; } #qunit-testrunner-toolbar label { display: inline-block; padding: 0 .5em 0 .1em; } #qunit-banner { height: 5px; } #qunit-testrunner-toolbar { padding: 0.5em 0 0.5em 2em; color: #5E740B; background-color: #eee; overflow: hidden; } #qunit-userAgent { padding: 0.5em 0 0.5em 2.5em; background-color: #2b81af; color: #fff; text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; } #qunit-modulefilter-container { float: right; } /** Tests: Pass/Fail */ #qunit-tests { list-style-position: inside; } #qunit-tests li { padding: 0.4em 0.5em 0.4em 2.5em; border-bottom: 1px solid #fff; list-style-position: inside; } #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { display: none; } #qunit-tests li strong { cursor: pointer; } #qunit-tests li a { padding: 0.5em; color: #c2ccd1; text-decoration: none; } #qunit-tests li a:hover, #qunit-tests li a:focus { color: #000; } #qunit-tests li .runtime { float: right; font-size: smaller; } .qunit-assert-list { margin-top: 0.5em; padding: 0.5em; background-color: #fff; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } .qunit-collapsed { display: none; } #qunit-tests table { border-collapse: collapse; margin-top: .2em; } #qunit-tests th { text-align: right; vertical-align: top; padding: 0 .5em 0 0; } #qunit-tests td { vertical-align: top; } #qunit-tests pre { margin: 0; white-space: pre-wrap; word-wrap: break-word; } #qunit-tests del { background-color: #e0f2be; color: #374e0c; text-decoration: none; } #qunit-tests ins { background-color: #ffcaca; color: #500; text-decoration: none; } /*** Test Counts */ #qunit-tests b.counts { color: black; } #qunit-tests b.passed { color: #5E740B; } #qunit-tests b.failed { color: #710909; } #qunit-tests li li { padding: 5px; background-color: #fff; border-bottom: none; list-style-position: inside; } /*** Passing Styles */ #qunit-tests li li.pass { color: #3c510c; background-color: #fff; border-left: 10px solid #C6E746; } #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } #qunit-tests .pass .test-name { color: #366097; } #qunit-tests .pass .test-actual, #qunit-tests .pass .test-expected { color: #999999; } #qunit-banner.qunit-pass { background-color: #C6E746; } /*** Failing Styles */ #qunit-tests li li.fail { color: #710909; background-color: #fff; border-left: 10px solid #EE5757; white-space: pre; } #qunit-tests > li:last-child { border-radius: 0 0 5px 5px; -moz-border-radius: 0 0 5px 5px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px; } #qunit-tests .fail { color: #000000; background-color: #EE5757; } #qunit-tests .fail .test-name, #qunit-tests .fail .module-name { color: #000000; } #qunit-tests .fail .test-actual { color: #EE5757; } #qunit-tests .fail .test-expected { color: green; } #qunit-banner.qunit-fail { background-color: #EE5757; } /** Result */ #qunit-testresult { padding: 0.5em 0.5em 0.5em 2.5em; color: #2b81af; background-color: #D2E0E6; border-bottom: 1px solid white; } #qunit-testresult .module-name { font-weight: bold; } /** Fixture */ #qunit-fixture { position: absolute; top: -10000px; left: -10000px; width: 1000px; height: 1000px; }node-merge-1.2.0/tests/qunit/qunit.js000066400000000000000000001447741240302775300175600ustar00rootroot00000000000000/** * QUnit v1.10.0 - A JavaScript Unit Testing Framework * * http://qunitjs.com * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ (function( window ) { var QUnit, config, onErrorFnPrev, testId = 0, fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""), toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty, // Keep a local reference to Date (GH-283) Date = window.Date, defined = { setTimeout: typeof window.setTimeout !== "undefined", sessionStorage: (function() { var x = "qunit-test-string"; try { sessionStorage.setItem( x, x ); sessionStorage.removeItem( x ); return true; } catch( e ) { return false; } }()) }; function Test( settings ) { extend( this, settings ); this.assertions = []; this.testNumber = ++Test.count; } Test.count = 0; Test.prototype = { init: function() { var a, b, li, tests = id( "qunit-tests" ); if ( tests ) { b = document.createElement( "strong" ); b.innerHTML = this.name; // `a` initialized at top of scope a = document.createElement( "a" ); a.innerHTML = "Rerun"; a.href = QUnit.url({ testNumber: this.testNumber }); li = document.createElement( "li" ); li.appendChild( b ); li.appendChild( a ); li.className = "running"; li.id = this.id = "qunit-test-output" + testId++; tests.appendChild( li ); } }, setup: function() { if ( this.module !== config.previousModule ) { if ( config.previousModule ) { runLoggingCallbacks( "moduleDone", QUnit, { name: config.previousModule, failed: config.moduleStats.bad, passed: config.moduleStats.all - config.moduleStats.bad, total: config.moduleStats.all }); } config.previousModule = this.module; config.moduleStats = { all: 0, bad: 0 }; runLoggingCallbacks( "moduleStart", QUnit, { name: this.module }); } else if ( config.autorun ) { runLoggingCallbacks( "moduleStart", QUnit, { name: this.module }); } config.current = this; this.testEnvironment = extend({ setup: function() {}, teardown: function() {} }, this.moduleTestEnvironment ); runLoggingCallbacks( "testStart", QUnit, { name: this.testName, module: this.module }); // allow utility functions to access the current test environment // TODO why?? QUnit.current_testEnvironment = this.testEnvironment; if ( !config.pollution ) { saveGlobal(); } if ( config.notrycatch ) { this.testEnvironment.setup.call( this.testEnvironment ); return; } try { this.testEnvironment.setup.call( this.testEnvironment ); } catch( e ) { QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); } }, run: function() { config.current = this; var running = id( "qunit-testresult" ); if ( running ) { running.innerHTML = "Running:
    " + this.name; } if ( this.async ) { QUnit.stop(); } if ( config.notrycatch ) { this.callback.call( this.testEnvironment, QUnit.assert ); return; } try { this.callback.call( this.testEnvironment, QUnit.assert ); } catch( e ) { QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + e.message, extractStacktrace( e, 0 ) ); // else next test will carry the responsibility saveGlobal(); // Restart the tests if they're blocking if ( config.blocking ) { QUnit.start(); } } }, teardown: function() { config.current = this; if ( config.notrycatch ) { this.testEnvironment.teardown.call( this.testEnvironment ); return; } else { try { this.testEnvironment.teardown.call( this.testEnvironment ); } catch( e ) { QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); } } checkPollution(); }, finish: function() { config.current = this; if ( config.requireExpects && this.expected == null ) { QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack ); } else if ( this.expected != null && this.expected != this.assertions.length ) { QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack ); } else if ( this.expected == null && !this.assertions.length ) { QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack ); } var assertion, a, b, i, li, ol, test = this, good = 0, bad = 0, tests = id( "qunit-tests" ); config.stats.all += this.assertions.length; config.moduleStats.all += this.assertions.length; if ( tests ) { ol = document.createElement( "ol" ); for ( i = 0; i < this.assertions.length; i++ ) { assertion = this.assertions[i]; li = document.createElement( "li" ); li.className = assertion.result ? "pass" : "fail"; li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" ); ol.appendChild( li ); if ( assertion.result ) { good++; } else { bad++; config.stats.bad++; config.moduleStats.bad++; } } // store result when possible if ( QUnit.config.reorder && defined.sessionStorage ) { if ( bad ) { sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad ); } else { sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName ); } } if ( bad === 0 ) { ol.style.display = "none"; } // `b` initialized at top of scope b = document.createElement( "strong" ); b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; addEvent(b, "click", function() { var next = b.nextSibling.nextSibling, display = next.style.display; next.style.display = display === "none" ? "block" : "none"; }); addEvent(b, "dblclick", function( e ) { var target = e && e.target ? e.target : window.event.srcElement; if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { target = target.parentNode; } if ( window.location && target.nodeName.toLowerCase() === "strong" ) { window.location = QUnit.url({ testNumber: test.testNumber }); } }); // `li` initialized at top of scope li = id( this.id ); li.className = bad ? "fail" : "pass"; li.removeChild( li.firstChild ); a = li.firstChild; li.appendChild( b ); li.appendChild ( a ); li.appendChild( ol ); } else { for ( i = 0; i < this.assertions.length; i++ ) { if ( !this.assertions[i].result ) { bad++; config.stats.bad++; config.moduleStats.bad++; } } } runLoggingCallbacks( "testDone", QUnit, { name: this.testName, module: this.module, failed: bad, passed: this.assertions.length - bad, total: this.assertions.length }); QUnit.reset(); config.current = undefined; }, queue: function() { var bad, test = this; synchronize(function() { test.init(); }); function run() { // each of these can by async synchronize(function() { test.setup(); }); synchronize(function() { test.run(); }); synchronize(function() { test.teardown(); }); synchronize(function() { test.finish(); }); } // `bad` initialized at top of scope // defer when previous test run passed, if storage is available bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName ); if ( bad ) { run(); } else { synchronize( run, true ); } } }; // Root QUnit object. // `QUnit` initialized at top of scope QUnit = { // call on start of module test to prepend name to all tests module: function( name, testEnvironment ) { config.currentModule = name; config.currentModuleTestEnvironment = testEnvironment; config.modules[name] = true; }, asyncTest: function( testName, expected, callback ) { if ( arguments.length === 2 ) { callback = expected; expected = null; } QUnit.test( testName, expected, callback, true ); }, test: function( testName, expected, callback, async ) { var test, name = "" + escapeInnerText( testName ) + ""; if ( arguments.length === 2 ) { callback = expected; expected = null; } if ( config.currentModule ) { name = "" + config.currentModule + ": " + name; } test = new Test({ name: name, testName: testName, expected: expected, async: async, callback: callback, module: config.currentModule, moduleTestEnvironment: config.currentModuleTestEnvironment, stack: sourceFromStacktrace( 2 ) }); if ( !validTest( test ) ) { return; } test.queue(); }, // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. expect: function( asserts ) { if (arguments.length === 1) { config.current.expected = asserts; } else { return config.current.expected; } }, start: function( count ) { config.semaphore -= count || 1; // don't start until equal number of stop-calls if ( config.semaphore > 0 ) { return; } // ignore if start is called more often then stop if ( config.semaphore < 0 ) { config.semaphore = 0; } // A slight delay, to avoid any current callbacks if ( defined.setTimeout ) { window.setTimeout(function() { if ( config.semaphore > 0 ) { return; } if ( config.timeout ) { clearTimeout( config.timeout ); } config.blocking = false; process( true ); }, 13); } else { config.blocking = false; process( true ); } }, stop: function( count ) { config.semaphore += count || 1; config.blocking = true; if ( config.testTimeout && defined.setTimeout ) { clearTimeout( config.timeout ); config.timeout = window.setTimeout(function() { QUnit.ok( false, "Test timed out" ); config.semaphore = 1; QUnit.start(); }, config.testTimeout ); } } }; // Asssert helpers // All of these must call either QUnit.push() or manually do: // - runLoggingCallbacks( "log", .. ); // - config.current.assertions.push({ .. }); QUnit.assert = { /** * Asserts rough true-ish result. * @name ok * @function * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); */ ok: function( result, msg ) { if ( !config.current ) { throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) ); } result = !!result; var source, details = { module: config.current.module, name: config.current.testName, result: result, message: msg }; msg = escapeInnerText( msg || (result ? "okay" : "failed" ) ); msg = "" + msg + ""; if ( !result ) { source = sourceFromStacktrace( 2 ); if ( source ) { details.source = source; msg += "
    Source:
    " + escapeInnerText( source ) + "
    "; } } runLoggingCallbacks( "log", QUnit, details ); config.current.assertions.push({ result: result, message: msg }); }, /** * Assert that the first two arguments are equal, with an optional message. * Prints out both actual and expected values. * @name equal * @function * @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" ); */ equal: function( actual, expected, message ) { QUnit.push( expected == actual, actual, expected, message ); }, /** * @name notEqual * @function */ notEqual: function( actual, expected, message ) { QUnit.push( expected != actual, actual, expected, message ); }, /** * @name deepEqual * @function */ deepEqual: function( actual, expected, message ) { QUnit.push( QUnit.equiv(actual, expected), actual, expected, message ); }, /** * @name notDeepEqual * @function */ notDeepEqual: function( actual, expected, message ) { QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message ); }, /** * @name strictEqual * @function */ strictEqual: function( actual, expected, message ) { QUnit.push( expected === actual, actual, expected, message ); }, /** * @name notStrictEqual * @function */ notStrictEqual: function( actual, expected, message ) { QUnit.push( expected !== actual, actual, expected, message ); }, throws: function( block, expected, message ) { var actual, ok = false; // 'expected' is optional if ( typeof expected === "string" ) { message = expected; expected = null; } config.current.ignoreGlobalErrors = true; try { block.call( config.current.testEnvironment ); } catch (e) { actual = e; } config.current.ignoreGlobalErrors = false; if ( actual ) { // we don't want to validate thrown error if ( !expected ) { ok = true; // expected is a regexp } else if ( QUnit.objectType( expected ) === "regexp" ) { ok = expected.test( actual ); // expected is a constructor } else if ( actual instanceof expected ) { ok = true; // expected is a validation function which returns true is validation passed } else if ( expected.call( {}, actual ) === true ) { ok = true; } QUnit.push( ok, actual, null, message ); } else { QUnit.pushFailure( message, null, 'No exception was thrown.' ); } } }; /** * @deprecate since 1.8.0 * Kept assertion helpers in root for backwards compatibility */ extend( QUnit, QUnit.assert ); /** * @deprecated since 1.9.0 * Kept global "raises()" for backwards compatibility */ QUnit.raises = QUnit.assert.throws; /** * @deprecated since 1.0.0, replaced with error pushes since 1.3.0 * Kept to avoid TypeErrors for undefined methods. */ QUnit.equals = function() { QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" ); }; QUnit.same = function() { QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" ); }; // We want access to the constructor's prototype (function() { function F() {} F.prototype = QUnit; QUnit = new F(); // Make F QUnit's constructor so that we can add to the prototype later QUnit.constructor = F; }()); /** * Config object: Maintain internal state * Later exposed as QUnit.config * `config` initialized at top of scope */ config = { // The queue of tests to run queue: [], // block until document ready blocking: true, // when enabled, show only failing tests // gets persisted through sessionStorage and can be changed in UI via checkbox hidepassed: false, // by default, run previously failed tests first // very useful in combination with "Hide passed tests" checked reorder: true, // by default, modify document.title when suite is done altertitle: true, // when enabled, all tests must call expect() requireExpects: false, // add checkboxes that are persisted in the query-string // when enabled, the id is set to `true` as a `QUnit.config` property urlConfig: [ { id: "noglobals", label: "Check for Globals", tooltip: "Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings." }, { id: "notrycatch", label: "No try-catch", tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings." } ], // Set of all modules. modules: {}, // logging callback queues begin: [], done: [], log: [], testStart: [], testDone: [], moduleStart: [], moduleDone: [] }; // Initialize more QUnit.config and QUnit.urlParams (function() { var i, location = window.location || { search: "", protocol: "file:" }, params = location.search.slice( 1 ).split( "&" ), length = params.length, urlParams = {}, current; if ( params[ 0 ] ) { for ( i = 0; i < length; i++ ) { current = params[ i ].split( "=" ); current[ 0 ] = decodeURIComponent( current[ 0 ] ); // allow just a key to turn on a flag, e.g., test.html?noglobals current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; urlParams[ current[ 0 ] ] = current[ 1 ]; } } QUnit.urlParams = urlParams; // String search anywhere in moduleName+testName config.filter = urlParams.filter; // Exact match of the module name config.module = urlParams.module; config.testNumber = parseInt( urlParams.testNumber, 10 ) || null; // Figure out if we're running the tests from a server or not QUnit.isLocal = location.protocol === "file:"; }()); // Export global variables, unless an 'exports' object exists, // in that case we assume we're in CommonJS (dealt with on the bottom of the script) if ( typeof exports === "undefined" ) { extend( window, QUnit ); // Expose QUnit object window.QUnit = QUnit; } // Extend QUnit object, // these after set here because they should not be exposed as global functions extend( QUnit, { config: config, // Initialize the configuration options init: function() { extend( config, { stats: { all: 0, bad: 0 }, moduleStats: { all: 0, bad: 0 }, started: +new Date(), updateRate: 1000, blocking: false, autostart: true, autorun: false, filter: "", queue: [], semaphore: 0 }); var tests, banner, result, qunit = id( "qunit" ); if ( qunit ) { qunit.innerHTML = "

    " + escapeInnerText( document.title ) + "

    " + "

    " + "
    " + "

    " + "
      "; } tests = id( "qunit-tests" ); banner = id( "qunit-banner" ); result = id( "qunit-testresult" ); if ( tests ) { tests.innerHTML = ""; } if ( banner ) { banner.className = ""; } if ( result ) { result.parentNode.removeChild( result ); } if ( tests ) { result = document.createElement( "p" ); result.id = "qunit-testresult"; result.className = "result"; tests.parentNode.insertBefore( result, tests ); result.innerHTML = "Running...
       "; } }, // Resets the test setup. Useful for tests that modify the DOM. reset: function() { var fixture = id( "qunit-fixture" ); if ( fixture ) { fixture.innerHTML = config.fixture; } }, // Trigger an event on an element. // @example triggerEvent( document.body, "click" ); triggerEvent: function( elem, type, event ) { if ( document.createEvent ) { event = document.createEvent( "MouseEvents" ); event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null); elem.dispatchEvent( event ); } else if ( elem.fireEvent ) { elem.fireEvent( "on" + type ); } }, // Safe object type checking is: function( type, obj ) { return QUnit.objectType( obj ) == type; }, objectType: function( obj ) { if ( typeof obj === "undefined" ) { return "undefined"; // consider: typeof null === object } if ( obj === null ) { return "null"; } var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || ""; switch ( type ) { case "Number": if ( isNaN(obj) ) { return "nan"; } return "number"; case "String": case "Boolean": case "Array": case "Date": case "RegExp": case "Function": return type.toLowerCase(); } if ( typeof obj === "object" ) { return "object"; } return undefined; }, push: function( result, actual, expected, message ) { if ( !config.current ) { throw new Error( "assertion outside test context, was " + sourceFromStacktrace() ); } var output, source, details = { module: config.current.module, name: config.current.testName, result: result, message: message, actual: actual, expected: expected }; message = escapeInnerText( message ) || ( result ? "okay" : "failed" ); message = "" + message + ""; output = message; if ( !result ) { expected = escapeInnerText( QUnit.jsDump.parse(expected) ); actual = escapeInnerText( QUnit.jsDump.parse(actual) ); output += ""; if ( actual != expected ) { output += ""; output += ""; } source = sourceFromStacktrace(); if ( source ) { details.source = source; output += ""; } output += "
      Expected:
      " + expected + "
      Result:
      " + actual + "
      Diff:
      " + QUnit.diff( expected, actual ) + "
      Source:
      " + escapeInnerText( source ) + "
      "; } runLoggingCallbacks( "log", QUnit, details ); config.current.assertions.push({ result: !!result, message: output }); }, pushFailure: function( message, source, actual ) { if ( !config.current ) { throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) ); } var output, details = { module: config.current.module, name: config.current.testName, result: false, message: message }; message = escapeInnerText( message ) || "error"; message = "" + message + ""; output = message; output += ""; if ( actual ) { output += ""; } if ( source ) { details.source = source; output += ""; } output += "
      Result:
      " + escapeInnerText( actual ) + "
      Source:
      " + escapeInnerText( source ) + "
      "; runLoggingCallbacks( "log", QUnit, details ); config.current.assertions.push({ result: false, message: output }); }, url: function( params ) { params = extend( extend( {}, QUnit.urlParams ), params ); var key, querystring = "?"; for ( key in params ) { if ( !hasOwn.call( params, key ) ) { continue; } querystring += encodeURIComponent( key ) + "=" + encodeURIComponent( params[ key ] ) + "&"; } return window.location.pathname + querystring.slice( 0, -1 ); }, extend: extend, id: id, addEvent: addEvent // load, equiv, jsDump, diff: Attached later }); /** * @deprecated: Created for backwards compatibility with test runner that set the hook function * into QUnit.{hook}, instead of invoking it and passing the hook function. * QUnit.constructor is set to the empty F() above so that we can add to it's prototype here. * Doing this allows us to tell if the following methods have been overwritten on the actual * QUnit object. */ extend( QUnit.constructor.prototype, { // Logging callbacks; all receive a single argument with the listed properties // run test/logs.html for any related changes begin: registerLoggingCallback( "begin" ), // done: { failed, passed, total, runtime } done: registerLoggingCallback( "done" ), // log: { result, actual, expected, message } log: registerLoggingCallback( "log" ), // testStart: { name } testStart: registerLoggingCallback( "testStart" ), // testDone: { name, failed, passed, total } testDone: registerLoggingCallback( "testDone" ), // moduleStart: { name } moduleStart: registerLoggingCallback( "moduleStart" ), // moduleDone: { name, failed, passed, total } moduleDone: registerLoggingCallback( "moduleDone" ) }); if ( typeof document === "undefined" || document.readyState === "complete" ) { config.autorun = true; } QUnit.load = function() { runLoggingCallbacks( "begin", QUnit, {} ); // Initialize the config, saving the execution queue var banner, filter, i, label, len, main, ol, toolbar, userAgent, val, urlConfigCheckboxes, moduleFilter, numModules = 0, moduleFilterHtml = "", urlConfigHtml = "", oldconfig = extend( {}, config ); QUnit.init(); extend(config, oldconfig); config.blocking = false; len = config.urlConfig.length; for ( i = 0; i < len; i++ ) { val = config.urlConfig[i]; if ( typeof val === "string" ) { val = { id: val, label: val, tooltip: "[no tooltip available]" }; } config[ val.id ] = QUnit.urlParams[ val.id ]; urlConfigHtml += ""; } moduleFilterHtml += ""; // `userAgent` initialized at top of scope userAgent = id( "qunit-userAgent" ); if ( userAgent ) { userAgent.innerHTML = navigator.userAgent; } // `banner` initialized at top of scope banner = id( "qunit-header" ); if ( banner ) { banner.innerHTML = "" + banner.innerHTML + " "; } // `toolbar` initialized at top of scope toolbar = id( "qunit-testrunner-toolbar" ); if ( toolbar ) { // `filter` initialized at top of scope filter = document.createElement( "input" ); filter.type = "checkbox"; filter.id = "qunit-filter-pass"; addEvent( filter, "click", function() { var tmp, ol = document.getElementById( "qunit-tests" ); if ( filter.checked ) { ol.className = ol.className + " hidepass"; } else { tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; ol.className = tmp.replace( / hidepass /, " " ); } if ( defined.sessionStorage ) { if (filter.checked) { sessionStorage.setItem( "qunit-filter-passed-tests", "true" ); } else { sessionStorage.removeItem( "qunit-filter-passed-tests" ); } } }); if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) { filter.checked = true; // `ol` initialized at top of scope ol = document.getElementById( "qunit-tests" ); ol.className = ol.className + " hidepass"; } toolbar.appendChild( filter ); // `label` initialized at top of scope label = document.createElement( "label" ); label.setAttribute( "for", "qunit-filter-pass" ); label.setAttribute( "title", "Only show tests and assertons that fail. Stored in sessionStorage." ); label.innerHTML = "Hide passed tests"; toolbar.appendChild( label ); urlConfigCheckboxes = document.createElement( 'span' ); urlConfigCheckboxes.innerHTML = urlConfigHtml; addEvent( urlConfigCheckboxes, "change", function( event ) { var params = {}; params[ event.target.name ] = event.target.checked ? true : undefined; window.location = QUnit.url( params ); }); toolbar.appendChild( urlConfigCheckboxes ); if (numModules > 1) { moduleFilter = document.createElement( 'span' ); moduleFilter.setAttribute( 'id', 'qunit-modulefilter-container' ); moduleFilter.innerHTML = moduleFilterHtml; addEvent( moduleFilter, "change", function() { var selectBox = moduleFilter.getElementsByTagName("select")[0], selectedModule = decodeURIComponent(selectBox.options[selectBox.selectedIndex].value); window.location = QUnit.url( { module: ( selectedModule === "" ) ? undefined : selectedModule } ); }); toolbar.appendChild(moduleFilter); } } // `main` initialized at top of scope main = id( "qunit-fixture" ); if ( main ) { config.fixture = main.innerHTML; } if ( config.autostart ) { QUnit.start(); } }; addEvent( window, "load", QUnit.load ); // `onErrorFnPrev` initialized at top of scope // Preserve other handlers onErrorFnPrev = window.onerror; // Cover uncaught exceptions // Returning true will surpress the default browser handler, // returning false will let it run. window.onerror = function ( error, filePath, linerNr ) { var ret = false; if ( onErrorFnPrev ) { ret = onErrorFnPrev( error, filePath, linerNr ); } // Treat return value as window.onerror itself does, // Only do our handling if not surpressed. if ( ret !== true ) { if ( QUnit.config.current ) { if ( QUnit.config.current.ignoreGlobalErrors ) { return true; } QUnit.pushFailure( error, filePath + ":" + linerNr ); } else { QUnit.test( "global failure", extend( function() { QUnit.pushFailure( error, filePath + ":" + linerNr ); }, { validTest: validTest } ) ); } return false; } return ret; }; function done() { config.autorun = true; // Log the last module results if ( config.currentModule ) { runLoggingCallbacks( "moduleDone", QUnit, { name: config.currentModule, failed: config.moduleStats.bad, passed: config.moduleStats.all - config.moduleStats.bad, total: config.moduleStats.all }); } var i, key, banner = id( "qunit-banner" ), tests = id( "qunit-tests" ), runtime = +new Date() - config.started, passed = config.stats.all - config.stats.bad, html = [ "Tests completed in ", runtime, " milliseconds.
      ", "", passed, " tests of ", config.stats.all, " passed, ", config.stats.bad, " failed." ].join( "" ); if ( banner ) { banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" ); } if ( tests ) { id( "qunit-testresult" ).innerHTML = html; } if ( config.altertitle && typeof document !== "undefined" && document.title ) { // show ✖ for good, ✔ for bad suite result in title // use escape sequences in case file gets loaded with non-utf-8-charset document.title = [ ( config.stats.bad ? "\u2716" : "\u2714" ), document.title.replace( /^[\u2714\u2716] /i, "" ) ].join( " " ); } // clear own sessionStorage items if all tests passed if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) { // `key` & `i` initialized at top of scope for ( i = 0; i < sessionStorage.length; i++ ) { key = sessionStorage.key( i++ ); if ( key.indexOf( "qunit-test-" ) === 0 ) { sessionStorage.removeItem( key ); } } } // scroll back to top to show results if ( window.scrollTo ) { window.scrollTo(0, 0); } runLoggingCallbacks( "done", QUnit, { failed: config.stats.bad, passed: passed, total: config.stats.all, runtime: runtime }); } /** @return Boolean: true if this test should be ran */ function validTest( test ) { var include, filter = config.filter && config.filter.toLowerCase(), module = config.module && config.module.toLowerCase(), fullName = (test.module + ": " + test.testName).toLowerCase(); // Internally-generated tests are always valid if ( test.callback && test.callback.validTest === validTest ) { delete test.callback.validTest; return true; } if ( config.testNumber ) { return test.testNumber === config.testNumber; } if ( module && ( !test.module || test.module.toLowerCase() !== module ) ) { return false; } if ( !filter ) { return true; } include = filter.charAt( 0 ) !== "!"; if ( !include ) { filter = filter.slice( 1 ); } // If the filter matches, we need to honour include if ( fullName.indexOf( filter ) !== -1 ) { return include; } // Otherwise, do the opposite return !include; } // so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions) // Later Safari and IE10 are supposed to support error.stack as well // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack function extractStacktrace( e, offset ) { offset = offset === undefined ? 3 : offset; var stack, include, i, regex; if ( e.stacktrace ) { // Opera return e.stacktrace.split( "\n" )[ offset + 3 ]; } else if ( e.stack ) { // Firefox, Chrome stack = e.stack.split( "\n" ); if (/^error$/i.test( stack[0] ) ) { stack.shift(); } if ( fileName ) { include = []; for ( i = offset; i < stack.length; i++ ) { if ( stack[ i ].indexOf( fileName ) != -1 ) { break; } include.push( stack[ i ] ); } if ( include.length ) { return include.join( "\n" ); } } return stack[ offset ]; } else if ( e.sourceURL ) { // Safari, PhantomJS // hopefully one day Safari provides actual stacktraces // exclude useless self-reference for generated Error objects if ( /qunit.js$/.test( e.sourceURL ) ) { return; } // for actual exceptions, this is useful return e.sourceURL + ":" + e.line; } } function sourceFromStacktrace( offset ) { try { throw new Error(); } catch ( e ) { return extractStacktrace( e, offset ); } } function escapeInnerText( s ) { if ( !s ) { return ""; } s = s + ""; return s.replace( /[\&<>]/g, function( s ) { switch( s ) { case "&": return "&"; case "<": return "<"; case ">": return ">"; default: return s; } }); } function synchronize( callback, last ) { config.queue.push( callback ); if ( config.autorun && !config.blocking ) { process( last ); } } function process( last ) { function next() { process( last ); } var start = new Date().getTime(); config.depth = config.depth ? config.depth + 1 : 1; while ( config.queue.length && !config.blocking ) { if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { config.queue.shift()(); } else { window.setTimeout( next, 13 ); break; } } config.depth--; if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { done(); } } function saveGlobal() { config.pollution = []; if ( config.noglobals ) { for ( var key in window ) { // in Opera sometimes DOM element ids show up here, ignore them if ( !hasOwn.call( window, key ) || /^qunit-test-output/.test( key ) ) { continue; } config.pollution.push( key ); } } } function checkPollution( name ) { var newGlobals, deletedGlobals, old = config.pollution; saveGlobal(); newGlobals = diff( config.pollution, old ); if ( newGlobals.length > 0 ) { QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") ); } deletedGlobals = diff( old, config.pollution ); if ( deletedGlobals.length > 0 ) { QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") ); } } // returns a new Array with the elements that are in a but not in b function diff( a, b ) { var i, j, result = a.slice(); for ( i = 0; i < result.length; i++ ) { for ( j = 0; j < b.length; j++ ) { if ( result[i] === b[j] ) { result.splice( i, 1 ); i--; break; } } } return result; } function extend( a, b ) { for ( var prop in b ) { if ( b[ prop ] === undefined ) { delete a[ prop ]; // Avoid "Member not found" error in IE8 caused by setting window.constructor } else if ( prop !== "constructor" || a !== window ) { a[ prop ] = b[ prop ]; } } return a; } function addEvent( elem, type, fn ) { if ( elem.addEventListener ) { elem.addEventListener( type, fn, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, fn ); } else { fn(); } } function id( name ) { return !!( typeof document !== "undefined" && document && document.getElementById ) && document.getElementById( name ); } function registerLoggingCallback( key ) { return function( callback ) { config[key].push( callback ); }; } // Supports deprecated method of completely overwriting logging callbacks function runLoggingCallbacks( key, scope, args ) { //debugger; var i, callbacks; if ( QUnit.hasOwnProperty( key ) ) { QUnit[ key ].call(scope, args ); } else { callbacks = config[ key ]; for ( i = 0; i < callbacks.length; i++ ) { callbacks[ i ].call( scope, args ); } } } // Test for equality any JavaScript type. // Author: Philippe Rathé QUnit.equiv = (function() { // Call the o related callback with the given arguments. function bindCallbacks( o, callbacks, args ) { var prop = QUnit.objectType( o ); if ( prop ) { if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) { return callbacks[ prop ].apply( callbacks, args ); } else { return callbacks[ prop ]; // or undefined } } } // the real equiv function var innerEquiv, // stack to decide between skip/abort functions callers = [], // stack to avoiding loops from circular referencing parents = [], getProto = Object.getPrototypeOf || function ( obj ) { return obj.__proto__; }, callbacks = (function () { // for string, boolean, number and null function useStrictEquality( b, a ) { if ( b instanceof a.constructor || a instanceof b.constructor ) { // to catch short annotaion VS 'new' annotation of a // declaration // e.g. var i = 1; // var j = new Number(1); return a == b; } else { return a === b; } } return { "string": useStrictEquality, "boolean": useStrictEquality, "number": useStrictEquality, "null": useStrictEquality, "undefined": useStrictEquality, "nan": function( b ) { return isNaN( b ); }, "date": function( b, a ) { return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf(); }, "regexp": function( b, a ) { return QUnit.objectType( b ) === "regexp" && // the regex itself a.source === b.source && // and its modifers a.global === b.global && // (gmi) ... a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky; }, // - skip when the property is a method of an instance (OOP) // - abort otherwise, // initial === would have catch identical references anyway "function": function() { var caller = callers[callers.length - 1]; return caller !== Object && typeof caller !== "undefined"; }, "array": function( b, a ) { var i, j, len, loop; // b could be an object literal here if ( QUnit.objectType( b ) !== "array" ) { return false; } len = a.length; if ( len !== b.length ) { // safe and faster return false; } // track reference to avoid circular references parents.push( a ); for ( i = 0; i < len; i++ ) { loop = false; for ( j = 0; j < parents.length; j++ ) { if ( parents[j] === a[i] ) { loop = true;// dont rewalk array } } if ( !loop && !innerEquiv(a[i], b[i]) ) { parents.pop(); return false; } } parents.pop(); return true; }, "object": function( b, a ) { var i, j, loop, // Default to true eq = true, aProperties = [], bProperties = []; // comparing constructors is more strict than using // instanceof if ( a.constructor !== b.constructor ) { // Allow objects with no prototype to be equivalent to // objects with Object as their constructor. if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) || ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) { return false; } } // stack constructor before traversing properties callers.push( a.constructor ); // track reference to avoid circular references parents.push( a ); for ( i in a ) { // be strict: don't ensures hasOwnProperty // and go deep loop = false; for ( j = 0; j < parents.length; j++ ) { if ( parents[j] === a[i] ) { // don't go down the same path twice loop = true; } } aProperties.push(i); // collect a's properties if (!loop && !innerEquiv( a[i], b[i] ) ) { eq = false; break; } } callers.pop(); // unstack, we are done parents.pop(); for ( i in b ) { bProperties.push( i ); // collect b's properties } // Ensures identical properties name return eq && innerEquiv( aProperties.sort(), bProperties.sort() ); } }; }()); innerEquiv = function() { // can take multiple arguments var args = [].slice.apply( arguments ); if ( args.length < 2 ) { return true; // end transition } return (function( a, b ) { if ( a === b ) { return true; // catch the most you can } else if ( a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b) ) { return false; // don't lose time with error prone cases } else { return bindCallbacks(a, callbacks, [ b, a ]); } // apply transition with (1..n) arguments }( args[0], args[1] ) && arguments.callee.apply( this, args.splice(1, args.length - 1 )) ); }; return innerEquiv; }()); /** * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | * http://flesler.blogspot.com Licensed under BSD * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008 * * @projectDescription Advanced and extensible data dumping for Javascript. * @version 1.0.0 * @author Ariel Flesler * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} */ QUnit.jsDump = (function() { function quote( str ) { return '"' + str.toString().replace( /"/g, '\\"' ) + '"'; } function literal( o ) { return o + ""; } function join( pre, arr, post ) { var s = jsDump.separator(), base = jsDump.indent(), inner = jsDump.indent(1); if ( arr.join ) { arr = arr.join( "," + s + inner ); } if ( !arr ) { return pre + post; } return [ pre, inner + arr, base + post ].join(s); } function array( arr, stack ) { var i = arr.length, ret = new Array(i); this.up(); while ( i-- ) { ret[i] = this.parse( arr[i] , undefined , stack); } this.down(); return join( "[", ret, "]" ); } var reName = /^function (\w+)/, jsDump = { parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance stack = stack || [ ]; var inStack, res, parser = this.parsers[ type || this.typeOf(obj) ]; type = typeof parser; inStack = inArray( obj, stack ); if ( inStack != -1 ) { return "recursion(" + (inStack - stack.length) + ")"; } //else if ( type == "function" ) { stack.push( obj ); res = parser.call( this, obj, stack ); stack.pop(); return res; } // else return ( type == "string" ) ? parser : this.parsers.error; }, typeOf: function( obj ) { var type; if ( obj === null ) { type = "null"; } else if ( typeof obj === "undefined" ) { type = "undefined"; } else if ( QUnit.is( "regexp", obj) ) { type = "regexp"; } else if ( QUnit.is( "date", obj) ) { type = "date"; } else if ( QUnit.is( "function", obj) ) { type = "function"; } else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) { type = "window"; } else if ( obj.nodeType === 9 ) { type = "document"; } else if ( obj.nodeType ) { type = "node"; } else if ( // native arrays toString.call( obj ) === "[object Array]" || // NodeList objects ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) ) ) { type = "array"; } else { type = typeof obj; } return type; }, separator: function() { return this.multiline ? this.HTML ? "
      " : "\n" : this.HTML ? " " : " "; }, indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing if ( !this.multiline ) { return ""; } var chr = this.indentChar; if ( this.HTML ) { chr = chr.replace( /\t/g, " " ).replace( / /g, " " ); } return new Array( this._depth_ + (extra||0) ).join(chr); }, up: function( a ) { this._depth_ += a || 1; }, down: function( a ) { this._depth_ -= a || 1; }, setParser: function( name, parser ) { this.parsers[name] = parser; }, // The next 3 are exposed so you can use them quote: quote, literal: literal, join: join, // _depth_: 1, // This is the list of parsers, to modify them, use jsDump.setParser parsers: { window: "[Window]", document: "[Document]", error: "[ERROR]", //when no parser is found, shouldn"t happen unknown: "[Unknown]", "null": "null", "undefined": "undefined", "function": function( fn ) { var ret = "function", name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];//functions never have name in IE if ( name ) { ret += " " + name; } ret += "( "; ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" ); return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" ); }, array: array, nodelist: array, "arguments": array, object: function( map, stack ) { var ret = [ ], keys, key, val, i; QUnit.jsDump.up(); if ( Object.keys ) { keys = Object.keys( map ); } else { keys = []; for ( key in map ) { keys.push( key ); } } keys.sort(); for ( i = 0; i < keys.length; i++ ) { key = keys[ i ]; val = map[ key ]; ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) ); } QUnit.jsDump.down(); return join( "{", ret, "}" ); }, node: function( node ) { var a, val, open = QUnit.jsDump.HTML ? "<" : "<", close = QUnit.jsDump.HTML ? ">" : ">", tag = node.nodeName.toLowerCase(), ret = open + tag; for ( a in QUnit.jsDump.DOMAttrs ) { val = node[ QUnit.jsDump.DOMAttrs[a] ]; if ( val ) { ret += " " + a + "=" + QUnit.jsDump.parse( val, "attribute" ); } } return ret + close + open + "/" + tag + close; }, functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function var args, l = fn.length; if ( !l ) { return ""; } args = new Array(l); while ( l-- ) { args[l] = String.fromCharCode(97+l);//97 is 'a' } return " " + args.join( ", " ) + " "; }, key: quote, //object calls it internally, the key part of an item in a map functionCode: "[code]", //function calls it internally, it's the content of the function attribute: quote, //node calls it internally, it's an html attribute value string: quote, date: quote, regexp: literal, //regex number: literal, "boolean": literal }, DOMAttrs: { //attributes to dump from nodes, name=>realName id: "id", name: "name", "class": "className" }, HTML: false,//if true, entities are escaped ( <, >, \t, space and \n ) indentChar: " ",//indentation unit multiline: true //if true, items in a collection, are separated by a \n, else just a space. }; return jsDump; }()); // from Sizzle.js function getText( elems ) { var i, elem, ret = ""; for ( i = 0; elems[i]; i++ ) { elem = elems[i]; // Get the text from text nodes and CDATA nodes if ( elem.nodeType === 3 || elem.nodeType === 4 ) { ret += elem.nodeValue; // Traverse everything else, except comment nodes } else if ( elem.nodeType !== 8 ) { ret += getText( elem.childNodes ); } } return ret; } // from jquery.js function inArray( elem, array ) { if ( array.indexOf ) { return array.indexOf( elem ); } for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; } } return -1; } /* * Javascript Diff Algorithm * By John Resig (http://ejohn.org/) * Modified by Chu Alan "sprite" * * Released under the MIT license. * * More Info: * http://ejohn.org/projects/javascript-diff-algorithm/ * * Usage: QUnit.diff(expected, actual) * * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick brown fox jumped jumps over" */ QUnit.diff = (function() { function diff( o, n ) { var i, ns = {}, os = {}; for ( i = 0; i < n.length; i++ ) { if ( ns[ n[i] ] == null ) { ns[ n[i] ] = { rows: [], o: null }; } ns[ n[i] ].rows.push( i ); } for ( i = 0; i < o.length; i++ ) { if ( os[ o[i] ] == null ) { os[ o[i] ] = { rows: [], n: null }; } os[ o[i] ].rows.push( i ); } for ( i in ns ) { if ( !hasOwn.call( ns, i ) ) { continue; } if ( ns[i].rows.length == 1 && typeof os[i] != "undefined" && os[i].rows.length == 1 ) { n[ ns[i].rows[0] ] = { text: n[ ns[i].rows[0] ], row: os[i].rows[0] }; o[ os[i].rows[0] ] = { text: o[ os[i].rows[0] ], row: ns[i].rows[0] }; } } for ( i = 0; i < n.length - 1; i++ ) { if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null && n[ i + 1 ] == o[ n[i].row + 1 ] ) { n[ i + 1 ] = { text: n[ i + 1 ], row: n[i].row + 1 }; o[ n[i].row + 1 ] = { text: o[ n[i].row + 1 ], row: i + 1 }; } } for ( i = n.length - 1; i > 0; i-- ) { if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null && n[ i - 1 ] == o[ n[i].row - 1 ]) { n[ i - 1 ] = { text: n[ i - 1 ], row: n[i].row - 1 }; o[ n[i].row - 1 ] = { text: o[ n[i].row - 1 ], row: i - 1 }; } } return { o: o, n: n }; } return function( o, n ) { o = o.replace( /\s+$/, "" ); n = n.replace( /\s+$/, "" ); var i, pre, str = "", out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ), oSpace = o.match(/\s+/g), nSpace = n.match(/\s+/g); if ( oSpace == null ) { oSpace = [ " " ]; } else { oSpace.push( " " ); } if ( nSpace == null ) { nSpace = [ " " ]; } else { nSpace.push( " " ); } if ( out.n.length === 0 ) { for ( i = 0; i < out.o.length; i++ ) { str += "" + out.o[i] + oSpace[i] + ""; } } else { if ( out.n[0].text == null ) { for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) { str += "" + out.o[n] + oSpace[n] + ""; } } for ( i = 0; i < out.n.length; i++ ) { if (out.n[i].text == null) { str += "" + out.n[i] + nSpace[i] + ""; } else { // `pre` initialized at top of scope pre = ""; for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) { pre += "" + out.o[n] + oSpace[n] + ""; } str += " " + out.n[i].text + nSpace[i] + pre; } } } return str; }; }()); // for CommonJS enviroments, export everything if ( typeof exports !== "undefined" ) { extend(exports, QUnit); } // get at whatever the global object is, like window in browsers }( (function() {return this;}.call()) ));node-merge-1.2.0/tests/tests.js000066400000000000000000000043101240302775300163770ustar00rootroot00000000000000test('merge', function() { deepEqual( merge({ a: 1 }, { b: 2 }), { a: 1, b: 2 } ); deepEqual( merge({ a: 1 }, { b: { c: { d: 2 } } }), { a: 1, b: { c: { d: 2 } } } ); deepEqual( merge(), {} ); deepEqual( merge(undefined), {} ); deepEqual( merge([]), {} ); deepEqual( merge(true), {} ); deepEqual( merge(null, true, [0, 1, 2], 3, { a: 1 }, function() {}, undefined, { b: 2 }), { a: 1, b: 2 } ); }); test('merge (clone)', function() { var input = { a: 1, b: { c: { d: 2, e: ['x', 'y', { z: { w: ['k'] }}] } }, f: null, g: undefined, h: true }, original = { a: 1, b: { c: { d: 2, e: ['x', 'y', { z: { w: ['k'] }}] } }, f: null, g: undefined, h: true }, output = merge(true, input); input.b.c.d++; input.b.c.e[2].z.w = null; input.h = null; deepEqual(original, output); input = original; output = merge(true, input, { a: 2 }); deepEqual(output.a, 2); deepEqual(input.a, 1); }); test('merge.recursive', function() { deepEqual( merge.recursive({ a: { b: 1 } }, { a : { c: 1 }}), { a: { b: 1, c: 1 } } ); deepEqual( merge.recursive({ a: { b: 1, c: 1 } }, { a : { b: 2 }}), { a: { b: 2, c: 1 } } ); deepEqual( merge.recursive({ a: { b: [1, 2, 3], c: 1 } }, { a : { b: ['a'] }}), { a: { b: ['a'], c: 1 } } ); deepEqual( merge.recursive({ a: { b: { b: 2 }, c: 1 } }, { a : { b: 2 }}), { a: { b: 2, c: 1 } } ); }); test('merge.recursive (clone)', function() { var input = { a: { b: 1 } }; deepEqual( merge.recursive(true, input, { a : { c: 1 }}), { a: { b: 1, c: 1 } } ); deepEqual({ a: { b: 1 } }, input); input = { a: { b: 1, c: 1 } }; deepEqual( merge.recursive(true, input, { a : { b: 2 }}), { a: { b: 2, c: 1 } } ); deepEqual({ a: { b: 1, c: 1 } }, input); input = { a: { b: [1, 2, 3], c: 1 } }; deepEqual( merge.recursive(true, input, { a : { b: ['a'] }}), { a: { b: ['a'], c: 1 } } ); deepEqual({ a: { b: [1, 2, 3], c: 1 } }, input); input = { a: { b: { b: 2 }, c: 1 } }; deepEqual( merge.recursive(true, input, { a : { b: 2 }}), { a: { b: 2, c: 1 } } ); deepEqual({ a: { b: { b: 2 }, c: 1 } }, input); });